[asterisk-users] Mysql and extensions.conf

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Wed Jun 4 08:02:54 CDT 2008


On Wednesday 04 June 2008 02:07:13 Al Baker wrote:
> Tilghman Lesher wrote:
> > 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)
>
> yes - but what would REALLY BE GOOD is if func_odbc
> allowed Muli-stepped SQL. Since that is the ONLY way to execute a
> TRANSACTION
> How they thought it was a "Good Idea" to hamstring func_odbc like they
> did is beyond me.

Not they -- me.  And I'm working on transactional support.  If this is really
something you're interested in, then I hope you will test the functionality
when it's ready for that stage of development.

-- 
Tilghman



More information about the asterisk-users mailing list