<p>Version: OpenSIPS (1.12.0dev-notls (x86_64/linux))<br>
Issue Description: when i run a select query on dialog table 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 ...<br>
"accX_table#acc|accX_flags#5 DB_MISSED_FLAG DB_FLAG CDR_FLAG FAIL_TRANS_FLAG|accX_db# " (There is one special character at the end)<br>
When i see dialog using mi fifo command I see full list of variables.<br>
accX_table:: acc<br>
accX_flags:: 5 DB_MISSED_FLAG DB_FLAG CDR_FLAG FAIL_TRANS_FLAG<br>
accX_db:: \b\x00\x00\x00\x1d\x00sip:test@192.168.7.5:9090$\x00sip:11111111@192.168.7.5:9090#\x00sip:110251111111@192.168.7.8\x0e\x00192.168.3.1?\x00\x00\n\x001419221825<br>
accX_leg:: \x00\x00\x00\x00<br>
accX_core:: \x06\x00INVITE \x0052a5e031f1fa4a50883cf14fcfb0dfb1"\x007C34DE52-54979B3E000CEDFB-4BCFC700 \x00e26faa1c7c654b1dbe6b1d86a12b2e61\x03\x00200\x02\x00OK\b\x00E\x9b\x97T\x00\x00\x00\x00<br>
accX_created:: &gt;\x9b\x97T\x00\x00\x00\x00<br>
caller_IP:: 192.168.3.1<br>
ring_time:: 1419221825</p>

<p>The issue seems be at the time of storing dialog var (Binary info) instead of just printing error and is verified using following observation..</p>

<p>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)<br>
2- When dialog is created I ran following queries<br>
select position('accX_db'::bytea in vars) from dialog (To check position of "accX_db after that non-printable binary data is there")<br>
select length(vars) from dialog (Checked total binary length)<br>
and found there was only one byte after "accX_db" so I think it is not storing complete value.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/398">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOcicYwBasMbHffRxAf_q8Tu5nSp6VBks5nao7cgaJpZM4DL6nz.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/398"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>