Example Asterisk configuration for use with freephoneline.ca
============================================================

Asterisk requires three files for basic operation. This configuration
example uses freephoneline.ca as a SIP trunk, enables voicemail and has
a basic dialplan for calling local extensions, local, national and
international calling from North America (users in other counties will
need to adapt the dialplan to fit your country outbound dialing).

The configuration has four internal SIP exections, 100 though 103. 
Extension 100 is considered to be the operator, where inbound missed
call voicemail is directed.

Voicemail for a SIP device can be accessed by dialing *98 and will not
be prompted for a voicemail password. You can access any voicemail mailbox
by dialing *97 where you will be prompted for the voicemail mailbox and
password. Passwords for each of the voicemail boxes are currently set to
1234.

To use this configuration with your freephoneline.ca account, you first
need to purchase the SIP credentials. This will run you $50. This will
allow you to use any SIP client, including Asteirsk. Just a note on using
Asterisk with freephoneline.ca, it's not supported, so don't ask them to
provide you any kind of support. They won't help you.

Once you have your credentials, you need to edit the following lines in
the sip.conf:

register => 1NNNNNNNNNN:password@voip.freephoneline.ca/1NNNNNNNNNN

Replace 1NNNNNNNNNN with your freephoneline.ca telephone number, and
replace password with the password provided.

You also need to edit the lines:

fromuser=1NNNNNNNNNN
defaultuser=1NNNNNNNNNN

Again, replacing 1NNNNNNNNNN with your freephoneline.ca telephone number.

Edit the localnet line to match your NATed subnet. By default, most soho
Internet routers use 192.168.1.0/24, but make sure this is correct before
starting.

You also need to modify the [fpl-inbound] context in the extensions.conf,
replace 1NNNNNNNNNN with your freephoneline.ca telephone number.

There is nothing else to modify in the sip.conf for freephoneline.ca, if
you are using a different SIP peer, you may need to modify which codecs
is used, typically ulaw and alaw are defaults, falling back to a lower
quality codec, gsm. Freephoneline.ca use ulaw and g729.

The extensions.conf is the dialplan. This has already been pre-configured
for North American dialing patterns. Here are the extensions already
configured and ready to use:

	Dial			Description
	1XX				Extension number of telephone
	*98				Voicemail access for extension
	*97				Voicemail access with prompt
	911				911 Emergency Services
	*8378			Test dialplan script (used for testing)
	*3246			Echo test
	*123			Speaking clock

If you want to change the initial voicemail passwords or add any additional
voicemail users, you'll need to modify the voicemail.conf. The format of
the file is simple:

	1XX => XXXX,User Name

Replacing 1XX with the users extension number, XXXX with the PIN and User
Name with the voicemail user name.
