<html><head></head><body><div style="color:#000; background-color:#fff; font-family:標楷體, dfkai-sb;font-size:16px"><div id="yui_3_16_0_ym19_1_1517557285679_299600">Hi Bogdan,</div><div><br></div><div>Thanks for the response. I'll get my opensips rebuild , can you let me know the commit id so I know I got it correctly ?<br></div><div id="yui_3_16_0_ym19_1_1517557285679_299598"><span></span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: 標楷體, dfkai-sb; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"><font face="Arial" size="2"> On Tuesday, 13 February 2018, 17:38, Bogdan-Andrei Iancu <bogdan@opensips.org> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv4183386286"><div>
    <tt>Hi Pasan,<br clear="none">
      <br clear="none">
      The "extra" support in ACC is always producing output as strings
      (when performing the DB query). Nevertheless this should not
      prevent you pushing integer or string values into the $acc_extra()
      variable. <br clear="none">
      <br clear="none">
      But, it seems you discovered a BUG here :D...if the pushed value
      is a static int (from the script), it is not properly converted
      :(. I just pushed a fix on GIT repo (master and 2.3) - so please
      update you checkout or if using packages, use the nightly build
      (of course, wait for the night :) first )<br clear="none">
      <br clear="none">
      Best regards,<br clear="none">
    </tt>
    <pre class="yiv4183386286moz-signature">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a rel="nofollow" shape="rect" class="yiv4183386286moz-txt-link-freetext" target="_blank" href="http://www.opensips-solutions.com/">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a rel="nofollow" shape="rect" class="yiv4183386286moz-txt-link-freetext" target="_blank" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
    <div class="yiv4183386286yqt3757342082" id="yiv4183386286yqt20777"><div class="yiv4183386286moz-cite-prefix">On 02/13/2018 03:39 AM, Pasan Meemaduma
      via Users wrote:<br clear="none">
    </div>
    <blockquote type="cite">
      <div style="color:#000;background-color:#fff;font-family:標楷體, dfkai-sb;font-size:16px;">
        <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225468">
          <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225469">
            <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225470">
              <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225471">
                <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225472">
                  <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225473" style="color:#000;background-color:#fff;font-family:標楷體, dfkai-sb;font-size:16px;">
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225474">Hi
                      List,</div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225475"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225476" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225477">I'm
                      working on getting my opensips 1.10 -> 2.3.3 :)</div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225478"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225479" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225480">As
                      db_extra param is not there anymore I tried to use
                      extra_fields param in acc module and it appears it
                      can hold string values only. Is it the case ?</div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225481"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225482" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225483">I
                      tried to use it to hold an integer value and it
                      comes up as empty string ''. <br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225484" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225485"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225486" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225487">Is
                      it a bug or purpose set only to accept string data
                      only ? cause my db column has integer type for it.
                      <br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225488" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225489"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225490" clear="none">
                    </div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225491">following
                      is my config</div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225492"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225493" clear="none">
                    </div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225494">modparam("acc",
                      "extra_fields", "db: fu->from_uri;
                      ru->to_uri; islocal->islocal;
                      callid->\"exe-callid\";
                      direction->direction")<br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225495" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225496"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225497" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225498"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225499" clear="none">
                    </div>
                    <div id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225500"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225501" clear="none">
                    </div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225502">$acc_extra(islocal)
                      = 1;</div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225503"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225504" clear="none">
                    </div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225505"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225506" clear="none">
                    </div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225507">When
                      call hangups it failed to insert the cdr record to
                      acc table as islocal comes up as ''.</div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225508"><br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225509" clear="none">
                    </div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225510">Ex:-</div>
                    <div dir="ltr" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225511">ERROR:db_postgres:db_postgres_submit_query:
                      0x7fd07fb45d18 PQsendQuery Error: ERROR:  invalid
                      input syntax for integer: ""#012LINE 1:
...sip:xx@xx;transport=UDP','','376ab2...#012                                                            
                      ^#012 Query: insert into acc
(method,from_tag,to_tag,callid,sip_code,sip_reason,time,from_uri,to_uri,islocal,"exe-callid",direction,setuptime,created,duration,ms_duration
                      ) values
('INVITE','101c267c','464b920d','6m1aTeUcif5ctoXI7ZSq9A..','200','OK','2018-02-09
17:55:41','<a rel="nofollow" shape="rect" class="yiv4183386286moz-txt-link-freetext" href="">sip:xx@xx;transport=UDP','sip:xx@xxx;transport=UDP','','376ab2da-0d66-11e8-9410-bb1806756cbd','in',11,'2018-02-09</a>
                      17:55:30',4,4298)<br id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225512" clear="none">
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <span id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225513"> <a rel="nofollow" shape="rect" tabindex="0" id="yiv4183386286yui_3_16_0_ym19_1_1517557285679_225514" target="_blank" href="https://mail.yahoo.com/?soc_src=mail&soc_trk=ma"> </a></span></div>
      <br clear="none">
      <fieldset class="yiv4183386286mimeAttachmentHeader"></fieldset>
      <br clear="none">
      <pre>_______________________________________________
Users mailing list
<a rel="nofollow" shape="rect" class="yiv4183386286moz-txt-link-abbreviated" ymailto="mailto:Users@lists.opensips.org" target="_blank" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a rel="nofollow" shape="rect" class="yiv4183386286moz-txt-link-freetext" target="_blank" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote></div>
    <br clear="none">
  </div></div><br><br></div>  </div> </div>  </div></div></body></html>