[OpenSIPS-Users] re-homing calls

Răzvan Crainea razvan at opensips.org
Fri Jun 7 11:45:45 UTC 2024


Hi, Alberto!

Unfortunately the image you provided that shows how to migrate calls 
back to the primary server does no longer work. Can you please re-share 
it, or, explain what you want to show/prove in that image? Is the 
re-INVITE sent and properly accepted?

Best regards,

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

On 5/31/24 12:15 AM, Alberto wrote:
> Hi,
> 
> I'm testing
> https://blog.opensips.org/2019/10/03/re-homing-your-calls-with-opensips-3-0/
> and I have a problem with re-homing calls from the backup server back to
> the primary server.
> 
> My configuration is as follows:
> shared mongodb : 172.20.2.19
> opensips virtual floating ip : 172.20.2.20
> opensips-0 : 172.20.2.21
> opensips-1 : 172.20.2.22
> 
> to float the ip, i'm using keepalived monitoring both the network and the
> opensips process.
> When it detects the virtual ip has become available locally, keepalived
> does this:
> 
> opensips-cli -x mi clusterer_shtag_set_active testtag/1
> opensips-cli -x mi dlg_list | jq -r '.Dialogs[] | .callid' | while IFS=''
> read -r callid; do
>    opensips-cli -x mi dlg_send_sequential callid=${callid} mode=challenge
> body=inbound
> done
> 
> Now I'm testing 2 scenarios, in the first one the opensips process on the
> primary server terminates, in the second scenario the network to the
> primary server is interrupted.
> In both cases I expect calls to be re-homed to the backup server (which
> always happens) and to come back to the primary server when the problem has
> been resolved (which doesn't always happen).
> 
> Here's the breakdown of the 2 tests.
> 
> So, when I start a call through opensips-0 and then kill the opensips
> process, the virtual ip floats to the secondary server, and all calls are
> migrated to the backup server.
> When the opensips process is restarted, the ip floats back to the primary
> server and all calls are migrated back.
> All good here.
> 
> However, when I start a call through opensips-0 and pull the network cable,
> the virtual ip floats to the secondary server and all calls are migrated.
> But, when the network is restored and the ip floats back to the primary
> server, calls fail to migrate back.
> In the screenshot attached here you can see the invite that should migrate
> the calls back to the primary server.
> https://ibb.co/m4trL1Y
> Note that in this second scenario opensips loses connectivity, but it
> doesn't restart.
> 
> I tried to do `opensips-cli -x mi dlg_cluster_sync` and/or `opensips-cli -x
> mi dlg_restore_db` on the primary server before the tag is set to active
> and calls are migrated back, but it didn't help.
> 
> I hope this makes some sense.
> Is there any other info or test I can provide?
> Thanks
> AR
> 
> 
> Hi,
> 
> I'm testing 
> https://blog.opensips.org/2019/10/03/re-homing-your-calls-with-opensips-3-0/ <https://blog.opensips.org/2019/10/03/re-homing-your-calls-with-opensips-3-0/> and I have a problem with re-homing calls from the backup server back to the primary server.
> 
> My configuration is as follows:
> shared mongodb : 172.20.2.19
> opensips virtual floating ip : 172.20.2.20
> opensips-0 : 172.20.2.21
> opensips-1 : 172.20.2.22
> 
> to float the ip, i'm using keepalived monitoring both the network and 
> the opensips process.
> When it detects the virtual ip has become available locally, keepalived 
> does this:
> 
> opensips-cli -x mi clusterer_shtag_set_active testtag/1
> opensips-cli -x mi dlg_list | jq -r '.Dialogs[] | .callid' | while 
> IFS='' read -r callid; do
>    opensips-cli -x mi dlg_send_sequential callid=${callid} 
> mode=challenge body=inbound
> done
> 
> Now I'm testing 2 scenarios, in the first one the opensips process on 
> the primary server terminates, in the second scenario the network to the 
> primary server is interrupted.
> In both cases I expect calls to be re-homed to the backup server (which 
> always happens) and to come back to the primary server when the problem 
> has been resolved (which doesn't always happen).
> 
> Here's the breakdown of the 2 tests.
> 
> So, when I start a call through opensips-0 and then kill the opensips 
> process, the virtual ip floats to the secondary server, and all calls 
> are migrated to the backup server.
> When the opensips process is restarted, the ip floats back to the 
> primary server and all calls are migrated back.
> All good here.
> 
> However, when I start a call through opensips-0 and pull the network 
> cable, the virtual ip floats to the secondary server and all calls are 
> migrated.
> But, when the network is restored and the ip floats back to the primary 
> server, calls fail to migrate back.
> In the screenshot attached here you can see the invite that should 
> migrate the calls back to the primary server.
> https://ibb.co/m4trL1Y <https://ibb.co/m4trL1Y>
> Note that in this second scenario opensips loses connectivity, but it 
> doesn't restart.
> 
> I tried to do `opensips-cli -x mi dlg_cluster_sync` and/or `opensips-cli 
> -x mi dlg_restore_db` on the primary server before the tag is set to 
> active and calls are migrated back, but it didn't help.
> 
> I hope this makes some sense.
> Is there any other info or test I can provide?
> Thanks
> AR
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list