<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">Hello Iñaki, thanks for the quick answer, and yes you're completely right!<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Here is the rest of the opensip.cfg, I set  t_on_branch("1"); t_on_reply("1"); t_on_failure("1"); later<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p># main request routing logic<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>route{<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>        # Reject Packet if SIP TTL is too low<br>
        if (!mf_process_maxfwd_header("10")) {<br>
                sl_send_reply("483","Too Many Hops");<br>
                exit;<br>
        }<br>
<span style=" font-weight:600;">        # Test NATed contact</span><br>
<span style=" font-weight:600;">        route(2);</span><br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>        if (has_totag()) {      # Check To Header field uri contains tag parameter.<br>
                # sequential request withing a dialog should<br>
                # take the path determined by record-routing<br>
                if (loose_route()) {    # The function performs routing of SIP requests which contain a route set.<br>
                        if (is_method("BYE")) {<br>
                                setflag(1); # do accounting ...<br>
                                setflag(3); # ... even if the transaction fails<br>
                        } else if (is_method("INVITE")) {<br>
                                # even if in most of the cases is useless, do RR for<br>
                                # re-INVITEs alos, as some buggy clients do change route set<br>
                                # during the dialog.<br>
                                record_route();<br>
                        }<br>
                        # route it out to whatever destination was set by loose_route()<br>
                        # in $du (destination URI).<br>
                        route(1);<br>
                } else {<br>
                        /* uncomment the following lines if you want to enable presence */<br>
                        ##if (is_method("SUBSCRIBE") &amp;&amp; $rd == "your.server.ip.address") {<br>
                        ##      # in-dialog subscribe requests<br>
                        ##      route(9);<br>
                        ##      exit;<br>
                        ##}<br>
                        if ( is_method("ACK") ) {<br>
                                if ( t_check_trans() ) {        # true if the ACK is a local end-to-end<br>
                                                                # ACK corresponding to an previous INVITE transaction.<br>
                                        # non loose-route, but stateful ACK; must be an ACK after<br>
                                        # a 487 or e.g. 404 from upstream server<br>
                                        t_relay();<br>
                                        exit;<br>
                                } else {<br>
                                        # ACK without matching transaction -&gt;<br>
                                        # ignore and discard.\n");<br>
                                        exit;<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>                                }<br>
                        }<br>
                        sl_send_reply("404","Not here");<br>
                }<br>
                exit;<br>
        }<br>
        # CANCEL processing<br>
        if (is_method("CANCEL"))<br>
        {<br>
                if (t_check_trans())    # true if the cancelled INVITE transaction exists.<br>
                        t_relay();<br>
                exit;<br>
        }<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>        t_check_trans();<br>
        # record routing<br>
        #if (!is_method("REGISTER|MESSAGE"))<br>
        record_route();<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><span style=" font-weight:600;">        # Set Default Branch, Reply and Failure Route</span><br>
<span style=" font-weight:600;">        t_on_branch("1");</span><br>
<span style=" font-weight:600;">        t_on_reply("1");</span><br>
<span style=" font-weight:600;">        t_on_failure("1");</span><br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>        # account only INVITEs<br>
        if (is_method("INVITE")) {<br>
                setflag(1); # do accounting<br>
                setflag(4); # Active Dialog Module Start Statistics<br>
#               trace_dialog(); # Enable SIP Trace if race_mode is turned on<br>
        }<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>....<br>
....<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>}<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p><p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- <br>
-- --<br>
Marc LEURENT<br>
Ingénieur VoIP<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>DECKPOINT SA<br>
Une société du groupe VTX Telecom<br>
================================================================<br>
Rue Eugène-Marziano 15 - 1227 Les Acacias<br>
http://www.vtx.ch - marc.leurent@vtx-telecom.ch<br>
----------------------------------------------------------------<br>
VTX, votre partenaire telecom proche de vous !<br>
================================================================<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Le vendredi, 31 juillet 2009 10.28:56, Iñaki Baz Castillo a écrit :<br>
&gt; 2009/7/31 Marc Leurent &lt;lftsy@leurent.eu&gt;:<br>
&gt; &gt; Hello everybody, for those who are not in holidays under the sun...<br>
&gt; &gt; I have already checked, on no previous exchange on the mailing list seems<br>
&gt; &gt; to answer to this problem..<br>
&gt; &gt;<br>
&gt; &gt; My version of OpenSIPs is OpenSIPS (1.4.5-notls (x86_64/linux))<br>
&gt; &gt;<br>
&gt; &gt; I have a problem when a 200 OK of a re-INVITE. Indeed, I use a route(2)<br>
&gt; &gt; to handle NAT correction, I have put the route(2) at the beginning of<br>
&gt; &gt; main route, on onreply_route, on failure_route, and on branch_route. So,<br>
&gt; &gt; for each packets, it should go inside the route(2)...<br>
&gt;<br>
&gt; Hi Mark, I think this question should just go to user maillist :)<br>
&gt;<br>
&gt;<br>
&gt; In your config I don't see where the branch route is set for in-dialog<br>
&gt; requests ¿?<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p></body></html>