Provider Configuration:Brastel

From FreeSWITCH Wiki
Jump to: navigation, search

VoIP provider for Japan, Brazil.

1º) Create the file /usr/local/freeswitch/conf/sip_profiles/external/basix.xml, with this:

 <include>
   <gateway name="basix">
     <param name="username" value="[USERNAME]"/>
     <param name="realm" value="voice.brastel.com.br"/>
     <param name="password" value="[PASSWORD]"/>
     <param name="caller-id-in-from" value="false"/>
     <param name="extension" value="[USERNAME]"/>
     <param name="extension-in-contact" value="true"/>
     <param name="proxy" value="voice.brastel.com.br"/>
     <param name="register-proxy" value="proxy.brastel.com.br"/>
     <param name="expire-seconds" value="3600"/>
     <param name="register" value="true"/>
     <param name="from-user" value="[USERNAME]"/>
     <param name="from-domain" value="voice.brastel.com.br"/>
   </gateway>
 </include>

2º) Add those lines to /usr/local/freeswitch/conf/sip_profiles/external.xml:

 <param name="auth­-calls" value="false"/> 
 <param name="accept­-blind­-auth" value="true"/>

3º) Add those lines to /usr/local/freeswitch/conf/autoload_configs/acl.conf.xml:

 <list name="basix" default="deny"> 
   <node type="allow" cidr="200.225.81.74/32"/> 
   <node type="allow" cidr="192.168.193.20/32"/> 
   <node type="allow" cidr="200.225.81.66/32"/> 
   <node type="allow" cidr="200.225.93.156/32"/> 
   <node type="allow" cidr="[EXTERNALIP]/32"/> 
 </list> 

4º) To redirect the calls it's needs add those lines to /usr/local/freeswitch/conf/dialplan/public.xml into the tag <extension name="public_extensions">:

 <condition field="destination_number" expression="^([USERNAME])$">
   <action application="transfer" data="$1 XML default"/>
 </condition>

In this case all call's will be redirected to the same registered extension [USERNAME]. So you still have to create a [USERNAME] extension on /usr/local/freeswitch/conf/directory/default/[USERNAME].xml . Of course, you can change to redirect to another extension instead of [USERNAME].