DevSnippets

Home » FreeSWITCH » IP Based calling with specific caller id whitelisted

IP Based calling with specific caller id whitelisted

FreeSWITCH Dialing Out to MNO SIP Trunk/Gateway 2 views

Code

<include>
  <gateway name="gw_name">
    <param name="outbound-proxy" value="IP"/>
    <param name="realm" value="IP"/>
    <param name="register" value="false"/>

    <param name="sip_cid_type" value="none"/>
    <param name="caller-id-in-from" value="true"/>

    <variables>
      <variable name="sip_h_P-Asserted-Identity" value="sip:SENDERID@IP;user=phone"/>
      <variable name="sip_invite_to_params" value="user=phone"/>
      <variable name="sip_invite_from_params" value="user=phone"/>
    </variables>
  </gateway>
</include>

Explanation

This configuration defines a static (non-registering) SIP gateway in FreeSWITCH that:
Sends outbound calls to a fixed SIP peer (MNO / SIP provider)
Uses IP-based authentication
Explicitly controls caller ID and SIP identity headers
Forces user=phone formatting in SIP INVITEs
In short:
It tells FreeSWITCH how to place outbound calls to an operator SIP trunk and how to present caller identity.

Rate this snippet

Click to rate

Related Snippets

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