[OpenSIPS-Users] acc extra_fields param

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Feb 13 07:08:11 EST 2018


Hi Pasan,

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.

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 )

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 02/13/2018 03:39 AM, Pasan Meemaduma via Users wrote:
> 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)
> <https://mail.yahoo.com/?soc_src=mail&soc_trk=ma>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180213/68bb22cf/attachment-0001.html>


More information about the Users mailing list