DevSnippets

Home » FreeSWITCH » Standard SIP Profile

Standard SIP Profile

FreeSWITCH Standard SIP Profile 10 views

Code

<profile name="standard">
  <gateways>
    <!-- Gateways go here if needed -->
  </gateways>

  <settings>
    <param name="debug" value="1"/>
    <param name="sip-trace" value="no"/>
    <param name="sip-capture" value="no"/>

    <!-- Network Binding -->
    <param name="sip-ip" value="$${local_ip_v4}"/>
    <param name="rtp-ip" value="$${local_ip_v4}"/>
    <param name="ext-sip-ip" value="auto-nat"/>
    <param name="ext-rtp-ip" value="auto-nat"/>

    <!-- Ports -->
    <param name="sip-port" value="5080"/>
    <param name="dialplan" value="XML"/>
    <param name="context" value="public"/>

    <!-- Codecs -->
    <param name="inbound-codec-prefs" value="OPUS,G722,PCMU,PCMA"/>
    <param name="outbound-codec-prefs" value="OPUS,G722,PCMU,PCMA"/>
    <param name="rtp-timeout-sec" value="300"/>
    <param name="rtp-hold-timeout-sec" value="1800"/>

    <!-- NAT Handling -->
    <param name="aggressive-nat-detection" value="true"/>
    <param name="inbound-late-negotiation" value="true"/>
    <param name="disable-transcoding" value="false"/>

    <!-- Registration -->
    <param name="auth-calls" value="false"/>
    <param name="accept-blind-auth" value="false"/>
    <param name="accept-proxy-auth" value="false"/>
    <param name="auth-all-packets" value="false"/>

    <!-- Security -->
    <param name="inbound-reg-force-matching-username" value="true"/>
    <param name="nonce-ttl" value="60"/>
    <param name="auth-calls" value="false"/>

    <!-- RTP -->
    <param name="rtp-enable-zrtp" value="false"/>
    <param name="rtp-timeout-sec" value="300"/>
    <param name="rtp-hold-timeout-sec" value="1800"/>

    <!-- TLS Support (optional) -->
    <!--
    <param name="tls" value="true"/>
    <param name="tls-only" value="false"/>
    <param name="tls-bind-params" value="transport=tls"/>
    <param name="tls-cert-dir" value="$${certs_dir}"/>
    -->

    <!-- Logging & Misc -->
    <param name="log-auth-failures" value="true"/>
    <param name="manage-presence" value="false"/>
    <param name="force-register-domain" value="true"/>

    <!-- Enable or disable profile -->
    <param name="enabled" value="true"/>
  </settings>
</profile>

Explanation

Notes:
The context="public" is standard for external profiles. You may change this to default or any custom context.

Set sip-port="5080" to avoid conflict with internal profile on 5060.

Use gateways block to insert IP-auth or user/pass-auth gateways (optional here).

TLS block is commented out — enable it if you’re using secure SIP.

Rate this snippet

Click to rate

Have a Better Solution?

Know a more efficient way to solve this problem? Share your own code snippet and help the community!

Submit Your Version