[OpenSIPS-Users] help: nathelper/rtpproxy/ice/ice-mismatch

Adrian Georgescu ag at ag-projects.com
Sun Oct 12 00:17:47 CEST 2014


Try MediaProxy, it handles ICE negotiation properly.

Adrian

On 11 Oct 2014, at 10:26, george wu <aihuawu2012 at 163.com> wrote:

> When I use nathelper/rtpproxy, ice does not work well with it.
> nathelper will rewrite the sdp media part which my ice client is not happy.
> Then it will reply a=ice-mismatch. finally it will use rtpproxy to relay the media.
> 
> the invite:
> m=audio 36580 RTP/AVP 124 120 111 110 0 8 101
> ....
> a=candidate:1 1 UDP 2130706431 192.168.1.3 7078 typ host
> a=candidate:1 2 UDP 2130706430 192.168.1.3 7079 typ host
> 
> Detail is below:
> 
> 
> 1) I have set up the nathelper/rtpproxy as below:
> ####  NAT modules
> loadmodule "nathelper.so"
> modparam("nathelper", "natping_interval", 10)
> modparam("nathelper", "ping_nated_only", 1)
> modparam("nathelper", "received_avp", "$avp(received_nh)")
> 
> loadmodule "rtpproxy.so"
> modparam("rtpproxy", "rtpproxy_sock", "udp:localhost:12221") # CUSTOMIZE ME
> 
> loadmodule "stun.so"
> modparam("stun", "primary_ip", "192.168.1.3")
> modparam("stun","alternate_ip","192.168.122.1")
> 
> 2) my client is linphone with ice set up.
> 3) when it make a call with ice, the sdp media get relayed:
> INVITE sip:test2 at 192.168.1.3:5080 SIP/2.0
> Record-Route: <sip:192.168.1.3;lr;nat=yes>
> Via: SIP/2.0/UDP 192.168.1.3:5060;branch=z9hG4bKa00d.25386e01.0
> Via: SIP/2.0/UDP 192.168.1.3:5070;received=192.168.1.3;branch=z9hG4bK.bo~6nN-3E;rport=5070
> From: <sip:test1 at 192.168.1.3>;tag=0tEh0Q~ly
> To: sip:test2 at 192.168.1.3
> CSeq: 20 INVITE
> Call-ID: XvJ7qOUjnp
> Max-Forwards: 69
> Supported: replaces, outbound
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
> Content-Type: application/sdp
> Content-Length: 547
> Contact: <sip:test1 at 192.168.1.3:5070>;+sip.instance="<urn:uuid:866598bd-4f5e-47f9-b7fa-8be6c6883a57>"
> User-Agent: linphone/3.7.0 (belle-sip/1.3.0)
> 
> v=0
> o=test1 1936 2136 IN IP4 192.168.1.3
> s=Talk
> c=IN IP4 192.168.1.3
> t=0 0
> a=ice-pwd:741608ce2b68ba853500cdf3
> a=ice-ufrag:0d47513b
> m=audio 36580 RTP/AVP 124 120 111 110 0 8 101
> a=rtpmap:124 opus/48000
> a=fmtp:124 useinbandfec=1; usedtx=1
> a=rtpmap:120 SILK/16000
> a=rtpmap:111 speex/16000
> a=fmtp:111 vbr=on
> a=rtpmap:110 speex/8000
> a=fmtp:110 vbr=on
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=candidate:1 1 UDP 2130706431 192.168.1.3 7078 typ host
> a=candidate:1 2 UDP 2130706430 192.168.1.3 7079 typ host
> a=nortpproxy:yes
> //////////////////
> SIP/2.0 200 Ok
> Via: SIP/2.0/UDP 192.168.1.3:5060;branch=z9hG4bKa00d.25386e01.0
> Via: SIP/2.0/UDP 192.168.1.3:5070;received=192.168.1.3;branch=z9hG4bK.bo~6nN-3E;rport=5070
> From: <sip:test1 at 192.168.1.3>;tag=0tEh0Q~ly
> To: <sip:test2 at 192.168.1.3>;tag=OsFF6CF
> Call-ID: XvJ7qOUjnp
> CSeq: 20 INVITE
> User-Agent: linphone/3.7.0 (belle-sip/1.3.0)
> Supported: replaces, outbound
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
> Contact: <sip:test2 at 192.168.1.3:5080>;+sip.instance="<urn:uuid:466598bd-4f5e-47f9-b7fa-8be6c6883a57>"
> Content-Type: application/sdp
> Content-Length: 428
> Record-route: <sip:192.168.1.3;lr;nat=yes>
> 
> v=0
> o=test2 2088 1279 IN IP4 192.168.1.3
> s=Talk
> c=IN IP4 192.168.1.3
> t=0 0
> a=ice-pwd:52c18fd43896c0d573decfcd
> a=ice-ufrag:5d79a96c
> m=audio 7088 RTP/AVP 124 120 111 110 0 8 101
> a=rtpmap:124 opus/48000
> a=fmtp:124 useinbandfec=1; usedtx=1
> a=rtpmap:120 SILK/16000
> a=rtpmap:111 speex/16000
> a=fmtp:111 vbr=on
> a=rtpmap:110 speex/8000
> a=fmtp:110 vbr=on
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=ice-mismatch
> 
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

--
Adrian



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20141011/ad934b9e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.opensips.org/pipermail/users/attachments/20141011/ad934b9e/attachment.pgp>


More information about the Users mailing list