Hi All,
I've got a problem with Kamailio 3.3.2-1.1 on CentOS 6.3 with locally
postgresql 8.4.13-1.el6_3 libraries, connected to a remote
postgresql91-9.1.6-1PGDP.rhel6 server
The presence module tries to insert a record in the presentity table,
with some xml in the body column.
But the body value in the postgresql table is not represented as a
string '<?xml ...etc' But encodes as
'\x3c3f786d6c2076657273696f6e3d27312e302720656e636f64696e673d275554462...etc'
This gives problems when the presense module is trying to send out a
notify based on the value in the database.
With debugging, this gives the error:
Entity: line 1: parser error : Start tag expected, '<' not found
x3c3f786d6c2076657273696f6e3d27312e302720656e636f64696e673d275554462d38273f3e3c
The \x in front of the hex encodes string is not properly interpreted by
postgresql or kamailio.
The body column of the table presentity is a bytea column, and I believe
postgresql 9 outputs these bytea columns a bit differently then
postgresql 8.
When I try to run the sql statement:
insert into presentity
(domain,username,event,etag,sender,body,received_time,expires ) values
('newsip.lifexs.nl','00086','presence','a.1352107949.18632.27.0','','<?xml
version=''1.0'' encoding=''UTF-',1343534532,1345213723)
On the postgresql 9.1 server locally, I still get the '\x3c3f786d6c...
etc' value in the database.
The bytea_output setting in postgresql 9 is now standard set to 'hex' in
stead of escape.
I've changed the bytea_output setting in postgresql.conf to 'escape',
and then the presence is working without any issues.
So maybe the database module of postgresql has to be changed to pick up
these bytea encodings properly?
Because i think kamailio should work correctly with the default
postgresql settings.
With kind regards,
Robert Verspuy
--
*Exa-Omicron*
Eenspan 8-K
3897 AL Zeewolde
http://exa.nl