Summary: | ASTERISK-18089: Using comment ;--- causes dialplan corruption | ||
Reporter: | Kilburn (maddog) | Labels: | |
Date Opened: | 2011-07-05 00:02:20 | Date Closed: | 2011-07-11 14:39:05 |
Priority: | Major | Regression? | |
Status: | Closed/Complete | Components: | Core/Configuration |
Versions: | 1.8.4 | Frequency of Occurrence | Constant |
Related Issues: | |||
Environment: | Gentoo 2.6.36 dadhi 2.4.1.2 Samgoma B600 Wanpipe 3.5.20 | Attachments: | |
Description: | I use the comment ;-- to comment out lines in the extension.conf. After reload Asterisk function very strange. The contexts are called, but an error occurs inside the context. chan_dadhi.conf [trunkgroups] [channels] context=default usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes sendcalleridafter=2 useincomingcalleridondahditransfer=yes callwaitingcallerid=yes threewaycalling=yes busydetect=yes ; to test when a line is hung-up busycount=6 ; to prevent suprious hangups waitfordialtone=yes transfer=yes canpark=yes cancallforward=yes callreturn=yes echocancel=yes echocancelwhenbridged=yes relaxdtmf=yes rxgain=9.0 txgain=-6.0 group=1 callgroup=1 pickupgroup=1 immediate=no ;Sangoma AFT-B600 [slot:4 bus:4 span:1] <wanpipe1> context=from-pstn ;group=0 echocancel=yes ;faxdetect=incoming signalling = fxs_ks channel => 1 [from-pstn] exten => s,1,GotoIfTime(7:00-17:30,mon-sat,*,*?open,s,1) same => n,Goto(closed,s,1) [default] exten => s,1,GotoIfTime(7:00-17:30,mon-sat,*,*?open,s,1) same => n,Goto(closed,s,1) [closed] exten => s,1,Answer ; Answer the line same => n,Set(dvt=${DB(DIVERT/MOBILE)}) ; Get the mobile number from DB and store in dv$ same => n,Gotoif($["${dvt}" != ""]?divert:vmail); If $dvt is not empty (contains number) then same => n(divert),NoCDR() same => n,Dial(${PSTNTRUNK}/${dvt},360,hHgtr) ; Dial Mobile Number same => n,Hangup ; Hangup the call ;--same => n(vmail),PlayBack(asterisk-recording10) ;--same => n,Voicemail(${RECEPTIONMBX}@default,su) ; Invalid digit pressed ;--same => n,Hangup ; Hangup the call same => n(vmail),PlayBack(asterisk-recording10) same => n,Voicemail(${RECEPTIONMBX}@default,su) ; Invalid digit pressed same => n,Hangup ; Hangup the call This is what happens -- Starting simple switch on 'DAHDI/1-1' [2011-07-04 19:35:09] ERROR[30444]: callerid.c:562 callerid_feed: No start bit found in fsk data. [2011-07-04 19:35:09] WARNING[30444]: chan_dahdi.c:1706 my_get_callerid: Failed to decode CallerID == Starting DAHDI/1-1 at from-pstn,s,1 failed so falling back to exten 's' == Starting DAHDI/1-1 at from-pstn,s,1 still failed so falling back to context 'default' -- Executing [s@default:1] GotoIfTime("DAHDI/1-1", "7:00-17:30,mon-sat,*,*?open,s,1") in new stack -- Executing [s@default:2] Goto("DAHDI/1-1", "closed,s,1") in new stack -- Goto (closed,s,1) [2011-07-04 19:35:12] WARNING[30444]: pbx.c:4815 __ast_pbx_run: Channel 'DAHDI/1-1' sent into invalid extension 's' in context 'closed', but no invalid handler -- Hanging up on 'DAHDI/1-1' -- Hungup 'DAHDI/1-1' Replace the ;-- with ;;; and all works again. | ||
Comments: | By: Walter Doekes (wdoekes) 2011-07-05 15:35:41.330-0500 LOL :) I tested and concluded that you are right. So, upon inspection of main/config.c, the first thing that matched my search for "';'" was: {code} #define MAX_NESTED_COMMENTS 128 #define COMMENT_START ";--" #define COMMENT_END "--;" #define COMMENT_META ';' #define COMMENT_TAG '-' {code} That should explain a lot ;) By: Leif Madsen (lmadsen) 2011-07-11 14:38:54.328-0500 I don't think there is an issue here. It looks like you're using the ;-- wrong (you're not closing it properly). ;-- Multi-line comments need to be controlled with double-hypen+semicolon --; |