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

2017-05-25 Thread Mark Wiater



On 5/25/2017 11:11 AM, Tech Support wrote:

I need to be able to tell whether or not the far end extension picked up


might a waitForSilence come in useful here?

--
_
-- 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:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


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

2017-05-25 Thread Tech Support
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-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@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.


Antony.

--
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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- 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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2017-05-23 Thread Antony Stone
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.


Antony.

-- 
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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2017-05-23 Thread Tech Support
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.
Thanks;
John V. 

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Antony Stone
Sent: Tuesday, May 23, 2017 01:39 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 19:20:25, Tech Support wrote:


Isn't it safe to assume that if you've been given an extension number to dial 
after the initial call is answered, then it wasn't answered by an answering 
machine?

The extension might be answered by an answering machine, I suppose, but that's 
not the problem you're talking about (I think).

I would create two contexts:

1. Does AMD and gets called when there is no follow-on extension to dial

2. 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.

> Simply placing the AMD command after the SendDTMF() wasn’t the answer

Why wasn't it the answer?  What happens or doesn't happen when you try this?




-- 
_
-- 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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2017-05-23 Thread Antony Stone
On Tuesday 23 May 2017 at 19:20:25, Tech Support wrote:

> All;
> 
> What I did was add a line in the dialplan that used the SendDTMF()
> application and that worked great. The problem that I’ve run into now is
> that dialing the extension screwed up the answering machine detection. The
> sample context looks something like this.
> 
> [play-audiomsg]
> exten => s,1,AMD
> exten => s,n,ExecIf($["${EXT}" != ""]?SendDTMF(${EXTEN}))
> exten => s,n,Background(${AUDIOMSG})
> exten => s,n,Hangup
> 
> As you can see, it's very simple. Modifying the amd.conf configuration
> wasn’t the answer since I don’t know how long it will take for the
> extension to pick up.

Isn't it safe to assume that if you've been given an extension number to dial 
after the initial call is answered, then it wasn't answered by an answering 
machine?

The extension might be answered by an answering machine, I suppose, but that's 
not the problem you're talking about (I think).

I would create two contexts:

1. Does AMD and gets called when there is no follow-on extension to dial

2. 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.

> Simply placing the AMD command after the SendDTMF() wasn’t the answer

Why wasn't it the answer?  What happens or doesn't happen when you try this?


Antony

-- 
"A person lives in the UK, but commutes to France daily for work.
He belongs in the UK."

 - From UK Revenue & Customs notice 741, page 13, paragraph 3.5.1
 - http://tinyurl.com/o7gnm4

   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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2017-05-23 Thread Tech Support
All;

What I did was add a line in the dialplan that used the SendDTMF() 
application and that worked great. The problem that I’ve run into now is that 
dialing the extension screwed up the answering machine detection. The sample 
context looks something like this.

 

[play-audiomsg]

exten => s,1,AMD

exten => s,n,ExecIf($["${EXT}" != ""]?SendDTMF(${EXTEN}))

exten => s,n,Background(${AUDIOMSG})

exten => s,n,Hangup

 

As you can see, it's very simple. Modifying the amd.conf configuration wasn’t 
the answer since I don’t know how long it will take for the extension to pick 
up. Simply placing the AMD command after the SendDTMF() wasn’t the answer  I 
don’t know how to approach this problem.

 

Thanks;

John V.  

 

 

 

From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Tech Support
Sent: Tuesday, May 16, 2017 03:56 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: Re: [asterisk-users] Automatically dial a number, then an extension

 

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-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@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" <aster...@voipbusiness.us> 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.   


--
_
-- 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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- 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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2017-05-16 Thread Tech Support
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-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@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" <aster...@voipbusiness.us> 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.   


--
_
-- 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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- 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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2017-05-15 Thread Victor Villarreal
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.
>
> --
> _
> -- 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:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>
-- 
_
-- 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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2017-05-15 Thread Tony Mountifield
In article <004201d2cd90$cad754e0$6085fea0$@us>,
Tech Support  wrote:
> 
> 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.   

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
-- 
Tony Mountifield
Work: t...@softins.co.uk - http://www.softins.co.uk
Play: t...@mountifield.org - http://tony.mountifield.org

-- 
_
-- 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:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


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

2017-05-15 Thread Administrator TOOTAI

Le 15/05/2017 à 17:34, Tech Support a écrit :

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;


Hi,

look at option G in dial command

--
Daniel

--
_
-- 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:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users