[asterisk-users] AEL: how to check if variable is defined

Klaus Darilion klaus.mailinglists at pernau.at
Mon Dec 29 12:13:31 CST 2008


Hi!

I use an "if" condition in extensions.ael to check if a channel variable 
is defined and if defined I add a certain header:

context toNormaleRufe {
   _X. => {
            if (${NUMBER}) {
                SIPAddHeader(X-NUMBER: ${NUMBER});
            };
            ...
   };

This works fine, except NUMBER starts with the + sign.

I tried using quotes but
    if ("${NUMBER}")
evaluates always true.

What is the suggested way to solve this?

thanks
klaus






More information about the asterisk-users mailing list