[asterisk-users] Best way to connect to a MySQL Database

Sherwood McGowan sherwood.mcgowan at gmail.com
Mon Nov 15 23:16:39 CST 2010


On Mon, Nov 15, 2010 at 6:38 PM, Leif Madsen
<leif.madsen at asteriskdocs.org> wrote:
> On 10-11-15 06:04 PM, Matt Darnell wrote:
>> Is this command the best way to access a MySQL database -
>> MYSQL(Connect connid dhhost dbuser dbpass dbname) ?
>>
>> I thought I heard that using ODBC was a bit more stable.
>>
>> Anyone have any experience?
>
> Use func_odbc along with res_odbc. I've taken dialplans for customers who were
> having issues with MYSQL() and had about 9 lines of dialplan compressed down to
> 1 line of dialplan for the call, with much greater stability.
>
> Some information about that here:
>
> http://astbook.asteriskdocs.org/en/2nd_Edition/asterisk-book-html-chunk/asterisk-CHP-12.html
>
> And here:
>
> http://ofps.oreilly.com/titles/9780596517342/ch15.html
>
> (The second link is to the 3rd edition of the Asterisk book, currently being
> written, so this is a preview of the text in rough draft form.)
>
> Leif.
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>

In the past I've just used the MySQL commands (back before I trusted
the ODBC access). Now I use func_odbc



More information about the asterisk-users mailing list