Using Asterisk to alert by phone

How can I use Asterisk to call a number when a certain incoming call dials a specific extension. That is, Asterisk should connect the incoming call to the extension but do a separate dial to the alert number (and not connect it to the incoming call).

Incoming --> Asterisk --> Extension
|
/
alert phone number

Specfically, if an incoming call dials extension 1000, I would need asterisk to dial XXXXXXXXX and maybe just ring that number a few times so that the alert goes through.

Thanks in advance.

Hi,

an agi script called from your dialplan can do all sorts of miracles :smile:

musicman

Yes, these may all be done within the native dial plan of Asterisk. One way to do it would be something along the following (using AEL):

context 1000-and-alert { 1000 => { Dial(SIP/1000&SIP/your#toalert@voipprovider||30); Voicemail(u1000); Hangup(); }; };

Now, if you want an entirely seperate dial command that independently notifies, plays a message while putting the original caller through to 1000 then an AGI is best as you may fork a call and have independent actions within PHP or whatever language you choose.

Isn’t MuppetMaster’s proposed solution going to just ring both numbers? (I don’t write in AEL - but I’m assuming it’s what it looks like). This means if the alerted number answers it by chance, the caller gets connected to them which is not what they were looking for, I don’t believe. (It achieves the alert though - as long as not answered).

Otherwise, as mentioned you could use an AGI script or even just copy a pre-written callfile into the outgoing call queue with a system command, or write the callfile on the fly in the dialplan if you want unique info (e.g. CID in the alert) and then drop into the ougoing queue.

p