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

Thomas Haeger thomas.haeger at beronet.com
Tue Jul 1 01:28:20 MST 2003


Hi Adam,

i think the real problem is the ",".
This will be allways replaced through "|".


Regrads,
Thomas.

-----Ursprüngliche Nachricht-----
Von: asterisk-users-admin at lists.digium.com
[mailto:asterisk-users-admin at lists.digium.com]Im Auftrag von Adam
Goryachev
Gesendet: Dienstag, 1. Juli 2003 10:12
An: asterisk-users at lists.digium.com
Betreff: RE: [Asterisk-Users] PGSQL app and pbx parsing :-(


See README.variables or similar in the root of the asterisk source. This
should answer your questions on how to quote the various parameters needed
for sql and other functions.

Regards,
Adam
>
> Please help.....
>
> 	this is generally a problem with arguments that contain ","
> or "(", i
> think.
>
> -----Ursprüngliche Nachricht-----
> Von: asterisk-users-admin at lists.digium.com
> [mailto:asterisk-users-admin at lists.digium.com]Im Auftrag von Thomas
> Haeger
> Gesendet: Sonntag, 29. Juni 2003 15:18
> An: Asterisk User
> Betreff: [Asterisk-Users] PGSQL app and pbx parsing :-(
>
>
> 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.
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
>

_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list