Hi,

 

if I set the parameter „<X-PRE-PROCESS cmd="stun-set" data="external_rtp_ip=stun:stun.freeswitch.org"/> “ in the vars.xml and use this variable $${external_rtp_ip}  in the SIP Profile, then the Ext-RTP-IP show the real external IP.

I think, that’s OK.

 

But I miss the srflx candidate in the sdp.

 

I tried to experimental with the apply-candidate-acl (rfc1918.auto, any_v4.auto, wan_v4.auto), but nothing works.

What’s wrong?

 

Here is my sofia profile config:

<profile xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="SBC2_B2Bua">

  <aliases />

  <domains>

    <domain name="h3k.sip.c4b" alias="false" parse="true" />

  </domains>

  <settings>

    <param name="user-agent-string" value="XPhone Call Controller" />

    <param name="debug" value="0" />

    <param name="stun-enabled" value="true"/>

    <param name="stun-auto-disable" value="false"/>

    <param name="sip-trace" value="no" />

    <param name="sip-capture" value="no" />

    <param name="dialplan" value="XML" />

    <param name="context" value="SBC2_SP_outbound" />

    <param name="dtmf-type" value="rfc2833" />

    <param name="dtmf-duration" value="100" />

    <param name="rfc2833-pt" value="98" />

    <param name="inbound-codec-prefs" value="OPUS,PCMU,PCMA,VP8" />

    <param name="outbound-codec-prefs" value="OPUS,PCMU,PCMA,VP8" />

    <param name="hold-music" value="local_stream://moh" />

    <param name="rtp-timer-name" value="none" />

    <param name="rtp-rewrite-timestamps" value="true" />

    <param name="manage-presence" value="false" />

    <param name="inbound-codec-negotiation" value="generous" />

    <param name="inbound-late-negotiation" value="true" />

    <param name="nonce-ttl" value="60" />

    <param name="auth-calls" value="false" />

    <param name="sip-port" value="4901" />

    <param name="rtp-ip" value="MyLocalIP" />

    <param name="sip-ip" value=" MyLocalIP " />

    <param name="ext-rtp-ip" value="$${external_rtp_ip}" />

    <param name="ext-sip-ip" value=" MyLocalIP " />

    <param name="local-network-acl" value="SBC2_localnet.auto" />

    <param name="apply-candidate-acl" value="rfc1918.auto" />

    <param name="apply-candidate-acl" value="SBC2_localnet.auto" />

    <param name="apply-candidate-acl" value="any_v4.auto" />

    <param name="apply-candidate-acl" value="wan_v4.auto" />

    <param name="apply-inbound-acl" value="SBC2_localnet.auto" />

    <param name="rtp-timeout-sec" value="300" />

    <param name="rtp-hold-timeout-sec" value="1800" />

    <param name="enable-3pcc" value="true" />

    <param name="inbound-use-callid-as-uuid" value="true" />

    <param name="tls" value="false" />

    <param name="tls-only" value="false" />

    <param name="tls-bind-params" value="transport=tls" />

    <param name="tls-sip-port" value="" />

    <param name="tls-passphrase" value="" />

    <param name="tls-verify-date" value="true" />

    <param name="tls-verify-depth" value="2" />

    <param name="tls-verify-in-subjects" value="" />

    <param name="tls-version" value="tlsv1,tlsv1.1,tlsv1.2" />

    <param name="tls-ciphers" value="ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH" />

    <param name="zrtp-passthru" value="true" />

    <param name="inbound-reg-force-matching-username" value="true" />

    <param name="auth-all-packets" value="false" />

    <param name="wss-binding" value=":4447" />

    <param name="caller-id-type" value="rpid" />

    <param name="manual-redirect" value="true" />

    <param name="rtcp-audio-interval-msec" value="5000" />

  </settings>

  <gateways>

    <X-PRE-PROCESS cmd="include" data="external/GW_SBC2_B2Bua.conf.xml" />

  </gateways>

</profile>

 

Von: FreeSWITCH-users <freeswitch-users-bounces@lists.freeswitch.org> Im Auftrag von Alexander Haugg
Gesendet: Donnerstag, 9. Januar 2020 08:17
An: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org>
Betreff: [Freeswitch-users] WebRTC STUN request for a SIP profile is not working

 

Hi,

 

I’d read the manuals and configure my sofia profile to work with the external IP in the ext-rtp-ip setting.

<param name="stun-enabled" value="true"/>

<param name="stun-auto-disable" value="false"/>

<param name="ext-rtp-ip" value="stun:stun.freeswitch.org" />

 

The Freeswitch is started with the parameter –nonat

In the pcap trace is no STUN request visible.

I try to restart the Freeswitch, restart the profile, do an outbound call, but there is no STUN request.

 

If I try to get my external IP via the CLI cmd “stun stun.freeswitch.org”, then works it successfully.

 

The status output of the profile is:

=================================================================================================

Name                                SBC2_B2Bua

Domain Name                 N/A

Auto-NAT                         false

DBName                           sofia_reg_SBC2_B2Bua

Pres Hosts

Dialplan                            XML

Context                            SBC2_SP_outbound

Challenge Realm             auto_to

RTP-IP                               MY_LOCAL_IP

Ext-RTP-IP                        stun:stun.freeswitch.org

SIP-IP                                MY_LOCAL_IP

Ext-SIP-IP                         MY_LOCAL_IP

URL                                   sip:mod_sofia@MY_LOCAL_IP:4901

BIND-URL                  sip:mod_sofia@MY_LOCAL_IP:4901;maddr=MY_LOCAL_IP;transport=udp,tcp

HOLD-MUSIC                   local_stream://moh

OUTBOUND-PROXY       N/A

CODECS IN                       OPUS,PCMU,PCMA,VP8

CODECS OUT                   OPUS,PCMU,PCMA,VP8

TEL-EVENT                       98

DTMF-MODE                   rfc2833

CNG                                  13

SESSION-TO                     0

MAX-DIALOG                   0

NOMEDIA                        false

LATE-NEG                         true

PROXY-MEDIA                 false

ZRTP-PASSTHRU             false

AGGRESSIVENAT           false

CALLS-IN                           0

FAILED-CALLS-IN             0

CALLS-OUT                       0

FAILED-CALLS-OUT        0

REGISTRATIONS              0

 

Thanks a lot!!!

Alex