Automatically Dial A Number, Then An Extension

Home » Asterisk Users » Automatically Dial A Number, Then An Extension
Asterisk Users 4 Comments

All;

I have an application that dials a list of numbers and then plays a recorded message. My customer uses it to dial a list of customers to confirm their appointment for the next day. No biggie, maybe 25 – 30 calls per day for customers who want the confirmation call. What they need now is a way to dial an extension after the number is dialed and answered. I’ve seen that before, but I just can’t remember where. I was wondering if anyone else has implemented something along these lines. Any insight at all would be greatly appreciated.

Thanks Much;

John V.

4 thoughts on - Automatically Dial A Number, Then An Extension

  • In article <004201d2cd90$cad754e0$6085fea0$@us>, Tech Support wrote:

    That depends on how you are playing the message. If you are doing an Originate, either via the AMI or via a call file, then you dial the outbound call using the Channel parameter, and when the call is answered, it gets attached to the dialplan segment given by your Context, Extension and Priority parameters.

    The dialplan segment at its simplest could be something like this:

    [myplaycontext]
    exten => s,1,Playback(${MESSAGE})
    exten => s,n,Hangup

    You would give:
    Context: myplaycontext Extension: s Priority: 1

    You would need to supply the message filename in the variable MESSAGE in the AMI command or call file (maybe you need _MESSAGE or __MESSAGE when setting).

    But you can make it more complex, and could do something like:

    [myplaycontext]
    … exten => _X!,1,Wait(3)
    exten => _X!,n,SendDTMF(${EXTEN})
    exten => _X!,n,Wait(5) ; how long???
    exten => _X!,n,Playback(${MESSAGE})
    exten => _X!,n,Hangup

    So if your recipient has an extension number configured, instead of giving s as the Extension, you give the extension number.

    Alternatively, you could supply the DTMF to be dialled in a channel variable.

    The problem you will have is that, while for direct lines, you know when to start playing the message, as you can tell when the line has been answered, when dialling an extension number on the answering PBX, you have no way of telling when that extension has been answered and it is safe to play the message. That is why I added the comment “how long???”, as it is just a guess.

    Cheers Tony

  • Hi John,

    I think we need to known how you play the audio to the customers, before we can help you.

    Are you using AMI? Or AGI maybe? Or Call files?

    What Asterisk version do you have?

    El 15 may. 2017 12:35, “Tech Support” escribió:

  • Hey;

    What happens is that a script logs into the AMI and originates a call. When the call is answered, it jumps to a context in the dial plan.

    Thanks Much;

    John V.

    From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Victor Villarreal Sent: Monday, May 15, 2017 12:08 PM
    To: Asterisk Users Mailing List – Non-Commercial Discussion Subject: Re: [asterisk-users] Automatically dial a number, then an extension

    Hi John,

    I think we need to known how you play the audio to the customers, before we can help you.

    Are you using AMI? Or AGI maybe? Or Call files?

    What Asterisk version do you have?

    El 15 may. 2017 12:35, “Tech Support” escribió:

    All;

    I have an application that dials a list of numbers and then plays a recorded message. My customer uses it to dial a list of customers to confirm their appointment for the next day. No biggie, maybe 25 – 30 calls per day for customers who want the confirmation call. What they need now is a way to dial an extension after the number is dialed and answered. I’ve seen that before, but I just can’t remember where. I was wondering if anyone else has implemented something along these lines. Any insight at all would be greatly appreciated.

    Thanks Much;

    John V.

LEAVE A COMMENT