Getting started with FreePBX – 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!

No related posts.

elmohem:
I did what in this tutorial but my extension ringing and when answer the call is disconnect directly.
17 June 2009, 10:09 amHow to solve this problem?
Elmohem
matt:
It could be that the voice stream is being blocked by a firewall (UDP port 5060) or that NAT is messing things up. Do you know if your Asterisk server or Extension is behind a NAT router?
17 June 2009, 12:18 pmAv:
I did what in this tutorial but my extension is not ringing, I couldn`t hear no sound. Please help me out here.
7 February 2010, 12:35 amThanks
matt:
I’m afraid it’s difficult to say without any more info. Are you using a ditro or did you install Asterisk/FreePBX yourself? Could it be iptables/firewall blocking the traffic? Can you make extension to extension calls?
7 February 2010, 2:03 pmAv:
Hi Matt,
Thanks for the quick reply, Now I made it work. not with ipkall, but the same number which I used in Trunk. So now I am using same number for Inbound and Outbound Call for callback. when I dial the DID number, it says “the person is busy, leave message“, when I hung up then I am getting my call back but I wanted to hear busy tone instead so I wont get charge. Is there any way to hear busy tone instead message. Sorry for my bad english
Thanks again
7 February 2010, 8:38 pmmatt:
do you have voicemail turned on for the extension the calls are going to?, and how are you doing the callback? with the FreePBX callback module?
10 February 2010, 8:20 pm