[Home]

Summary:ASTERISK-04302: [patch] Asterisk crashes when forget the last ) in dial
Reporter:Clod Patry (junky)Labels:
Date Opened:2005-05-30 11:53:01Date Closed:2011-06-07 14:00:50
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Applications/app_dial
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) dial.txt
Description:in the dialplan, if you have:
exten => 39999,1,Dial(Zap/g1/5145245145|20|G(test_sip^1002^1)

your asterisk will crashes. I know it misses the last ), but sometimes, that last char could be forgetten.

CLI's output:
   -- Executing Dial("SIP/154-85c5", "Zap/g1/5145245145|20|G(test_sip^1002^1") in new stack
May 30 12:16:42 WARNING[28414]: app_dial.c:826 dial_exec_full: Could not find exten to which we should jump.


and the backtrace:
(gdb) bt
#0  0x4018b793 in strchr () from /lib/libc.so.6
#1  0x4095843b in dial_exec_full (chan=0x81c4050, data=0xbd5fd6e4, peerflags=0xbd5f94c8) at app_dial.c:829
#2  0x4095ac85 in dial_exec (chan=0x81c4050, data=0xbd5fd6e4) at app_dial.c:1363
#3  0x08085652 in pbx_exec (c=0x81c4050, app=0x81cb940, data=0xbd5fd6e4, newstack=1) at pbx.c:552
#4  0x08089286 in pbx_extension_helper (c=0x81c4050, con=0x0, context=0x81c41a0 "test_sip", exten=0x81c4294 "39999",
   priority=1, label=0x0, callerid=0x81ce7f8 "154", action=1) at pbx.c:1642
ASTERISK-1  0x0808a8f0 in ast_spawn_extension (c=0x81c4050, context=0x81c41a0 "test_sip", exten=0x81c4294 "39999", priority=1,
   callerid=0x81ce7f8 "154") at pbx.c:2230
ASTERISK-2  0x0808ae3f in __ast_pbx_run (c=0x81c4050) at pbx.c:2296
ASTERISK-3  0x0808bd62 in ast_pbx_run (c=0x81c4050) at pbx.c:2517
ASTERISK-4  0x0808bbd9 in pbx_thread (data=0x81c4050) at pbx.c:2479
ASTERISK-5  0x40026e51 in pthread_start_thread () from /lib/libpthread.so.0
ASTERISK-6 0x401ee6ea in clone () from /lib/libc.so.6
(gdb)



And with that patch:
May 30 12:41:52 WARNING[730]: app_dial.c:826 dial_exec_full: Could not find exten to which we should jump.
May 30 12:41:52 WARNING[730]: app_dial.c:834 dial_exec_full: Goto flag set without trailing ')'


But when the person answered, no transfer will be made.

Do we want a patch with the transfer occurs even if the last char isn't present?


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

Disclaimer on file
Comments:By: Michael Jerris (mikej) 2005-05-30 12:57:05

I think if we have bad configuration syntax, it should warn on load.  It does not have to work if the syntax is wrong.

By: Clod Patry (junky) 2005-06-02 06:58:47

Then, this patch is correct, cause we saw a message and both parties aren't transfered to the place specified in G.

By: Mark Spencer (markster) 2005-06-02 13:09:00

Fixed in CVS head.

By: Clod Patry (junky) 2005-06-12 10:03:34

Can we get fixed in stable too to finally close that ticket.

By: Russell Bryant (russell) 2005-06-13 09:56:57

Do you know if this is an issue in 1.0?  The code is very different.



By: Clod Patry (junky) 2005-06-13 12:09:26

I'll give a try with stable branch soon, but like im running HEAD everywhere, i just need to find free time.



By: Russell Bryant (russell) 2005-06-13 16:22:03

After some testing, this does not appear to be an issue in 1.0.

junky: If you see any problems, feel free to re-open the bug.

Thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:36:43.000-0600

Repository: asterisk
Revision: 5812

U   trunk/apps/app_dial.c

------------------------------------------------------------------------
r5812 | markster | 2008-01-15 15:36:42 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix dial to not seg when closing ')' is missing (bug ASTERISK-4302)

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

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