GUSTAVO GARCIA BERNARDO
2004-Apr-26 11:30 UTC
[Asterisk-Users] Using ',' character in applications data
Hi, When i include a ',' in the application data, for example: exten => 1,1,Plaback(echo,file); [My file name is "echo,file"] the Playback application receives echo|file as data parameter. How can avoid asterisk change the ',' character? (The change code is in asterisk/pbx/pbx_config.c Ln 1150). I'm developping an application for asterisk and i need to pass SQL querys with ',' character as data. exten => 1,1,Sql(SELECT info,user FROM..... Thank you very much. G.
Steven Critchfield
2004-Apr-26 11:53 UTC
[Asterisk-Users] Using ',' character in applications data
On Mon, 2004-04-26 at 13:30, GUSTAVO GARCIA BERNARDO wrote:> Hi, > > When i include a ',' in the application data, for example: > > exten => 1,1,Plaback(echo,file); > [My file name is "echo,file"] > > the Playback application receives echo|file as data parameter. How can avoid asterisk change the ',' character? (The change code is in asterisk/pbx/pbx_config.c Ln 1150). > > I'm developping an application for asterisk and i need to pass SQL querys with ',' character as data. > exten => 1,1,Sql(SELECT info,user FROM.....Well then, why don't you look at the postgres application and how they accomplished it. -- Steven Critchfield <critch@basesys.com>
GUSTAVO GARCIA BERNARDO
2004-Apr-26 12:38 UTC
[Asterisk-Users] Using ',' character in applications data
Thank you very much. 1. The problem with ',' is worked around using the syntax: exten => 1,1,MYSQL,"INSERT INTO services user,service VALUES ${callerid},voicemail" instead of exten => 1,1,MYSQL(INSERT INTO services (user,service) VALUES (${callerid},voicemail) 2. About using SQL statements in extensions.conf, i would like to hear your proposed to improve the application. In first instance, I choose SQL statemens to offer maximum flexibility, because current postgres application allow it too and to avoid the administrator the learning of other syntax. Best regards. G. ----- Mensaje original ----- De: Jeremy McNamara <jj@nufone.net> Fecha: Martes, Abril 27, 2004 9:03 pm Asunto: Re: [Asterisk-Users] Using ',' character in applications data> GUSTAVO GARCIA BERNARDO wrote: > > >I'm developping an application for asterisk and i need to pass SQL > querys with ',' character as data. > >exten => 1,1,Sql(SELECT info,user FROM..... > > > > > > Come on....build the application properly. There is absolutely no > need > for one to have SQL statements in your extensions.conf file. Just > pass > in the required info to your application and build the SQL > statement in > the application, then set channel variable(s) if necessary. > > > You have to be smarter than what your working on. > > > > Jeremy McNamara > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Jeremy McNamara
2004-Apr-27 12:03 UTC
[Asterisk-Users] Using ',' character in applications data
GUSTAVO GARCIA BERNARDO wrote:>I'm developping an application for asterisk and i need to pass SQL querys with ',' character as data. >exten => 1,1,Sql(SELECT info,user FROM..... > >Come on....build the application properly. There is absolutely no need for one to have SQL statements in your extensions.conf file. Just pass in the required info to your application and build the SQL statement in the application, then set channel variable(s) if necessary. You have to be smarter than what your working on. Jeremy McNamara