I am trying to modify the ASTCC AGI to use postgres as the backend database.
I have edited the DBI to connect successful to the database. The AGI runs
properly till it gets to the selection of the trunk. The database insert to
the cdrs table with CHANUNAVAIL.

It seems to me that the SELECT statement on the sub trytrunk() is not using
simple quotes for the select statement
Example
$sth = $dbh->prepare("SELECT * FROM trunks where name=" .
$dbh->quote($trunk));

When I query the DB with SELECT * FROM trunks where name =IAXtrunk; Response
with no iaxtrunk column found

When I query the DB with SELECT * FROM trunks where name='IAXtrunk' DB
response with a record set.
PG DB table: 
name varchar(40)
tech varchar(10)
path varchar(40)

Any ideas?

Debian 2.4.26
Asterisk stable
PG 7.4

-Michael Rodriguez


_______________________________________________
Asterisk-Dev mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-dev
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to