[Asterisk-Users] PGSQL app and pbx parsing :-(

Thomas Haeger thomas.haeger at beronet.com
Sun Jun 29 06:18:11 MST 2003


Hi all,

i try to use PGSQL app effectively, but there are two problems:

	1. If i use PGSQL like

	exten => s,3,PGSQL,"Query resultid ${connid} SELECT count(*) FROM credit
WHERE callerid=${callerid}";

	an error occurs with breaking query string at "(" (first bracket).

	....then somebody told me that i should use PGSQL like follow:

	exten => s,3,PGSQL,(Query resultid ${connid} SELECT coun(*) FROM credit
WHERE callerid=${callerid})

	this works BUT,

	2. If i use PGSQL like

	exten => s,3,PGSQL,(Query resultid ${connid} SELECT username,credit FROM
credit WHERE callerid=${callerid})

	the query string will be broken at the first ",".


	I think this is a parsing problem in pbx.c
	this prog exchange "," into "|" and parse string for "(" to affect the
beginning from arguments for the app.


How can i solve this problem, is there a trick i can use ?

Or ist this just a BUG ?


Thanks for Help,

Thomas.




More information about the asterisk-users mailing list