[OpenSIPS-Users] ACC module with JSON events

Răzvan Crainea razvan at opensips.org
Thu Nov 15 04:53:02 EST 2018


You're write, the issue is that the values are not unique! I have 
committed a fix now, but this should definitely be changed, as its prone 
to errors. I will try to rework the flags mechanism to something more 
flexible.

Thanks for reporting this!
Best regards,
Răzvan

On 11/14/18 8:08 PM, SamyGo wrote:
> Possibly found the reason:
> 
> The event_jsonrpc.c has this flag: JSONRPC_FLAG with same value "1 << 
> 26" same as event_route.c
> 
> modules/event_route/event_route.h:#define SCRIPTROUTE_FLAG              
> (1 << 26)
> modules/event_jsonrpc/event_jsonrpc.h:#define JSONRPC_FLAG              
> (1 << 26)
> 
> While other event routes have unique value. Is this intentional? can I 
> change this flag value to something unused i.e 1 << 31  ?
> 
> 
> On Wed, Nov 14, 2018 at 12:20 PM SamyGo <govoiper at gmail.com 
> <mailto:govoiper at gmail.com>> wrote:
> 
>     Howdy again,
> 
>     Thanks team for creating the event_jsonrpc module in 2.4 - I'm back
>     to this topic and trying to give this module a try however opensips
>     fail to start with following error:
> 
>     Nov 14 17:13:03 opsips /usr/local/sbin/opensips[18997]:
>     INFO:uac:mod_init: initializing...
>     Nov 14 17:13:03 opsips  /usr/local/sbin/opensips[18997]:
>     NOTICE:event_jsonrpc:mod_init: initializing module ...
>     Nov 14 17:13:03 opsips  /usr/local/sbin/opensips[18997]:
>     ERROR:core:register_event_mod: duplicate flag 4000000
>     Nov 14 17:13:03 opsips  /usr/local/sbin/opensips[18997]:
>     ERROR:event_jsonrpc:mod_init: cannot register transport functions
>     for jsonrpc
>     Nov 14 17:13:03 opsips  /usr/local/sbin/opensips[18997]:
>     ERROR:core:init_mod: failed to initialize module event_jsonrpc
>     Nov 14 17:13:03 opsips  /usr/local/sbin/opensips[18997]:
>     ERROR:core:main: error while initializing modules
> 
>     I do have these two module loaded as well, (which I can't remove).
>     loadmodule "event_routing.so"
>     loadmodule "event_route.so"
> 
>     Any insight as to why these error show up?
> 
>     Big thanks,
>     Sammy.
> 
> 
> 
>     On Mon, Feb 26, 2018 at 12:07 PM SamyGo <govoiper at gmail.com
>     <mailto:govoiper at gmail.com>> wrote:
> 
>         Hi DanB,
>         I can certainly try CGRates, but...surely enough its an overkill
>         for simple CDRs. Anyways, my request is for an event_JSONRPC
>         which maybe very helpful in events outside of ACC.
> 
>         Best Regards,
>         Sammy
> 
> 
> 
> 
>         On Mon, Feb 26, 2018 at 6:13 AM, Khalil Khamlichi
>         <khamlichi.khalil at gmail.com <mailto:khamlichi.khalil at gmail.com>>
>         wrote:
> 
>             Hi Dan,
> 
>             Can you show us how to do that with some step by step
>             tutorial, we had
>             a lot of trouble trying to figure out how to use CGRates,
>             with this
>             functionality of json export, we will at least use some of
>             CGRates
>             functionalities and hopefully slowly get familiar with it.
> 
>             Thanks in advance.
> 
>             On Mon, Feb 26, 2018 at 7:51 AM, DanB <danb.lists at gmail.com
>             <mailto:danb.lists at gmail.com>> wrote:
>              > Sammy,
>              >
>              > Another option on short term until the new feature will
>             be implemented
>              > in OpenSIPS would be to use CGRateS as CDR format
>             converter: receive
>              > CDRs from "cgrates" module in OpenSIPS and use online
>             export of CGRateS
>              > to further export the CDR in the JSON over http
>             (customizable fields).
>              > You don't need to configure much on CGRateS side in this
>             case since no
>              > billing needs to be involved.
>              >
>              > DanB
>              >
>              >
>              >
>              >
>              >
>              > _______________________________________________
>              > Users mailing list
>              > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>              > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
>             _______________________________________________
>             Users mailing list
>             Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>             http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> 

-- 
Răzvan Crainea
OpenSIPS Core Developer
   http://www.opensips-solutions.com



More information about the Users mailing list