[OpenSIPS-Users] re-homing calls

Alberto alberto.rinaudo at gmail.com
Thu May 30 21:15:05 UTC 2024


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240530/dfc30e29/attachment-0001.html>


More information about the Users mailing list