-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DB Postgres BLOB conversion for presence #1255
Comments
Is postgres db server converting and saving blob data in hexa format? |
Think yes. According doc I will try make workarround at table config |
How to set it at database level on server side example. |
I set globally I think |
Have you found a solution for this one? I know people were using postgres with presence quite a lot in the past and they didn't have any such issue. |
Hello Daniel |
Hello, using GDB to debug Kamailio is dificult, due its multi-process architecture. You will have results if you restrict the number of children within your test configuration and use only one UDP worker child. |
Think it related to PostgreSQL lib difference between server ( |
I tested config when on server used |
It may be more than is necessary, but PostgreSQL can store XML documents natively with the XML data type: https://www.postgresql.org/docs/9.6/static/datatype-xml.html, but I guess that would require a rewrite of how Kamailio stores presence data :( |
@sergey-safarov hot fix for what exactly ? this seems |
@lazedo, think i will do hotfix/workarround using other way. Thanks |
Closing being specific to postgres config/data types. If someone wants to push a patch to make it easier from kamailio point of view, just make a pull request. |
Hello Daniel @miconda |
Hello Daniel By default psql output BLOBs in hex format. After
Could you suggest patch and then i will test on my servers. |
I created patch for postgres module and will test soon.
|
I tested this patch. Now issue is fixed.
in SQL request to PostgreSQL server instreat of
Example
Second way is more elegant but i do not know hot to change source code. |
db_postgres: Fixed blob hex encoding (#1255)
As troubleshooting remainder.
|
Description
I use kazoo and postgres modules on my host. I found that many database operation generates error like
After some debugging i found that kamailio wants save to database xml string like this as BLOB object
And later tries to read. But when this XML read reverse conversion of BLOB to string is not take place. And late used BLOB as is. This breaks presentation logic completely.
Reproduction
Configure kamailio on kazoo cluster to use PostgreSQL database
On phone create subscribe to second
From second phone create new call.
Operating System
CentOS 7
Linux node2.docker.rcsnet.ru 3.10.0-514.16.1.el7.x86_64 #1 SMP Wed Apr 12 15:04:24 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: