[Home]

Summary:ASTERISK-04997: [patch] Crash on app_dial with minimally specified dial parameters
Reporter:John Todd (jtodd)Labels:
Date Opened:2005-09-05 16:30:27Date Closed:2008-01-15 15:47:25.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-dial-crash-jt.txt
( 1) nopeer.txt
Description:Dialing 2233 with the following minimalist dialplan entry in a context causes Asterisk to dump core, and even (on my RH9 machine) crash the entire system.  (So, my test machine is currently off-line and I have to get it rebooted manually since it's wedged for some reason.  Tests 1 and 2 simply dumped core, but test #3 crashed the system.)

exten => 2233,1,Dial(IAX2/)

While I know this is an incorrectly specified Dial string, it should not coredump.  I discovered this issue when trying to use dial with accidentially empty strings as specifiers.  I don't know if this crashes on SIP or other channel types, since my machine is currently off the air...  I am uncertain if this is an IAX issue or a Dial issue, but I'm guessing it's app_dial that is having the problem.

On previous tests that just dumped core, here is the console output:

   -- Executing Dial("SIP/2203-11de", "IAX2/") in new stack
Ouch ... error while writing audio data: : Broken pipe
Warning, flexibel rate not heavily tested!
Segmentation fault (core dumped)
[root@host root]#

Comments:By: Brian West (bkw918) 2005-09-05 16:56:25

This is a bug in chan_iax2 not app_dial.... I know where this fix is let me see if I can find it.

/b

By: Brian West (bkw918) 2005-09-05 16:57:53

Junky has been meaning to add this to the tracker in the past few days.

http://junky.homelinux.org/asterisk/nopeer.txt

/b

By: Clod Patry (junky) 2005-09-05 19:20:29

sorry, was out for the long week-end.
jtodd: that should fix your problem.
Let us know how it works for you.

I discovered that problem at the beginning of last week, when i provided a patch for app_changrab.c, but since that application isn't in the CVS, i said, who really cares, but now it that could help someone, go ahead.

Disclaimer on file.



By: John Todd (jtodd) 2005-09-06 16:28:32

This patch solves the problem and no longer dumps core.

   -- Executing Dial("SIP/2203-7050", "IAX2/") in new stack
Sep  6 21:28:15 WARNING[8712]: chan_iax2.c:7706 iax2_request: No peer given
Sep  6 21:28:15 NOTICE[8712]: app_dial.c:1101 dial_exec_full: Unable to create channel of type 'IAX2' (cause 0 - Unknown)
 == Everyone is busy/congested at this time (1:0/0/1)

By: Kevin P. Fleming (kpfleming) 2005-09-07 16:51:52

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:47:25.000-0600

Repository: asterisk
Revision: 6537

U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r6537 | kpfleming | 2008-01-15 15:47:25 -0600 (Tue, 15 Jan 2008) | 2 lines

handle no-peer-specified-in-dial-string gracefully (issue ASTERISK-4997)

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

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