Re: [OpenSIPS-Users] mid registrar

2018-06-20 Thread vasilevalex
Hi Liviu!

Thank you very much. I'll test them and will answer here.



--
Sent from: 
http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] 2.4 and AnyCast Setup

2018-06-20 Thread Jonathan Mabrito
Hoping I can get some guidance/pointed in the right direction on this
subject. Looking at standing up a 2.4 AnyCast 2 node cluster and try out
the new 2.4 dialog cluster features (will be a upgrade/migration from 2.3).
Not entirely sure what is needed to make this work from the AnyCast
perspective

When setting up AnyCast, I know the network and routers need some config to
support AnyCast. I know this question falls more in the topics of
networking, but hoping I can get some guidance on what was done maybe on
the test servers when it was developed? Not looking for specific configs,
just xyz you should look at this or that type responses if possible.

Right now, I have the two nodes stood up, but the AnyCast IP I am trying to
bring online is not reachable yet. I know I need to do some network
statements, just trying to grasp what they are.

Any advice/help to point me in the right direction would be appreciated.
-- 
-Jonathan
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] mid registrar

2018-06-20 Thread Liviu Chircu

Hi, Alex!

I have pushed a set of commits [1], [2] on master branch which fix this 
issue.  Please let me know if you need any more help including them in 
your test build.


Best regards,

[1]: https://github.com/OpenSIPS/opensips/commit/d8fe587cef17421
[2]: https://github.com/OpenSIPS/opensips/commit/78902eb60698ac0

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 13.06.2018 16:56, Liviu Chircu wrote:

Hi Alexei,

Indeed, it seems the mid-registrar data ("kv_store" column) only gets 
sync'ed to DB starting with the 2nd REGISTER, despite the 
"write-through" mode.  I'll take a closer look and will update you on 
the progress in this thread.  Thank you for the report!


Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 12.06.2018 10:47, vasilevalex wrote:

I have issue with very simple setup.

Two OpenSIPS servers (first is Active, second starts with keepalived 
only on
Active server failure, so not a cluster at all) connected to MariaDB 
with

same configs. Asterisk farm is registrar.

# USeR LOCation module
loadmodule "usrloc.so"
modparam("usrloc", "nat_bflag", "NAT")
modparam("usrloc", "working_mode_preset",
"single-instance-sql-write-through")
modparam("usrloc", "db_url", "DB_URL")

 Mid Registrar module
loadmodule "mid_registrar.so"
modparam("mid_registrar", "mode", 2) /* 0 = mirror / 1 = ct / 2 = AoR */
modparam("mid_registrar", "outgoing_expires", 1800)
modparam("mid_registrar", "received_avp", "$avp(received_uri)")
modparam("mid_registrar", "tcp_persistent_flag",
"TCP_PERSIST_REGISTRATIONS")

This setup works somehow. Failover server starts with all locations
consistent and continues working. But when there are several switching
between Active/Failover in relatively short time, like 5-10 minutes then
most of the phones can't update their registrations because of the 
errors:


ERROR:mid_registrar:process_contacts_by_aor: 'last_reg_ts' key not 
found!


Only cleaning user location helps, like "opensipsctl ul rm " 
After that

phone can register again.



--
Sent from: 
http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html


___
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



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] mid registrar

2018-06-20 Thread Slava Bendersky

Thank you for explanation.

volga629

On Fri, Jun 8, 2018 at 6:34 AM, Liviu Chircu  wrote:
First of all: mid-registrar + clustering is still uncharted 
territory, I haven't done any testing yet with this setup.


Disclaimer aside, this setup should somewhat work:

* [CORRECT] mid-registrar saved contacts should propagate through the 
cluster just like with registrar. They will contain the short 
lifetime of the UAC side, not the longer lifetime shown to the 
backend registrar
* [CORRECT] throttled contact updates should propagate through the 
cluster just like with registrar (although we absorb the REGISTER, we 
instruct other nodes to update their cache, so they don't delete the 
contact prematurely)
* [INCORRECT] the mid-registrar semantics (specific fields) are not 
getting replicated to other nodes. If you fail over to another 
mid-registrar within the cluster, you won't be able to throttle 
contacts anymore. In fact, you should see something like:


ERROR:'last_reg_ts' key not found!

, and the handling for the "inherited" REGISTER traffic would 
completely fail.


To sum up: this setup should "kinda" work, but it's not going to be 
fully useful unless we fix it. Replicating the "kv_store" should not 
be complicated at all (actually, it seems to be a 50-line patch at 
most), but it will require the usual bit of testing / fiddling around 
until all corner-cases are covered.


We've not had requests for this feature up until now, but I've logged 
it on GitHub, so we can start a discussion [1]


Best regards,

[1]: https://github.com/OpenSIPS/opensips/issues/1379

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 08.06.2018 12:13, volga...@networklab.ca wrote:

Hello Liviu,
What will happened if set federation-cachedb-cluster and mid 
registrar is in use.



volga629

On Fri, Jun 8, 2018 at 5:41 AM, Liviu Chircu  
wrote:

Hi Volga,

The mid-registrar has full DB persistency support since 2.4. It 
works with all the user location presets except the "DB only" 
ones. For example, you only have to set:


modparam("usrloc", "working_mode_preset", 
"single-instance-sql-write-through")


or

modparam("usrloc", "working_mode_preset", 
"single-instance-sql-write-back")


Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 08.06.2018 02:48, volga...@networklab.ca wrote:

Hello Everyone,
Is possible configure mid registrar with database persistency ?



volga629


___
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



___
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



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users