[OpenSIPS-Users] acc extra_fields param

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Feb 14 03:42:09 EST 2018


Hi Pasan,

This is for OpenSIPS 2.3:
https://github.com/OpenSIPS/opensips/commit/42cba2c0de9cb07e31c055bc82514c14735bd2e8

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/14/2018 04:06 AM, Pasan Meemaduma wrote:
> Hi Bogdan,
>
> 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 ?
>
>
> On Tuesday, 13 February 2018, 17:38, Bogdan-Andrei Iancu 
> <bogdan at opensips.org> wrote:
>
>
> 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 <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 <mailto: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/20180214/f4bf3eaf/attachment.html>


More information about the Users mailing list