[SR-Users] Operations after relay

Daniel-Constantin Mierla miconda at gmail.com
Tue Jun 11 12:15:22 CEST 2019


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 <abalashov at evaristesys.com> 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
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> 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




More information about the sr-users mailing list