[asterisk-users] AstDB wildard searches

Jared Smith jsmith at digium.com
Mon Feb 16 09:54:36 CST 2009


On Mon, 2009-02-16 at 15:14 +0000, Geoff Lane wrote:
> 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.

I don't think this is possible with the current AstDB code.

>  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?

If you have that many items in a database and want to do those types of
filters, why not stick them in a SQL database and use func_odbc to
retrieve them from your SQL database inside the dialplan?


-- 
Jared Smith
Digium, Inc. | Training Manager 






More information about the asterisk-users mailing list