Bharath B. Reddy Bynagari
2009-Aug-25 20:14 UTC
[asterisk-users] How to detect if the call is being answered by Voice Mail?
Hi, I am pretty new to Asterisk. I am trying to make sure some human being answers the phone not the voice mail machine. How can I programmatically identify that? Here is my Sub: sub DialPhysician { my ($self, $con, $PhysicianPhone, $call_id, $conv_id) = (@_); to_log($self, "Inside Dial Physician", 2); my $DocPhone = "1". $PhysicianPhone; to_log($self, "Values: $DocPhone, $call_id, $conv_id", 2); $self->agi->set_variable("STATE","NEXT"); $self->agi->set_variable("stat_vars","$call_id:$conv_id:$DocPhone"); my $response $self->agi->exec("Dial","Local/$DocPhone\@$out_context/n|20|g"); my $CallStatus = $self->agi->get_variable("DIALSTATUS"); my $ANSWEREDTIME=$self->agi->get_variable("ANSWEREDTIME"); to_log($self, "Physician Call Status: $CallStatus; ANSWEREDTIME: $ANSWEREDTIME", 2); return 0; } Is this not the correct way to do this? Or Are there any other methods? Thanks Bharath B. Reddy Bynagari -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090825/d59f4e22/attachment.htm
Steve Edwards
2009-Aug-25 20:48 UTC
[asterisk-users] How to detect if the call is being answered by Voice Mail?
On Tue, 25 Aug 2009, Bharath B. Reddy Bynagari wrote:> I am pretty new to Asterisk. I am trying to make sure some human being > answers the phone not the voice mail machine. How can I programmatically > identify that?The "best" way is to ask the caller to press a key to continue. Most answering machines have difficulty with this. There are various "answering machine detection" schemes about. Google for Justin Newman and answering machine detection. He's put out some pretty cool tools in the past. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000