找回密码
 注册

QQ登录

只需一步,快速开始

查看: 701|回复: 5

Getting started with FreePBX

[复制链接]
发表于 2011-11-13 04:40:21 | 显示全部楼层 |阅读模式
Part 1 Setting up a trunk

In this series of articles I will run through how to get started once you get FreePBX setup. You will need to run through the articles in order as some of the later ones will rely on items set up in earlier articles.
For a trunk (required to make calls to the outside world) I will use callwithus. Click here for a free account.
Adding a trunk
The main FreePBX menu is down the left hand side of the screen
Click Trunks


This will bring up the “Add a Trunk” page
Now there is a sub-menu on the right and side of the page. Click “Add Trunk” there.
Now click “Add SIP trunk”

Give the trunk a name in the “Trunk Name” box
Enter your callwithus details in the “PEER Details” box as shown below. Obviously using your account number and secret (password)
Enter the register string in the “Register String” box as show below, again using your username:password (they are separated by a colon)
And the click “Submit Changes”

***  PLEASE NOTE – YOU SHOULD NOW BE USING ‘sip.callwithus.com’ RATHER THAN ‘uk.callwithus.com’  ***
Whenever you submit any changes in FreePBX you then have to click on the “Apply Configuration Changes” before the settings will take effect

We can now check that everything looks good with our trunk
Click on the “Tools” tab at the top of the main menu
Click on “Asterisk Info” in the main menu

Now click on “Sip Info” on the right hand menu and we should be able to see our trunk registered

And that should be our trunk setup and ready to use.
In the next article we will setup an extension so we can try making some calls via our trunk


 楼主| 发表于 2011-11-13 04:41:23 | 显示全部楼层
Part 2 Setting up an extension

So we’ve got our trunk setup and now we need an extension so we can make a test call via the trunk.
For testing I’m going to be using x-lite.  A free sip softphone available for Windows and Linux from here.
Adding an extension in FreePBX

First we need to click on Extensions on the left hand main menu


Now we can click on “Submit” to add a “Generic Sip Device”

This page is too big to fit on a single screenshot but there are only a couple of things we need to change to get a basic extension
First enter a “User Extension” – I called mine 1000
Next enter a “Display Name” – I used the same as above but you could enter a real persons name if reuiqred

Now scroll down and enter a secret. This is going to be the password for the extension and you really want to have one, especially if you’re connected to the internet

And that’s all we need so scroll further down and click on “Submit”

Now, as always, we need to click on the orange “Apply Configuration Changes” for the extension to take effect

Configuring X-lite
Now we’re going to configure our softphone. I’m using x-lite that you can download using the link at the top of the page. I’m using the Windows version, the Linux configuration screens look a little different
Right click on the display part of the screen and you should see an option called “SIP Account Settings…”

Next click on “Add…” so we can enter our extension account settings

Now we enter our extension details as below. You will need to -
- replace 1000 with the extension number you created
- replace Password with the secret you chose above
- replace Domain with the IP address or DNS name of you Asterisk server
- replace proxy with the IP address or DNS name of you Asterisk server
And click on Ok

And that’s it! Now, if you dial *65 Asterisk should read back your extension number to you

We probably can’t the outside world just yet as we need an Outbound Route. That will be in the next article  


 楼主| 发表于 2011-11-13 04:42:18 | 显示全部楼层
Part 3 Making external calls
This article assumes you have completed part 1 and part 2
So we have configured our trunk and our extension and now we need to tell FreePBX to use that trunk when someone dials a number. This is done by creating an Outbound Route.
The configuration below also takes in to consideration the fact that I am in the UK and that callcentric is a US company. Your setup may differ.
Creating an outbound route
First we need to click on “Outbound Routes” in the main menu on the left hand side of the screen


Now we need to create the route. Give it a name – I’ve called mine “external”
Now we need to enter a “Dial Pattern”. This is what decides if this route is used or not.  You can hover your mouse over “Dial Patterns” to get a description.
I have entered “0.” as my dial pattern. This means that if an extension/user dials any number beginning with 0 (zero) it will use the trunk selected.
Now select “SIP/callwithus” to be your destination trunk and click “Submit Changes”

Now, because I’m in the UK I’m going to create a “Dial Rule” on my trunk. So click on “Trunks” on the left hand menu and select our trunk “SIP/callwithus” on the right hand menu.
I’ve created 1 rule and this is what it does -
0044+0|Z.  – if someone dials a number that starts with 0 followed by another number that’s not a 0 then remove the first zero and adds 0044 to the front of the number. Basically this turns a local UK number into the international equivalent. So “0800 123 4567″ becomes “0044 800 123 4567″.  I need this because callwithus is a US based provider and needs to be told to dial a UK number as an “International” number.

Scroll down to the bottom and click “Submit Changes”

Now you should be able to go to your extension and dial an external number. Either a national UK one or an international  number, by using 00 as the international prefix


 楼主| 发表于 2011-11-13 04:43:15 | 显示全部楼层
Part 4 Setting up a DID number
Now we can make calls to regular telephone number via our trunk we want to setup a DID (Direct Inward Dial) number so that we can receive calls from people dialing a regular phone number.
For this example I’m going to use a US number from IPKall who will provide a (free) US based telephone number. However, they are only able to do this due to a peculiarity in the law in certain states so I wouldn’t rely on the numbers being available in the future. Perfect for testing though!
Singing up with IPKall
First thing you need to do is sign up for a number by visiting their web site – http://www.ipkall.com
Fill out the details as below -
Sip Phone Number – I’m going to use ’1111′ for now but I will change this once I know what DID number I’ve been assigned
SIP Proxy – This should be the ip address or DNS name of your Asterisk/FreePBX server


Once you get e-mailed your account details log back into the IPKall website

Now, change the “SIP Phone Number” to match the DID you have been assigned (without the dashes)

Setup inbound route in FreePBX
Click on Inbound Routes on the left hand main menu
I used “IPKall” for the description
Enter your IPKall DID number in the “DID Number” box

Scroll down to the bottom of the page and set the destination of the call to the extension you setup in part 2
Now click Submit

Because our Asterisk box is not “Registered” with IPKall Asterisk will treat calls coming from it as “Anonymous”. To allow for this we have to turn on “Allow Anonymous Inbound SIP Calls”
To do this click on General in the main menu and scroll down to the bottom of the page. Here you can set  “Allow Anonymous Inbound SIP Calls” to “yes” and click “Submit Changes”

As always click “Apply Configuration Changes” and give it a go. If you ring you IPKall telephone number your extension 1000 should ring!


 楼主| 发表于 2011-11-13 04:44:30 | 显示全部楼层
Part 5 Setting up an IVR
Setting up an IVR (or auto attendant, digital receptionist) is great idea for small businesses. You can have a single external number for your customers to call but then direct the call to the right department via a simple menu.
First we need some extensions to put the calls through to, then we need to record the menu the caller will hear and finally setup the actual IVR.
Configuring the extensions
Follow the instructions in part 2 to create the extensions that you need. I have created extensions for Sales, Support and Billing


Next we need to install some FreePBX modules that are not installed by default. So click on the “Tools” tab, then on “Module Admin” and finally on “Check for updates online”

We’re going to need the IVR module and maybe the Announcements module so click on “Download and Install” for both of them.

Now scroll to the bottom and click on Process

Confirm that you want to proceed with the installation

Once the install is complete click on Return

Recording the anouncement
Now we are ready to record the IVR anouncement. Plan what you are going to say then click on “System Recordings” in the main menu
Enter the extension number we created in part 2 in the extension number box and click “Go”

From extension 1000 dial *77. You will hear a short beep then say your message (mine said “Hello, press 1 for sales, press 2 for support, press 3 for billing”) and then hangup. You can dial *99 from the extension to listen to your message. If you want to re-record it just dial *77 again.

Now I’m going to give my recording a name – “ivrmenu1″ – and click Save

Creating the IVR
It’s finally time to create the IVR! Click on IVR on the main menu and then clikc “Add IVR” on the right hand menu
Give you IVR a name – I’ve called mine “mainivr”
Select the announcement we created earlier
I’ve also disabled “Enable Directory” and “Enable Direct Dial” on mine as I don’t want callers to be able to bypass the menu

Scroll down the page and we can now set what happens when a caller presses a button.
Click on “Increase Options” once so that we have 4 destinations
Now set your 4 destinations -
1 = Extension Sales
2 = Extension Support
3 = Extension Billing
t = Extension Sales
“t” is a special option that means “timeout”, what happens if the caller doesn’t press a button. In that case I’m going to send them to Sales!
And click Save

Now I’m going to direct the DID I created in part 4 to my IVR
So click on Inbound Routes, slect the IPKall inbound route we create then change the Destination to “mainivr” and click “Submit”

Finally click on “Apply Configuration Changes” and give it a go! You should be able to call your IPKall number and hear your IVR.


 楼主| 发表于 2011-11-13 04:45:55 | 显示全部楼层

Getting started with FreePBX - Part 6 Cheap phone calls using DISA and Callb

Part 6 Cheap phone calls using DISA and Callback
One of the great things about voip is that you can make international calls at local rates.  Combine that with Asterisk/FreePBX and you’ve got the ability to make cheap international phone calls using your mobile phone.
To do this we’re going to setup DISA (Direct Inward System Access). This will enable us to ring our Asterisk server, get a dial tone and then dial back out again.
Then I will show you how you can combine this with callbacks if that works out cheaper for you.
Installing the modules
First we need to install the DISA (if it’s not installed already) and Callback modules. See part 5 for more information about installing FreePBX modules.
Setting up DISA
Now we are going to configure a DISA…
Click on DISA on the left hand main menu
Give your DISA a name- I called mine “testdisa”
Give it a PIN – really important as you don’t want anyone able to make calls while you pay!
and click “Submit Changes”

Now I’m going to use the IPKall DID number I setup in part 4 to call my DISA so I need to change the Inbound Route
So click Inbound Route in the main menu, scroll down to the bottom and change the destination to the new DISA
and click Submit

Now click “Apply Configuration Changes” and give it a go.
Now if you dial your DID number you should get a message saying “Please enter your password followed by the # key”. If you do that you should get another dial tone and be able to make calls as though you were ringing from an internal extension.

Using callback
Sometimes it might be cheaper to get the system to call you back as well as giving you a dial tone to dial out on. That’s simple to setup by modifying what we did above.
First we need to click on the click on the Callback menu on the left hand side
Then give your callback a name – I called mine “testcallback”
Then give it a callback number to call you back on (it might be possible to leave this blank and have it call you back on the number you called in from – if appropriate)
Then set a delay if required
Then set the destination as the DISA we configured earlier, and click Submit Changes

Now we’re going to modify the DID Inbound Route again so click on Inbound Route on the left hand menu and select the “ipkall” inbound route
Here I’m going to do 2 things -
First I’m going to add a “Caller ID Number”. This is because I only want the system to call me back when I dial the DID number. I don’t want it calling me any time anyone calls the number. So I enter my mobile phone number in the “Caller ID Number” box

Secondly I change the destination to the “testcallback” we just created, and click Submit

Finally click on “Apply Configuration Changes” and give it a go!
You should be able to – dial you DID number and get a fast busy tone, hang up, get a call back, enter your DISA password and get another dial tone that you can call back out on.


您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|BC Morning Website ( Best Deal Inc. 001 )

GMT-8, 2026-5-28 12:11 , Processed in 0.020437 second(s), 16 queries .

Supported by Weloment Group X3.5

© 2008-2026 Best Deal Online

快速回复 返回顶部 返回列表