[OpenSIPS-Users] Dialog module - profile replication not working
Liviu Chircu
liviu at opensips.org
Thu May 11 11:41:05 EDT 2017
Hi, John!
First of all, this is a known issue [1] with the 2.2 clusterer, where
you cannot use both replication mechanisms of dialog concurrently. This
has been fixed in 2.3 and above, and required a significant code
refactoring, which is unlikely to get backported soon.
Secondly, what you are trying to do is unlikely to solve your problem
even with 2.3+, as the dialog replication mechanism __already__
broadcasts the profiles of each box throughout its cluster.
Consequently, reusing the same cluster id to share the profiles between
boxes (yet again) will effectively double the value of each profile. If
I correctly understand your intention, simply enabling dialog
replication (profile included) will solve your problem. Please correct
me if I'm wrong.
The documentation could use some improvements in order to reflect the
following (I will take care of this):
* dialog replication allows you to have "hot backups". Profiles are
included. Recommended cluster size: 2
* profile replication is meant to be used in
active-active-...-active setups, in order to easily achieve whatever
platform-wide limitations you may think of. The OpenSIPS cluster size
can grow indefinitely here.
Some food for thought: currently in OpenSIPS 2.3+, although merging the
above two concepts will work, the profiles are likely to be counted more
than once, and your limits will hit faster. The clusterer needs more
love in order to support "profile sharing between highly available
clusters".
Best regards,
[1]: https://github.com/OpenSIPS/opensips/issues/938
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
On 10.05.2017 14:26, John Quick wrote:
> Hello all,
>
> Using version 2.2.3 on Debian with clusterer and dialog modules.
> The clusterer uses a bin socket for communication (port 5678) and there is a
> server at each of two sites.
> The opensips.cfg file is almost identical at each site, other than for the
> differing IP addresses.
> Both sites are connected to the same database cluster - they both share the
> same database.
>
> The dialog module has a profile with value defined that is used to count
> concurrent calls against account ID.
> modparam("dialog", "db_mode", 1)
> modparam("dialog", "dlg_match_mode", 0)
> modparam("dialog", "rr_param", "cabc")
> modparam("dialog", "default_timeout", 43200)
> modparam("dialog", "enable_stats", 1)
> modparam("dialog", "log_profile_hash_size", 11) # allows over 2000
> modparam("dialog", "profiles_with_value", "concurrent")
> modparam("dialog", "accept_replicated_dialogs", 1)
> modparam("dialog", "replicate_dialogs_to", 1)
> modparam("dialog", "accept_replicated_profiles", 1)
> modparam("dialog", "replicate_profiles_to", 1)
>
> When a test call is made on the server at site 1, I would expect to be able
> to see that call on the server at site 2.
> I am using this command:
> opensipsctl fifo profile_get_values concurrent
>
> However, it only shows me the call on site 1 like this:
> value:: 01234123412 count=1
> Using the same command at site 2 there is no output.
>
> I've tried it with and without these two lines, but the result is the same:
> modparam("dialog", "accept_replicated_dialogs", 1)
> modparam("dialog", "replicate_dialogs_to", 1)
>
> The clusterer interconnection appears to be working okay.
> Site1# opensipsctl fifo clusterer_list
> Cluster:: 1
> Server:: 3 DB_ID=10 URL=bin:123.456.28.50:5678 State=1
> Last_failed_attempt=0 Max_failed_attempts=3 no_tries=0
> Seconds_until_enabling=30 Description=Site2
> Site2# opensipsctl fifo clusterer_list
> Cluster:: 1
> Server:: 1 DB_ID=4 URL=bin:123.456.29.50:5678 State=1
> Last_failed_attempt=1494413 Max_failed_attempts=3 no_tries=0
> Seconds_until_enabling=30 Description=Site1
>
> Have I misunderstood what profile replication should do?
> If not, how do I set about debugging this please?
>
> John Quick
> Smartvox Limited
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list