Asterisk@Home Handbook Wiki Chapter 4

Business PBX Solutions
Provider Solution Details
Bicom VoIP Become an ITSP Now!
  • Become a serious competitor in VoIP Immediately
  • FULL Consultancy, Installation, Training & Support
  • Sell Hosted IP PBXs, Biz Lines, Call Centre
  • Turnkey Provisioning at your data center
Details
3CX Software PBX for Windows
  • Windows Software Solution
  • Easy to Install and Manage
  • Auto Configures Phones & Trunks
  • Android, iOS, Windows & Mac clients
Details
VoIP Hardware Solutions
Provider Solution Details
VoIP Hardware Zycoo UC Solutions
  • Modular Design IP PBX for SMB
  • Remote office Centralized Management solution
  • 3rd party app integration, Enterprise Billing, Android & iOS client
Details
Yeastar Communications Solutions
  • Cost-effective IP-PBX Solution for SMB
  • FXS, FXO, GSM, BRI and PRI VoIP Gateways
  • Rich features and reliable performance
Details


Chapter 4 Using AMP to Configure your Asterisk@Home Server



4.1 What is AMP?

Using AMP (Asterisk Management Portal) we can easily configure our asterisk server. AMP provides a graphical method (through a web browser) to configure the textual configuration files that Asterisk needs to function. Note that this is only a brief overview of all the features of AMP (which is now called freePBX). For more detailed information, you can visit the end-user documentation of freePBX at http://www.aussievoip.com.au/wiki/freePBX.


4.2 How does AMP work?

Here is what AMP can configure in asterisk:

Incoming Calls — Specify where to send calls coming from the outside
Extensions — Add extensions and set voicemail properties
Ring Groups — Group extensions that should ring simultaneously
Queues — Place calls into queues and allow them to be answered in order
Digital Receptionist — Create voice menus to greet callers
Trunks — Set up trunks to connect to the outside world
Outbound Routing — Manage which trunks outbound calls go out
DID Routes — Specify the destination for calls if their trunk supports direct inward dial
On Hold Music — Upload MP3 files to be played while users are on hold
System Recordings — Record or upload messages for specific extensions
Backup and Restore — Create, back up, and restore profiles of your system
General Settings — Set basic dialing, company directory, and fax settings


4.3 How to Log into AMP

To log into AMP and begin making your changes, point your browser to the IP address of the Asterisk@Home Server

HTTP://PutYourAsterisk@HomeIpaddressHere

The default login and password of AMP is

Login: maint
Password: password


Hopefully by this point you've already changed your password! (See Chapter 3 Securing your Asterisk@Home server)


4.3 Configuring an extension

1) Use a pc on your network that has a web browser and connect to your Asterisk@Home box using HTTP://PutYourAsterisk@HomeIpaddressHere.

Screenshot of main screen.
Image

2) Click on Asterisk Management Portal and then click setup.

Note: If you are using Asterisk@Home v2.8 or later, or freePBX, you will need to install and enable the various configuration modules. This can be done in the Setup/Module Admin screen.

3) Click Extensions then Add Extension.
Image

4) Select the type of extension.
  • A. SIP = Session Initiation Protocol
    • 1a) Use the default extension 200 and type in a password for registration like "abc123". The password box is actually the Secret box, aka. 'Extension Password', and it doesn't * out the password entered. After that, enter the name of the person using this extension.
    • 2a) Go down to the voicemail section, select enable, and enter a voicemail password. Use something you can type on a phone keypad like '1234'. Enter an e-mail address where you would like your voice messages sent and click add extension. Then click on the red apply bar at the top of the screen.
    • 3a) Set up a phone for this extension. Get a SIP phone, an X-Ten soft phone is good for testing. See the section on the X-Ten phone. remember to use your extension and extension password.
    • 4a) Make a call from your phone. (try *45 this is a local echo test) (correction *43)
  • B) IAX2 = Inter Asterisk Transport version 2
  • C) ZAP = PSTN based hardware providing FXO/FXS operations
  • D) Custom = Used for special types of extensions
    • 1d) To create a custom extension which calls an external number enter the extension number for the new extension, 1234 will work nicely.
    • 2d) Enter the display name for the extension, "Joe's Cell Phone" will do nicely for this
    • 3d) Skip down to the "Dial" field. Enter the dial details in this format: TYPE/NUMBER@TRUNK OR TYPE/TRUNK/NUMBER. For example: SIP/5555551212@telasip-gw or ZAP/4/5555551212 (both formats seem to work)
    • 4d) Click Submit. Click the Red Bar that appears at the top of the screen
    • 5d) Try calling your new extension.

There appears to be a problem defining a custom extension (AAH ver 2.6). To have an extension call an outside number, create a custom extension with the following dial string

Local/phonenumber_to_call@outbound-allroutes

eg A call to a UK phone might use the following dial string:

Local/01144xxxxxxxxx@outbound-allroutes

Here is a discussion about this issue:

http://sourceforge.net/forum/forum.php?thread_id=1434318&forum_id=420324


4.4 Configuring a trunk for outbound and inbound calls

Using AMP (user: admin, pass: password) (A@Hv1.5 user: wwwadmin) select setup then trunks. Click on the type of trunk you want to create. See the VOIP Service Providers section for how to configure a trunk for your provider. See Example 6 for IAX trunking to a non A@H 2.5 host.




4.5 Configuring Outbound Routing

Next you need a route to allow calls from your phones to go out on a trunk. If you have more than one trunk you can set up rules to determine how a trunk is chosen for each call. Here we will set all calls to go out one trunk.


Using AMP (user: admin, pass: password) (A@Hv1.5 user: wwwadmin) select setup then Outbound Routing. Type in a name for your route. Then enter the following in the dial pattern box.


1NXXNXXXXXX
NXXNXXXXXX
NXXXXXX


This will set all calls to use this route.

Next go to the Trunk Sequence section. Drop down the box and select the trunk you configured earlier. Click add.

That's it. Click Submit Changes and then click on the red apply bar at the top of the screen.

Try dialing a number on your phone like 19197543700 (RedHat customer support) and you should hear "Welcome to RedHat"

In South America, we use 00+country+areacode+number but USA use 011+country+areacode+number

To replace the 011 and start dialing with 00 and have the ability to dial local numbers, you have to add the Outgoing Dial Rules in your trunk:

Outgoing Dial Rules for the trunk voip:
1+NXXNXXXXXX ; this is to call to USA
011+N. ; this is to call to rest of the world
0115935+2XXXXXX ; this is for local dialing at my area
011593+NNXXXXXX ; this is for regional calls at my country


Next, create 3 outbound routing (localdialing, USA, restoftheworld)

For localdialing:

Dial Patterns:

0|2XXXXXXX
0|3XXXXXXX
0|4XXXXXXX
0|5XXXXXXX
0|6XXXXXXX
0|7XXXXXXX
0|8XXXXXXX
0|9XXXXXXX ; this if for mobile
2XXXXXX ; this is for dialing local city numbers


Trunk Sequence:

voip


for USA:
Dial Patterns:

001|NXXNXXXXXX
001|800XXXXXXX ; toll free numbers


Trunk Sequence:

voip


For restoftheworld :
Dial Patterns:

00|Z.


Trunk Sequence:

voip


4.6 Configuring Incoming Calls

Next you need a route to allow calls from your provider to go someplace. Using AMP (user: maint, pass: password) select setup then Incoming Calls. Under the Send Incoming Calls from the PSTN to: section drop down the box next to Extension: and select the extension 200 you created earlier.

Click Submit Changes and then click on the red apply bar at the top of the screen.

Call the phone number from your provider with a cell phone or other non-IP phone. Your SIP phone at extension 200 should ring.


4.7 Configuring the digital receptionist


Go to the setup-digital receptionist page.
digit your extension number (ie. the number of the phone you are going to use to record the message for the receptionist).

Give a name to your menu (ex. business_hours) and write the text of the message in the box below, so when recording you'll "only" have to read.

By default you can give # as an option to access the directory or dial the extension wanted you know it.
Remember: you have to use options numbered 1, 2 3 and so on, not real extensions (ie: ... dial 3 for the marketing ... dial 550 for the marketing is wrong).

a good(tm) example would be:

Welcome to Acme! Thank you for your call. Dial the extension number if you know it or dial 1 to talk with administrators, 2 for the tech zone, 3 for the store, 4 to talk with an operator or 5 to leave a message in our mailbox. dial # to access the directory. Or zero for an operator. Thank You.

Note: you can have 2 digital receptionists, one for business hours and one for night hours.
ex: Welcome to Acme! Thank you for your call. Our offices are open from 8 to 5, Dial 1 to talk 24/24 support 5 to leave a message in our mailbox. Thank you.

dial *77 and record your message.
you can listen to your just recorded message via *99.
repeat until satisfied and press continue.

Insert the number of options you gave on the messages (in the example 5, dial extension and # does not count) and press continue.

now associate every option with the corresponding action ... (ex. 1 goes to extension 545, 2 to the queue 600, 3 to the ring group 650, 4 to 211 and 5 211's mailbox).

press continue and your first digital receptionist is created. now go to the setup-incoming-call and associate this digital receptionist to wanted incoming calls.


4.7.1 How to connect a caller to a default extension when one is not chosen

Currently when caller does not make a choice from the options the call is disconnected after second message. To send the caller to a default extension, add the letter "t" to the Digital Receptionist ---> Options for Menu ---> Dialed Option # ----> "T" ----> Then the extension you want the caller to be sent to.

4.8 Trunking two Asterisk@Home Servers

There are many ways to trunk two asterisk servers together that offer different features and ability. Below is one such configuration using IAX2.

Assumptions:
  • The two Asterisk@Home servers are named: SystemA and SystemB
  • SystemA uses 2XX series extensions
  • SystemB uses 3XX series extensions

SystemA Configuration
  1. Add extension 201 (if needed)
  2. Add new IAX2 Trunk:
    1. Trunk Name: systemb
    2. Peer Details:
context=from-internal
host=systemb.ip
qualify=yes
secret=systemb-pass
type=peer
username=systemb-user
    1. User Context: systema-user
    2. User Details:
context=from-internal
host=systemb.ip
secret=systema-pass
type=user
  1. Create outbound route:
    1. Dial Patterns: 3XX
    2. trunk Sequence: IAX2/systemb

SystemB Configuration
  1. Add extension 201 (if needed)
  2. Add new IAX2 Trunk:
    1. Trunk Name: systema
    2. Peer Details:
context=from-internal
host=systema.ip
qualify=yes
secret=systema-pass
type=peer
username=systema-user
    1. User Context: systemb-user
    2. User Details:
context=from-internal
host=systema.ip
secret=systemb-pass
type=user
  1. Create outbound route:
    1. Dial Patterns: 2XX
    2. trunk Sequence: IAX2/systema

Note: Change "systema.ip" and "systemb.ip" to the ip addresses of your respective servers.

At this point, from extension 201, dialing 301, it will trunk through IAX2 to the next extension.

4.9 "Extension Mobility" "Phone Sharing" or "Disconnecting the extension from the phone".

This little AMP custimization allows the administrator to disconnect the extension from the phone. In other words, users can now "Log Into" a phone will all the associated benefits. A good example when this would be great would be when there is a day and night shift using the same phones. The night shift comes in and logs into the same phone that a day shift person had just used. Another example would be a user that skips around your compan's remote sites. They won't have to lug the hard phone with them if all they need to do is log into the nearest hard phone to gain access to their extension.

Another benefit to this custimization is if you have 1 hard phone at work and 1 soft phone on your laptop with the same extension (example x1234). Usually, when the hard phone registers with the asterisk server, the registration would be "stolen" away by the soft phone when the soft phone is started. All incoming calls would go straight to the soft phone. The only way to get around this OTHER than this customization would be to assign your hard phone an extension (example: x12341) and your soft phone an extesion (x12342) and then tie them together with ring group with the extension that you want (x1234). This way both phones will ring if x1234 is called.

AMP fuses the user and the device into an object called an extension. We are going to un-fuse it.

4.9.1 Editing the AMP config file

We have to edit the AMP configuration file. At the CentOS command line, type the following:

nano /etc/amportal.conf

Look for an find the AMPEXTENSIONS= setting. Right now it is set for:

AMPEXTENSIONS=extensions

Change this to:

AMPEXTENSIONS=deviceanduser

Save the file, and restart AMP by typing the following at the CentOS command line:

amportal restart


4.9.2 Configuring our Users and Devices

If you login to AMP, you will notice that instead of the "Extensions" menu option in "Setup", there is now "Devices" and "Users".















Chapter 4 Using AMP to Configure your Asterisk@Home Server



4.1 What is AMP?

Using AMP (Asterisk Management Portal) we can easily configure our asterisk server. AMP provides a graphical method (through a web browser) to configure the textual configuration files that Asterisk needs to function. Note that this is only a brief overview of all the features of AMP (which is now called freePBX). For more detailed information, you can visit the end-user documentation of freePBX at http://www.aussievoip.com.au/wiki/freePBX.


4.2 How does AMP work?

Here is what AMP can configure in asterisk:

Incoming Calls — Specify where to send calls coming from the outside
Extensions — Add extensions and set voicemail properties
Ring Groups — Group extensions that should ring simultaneously
Queues — Place calls into queues and allow them to be answered in order
Digital Receptionist — Create voice menus to greet callers
Trunks — Set up trunks to connect to the outside world
Outbound Routing — Manage which trunks outbound calls go out
DID Routes — Specify the destination for calls if their trunk supports direct inward dial
On Hold Music — Upload MP3 files to be played while users are on hold
System Recordings — Record or upload messages for specific extensions
Backup and Restore — Create, back up, and restore profiles of your system
General Settings — Set basic dialing, company directory, and fax settings


4.3 How to Log into AMP

To log into AMP and begin making your changes, point your browser to the IP address of the Asterisk@Home Server

HTTP://PutYourAsterisk@HomeIpaddressHere

The default login and password of AMP is

Login: maint
Password: password


Hopefully by this point you've already changed your password! (See Chapter 3 Securing your Asterisk@Home server)


4.3 Configuring an extension

1) Use a pc on your network that has a web browser and connect to your Asterisk@Home box using HTTP://PutYourAsterisk@HomeIpaddressHere.

Screenshot of main screen.
Image

2) Click on Asterisk Management Portal and then click setup.

Note: If you are using Asterisk@Home v2.8 or later, or freePBX, you will need to install and enable the various configuration modules. This can be done in the Setup/Module Admin screen.

3) Click Extensions then Add Extension.
Image

4) Select the type of extension.
  • A. SIP = Session Initiation Protocol
    • 1a) Use the default extension 200 and type in a password for registration like "abc123". The password box is actually the Secret box, aka. 'Extension Password', and it doesn't * out the password entered. After that, enter the name of the person using this extension.
    • 2a) Go down to the voicemail section, select enable, and enter a voicemail password. Use something you can type on a phone keypad like '1234'. Enter an e-mail address where you would like your voice messages sent and click add extension. Then click on the red apply bar at the top of the screen.
    • 3a) Set up a phone for this extension. Get a SIP phone, an X-Ten soft phone is good for testing. See the section on the X-Ten phone. remember to use your extension and extension password.
    • 4a) Make a call from your phone. (try *45 this is a local echo test) (correction *43)
  • B) IAX2 = Inter Asterisk Transport version 2
  • C) ZAP = PSTN based hardware providing FXO/FXS operations
  • D) Custom = Used for special types of extensions
    • 1d) To create a custom extension which calls an external number enter the extension number for the new extension, 1234 will work nicely.
    • 2d) Enter the display name for the extension, "Joe's Cell Phone" will do nicely for this
    • 3d) Skip down to the "Dial" field. Enter the dial details in this format: TYPE/NUMBER@TRUNK OR TYPE/TRUNK/NUMBER. For example: SIP/5555551212@telasip-gw or ZAP/4/5555551212 (both formats seem to work)
    • 4d) Click Submit. Click the Red Bar that appears at the top of the screen
    • 5d) Try calling your new extension.

There appears to be a problem defining a custom extension (AAH ver 2.6). To have an extension call an outside number, create a custom extension with the following dial string

Local/phonenumber_to_call@outbound-allroutes

eg A call to a UK phone might use the following dial string:

Local/01144xxxxxxxxx@outbound-allroutes

Here is a discussion about this issue:

http://sourceforge.net/forum/forum.php?thread_id=1434318&forum_id=420324


4.4 Configuring a trunk for outbound and inbound calls

Using AMP (user: admin, pass: password) (A@Hv1.5 user: wwwadmin) select setup then trunks. Click on the type of trunk you want to create. See the VOIP Service Providers section for how to configure a trunk for your provider. See Example 6 for IAX trunking to a non A@H 2.5 host.




4.5 Configuring Outbound Routing

Next you need a route to allow calls from your phones to go out on a trunk. If you have more than one trunk you can set up rules to determine how a trunk is chosen for each call. Here we will set all calls to go out one trunk.


Using AMP (user: admin, pass: password) (A@Hv1.5 user: wwwadmin) select setup then Outbound Routing. Type in a name for your route. Then enter the following in the dial pattern box.


1NXXNXXXXXX
NXXNXXXXXX
NXXXXXX


This will set all calls to use this route.

Next go to the Trunk Sequence section. Drop down the box and select the trunk you configured earlier. Click add.

That's it. Click Submit Changes and then click on the red apply bar at the top of the screen.

Try dialing a number on your phone like 19197543700 (RedHat customer support) and you should hear "Welcome to RedHat"

In South America, we use 00+country+areacode+number but USA use 011+country+areacode+number

To replace the 011 and start dialing with 00 and have the ability to dial local numbers, you have to add the Outgoing Dial Rules in your trunk:

Outgoing Dial Rules for the trunk voip:
1+NXXNXXXXXX ; this is to call to USA
011+N. ; this is to call to rest of the world
0115935+2XXXXXX ; this is for local dialing at my area
011593+NNXXXXXX ; this is for regional calls at my country


Next, create 3 outbound routing (localdialing, USA, restoftheworld)

For localdialing:

Dial Patterns:

0|2XXXXXXX
0|3XXXXXXX
0|4XXXXXXX
0|5XXXXXXX
0|6XXXXXXX
0|7XXXXXXX
0|8XXXXXXX
0|9XXXXXXX ; this if for mobile
2XXXXXX ; this is for dialing local city numbers


Trunk Sequence:

voip


for USA:
Dial Patterns:

001|NXXNXXXXXX
001|800XXXXXXX ; toll free numbers


Trunk Sequence:

voip


For restoftheworld :
Dial Patterns:

00|Z.


Trunk Sequence:

voip


4.6 Configuring Incoming Calls

Next you need a route to allow calls from your provider to go someplace. Using AMP (user: maint, pass: password) select setup then Incoming Calls. Under the Send Incoming Calls from the PSTN to: section drop down the box next to Extension: and select the extension 200 you created earlier.

Click Submit Changes and then click on the red apply bar at the top of the screen.

Call the phone number from your provider with a cell phone or other non-IP phone. Your SIP phone at extension 200 should ring.


4.7 Configuring the digital receptionist


Go to the setup-digital receptionist page.
digit your extension number (ie. the number of the phone you are going to use to record the message for the receptionist).

Give a name to your menu (ex. business_hours) and write the text of the message in the box below, so when recording you'll "only" have to read.

By default you can give # as an option to access the directory or dial the extension wanted you know it.
Remember: you have to use options numbered 1, 2 3 and so on, not real extensions (ie: ... dial 3 for the marketing ... dial 550 for the marketing is wrong).

a good(tm) example would be:

Welcome to Acme! Thank you for your call. Dial the extension number if you know it or dial 1 to talk with administrators, 2 for the tech zone, 3 for the store, 4 to talk with an operator or 5 to leave a message in our mailbox. dial # to access the directory. Or zero for an operator. Thank You.

Note: you can have 2 digital receptionists, one for business hours and one for night hours.
ex: Welcome to Acme! Thank you for your call. Our offices are open from 8 to 5, Dial 1 to talk 24/24 support 5 to leave a message in our mailbox. Thank you.

dial *77 and record your message.
you can listen to your just recorded message via *99.
repeat until satisfied and press continue.

Insert the number of options you gave on the messages (in the example 5, dial extension and # does not count) and press continue.

now associate every option with the corresponding action ... (ex. 1 goes to extension 545, 2 to the queue 600, 3 to the ring group 650, 4 to 211 and 5 211's mailbox).

press continue and your first digital receptionist is created. now go to the setup-incoming-call and associate this digital receptionist to wanted incoming calls.


4.7.1 How to connect a caller to a default extension when one is not chosen

Currently when caller does not make a choice from the options the call is disconnected after second message. To send the caller to a default extension, add the letter "t" to the Digital Receptionist ---> Options for Menu ---> Dialed Option # ----> "T" ----> Then the extension you want the caller to be sent to.

4.8 Trunking two Asterisk@Home Servers

There are many ways to trunk two asterisk servers together that offer different features and ability. Below is one such configuration using IAX2.

Assumptions:
  • The two Asterisk@Home servers are named: SystemA and SystemB
  • SystemA uses 2XX series extensions
  • SystemB uses 3XX series extensions

SystemA Configuration
  1. Add extension 201 (if needed)
  2. Add new IAX2 Trunk:
    1. Trunk Name: systemb
    2. Peer Details:
context=from-internal
host=systemb.ip
qualify=yes
secret=systemb-pass
type=peer
username=systemb-user
    1. User Context: systema-user
    2. User Details:
context=from-internal
host=systemb.ip
secret=systema-pass
type=user
  1. Create outbound route:
    1. Dial Patterns: 3XX
    2. trunk Sequence: IAX2/systemb

SystemB Configuration
  1. Add extension 201 (if needed)
  2. Add new IAX2 Trunk:
    1. Trunk Name: systema
    2. Peer Details:
context=from-internal
host=systema.ip
qualify=yes
secret=systema-pass
type=peer
username=systema-user
    1. User Context: systemb-user
    2. User Details:
context=from-internal
host=systema.ip
secret=systemb-pass
type=user
  1. Create outbound route:
    1. Dial Patterns: 2XX
    2. trunk Sequence: IAX2/systema

Note: Change "systema.ip" and "systemb.ip" to the ip addresses of your respective servers.

At this point, from extension 201, dialing 301, it will trunk through IAX2 to the next extension.

4.9 "Extension Mobility" "Phone Sharing" or "Disconnecting the extension from the phone".

This little AMP custimization allows the administrator to disconnect the extension from the phone. In other words, users can now "Log Into" a phone will all the associated benefits. A good example when this would be great would be when there is a day and night shift using the same phones. The night shift comes in and logs into the same phone that a day shift person had just used. Another example would be a user that skips around your compan's remote sites. They won't have to lug the hard phone with them if all they need to do is log into the nearest hard phone to gain access to their extension.

Another benefit to this custimization is if you have 1 hard phone at work and 1 soft phone on your laptop with the same extension (example x1234). Usually, when the hard phone registers with the asterisk server, the registration would be "stolen" away by the soft phone when the soft phone is started. All incoming calls would go straight to the soft phone. The only way to get around this OTHER than this customization would be to assign your hard phone an extension (example: x12341) and your soft phone an extesion (x12342) and then tie them together with ring group with the extension that you want (x1234). This way both phones will ring if x1234 is called.

AMP fuses the user and the device into an object called an extension. We are going to un-fuse it.

4.9.1 Editing the AMP config file

We have to edit the AMP configuration file. At the CentOS command line, type the following:

nano /etc/amportal.conf

Look for an find the AMPEXTENSIONS= setting. Right now it is set for:

AMPEXTENSIONS=extensions

Change this to:

AMPEXTENSIONS=deviceanduser

Save the file, and restart AMP by typing the following at the CentOS command line:

amportal restart


4.9.2 Configuring our Users and Devices

If you login to AMP, you will notice that instead of the "Extensions" menu option in "Setup", there is now "Devices" and "Users".













Created by: GinelLipan, Last modification: Tue 20 of Sep, 2011 (23:46 UTC) by admin
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+