[Home]

Summary:ASTERISK-17051: [patch] When a call going out an NT-PTMP port gets rejected, Asterisk crashes
Reporter:Birger "WIMPy" Harzenetter (wimpy)Labels:
Date Opened:2010-12-01 08:54:40.000-0600Date Closed:2011-04-01 18:17:07
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_misdn
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) bt.misdnrej
( 1) issue18408_trunk.patch
( 2) issue18408_v1.8.patch
Description:When a call going out an NT-PTMP port gets rejected, Asterisk crashes.
Comments:By: Richard Mudgett (rmudgett) 2011-03-31 18:15:12

I could not get my setup to crash.  However, I could see the possibility.  The issue18408_xxx.patch files should take care of this particular crash scenario.

By: Birger "WIMPy" Harzenetter (wimpy) 2011-03-31 19:40:31

With the current SVN 1.8 or TRUNK it won't crash on me, neither with nor without the patch.
But I can't get L2 up on a TE i/f from the Asterisk side.



By: Richard Mudgett (rmudgett) 2011-04-01 11:43:19

You might want to investigate the use of the misdn_check_l2l1 application to bring layer 2 up.

mISDN does not bring PTMP layer 2 up until needed.

By: Birger "WIMPy" Harzenetter (wimpy) 2011-04-01 12:48:40

Oh, yes. That "feature"...

By: Digium Subversion (svnbot) 2011-04-01 18:15:43

Repository: asterisk
Revision: 312509

U   branches/1.8/channels/chan_misdn.c

------------------------------------------------------------------------
r312509 | rmudgett | 2011-04-01 18:15:43 -0500 (Fri, 01 Apr 2011) | 22 lines

When a call going out an NT-PTMP port gets rejected, Asterisk crashes.

If a call is sent to an ISDN phone that rejects the call with
RELEASE_COMPLETE(cause: call reject(21), or busy(17)) Asterisk crashes.

I could not get my setup to crash.  However, I could see the possibility
from a race condition between queuing an AST_CONTROL_BUSY to the core and
then queueing an AST_CONTROL_HANGUP.  If the AST_CONTROL_BUSY is processed
before the AST_CONTROL_HANGUP is queued, the ast_channel could be
destroyed out from under chan_misdn.

Avoid this particular crash scenario by not queueing the
AST_CONTROL_HANGUP if the AST_CONTROL_BUSY was queued.

(closes issue ASTERISK-17051)
Reported by: wimpy
Patches:
     issue18408_v1.8.patch uploaded by rmudgett (license 664)
Tested by: rmudgett, wimpy

JIRA SWP-2679

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

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

By: Digium Subversion (svnbot) 2011-04-01 18:17:07

Repository: asterisk
Revision: 312510

_U  trunk/
U   trunk/channels/chan_misdn.c

------------------------------------------------------------------------
r312510 | rmudgett | 2011-04-01 18:17:06 -0500 (Fri, 01 Apr 2011) | 29 lines

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

........
 r312509 | rmudgett | 2011-04-01 18:15:42 -0500 (Fri, 01 Apr 2011) | 22 lines
 
 When a call going out an NT-PTMP port gets rejected, Asterisk crashes.
 
 If a call is sent to an ISDN phone that rejects the call with
 RELEASE_COMPLETE(cause: call reject(21), or busy(17)) Asterisk crashes.
 
 I could not get my setup to crash.  However, I could see the possibility
 from a race condition between queuing an AST_CONTROL_BUSY to the core and
 then queueing an AST_CONTROL_HANGUP.  If the AST_CONTROL_BUSY is processed
 before the AST_CONTROL_HANGUP is queued, the ast_channel could be
 destroyed out from under chan_misdn.
 
 Avoid this particular crash scenario by not queueing the
 AST_CONTROL_HANGUP if the AST_CONTROL_BUSY was queued.
 
 (closes issue ASTERISK-17051)
 Reported by: wimpy
 Patches:
       issue18408_v1.8.patch uploaded by rmudgett (license 664)
 Tested by: rmudgett, wimpy
 
 JIRA SWP-2679
........

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

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