[OpenSIPS-Devel] Issue in storing Dialog Variables into the Database (Postgresql)

Răzvan Crainea razvan at opensips.org
Wed Dec 24 09:26:04 CET 2014


Hi, John!

Please open an issue on the ticketing system[1]. I will run some tests 
and let you know if I can replicate this.

[1] https://github.com/OpenSIPS/opensips/issues

Best regards,

Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com

On 12/23/2014 06:04 PM, John Nash wrote:
> I would have looked into code by now but its taking me a while to go
> through it as I recently started studying it. I thought of posting in
> case its some know issue.
>
> On Tue, Dec 23, 2014 at 5:27 PM, John Nash <john.nash778 at gmail.com
> <mailto:john.nash778 at gmail.com>> wrote:
>
>     I think the issue is somewhere in storing these values into the
>     postgres DB (Not checked with mysql) because ....
>
>     1- I connected one call and let dialog created and then restarted
>     opensips and again checked dialog variables (using opensipsctl) and
>     found dialog variables gone (I could see the dialog other core
>     values though)
>
>     2- When dialog is created I ran following queries
>     select position('accX_db'::bytea in vars) from dialog (To check
>     position of "accX_db after that non-printable binary data is there")
>     select length(vars) from dialog (Checked total binary length)
>
>     and found there was only one byte after "accX_db" so I think it is
>     not storing complete value.
>
>     BTW my version is Server:: OpenSIPS (1.12.0dev-notls (x86_64/linux))
>
>
>
>
>
>
>
>     On Tue, Dec 23, 2014 at 5:19 PM, Răzvan Crainea <razvan at opensips.org
>     <mailto:razvan at opensips.org>> wrote:
>
>         Hi, Josh!
>
>         Most likely it is a printing problem. The dialog variables are
>         stored in the DB as binary/non-printable data. That's why you
>         can't see them properly when doing a select.
>
>         Best regards,
>
>         Răzvan Crainea
>         OpenSIPS Solutions
>         www.opensips-solutions.com  <http://www.opensips-solutions.com>
>
>         On 12/23/2014 01:08 PM, John Nash wrote:
>>         I am using Opensips with dialog module and using DB as Postgresql. I am
>>         using modparam("dialog", "db_mode", 1). At the time of dialog creation I am
>>         also setting values to some dialog variables which I can see with mi fifo
>>         commands.
>>
>>         My issue is when i run a select query and try to see "vars" column contents
>>         (I set vars column data type as text for simplicity), I do not see all
>>         information stored. It seems to be truncated. I see like below ...
>>
>>         "accX_table#acc|accX_flags#5 DB_MISSED_FLAG DB_FLAG CDR_FLAG
>>         FAIL_TRANS_FLAG|accX_db# " (There is some special character at the end)
>>
>>         On the other hand when i see dialog using mi fifo command I see full list
>>         of variables.
>>
>>         accX_table:: acc
>>         accX_flags:: 5 DB_MISSED_FLAG DB_FLAG CDR_FLAG FAIL_TRANS_FLAG
>>         accX_db:: \b\x00\x00\x00\x1d\x00sip:test at 192.168.7.5  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>:9090$\
>>         x00sip:1111111111 at 192.168.7.5  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>:9090#\x00sip:11025111111111 at 192.168.7.8  <http://lists.opensips.org/cgi-bin/mailman/listinfo/users>\x0e\x00192.168.3.1
>>         ?\x00\x00\n\x001419221825
>>         accX_leg:: \x00\x00\x00\x00
>>         accX_core:: \x06\x00INVITE
>>         \x0052a5e031f1fa4a50883cf14fcfb0dfb1"\x007C34DE52-54979B3E000CEDFB-4BCFC700
>>         \x00e26faa1c7c654b1dbe6b1d86a12b2e61\x03\x00200\x02\x00OK\b\x00E\x9b\x97T\x00\x00\x00\x00
>>         accX_created:: >\x9b\x97T\x00\x00\x00\x00
>>         caller_IP:: 192.168.3.1
>>         ring_time:: 1419221825
>>
>>         Somehow values after accX_db are not being stored into the DB.
>>
>>         Any ideas?
>>
>>         John
>>
>>
>>         _______________________________________________
>>         Devel mailing list
>>         Devel at lists.opensips.org  <mailto:Devel at lists.opensips.org>
>>         http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>
>         _______________________________________________
>         Devel mailing list
>         Devel at lists.opensips.org <mailto:Devel at lists.opensips.org>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>
>
>
>
>
> _______________________________________________
> Devel mailing list
> Devel at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/devel
>



More information about the Devel mailing list