[Asterisk-Users] Checking to see if a dialplan variable is NULL, mysql app addon

Brian Wilkins brian at hcc.net
Mon Jan 3 08:11:27 MST 2005


   This pertains to the mysql application addon. If the column selected does 
not exist or is NULL, is there a way to do an If(${variable} == NULL) in the 
Asterisk dialplan, or another suitable method? For instance, if my query is:

MYSQL(Query resultid select lastnumberdialed from users where UID = 
${CALLERIDNAME})
MYSQL(Fetch fetchid 13 variable)

 and either CALLERIDNAME does not exist or the lastnumberdialed is NULL, is 
there way to determine if variable is NULL or an empty string in the dialplan 
in order to set it to a default value. This would be useful if we are using 
autocreatepeer. Thanks -

-- 
Brian Wilkins
Software Engineer
brian at hcc.net

Heritage Communications Corporation
  Melbourne, FL     USA     32935
321.308.4000 x33
http://www.hcc.net




More information about the asterisk-users mailing list