[OpenSIPS-Users] How to process destination set (exec_dset)
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue Dec 1 23:53:42 CET 2009
Hi John,
Just for the sake of completion - see the other thread (about limitation
of branch_route) for my answer with a solution for this:
http://lists.opensips.org/pipermail/users/2009-December/009600.html
Regards,
Bogdan
John Quick wrote:
> The scenario is this: The route block receives a destination set by calling exec_dset. I then need to
> perform further processing on each URI in the set. To be specific, I need to call lookup("location")
> in case the destination is a locally registered device so the INVITE will be sent to the right IP and
> port and will use the correct sub-route.
>
> The essential parts of the script look like this:
> if (exec_dset("/usr/bin/myapp")) {
> xlog("L_WARN", "New destination set is $ds\n");
> } else {
> log(1, "exec_dset returns error\n");
> }
>
> if (lookup("location")) {
> xlog("L_WARN","Sending to registered UA at $ru\n");
> route(1);
> } else {
> xlog("L_WARN","Sending to peer $ru\n");
> route(2);
> }
>
> >From the output in my log file it looks as if subsequent processing, after exec_dset has been called,
> only uses the first entry in the destination set. i.e. I only see one line of text in the log file
> starting with "Sending to..." even when there are two destinations in the set. However, both
> destinations are called - parallel forking happens.
>
> I tried adding branch_route[1] thinking that maybe the other members of the destination set would be
> processed here, but the log shows nothing has triggered the code in branch_route.
>
> John Quick
> Smartvox Limited
> Web: www.smartvox.co.uk
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
--
Bogdan-Andrei Iancu
www.voice-system.ro
More information about the Users
mailing list