[OpenSIPS-Users] acc extra_fields param

Pasan Meemaduma pasandev at ymail.com
Mon Feb 12 20:39:58 EST 2018

 Hi List,
I'm working on getting my opensips 1.10 -> 2.3.3 :)
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 ?
I tried to use it to hold an integer value and it comes up as empty string ''. 

Is it a bug or purpose set only to accept string data only ? cause my db column has integer type for it. 

following is my config
modparam("acc", "extra_fields", "db: fu->from_uri; ru->to_uri; islocal->islocal; callid->\"exe-callid\"; direction->direction")

$acc_extra(islocal) = 1;

When call hangups it failed to insert the cdr record to acc table as islocal comes up as ''.
Ex:-ERROR:db_postgres:db_postgres_submit_query: 0x7fd07fb45d18 PQsendQuery Error: ERROR:  invalid input syntax for integer: ""#012LINE 1: ...sip:xx at 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','sip:xx at xx;transport=UDP','sip:xx at xxx;transport=UDP','','376ab2da-0d66-11e8-9410-bb1806756cbd','in',11,'2018-02-09 17:55:30',4,4298)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180213/56940963/attachment.html>

More information about the Users mailing list