[Freeswitch-dev] backslash in call-id
Hi, I have a sip client which generates call-id with backslashes which causing error: ERR: [insert into sip_registrations ............. values ('<c)X/Iz\' I looked into http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__call__id.html looks like backslash '\' is valid in call-id so is it ok to to let switch_mprintf %q also quote backslash ? should I report a jira? Thanks. -- About: http://about.me/dujinfang Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn Sent with Sparrow (http://www.sparrowmailapp.com)
Yes you should open a Jira, attach a proposed patch if you have one... Reporting bugs like this on the mailing list almost always get lost in the shuffle On 2/8/12 7:55 AM, "Seven Du" <dujinfang@gmail.com> wrote:
Hi,
I have a sip client which generates call-id with backslashes which causing error:
ERR: [insert into sip_registrations ............. values ('<c)X/Iz\'
I looked into
http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__call__id.html
looks like backslash '\' is valid in call-id
so is it ok to to let switch_mprintf %q also quote backslash ?
should I report a jira?
Thanks.
Thanks Ken, I don't have a patch, ira opened http://jira.freeswitch.org/browse/FS-3893 On Wednesday, February 8, 2012 at 10:58 PM, Ken Rice wrote:
Re: [Freeswitch-dev] backslash in call-id Yes you should open a Jira, attach a proposed patch if you have one...
Reporting bugs like this on the mailing list almost always get lost in the shuffle
On 2/8/12 7:55 AM, "Seven Du" <dujinfang@gmail.com> wrote:
Hi,
I have a sip client which generates call-id with backslashes which causing error:
ERR: [insert into sip_registrations ............. values ('<c)X/Iz\'
I looked into
http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__call__id.html
looks like backslash '\' is valid in call-id
so is it ok to to let switch_mprintf %q also quote backslash ?
should I report a jira?
Thanks.
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org (mailto:consulting@freeswitch.org) http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org (mailto:FreeSWITCH-dev@lists.freeswitch.org) http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
If you quote backslash, you corrupt data for databases that follow the SQL standard and don’t use backslash. <snarky MySQL comment elided> This is really more a problem with using a “quote” function instead of proper parameterized queries. I don’t believe it’s possible to accommodate both escaping methods with the same function. If parameterized queries aren’t possible to do in FS (or too much work), there should probably be some switch that controls backslash handling. -Michael From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of Seven Du Sent: Wednesday, February 08, 2012 6:55 AM To: freeswitch-dev Subject: [Freeswitch-dev] backslash in call-id Hi, I have a sip client which generates call-id with backslashes which causing error: ERR: [insert into sip_registrations ............. values ('<c)X/Iz\' I looked into http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__call__id.html looks like backslash '\' is valid in call-id so is it ok to to let switch_mprintf %q also quote backslash ? should I report a jira? Thanks. -- About: http://about.me/dujinfang Blog: http://www.dujinfang.com Proj: http://www.freeswitch.org.cn Sent with Sparrow<http://www.sparrowmailapp.com>
This turned out to be postgres defaulting to respecting to non-stansard quoted backslash for back-compat or something. There is a param to disable it which fixes the problem. On Tue, Feb 14, 2012 at 10:40 AM, Michael Giagnocavo <mgg@giagnocavo.net> wrote:
If you quote backslash, you corrupt data for databases that follow the SQL standard and don’t use backslash. <snarky MySQL comment elided>
This is really more a problem with using a “quote” function instead of proper parameterized queries. I don’t believe it’s possible to accommodate both escaping methods with the same function.
If parameterized queries aren’t possible to do in FS (or too much work), there should probably be some switch that controls backslash handling.
-Michael
From: freeswitch-dev-bounces@lists.freeswitch.org [mailto:freeswitch-dev-bounces@lists.freeswitch.org] On Behalf Of Seven Du Sent: Wednesday, February 08, 2012 6:55 AM To: freeswitch-dev Subject: [Freeswitch-dev] backslash in call-id
Hi,
I have a sip client which generates call-id with backslashes which causing error:
ERR: [insert into sip_registrations ............. values ('<c)X/Iz\'
I looked into
http://sofia-sip.sourceforge.net/refdocs/sip/group__sip__call__id.html
looks like backslash '\' is valid in call-id
so is it ok to to let switch_mprintf %q also quote backslash ?
should I report a jira?
Thanks.
--
About: http://about.me/dujinfang
Blog: http://www.dujinfang.com
Proj: http://www.freeswitch.org.cn
Sent with Sparrow
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
participants (4)
-
Anthony Minessale
-
Ken Rice
-
Michael Giagnocavo
-
Seven Du