[Freeswitch-dev] STUN Binding Request failed causing no audio when join to conf

Sasa Ivancev sasa.ivancev at gmail.com
Thu May 15 02:39:12 MSD 2014


Hi,

 

I am using SIPml5 client and Kamailio 4.1.2 server integrated with FS 1.5. Both apps are installed on same virtual machine, Ubuntu 12.04,  behind NAT box (IP 192.168.1.103). Kamailio and Freeswitch servers are integrated  according to this tutorial:   http://kb.asipto.com/freeswitch:kamailio-3.3.x-freeswitch-1.2.x-sbc  

 

In case SIPml5 client has public IP, it can join to conference and get two-way audio.

 

In case SIPml5 client is behind NAT box, it can join to conference, but there is NO AUDIO ! 

 

What I noticed is that in second case STUN requests failed. I am getting  ICMP messages instead of "Binding Response..." 

 

# tshark | egrep "STUN|ICMP|DTLS"

Capturing on eth1

  0.000000 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: zGCPKXKUmgWac67N:TICkBPVhZYHwJ0oz

  0.629060 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: ahBT5zBSFNfFB7Xx:i2dyJzygCPRgMlpQ

  0.662777 46.240.237.61 -> 192.168.1.103 ICMP 238 Destination unreachable (Port unreachable)                   

  1.000463 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: zGCPKXKUmgWac67N:TICkBPVhZYHwJ0oz

  1.649064 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: ahBT5zBSFNfFB7Xx:i2dyJzygCPRgMlpQ

  1.684495 46.240.237.61 -> 192.168.1.103 ICMP 238 Destination unreachable (Port unreachable)

  2.020352 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: zGCPKXKUmgWac67N:TICkBPVhZYHwJ0oz

  2.649471 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: ahBT5zBSFNfFB7Xx:i2dyJzygCPRgMlpQ

  2.674532 46.240.237.61 -> 192.168.1.103 ICMP 238 Destination unreachable (Port unreachable)

 

In FreeSWITCH logs, next  5 lines are missing when there is no audio:

 

73d19284-d87c-11e3-9259-339370100fc8 2014-05-10 21:51:19.421954 [INFO] switch_rtp.c:2701 Changing audio DTLS state from HANDSHAKE to SETUP

73d19284-d87c-11e3-9259-339370100fc8 2014-05-10 21:51:19.421954 [INFO] switch_rtp.c:2609 audio Fingerprint Verified.

73d19284-d87c-11e3-9259-339370100fc8 2014-05-10 21:51:19.421954 [INFO] switch_rtp.c:3151 Activating Audio Secure RTP SEND

73d19284-d87c-11e3-9259-339370100fc8 2014-05-10 21:51:19.421954 [INFO] switch_rtp.c:3129 Activating Audio Secure RTP RECV

73d19284-d87c-11e3-9259-339370100fc8 2014-05-10 21:51:19.421954 [INFO] switch_rtp.c:2649 Changing audio DTLS state from SETUP to READY

 

Also, I see 'ice not ready' alert messages for debug_level 10.

 

 

When SIPml5 client has public IP, everything works fine: In network traces I see that STUN negotiation is OK , DTLS is OK and audio is working. 

 

 

# tshark | egrep "STUN|ICMP|DTLS"

 

29.637026 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: Zk/oQhC+x1sqfxan:12mOvSqfqyVZTtFl

29.674027 46.240.237.61 -> 192.168.1.103 STUN 106 Binding Success Response XOR-MAPPED-ADDRESS: 95.180.82.218:41721

29.685923 46.240.237.61 -> 192.168.1.103 STUN 158 Binding Request user: 12mOvSqfqyVZTtFl:Zk/oQhC+x1sqfxan

29.697067 192.168.1.103 -> 46.240.237.61 STUN 106 Binding Success Response XOR-MAPPED-ADDRESS: 46.240.237.61:44259

29.697461 192.168.1.103 -> 46.240.237.61 DTLSv1.0 243 Client Hello

29.730743 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: zGCPKXKUmgWac67N:TICkBPVhZYHwJ0oz

30.154973 46.240.237.61 -> 192.168.1.103 DTLSv1.0 877 Server Hello, Certificate, Server Key Exchange, Certificate Request, Server Hello Done

30.158308 192.168.1.103 -> 46.240.237.61 DTLSv1.0 856 Certificate, Client Key Exchange, Certificate Verify, Change Cipher Spec, Encrypted Handshake Message

30.231732 46.240.237.61 -> 192.168.1.103 DTLSv1.0 133 Change Cipher Spec, Encrypted Handshake Message

30.608204 46.240.237.61 -> 192.168.1.103 STUN 158 Binding Request user: 12mOvSqfqyVZTtFl:Zk/oQhC+x1sqfxan

30.616939 192.168.1.103 -> 46.240.237.61 STUN 106 Binding Success Response XOR-MAPPED-ADDRESS: 46.240.237.61:44259

30.656908 192.168.1.103 -> 46.240.237.61 STUN 210 Binding Request user: Zk/oQhC+x1sqfxan:12mOvSqfqyVZTtFl

30.682214 46.240.237.61 -> 192.168.1.103 STUN 106 Binding Success Response XOR-MAPPED-ADDRESS: 95.180.82.218:41721

 

 

 

Any suggestion how to make it working for clients behind NAT  ?

 

 

Thanks,

Sasa

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20140515/1c739b97/attachment-0001.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-dev mailing list