[asterisk-dev] Muting a noisy warning in a specific case

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri Sep 4 10:05:10 CDT 2009


On Friday 04 September 2009 05:43:20 Pavel Troller wrote:
> Hi!
>   I'm using asterisk 1.6 (now it's 1.6.1.6) and my log was permanently
> filled with the following warning:
>
> [Sep  4 10:28:20] WARNING[19721] pbx.c: The application delimiter is now
> the comma, not the pipe.  Did you forget to convert your dialplan? 
> (Set(CDCT=(^[a1-8].*$|^9[0-2].*$)))
>
> As you can see, this warning is issued improperly, because the "pipe
> symbol" is a part of a regular expression, which is assigned to a variable,
> and not a part of a general command syntax. AFAIK, the Set() application
> syntax is very clean and doesn't allow neither commas nor pipes to
> regularly appear in it. It means, that any pipe/comma present in Set() is a
> part of the value being assigned, and this warning is wrong.
>   For every call, I get 3 such warnings (my extension macros are relatively
> complex). I've patched pbx.c by adding ' && strcasecmp(app->name, "set")'
> to the test expression (there is a test for the System() app already in
> place) somewhere around line 957 in pbx.c. Would it be acceptable to put
> this test regularly to the sources ? Maybe not just me would appreciate it.

Boy, I wish that were true.  Unfortunately (and I consider this a misfeature),
Set in 1.4 and previous allowed setting multiple keys, by separating the
key/value pairs with a pipe.  The reason I consider this a misfeature is that
it prevented the user from putting a pipe within a variable value.

-- 
Tilghman & Teryl
with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies)
and Harry, BB, & George (dogs)



More information about the asterisk-dev mailing list