[Home]

Summary:ASTERISK-04325: ${DIALSTATUS} broken
Reporter:Brian Fertig (docelm0)Labels:
Date Opened:2005-06-02 11:28:55Date Closed:2005-06-15 20:42:04
Priority:TrivialRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:This variable isnt working.  The serverity is trivial cause its important to me but may not be to others.  Can someone look into this and see if it can be fixed?
Comments:By: Michael Jerris (mikej) 2005-06-02 11:42:51

Can we have a little more information here than it's not working.  Can you give us a verbose output of a failed dial followed by a noop of dialstatus.

By: Brian Fertig (docelm0) 2005-06-02 11:47:21

I am using PHP to pull the VAR which worked before.  Same config and everything.  Problem now is that when I try to pull the VAR I get NULL.  This is a dump of the NoOp for ${DIALSTATUS} ${ANSWEREDTIME} ${DIALEDTIME}

I have looked in app_dial.c and cant seem to find any problems but Im not a full c delveloper..  Thanks for your help!


   -- SIP/planet-0c5a answered SIP/12345-2756
   -- Attempting native bridge of SIP/12345-2756 and SIP/planet-0c5a
   -- AGI Script Executing Application: (NoOp) Options: ((null))
   -- AGI Script Executing Application: (NoOp) Options: ((null))
   -- AGI Script Executing Application: (NoOp) Options: ((null))
   -- AGI Script astlcr.php completed, returning 0
 == Auto fallthrough, channel 'SIP/12345-2756' status is 'ANSWER'

By: Michael Jerris (mikej) 2005-06-02 20:03:16

I would like to see the same details of verbose on a call, when done not in AGI.  Can you also narrow down the date this broke by checking out different days code from CVS.

By: Clod Patry (junky) 2005-06-13 11:45:33

docelm0, we need feedback here.

I'd like to see a NoOp of ${DIALSTATUS} ${ANSWEREDTIME} ${DIALEDTIME} directly in the dialplan.

And apparently you always getting null, so isnt just ${DIALSTATUS}.

Plus, like you using an AGI, can you paste that AGI part?
The more informations you can give to us, the more help we can give.

And directly from dialplan: i've:
   -- Executing Dial("SIP/157-79c4", "SIP/155|3000|g") in new stack
   -- Called 155
   -- SIP/155-ef84 is ringing
   -- SIP/155-ef84 answered SIP/157-79c4
   -- Attempting native bridge of SIP/157-79c4 and SIP/155-ef84
   -- Executing NoOp("SIP/157-79c4", "ds=ANSWER") in new stack
   -- Executing NoOp("SIP/157-79c4", "at=2") in new stack
   -- Executing NoOp("SIP/157-79c4", "dt=3") in new stack


which seems logic to me.



By: Clod Patry (junky) 2005-06-15 11:46:26



By: lancey (lancey) 2005-06-15 19:45:58

Look at the last line of docelm0 log:
== Auto fallthrough, channel 'SIP/12345-2756' >>status is 'ANSWER'<<

So i assume the variables are OK, it might be his AGI not calling NoOp appropriately. I will now test this with PHP and Perl AGIs and report back here.



By: lancey (lancey) 2005-06-15 20:36:27

Extension
=========
exten => 911,1,Dial(SIP/supp1,,Hg)
exten => 911,2,AGI(vartest.php)
exten => 911,3,AGI(vartest.pl)


vartest.php
===========
#!/usr/bin/php -q
<?php
 set_time_limit(30);
 require('phpagi.php');

 $agi = new AGI();

 $temp = $agi->get_variable("DIALSTATUS");
 $agi->exec("NoOp",$temp['data']);
 $temp = $agi->get_variable("ANSWEREDTIME");
 $agi->exec("NoOp",$temp['data']);
 $temp = $agi->get_variable("DIALEDTIME");
 $agi->exec("NoOp",$temp['data']);
?>


vartest.pl
==========
#!/usr/bin/perl
use Asterisk::AGI;
use POSIX;

$AGI = new Asterisk::AGI;
my %input = $AGI->ReadParse();

$AGI->exec('NoOp',$AGI->get_variable('DIALSTATUS'));
$AGI->exec('NoOp',$AGI->get_variable('ANSWEREDTIME'));
$AGI->exec('NoOp',$AGI->get_variable('DIALEDTIME'));


Results
=======
  -- SIP/supp1-796c is ringing
   -- SIP/supp1-796c answered IAX2/support@10.10.10.124:4569-4
   -- SIP Seeding peer from astdb: 'supp1' at supp1@10.10.10.4:5060 for 3600
   -- Executing AGI("IAX2/support@10.10.10.124:4569-4", "vartest.php") in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/vartest.php
   -- AGI Script Executing Application: (NoOp) Options: (ANSWER)
   -- AGI Script Executing Application: (NoOp) Options: (3)
   -- AGI Script Executing Application: (NoOp) Options: (8)
   -- AGI Script vartest.php completed, returning 0
   -- Executing AGI("IAX2/support@10.10.10.124:4569-4", "vartest.pl") in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/vartest.pl
   -- AGI Script Executing Application: (NoOp) Options: (ANSWER)
   -- AGI Script Executing Application: (NoOp) Options: (3)
   -- AGI Script Executing Application: (NoOp) Options: (8)
   -- AGI Script vartest.pl completed, returning 0


Everything *IS* working.

docelm0, the fault is obviously in your AGI, calling NoOp with no parameters (as I see from your logs). Please paste your AGI here if you want some help :)

Someone close this bug!

By: Michael Jerris (mikej) 2005-06-15 20:40:40

This appears to be an issue with your AGI script as others are able to test with no problem.  Please see a bug marshall on IRC in #asterisk-bugs if you still beleive this is an asterisk bug.  Thanks.