Integration · 4 min read

How to integrate a SIP trunk with FreeSWITCH

Gateway XML and dialplan for non-cli.site termination with optional CLI override.

Gateway config

Create conf/sip_profiles/external/noncli.xml:

<include>
  <gateway name="noncli">
    <param name="username" value="USERNAME"/>
    <param name="password" value="PASSWORD"/>
    <param name="proxy" value="sip.non-cli.site"/>
    <param name="register" value="true"/>
    <param name="expire-seconds" value="600"/>
    <param name="retry-seconds" value="30"/>
    <param name="caller-id-in-from" value="true"/>
    <param name="ping" value="30"/>
  </gateway>
</include>

Reload: sofia profile external rescan reload. Check status: sofia status gateway noncli.

Dialplan

<extension name="outbound-noncli">
  <condition field="destination_number" expression="^(\d+)$">
    <action application="set" data="effective_caller_id_number=15551234567"/>
    <action application="set" data="effective_caller_id_name=Acme"/>
    <action application="bridge" data="sofia/gateway/noncli/$1"/>
  </condition>
</extension>

Drop the effective_caller_id_* lines if you're using a non-CLI route — they'll be stripped anyway.

Tips

  • Set rtp_secure_media=false unless you've ordered a TLS/SRTP trunk.
  • Enable hangup_after_bridge=true to clean up legs promptly.
  • For high CPS, raise max-sessions and sessions-per-second in switch.conf.xml.

Related in Integration

Still stuck?

Open a ticket