[SR-Users] Dispatcher clear dst_avp

Grant Bagdasarian gb at cm.nl
Tue Dec 4 15:32:32 CET 2018


Hello,

I'm trying to use multiple destination sets which may include the same destination.
For instance:
SET ID: 1
sip:10.0.0.1:5060
sip:10.0.0.2:5060

SET ID: 2
sip:10.0.0.1:5060

Whenever a new SIP INVITE is sent to the Kamailio instance it will use SET ID 1. If then for some reason this call attempt fails, failure_route will trigger and SET ID 2 will be used.  At first glance this might not make any sense, but there is some business logic behind this, but it's not relevant for this case.

For some reason, the dst_avp variable still contains the destinations of SET ID 1 in failure_route.
Is there a built-in way to reset this variable for every call to ds_select_domain(), such that only the destinations of passed SET ID will be loaded into the avp?
I tried setting the avp to $null before calling ds_select_domain, but that had some undesirable effects.

The reason I'm asking this is the destinations the call is being sent to are Freeswitch instances, which will return a 482 Request Merged when the same INVITE is sent to the same Freeswitch within 4 seconds (default T4 timer).
I'm trying to match the previously selected destination in failure_route with the next destination and skip if they're the same, or stop processing when they are the same and no more destinations are available.
I know I can mess with the T4 timer in Freeswitch and perhaps even sleep in failure route to deal with the 482 failure, but I rather fix this in a normal way.

Regards,

Grant Bagdasarian

Senior Developer


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20181204/53a054f2/attachment.html>


More information about the sr-users mailing list