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
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users