Get in touch

If you need help setting up an account or making a phone call, or would like to leave feedback on the site or service, please don't hesitate to let us know.

Contact us

If you have a technical issue, for example you can not place calls or you need help setting up your incoming number/VoIP device, then please click on the following link to set up an email to the technical department Email us

Configure Asterisk

You can find you SIP registration details under the VoIP section of your Localphone Dashboard.

Asterisk is an open source PBX designed to switch calls, manage routes, enable features and connect callers with the outside world over IP, analogue and digital connections. This guide describes how to configure your Asterisk installation to work with your Localphone account.

This guide should work for Asterisk version 1.2.4 and above. You will need to edit two configuration files on your Asterisk server; sip.conf and extension.conf. These files are usually located in the directory /etc/asterisk/.

Open sip.conf and check that the [general] section contains the following configuration values:

port = 5060
bindaddr =
qualify = no
disable = all
allow = alaw
allow = ulaw
dtmfmode = rfc2833
srvlookup = yes

Register with the Localphone Service

Next, configure Asterisk to register with the Localphone service. This will enable Localphone’s proxy to route incoming calls to your Asterisk server.

register => [SIP ID]:[SIP Password][SIP ID]

Create the Localphone Account

Add your Localphone service to Asterisk. Add the following to the bottom of sip.conf:

type = friend
insecure = very
nat = no
canreinvite = no
authuser = [SIP ID]
username = [SIP ID]
fromuser = [SIP ID]
fromdomain =
secret = [SIP Password]

host =
dtmfmode = rfc2833
context = localphone-in ;extensions.conf context for inbound calls
disallow = all
allow = ulaw
allow = alaw

Test Your Configuration

Check that your Asterisk server has successfully registered with the Localphone proxy. At the Asterisk console enter the command sip reload, followed by the command sip show registry. The output should resemble the following:

localhost*CLI> sip reload
Reloading SIP>
== Parsing '/etc/asterisk/sip.conf': Found
== Parsing '/etc/asterisk/users.conf': Found
== Parsing '/etc/asterisk/sip_notify.conf': Found

localhost*CLI> sip show registry
Host Username Refresh State Reg.Time [SIP ID] 105 Registered Tue, 18 May 2010 14:51:06

Create the Incoming Context

Configure Asterisk to send calls to your chosen device(s) when a call is received via your Localphone account. You do this by creating the context specified in step #3. Add the following to extension.conf:

exten => [SIP ID],1,Dial(SIP/sipphone,60,tr) ; phone must be registered
exten => [SIP ID],2,Hangup

Create the Outgoing Context

Now Asterisk is able to receive calls, we need to set it up to make outbound calls. To do this you need to create an outgoing context similar to [localphone-out] defined below.

exten => _9.,1,Dial(SIP/${EXTEN:1}@localphone,30,tr)
exten => _9.,2,Playback(invalid)
exten => _9.,3,Hangup

The above example assumes the user of the phone connected to your Asterisk server presses 9 to get an outside line.

Please note that the [localphone-out] context will need to be included in the dial-plan for the individual device(s) that you intend to use with the Localphone service.

Following the steps above, you should now be able to connect to Localphone and make and receive calls. For further information about configuring Asterisk, or for help with troubleshooting, please see:

This guide is provided for assistance. If you discover any errors in this page, please send us your comments and we will update the guide as soon as possible.