[asterisk-users] Automatically dial a number, then an extension

Tech Support asterisk at voipbusiness.us
Thu May 25 10:11:44 CDT 2017

    I definitely appreciate your insight on this and I split the context into two contexts, but I still have a problem. That is, after I send the extension digits using SendDTMF( ), I need to be able to tell whether or not the far end extension picked up and I don’t know how to do that. Because of that, the message sometimes gets played while the extension is still ringing.
Thanks Much;
John V.  

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Antony Stone
Sent: Tuesday, May 23, 2017 06:11 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Automatically dial a number, then an extension

On Tuesday 23 May 2017 at 20:01:14, Tech Support wrote:

>     Ok, the purpose of the answering machine detection (AMD) is to 
> determine when the audio file should start playing *after* the call 
> has been picked up. Typically, if a call has been picked up by a 
> person, they say a short greeting, for example "Hello, this is John, 
> how can I help you?" or simply "Hello?" or something similar. If a 
> call has been picked up by an answering machine, usually the message 
> is somewhat longer, maybe
> 10 seconds or so, maybe longer. Ideally, the AMD tries to make sure 
> that the audio file starts right after the greeting is over. It's not 
> exact, but my experience is that it works fairly well. The problem 
> that I am having is that when I also have to dial an extension, the 
> call has already picked up and the AMD will start working immediately 
> after the SendDTMF() even if dialing the extension means that it may 
> ring anywhere from 5 - 20 seconds plus the greeting on the far end. 
> There doesn’t appear to be a way for the AMD to wait until extension 
> gets picked up, either by a human or a machine. So what happens is 
> that the AMD gets confused and the audio file starts playing while the extension is still ringing. I hope this helps.

Okay, so my suggestion still stands:

Create two contexts:

 - one which does AMD and gets called when there is no follow-on extension to dial

 - another which dials a follow-on extension and doesn't do AMD (or at least, not at the start)

Then you choose which context to place the call through depending on whether a follow-on extension has been supplied for that customer's number or not - if there's no follow-on extenstion, use the first context; if there is, use the second one.


BASIC is to computer languages what Roman numerals are to arithmetic.

                                                   Please reply to the list;
                                                         please *don't* CC me.

-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:

More information about the asterisk-users mailing list