<div dir="ltr">bytea. I am using version 8.4 of postgresql. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 6, 2015 at 9:08 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div><tt>Hi John,<br>
        <br>
        In the definition of your &quot;dialog&quot; table, the &quot;vars&quot; field has
        &quot;bytea&quot; or &quot;text&quot; type ?<br>
        <br>
        Regards,<br>
      </tt><span class="">
      <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre></span><div><div class="h5">
      On 28.12.2014 11:37, John Nash wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">
        <div>One more update <br>
          <br>
        </div>
        I just now checked dialog parameter &quot;modparam(&quot;dialog&quot;,
        &quot;db_flush_vals_profiles&quot;, 1)&quot; and used it (Probably i should
        have used it in a first place) after that I get the error when
        opensips tries to insert dialog into the database.<br>
        <div><br>
          ERROR:db_postgres:db_postgres_submit_query: 0x7f544ad0ec20
          PQsendQuery Error: ERROR:  invalid byte sequence for encoding
          &quot;UTF8&quot;: 0xe0c79f<br>
          HINT:  This error can also happen if the byte sequence does
          not match the encoding expected by the server, which is
          controlled by &quot;client_encoding&quot;.<br>
           Query: insert into dialog
          (dlg_id,callid,from_uri,from_tag,to_uri,to_tag,caller_sock,callee_sock,start_time,mangled_from_uri,mangled_to_uri,state,timeout,caller_cseq,callee_cseq,caller_ping_cseq,callee_ping_cseq,flags,vars,profiles,script_flags,module_flags,caller_route_set,callee_route_set,caller_contact,callee_contact
          ) <br>
          values (17240765013518,&#39;0a1dc58ac1104d588471e1c898a040bd&#39;,&#39;<a href="http://sip:98116181@192.168.1.5:9092" target="_blank">sip:98116181@192.168.1.5:9092</a>&#39;,&#39;523d873f92eb40c38a58f90c9474cab9&#39;,&#39;<a href="http://sip:222222222222@192.168.1.5:9092" target="_blank">sip:222222222222@192.168.1.5:9092</a>&#39;,&#39;42A53A43-549FC7E00003E7B0-778D1700&#39;,&#39;udp:<a href="http://192.168.1.5:9092" target="_blank">192.168.1.5:9092</a>&#39;,&#39;udp:<a href="http://192.168.112.5:9090" target="_blank">192.168.112.5:9090</a>&#39;,1419757544,NULL,NULL,3,1419761144,&#39;0&#39;,&#39;10580&#39;,0,0,16,&#39;accX_created#àÇT&#39;,&#39;caller#PC_BR3DGE_xyz
Billing_4444|&#39;,0,0,NULL,NULL,&#39;<a href="mailto:sip:98116181@103.255.76.231:1100;ob" target="_blank">sip:98116181@103.255.76.231:1100;ob</a>&#39;,&#39;sip:192.168.112.5:5080;transport=udp&#39;)<br>
          <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Dec 26, 2014 at 1:27 PM, John
          Nash <span dir="ltr">&lt;<a href="mailto:john.nash778@gmail.com" target="_blank">john.nash778@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">no it is bytea. I also tried changing it to
              text but results are same.<br>
            </div>
            <div>
              <div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Fri, Dec 26, 2014 at 1:21
                    PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div text="#000000" bgcolor="#FFFFFF">
                        <div><tt>Hi John,<br>
                            <br>
                            I see you also open a ticket on this:<br>
                                <a href="https://github.com/OpenSIPS/opensips/issues/398" target="_blank">https://github.com/OpenSIPS/opensips/issues/398</a><br>
                            <br>
                            I suppose your dialog table does have a
                            reasonable size constrain for the vars
                            column, right ? <br>
                            <br>
                            Regards,<br>
                          </tt>
                          <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                          <div>
                            <div> On 22.12.2014 09:27, John Nash wrote:<br>
                            </div>
                          </div>
                        </div>
                        <blockquote type="cite">
                          <div>
                            <div>
                              <div dir="ltr">
                                <div>
                                  <div>
                                    <div>
                                      <div>
                                        <div>I am using Opensips with
                                          dialog module and using DB as
                                          Postgresql. I am using
                                          modparam(&quot;dialog&quot;, &quot;db_mode&quot;,
                                          1). At the time of dialog
                                          creation I am also setting
                                          values to some dialog
                                          variables which I can see with
                                          mi fifo commands.<br>
                                          <br>
                                        </div>
                                        My issue is when i run a select
                                        query and try to see &quot;vars&quot;
                                        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>
                                        <br>
                                        &quot;accX_table#acc|accX_flags#5
                                        DB_MISSED_FLAG DB_FLAG CDR_FLAG
                                        FAIL_TRANS_FLAG|accX_db# &quot;
                                        (There is some special character
                                        at the end)<br>
                                        <br>
                                      </div>
                                      On the other hand when i see
                                      dialog using mi fifo command I see
                                      full list of variables.<br>
                                      <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\<a href="mailto:x00sip:test@192.168.7.5:9090$%5C" target="_blank">x00sip:test@192.168.7.5:9090$\</a><a href="http://x00sip:919811618189@192.168.7.5:9090#%5Cx00sip:11025919811618189@192.168.7.8%5Cx0e%5Cx00192.168.3.1" target="_blank">x00sip:919811618189@192.168.7.5:9090#\x00sip:11025919811618189@192.168.7.8\x0e\x00192.168.3.1</a>?\x00\x00\n\x001419221825<br>
                                      accX_leg:: \x00\x00\x00\x00<br>
                                      accX_core:: \x06\x00INVITE
\x0052a5e031f1fa4a50883cf14fcfb0dfb1&quot;\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<br>
                                      <br>
                                    </div>
                                    Somehow values after accX_db are not
                                    being stored into the DB.<br>
                                    <br>
                                  </div>
                                  Any ideas?<br>
                                  <br>
                                </div>
                                John<br>
                                <div>
                                  <div><br>
                                    <br>
                                    <br>
                                    <div><br>
                                      <br>
                                      <br>
                                    </div>
                                  </div>
                                </div>
                              </div>
                              <br>
                              <fieldset></fieldset>
                              <br>
                            </div>
                          </div>
                          <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                        </blockquote>
                        <br>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>