Hello,
dispatcher module executes some event routes -- it has a wrapper function: https://github.com/kamailio/kamailio/blob/master/src/modules/dispatcher/dispatch.c#L2261 For acc should be simpler, because the sip request should be there, used by acc to get the attributes, so no need to make a fake one. Should be a pice of code like next one plugged in acc_onreply() function from acc module: rt = route_lookup(&event_rt, "acc:record-stored"); if(rt < 0 || event_rt.rlist[rt] == NULL) { LM_DBG("event route does not exist"); return; } backup_rt = get_route_type(); set_route_type(REQUEST_ROUTE); init_run_actions_ctx(&ctx); run_top_route(event_rt.rlist[rt], preq, 0); set_route_type(backup_rt); That's based on a very quick look in the code, you may need to tune a bit (and define some vars, add includes, etc.). Cheers, Daniel On 25/01/2017 15:45, Tobias wrote: > > Hi Daniel, > > > Thanks. Can you point me to a good example of how this is implemented > in another module, perhaps I could then add it myself to acc? > > > /Tobias > > > ------------------------------------------------------------------------ > *From:* Daniel-Constantin Mierla <mico...@gmail.com> > *Sent:* Wednesday, January 25, 2017 3:20 PM > *To:* Tobias; Kamailio (SER) - Users Mailing List > *Subject:* Re: [SR-Users] Event when acc is written? > > > Hello, > > > On 25/01/2017 09:44, Tobias wrote: >> >> Hi Daniel, >> >> >> Thanks for your reply. >> >> >> Disregarding the MySQL ID, would it be possible to get the callid of >> the call back from the acc module once a write has been made? >> > to my knowledge, there is no cfg event_route executed at that moment. > It should not be something complex to add, but requires c coding in > acc module. > > Cheers, > Daniel > -- > Daniel-Constantin Mierla > www.twitter.com/miconda -- www.linkedin.com/in/miconda > Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - > www.asipto.com > Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com > Kamailio World - Our site will be launched soon > <http://www.kamailioworld.com/> > www.kamailioworld.com > the 5th edition May 8-10, 2017 - Berlin, Germany. Website of the event > and more details will be available very soon! > > > Daniel-Constantin Mierla | LinkedIn <http://www.linkedin.com/in/miconda> > www.linkedin.com > View Daniel-Constantin Mierla’s professional profile on LinkedIn. > LinkedIn is the world's largest business network, helping > professionals like Daniel-Constantin Mierla discover inside > connections to recommended job candidates, industry experts, and > business partners. > > > miconda (@miconda) | Twitter <http://www.twitter.com/miconda> > www.twitter.com > The latest Tweets from miconda (@miconda). Co-founder and leader of > Kamailio SIP Server project (former OpenSER). C Dev. Open Source RTC > advocate. SIP, VoIP, VoLTE and WebRTC consultancy at Asipto. Berlin, > Germany > > -- Daniel-Constantin Mierla www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - Mar 6-8 (Europe) and Mar 20-22 (USA) - www.asipto.com Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users