Hello, for a request, t_relay() usually sends out immediately (especially if it is over UDP), so any operation after t_relay() doesn't add delays, but it can lower routing capacity if the operation is taking long time, so it is still good to do some async variant.
There is no "t_relay()" option for reply processing, so replies are sent out once finishing executing on/reply_route blocks. Cheers, Daniel On 11.06.19 17:41, Nicolas Breuer wrote: > Hi Daniel, > > I will try doing on event_route => dialog start. > It will not cause any issues with the relaying 😊 > > > -----Message d'origine----- > De : Daniel-Constantin Mierla <[email protected]> > Envoyé : mardi 11 juin 2019 12:15 > À : Kamailio (SER) - Users Mailing List <[email protected]>; > Nicolas Breuer <[email protected]> > Objet : Re: [SR-Users] Operations after relay > > Hello, > > if you don't need to handle the response from the sql operations, then > look also at the async sql query: > >  - > https://www.kamailio.org/docs/modules/stable/modules/sqlops.html#sqlops.f.sql_query_async > > Cheers, > Daniel > > On 10.06.19 20:01, Nicolas Breuer wrote: >> Thanks Alex. >> I will have a look on your suggestions >> >> >>> Le 10 juin 2019 à 19:59, Alex Balashov <[email protected]> a écrit : >>> >>>> On Mon, Jun 10, 2019 at 06:01:19AM +0000, Nicolas Breuer wrote: >>>> >>>> I want to do some sql operations after a 200 reply, after relaying the >>>> sip packet Is it possible or sending the sip packet is the last >>>> operation permitted ? >>> Hi, >>> >>> Sending the SIP packet is an implicit operation that occurs after all >>> hooks which can intercept a reply (i.e. onreply_route) have been fired. >>> Therefore, you should be careful that your SQL operations do not block >>> the message worker thread that is processing the reply. If you think >>> they might be overly latent, there are some ways around that. >>> >>> Aside from that, there should be no problem with executing SQL >>> operations at the time that you intercept a 200 reply in an >>> onreply_route. Do note, however, that the reply is not going to get >>> relayed until all your operations are done. If what you were asking is >>> whether there is a way to defer those SQL operations until after the >>> reply has already been relayed, the answer is yes, but not entirely >>> straightforwardly (have a look at the 'mqueue' and 'rtimer' modules). >>> >>> -- Alex >>> >>> -- >>> Alex Balashov | Principal | Evariste Systems LLC >>> >>> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) >>> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ >>> >>> _______________________________________________ >>> Kamailio (SER) - Users Mailing List >>> [email protected] >>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> _______________________________________________ >> Kamailio (SER) - Users Mailing List >> [email protected] >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda _______________________________________________ Kamailio (SER) - Users Mailing List [email protected] https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
