[Asterisk-Dev] ASTCC AGI using Postgres DB
Michael K. Rodriguez
michael at voipalliance.net
Tue Oct 19 13:17:00 MST 2004
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
More information about the asterisk-dev
mailing list