Skip to main content

Provider (Switzerland)

Last Update: 8 November 2011

I assume you have the following setup:

  • A FreeSWITCH-Server with public IP
  • Some Numbers like 012 3456 xx registered, where "xx" are extension like 00,01,02...
  • Some clients for these extensions

Inbound calling

To receive calls from the external side, just set up the dialplan accordingly:

<condition field="destination_number" expression="^0123456(\d{2})$">
<action application="set" data="call_timeout=20" />
<action application="bridge" data="user/$1" />
<action application="answer" />
<action application="voicemail" data="default $${domain} $1" />

To have this work, you should give your local phones the account names "00","01", "02", etc.

Outbound calling

To allow your local phones to make outgoing calls, you need to set up a gateway (I did in conf/sip_profiles/external/netvoip.xml) like following:

<gateway name="">
<param name="username" value="004112345600" />
<param name="from-user" value="004112345600" />
<param name="password" value="" />
<param name="realm" value="" />
<param name="register" value="false" />

Please note: NetVoIP may tell you at some point, you should use numbers like 012345600 or 04112345600 - ignore it, use 0041.. Additionally, make sure you have your local users set their caller-id correctly.

<variable name="effective_caller_id_number" value="0041123456xx" /> 

Set up the outgoing dialplan like this:

<extension name="Outbound call">
<condition field="destination_number" expression="^(\d{5,})$">
<action application="set" data="effective_callerid_number=004112345600" />
<action application="bridge" data="sofia/gateway/$1" />