##############################<div class="im">##########################################<br>
# Failure route &#39;pstn-failover&#39;<br>
########################################################################<br>
failure_route[1]<br>
{    <br>
    <br>
    xlog(&quot;L_INFO&quot;, &quot;Failure route for PSTN entered - M=$rm RURI=$ru
F=$fu T=$tu IP=$si ID=$ci\n&quot;);<br>
    route(16);<br>
<br>
    if(!next_gw())<br>
    {<br>
        <br>
        xlog(&quot;L_ERR&quot;, &quot;Failed to select next PSTN gateway - M=$rm
RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n&quot;);<br>
        route(5);<br>
        exit;<br>
    }<br>
    t_on_failure(&quot;1&quot;);<br>    t_on_branch(&quot;1&quot;);<br>
    route(7);<br>
}<br><br><br>branch_route[1]{<br>        switch($rd) <br>
        {<br>
                    case &quot;10.10.10.2&quot;:<br>
                            force_send_socket(udp:<a href="http://10.10.10.1:5060/" target="_blank">10.10.10.1:5060</a>);<br>
                    case &quot;10.10.10.4&quot;:<br>
                            force_send_socket(udp:<a href="http://10.10.10.3:5060/" target="_blank">10.10.10.3:5060</a>);<br>
                    case &quot;10.10.10.6&quot;:<br>
                            force_send_socket(udp:<a href="http://10.10.10.5:5060/" target="_blank">10.10.10.5:5060</a>);<br>
                    case &quot;10.10.10.8&quot;:<br>
                            force_send_socket(udp:<a href="http://10.10.10.7:5060/" target="_blank">10.10.10.7:5060</a>);<br>
                    break;<br>
        }<br><br>}<br></div><br><br><div class="gmail_quote">On Wed, Jun 30, 2010 at 4:14 AM, Iņaki Baz Castillo <span dir="ltr">&lt;<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2010/6/30 Ernest Mavrel &lt;<a href="mailto:ernest.mavrel@novatel.si">ernest.mavrel@novatel.si</a>&gt;<br>
<div class="im">&gt;<br>
&gt; How can I move force_send_socket() call into branch_route?<br>
<br>
</div>Use t_on_branch(&quot;N&quot;) before t_relay(); so after that each branch would<br>
run into branch_route[N] in which you should invoke<br>
force_send_socket().<br>
<font color="#888888"><br>
<br>
--<br>
Iņaki Baz Castillo<br>
&lt;<a href="mailto:ibc@aliax.net">ibc@aliax.net</a>&gt;<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div></div></blockquote></div><br>