[Home]

Summary:ASTERISK-08985: Coding problem or a bug in Asterisk(AGI)
Reporter:hamed (hamy)Labels:
Date Opened:2007-03-11 05:12:27Date Closed:2011-06-07 14:02:47
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I have a little DEADAGI script written in PERL that dials destination:
Code:
$dialstr = $type."/$dest@".$ip."|60"
$res = $AGI->exec("DIAL $dialstr");
$result=$AGI->exec('NoOp',$answeredtime=$AGI->get_variable('ANSWEREDTIME'));

if for some reason $answeredtime=0 then we dial it again:
Code:
$dialstr = $type."/$dest@".$ip2."|60"
$res = $AGI->exec("DIAL $dialstr");
$result=$AGI->exec('NoOp',$answeredtime2=$AGI->get_variable('ANSWEREDTIME'));

it works and the call goes to the second provider. The problem is that $answeredtime2 is always null or empty. I have tried everything but can not get the answeredtime for the second dial attempt.
Is this a bug or is it a coding problem. Please advise.
Thank you in advance.
Comments:By: Tilghman Lesher (tilghman) 2007-03-11 11:15:36

The problem is that you're using DeadAGI.  You should NEVER (ever, ever, ever) use DeadAGI for a Dial.  Ever.  Use AGI for that.

By: hamed (hamy) 2007-03-11 16:54:41

Thank you for your answer. Using AGI now and the same happens. The second dial attempt works but the channel variables are missing.



By: hamed (hamy) 2007-03-11 17:14:15

I was using $AGI->verbose. That was messing with the variables. Using AGI and no $AGI->verbose I get the correct variables.
Thank you again.