Forward a call to a mobile phone, with a delay

Posted on 2012-09-06
Last Modified: 2012-09-13
I'm not really familiar with asterisk, and now I have to configure an asterisk server to forward calls to a mobile phone.

Take the following example:

* external phone number: 12345 -> queue shop (this works)
* queue shop -> 101, 102, 103, 104: fixed line voip phones (this works)
* 201 -> mobile phone (0654321)
* when phone call is not answered within 5 rings, let 201 ring as well; 101-104 keep ringing

So in effect these are two questions:

1) How do I forward an internal number (say 201) to another phone number (0654321)
2) How do I delay ringing one specific phone in a queue
Question by:R7AF
    LVL 15

    Expert Comment

    What version of Asterisk & FreePBX are you utilizing ?
    LVL 25

    Expert Comment

    You would have to setup 2 queue's and use a timeout on the first one.  So you call the queue as normal but after X seconds it will timeout and then call the 2nd shop queue which includes the 201 extension and the original shop extensions.

    The 201 extension just has to execute a dial out with an external line to the cell number.

    Exactly how to make these settings will depend on how you have Asterisk setup and what version it is.  Its pretty simple to edit the extensions.conf on a plain Asterisk install but if you are using a GUI setup like freepbx you have to work within the GUI interface.  So that info is really needed to get more specific instructions.  But it is certainly doable.
    LVL 13

    Author Comment

    Thanks for your replies!

    Version: Asterisk 1.4.17, and we don't use the GUI, so I have to edit the extensions.conf.

    @kode99, your suggestion for the two queues and a timeout is probably better, so I'm okay with that.
    LVL 25

    Accepted Solution

    In your extensions.conf you need to find where the shop queue is called and change it.  You probably want to duplicate the existing options.  So you might end up with something like this,

    exten => 100,1,Queue(shop|t|||45)

    You need to put in the '|' so it knows the position for the timeout,  if you have options just duplicate them so that the 45 (or whatever time in seconds you choose)  is the 4th section.  Your current setup may have a timeout so calls get routed back to reception if unanswered,  it just might be very long.
    So what happens is the dialplan hits the Queue command and rings the extensions and stops unit one answers or the timeout hits,  so you just have to add a new line below the first one,

    exten => 100,n,Queue(shopandcell|t|||45)

    If you need exact help on the edit post the section of the dialplan where the queue is being called.

    I believe you can add the SIP channel (or whatever channel you are dialing the cell on) as a member in queues.conf along the lines of without having to setup a extension to do the dialing.  I would suggest trying this on the existing queue to be sure the call is placed properly before editing the dialplan.  

    member => SIP/<cellnumber>@SIPTRUNK

    Be sure to have a original copy of all files you edit just to be safe and test everything after making changes.

    Here's a online reference for the Queue command,

    Lots of Asterisk info at in general.  You just have to watch what version its for as syntax has changed with the newer versions.

    If you want a decent introduction to Asterisk you can download this free book,  Asterisk The future of Telephony

    Its dated with current versions but fairly close to 1.4, I think it was based off 1.2.  How stuff works is still fairly similar in 1.4 with the various configuration files etc.

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
    If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now