# Asterisk Project : NULL Strings

Added by mdavenport , edited by mdavenport on Aug 31, 2010

Testing to see if a string is null can be done in one of two different ways:

    exten => _XX.,1,GotoIf($["${calledid}" != ""]?3)

or:

    exten => _XX.,1,GotoIf($[foo${calledid} != foo]?3)

The second example above is the way suggested by the WIKI. It will work as long as there are no spaces in the evaluated value.

The first way should work in all cases, and indeed, might now be the safest way to handle this situation.