mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
allow semicolons to be escaped in call files (issue #5407)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6742 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -129,9 +129,17 @@ static int apply_outgoing(struct outgoing *o, char *fn, FILE *f)
|
|||||||
else
|
else
|
||||||
c++;
|
c++;
|
||||||
}
|
}
|
||||||
c = strchr(buf, ';');
|
|
||||||
if (c)
|
c = buf;
|
||||||
*c = '\0';
|
while ((c = strchr(c, ';'))) {
|
||||||
|
if ((c > buf) && (c[-1] == '\\')) {
|
||||||
|
memmove(c - 1, c, strlen(c) + 1);
|
||||||
|
c++;
|
||||||
|
} else {
|
||||||
|
*c = '\0';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Trim trailing white space */
|
/* Trim trailing white space */
|
||||||
while(!ast_strlen_zero(buf) && buf[strlen(buf) - 1] < 33)
|
while(!ast_strlen_zero(buf) && buf[strlen(buf) - 1] < 33)
|
||||||
|
14
sample.call
14
sample.call
@@ -1,8 +1,16 @@
|
|||||||
#
|
#
|
||||||
# This is a sample file that can be dumped in /var/spool/asterisk/outgoing
|
# This is a sample file that can be dumped in /var/spool/asterisk/outgoing
|
||||||
# to generate a call. Obviously, you MUST specify at least a channel in
|
# to generate a call.
|
||||||
# the same format as you would for the "Dial" application. Only one
|
#
|
||||||
# channel name is permitted.
|
# Comments are indicated by a '#' character that begins a line, or follows
|
||||||
|
# a space or tab character. To be consistent with the configuration files
|
||||||
|
# in Asterisk, comments can also be indicated by a semicolon. However, the
|
||||||
|
# multiline comments (;-- --;) used in Asterisk configuration files are not
|
||||||
|
# supported. Semicolons can be escaped by a backslash.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Obviously, you MUST specify at least a channel in the same format as you
|
||||||
|
# would for the "Dial" application. Only one channel name is permitted.
|
||||||
#
|
#
|
||||||
Channel: Zap/1
|
Channel: Zap/1
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user