FreeSWITCH connecting the external SIP Provider

Source: Internet
Author: User
Tags freeswitch

1, added SIP Provider, add the configuration file in Conf/sip_profiles/external

<!--Sipprovider.xml--

<include>
<gateway name= "Sipprovider" >
<param name= "username" value= "user"/>
<param name= "password" value= "pass"/>
<param name= "Realm" value= "*"/>
<param name= "proxy" value= "Sipprovider_ip_addr"/>
<param name= "Register" value= "true"/>
<param name= "expire-seconds" value= "/>"
<param name= "ping" value= "/>"
<param name= "Sip-trace" value= "true"/>
</gateway>
</include>

This SIP Provider requires REGISTER, and since FreeSWITCH is accessed through NAT, it is set to send pings for 30 seconds.

2, the did mapped by this SIP Provider to the corresponding extension

SIP Profile External.xml Sets the context default to public, so we need to edit conf/dialplan/public.xml

<extension name= "Sipprovider" > <!--your provider or any name "D-to-call it-
<condition field= "Destination_number" expression= "xxxxxxx" > <!--your did for this gateway-->
<action application= "Transfer" Data= "1001 XML Default"/>
</condition>
</extension>

Note:

You can also configure this gateway in your directory, the difference between the two configurations can be seen in this connection

Http://wiki.freeswitch.org/wiki/Clarification:gateways

<anthm> If you put them in a user tags in your directory you can and tell


#


          Sofia to manage the whole domain  And it'll iterate all the users


# in this


          domain and reg the Gateways


#


<anthm> If you don ' t need That's can just put them in the Sofia Conf





What I gather from this is so if you are want certain extensions to being registered with your VoIP provider when a SPECIF IC User registers with FreeSWITCH-should define gateways in the directory sections rather than in the Sofia Configurati On. Conversely, if you are want an extension registered with a provider you would define the gateway as part of the SIP Pro File.

3, set extensions can dial PSTN phone through this SIP Provider

Conf/dialplan/default.xml

<extension name= "Long Distance" >
<condition field= "Destination_number" expression= "^00 (/d+) $" >
<action application= "Set" Data= "Effective_caller_id_number=xxxxxxxx"/>
<!--If your provider does not provide ringback (from or 183) may simulate
Ringback by uncommenting, the following line. -
<!--action application= "Ringback"/-->
<action application= "bridge" data= "sofia/gateway/sipprovider/1550$1"/>
</condition>
</extension>

Note: The new configuration should be placed before the following information

<!--
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

Anything you put below this line would usually get ignored due to the file in
Default/99999_enum.xml as it would transfer the call to the enum DialPlan.

WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.