Making a Two Step Dialing Route and Trunk

Here’s a basic template for making a two-step dialing route and trunk. This will undoubtedly need some tweaking with regard to timeouts, etc. and it may not be the most efficient way to do this, but it should work in many situations:

Make some test calls and note any required timeouts or additional digits
Make a few test calls and note any time delays, dialing prefixes or suffixes required, etc. For example, one service is said to require you to make a language selection, then wait a few seconds before dialing the number.

Create a context in extensions_custom.conf
This is just a small four-line context that you will add at the bottom of extensions_custom.conf. The second line is for debugging/logging purposes only but if you remove it, don’t forget to renumber the other lines. The third line is the real “meat” of the context. Your context should look like this:

[servicename]
exten => _X.,1,NoOp(Number originally dialed was ${EXTEN})
exten => _X.,2,Dial(Local/19995559999@outbound-allroutes,,D(wwwwww${EXTEN}))
exten => _X.,3,Hangup

“servicename” is just a name for your context that doesn’t duplicate any other context name. Replace 19995559999 with the number you would dial from a local extension to access the international calling service. The wwwwww${EXTEN} means wait three seconds and then dial the number you want to call. That may need to be tweaked. For example, let’s say that in your testing you found that you had to wait one second, dial either “1″ or “2″ to make a language selection, wait one more second, and then dial the number you want to call. In that case, you’d use ww1ww${EXTEN} (although I’d throw in an extra w or two in case the system is busy and a little slow on the uptake from time to time).

Create a Custom Trunk in FreePBX
This is drop-dead simple (only wish it had been simple to figure out). Normally the only thing you will need to do here is create a new custom trunk and leave everything blank except the Custom Dial String field, which should look like this:

Local/$OUTNUM$@servicename

Note that “servicename” is the same context name you used in step 2 – the rest of the line can be copied and pasted verbatim. Although I haven’t tried entering anything in any of the other trunk-specific fields, I would imagine that they could be used normally – for example, to strip or add prefixes from the dialed number. For example, if you’re in a country where you dial 00 in front of an international call, and you’re sending this to a U.S. based service, you’ll want to strip the 00 and then add 011.

Create an Outbound Route to send calls to your trunk.
When creating a route, about the only thing you will need to do is enter appropriate dial patterns that will be allowed to access the trunk you created in step 3. For example, if you are in the United States and you are using a service that allows calls to anywhere in the U.K., you’d simply put something like
01144.
as a dial pattern. Of course, the service you use may not allow calls to high-cost numbers (e.g. mobiles) so it may get more complicated. Creating dial plans is beyond the scope of this article, but just remember when you are finished with the dial plan to select your newly-created custom trunk at the bottom of the screen, and don’t forget to click the red bar so all your changes take effect.

Read More : voip-info.org

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • BlinkList
  • blogmarks
  • Blogosphere News
  • connotea
  • LinkaGoGo
  • LinkedIn
  • Live
  • MyShare
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Webnews.de
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Related posts:

  1. Tips to Use The Phone Line from Between Two Different Servers FreePBX
  2. How to Setup IP Phone SPA901 and SPA921
  3. Problem with No trunks in FOP
  4. Rebuilding VideoLan Client with PVR Support
  5. Easy Way to Improve the Speed of Firefox 3

Leave a Reply