Brian Wilkins
2005-Jan-03 08:11 UTC
[Asterisk-Users] Checking to see if a dialplan variable is NULL, mysql app addon
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@hcc.net Heritage Communications Corporation Melbourne, FL USA 32935 321.308.4000 x33 http://www.hcc.net