[OpenSIPS-Users] Using OpenSIPs B2BUA with dynamic routing

Ashwin Rath ashwinrath at gmail.com
Sun Nov 20 06:37:43 CET 2011


HI All

I have setup OpenSIPS to act as a B2BUA with "top hiding" scenario.
Additionally, i want to have the ability to dynamically hunt for a
successful route from a list of possible route choices.

Currently i use the following routing script
------SCRIPT BEGINS-----
if(is_method("INVITE") &&
          !(src_ip == "192.168.172.133" && src_port ==5060))
  {
    exec_dset("/usr/local/
getroutes $tU");
    b2b_init_request("top hiding");
    exit;
  };
------SCRIPT ENDS------


the /usr/local/getroutes script listing follows

------SCRIPT BEGINS-----
#!/bin/sh

echo sip:$1 at 11.11.11.11:5060
echo sip:$1 at 22.22.22.22:5060
------SCRIPT BEGINS-----

The problem is , OpenSIPs tries both endpoints simultaneously (sip:$
1 at 11.11.11.11:5060 and sip:$1 at 22.22.22.22:5060)

What i am trying to achieve is : first try sip:$1 at 11.11.11.11:5060 if it
doesnt succeed try sip:$1 at 22.22.22.22:5060 and so on...and finally bridge
the call with the successful route choice otherwise drop the call.

Any documentation / example in this direction would be a big help.

Cheers

Ashwin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20111120/8e93ac4b/attachment.htm>


More information about the Users mailing list