HI All<br><br>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.<br><br>
Currently i use the following routing script<br>------SCRIPT BEGINS-----<br>if(is_method("INVITE") && <br> !(src_ip == "192.168.172.133" && src_port ==5060)) <br> {<br> exec_dset("/usr/local/getroutes $tU");<br>
b2b_init_request("top hiding"); <br> exit;<br> };<br>------SCRIPT ENDS------<br clear="all"><br><br>the /usr/local/getroutes script listing follows<br><br>------SCRIPT BEGINS-----<br>#!/bin/sh<br><br>
echo sip:$<a href="http://1@11.11.11.11:5060">1@11.11.11.11:5060</a><br>echo sip:$<a href="http://1@22.22.22.22:5060">1@22.22.22.22:5060</a><br>------SCRIPT BEGINS-----<br><br>The problem is , OpenSIPs tries both endpoints simultaneously (sip:$<a href="http://1@11.11.11.11:5060">1@11.11.11.11:5060</a> and sip:$<a href="http://1@22.22.22.22:5060">1@22.22.22.22:5060</a>)<br>
<br>What i am trying to achieve is : first try sip:$<a href="http://1@11.11.11.11:5060">1@11.11.11.11:5060</a> if it doesnt succeed try sip:$<a href="http://1@22.22.22.22:5060">1@22.22.22.22:5060</a> and so on...and finally bridge the call with the successful route choice otherwise drop the call.<br>
<br>Any documentation / example in this direction would be a big help.<br><br>Cheers<br><br>Ashwin Rath<br><br>