I need to hang up a call after some seconds after received 183 provisional response but before any other SIP message. I am using "rtimer" module to set a callback on time, but how can I search for a call on transaction module in order to terminate the call?
I think I am missing something to prepare the transaction data before I can use this data to terminate the call.
I am thinking of storing the call-Id of all transactions to use on timeout callback, I don't know if it's possible.
Thanks in advance. Antonio
Hi,
I think the approach you are contemplating is unnecessarily complicated. :-) Take a look at this option:
https://kamailio.org/docs/modules/5.6.x/modules/tm.html#tmp.p.fr_inv_timer
If you want to start the timer from the moment of a 183 specifically and not any other non-100 1xx provisional reply, then catch the 183 in an onreply_route, and then use t_set_fr():
https://kamailio.org/docs/modules/5.6.x/modules/tm.html#tm.f.t_set_fr
to set the fr_inv_timer to your desired value from that point. Leave the background value as some other default, and set restart_fr_on_each_reply to false.
-- Alex