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:[email protected]> [email protected]

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.

 

<<image001.jpg>>

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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Reply via email to