[OpenSIPS-Users] OpenSIPS Not Rewriting SDP Connection IP (c=)

Steven Platt steven at olli-ai.com
Tue Oct 9 13:24:11 EDT 2018


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;rport
Max-Forwards: 70
Contact: <sip:1000@[CORPORATE NAT]:59401;transport=TCP>
To: <sip:1001@[OPENSIPS]:5060;transport=TCP>
From: <sip:1000@[OPENSIPS]:5060;transport=TCP>;tag=b27a0843
Call-ID: QMoyxf6JGTFYvxS5X8NsnA..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
SUBSCRIBE
Content-Type: application/sdp
Proxy-Authorization: Digest username="1000",realm="[OPENSIPS
IP]",nonce="5bbcdde1000000172b9f0086711cd36194c50f208fa420de",uri="sip:1001@[OPENSIPS
IP]:5060;transport=TCP",response="a609cb9d82930d2d32668d8d51d64cb4",algorithm=MD5
User-Agent: Z 5.2.19 rv2.8.99
Allow-Events: presence, kpml, talk
Content-Length: 161

v=0
o=Z 0 0 IN IP4 [DESKTOP IP]
s=Z
c=IN IP4 [DESKTOP IP]
t=0 0
m=audio 8000 RTP/AVP 0 101 8
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=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=59401
Record-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=07be6967
From: <sip:1000@[OPENSIPS IP]:5060;transport=TCP>;tag=b27a0843
Call-ID: QMoyxf6JGTFYvxS5X8NsnA..
CSeq: 2 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO,
SUBSCRIBE
Content-Type: application/sdp
User-Agent: Zoiper rv2.8.105
Allow-Events: presence, kpml, talk
Content-Length: 245

v=0
o=Zoiper 0 1 IN IP4 [ANDROID IP]
s=Zoiper
c=IN IP4 [ANDROID IP]
t=0 0
m=audio 42032 RTP/AVP 0 3 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20181009/bac68bce/attachment.html>


More information about the Users mailing list