[asterisk-users] func_odbc insert with mssql

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Tue Aug 11 13:58:56 CDT 2009


On Tuesday 11 August 2009 12:29:48 Myles Wakeham wrote:
> Personally I don't use ODBC for this sort of thing.  Its not really a
> 'Linux' type thing, and relies on a lot of middle-ware layers between
> the Asterisk server and the database.  Not that you have too many
> choices, but what we do that works brilliantly well here is to use
> PHP-AGI to construct a PHP script that does all the DB connection,
> inserting, etc. and just have the Asterisk dialplan call that.

Actually, ODBC relies on less layers than you are by calling an AGI to do your
database accesses.  I'm not quite sure what makes you think ODBC is not
a Linux-type thing, but it's a good generic API for database access, and it
works very well.

> This way I have total visibility to the SQL and I have apply some
> transforms to the data in PHP if needed.  It also means that if I want
> to swap out the DB to another brand, I can do that with only one place
> to change the code.

You've just stated the primary reason for folks to use ODBC.  Perhaps you've
written off the technology too soon and for the wrong reasons.

-- 
Tilghman & Teryl
with Peter, Cottontail, Midnight, Thumper, & Johnny (bunnies)
and Harry, BB, & George (dogs)



More information about the asterisk-users mailing list