[asterisk-users] HASH, HASHKEYS, ClearHash explanation

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Wed Jul 30 18:59:54 CDT 2008


On Wednesday 30 July 2008 09:19:53 Pavel Jezek wrote:
> Tilghman Lesher wrote:
> > On Sunday 27 July 2008 13:28:00 Pavel Jezek wrote:
> >> Hi, can somebody explain how to use this func/apps in asterisk?
> >> I tried to find some examples on mailinglists or wiki, however without
> >> success. thanks
> >
> > The primary intended use is in conjunction with func_odbc, to allow you
> > to retrieve multiple values and reference them without having to assign
> > each field to an individual variable.  Think 'SELECT *' where the fields
> > included might change over time, and you don't want the placement of a
> > minor field to completely break your dialplan.
>
> thanks, can you give some example, if this functions can be used with
> normal strings?
> I found some example from bugreport 0008965, but I'm lost, what it's
> actually doing ...
> exten => s,n,Set(HASH(access_control)=${ACCESS_CONTROL_DATA(${USER_ID})})

[CONTROL_DATA]
dsn=somedb
prefix=ACCESS
readsql=SELECT * FROM access WHERE user_id='${SQL_ESC(${ARG1})}'

-- 
Tilghman



More information about the asterisk-users mailing list