User Tools

Site Tools


voip:freeswitch:sip_provider_viptel

I thought playing with SIP would be fun (and it is :P), so I got myself a number at “VIPTel”. If you don't already have Freeswitch, check out the quick install page http://wiki.freeswitch.org/wiki/Linux_Quick_Install_Guide.

I transfer incoming calls to an internal number. You can add the external number as your login etc., but I'd like to be able to create queues and play around with different functions, so I just transfer incoming calls to internal number “1000” (one of the example config users)

We need to define 3 files to connect + dial in + dial out to/from VIPTel:

  • ./conf/sip_profiles/external/viptel.xml
  • ./conf/dialplan/public/00_viptel_inbound_did.xml
  • ./conf/dialplan/default/01_viptel.xml

The first file (viptel.xml) defines a gateway to connect to.
The second file (00_viptel_inbound_did.xml) is kinda self-explanatory. It creates the rules for inbound calls from the provider.
The third file defines outbound rules.

./conf/sip_profiles/external/viptel.xml

<include>
  <gateway name="viptel.dk">
    <param name="username" value="YOUR NUMBER/USERNAME HERE"/>
    <param name="password" value="YOUR PASSWORD HERE"/>
    <param name="proxy" value="sip.viptel.dk"/>
    <param name="from-domain" value="sip.viptel.dk"/>
    <param name="expire-seconds" value="3600"/>
    <param name="register" value="true"/>
  </gateway>
</include>

./conf/dialplan/public/00_viptel_inbound_did.xml

<include>
  <extension name="viptel_Inbound">
    <condition field="destination_number" expression="YOUR VIPTEL NUMBER HERE">
      <action application="transfer" data="1000 XML default"/>
     </condition>
  </extension>
</include>

./conf/dialplan/default/01_viptel.xml

<extension name="Local Denmark">
   <condition field="destination_number" expression="^([0-9]{8})$">
     <action application="set" data="effective_caller_id_name=YOUR NAME"/>
     <action application="set" data="effective_caller_id_number=YOUR NUMBER"/>
     <action application="bridge" data="sofia/gateway/viptel.dk/$1"/>
   </condition>
</extension>

<extension name="International">
   <condition field="destination_number" expression="^00([0-9]*)$">
     <action application="set" data="effective_caller_id_name=YOUR NAME"/>
     <action application="set" data="effective_caller_id_number=YOUR NUMBER"/>
     <action application="bridge" data="sofia/gateway/viptel.dk/00$1"/>
   </condition>
</extension>

Afterwards, just run “reloadxml” + “sofia profile external rescan reloadxml”. Or you can just do a “shutdown” (of freeswitch, not your machine! I'd never ask you to reboot your machine. Only insane people reboot, unless it's a kernel update :>), then start freeswitch again.

voip/freeswitch/sip_provider_viptel.txt · Last modified: 2015/08/15 22:56 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki