[asterisk-users] How to check if channel varaible have been set/notempty?

Rushowr rushowr at phreaker.net
Thu Aug 3 05:03:56 MST 2006


Use the ISNULL function. ISNULL will return a value of 1 if the string it's
fed contains data. Example:

If you set VARNAME=foo, and then grab the value of ${ISNULL(${VARNAME})}, it
will be 0 because VARNAME has data

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jan du Toit
Sent: Thursday, August 03, 2006 6:30 AM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] How to check if channel varaible have been
set/notempty?

Hi.

How can you check if a channel variable has been set in the dialplan?

I have some logic in the dialplan that must do a ExecIF() if a specific
channel variable has been set, otherwise it must do nothing.

Thank you very much.

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





More information about the asterisk-users mailing list