[Last Call] Learn how to a build a cloud-first strategyRegister Now


Forward a call to a mobile phone, with a delay

Posted on 2012-09-06
Medium Priority
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
  • 2
LVL 15

Expert Comment

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

Expert Comment

ID: 38374960
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

ID: 38375651
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

kode99 earned 2000 total points
ID: 38378863
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 voip-info.org 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

[Video] Oticon Case Study

Open office environments can create the dynamics for innovation, but they also bring some challenges. With over 1,000 employees in an open office, Oticon needed a solution that would preserve the environment while mitigating disruptive background noises.

Watch how they did it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let’s list some of the technologies that enable smooth teleworking. 
What do we know about Legacy Video Conferencing? - Full IT support needed! - Complicated systems at outrageous prices! - Intense training required! Highfive believes we need to embrace a new alternative.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), 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…

829 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