On Wed, 2007-02-28 at 18:05 -0500, Neil Cherry wrote:> Does the ${BLACKLIST()} function allow for values other than 1 to be
> returned and if so how can I use that is the AEL? Can I use the
> function in a switch statement?
I haven't used the BLACKLIST function, but have been using the DB()
function quite a bit; they should be pretty similar... here's a little
snippet from my home dialplan:
Set(cidcallcount=${DB(cidrec/${CALLERID(num)})});
NoOp(cidcallcount is set to ${cidcallcount});
Set(cidchosecount=${DB(cidchose/${CALLERID(num)})});
NoOp(cidchosecount is set to ${cidchosecount});
if( "${cidcallcount}" != "" )
{
Set(DB(cidrec/${CALLERID(num)})$[${cidcallcount}+1]);
}
else
{
Set(DB(cidrec/${CALLERID(num)})=1);
Set(cidcallcount=1);
}
The key is know what it returns, what it returns when there isn't
anything to return, and what you need it for... as usual.
murf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3239 bytes
Desc: not available
Url :
http://lists.digium.com/pipermail/asterisk-users/attachments/20070228/145a14bb/smime.bin