Core freePBX

This is the MAIN module for Asterisk

This contains:

freePBX-Trunks

Trunks
What are trunks?
You use a trunk to carry a call (or any number of calls) to a VSP or a device that cares about what number you send to it
(eg, another Asterisk/FreePBX Machine). There are 5 types of trunks supported:

Zap Trunk
IAX2 Trunk
SIP Trunk
ENUM Trunk
Custom Trunk
All the trunks are configured mainly in the same way:

General Settings


Outbound Caller ID
Setting this option will override all clients' caller IDs for calls placed out this trunk. The format is
"caller name" <#######>
Leave this field blank to simply pass client caller IDs. Quotes are optional around the caller name, but highly
recommended.

Maximum channels
This limits the maximum number of channels (simultaneous calls) that can be used on this trunk, including both incoming
and outgoing calls. Leave blank to specify no maximum.

Dial Rules
Dial rules are very powerful, but quite simple to learn.They tell the server how calls will be dialed on this trunk. It
can be used to add or remove prefixes. Numbers that don't match any patterns defined here will be dialed as-is.
Note that a pattern without a + or | (to add or remove a prefix) is useless.
Rules:

X - matches any digit from 0-9
Z - matches any digit from 1-9
N - matches any digit from 2-9
[1237-9] -matches any digit or letter in the brackets (in this example, 1,2,3,7,8,9)
. - wildcard, matches one or more characters (not allowed before a | or +)
| - removes a dialing prefix from the number (for example, 613|NXXXXXX would match when some dialed "6135551234" but
would only pass "5551234" to the trunk)
+ - adds a dialing prefix from the number (for example, 1613+NXXXXXX would match when some dialed "5551234" and would
pass "16135551234" to the trunk)
Examples:
You're in Melbourne, Australia. You normally dial 8888-1234, but your VSP requires you to have an area code on all calls.
This means that a user dialing an 8 digit number wants to have the Melbourne area code put on the front (03)

03+NXXXXXXX
You're in England, but your VSP is in the US. You want to be able to dial UK Numbers without having to dial the whole
01144 string

01144+NXXXXX.

ENUM Trunks


There's not all that much configuration to be done, as enum lookups are done automatically on the e164.org domain.
e164.org allows you to register your normal, home, telephone line as a VoIP line without needing government or offical
supervision. e164.org is run by volunteers and is donation supported.
Some example Dial Rules for an E164 trunk would be:

Australia (07 Area Code)
617+NXXXXXX
61+0|NXXXXXXXX
0011|.
North America (613 area code)
1613+NXXXXXX
1+NXXNXXXXXX
011|.
IAX2 and SIP Trunks
The configuration is as per above, but with the additional requirement of Incoming and Outgoing settings. These are
available from your VSP, or, from the VSP Hints page.

ZAP Trunks
Zap trunks consist of physical hardware in your machine that uses the Zapata interface. This is configured
in /etc/zaptel.conf and /etc/asterisk/zapata.conf. Documentation on these files is available on the voip-info wiki.

Custom Trunks
If you're using H323, Chan_capi, or any other non-standard trunk, you can explicitly configure the Dial string to usew
with this trunk type, replacing the number to be dialed with $OUTNUM$. Eg:

CAPI/XXXXXXXX/$OUTNUM$/b
You can use either gX or ContrX to identify CAPI groups or individual controllers
H323/$OUTNUM$@XX.XX.XX.XX
OH323/$OUTNUM$@XX.XX.XX.XX:XXXX
vpb/1-1/$OUTNUM$:

freePBX-Inbound

Inbound Routes Information

The 'Inbound Routes' page lets you configure which destination FreePBX uses for calls coming from Trunks. When a call is
recieved by Asterisk from a trunk, the DID and/or Caller ID is matched and the call is dispached as per your
settings.


Options:

  • DID Number

o For a SIP or IAX peer, this is usually your Account Number. If you have an account of '888123123', putting
that in here will match calls coming from that provider. Leaving this blank will match 'any'.

  • CID Number

o The Caller ID number sent to your machine. This is not something you should trust, as it is easily spoofable
(both with Voice over IP and normal telephone lines). Leaving it blank will, again, match any.


You can leave both of these blank to match any call, from any caller.
Fax Handling
With these two options, you can manage the way faxes are received over this trunk. Note that VoIP and Faxing does not
work well together, and you most probably will have problems.
Privacy Manager
Turn this on to ask for the callers Caller ID if not provided. This is useful for telemarketers, as they are loathe to divulge this information and will usually hang up.
Options

  • Immediate Answer

o This picks up the phone as soon as it rings (With Zaptel lines, this happes after the Caller-ID is received,
which may be up to three rings). It then generates any further 'ring' tones, if required, down the audio channel.
Note that if you're using G729 or GSM, the rings will sound funny to the caller.

  • Pause After Answer

o The number of seconds we should wait after performing an Immediate Answer. The primary purpose of this is to
pause and listen for a fax tone before allowing the call to proceed.:

  • Alert Info

o ALERT_INFO can be used for distinctive ring with certain SIP devices. The standard names are 'Bellcore-dr1'
to 'Bellcore-dr7', Snom phones can additionaly use a http:// url of a WAV or MP3 file.


Set Destination
This is a standard destination option group.


freePBX-Outbound

Outbound Routes Information


Outgoing calls are sent over trunks as determined by the configuration of the Outbound Routing page. This is
designed to be as flexible as possible, and allows for fall-through and multiple paths - eg, Least Cost Routing!

Adding a Route


Route Name
This is simply a descriptive name for the trunk, which will be shown on the right hand side of the screen.
Route Password
If this route is hit by a caller, and this is not empty, they will be prompted for a password. If they get the password
incorrect, the call will be dropped, and will not try for a match on any further trunks. Emergency Dialling
Settnig this means that this route is used for 'Emergency' calls. If you wish to have a different caller ID send for this
call (eg, when you're dialling 000/911/999), turn this on. Any calls matching this dial pattern will use the Caller
ID specified in Emergency CID rather than the usual Outbound CID in Extensions.
Dial Patterns
A Dial Pattern is a unique set of digits that will select this trunk. Enter one dial pattern per line.
Rules:

  • X - matches any digit from 0-9
  • Z - matches any digit form 1-9
  • N - matches any digit from 2-9
  • 1237-9 - matches any digit or letter in the brackets (in this example, 1,2,3,7,8,9)
  • . - wildcard, matches one or more characters
  • | - seperates a dialing prefix from the number (for example, 9|NXXXXXX would match when some dialed "95551234" but would only pass "5551234" to the trunks)


Examples

  • 000

o Only use this route if the user has dialled '000' exactly.

  • 9|911

o Only use this route if the user has dialled '9911', but take off the 9 before sending it to the trunk

  • 0|.

o Any number that starts with 0, use this route


Trunk Sequence
When this route is matched by the Dial pattern above, trunks are tried in the order listed here. Note that if you have a
password protected trunk, and the caller gets the password wrong, it does not proceed to the next trunk. Make sure
you click 'Add' after adding the trunk, and before you click 'Submit'.


freePBX-Extensions

Extensions Information


This area is for handsets, softphones, paging systems, or anything else that could be considered an 'extension' in the
classical PBX context.

Overview
Defining and editing extensions is probably the most common task performed by a PBX administrator, and as such, you'll
find you'll become very familiar with this page. There are presently four types of devices supported - SIP, IAX2,
ZAP and 'Custom'. This page also configures how voicemail is handled on a per-extension basis.

Adding a new extension
Phone Protocol
Pick one of SIP, IAX, ZAP or Custom

SIP is the Standard protocol for VoIP handsets and ATA's.
IAX is 'Inter Asterisk Protocol', a newer protocol supported by only a few devices (eg, PA1688 based phones, and the IAXy ATA)
ZAP is a hardware device connected to your Asterisk machine - Eg, a TDM400, TE110P.
Custom is a 'catch all', for any non standard device, eg H323.

Extension Number
This must be unique. This is the number that can be dialled from any other extension, or directly from the Digital
Receptionist if enabled. This may be any length, but conventionally a three or four digit extension is used.

Secret, aka 'Extension Password'
This is the password used by the telephony device to authenticate to the Asterisk server. This is usually configured by
the administrator before giving the phone to the user, and is usually not required to be known by the user. If the
user is using a soft-phone, then they'll need to know this password to configure their software.

Full Name
This is the Caller-ID Text presented to called parties. It should be any ISO8859-1 (or ASCII) string, but will accept UTF-
8. Note that some phones will have problems with multi-byte (eg, UTF-8) names, possibly crashing the phones. If
using mutli-byte characters, experiment cautiously.

Record Incoming
Option to record the calls recieved on this extension. There are three options:

Always
Never
On-Demand (User can dial '*1' to enable whilst in a call)
Record Outgoing
Same as above but for outgoing calls

Voicemail and Directory
Selecting 'Disabled' turns off voicemail for this extension totally, and these further options are hidden.

Voicemail Password
This is the password used to access the voicemail system (*98). It can be changed by the user when they log into their
voicemail (after logging in, they dial 0 then 5).
Email Address
The address that voicemails notifications will be sent toPager email address
This email address will be sent a small message notifying of voicemail messages, suitable for an email-to-pager service.

Play CID
Read back caller's telephone number prior to playing the incoming message, and just after announcing the date and time
the message was left.

Play Envelope
Envelope controls whether or not the voicemail system will play the message envelope (date/time) before playing the
voicemail message. This settng does not affect the operation of the envelope option in the advanced voicemail menu.

Delete Vmail
If set to "yes" the message will be deleted from the voicemailbox (after having been emailed). Provides functionality
that allows a user to receive their voicemail via email alone, rather than having the voicemail able to be
retrieved from the Webinterface or the Extension handset.
CAUTION: You must have email attachment set to yes if you don't want your voicemail system to email you a notification
saying 'You have a voicemail' and then immediately delete the voicemail. Make sure you've fully tested voicemail-to-email before you turn this on. See Email Problems for hints.


..and other stuff.