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@11.11.11.11:5060
echo sip:$1@22.22.22.22:5060
------SCRIPT BEGINS-----

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

What i am trying to achieve is : first try sip:$1@11.11.11.11:5060 if it
doesnt succeed try sip:$1@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
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to