[Home]

Summary:ASTERISK-16873: Channel hangs up when redirected through CLI or AMI
Reporter:Zahir Koradia (zahir_koradia)Labels:
Date Opened:2010-10-26 01:58:39Date Closed:2010-11-22 13:42:11.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:SVN revision 293045:

When a channel is redirected using either CLI or AMI, the channel hangs up. This has been tested for GTalk and SIP channels. Redirecting any of these two channels to console channel, musiconhold, or SIP channel triggers the above bug. The bug has not been tested for other channel combinations.

The same bug was reported once as issue ASTERISK-16838 (by SantaFox), which is no longer accessible on the tracker. Google cache has a copy of it at

http://webcache.googleusercontent.com/search?q=cache:tcBAw2AF69EJ:https://issues.asterisk.org/print_bug_page.php%3Fbug_id%3D18171+asterisk+issue+18171&cd=1&hl=en&ct=clnk

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

*CLI>   == Using SIP RTP CoS mark 5
  -- Executing [1234@default:1] Goto("SIP/1001-00000001",
"online,1111,1") in new stack
  -- Goto (online,1111,1)
  -- Executing [1111@online:1] Answer("SIP/1001-00000001", "") in new stack
  -- Executing [1111@online:2] MusicOnHold("SIP/1001-00000001", "")
in new stack
  -- Started music on hold, class 'default', on SIP/1001-00000001
[Oct 26 12:10:08] NOTICE[21892]: channel.c:4005 __ast_read: Dropping
incompatible voice frame on SIP/1001-00000001 of format ulaw since our
native format has changed to 0x2 (gsm)

*CLI>
*CLI>
*CLI> channel redirect SIP/1001-00000001 onhold,111,1
Channel 'SIP/1001-00000001' successfully redirected to onhold,111,1
*CLI>     -- Stopped music on hold on SIP/1001-00000001
== Spawn extension (onhold, 111, 1) exited non-zero on 'SIP/1001-00000001'

*CLI>


where config is:


[onhold]
exten => _X.,1,MusicOnHold
Comments:By: Leif Madsen (lmadsen) 2010-11-02 08:37:58

You can't access that issue because it has been marked as private at the request of the reporter.

By: Clod Patry (junky) 2010-11-17 00:32:22.000-0600

Just as a note, I tried Richard's patch from the reviewboard as so far so good,the redirect works like before.

https://reviewboard.asterisk.org/r/1013/

By: Digium Subversion (svnbot) 2010-11-22 12:46:38.000-0600

Repository: asterisk
Revision: 295790

U   branches/1.4/apps/app_macro.c
U   branches/1.4/include/asterisk/channel.h
U   branches/1.4/include/asterisk/frame.h
U   branches/1.4/main/channel.c
U   branches/1.4/main/pbx.c

------------------------------------------------------------------------
r295790 | rmudgett | 2010-11-22 12:46:27 -0600 (Mon, 22 Nov 2010) | 46 lines

The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.

To recreate the problem:
1) Party A calls Party B
2) Invoke CLI "channel redirect" command to redirect channel call leg
associated with A.
3) All associated channels are hung up.

Note that if the CLI command were done on the channel call leg associated
with B it works.

This regression was a result of the fix for issue ASTERISK-15731
(https://reviewboard.asterisk.org/r/740/).

The regression affects all features that use an async goto to execute the
dialplan because of an external event: Channel redirect, AMI redirect, SIP
REFER, and FAX detection.

The struct ast_channel._softhangup code is a mess.  The variable is used
for several purposes that do not necessarily result in the call being hung
up.  I have added doxygen comments to describe how the various _softhangup
bits are used.  I have corrected all the places where the variable was
tested in a non-bit oriented manner.

The primary fix is the new AST_CONTROL_END_OF_Q frame.  It acts as a weak
hangup request so the soft hangup requests that do not normally result in
a hangup do not hangup.

JIRA SWP-2470
JIRA SWP-2489

(closes issue ASTERISK-16838)
Reported by: SantaFox
(closes issue ASTERISK-16847)
Reported by: kwemheuer
(closes issue ASTERISK-16873)
Reported by: zahir_koradia
(closes issue ASTERISK-16891)
Reported by: vmarrone
(closes issue ASTERISK-16950)
Reported by: mbrevda
(closes issue ASTERISK-16972)
Reported by: nerbos

Review: https://reviewboard.asterisk.org/r/1013/

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

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

By: Digium Subversion (svnbot) 2010-11-22 13:28:34.000-0600

Repository: asterisk
Revision: 295843

_U  branches/1.6.2/
U   branches/1.6.2/apps/app_macro.c
U   branches/1.6.2/include/asterisk/channel.h
U   branches/1.6.2/include/asterisk/frame.h
U   branches/1.6.2/main/channel.c
U   branches/1.6.2/main/pbx.c

------------------------------------------------------------------------
r295843 | rmudgett | 2010-11-22 13:28:27 -0600 (Mon, 22 Nov 2010) | 53 lines

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

........
 r295790 | rmudgett | 2010-11-22 12:46:26 -0600 (Mon, 22 Nov 2010) | 46 lines
 
 The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.
 
 To recreate the problem:
 1) Party A calls Party B
 2) Invoke CLI "channel redirect" command to redirect channel call leg
 associated with A.
 3) All associated channels are hung up.
 
 Note that if the CLI command were done on the channel call leg associated
 with B it works.
 
 This regression was a result of the fix for issue ASTERISK-15731
 (https://reviewboard.asterisk.org/r/740/).
 
 The regression affects all features that use an async goto to execute the
 dialplan because of an external event: Channel redirect, AMI redirect, SIP
 REFER, and FAX detection.
 
 The struct ast_channel._softhangup code is a mess.  The variable is used
 for several purposes that do not necessarily result in the call being hung
 up.  I have added doxygen comments to describe how the various _softhangup
 bits are used.  I have corrected all the places where the variable was
 tested in a non-bit oriented manner.
 
 The primary fix is the new AST_CONTROL_END_OF_Q frame.  It acts as a weak
 hangup request so the soft hangup requests that do not normally result in
 a hangup do not hangup.
 
 JIRA SWP-2470
 JIRA SWP-2489
 
 (closes issue ASTERISK-16838)
 Reported by: SantaFox
 (closes issue ASTERISK-16847)
 Reported by: kwemheuer
 (closes issue ASTERISK-16873)
 Reported by: zahir_koradia
 (closes issue ASTERISK-16891)
 Reported by: vmarrone
 (closes issue ASTERISK-16950)
 Reported by: mbrevda
 (closes issue ASTERISK-16972)
 Reported by: nerbos
 
 Review: https://reviewboard.asterisk.org/r/1013/
........

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

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

By: Digium Subversion (svnbot) 2010-11-22 13:36:21.000-0600

Repository: asterisk
Revision: 295866

_U  branches/1.8/
U   branches/1.8/apps/app_macro.c
U   branches/1.8/include/asterisk/channel.h
U   branches/1.8/include/asterisk/frame.h
U   branches/1.8/main/channel.c
U   branches/1.8/main/pbx.c

------------------------------------------------------------------------
r295866 | rmudgett | 2010-11-22 13:36:11 -0600 (Mon, 22 Nov 2010) | 60 lines

Merged revisions 295843 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
 r295843 | rmudgett | 2010-11-22 13:28:23 -0600 (Mon, 22 Nov 2010) | 53 lines
 
 Merged revisions 295790 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r295790 | rmudgett | 2010-11-22 12:46:26 -0600 (Mon, 22 Nov 2010) | 46 lines
   
   The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.
   
   To recreate the problem:
   1) Party A calls Party B
   2) Invoke CLI "channel redirect" command to redirect channel call leg
   associated with A.
   3) All associated channels are hung up.
   
   Note that if the CLI command were done on the channel call leg associated
   with B it works.
   
   This regression was a result of the fix for issue ASTERISK-15731
   (https://reviewboard.asterisk.org/r/740/).
   
   The regression affects all features that use an async goto to execute the
   dialplan because of an external event: Channel redirect, AMI redirect, SIP
   REFER, and FAX detection.
   
   The struct ast_channel._softhangup code is a mess.  The variable is used
   for several purposes that do not necessarily result in the call being hung
   up.  I have added doxygen comments to describe how the various _softhangup
   bits are used.  I have corrected all the places where the variable was
   tested in a non-bit oriented manner.
   
   The primary fix is the new AST_CONTROL_END_OF_Q frame.  It acts as a weak
   hangup request so the soft hangup requests that do not normally result in
   a hangup do not hangup.
   
   JIRA SWP-2470
   JIRA SWP-2489
   
   (closes issue ASTERISK-16838)
   Reported by: SantaFox
   (closes issue ASTERISK-16847)
   Reported by: kwemheuer
   (closes issue ASTERISK-16873)
   Reported by: zahir_koradia
   (closes issue ASTERISK-16891)
   Reported by: vmarrone
   (closes issue ASTERISK-16950)
   Reported by: mbrevda
   (closes issue ASTERISK-16972)
   Reported by: nerbos
   
   Review: https://reviewboard.asterisk.org/r/1013/
 ........
................

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

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

By: Digium Subversion (svnbot) 2010-11-22 13:42:10.000-0600

Repository: asterisk
Revision: 295867

_U  trunk/
U   trunk/apps/app_macro.c
U   trunk/include/asterisk/channel.h
U   trunk/include/asterisk/frame.h
U   trunk/main/channel.c
U   trunk/main/pbx.c

------------------------------------------------------------------------
r295867 | rmudgett | 2010-11-22 13:42:03 -0600 (Mon, 22 Nov 2010) | 67 lines

Merged revisions 295866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
 r295866 | rmudgett | 2010-11-22 13:36:10 -0600 (Mon, 22 Nov 2010) | 60 lines
 
 Merged revisions 295843 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.6.2
 
 ................
   r295843 | rmudgett | 2010-11-22 13:28:23 -0600 (Mon, 22 Nov 2010) | 53 lines
   
   Merged revisions 295790 via svnmerge from
   https://origsvn.digium.com/svn/asterisk/branches/1.4
   
   ........
     r295790 | rmudgett | 2010-11-22 12:46:26 -0600 (Mon, 22 Nov 2010) | 46 lines
     
     The channel redirect function (CLI or AMI) hangs up the call instead of redirecting the call.
     
     To recreate the problem:
     1) Party A calls Party B
     2) Invoke CLI "channel redirect" command to redirect channel call leg
     associated with A.
     3) All associated channels are hung up.
     
     Note that if the CLI command were done on the channel call leg associated
     with B it works.
     
     This regression was a result of the fix for issue ASTERISK-15731
     (https://reviewboard.asterisk.org/r/740/).
     
     The regression affects all features that use an async goto to execute the
     dialplan because of an external event: Channel redirect, AMI redirect, SIP
     REFER, and FAX detection.
     
     The struct ast_channel._softhangup code is a mess.  The variable is used
     for several purposes that do not necessarily result in the call being hung
     up.  I have added doxygen comments to describe how the various _softhangup
     bits are used.  I have corrected all the places where the variable was
     tested in a non-bit oriented manner.
     
     The primary fix is the new AST_CONTROL_END_OF_Q frame.  It acts as a weak
     hangup request so the soft hangup requests that do not normally result in
     a hangup do not hangup.
     
     JIRA SWP-2470
     JIRA SWP-2489
     
     (closes issue ASTERISK-16838)
     Reported by: SantaFox
     (closes issue ASTERISK-16847)
     Reported by: kwemheuer
     (closes issue ASTERISK-16873)
     Reported by: zahir_koradia
     (closes issue ASTERISK-16891)
     Reported by: vmarrone
     (closes issue ASTERISK-16950)
     Reported by: mbrevda
     (closes issue ASTERISK-16972)
     Reported by: nerbos
     
     Review: https://reviewboard.asterisk.org/r/1013/
   ........
 ................
................

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

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