[Freeswitch-users] WebRTC: Receiving local IP in SDP

Miguel Oyarzo miguelaustro at gmail.com
Thu Jun 19 05:18:06 MSD 2014


Hi Brian,

Thanks for your reply. still not lucky.
The ACL config looks goods, I reckon:

  <network-lists>
    <list name="lan" default="deny">
      <node type="allow" cidr="10.10.1.0/24"/>
    </list>
<list name="localnet.auto" default="deny">
        <node type="allow" cidr="10.10.1.0/24"/>
</list>


DialPlan:
<context name="default">
 <extension name="613700[0-9]*">
        <condition field="destination_number" expression="^(613700[0-9]+)$"
require-nested="false">
                <action application="bridge"
data="sofia/registeredclients/$1%$${domain}"/>
        </condition>
 </extension>
</context>

Profile registeredclients.xml (where the Web client are registered):

    <param name="local-network-acl" value="localnet.auto"/>
    <param name="aggressive-nat-detection" value="true"/>
    <param name="rtp-ip" value="$${local_ip_v4}"/>
    <param name="sip-ip" value="$${local_ip_v4}"/>
    <param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
    <param name="ext-sip-ip" value="$${external_sip_ip}"/>

Note:  registeredclients is a copy of external.xml, listening the port
5020/UDP

Vars:
  <X-PRE-PROCESS cmd="set"
data="external_rtp_ip=stun:PUBLIC_STUN_SERVER:3478"/>
  <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:PUBLIC_STUN_SERVER
:3478"/


Local IP in this EC2 instance is: 10.10.1.120
Public Elastic IP:  57.X.X.142

SDP received into the INVITE at the WebRTC client, has 10.10.1.120, instead
of 57.X.X.142.


What's wrong?




On Wed, Jun 18, 2014 at 11:23 PM, Brian West <brian at freeswitch.org> wrote:

> see:
>
> ext-rtp-ip
> ext-sip-ip
> local-network-acl
>
> Those need to be set properly to determine the correct IP to fib about in
> the SDP, The ACL dictates whats inside the nat all else is outside.
> --
> Brian West
> brian at freeswitch.org
>
>
> Twitter: @FreeSWITCH , @briankwest
> http://www.freeswitchbook.com
> http://www.freeswitchcookbook.com
>
> T: +1.918.420.9001  |  F: +1.918.420.9002  |  M: +1.918.424.WEST
> iNUM: +883 5100 1420 9001
> ISN: 410*543
> Skype:briankwest
> PGP Key: http://www.bkw.org/key.txt (AB93356707C76CED)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Jun 18, 2014, at 12:54 AM, Miguel Oyarzo <miguelaustro at gmail.com>
> wrote:
>
>  Hi,
>
> I cannot manage to send the right SDP into the INVITE message from FS to
> my WebRTC client registered on it.
>
> The scenario is:
>
> WebClient<---wss/srtp---->FS<--rtp-->SIP_Endpoint
>
> - FS run in a EC2 instance.
> - FS/application="bridge"
> - WebClient run on Internet.
>
> Calls from WebClient to SIP_Endpoint works well and FS manages to reply a
> 200 OK response, after INVITE from WebClient, with a public IP into SDP.
> Audio is bi-directional, all looks good.
>
> However, calls originated on SIP_Endpoint to WebClient makes FS to include
> its private IP into the DSP for any INVITE toward WebClient (B-leg).
>
> I have updated 'tried ext-rtp-ip' to
> - Public IP address of the instance
> - private and public STUN services
> - auto-nat
>
> No matter what I do, I always get
> o=FreeSWITCH 1403050916 1403050917 IN IP4 10.10.1.120
> c=IN IP4 10.10.1.120
>
> At the WebClient side (INVITE). The weird is, using the same profiles in
> FS, calls from WebClient to SIP_Endpoint have no issues.
>
>
>
> Trace in FS (SIP_Endpoint -> WebClient)
>
> ----------------------------------------------------------------------------
> 2014-06-18 13:09:50.318354 [NOTICE] switch_channel.c:1053 New Channel
> sofia/inboundbrowser/61370000000 [02c48e60-f696-11e3-b962-2703af7256ae]
> 2014-06-18 13:09:50.318354 [DEBUG] mod_sofia.c:4446
> (sofia/inboundbrowser/61370000000) State Change CS_NEW -> CS_INIT
> 2014-06-18 13:09:50.318354 [DEBUG] switch_core_session.c:1384 Send signal
> sofia/inboundbrowser/61370000000 [BREAK]
> 2014-06-18 13:09:50.318354 [DEBUG] mod_sofia.c:4516 [zrtp_passthru]
> Setting a-leg inherit_codec=true
> 2014-06-18 13:09:50.318354 [DEBUG] mod_sofia.c:4519 [zrtp_passthru]
> Setting b-leg absolute_codec_string='PCMA at 8000h@20i at 64000b'
> 2014-06-18 13:09:50.318354 [DEBUG] switch_core_state_machine.c:467
> (sofia/inboundbrowser/61370000000) Running State Change CS_INIT
> 2014-06-18 13:09:50.318354 [DEBUG] switch_core_state_machine.c:507
> (sofia/inboundbrowser/61370000000) State INIT
> 2014-06-18 13:09:50.318354 [DEBUG] mod_sofia.c:87
> sofia/inboundbrowser/61370000000 SOFIA INIT
> 2014-06-18 13:09:50.318354 [DEBUG] switch_core_media.c:865 Set Local Key
> [1 AES_CM_128_HMAC_SHA1_80 inline:4hCK5K0NEWULvEWlyp6LEmcPVDwqTu2AUhbh7jqV]
> 2014-06-18 13:09:50.318354 [DEBUG] switch_core_media.c:865 Set Local Key
> [1 AES_CM_128_HMAC_SHA1_80 inline:6TEOHAvn7aga7PA7GvEsm/QBsztoMyov4Jv8vvGg]
> 2014-06-18 13:09:50.318354 [DEBUG] sofia_glue.c:1196
> sip:10.10.1.120:5064;transport=udp;lr;ovid=aa2aa1e2 Setting proxy route
> to sofia/inboundbrowser/61370000000
> 2014-06-18 13:09:50.318354 [DEBUG] sofia_glue.c:1225
> sofia/inboundbrowser/61370000000 sending invite version: 1.5.8b git 68e1a56
> 2014-02-23 23:59:01Z 64bit
> Local SDP:
> v=0
> o=FreeSWITCH 1403050916 1403050917 IN IP4 10.10.1.120
> s=FreeSWITCH
> c=IN IP4 10.10.1.120
> t=0 0
> a=msid-semantic: WMS pulb3IfP3ufkGKJf4haQDJ15jmDs4syk
> m=audio 10074 RTP/SAVPF 8 101 13
> a=rtpmap:8 PCMA/8000
> a=rtpmap:101 telephone-event/8000
> a=fingerprint:sha-256
> 6D:40:E1:C3:73:9F:F1:33:DA:7B:4B:1A:F1:2B:74:C7:42:24:EF:3D:84:6A:3B:1A:F9:9D:8B:3B:09:AB:33:AF
> a=rtcp-mux
> a=rtcp:10074 IN IP4 10.10.1.120
> a=ssrc:3489368462 cname:NKlGirlcLrmh1WnW
> a=ssrc:3489368462 msid:pulb3IfP3ufkGKJf4haQDJ15jmDs4syk a0
> a=ssrc:3489368462 mslabel:pulb3IfP3ufkGKJf4haQDJ15jmDs4syk
> a=ssrc:3489368462 label:pulb3IfP3ufkGKJf4haQDJ15jmDs4syka0
> a=ice-ufrag:4oCxXtt6GWoBfNLT
> a=ice-pwd:nXpveByQTLXLybxs
> a=candidate:1887505845 1 udp 659136 10.10.1.120 10074 typ host generation 0
> a=candidate:1887505845 2 udp 659136 10.10.1.120 10074 typ host generation 0
> a=crypto:1 AES_CM_128_HMAC_SHA1_80
> inline:4hCK5K0NEWULvEWlyp6LEmcPVDwqTu2AUhbh7jqV
> a=ptime:20
> a=sendrecv
>
> ----------------------------------------------------------------------------
>
>
> What's is wrong here is c=IN IP4 10.10.1.120 (must be public for RTP
> traffic between WebClient and FS)
> and
> a=candidate for public IP is missing (STUN is enabled in FS's profile)
>
>
> Any idea?
>
>
> --
> "Efficiency is doing things right; effectiveness is doing the right things
> (Peter Drucker)"
>
> Miguel Oyarzo
> DevOps & VoIP Engineer
> Linux User: # 483188 - counter.li.org
> http://au.linkedin.com/in/mikeaustralia
> Melbourne, Australia
>  _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.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://wiki.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
>
>


-- 
"Efficiency is doing things right; effectiveness is doing the right things
(Peter Drucker)"

Miguel Oyarzo
DevOps & VoIP Engineer
Linux User: # 483188 - counter.li.org
http://au.linkedin.com/in/mikeaustralia
Melbourne, Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140619/c6099a7d/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: whmcslogo.png
Type: image/png
Size: 21896 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20140619/c6099a7d/attachment-0001.png 


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