[Freeswitch-users] FS behind NAT

Jun Sun jsun at junsun.net
Mon Mar 14 06:41:29 MSK 2016


Is this issue resolved? I seem to hit the same issue right now.

Here is what I did

   - a fresh FS 1.6 build from master git branch on debian8/jessie,
   (following this instruction
   <https://freeswitch.org/confluence/display/FREESWITCH/Debian+8+Jessie>,
   "compile latest master")
   - since the machine is on AWS (NAT'ed), I loosely followed this
   instruction.
   <https://freeswitch.org/confluence/display/FREESWITCH/Amazon+EC2>  FS
   works fine with audio on two X-lite clients.
   - followed a couple of verto/video related links to get verto
   communicator working (sort of) but without audio/video, the same issue
   reported here.

I did follow Giovanni's suggestion on setting  <param name="ext-rtp-ip"
value="$${external_rtp_ip}"/> in verto.conf.xml.  That fixed RTP address in
caller side.  However, SDP received on callee side is still using private
address.  See below.


Remote SDP on callee side

type: offer, sdp: v=0
o=FreeSWITCH 1457907139 1457907140 IN IP4 172.30.0.223
s=FreeSWITCH
c=IN IP4 172.30.0.223
t=0 0
a=msid-semantic: WMS QTxWvKXI4optn9Z4do0kb1cAyOQE1rCI
m=audio 18480 RTP/SAVPF 111 9 0 8
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10; useinbandfec=1; stereo=1; sprop-stereo=1
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=fingerprint:sha-256
B0:6B:27:66:D3:1E:F9:CD:C7:F2:D8:A5:6A:58:6F:8E:93:6F:84:2B:6F:B2:D0:70:BC:65:3A:5E:52:2A:E9:E8
a=setup:actpass
a=rtcp-mux
a=rtcp:18480 IN IP4 172.30.0.223
a=ssrc:988985139 cname:aZvwzi4uwkNKkC


By contrast, below is the remote SDP on caller side.

type: answer, sdp: v=0
o=FreeSWITCH 1457901489 1457901490 IN IP4 52.53.227.122
s=FreeSWITCH
c=IN IP4 52.53.227.122
t=0 0
a=msid-semantic: WMS qejP8dntVtvBWvqJkQ59aKDPVpHbyKvO
m=audio 25168 UDP/TLS/RTP/SAVPF 111 126
a=rtpmap:111 opus/48000/2
a=fmtp:111 useinbandfec=1; minptime=10; stereo=1; sprop-stereo=1
a=rtpmap:126 telephone-event/8000
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=fingerprint:sha-256
B0:6B:27:66:D3:1E:F9:CD:C7:F2:D8:A5:6A:58:6F:8E:93:6F:84:2B:6F:B2:D0:70:BC:65:3A:5E:52:2A:E9:E8
a=setup:active
a=rtcp-mux
a=rtcp:25168 IN IP4 52.53.227.122

To prove the setup is right, I added "bypass_media= true" to the default
dialplan.  And now I can see audio/video with verto communicator.  That
seems to indicate something is wrong with verto/FS.

Any thoughts?  Why verto does give right rtcp address to callee?  Many
thanks.

Jun

On Fri, Oct 9, 2015 at 12:39 PM, Giovanni Maruzzelli <gmaruzz at gmail.com>
wrote:

> erase your all install, and start from scratch following exactly, step by
> step
> https://freeswitch.org/confluence/display/FREESWITCH/FreeSWITCH+1.6+Video
>
> On Fri, Oct 9, 2015 at 9:34 PM, Tao Zhang <tao at petatrading.com> wrote:
>
>> Yes, I did
>>
>> systemctl stop freeswitch
>>
>> then
>>
>> systemctl start freeswitch
>>
>> I also tried to modify internal.xml and external.xml following some
>> instructions on https://wiki.freeswitch.org/wiki/NAT_Traversal. I think
>> this verto video conf demo is not using those sip profiles? It did not fix
>> the problem either anyway.
>>
>> Thanks
>>
>> Tao
>>
>>
>> On Fri, Oct 9, 2015 at 12:13 PM, Giovanni Maruzzelli <gmaruzz at gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Fri, Oct 9, 2015 at 3:06 PM, Tao Zhang <tao at petatrading.com> wrote:
>>>
>>>> In verto.conf.xml, there is a param  for ext_rtp_ip, but it was
>>>> commented out.
>>>>
>>>> <!--  <param name="ext-rtp-ip" value=""/> -->
>>>>
>>>> I tried to uncomment this param and set it to the FS external IP, but
>>>> it dd not fix the problem..
>>>>
>>>>
>>> have you restarted mod_verto, or freeswitch ?
>>>
>>>
>>>
>>>> Tao
>>>>
>>>>
>>>> On Fri, Oct 9, 2015 at 4:50 AM, Giovanni Maruzzelli <gmaruzz at gmail.com>
>>>> wrote:
>>>>
>>>>> FS is almost always behind a NAT.
>>>>> You must set ext-rtp-ip in verto.conf.xml (can't remember the variable
>>>>> name now from cellphone. Check into verto.conf.xml)
>>>>>
>>>>> sent from my mobile,
>>>>> Giovanni Maruzzelli
>>>>> cell: +39 347 266 56 18
>>>>> On Oct 9, 2015 8:17 AM, "Tao Zhang" <tao at petatrading.com> wrote:
>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> I have been tracking down why my FS verto video conf demo setup not
>>>>>> working. Now I believe the reason is my FS server is behind a NAT. My
>>>>>> previous posts may be misleading now, so I am creating a new thread.
>>>>>>
>>>>>> Some evidence I saw:
>>>>>>
>>>>>> 1) In the SDP dialog, I saw my FS server's internal IP got used,
>>>>>> rather than its public IP, for example
>>>>>>
>>>>>> Dialog 6c62f631-469c-a2f0-e484-6e9cfcda7eedANSWER SDP v=0
>>>>>> o=FreeSWITCH 1444254094 1444254095 IN IP4 10.240.15.244
>>>>>> s=FreeSWITCH
>>>>>> c=IN IP4 10.240.15.244                     <=============
>>>>>> t=0 0
>>>>>>
>>>>>> 2) Also, in wireshark , I saw my client is trying to send STUN
>>>>>> packets to the FS server's internal IP,
>>>>>>
>>>>>> 450 18.252726000 192.168.1.7 10.240.15.244 STUN 158 Binding Request
>>>>>> user: mlvLvmDzCphyQYz5:N3MZoB99aGiAZotr
>>>>>>
>>>>>> So now my questions are Will the verto video conf demo work when the
>>>>>> FS server is behind NAT?   If so, could someone help me with the necessary
>>>>>> config changes and etc.?
>>>>>>
>>>>>> Thanks so much!
>>>>>>
>>>>>> Tao
>>>>>>
>>>>>>
>>>>>>
>>>>>> _________________________________________________________________________
>>>>>> Professional FreeSWITCH Consulting Services:
>>>>>> consulting at freeswitch.org
>>>>>> http://www.freeswitchsolutions.com
>>>>>>
>>>>>> Official FreeSWITCH Sites
>>>>>> http://www.freeswitch.org
>>>>>> http://confluence.freeswitch.org
>>>>>> http://www.cluecon.com
>>>>>>
>>>>>> FreeSWITCH-users mailing list
>>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>> UNSUBSCRIBE:
>>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>>> http://www.freeswitch.org
>>>>>>
>>>>>
>>>>>
>>>>> _________________________________________________________________________
>>>>> Professional FreeSWITCH Consulting Services:
>>>>> consulting at freeswitch.org
>>>>> http://www.freeswitchsolutions.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> http://www.freeswitch.org
>>>>> http://confluence.freeswitch.org
>>>>> http://www.cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:
>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>> http://www.freeswitch.org
>>>>>
>>>>
>>>>
>>>>
>>>> _________________________________________________________________________
>>>> Professional FreeSWITCH Consulting Services:
>>>> consulting at freeswitch.org
>>>> http://www.freeswitchsolutions.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> http://www.freeswitch.org
>>>> http://confluence.freeswitch.org
>>>> http://www.cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> http://www.freeswitch.org
>>>>
>>>
>>>
>>>
>>> --
>>> Sincerely,
>>>
>>> Giovanni Maruzzelli
>>> Cell : +39-347-2665618
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.freeswitch.org
>> http://www.cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
>
> --
> Sincerely,
>
> Giovanni Maruzzelli
> Cell : +39-347-2665618
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160313/b96f872d/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list