<html>
<head><title></title></head>
<body><div class="iw_mail" dir="ltr">
<p><font face="Arial, Helvetica">We have a situation where a fax comes in, all of the negotiation looks good (ports are translated like they are supposed to be), and the interface with RTP Proxy looks correct (at least to me).  But what happens is that after the Re-INVITE for T38, the RTP Proxy continues to sent the RTP to the customer's old port.  In the example below, RTP Proxy sends the RTP to the customer on port 7186 AFTER the Re-INVITE with the new port.</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">SIP trace is located at <a href="https://www.4shared.com/file/wIVrkOtnei/SIP.html">https://www.4shared.com/file/wIVrkOtnei/SIP.html</a></font></p>
<p><br></p>
<p><font face="Arial, Helvetica">From the SIP responses, it appears that the code is performing correctly.  Not certain what to try next.  </font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">Also, the RTP Proxy server was rebooted.</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">Any suggestions?</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">Thanks in advance,</font></p>
<p><span style="font-family: Arial, Helvetica;">Pat</span></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">Configuration:</font></p>
<p><font face="Arial, Helvetica">    OpenSIPS 2.2.3 on Ubuntu 16.04</font></p>
<p><font face="Arial, Helvetica">   </font></p>
<p><font face="Arial, Helvetica">    RTP Proxy 2.2.alpha.20160822 on Ubuntu 16.04</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">***************************************************</font></p>
<p><font face="Arial, Helvetica">*** OpenSIPS re-Invite code.</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<div><span style="background-color: rgb(255, 255, 255); font-size: 11.3pt;"><font face="Arial, Helvetica">if (has_totag()) {</font></span></div>
<pre style="font-size: 11.3pt; white-space: pre-wrap; word-wrap: break-word; background-color: rgb(255, 255, 255);"><font face="Arial, Helvetica">    if (is_method("BYE")) {<br>        if ($avp(call_end_seconds) == NULL) {<br>            $avp(bye_src_ip) := $si;<br>            $avp(bye_time) := $Ts;<br>            get_timestamp($avp(call_end_seconds),$avp(call_end_useconds));<br><br>            $json(end_recording_details) := "{}";<br>            $json(end_recording_details/endsec) = $avp(call_end_seconds);<br>            $json(end_recording_details/endusec) = $avp(call_end_useconds);<br><br>            xlog("L_INFO", "$dlg_val(rU) SCRIPT:RTPPROXY:DEBUG: End call recording callid=$ci ; ft= $ft data = $json(end_recording_details) \n");<br><br><br>            #async(avp_db_query("UPDATE recordings SET end_recording_details = '$json(end_recording_details)' WHERE call_id = '$ci'", ""), resume_totag);<br>            avp_db_query("UPDATE recordings SET end_recording_details = '$json(end_recording_details)' WHERE call_id = '$ci'", "");<br><br>        } else {<br>            xlog("L_INFO", "$dlg_val(rU) SCRIPT:BILLING:DEBUG: Extra BYE received.\n");<br>        }<br>    }<br><br>    if (loose_route() || match_dialog()) {<br>        if ( $DLG_status==NULL ) {<br>            if (is_method("ACK") && t_check_trans() ) {<br>                t_relay();<br>                exit;<br>            }<br>            xlog("L_WARN", "$rU SCRIPT:TRAFFIC:WARNING: - $rm is not in-dialog ( callid=$ci ; ruri=$ru ; route=$(hdr(Route)[*]) )\n");<br>            exit;<br>        } else {<br>            if (is_method("INVITE")) {<br>                record_route();<br>                if (stream_exists("image") && $dlg_val(t38) == "0") {<br>                    xlog("L_WARN", "$rU SCRIPT:FAX:DEBUG: Received RE-INVITE containing FAX, but carrier doesn't support it - rejecting $ci \n");<br>                    send_reply("488","Not Acceptable");<br>                    exit;<br>                }<br><br>                xlog("L_INFO", "$dlg_val(rU) SCRIPT:RTPPROXY:DEBUG: - $dlg_val(proxy_media) - $dlg_val(rtpproxy_group) - $dlg_val(customer_record)\n");<br>                # Setup proxy media<br>                if ($dlg_val(proxy_media) != NULL && $dlg_val(proxy_media) == "1") {<br>                    if (nat_uac_test("8")) {<br>                        rtpproxy_offer("co",,"$dlg_val(rtpproxy_group)", "$avp(rtpprpoxy_server)");<br>                    } else {<br>                        rtpproxy_offer("cor",,"$dlg_val(rtpproxy_group)", "$avp(rtpprpoxy_server)");<br>                    }<br><br>                    $avp(rtpprpoxy_server) := $(avp(rtpprpoxy_server){s.select,1,:});<br>                    if ($dlg_val(customer_record) == "1") {<br>                        rtpproxy_start_recording("$dlg_val(rtpproxy_group)");<br>                    }<br><br>                    xlog("L_INFO", "$dlg_val(rU) PHB - D - media = $(rb{sdp.line,c}) rtp = $avp(rtpprpoxy_server) \n");<br>                }<br><br>                t_on_reply("media");<br>            }<br><br>            t_relay();<br>            exit;<br>        }<br>    } else {<br>        if ( is_method("ACK") ) {<br>            if ( t_check_trans() ) {<br>                t_relay();<br>                exit;<br>            } else<br>                exit;<br>        }<br>        sl_send_reply("404","Not here");<br>        exit;<br>    }<br></font></pre>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">***************************************************</font></p>
<p><font face="Arial, Helvetica">*** RTP Ports in the call flow</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">              Carrier                               OpenSIPS                              Customer</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">Audio      61616 <<<<<<<<<<<<<<<<< 18986 <<<<<<<<<<</font></p>
<p><font face="Arial, Helvetica"> </font></p>
<p><font face="Arial, Helvetica">                                  >>>>>>>>>>>>>> 16930 >>>>>>>>>>>>>> 7186    (intial INVITE / 200 OK)</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">                    </font></p>
<p><font face="Arial, Helvetica">                    </font></p>
<p><font face="Arial, Helvetica">Image                       >>>>>>>>>>>>>> 16930 >>>>>>>>>>>>>> 7192    (Re-INVITE / 200 OK - T38)</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">                  61616 <<<<<<<<<<<<<<<<< 18986 <<<<<<<<<<</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">***************************************************</font></p>
<p><font face="Arial, Helvetica">*** RTP Proxy Command TRACE</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">#</font></p>
<p><font face="Arial, Helvetica">U 216.147.191.162:41657 -> 216.147.191.232:9992</font></p>
<p><font face="Arial, Helvetica">1422_78032 Uc0,18,101 1917630487_62491918@208.93.41.184 208.93.41.140 61616 gK0c00bce5;1</font></p>
<p><font face="Arial, Helvetica">#</font></p>
<p><font face="Arial, Helvetica">U 216.147.191.232:9992 -> 216.147.191.162:41657</font></p>
<p><font face="Arial, Helvetica">1422_78032 18986 216.147.191.232</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">#</font></p>
<p><font face="Arial, Helvetica">U 216.147.191.162:41657 -> 216.147.191.232:9992</font></p>
<p><font face="Arial, Helvetica">1422_78033 Lc0,101 1917630487_62491918@208.93.41.184 216.147.191.171 7186 gK0c00bce5;1 5a142640;1</font></p>
<p><font face="Arial, Helvetica">#</font></p>
<p><font face="Arial, Helvetica">U 216.147.191.232:9992 -> 216.147.191.162:41657</font></p>
<p><font face="Arial, Helvetica">1422_78033 16930 216.147.191.232</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">#</font></p>
<p><font face="Arial, Helvetica">U 216.147.191.162:41657 -> 216.147.191.232:9992</font></p>
<p><font face="Arial, Helvetica">1422_78034 U 1917630487_62491918@208.93.41.184 216.147.191.171 7192 5a142640;1 gK0c00bce5;1</font></p>
<p><font face="Arial, Helvetica">#</font></p>
<p><font face="Arial, Helvetica">U 216.147.191.232:9992 -> 216.147.191.162:41657</font></p>
<p><font face="Arial, Helvetica">1422_78034 16930 216.147.191.232</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica">#</font></p>
<p><font face="Arial, Helvetica">U 216.147.191.162:41657 -> 216.147.191.232:9992</font></p>
<p><font face="Arial, Helvetica">1422_78035 L 1917630487_62491918@208.93.41.184 208.93.41.140 61616 5a142640;1 gK0c00bce5;1</font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><font face="Arial, Helvetica"><br></font></p>
<p><br></p>
</div></body>
</html>