Hi everyone, I'm new to kamailio and rtpproxy and the problem's been bothering me for days. Any help would highly appreciated. My network topology is as follows: kamailio5.0 and rtpproxy2.0 are running on the same server. The server is behind NAT, its private ip is 10.240.0.62, public ip is <PUBLICIP> the server has 5060 tcp&udp, 35000-65000 udp port enabled. There're 2 sip clients(test && test1) running in another LAN(175.100.202.xxx) . Situation: Both clients registered successfully and they can call each other. But neither of them has audio.(If i kill rtpproxy, audio is ok).
My kamailio cfg(only posted the part that i change), #!KAMAILIO #!define WITH_MYSQL #!define WITH_DEBUG #!define WITH_AUTH #!define WITH_USRLOCDB #!define WITH_ANTIFLOOD #!define WITH_NAT #!define WITH_PSTN
listen=udp:10.240.0.62:5060 advertise <PUBLICIP>:5060 modparam("rtpproxy", "rtpproxy_sock", "udp:10.240.0.62:64000") rtpproxy cmd: rtpproxy -A <PUBLICIP> -F -l 10.240.0.62 -m 35000 -M 65000 -s udp:*:64000 -d INFO
I used ngrep -d any -qt -W byline port 5060 to capture the sip msg, they are as follows: U 2017/05/18 05:56:29.320152 175.100.202.33:10870 -> 10.240.0.62:5060 INVITE sip:test1@<PUBLICIP> SIP/2.0. Via: SIP/2.0/UDP 175.100.202.33:62434;rport;branch=z9hG4bK-524287-1---9e44840a531df765. Max-Forwards: 70. Contact: sip:test@175.100.202.33:10870;rinstance=6238e8023060ce02. To: <sip:test1@<PUBLICIP>>. From: <sip:test@<PUBLICIP>>;tag=106c953a. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. CSeq: 1 INVITE. Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE. Content-Type: application/sdp. Supported: replaces. User-Agent: X-Lite release 4.9.8 stamp 84253. Content-Length: 331. . v=0. o=- 1500767650 1 IN IP4 175.100.202.33. s=X-Lite release 4.9.8 stamp 84253. c=IN IP4 175.100.202.33. t=0 0. m=audio 63960 RTP/AVP 9 8 120 0 84 101. a=rtpmap:120 opus/48000/2. a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000. a=rtpmap:84 speex/16000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15. a=sendrecv.
U 2017/05/18 05:56:29.321103 10.240.0.62:5060 -> 175.100.202.33:10870 SIP/2.0 407 Proxy Authentication Required. Via: SIP/2.0/UDP 175.100.202.33:62434;rport=10870;branch=z9hG4bK-524287-1---9e44840a531df765;received=175.100.202.33. To: <sip:test1@<PUBLICIP>>;tag=24b9bbecdb24b798805f15f8519a2604.ea26. From: <sip:test@<PUBLICIP>>;tag=106c953a. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. CSeq: 1 INVITE. Proxy-Authenticate: Digest realm="<PUBLICIP>", nonce="WR04uVkdN40MqPSv+qEh76S0Jk2d2uq8". Server: kamailio (5.0.1 (x86_64/linux)). Content-Length: 0. .
U 2017/05/18 05:56:29.384015 175.100.202.33:10870 -> 10.240.0.62:5060 ACK sip:test1@<PUBLICIP> SIP/2.0. Via: SIP/2.0/UDP 175.100.202.33:62434;rport;branch=z9hG4bK-524287-1---9e44840a531df765. Max-Forwards: 70. To: <sip:test1@<PUBLICIP>>;tag=24b9bbecdb24b798805f15f8519a2604.ea26. From: <sip:test@<PUBLICIP>>;tag=106c953a. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. CSeq: 1 ACK. Content-Length: 0. .
U 2017/05/18 05:56:29.388008 175.100.202.33:10870 -> 10.240.0.62:5060 INVITE sip:test1@<PUBLICIP> SIP/2.0. Via: SIP/2.0/UDP 175.100.202.33:62434;rport;branch=z9hG4bK-524287-1---7a361a514cf88b6b. Max-Forwards: 70. Contact: sip:test@175.100.202.33:10870;rinstance=6238e8023060ce02. To: <sip:test1@<PUBLICIP>>. From: <sip:test@<PUBLICIP>>;tag=106c953a. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. CSeq: 2 INVITE. Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE. Content-Type: application/sdp. Proxy-Authorization: Digest username="test",realm="<PUBLICIP>",nonce="WR04uVkdN40MqPSv+qEh76S0Jk2d2uq8",uri="sip:test1@<PUBLICIP>",response="e7c42929b9a62de980651327b3a6999c",algorithm=MD5. Supported: replaces. User-Agent: X-Lite release 4.9.8 stamp 84253. Content-Length: 331. . v=0. o=- 1500767650 1 IN IP4 175.100.202.33. s=X-Lite release 4.9.8 stamp 84253. c=IN IP4 175.100.202.33. t=0 0. m=audio 63960 RTP/AVP 9 8 120 0 84 101. a=rtpmap:120 opus/48000/2. a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000. a=rtpmap:84 speex/16000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15. a=sendrecv.
U 2017/05/18 05:56:29.389271 10.240.0.62:5060 -> 175.100.202.33:10870 SIP/2.0 100 trying -- your call is important to us. Via: SIP/2.0/UDP 175.100.202.33:62434;rport=10870;branch=z9hG4bK-524287-1---7a361a514cf88b6b;received=175.100.202.33. To: <sip:test1@<PUBLICIP>>. From: <sip:test@<PUBLICIP>>;tag=106c953a. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. CSeq: 2 INVITE. Server: kamailio (5.0.1 (x86_64/linux)). Content-Length: 0. .
U 2017/05/18 05:56:29.389935 10.240.0.62:5060 -> 175.100.202.254:53006 INVITE sip:test1@175.100.202.254:53006;ob SIP/2.0. Record-Route: <sip:<PUBLICIP>;lr;nat=yes>. Via: SIP/2.0/UDP <PUBLICIP>:5060;branch=z9hG4bKc9f1.223c15db97157715ffa93dfeb61a6d8e.0. Via: SIP/2.0/UDP 175.100.202.33:62434;received=175.100.202.33;rport=10870;branch=z9hG4bK-524287-1---7a361a514cf88b6b. Max-Forwards: 69. Contact: sip:test@175.100.202.33:10870;rinstance=6238e8023060ce02;alias=175.100.202.33~10870~1. To: <sip:test1@<PUBLICIP>>. From: <sip:test@<PUBLICIP>>;tag=106c953a. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. CSeq: 2 INVITE. Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, OPTIONS, MESSAGE. Content-Type: application/sdp. Supported: replaces. User-Agent: X-Lite release 4.9.8 stamp 84253. Content-Length: 349. . v=0. o=- 1500767650 1 IN IP4 <PUBLICIP>. s=X-Lite release 4.9.8 stamp 84253. c=IN IP4 <PUBLICIP>. t=0 0. m=audio 46862 RTP/AVP 9 8 120 0 84 101. a=rtpmap:120 opus/48000/2. a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000. a=rtpmap:84 speex/16000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15. a=sendrecv. a=nortpproxy:yes.
U 2017/05/18 05:56:29.782323 175.100.202.254:53006 -> 10.240.0.62:5060 SIP/2.0 100 Trying. Via: SIP/2.0/UDP <PUBLICIP>:5060;received=<PUBLICIP>;branch=z9hG4bKc9f1.223c15db97157715ffa93dfeb61a6d8e.0. Via: SIP/2.0/UDP 175.100.202.33:62434;rport=10870;received=175.100.202.33;branch=z9hG4bK-524287-1---7a361a514cf88b6b. Record-Route: <sip:<PUBLICIP>;lr;nat=yes>. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. From: <sip:test@<PUBLICIP>>;tag=106c953a. To: <sip:test1@<PUBLICIP>>. CSeq: 2 INVITE. Content-Length: 0. .
U 2017/05/18 05:56:29.846192 175.100.202.254:53006 -> 10.240.0.62:5060 SIP/2.0 180 Ringing. Via: SIP/2.0/UDP <PUBLICIP>:5060;received=<PUBLICIP>;branch=z9hG4bKc9f1.223c15db97157715ffa93dfeb61a6d8e.0. Via: SIP/2.0/UDP 175.100.202.33:62434;rport=10870;received=175.100.202.33;branch=z9hG4bK-524287-1---7a361a514cf88b6b. Record-Route: <sip:<PUBLICIP>;lr;nat=yes>. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. From: <sip:test@<PUBLICIP>>;tag=106c953a. To: <sip:test1@<PUBLICIP>>;tag=iGrC0-.CMQN.LvSA2guPmwBlvTWEsUOu. CSeq: 2 INVITE. Contact: sip:test1@175.100.202.254:53006;ob. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Content-Length: 0. .
U 2017/05/18 05:56:29.846709 10.240.0.62:5060 -> 175.100.202.33:10870 SIP/2.0 180 Ringing. Via: SIP/2.0/UDP 175.100.202.33:62434;rport=10870;received=175.100.202.33;branch=z9hG4bK-524287-1---7a361a514cf88b6b. Record-Route: <sip:<PUBLICIP>;lr;nat=yes>. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. From: <sip:test@<PUBLICIP>>;tag=106c953a. To: <sip:test1@<PUBLICIP>>;tag=iGrC0-.CMQN.LvSA2guPmwBlvTWEsUOu. CSeq: 2 INVITE. Contact: sip:test1@175.100.202.254:53006;ob;alias=175.100.202.254~53006~1. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Content-Length: 0. .
U 2017/05/18 05:56:32.768386 175.100.202.254:53006 -> 10.240.0.62:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP <PUBLICIP>:5060;received=<PUBLICIP>;branch=z9hG4bKc9f1.223c15db97157715ffa93dfeb61a6d8e.0. Via: SIP/2.0/UDP 175.100.202.33:62434;rport=10870;received=175.100.202.33;branch=z9hG4bK-524287-1---7a361a514cf88b6b. Record-Route: <sip:<PUBLICIP>;lr;nat=yes>. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. From: <sip:test@<PUBLICIP>>;tag=106c953a. To: <sip:test1@<PUBLICIP>>;tag=iGrC0-.CMQN.LvSA2guPmwBlvTWEsUOu. CSeq: 2 INVITE. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Contact: sip:test1@175.100.202.254:53006;ob. Supported: replaces, 100rel, timer, norefersub. Content-Type: application/sdp. Content-Length: 233. . v=0. o=- 3704075788 3704075789 IN IP4 10.60.208.171. s=pjmedia. c=IN IP4 10.60.208.171. t=0 0. m=audio 4008 RTP/AVP 0 101. c=IN IP4 10.60.208.171. a=sendrecv. a=rtpmap:0 PCMU/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16.
U 2017/05/18 05:56:32.769284 10.240.0.62:5060 -> 175.100.202.33:10870 SIP/2.0 200 OK. Via: SIP/2.0/UDP 175.100.202.33:62434;rport=10870;received=175.100.202.33;branch=z9hG4bK-524287-1---7a361a514cf88b6b. Record-Route: <sip:<PUBLICIP>;lr;nat=yes>. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. From: <sip:test@<PUBLICIP>>;tag=106c953a. To: <sip:test1@<PUBLICIP>>;tag=iGrC0-.CMQN.LvSA2guPmwBlvTWEsUOu. CSeq: 2 INVITE. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Contact: sip:test1@175.100.202.254:53006;ob;alias=175.100.202.254~53006~1. Supported: replaces, 100rel, timer, norefersub. Content-Type: application/sdp. Content-Length: 255. . v=0. o=- 3704075788 3704075789 IN IP4 <PUBLICIP>. s=pjmedia. c=IN IP4 <PUBLICIP>. t=0 0. m=audio 42584 RTP/AVP 0 101. c=IN IP4 <PUBLICIP>. a=sendrecv. a=rtpmap:0 PCMU/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=nortpproxy:yes.
U 2017/05/18 05:56:32.836731 175.100.202.33:10870 -> 10.240.0.62:5060 ACK sip:test1@175.100.202.254:53006;ob;alias=175.100.202.254~53006~1 SIP/2.0. Via: SIP/2.0/UDP 175.100.202.33:62434;rport;branch=z9hG4bK-524287-1---ee5d0f26a850b671. Max-Forwards: 70. Route: <sip:<PUBLICIP>;lr;nat=yes>. Contact: sip:test@175.100.202.33:10870;rinstance=6238e8023060ce02. To: <sip:test1@<PUBLICIP>>;tag=iGrC0-.CMQN.LvSA2guPmwBlvTWEsUOu. From: <sip:test@<PUBLICIP>>;tag=106c953a. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. CSeq: 2 ACK. User-Agent: X-Lite release 4.9.8 stamp 84253. Content-Length: 0. .
U 2017/05/18 05:56:32.837266 10.240.0.62:5060 -> 175.100.202.254:53006 ACK sip:test1@175.100.202.254:53006;ob SIP/2.0. Via: SIP/2.0/UDP <PUBLICIP>:5060;branch=z9hG4bKc9f1.c283a6093e5f4143adec82663a0ff1d1.0. Via: SIP/2.0/UDP 175.100.202.33:62434;received=175.100.202.33;rport=10870;branch=z9hG4bK-524287-1---ee5d0f26a850b671. Max-Forwards: 69. Contact: sip:test@175.100.202.33:10870;rinstance=6238e8023060ce02;alias=175.100.202.33~10870~1. To: <sip:test1@<PUBLICIP>>;tag=iGrC0-.CMQN.LvSA2guPmwBlvTWEsUOu. From: <sip:test@<PUBLICIP>>;tag=106c953a. Call-ID: 84253NGRlOTIzM2M0NTMyNDY3MWRkNzBmODlmNDIzYWUxOTQ. CSeq: 2 ACK. User-Agent: X-Lite release 4.9.8 stamp 84253. Content-Length: 0. .
U 2017/05/18 05:56:33.025120 10.240.0.62:5060 -> 175.100.202.254:53006 ....
U 2017/05/18 05:56:38.025707 10.240.0.62:5060 -> 175.100.202.33:1490 ....
U 2017/05/18 05:56:38.025731 10.240.0.62:5060 -> 175.100.202.33:10870 ....
--
cheers, Jesse