Hi Marcin Seems you are getting the problem due to the ' on text Victoria's. Even though you are urlencoding it, it seems it is being taken as a field delimiter and not part of the text. I'm thinking on two options:
-) Try to escape it with \' or \\' -) You might want to replace any ' within any field with ´ or ` (right/left sided apostrophe) before urlencoding the fields. Regards Alvaro |-----------------------------------------------------------------------------------------------------------------| Envíe y Reciba Datos y mensajes de Texto (SMS) hacia y desde cualquier celular y Nextel en el Perú, México y en mas de 180 paises. Use aplicaciones 2 vias via SMS y GPRS online Visitenos en www.perusms.com On Mon, Aug 3, 2015 at 9:15 AM, Marcin Matyaszczyk <m.matyaszc...@ogicom.pl> wrote: > Hello > > we have a problem with Postgresql DLR storage which looks like a bug: > when we try to send sms with source field containing ' character we've > got an error: > > 2015-04-02 10:18:51 CEST STATEMENT: INSERT INTO "dlr" ("smsc", "ts", > "source", "destination", "service", "url", "mask", "boxc", "status") > VALUES ('smppxxxx3', '88888888', 'Victoria's', '+48888888888', 'xxxxxx', > ' > http://xxxx.domain.pl/dlr2.php?id=110725920&source=XXXXXXX&t=%t&i=%i&d=%d&D=%D&A=%A&F=%F > ', > '31', '', '0'); > > 2015-04-02 10:21:51 CEST ERROR: syntax error at or near "s" at > character 147 > > We urlencode all fields and sms is submitted ok to kannel, problem > appears in dlr's insert query only. We use kannel 1.5. > > regards > Marcin Matyaszczyk > > >