Summary:ASTERISK-02227: [patch] Problems with () characters in expressions in extensions.conf
Reporter:ramdyne (ramdyne)Labels:
Date Opened:2004-08-16 10:58:40Date Closed:2004-08-20 08:53:01
Versions:Frequency of
Environment:Attachments:( 0) 20040816__pbx_config_fix.diff.txt
Description:Suppose we have an application which accepts a long string as parameter (like PGSQL of MYSQL) like this:
"INSERT INTO table (column1, column2) VALUES (value1,value2)"

Asterisk will execute the context containing this line and fail with the following error:
Aug 16 15:22:34 WARNING[196620]: pbx.c:1274 pbx_extension_helper: No application 'APP,"INSERT INTO table ' for extension (context, s, 420)

This looks like problem http://bugs.digium.com/bug_view_page.php?bug_id=0001779


I've tried to see if the related bug could show me how to solve this one, but so far no luck.
Comments:By: Mark Spencer (markster) 2004-08-16 11:08:00

Please post the actual line.

By: Tilghman Lesher (tilghman) 2004-08-16 11:27:50

I suspect you're attempting to use the old style syntax of separating the application name and arguments with a comma, instead of using parentheses around the arguments, as is the current suggested syntax, e.g.


While that's supported for backwards-compatibility, it's deprecated.  I suggest that you use the new style syntax, as it's likely the old style will be removed sometime after 1.0.

By: Tilghman Lesher (tilghman) 2004-08-16 15:10:34

Try this patch, which resolves the old and new styles of arguments to apps, based on whether there's a ',' or '(' found first after the appname.

By: ramdyne (ramdyne) 2004-08-17 03:49:30

Corydon76 :

Yup, that was the trick, old style syntax.

Maybe this bug should be changed to a documentation bug. Although we were having trouble with the MYSQL application, all the PGSQL samples have the old style syntax. This had my colleague so confused he used the wrong syntax.

By: Mark Spencer (markster) 2004-08-18 11:36:31

There should be no remaining examples of old config in the asterisk configs...

By: Tilghman Lesher (tilghman) 2004-08-20 08:53:00

As the old-style syntax has been removed from the sample config, I'm closing this bug.  Reopen if you don't think this is a satisfactory resolution.