• Photos Photos
  • Linked In Linked In
  • Google + Google +
  • Facebook Facebook
  • Flickr Flickr
  • Vimeo Vimeo

www.gavinwill.me.uk

Photography, IT, Bikes and more.

  • Pages

    • About
    • Blog
    • Contact
    • Home
  • Archives

    • January 2013
    • September 2012
    • August 2012
    • July 2012
    • June 2012
    • May 2012
    • April 2012
    • March 2012
    • February 2012
    • January 2012
    • December 2011
    • November 2011
  • Search:

Posts

  • View Archive

Forwarding Incoming Calls over an Asterisk IAX Trunk.

I needed to find a way of forwarding incoming calls from one Asterisk box over to another Asterisk box. There were restrictions in simply putting the ISDN cards into the new Asterisk box. To do this I had to first connect the boxes with an IAX2 trunk which is easy enough. Once the 2 Asterisk boxes are connected via an IAX2 trunk it was a case of creating a custom extension and to forward incoming calls to this custom extension.

For each incoming number on the first box I had to create a custom extension that corresponded to this incoming number.

Simply editing extensions_custom.conf and adding the following

[custom-5551234]
exten => s,1,Dial(IAX2/TrunkName/5551234,30,r);

[custom-5551234] exten => s,1,Dial(IAX2/TrunkName/5551234,30,r);

This is essentially saying to create a custom extension called custom-5551234 if this extension is called to start the call with priority 1 and to Dial the IAX trunk with a timeout of 30 seconds and to force the generation of the ring tone

Then on the first Asterisk box I created an Inbound Route that stated if there is a call to 5551234 transfer / call 55512334 on the IAX2 Trunk.
This was done with a simple Custom App to dial

custom-5551234,s,1

custom-5551234,s,1

On the second Asterisk box you simply then create and Inbound rule as normal for a direct dial and point the extension to the IVR / Extension / Conference room as requested.

This has worked really well and has proved incredibly reliable.

  • January 3, 2012
  • VOIP
  • 0

Discussion2 Comments

  1. Giovani says:
    April 22, 2012 at 10:39 pm

    Thank you so much! This is very useful

    Reply
  2. Ryan H says:
    October 15, 2012 at 1:40 am

    Hello,

    Thanks for the tip! It helped a lot. However, it took me a few hours to figure out that the trunk on server B has to have peer details set of context=from-trunk. Mine was context=from-internal and it would not work.

    Just wanted to give others a heads up on that.

    Reply
Cancel Reply

Copyright © 2021 www.gavinwill.me.uk.

  • LinkedIn
  • Google +
  • Facebook
  • Flickr
  • Vimeo
Back to Top