[asterisk-users] Mysql and extensions.conf

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Mon Jun 2 10:14:11 CDT 2008


On Monday 02 June 2008 05:48, Atis Lezdins wrote:
> You can use func_realtime in dialplan, that will be much faster as it
> doesn't create separate process (as AGI does), and uses internal
> asterisk connection pool, so no extra code in dialplan.
>
> http://www.voip-info.org/wiki/index.php?page=Asterisk+func+realtime

That assumes that he's using a realtime table.  From the OP's description,
it sounded like he wanted to query a column of an arbitrary table.  Another
solution, in addition to the MYSQL app, would be func_odbc:

func_odbc.conf:
[FOO]
dsn=mysql-asterisk
read=SELECT status FROM foo WHERE id='${ARG1}'

extensions.conf:
GotoIf($[0${ODBC_FOO(123)} > 0]?open:closed)

-- 
Tilghman



More information about the asterisk-users mailing list