Re: [OpenSIPS-Users] Active-Pasive Dialog Replication
That's great if problem got solved. And yes you may right we need to add active tag on 2nd opensips server too. ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Active-Pasive Dialog Replication
I thin the OpenSIPs 2 need vip tag because when change to Active, he needs to put his tag on the Dialogs The problem was a routing error on the VPS provider side. Now all look fine. Thank you Regards --- I'm SoCIaL, MayBe El 13/03/2020 a las 13:33, Sharad Kumar via Users escribió: Hi, Your keepalived configuration looks good. But you need to remove set_dlg_sharing_tag("vip") form invite block on second opensips server. Follow these steps to troubleshoot your issue - 1. Remove set_dlg_sharing_tag("vip") from OpenSIPS 2nd. 2. Before making a test call make sure OpenSIPS 1 has a active tag 3. Make a test call, and check dialog - opensipsctl fifo dlg_list_ctx And make sure your dialog has a TAG attach to it. 4. Check the tag on opensips 2nd server. 5. Stop opensips service on 1st server. 6. Check tag on 2nd Opensips server. If active tag is not there then you need to troubleshoot keepalived. Let me know how it goes. Thanks you ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Active-Pasive Dialog Replication
Hi, Your keepalived configuration looks good. But you need to remove set_dlg_sharing_tag("vip") form invite block on second opensips server. Follow these steps to troubleshoot your issue - 1. Remove set_dlg_sharing_tag("vip") from OpenSIPS 2nd. 2. Before making a test call make sure OpenSIPS 1 has a active tag 3. Make a test call, and check dialog - opensipsctl fifo dlg_list_ctx And make sure your dialog has a TAG attach to it. 4. Check the tag on opensips 2nd server. 5. Stop opensips service on 1st server. 6. Check tag on 2nd Opensips server. If active tag is not there then you need to troubleshoot keepalived. Let me know how it goes. Thanks you ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Active-Pasive Dialog Replication
Hello, I'm using Keealived for configuration: OpensSIPs1 IP 1.2.3.4 OpenSIPs2 IP 5.6.7.8 Virtual IP: 10.11.12.13 OpenSIPs1: *keepalived.conf* vrrp_script check_sip { *script "/etc/keepalived/node01.sh"* interval 3 fall 2 rise 2 } vrrp_instance VI_OS { state MASTER interface eth0 virtual_router_id 1 advert_int 1 *notify /etc/keepalived/opensips.sh* virtual_ipaddress { 10.11.12.13 dev eth0 } track_script { check_sip } } each time there is a change in the servers status, keepalived ejecute opensips.sh script *node01.sh* #!/bin/bash node01=1.2.3.4 node02=5.6.7.8 *return_code=0* timeout 2 sipsak -s sip:$node01:5060 exit_status=$? if [[ $exit_status -eq 0 ]]; then echo "sip ping successful to node01 [$node01]" exit $return_code fi timeout 2 sipsak -s sip:$node02:5060 exit_status=$? if [[ $exit_status -eq 0 ]]; then echo "sip ping successful to node02 [$node02]" return_code=1 fi echo "return code [$return_code]" exit $return_code *opensips.sh* #!/bin/bash TYPE=$1 NAME=$2 STATE=$3 case $STATE in "MASTER") /usr/sbin/opensipsctl fifo dlg_set_sharing_tag_active vip /usr/sbin/opensipsctl fifo nh_enable_ping 1 exit 0 ;; "BACKUP") /usr/sbin/opensipsctl fifo dlg_list_sharing_tags /usr/sbin/opensipsctl fifo nh_enable_ping 0 exit 0 ;; "FAULT") /usr/sbin/opensipsctl fifo dlg_list_sharing_tags /usr/sbin/opensipsctl fifo nh_enable_ping 0 exit 0 ;; *) echo "unknown state" exit 1 ;; esac in this file I move the sharing tag and pinging NAT in the MASTER status and remove in BAKCUP and FAULT status OpenSIPs2: *keepalived.conf* vrrp_script check_sip { script "/etc/keepalived/node02.sh" interval 3 fall 2 rise 2 } vrrp_instance VI_OS { state BACKUP interface eth0 virtual_router_id 1 advert_int 1 notify /etc/keepalived/opensips.sh virtual_ipaddress { 10.11.12.13 dev eth0 } track_script { check_sip } } *node02.sh* #!/bin/bash node01=1.2.3.4 node02=5.6.7.8 *return_code=1* timeout 2 sipsak -s sip:$node01:5060 exit_status=$? if [[ $exit_status -eq 0 ]]; then echo "sip ping successful to node01 [$node01]" exit $return_code fi timeout 2 sipsak -s sip:$node02:5060 exit_status=$? if [[ $exit_status -eq 0 ]]; then echo "sip ping successful to node02 [$node02]" return_code=0 fi echo "return code [$return_code]" exit $return_code *opensips.sh* #!/bin/bash TYPE=$1 NAME=$2 STATE=$3 case $STATE in "MASTER") /usr/sbin/opensipsctl fifo dlg_set_sharing_tag_active vip /usr/sbin/opensipsctl fifo nh_enable_ping 1 exit 0 ;; "BACKUP") /usr/sbin/opensipsctl fifo dlg_list_sharing_tags /usr/sbin/opensipsctl fifo nh_enable_ping 0 exit 0 ;; "FAULT") /usr/sbin/opensipsctl fifo dlg_list_sharing_tags /usr/sbin/opensipsctl fifo nh_enable_ping 0 exit 0 ;; *) echo "unknown state" exit 1 ;; esac Then you have to install sipsak and change your iptables configuration. opensips.cfg OpenSIPs1: listen=udp:1.2.3.4:5060 listen=udp:10.11.12.13:5060 DIALOG module loadmodule "dialog.so" modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "default_timeout", 21600) modparam("dialog", "db_mode", 0) modparam("dialog", "dlg_sharing_tag", "vip=active") modparam("dialog", "dialog_replication_cluster", 3) modparam("dialog", "db_url","mysql://opensips:password@localhost/opensips") if (is_method("INVITE")) { route(AUTH); create_dialog(); set_dlg_sharing_tag("vip"); do_accounting("db","cdr"); if (isbflagset(NAT)) setflag(NAT); } OpenSIPs2: listen=udp:5.6.7.8:5060 listen=udp:10.11.12.13:5060 DIALOG module loadmodule "dialog.so" modparam("dialog", "dlg_match_mode", 1) modparam("dialog", "default_timeout", 21600) modparam("dialog", "db_mode", 0) modparam("dialog", "dlg_sharing_tag", "vip=backup") modparam("dialog", "dialog_replication_cluster", 3) modparam("dialog", "db_url","mysql://opensips:password@localhost/opensips") same INVITE block https://blog.voipxswitch.com/2017/12/26/kamailio-high-availability-using-keepalived/ Regards --- I'm SoCIaL, MayBe El 13/03/2020 a las 12:20, Sharad Kumar via Users escribió: Hi, Can you show us that how you are creating dialogs ? and where are you setting your sharing tag, like this - set_dlg_sharing_tag("vip"); Thank you ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users ___ Users mailing list
Re: [OpenSIPS-Users] Active-Pasive Dialog Replication
Hi, Can you show us that how you are creating dialogs ? and where are you setting your sharing tag, like this - set_dlg_sharing_tag("vip"); Thank you ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Re: [OpenSIPS-Users] Active-Pasive Dialog Replication [SOLVED]
Was a VPS Provider routing problem. Thank you --- I'm SoCIaL, MayBe El 13/03/2020 a las 10:09, Social Boh escribió: Hello, I'm testing Active-Pasive dialog replication with Virtual IP so the idea is if Active node go down, the Pasive begin Active and take the Active sharing tag to manage the active dialogs. On the DIALOG Module, i'm using: node 1 (Active) modparam("dialog", "db_mode", 0) modparam("dialog", "dlg_sharing_tag", "vip=active") modparam("dialog", "dialog_replication_cluster", 3) node 2 (Pasive) modparam("dialog", "db_mode", 0) modparam("dialog", "dlg_sharing_tag", "vip=backup") modparam("dialog", "dialog_replication_cluster", 3) My test is very simple. Make a call between two user, answer and then stop Active OpenSIPs. I'm using Keepalived to transfer Virtual IP and sharing tag from the Active OpenSIPs to Pasive. The audio still funcioning because RTPENGINE is on another server. The problem is with Dialog Termination. If a user hangup, the BYE go from the user to VIP but the Pasive OpenSIPs does not answer although the tag is correctly traslate to this Server. Any hint, please? ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users
[OpenSIPS-Users] Active-Pasive Dialog Replication
Hello, I'm testing Active-Pasive dialog replication with Virtual IP so the idea is if Active node go down, the Pasive begin Active and take the Active sharing tag to manage the active dialogs. On the DIALOG Module, i'm using: node 1 (Active) modparam("dialog", "db_mode", 0) modparam("dialog", "dlg_sharing_tag", "vip=active") modparam("dialog", "dialog_replication_cluster", 3) node 2 (Pasive) modparam("dialog", "db_mode", 0) modparam("dialog", "dlg_sharing_tag", "vip=backup") modparam("dialog", "dialog_replication_cluster", 3) My test is very simple. Make a call between two user, answer and then stop Active OpenSIPs. I'm using Keepalived to transfer Virtual IP and sharing tag from the Active OpenSIPs to Pasive. The audio still funcioning because RTPENGINE is on another server. The problem is with Dialog Termination. If a user hangup, the BYE go from the user to VIP but the Pasive OpenSIPs does not answer although the tag is correctly traslate to this Server. Any hint, please? -- --- I'm SoCIaL, MayBe ___ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users