<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi Pasan,<br>
      <br>
      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>
      <br>
      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>
      <br>
      Best regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
    <div class="moz-cite-prefix">On 02/13/2018 03:39 AM, Pasan Meemaduma
      via Users wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:978310918.155131.1518485998683@mail.yahoo.com">
      <div style="color:#000; background-color:#fff; font-family:標楷體,
        dfkai-sb;font-size:16px">
        <div role="presentation" tabindex="0"
          id="yui_3_16_0_ym19_1_1517557285679_225468">
          <div tabindex="0" id="yui_3_16_0_ym19_1_1517557285679_225469">
            <div id="yui_3_16_0_ym19_1_1517557285679_225470">
              <div id="yui_3_16_0_ym19_1_1517557285679_225471">
                <div id="yui_3_16_0_ym19_1_1517557285679_225472">
                  <div
                    style="color:#000;background-color:#fff;font-family:標楷體,
                    dfkai-sb;font-size:16px;"
                    id="yui_3_16_0_ym19_1_1517557285679_225473">
                    <div id="yui_3_16_0_ym19_1_1517557285679_225474">Hi
                      List,</div>
                    <div id="yui_3_16_0_ym19_1_1517557285679_225475"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225476">
                    </div>
                    <div id="yui_3_16_0_ym19_1_1517557285679_225477">I'm
                      working on getting my opensips 1.10 -> 2.3.3 :)</div>
                    <div id="yui_3_16_0_ym19_1_1517557285679_225478"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225479">
                    </div>
                    <div id="yui_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="yui_3_16_0_ym19_1_1517557285679_225481"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225482">
                    </div>
                    <div id="yui_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="yui_3_16_0_ym19_1_1517557285679_225484">
                    </div>
                    <div id="yui_3_16_0_ym19_1_1517557285679_225485"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225486">
                    </div>
                    <div id="yui_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="yui_3_16_0_ym19_1_1517557285679_225488">
                    </div>
                    <div id="yui_3_16_0_ym19_1_1517557285679_225489"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225490">
                    </div>
                    <div dir="ltr"
                      id="yui_3_16_0_ym19_1_1517557285679_225491">following
                      is my config</div>
                    <div dir="ltr"
                      id="yui_3_16_0_ym19_1_1517557285679_225492"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225493">
                    </div>
                    <div dir="ltr"
                      id="yui_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="yui_3_16_0_ym19_1_1517557285679_225495">
                    </div>
                    <div id="yui_3_16_0_ym19_1_1517557285679_225496"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225497">
                    </div>
                    <div id="yui_3_16_0_ym19_1_1517557285679_225498"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225499">
                    </div>
                    <div id="yui_3_16_0_ym19_1_1517557285679_225500"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225501">
                    </div>
                    <div dir="ltr"
                      id="yui_3_16_0_ym19_1_1517557285679_225502">$acc_extra(islocal)
                      = 1;</div>
                    <div dir="ltr"
                      id="yui_3_16_0_ym19_1_1517557285679_225503"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225504">
                    </div>
                    <div dir="ltr"
                      id="yui_3_16_0_ym19_1_1517557285679_225505"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225506">
                    </div>
                    <div dir="ltr"
                      id="yui_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="yui_3_16_0_ym19_1_1517557285679_225508"><br
                        id="yui_3_16_0_ym19_1_1517557285679_225509">
                    </div>
                    <div dir="ltr"
                      id="yui_3_16_0_ym19_1_1517557285679_225510">Ex:-</div>
                    <div dir="ltr"
                      id="yui_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 class="moz-txt-link-freetext" href="sip:xx@xx;transport=UDP','sip:xx@xxx;transport=UDP','','376ab2da-0d66-11e8-9410-bb1806756cbd','in',11,'2018-02-09">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="yui_3_16_0_ym19_1_1517557285679_225512">
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <span id="yui_3_16_0_ym19_1_1517557285679_225513"> <a
            tabindex="0"
            href="https://mail.yahoo.com/?soc_src=mail&soc_trk=ma"
            data-action="reply_sender"
            id="yui_3_16_0_ym19_1_1517557285679_225514"
            moz-do-not-send="true"> </a></span></div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>