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

Sasmita Panda spanda at 3clogic.com
Mon Jul 8 07:29:36 EDT 2019


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> 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> 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 Developerhttp://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 listUsers at lists.opensips.orghttp://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/20190708/98ab0481/attachment.html>


More information about the Users mailing list