Summary:ASTERISK-09641: GUI removes escape character backslash
Reporter:Stuart Edge (asteredge)Labels:
Date Opened:2007-06-10 23:49:42Date Closed:2007-08-06 11:14:10
Versions:Frequency of
Environment:Attachments:( 0) config-9938.diff
Description:In extensions.conf I have this line:
exten = s,n,SIPAddHeader(Call-Info: sip: \; answer-after=0 )
This line has been added with vi
From asterisk cli i can  "reload" then "dialplan show" and its OK.

If I click "activate changes" in Asterisk-GUI the backslash is removed.
This breaks the function.

exten = s,n,SIPAddHeader(Call-Info: sip: ; answer-after=0 )

I have tried a few things to overide this such as using as single and double quotes.
If I put additional backslashes in, it removes one each time I click "activate changes".


OS Version:
Linux olcs-iPBX.olcs.com.au 2.6.20-1.2952.fc6 #1 SMP Wed May 16 17:59:13 EDT 2007 i686 i686 i386 GNU/Linux

14:40:01 up 9 days, 1:10, 1 user,
Load Average: 10.58, 8.75, 8.24

Asterisk Build:
Asterisk 1.4.4
Asterisk GUI-version Revision: 1072 $

Server Date & TimeZone:
Mon Jun 11 14:40:02 EST 2007
Comments:By: Brandon Kruse (bkruse) 2007-06-14 17:02:52

That makes sense

the backslash, as you know, is an escape character.

since its being URI encoded and decoded, and jsoninized and what not, try to escape your escape character (//) instead of (/)


By: Stuart Edge (asteredge) 2007-06-14 20:33:10

The escape character must be backslash \
Forward slash does not work, no matter how many. / or // or //\ or /\

The problem is that the escape character is there to escape a semicolon
like this \;
The semicolon will be interpreted by asterisk as semicolon without the escape character.

The escape character allows the semicolon to be sent in the sip header.
Without an escape everything after the semicolon does not get sent in the sip header. Therefore "answer-after=0" is not sent.

I have also tried single quotes but the GUI reload ignores these and removed the backslash.

By: Brandon Kruse (bkruse) 2007-06-20 13:13:47


Can you check this out when your done with the aadk blocking things?

It looks like a simple regex thing were doing wrong.

Any luck asteredge?


By: Pari Nannapaneni (pari) 2007-07-31 11:34:29


this is actually a asterisk webserver bug.
as asteredge mentioned,

exten = s,n,SIPAddHeader(Call-Info: sip: \; answer-after=0 )

to your extensions.conf and do a reload from the gui.
(the reload from the gui is actually an "updateconfig with reload=yes" request on extensions.conf as a dummy request to get an asterisk reload)

you can see that the updateconfig request changing the extensions.conf to

exten = s,n,SIPAddHeader(Call-Info: sip: ; answer-after=0 )


By: Brandon Kruse (bkruse) 2007-07-31 13:05:37

I will look into this also, its probably pretty simple.

So to recreate just "active changes" would do it right?


By: Jason Parker (jparker) 2007-07-31 13:16:44

Patch uploaded.  Give that a try.

By: Digium Subversion (svnbot) 2007-08-06 11:14:10

Repository: asterisk
Revision: 78181

r78181 | qwell | 2007-08-06 11:14:09 -0500 (Mon, 06 Aug 2007) | 14 lines

Merged revisions 78180 via svnmerge from

(closes issue ASTERISK-9641)
r78180 | qwell | 2007-08-06 11:30:51 -0500 (Mon, 06 Aug 2007) | 5 lines

Fix an issue with using UpdateConfig (manager action) where escaped semicolons
in a config would be converted to just semicolons (\; to ;)

Issue 9938