<br clear="all">Hi Bogdan,<br><br>Will the following script work properly with probing mode 2 with two asterisk gateways, we want to introduce it in our production environment.<br><br>route{<br><br>    if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>
        sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>        exit;<br>    }<br><br>    if (has_totag()) <br>    {<br>        if (loose_route()) <br>        {<br>            if (is_method(&quot;BYE&quot;)) <br>
            {<br>                setflag(1); <br>                setflag(3);<br>            } <br>            else if (is_method(&quot;INVITE&quot;)) <br>            {<br>                record_route();<br>            }<br>
            route(1);<br>        } <br>        else <br>        {<br>            if ( is_method(&quot;ACK&quot;) ) <br>            {<br>                if ( t_check_trans() ) <br>                {<br>                    exit;<br>
                } <br>                else <br>                {<br>                    # ACK without matching transaction -&gt;<br>                    # ignore and discard<br>                    exit;<br>                }<br>
            }<br>            sl_send_reply(&quot;404&quot;,&quot;Not here&quot;);<br>        }<br>        exit;<br>    }<br><br>    #initial requests<br><br>    # CANCEL processing<br>    if (is_method(&quot;CANCEL&quot;))<br>
    {<br>        if (t_check_trans())<br>            t_relay();<br>        exit;<br>    }<br><br>    t_check_trans();<br>                        <br>    if (loose_route()) <br>    {<br>        xlog(&quot;L_ERR&quot;,&quot;Attempt to route with preloaded Route&#39;s [$fu/$tu/$ru/$ci]&quot;);<br>
        if (!is_method(&quot;ACK&quot;))<br>            sl_send_reply(&quot;403&quot;,&quot;Preload Route denied&quot;);<br>        exit;<br>    }<br><br>    # record routing<br>    if (!is_method(&quot;REGISTER|MESSAGE&quot;))<br>
        record_route();<br><br>    # account only INVITEs<br>    if (is_method(&quot;INVITE&quot;)) <br>    {<br>        setflag(1); # do accounting<br>        if(!load_balance(&quot;1&quot;,&quot;pstn&quot;))<br>        {<br>
            sl_send_reply(&quot;500&quot;, &quot;Service full&quot;);<br>            exit;<br>        }<br>    }<br>    <br>    if (!uri==myself)<br>    {<br>        append_hf(&quot;P-hint: outbound\r\n&quot;); <br>        route(1);<br>
    }<br><br>    if (is_method(&quot;PUBLISH&quot;))<br>    {<br>        sl_send_reply(&quot;503&quot;, &quot;Service Unavailable&quot;);<br>        exit;<br>    }<br>    <br><br>    if (is_method(&quot;REGISTER&quot;))<br>
    {<br>        if (!save(&quot;location&quot;))<br>            sl_reply_error();<br><br>        exit;<br>    }<br><br>    if ($rU==NULL) {<br>        # request with no Username in RURI<br>        sl_send_reply(&quot;484&quot;,&quot;Address Incomplete&quot;);<br>
        exit;<br>    }<br>    route(1);<br>}<br><br><br>route[1] <br>{<br>    # for INVITEs enable some additional helper routes<br>    if (is_method(&quot;INVITE&quot;)) <br>    {<br>        t_on_branch(&quot;2&quot;);<br>
        t_on_reply(&quot;2&quot;);<br>        t_on_failure(&quot;1&quot;);<br>    }<br><br>    if (!t_relay()) <br>    {<br>        sl_reply_error();<br>    };<br>    exit;<br>}<br><br>branch_route[2] <br>{<br>    xlog(&quot;new branch at $ru\n&quot;);<br>
}<br><br><br>onreply_route[2] <br>{<br>    xlog(&quot;incoming reply\n&quot;);<br>}<br><br><br>failure_route[1] <br>{<br>    if (t_was_cancelled()) <br>    {<br>        exit;<br>    }<br><br>    # uncomment the following lines if you want to block client <br>
    # redirect based on 3xx replies.<br>    <br>    if (t_check_status(&quot;3[0-9][0-9]&quot;))<br>    {<br>        t_reply(&quot;404&quot;,&quot;Not found&quot;);<br>        exit;<br>    }<br><br>    # uncomment the following lines if you want to redirect the failed <br>
    # calls to a different new destination<br>    ##if (t_check_status(&quot;486|408&quot;)) {<br>    ##    sethostport(&quot;<a href="http://192.168.2.100:5060">192.168.2.100:5060</a>&quot;);<br>    ##    # do not set the missed call flag again<br>
    ##    t_relay();<br>    ##}<br>}<br><br>-- <br>Rajib Deka<br>Software Engineer<br><br>Mobile No: + 91 80157 09130<br>