Skip to main content

Provider netvoip.ch (Switzerland)

netvoip.ch​

Last Update: 8 November 2011

I assume you have the following setup:

  • A FreeSWITCH-Server with public IP 1.2.3.4
  • 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:

<include>
<extension>
<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" />
</condition>
</extension>
</include>

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:

<include>
<gateway name="siptrunk.netvoip.ch">
<param name="username" value="004112345600" />
<param name="from-user" value="004112345600" />
<param name="password" value="" />
<param name="realm" value="siptrunk.netvoip.ch" />
<param name="register" value="false" />
</gateway>
</include>

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:

<include>
<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/siptrunk.netvoip.ch/$1" />
</condition>
</extension>
</include>