<html><head></head><body><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div></div>
        <div>Hi Steven,</div><div><br></div><div>looking at your config it doesn't seems you are testing for nat in your main route. only on reply route your have nat_uac_test function called.</div><div>you need to do the same in main route and set the NAT flag otherwise your condition "<span>if ( isflagset(NAT) ) {</span><span>rtpproxy_offer("of", "OPENSIPS IP");}</span>" to use rtpproxy won't work. you can verfiy it by adding an xlog statement inside that condition. As per the given config it shouldn't print anything in log.<br></div><div><br></div>
        
        </div><div id="yahoo_quoted_9571003328" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Tuesday, 9 October 2018, 10:55:02 PM GMT+5:30, Steven Platt <steven@olli-ai.com> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv1312819569"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Good morning, <div><br></div><div>I have an installation of OpenSIPS 2.3.5, with RTPProxy running on a single server. </div><div>RTP Proxy is running as normal, and logs show support for it enabled during initial connection leg. </div><div><br></div><div>My error is that Opensips does not update the connection IP (c=) of the SDP to force media to be proxied with RTPProxy. Instead, it keep the endpoint IP, which is behind a NAT, because of this - I have no audio.</div><div><br></div><div>Is there something I miss in the configuration to enforce the update of the connection IP in the SDP? (so that media goes through opensips/rtpproxy)</div><div><br></div><div>----------------------------</div><div><br></div><div>My flow: </div><div><br></div><div>desktop client (zoiper) <--> corporate NAT <--> OPENSIPS <--> carrier NAT <--> android (zoiper)</div><div><br></div><div><b>Invite SDP Sent from Desktop Zoiper Client: </b></div><div><br></div><div><div>Via: SIP/2.0/TCP [CORPORATE NAT]:59401;branch=z9hG4bK-524287-1---fecce2d50d9d5c20;rport</div><div>Max-Forwards: 70</div><div>Contact: <sip:1000@[CORPORATE NAT]:59401;transport=TCP></div><div>To: <sip:1001@[OPENSIPS]:5060;transport=TCP></div><div>From: <sip:1000@[OPENSIPS]:5060;transport=TCP>;tag=b27a0843</div><div>Call-ID: QMoyxf6JGTFYvxS5X8NsnA..</div><div>CSeq: 2 INVITE</div><div>Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE</div><div>Content-Type: application/sdp</div><div>Proxy-Authorization: Digest username="1000",realm="[OPENSIPS IP]",nonce="5bbcdde1000000172b9f0086711cd36194c50f208fa420de",uri="sip:1001@[OPENSIPS IP]:5060;transport=TCP",response="a609cb9d82930d2d32668d8d51d64cb4",algorithm=MD5</div><div>User-Agent: Z 5.2.19 rv2.8.99</div><div>Allow-Events: presence, kpml, talk</div><div>Content-Length: 161</div><div><br></div><div>v=0</div><div>o=Z 0 0 IN IP4 [DESKTOP IP]</div><div>s=Z</div><div>c=IN IP4 [DESKTOP IP]</div><div>t=0 0</div><div>m=audio 8000 RTP/AVP 0 101 8</div><div>a=rtpmap:101 telephone-event/8000</div><div>a=fmtp:101 0-16</div><div>a=sendrecv</div></div><div><br></div><div><b>The 200OK sent by Opensips to the calling device: </b></div><div><br></div><div><div>Via: SIP/2.0/TCP [CORPORATE NAT] :59401;received=[CARRIER IP];branch=z9hG4bK-524287-1---fecce2d50d9d5c20;rport=59401</div><div>Record-Route: <sip:[OPENSIPS IP];transport=tcp;lr;did=081.1ad6d9></div><div>Contact: <sip:1001@[CORPORATE NAT]:50758;transport=TCP></div><div>To: <sip:1001@[OPENSIPS IP]:5060;transport=TCP>;tag=07be6967</div><div>From: <sip:1000@[OPENSIPS IP]:5060;transport=TCP>;tag=b27a0843</div><div>Call-ID: QMoyxf6JGTFYvxS5X8NsnA..</div><div>CSeq: 2 INVITE</div><div>Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE</div><div>Content-Type: application/sdp</div><div>User-Agent: Zoiper rv2.8.105</div><div>Allow-Events: presence, kpml, talk</div><div>Content-Length: 245</div><div><br></div><div>v=0</div><div>o=Zoiper 0 1 IN IP4 [ANDROID IP]</div><div>s=Zoiper</div><div>c=IN IP4 [ANDROID IP]</div><div>t=0 0</div><div>m=audio 42032 RTP/AVP 0 3 8 101</div><div>a=rtpmap:0 PCMU/8000</div><div>a=rtpmap:3 GSM/8000</div><div>a=rtpmap:8 PCMA/8000</div><div>a=rtpmap:101 telephone-event/8000</div><div>a=fmtp:101 0-16</div><div>a=sendrecv</div></div><div><br></div><div>---------------------------------------------------</div><div><br></div><div><b>OpenSIPS Config</b></div><div><br></div><div><br></div><div><div><b>route[relay]</b> {</div><div>        if (is_method("INVITE")) {</div><div><br></div><div>                if ( isflagset(NAT) ) {</div><div>                        rtpproxy_offer("of", "OPENSIPS IP");</div><div>                }</div><div><br></div><div>                t_on_branch("per_branch_ops");</div><div>                t_on_reply("handle_nat");</div><div>                t_on_failure("missed_call");</div><div>        }</div><div><br></div><div>        if (isflagset(NAT)) {</div><div>                add_rr_param(";nat=yes");</div><div>                }</div><div><br></div><div>        if (!t_relay()) {</div><div>                send_reply("500","Internal Error");</div><div>        };</div><div>        exit;</div><div>}</div></div><div><br></div><div><br></div><div><div><b>onreply_route[handle_nat]</b> {</div><div><br></div><div>        if (nat_uac_test("1"))<br></div><div>                fix_nated_contact();</div><div>        if ( isflagset(NAT) )</div><div>                rtpproxy_answer("of", "OPENSIPS IP");</div><div>        xlog("incoming reply\n");</div><div>}</div></div><div><br></div><div>----------------------------------------------</div><div><br></div><div>I also do not see the (";nat=yes") being added in the SDP. </div><div>Do I understand correct that the script is not catching this call and flagging it correct as NAT?</div><div><br></div><div>At this time, all signaling works as normal - only media is not being pinned to the opensips IP in the 200 OK response. </div><div><br></div><div>Thanks in advance for any guidance on this one. </div><div><br></div></div></div></div></div></div></div>_______________________________________________<br>Users mailing list<br><a ymailto="mailto:Users@lists.opensips.org" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br></div>
            </div>
        </div></div></body></html>