_______________________________________________Hi,
I am using Kamailio as a gateway for inbound calls to a group of Asterisk servers.
One particular call scenario involves matching pairs of calls. Originally I was just sending the calls through to Asterisk for processing (including the ‘matching up’), but there is a further requirement that the first received call must not be answered until its matching call arrives – and this is a little awkward in Asterisk, especially if there will be many calls.
I thought of t_suspend/t_continue functionality in Kamailio. I have implemented this:
CallA arrives.
Send 180-ringing
Use ds_select_dst() to choose an Asterisk to handle the paired calls
Store destination and other data in an htable so that I can match the call later.
Invoke t_suspend() for CallA.
What I have implemented when the matching call arrives is this:
CallB arrives (and some logic matches it to the suspended CallA).
Invoke t_continue(‘id’,’label’,’CONTINUE_CALL’); so that CallA is now released and the route ends in t_relay() to send it on to Asterisk.
Set $du on CallB to match the destination, then t_relay() this call to send it on to the same Asterisk.
The solution almost works, but there is a problem.
The t_relay() for CallA is fine, and the call is forwarded.
When the script runs the t_relay() for CallB, I get this logged:
ERROR: tm [t_fwd.c:1728]: t_forward_nonack(): no branches for forwardingERROR: sl [sl_funcs.c:362]: sl_reply_error(): stateless error reply used: I'm terribly sorry, server error occurred (6/SL)
AND after each call I notice an extra transaction stuck in Kamailio (when I use kamctl rpc tm.list).
Can anyone point out where my Kamailio/SIP understanding has let me down?
Many Thanks,
Mark Hall
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users