[asterisk-users] AstDB wildard searches

Geoff Lane geoff at gjctech.co.uk
Mon Feb 16 09:14:20 CST 2009


Hi All,

I'm looking for a way to filter the AstDB cidname family to show only
those entries with a specified area code in the Asterisk CLI. If this
were a SQL database it would be something like:
SELECT number, name FROM cidname WHERE number LIKE '1234%'
I've tried "database show cidname 1234*" and substituted "%", "$", "-"
for the wildcard character. I also tried "?" but the Asterisk CLI
wouldn't let me type question marks.

Does AstDB support wildcard characters in this way?

BTW, I know that I can do
 asterisk -rx "database show cidname" | grep <area code>
at the Linux shell prompt, but I'm looking for a way to do this
without leaving the Asterisk CLI.

TIA,

-- 
Geoff




More information about the asterisk-users mailing list