Configuring the Asterisk PBX using the freePBX interface
Posted by Ahsan Tasneem | 4:47 PM | Asterisk, AsteriskNOW, AsteriskNOW GUI, How To, VoIP | 0 comments »Here we will configure Asterisk through the freePBX administrative interface to properly route both incoming and outgoing calls (In this example we have used Callcentric to route both incoming and outgoing call). This guide assumes that you have installed freePBX using either the freePBX package, trixbox or a method of your choice. This guide also assumes that the freePBX install steps were completed properly and that you have administrative access to the freePBX administration interface.
Note: For those who don’t know registration on callcentric.com is free and all these steps can be done once you signup.
We recommend that you read each step through in its entirety before performing the action indicated in the step.
STEP 1
Trunk Configuration
In the context of this guide a trunk is used to route calls between your Asterisk PBX and your desired VSP(Voice Service Provider), in this case Callcentric. In this section we will configure a SIP trunk.
Login to freePBX administrative interface
Click on Setup in top right of page
Click on Trunks in left side navigation
Click Add SIP Trunk in middle of page
Scroll to Outgoing Settings and enter callcentric into Trunk Name field
Copy and paste the following into the PEER Details field:
context=from-pstn
fromdomain=callcentric.com
fromuser=1777MYCCID
host=callcentric.com
insecure=port,invite
secret=SUPERSECRET
type=peer
defaultuser=1777MYCCID
Where 1777XXXXXXX is your Callcentric number and SUPERSECRET is the same password you create when you sign up for you Callcentric account. Optionally you may change it in your preferences.
Scroll down to Registration
Enter your registration string in this format: 1777MYCCID:SUPERSECRET@callcentric.com/1777MYCCID
Where 1777XXXXXXX is your Callcentric number and SUPERSECRET is the same password you create when you sign up for you Callcentric account. Optionally you may change it in your preferences.
Click on Submit Changes to add your new SIP trunk to your Asterisk server
Click on the red bar at the top of the screen to apply the changes you just made
Now you will want to edit your sip_general_custom.conf file and enter, or modify, the following lines:
context=from-pstn
srvlookup=yes
session-timers=refuse
session-expires=180
session-minse=90
session-refresher=uas
If using trixbox this will have to be done through the web interface to edit your config files.
If using freePBX you will need to log in to your server and edit the /etc/asterisk/sip.conf file manually, usually with an editor such as nano.
STEP 2
Outbound Route Configuration
Note: For those who don’t know registration on callcentric.com is free and all these steps can be done once you signup.
We recommend that you read each step through in its entirety before performing the action indicated in the step.
STEP 1
Trunk Configuration
In the context of this guide a trunk is used to route calls between your Asterisk PBX and your desired VSP(Voice Service Provider), in this case Callcentric. In this section we will configure a SIP trunk.
Login to freePBX administrative interface
Click on Setup in top right of page
Click on Trunks in left side navigation
Click Add SIP Trunk in middle of page
Scroll to Outgoing Settings and enter callcentric into Trunk Name field
Copy and paste the following into the PEER Details field:
context=from-pstn
fromdomain=callcentric.com
fromuser=1777MYCCID
host=callcentric.com
insecure=port,invite
secret=SUPERSECRET
type=peer
defaultuser=1777MYCCID
Where 1777XXXXXXX is your Callcentric number and SUPERSECRET is the same password you create when you sign up for you Callcentric account. Optionally you may change it in your preferences.
Scroll down to Registration
Enter your registration string in this format: 1777MYCCID:SUPERSECRET@callcentric.com/1777MYCCID
Where 1777XXXXXXX is your Callcentric number and SUPERSECRET is the same password you create when you sign up for you Callcentric account. Optionally you may change it in your preferences.
Click on Submit Changes to add your new SIP trunk to your Asterisk server
Click on the red bar at the top of the screen to apply the changes you just made
Now you will want to edit your sip_general_custom.conf file and enter, or modify, the following lines:
context=from-pstn
srvlookup=yes
session-timers=refuse
session-expires=180
session-minse=90
session-refresher=uas
If using trixbox this will have to be done through the web interface to edit your config files.
If using freePBX you will need to log in to your server and edit the /etc/asterisk/sip.conf file manually, usually with an editor such as nano.
STEP 2
Outbound Route Configuration
An outbound route sends calls which are dialed in a certain pattern to your desired VSP, in this case Callcentric.
Click on Outbound Routes to configure your Asterisk box to send calls to Callcentric
Enter to-callcentric into Route Name field
Scroll to Trunk Sequence and select the SIP/callcentric trunk from the drop down list
Click on Submit Changes to add your new route to your Asterisk server
Click on the red bar at the top of the screen to apply the changes you just made
STEP 3
Extension Configuration
An extension in this context is an account on your Asterisk PBX which provides an account number which another UA (software or hardware used for calling) can connect to in order to make and receive calls. There are a few types of extensions. Here we will create a SIP extension.
If you have already configured an extension then you may skip this step. Then in the next step (Inbound Route Configuration) you may use your pre-configured extension.
Click on Extensions to add a new extension which will connect to your Asterisk server
Choose SIP as the extension type
Enter 1000 for the extension number
For now we will use a generic identifier for this extension. Enter First Extension for the Display Name field. Later you may enter a unique identifier of your choice
Enter your desired password in the Secret field. You will use this password when configuring your desired UA later in order to connect to your Asterisk PBX
Click on Submit Changes to add your new extension to your Asterisk server
Click on the red bar at the top of the screen to apply the changes you just made
STEP 4
Inbound Route Configuration
Inbound configuration can become extremely complex. With an inbound route you are given the flexibility to send incoming calls to a whole range of destinations. For example you may route an incoming call to a specific extension, to a ring group or to an IVR. In this section we are going to setup an inbound route which will handle ANY incoming calls on ANY number, including emergency numbers, and simply route those calls to a specific extension (1000). Later on you can configure more complex routing schemes.
If you have already configured an extension then you may substitute your pre-configured extension for point 4 below.
Click on Inbound Routes to configure the routing of calls to your Callcentric account
If there isn't a default inbound route called 1777MYCCID / any CID then click on Add Incoming Route. You will first want to fill the DID Number field with your 1777 number. Make sure to leave the Caller ID Number and Zaptel channel blank in order to match any incoming call. This is useful if you wish to receive all calls
Scroll down to Set Destination
Choose First Extension (1000) from the Core dropdown box
Click on Submit Changes to add your new inbound route to your Asterisk server
Click on the red bar at the top of the screen to apply the changes you just made
STEP 5
Configure and test UA
Choose your desired UA.
Use the IP address or hostname for your Asterisk box along with 1000 (the extension created earlier) and password for the 1000 extension to connect to your Asterisk box
Next you will want to try placing test calls to and from your Asterisk PBX using the UA currently connected to your newly created extension (1000).
STEP 6
Click on Outbound Routes to configure your Asterisk box to send calls to Callcentric
Enter to-callcentric into Route Name field
Scroll to Trunk Sequence and select the SIP/callcentric trunk from the drop down list
Click on Submit Changes to add your new route to your Asterisk server
Click on the red bar at the top of the screen to apply the changes you just made
STEP 3
Extension Configuration
An extension in this context is an account on your Asterisk PBX which provides an account number which another UA (software or hardware used for calling) can connect to in order to make and receive calls. There are a few types of extensions. Here we will create a SIP extension.
If you have already configured an extension then you may skip this step. Then in the next step (Inbound Route Configuration) you may use your pre-configured extension.
Click on Extensions to add a new extension which will connect to your Asterisk server
Choose SIP as the extension type
Enter 1000 for the extension number
For now we will use a generic identifier for this extension. Enter First Extension for the Display Name field. Later you may enter a unique identifier of your choice
Enter your desired password in the Secret field. You will use this password when configuring your desired UA later in order to connect to your Asterisk PBX
Click on Submit Changes to add your new extension to your Asterisk server
Click on the red bar at the top of the screen to apply the changes you just made
STEP 4
Inbound Route Configuration
Inbound configuration can become extremely complex. With an inbound route you are given the flexibility to send incoming calls to a whole range of destinations. For example you may route an incoming call to a specific extension, to a ring group or to an IVR. In this section we are going to setup an inbound route which will handle ANY incoming calls on ANY number, including emergency numbers, and simply route those calls to a specific extension (1000). Later on you can configure more complex routing schemes.
If you have already configured an extension then you may substitute your pre-configured extension for point 4 below.
Click on Inbound Routes to configure the routing of calls to your Callcentric account
If there isn't a default inbound route called 1777MYCCID / any CID then click on Add Incoming Route. You will first want to fill the DID Number field with your 1777 number. Make sure to leave the Caller ID Number and Zaptel channel blank in order to match any incoming call. This is useful if you wish to receive all calls
Scroll down to Set Destination
Choose First Extension (1000) from the Core dropdown box
Click on Submit Changes to add your new inbound route to your Asterisk server
Click on the red bar at the top of the screen to apply the changes you just made
STEP 5
Configure and test UA
Choose your desired UA.
Use the IP address or hostname for your Asterisk box along with 1000 (the extension created earlier) and password for the 1000 extension to connect to your Asterisk box
Next you will want to try placing test calls to and from your Asterisk PBX using the UA currently connected to your newly created extension (1000).
STEP 6
Placing Test Calls
You can make a test call to 17771234567, or if you are signed up for one of Callcentric's rate plans you can place a call to a traditional landline or mobile phone by dialing either:
1 + the area code and number for calls to the US
Or
011 + the country code, area code, and number for calls worldwide (you may also use 00 instead of 011).
To test inbound calls from Callcentric to your Asterisk installation, follow the directions listed in this FAQ.
You can make a test call to 17771234567, or if you are signed up for one of Callcentric's rate plans you can place a call to a traditional landline or mobile phone by dialing either:
1 + the area code and number for calls to the US
Or
011 + the country code, area code, and number for calls worldwide (you may also use 00 instead of 011).
To test inbound calls from Callcentric to your Asterisk installation, follow the directions listed in this FAQ.
Note: If you need any assistance or have any doubt, you can get in touch with me @ahsantasneem on Twitter. Don’t hesitate.
I’ll be posting more on Asterisk and FreePBX soon..
I’ll be posting more on Asterisk and FreePBX soon..
Subscribe to:
Post Comments (Atom)
0 comments
Post a Comment