jump to navigation

Freeswitch Step by step Howto February 3, 2011

Posted by hasnain110 in Uncategorized.
trackback

Step 1

edit vars.xml and it should look like this

  <!– Internal SIP Profile –>
  <X-PRE-PROCESS cmd="set" data="internal_auth_calls=true"/>
  <X-PRE-PROCESS cmd="set" data="internal_sip_port=5080"/>
  <X-PRE-PROCESS cmd="set" data="internal_tls_port=5081"/>
  <X-PRE-PROCESS cmd="set" data="internal_ssl_enable=false"/>
  <X-PRE-PROCESS cmd="set" data="internal_ssl_dir=$${base_dir}/conf/ssl"/>

  <!– External SIP Profile –>
  <X-PRE-PROCESS cmd="set" data="external_auth_calls=false"/>
  <X-PRE-PROCESS cmd="set" data="external_sip_port=5060"/>
  <X-PRE-PROCESS cmd="set" data="external_tls_port=5061"/>
  <X-PRE-PROCESS cmd="set" data="external_ssl_enable=false"/>
  <X-PRE-PROCESS cmd="set" data="external_ssl_dir=$${base_dir}/conf/ssl"/>

and

  <X-PRE-PROCESS cmd="set" data="global_codec_prefs=G729,G723,G711U"/>
  <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=G729,G723,G711U"/>

Step 2:

All Termination GW will be added now under /usr/local/freeswitch/conf/sip_profiles/external

create gw.xml and it should look like this

<include>
        <gateway name="broadvoice1">
          <param name="username" value="4234685032 "/>
          <param name="realm" value="4234685032 "/>
          <param name="from-domain" value="174.136.52.143"/>
          <param name="password" value="sipsip"/>
          <param name="extension" value="5555551234"/>
          <param name="proxy" value="174.136.52.143"/> <!– example using the broadvoice DNS SRV record for New York City. –>
          <param name="expire-seconds" value="3600"/>
          <param name="register" value="false"/>
          <param name="retry-seconds" value="6"/>
        </gateway>
    </include>

 

Step 3:

Now create a Ingress GW

Goto/usr/local/freeswitch/conf/autoload_configs and edit acl.conf.xml

vi acl.conf.xml and add this in the bottom

<list name="asterisk_box" default="allow">
  <node type="allow" cidr="216.218.233.194/32"/>
</list>

now we have to apply this ACL in /usr/local/freeswitch/conf/sip_profiles/internal.xml

vi internal.xml

add this line at the bottom

<param name="apply-inbound-acl" value="asterisk_box"/>

Step 4:

Now create a Dial plan

goto /usr/local/freeswitch/conf/dialplan

vi public.xml

<extension name="outbound_international">
<condition field="destination_number" expression="7243(\d+)$">
<!–<action application="set" data="absolute_codec_string=G729"/>–>
<action application="bridge" data="{absolute_codec_string=’G729′}sofia/gateway/broadvoice1/7243$1"/>
</condition>
</extension>

Step 5

Now start the freeswitch and make the calls

Advertisement

Comments»

1. Kate - February 23, 2011

Great tutorial! If anyone out there is interested in a FreeSWITCH Training, Darren Schreiber (co-author of the FreeSWITCH book) has started trainings throughout the world. The next training is in March in San Francisco. Check out http://www.voipkb.com for more details.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.