[Home]

Summary:ASTERISK-15132: AMD() incorrectly sets AMDCAUSE channel variable
Reporter:Chris Alcorn (cgmchris)Labels:
Date Opened:2009-11-12 17:10:34.000-0600Date Closed:2009-12-02 11:18:46.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_amd
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) silence_0.gsm
Description:If, as SOON as the phone rings (you have to be really quick!) you pickup and hangup as fast as you can (preferably using a button instead of a handset), the AMDCAUSE channel variable is first set to HANGUP and then immediately changed to TOOLONG.

I am calling AMD() from an AGI() script...and my AGI script continues to execute to completion as if the channel was still active (rather than immediately exiting on hangup), if and only if the hangup occurs extremely quickly.  There may be a more severe underlying channel problem that  supersedes AMD().

My "dialpan" is as follows:
$engine->agi->exec('Answer','');
$engine->agi->exec('Background','silence/0');
$engine->agi->exec('AMD','');

The AGI script is launched using AMI and the Originate command.  It may also be note worthy that I am using SIP on both end-points.

****** ADDITIONAL INFORMATION ******

AGI Rx << EXEC AMD
   -- AGI Script Executing Application: (AMD) Options: ((null))
   -- AMD: Local/812425XXXX@outgoing_calls-83c8,1 (null) (null) (Fmt: 64)
   -- AMD: initialSilence [2500] greeting [1500] afterGreetingSilence [800] totalAnalysisTime [5000] minimumWordLength [100] betweenWordsSilence [50] maximumNumberOfWords [3] silenceThreshold [256]
   -- AMD: HANGUP
   -- AMD: Channel [Local/812425XXXX@outgoing_calls-83c8,1]. Too long...
AGI Tx >> 200 result=0
AGI Rx << GET VARIABLE AMDSTATUS
AGI Tx >> 200 result=1 (NOTSURE)
AGI Rx << GET VARIABLE AMDCAUSE
AGI Tx >> 200 result=1 (TOOLONG-0)
Comments:By: Digium Subversion (svnbot) 2009-12-02 11:12:27.000-0600

Repository: asterisk
Revision: 232355

U   branches/1.4/apps/app_amd.c

------------------------------------------------------------------------
r232355 | file | 2009-12-02 11:12:27 -0600 (Wed, 02 Dec 2009) | 5 lines

Fix a bug where if you hung up very quickly after calling AMD it would overwrite the AMDSTATUS of HANGUP with TOOLONG.

(closes issue ASTERISK-15132)
Reported by: CGMChris

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=232355

By: Digium Subversion (svnbot) 2009-12-02 11:14:30.000-0600

Repository: asterisk
Revision: 232356

_U  trunk/
U   trunk/apps/app_amd.c

------------------------------------------------------------------------
r232356 | file | 2009-12-02 11:14:30 -0600 (Wed, 02 Dec 2009) | 12 lines

Merged revisions 232355 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
 r232355 | file | 2009-12-02 13:04:52 -0400 (Wed, 02 Dec 2009) | 5 lines
 
 Fix a bug where if you hung up very quickly after calling AMD it would overwrite the AMDSTATUS of HANGUP with TOOLONG.
 
 (closes issue ASTERISK-15132)
 Reported by: CGMChris
........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=232356

By: Digium Subversion (svnbot) 2009-12-02 11:16:31.000-0600

Repository: asterisk
Revision: 232357

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_amd.c

------------------------------------------------------------------------
r232357 | file | 2009-12-02 11:16:30 -0600 (Wed, 02 Dec 2009) | 19 lines

Merged revisions 232356 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r232356 | file | 2009-12-02 13:06:54 -0400 (Wed, 02 Dec 2009) | 12 lines
 
 Merged revisions 232355 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r232355 | file | 2009-12-02 13:04:52 -0400 (Wed, 02 Dec 2009) | 5 lines
   
   Fix a bug where if you hung up very quickly after calling AMD it would overwrite the AMDSTATUS of HANGUP with TOOLONG.
   
   (closes issue ASTERISK-15132)
   Reported by: CGMChris
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=232357

By: Digium Subversion (svnbot) 2009-12-02 11:17:48.000-0600

Repository: asterisk
Revision: 232358

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_amd.c

------------------------------------------------------------------------
r232358 | file | 2009-12-02 11:17:48 -0600 (Wed, 02 Dec 2009) | 19 lines

Merged revisions 232356 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r232356 | file | 2009-12-02 13:06:54 -0400 (Wed, 02 Dec 2009) | 12 lines
 
 Merged revisions 232355 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r232355 | file | 2009-12-02 13:04:52 -0400 (Wed, 02 Dec 2009) | 5 lines
   
   Fix a bug where if you hung up very quickly after calling AMD it would overwrite the AMDSTATUS of HANGUP with TOOLONG.
   
   (closes issue ASTERISK-15132)
   Reported by: CGMChris
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=232358

By: Digium Subversion (svnbot) 2009-12-02 11:18:45.000-0600

Repository: asterisk
Revision: 232359

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_amd.c

------------------------------------------------------------------------
r232359 | file | 2009-12-02 11:18:45 -0600 (Wed, 02 Dec 2009) | 19 lines

Merged revisions 232356 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r232356 | file | 2009-12-02 13:06:54 -0400 (Wed, 02 Dec 2009) | 12 lines
 
 Merged revisions 232355 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r232355 | file | 2009-12-02 13:04:52 -0400 (Wed, 02 Dec 2009) | 5 lines
   
   Fix a bug where if you hung up very quickly after calling AMD it would overwrite the AMDSTATUS of HANGUP with TOOLONG.
   
   (closes issue ASTERISK-15132)
   Reported by: CGMChris
 ........
................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=232359