Hi Steven,
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.you need to 
do the same in main route and set the NAT flag otherwise your condition "if ( 
isflagset(NAT) ) {rtpproxy_offer("of", "OPENSIPS IP");}" 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.

    On Tuesday, 9 October 2018, 10:55:02 PM GMT+5:30, Steven Platt 
<ste...@olli-ai.com> wrote:  
 
 Good morning, 
I have an installation of OpenSIPS 2.3.5, with RTPProxy running on a single 
server. RTP Proxy is running as normal, and logs show support for it enabled 
during initial connection leg. 
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.
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)
----------------------------
My flow: 
desktop client (zoiper) <--> corporate NAT <--> OPENSIPS <--> carrier NAT <--> 
android (zoiper)
Invite SDP Sent from Desktop Zoiper Client: 
Via: SIP/2.0/TCP [CORPORATE 
NAT]:59401;branch=z9hG4bK-524287-1---fecce2d50d9d5c20;rportMax-Forwards: 
70Contact: <sip:1000@[CORPORATE NAT]:59401;transport=TCP>To: 
<sip:1001@[OPENSIPS]:5060;transport=TCP>From: 
<sip:1000@[OPENSIPS]:5060;transport=TCP>;tag=b27a0843Call-ID: 
QMoyxf6JGTFYvxS5X8NsnA..CSeq: 2 INVITEAllow: INVITE, ACK, CANCEL, BYE, NOTIFY, 
REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBEContent-Type: 
application/sdpProxy-Authorization: Digest username="1000",realm="[OPENSIPS 
IP]",nonce="5bbcdde1000000172b9f0086711cd36194c50f208fa420de",uri="sip:1001@[OPENSIPS
 
IP]:5060;transport=TCP",response="a609cb9d82930d2d32668d8d51d64cb4",algorithm=MD5User-Agent:
 Z 5.2.19 rv2.8.99Allow-Events: presence, kpml, talkContent-Length: 161
v=0o=Z 0 0 IN IP4 [DESKTOP IP]s=Zc=IN IP4 [DESKTOP IP]t=0 0m=audio 8000 RTP/AVP 
0 101 8a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=sendrecv
The 200OK sent by Opensips to the calling device: 
Via: SIP/2.0/TCP [CORPORATE NAT] :59401;received=[CARRIER 
IP];branch=z9hG4bK-524287-1---fecce2d50d9d5c20;rport=59401Record-Route: 
<sip:[OPENSIPS IP];transport=tcp;lr;did=081.1ad6d9>Contact: 
<sip:1001@[CORPORATE NAT]:50758;transport=TCP>To: <sip:1001@[OPENSIPS 
IP]:5060;transport=TCP>;tag=07be6967From: <sip:1000@[OPENSIPS 
IP]:5060;transport=TCP>;tag=b27a0843Call-ID: QMoyxf6JGTFYvxS5X8NsnA..CSeq: 2 
INVITEAllow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, 
SUBSCRIBEContent-Type: application/sdpUser-Agent: Zoiper rv2.8.105Allow-Events: 
presence, kpml, talkContent-Length: 245
v=0o=Zoiper 0 1 IN IP4 [ANDROID IP]s=Zoiperc=IN IP4 [ANDROID IP]t=0 0m=audio 
42032 RTP/AVP 0 3 8 101a=rtpmap:0 PCMU/8000a=rtpmap:3 GSM/8000a=rtpmap:8 
PCMA/8000a=rtpmap:101 telephone-event/8000a=fmtp:101 0-16a=sendrecv
---------------------------------------------------
OpenSIPS Config

route[relay] {        if (is_method("INVITE")) {
                if ( isflagset(NAT) ) {                        
rtpproxy_offer("of", "OPENSIPS IP");                }
                t_on_branch("per_branch_ops");                
t_on_reply("handle_nat");                t_on_failure("missed_call");        }
        if (isflagset(NAT)) {                add_rr_param(";nat=yes");          
      }
        if (!t_relay()) {                send_reply("500","Internal Error");    
    };        exit;}

onreply_route[handle_nat] {
        if (nat_uac_test("1"))
                fix_nated_contact();        if ( isflagset(NAT) )               
 rtpproxy_answer("of", "OPENSIPS IP");        xlog("incoming reply\n");}
----------------------------------------------
I also do not see the (";nat=yes") being added in the SDP. Do I understand 
correct that the script is not catching this call and flagging it correct as 
NAT?
At this time, all signaling works as normal - only media is not being pinned to 
the opensips IP in the 200 OK response. 
Thanks in advance for any guidance on this one. 
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
  
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to