[OpenSIPS-Users] need some help using opensips 3.0 cluster module .

Vlad Patrascu vladp at opensips.org
Tue Jul 9 08:05:33 EDT 2019


Hi,

I would advise to directly rely on the usrloc module for configuring 
distributed user location, instead of manually scripting this using the 
clusterer script functions.

You can read more about this here:

- usrloc module documentation [1]

- federated user location tutorial [2] - this is for 2.4 but aside from 
syntax changes, the config should be quite similar.

[1] 
https://opensips.org/html/docs/modules/3.0.x/usrloc.html#distributed-sip-user-location

[2] 
https://opensips.org/Documentation/Tutorials-Distributed-User-Location-Federation

Vlad Patrascu
OpenSIPS Developer
http://www.opensips-solutions.com

On 07/09/2019 02:08 PM, Sasmita Panda wrote:
> Hi ,
>
>
> I have followed the below link while configuring opensips 2.4
>
> https://saevolgo.blogspot.com/2018/01/opensips-geo-distributed-clustering.html 
>
>
> Is there any document which I can follow for opensips 3.0 also . 
> Please let me know or provide any sample config file if possible .
>
> */Thanks & Regards/*
> /Sasmita Panda/
> /Senior Network Testing and Software Engineer/
> /3CLogic , ph:07827611765/
>
>
> On Tue, Jul 9, 2019 at 4:27 PM Sasmita Panda <spanda at 3clogic.com 
> <mailto:spanda at 3clogic.com>> wrote:
>
>     Hi Vlad ,
>
>     I got that and modified . Thanks for your reply .
>
>     But I am facing some other problem now . Wherever I have written 
>     xlog to print some user defined logs these logs are not getting
>     printed .  I think I am doing some other mistakes in the config
>     also .
>
>     Can I get a sample config with cluster module enable for opensips
>     3.0 ? Earlier I have tested with 2.4 and it was working fine . But
>     lots of things changed in 3.0 and so I am stuck .
>
>
>     */Thanks & Regards/*
>     /Sasmita Panda/
>     /Senior Network Testing and Software Engineer/
>     /3CLogic , ph:07827611765/
>
>
>     On Tue, Jul 9, 2019 at 4:05 PM Vlad Patrascu <vladp at opensips.org
>     <mailto:vladp at opensips.org>> wrote:
>
>         Hi Sasmita,
>
>         The actual name of the parameter, as stated in the docs for
>         E_CLUSTERER_REQ_RECEIVED, is "msg". So you should access it by
>         /$param(msg)/.
>
>         Regards,
>
>         Vlad Patrascu
>         OpenSIPS Developer
>         http://www.opensips-solutions.com
>
>         On 07/08/2019 02:29 PM, Sasmita Panda wrote:
>>         event_route[E_CLUSTERER_REQ_RECEIVED]{
>>                 $avp(state) = $(param(rcv_msg){s.select,0,:});
>>                 $avp(user) = $(param(rcv_msg){s.select,1,:});
>>                 $avp(proxy) = $(param(rcv_msg){s.select,2,:});
>>         xlog("L_INFO","[CLUSTER-TALK] {MSG:$avp(rcv_msg)} Sender
>>         Proxy:$avp(proxy) SRC_ID:$avp(source_id) User: $avp(user)
>>         State: $avp(state) ClusterId: $param(cluster_id)\n")
>>                 if($avp(state) =~ "REGOFFLINE") {
>>         cache_raw_query("redis:group1","HDEL REGONLINE $avp(user)");
>>                 }else if($avp(state) =~ "REGONLINE") {
>>         cache_raw_query("redis:group1","HSET $avp(state) $avp(user)
>>         $avp(proxy)");
>>                 }else if($avp(state) =~ "WHEREIS") {
>>                         route(QUERY_LOCAL_CACHE);
>>                 }else if($avp(state) =~ "HACKER"){
>>                         $avp(useragent) = $avp(user);
>>                         $avp(hacker_ip) = $avp(proxy);
>>                         xlog("L_INFO","[CLUSTER-TALK] HACKER IP
>>         DETECTED BY CLUSTER ADDING $avp(hacker_ip) & User-Agent:
>>         $(avp(useragent){s.b64decode}) Into Watch-List\n");
>>
>>         cache_raw_query("redis:group1","HSET HACKER_USERAGENT_LIST
>>         $avp(useragent) $avp(hacker_ip)");
>>         cache_raw_query("redis:group1","HSET HACKER_IP_LIST
>>         $avp(hacker_ip) $avp(useragent)");
>>                 }
>>
>>                 exit;
>>         }
>>
>>         This is giving warning in opensips 3.0  as below .
>>         *WARNING:event_route:event_route_param_get: Parameter
>>         <rcv_msg> not found for event <E_CLUSTERER_REQ_RECEIVED>*
>>         **
>>         *             Due to this the data is not getting saved in
>>         the subsequent node in the cluster .  How I will fix this ? *
>>         *
>>         *
>>         */Thanks & Regards/*
>>         /Sasmita Panda/
>>         /Senior Network Testing and Software Engineer/
>>         /3CLogic , ph:07827611765/
>>
>>
>>         On Thu, Jul 4, 2019 at 5:35 PM Sasmita Panda
>>         <spanda at 3clogic.com <mailto:spanda at 3clogic.com>> wrote:
>>
>>             Thank you for your quick response . I resolved it .
>>
>>
>>             */Thanks & Regards/*
>>             /Sasmita Panda/
>>             /Senior Network Testing and Software Engineer/
>>             /3CLogic , ph:07827611765/
>>
>>
>>             On Thu, Jul 4, 2019 at 5:12 PM Liviu Chircu
>>             <liviu at opensips.org <mailto:liviu at opensips.org>> wrote:
>>
>>                 Hey Sasmita,
>>
>>                 I had a similar problem yesterday. In 3.0,
>>                 fetch_event_params() was removed, and you are
>>                 simply supposed to access your params via:
>>
>>                   $param(cluster_id), $param(src_id), $param(rcv_msg)
>>                 and $param(rcv_tag)
>>
>>                 Liviu Chircu
>>                 OpenSIPS Developer
>>                 http://www.opensips-solutions.com
>>
>>                 On 04.07.2019 14:22, Sasmita Panda wrote:
>>>                 Hi All ,
>>>
>>>                 Previously I have used cluster module with opensips
>>>                 2.4 and that was working fine . Now I want to
>>>                 upgrade to opensips 3.0 . And there are lots of
>>>                 parameter get changed in opensips 3.0 .
>>>
>>>                 Is there any documentation for cluster module in 3.0
>>>                 . I need an example for config file which I can use
>>>                 with opensips 3.0 .
>>>
>>>                 Now I am facing problem in bellow lines .
>>>
>>>                 event_route[E_CLUSTERER_RPL_RECEIVED]{
>>>                 fetch_event_params("$avp(cluster_id);$avp(src_id);$avp(rcv_msg);$avp(rcv_tag)");
>>>                         $avp(state) = $(avp(rcv_msg){s.select,0,:});
>>>                         $avp(user) = $(avp(rcv_msg){s.select,1,:});
>>>                         $avp(proxy) = $(avp(rcv_msg){s.select,2,:});
>>>                         xlog("L_INFO","[CLUSTER-TALK] Replying
>>>                 Proxy:$avp(proxy) User: $avp(user) State:
>>>                 $avp(state) ClusterId: $avp(cluster_id) TAG:
>>>                 $avp(rcv_tag) \n");
>>>                 }
>>>
>>>                 fetch_event_params  this is not present in opensips
>>>                 3.0 . How I will convert this so that it will
>>>                 support in opensips 3.0. Please do help me .
>>>
>>>
>>>                 	
>>>
>>>                 */Thanks & Regards/*
>>>                 /Sasmita Panda/
>>>                 /Senior Network Testing and Software Engineer/
>>>                 /3CLogic , ph:07827611765/
>>>
>>>                 _______________________________________________
>>>                 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 <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

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


More information about the Users mailing list