I almost had comma escapes right, but 9184 points out the problem-- the escape is removed by pbx_config, and pbx_ael should also, before sending it down into the pbx engine. Also, you have to insert it back in, if you are generating extensions.conf code from the AEL.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@57426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Steve Murphy
2007-03-02 05:21:36 +00:00
parent 5a9cd3d235
commit 9fab305234
2 changed files with 42 additions and 0 deletions

View File

@@ -151,11 +151,19 @@ static void substitute_commas(char *str);
static void substitute_commas(char *str)
{
char *p = str;
while (p && *p)
{
if (*p == ',' && ((p != str && *(p-1) != '\\')
|| p == str))
*p = '|';
if (*p == '\\' && *(p+1) == ',') { /* learning experience: the '\,' is turned into just ',' by pbx_config; So we need to do the same */
char *q = p;
while (*q) { /* move the ',' and everything after it up 1 char */
*q = *(q+1);
q++;
}
}
p++;
}
}