[asterisk-users] Call back DIALSTATUS is empty
Bharath B. Reddy Bynagari
bynagari at mavensphere.com
Mon Aug 17 13:23:33 CDT 2009
Hi,
Here is my problem. I am trying to get the Status of the call if the user
picked up the phone or not. It is coming as empty. Please help.
Here is my extensions_additional.conf file code:
[multi-dir-callback]
include => multi-dir-callback-custom
exten => _X.,1,Answer
exten => _X.,n,Playback(beep)
exten =>
_X.,n,DeadAGI(agi://127.0.0.1/callback_handler?num2=${EXTEN}&callid=${CALL_I
D}&num1=${num1}&state=${STATE})
exten => _X.,n,Goto(${EXTEN},1)
exten =>
hangup,1,DeadAGI(agi://127.0.0.1/callback_handler?num2=${EXTEN}&callid=${CAL
L_ID}&num1=${num1}&state=${STATE})
; end of [multi-dir-callback]
Here is the code from my mail .pm file:
# main loop for callback
sub callback_handler {
my $loop_count=5;
my $self = shift;
my $call_id = $self->param('callid');
my $ph_num= $self->param('num1');
my $p_num= $self->param('num2');
my $con= $self->{server}{dbi};
my $state=$self->agi->get_variable("stat_vars");
to_log($self, "Inside Callback Handler.", 1);
unless($state) {
#$self->log(1, "Callback Handler State: $state");
$self->log(1,"Callback: $call_id $ph_num $p_num");
#$self->agi->exec("Answer");
my $RESULT=$self->agi->get_variable("DIALSTATUS");
$self->log(1, " Call Status: $RESULT");
my $ChannelStatus = $self->agi->channel_status("");
$self->log(1, "Current Channel Status: $ChannelStatus");
---------------------------
The DIALSTATUS is empty.
But the Channel status is coming as 6.
I have the user decline the call and still not getting any DIALSTATUS????
Thanks a lot in advance.
Thanks
MavenSphere-2-logo-web-orange
Bharath B. Reddy Bynagari
President & CEO
<mailto:bynagari at MavenSphere.com> bynagari at MavenSphere.com
MavenSphere Inc. :: MavenSphere.com
317-590-8275 (p) :: 888-263-0988 (f)
Innovative solutions with a human touch.
Confidentiality Note: The contents of this communication are privileged and
confidential. If you are not the intended recipient of this transmission,
you are hereby notified that distributing, copying, or disclosing this
communication, or reliance on the contents thereof, are strictly prohibited.
If you have received this communication in error, please notify the sender
immediately, then destroy the original and all copies thereof.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090817/bf490b2a/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 4076 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20090817/bf490b2a/attachment-0001.jpeg
More information about the asterisk-users
mailing list