Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker so if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering is there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent user registration using the subscriber table for example.
Thanks in advance and Best regards.
Hi Mahmoud
Please share your configuration
//Gafar
On Sat, Dec 27, 2014 at 1:07 AM, Mahmoud Ramadan Ali < cisco.and.more.blog@gmail.com> wrote:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker so if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering is there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent user registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Adul No thing special.It is a normal virtual IP configuration using heartbeat and pacemaker.Check this http://opentodo.net/2012/04/configuring-a-failover-cluster-with-heartbeat-pa... for more Info.
On Fri, Dec 26, 2014 at 8:22 PM, Abdul Gafar abdul.gafar.tim@gmail.com wrote:
Hi Mahmoud
Please share your configuration
//Gafar
On Sat, Dec 27, 2014 at 1:07 AM, Mahmoud Ramadan Ali < cisco.and.more.blog@gmail.com> wrote:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker so if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering is there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent user registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Mahmoud,
Thy typical way, to build a Active/Active setup is by using DNS-SRV records. The two servers get different IPs and you announce both IPs using DNS to the devices. Most common User-Agents support this nowadays, so that's kind of easy. It is specified in RFC3263: "Locating SIP-Servers" (http://tools.ietf.org/html/rfc3263).
However, when using DNS-SRV records, dialogs and transactions are still associated with a single server, even though the User-Agent has an Alternative, in case one server fails. If you want to increase the HA for this, you can advertise the Domain name instead of an IP (causes more DNS-Lookups).
You can share the dialog state between two nodes by using the dialog module in db-only mode (db_mode = 1, see http://kamailio.org/docs/modules/devel/modules/dialog.html#idp15368320). You cannot share transactions between two nodes, only dialogs.
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
At a big operator, we've used a combination of the two: Active/Passive for one site and DNS-SRV to distribute it among different sites.
Kind regards, Carsten
2014-12-26 19:07 GMT+01:00 Mahmoud Ramadan Ali cisco.and.more.blog@gmail.com:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker so if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering is there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent user registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Thank you Carsten... Very useful information, i will try this and contact the mailing list if i have issues.
On Sun, Dec 28, 2014 at 1:44 AM, Carsten Bock carsten@ng-voice.com wrote:
Hi Mahmoud,
Thy typical way, to build a Active/Active setup is by using DNS-SRV records. The two servers get different IPs and you announce both IPs using DNS to the devices. Most common User-Agents support this nowadays, so that's kind of easy. It is specified in RFC3263: "Locating SIP-Servers" (http://tools.ietf.org/html/rfc3263).
However, when using DNS-SRV records, dialogs and transactions are still associated with a single server, even though the User-Agent has an Alternative, in case one server fails. If you want to increase the HA for this, you can advertise the Domain name instead of an IP (causes more DNS-Lookups).
You can share the dialog state between two nodes by using the dialog module in db-only mode (db_mode = 1, see http://kamailio.org/docs/modules/devel/modules/dialog.html#idp15368320). You cannot share transactions between two nodes, only dialogs.
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
At a big operator, we've used a combination of the two: Active/Passive for one site and DNS-SRV to distribute it among different sites.
Kind regards, Carsten
2014-12-26 19:07 GMT+01:00 Mahmoud Ramadan Ali < cisco.and.more.blog@gmail.com>:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker
so
if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one
server
will process the SIP signaling until it goes down and i'm wondering is
there
is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling
will
be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent
user
registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 28 Dec 2014, at 09:25, Mahmoud Ramadan Ali cisco.and.more.blog@gmail.com wrote:
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
Carsten is completely right, the primary alternative is using DNS SRV records for load balancing and failover.
The only issue is if you have NAT clients that lock to a single IP. In that case, you may want to look into IP failover.
For more information about DNS SRV and NAPTR you can take a look at my presentation about SIP and DNS on Slideshare: http://www.slideshare.net/oej/sip-and-dns
/O
Hi Carsten and Olle, I need some clarification regarding to the servers DB on the cluster please.Do i need to configure MySQL DB replication and use that module http://kamailio.org/docs/modules/4.1.x/modules/db_cluster.html to make the servers use both of the DBs for read and write operations as a prerequisites to the db_mode = 1 to synchronize the active dialogs ?!
Best Regards and Thanks in Advance.
On Sun, Dec 28, 2014 at 10:50 AM, Olle E. Johansson oej@edvina.net wrote:
On 28 Dec 2014, at 09:25, Mahmoud Ramadan Ali < cisco.and.more.blog@gmail.com> wrote:
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
Carsten is completely right, the primary alternative is using DNS SRV records for load balancing and failover.
The only issue is if you have NAT clients that lock to a single IP. In that case, you may want to look into IP failover.
For more information about DNS SRV and NAPTR you can take a look at my presentation about SIP and DNS on Slideshare: http://www.slideshare.net/oej/sip-and-dns
/O
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 27 December 2014 at 23:44, Carsten Bock carsten@ng-voice.com wrote:
Hi Mahmoud,
Thy typical way, to build a Active/Active setup is by using DNS-SRV records. The two servers get different IPs and you announce both IPs using DNS to the devices. Most common User-Agents support this nowadays, so that's kind of easy. It is specified in RFC3263: "Locating SIP-Servers" (http://tools.ietf.org/html/rfc3263).
However, when using DNS-SRV records, dialogs and transactions are still associated with a single server, even though the User-Agent has an Alternative, in case one server fails. If you want to increase the HA for this, you can advertise the Domain name instead of an IP (causes more DNS-Lookups).
Just a word of caution here, there are several SIP stacks which don't handle SRV lookups correctly. I don't mean to discourage you from this, but just to be aware of it. For example, Mobicents only understands SRV record sets which return domain names. If you return IPs, Mobicents will go ahead and look them up as A records and fail.
You can share the dialog state etween two nodes by using the dialog module in db-only mode (db_mode = 1, see http://kamailio.org/docs/modules/devel/modules/dialog.html#idp15368320). You cannot share transactions between two nodes, only dialogs.
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
At a big operator, we've used a combination of the two: Active/Passive for one site and DNS-SRV to distribute it among different sites.
Kind regards, Carsten
2014-12-26 19:07 GMT+01:00 Mahmoud Ramadan Ali < cisco.and.more.blog@gmail.com>:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker
so
if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one
server
will process the SIP signaling until it goes down and i'm wondering is
there
is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling
will
be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent
user
registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 29 Dec 2014, at 12:13, Ben Langfeld ben@langfeld.co.uk wrote:
On 27 December 2014 at 23:44, Carsten Bock carsten@ng-voice.com wrote: Hi Mahmoud,
Thy typical way, to build a Active/Active setup is by using DNS-SRV records. The two servers get different IPs and you announce both IPs using DNS to the devices. Most common User-Agents support this nowadays, so that's kind of easy. It is specified in RFC3263: "Locating SIP-Servers" (http://tools.ietf.org/html/rfc3263).
However, when using DNS-SRV records, dialogs and transactions are still associated with a single server, even though the User-Agent has an Alternative, in case one server fails. If you want to increase the HA for this, you can advertise the Domain name instead of an IP (causes more DNS-Lookups).
Just a word of caution here, there are several SIP stacks which don't handle SRV lookups correctly. I don't mean to discourage you from this, but just to be aware of it. For example, Mobicents only understands SRV record sets which return domain names. If you return IPs, Mobicents will go ahead and look them up as A records and fail.
RFC 2782 says that the target has to be a name which you look up in the next step. I'm not clear that a name can't be an IP address, but there's no example of that. It's an interesting question. I see no reason for adding IP addresses there though.
Asterisk fails miserably in DNS SRV support. Been working on fixing that for chan_sip for a while, but the DNS code is really bad and hard to clean up.
/O
You can share the dialog state etween two nodes by using the dialog module in db-only mode (db_mode = 1, see http://kamailio.org/docs/modules/devel/modules/dialog.html#idp15368320). You cannot share transactions between two nodes, only dialogs.
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
At a big operator, we've used a combination of the two: Active/Passive for one site and DNS-SRV to distribute it among different sites.
Kind regards, Carsten
2014-12-26 19:07 GMT+01:00 Mahmoud Ramadan Ali cisco.and.more.blog@gmail.com:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker so if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering is there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent user registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Ben,
that's absolutely for sure! It took us ~2 years to get the DNS-SRV implementation of major DSL-Modem-Manufacturer right ;-) Nevertheless, it's the way to go for redundancy. And since Mobicents is open-source, we can probably simply provide a patch to fix it :-)
Kind regards, Carsten
2014-12-29 12:13 GMT+01:00 Ben Langfeld ben@langfeld.co.uk:
On 27 December 2014 at 23:44, Carsten Bock carsten@ng-voice.com wrote:
Hi Mahmoud,
Thy typical way, to build a Active/Active setup is by using DNS-SRV records. The two servers get different IPs and you announce both IPs using DNS to the devices. Most common User-Agents support this nowadays, so that's kind of easy. It is specified in RFC3263: "Locating SIP-Servers" (http://tools.ietf.org/html/rfc3263).
However, when using DNS-SRV records, dialogs and transactions are still associated with a single server, even though the User-Agent has an Alternative, in case one server fails. If you want to increase the HA for this, you can advertise the Domain name instead of an IP (causes more DNS-Lookups).
Just a word of caution here, there are several SIP stacks which don't handle SRV lookups correctly. I don't mean to discourage you from this, but just to be aware of it. For example, Mobicents only understands SRV record sets which return domain names. If you return IPs, Mobicents will go ahead and look them up as A records and fail.
You can share the dialog state etween two nodes by using the dialog module in db-only mode (db_mode = 1, see http://kamailio.org/docs/modules/devel/modules/dialog.html#idp15368320). You cannot share transactions between two nodes, only dialogs.
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
At a big operator, we've used a combination of the two: Active/Passive for one site and DNS-SRV to distribute it among different sites.
Kind regards, Carsten
2014-12-26 19:07 GMT+01:00 Mahmoud Ramadan Ali cisco.and.more.blog@gmail.com:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker so if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering is there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent user registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Good point. Mobicents is on my list of projects to which I'm due to contribute something. I'll get on it shortly.
On 29 December 2014 at 11:26, Carsten Bock carsten@ng-voice.com wrote:
Hi Ben,
that's absolutely for sure! It took us ~2 years to get the DNS-SRV implementation of major DSL-Modem-Manufacturer right ;-) Nevertheless, it's the way to go for redundancy. And since Mobicents is open-source, we can probably simply provide a patch to fix it :-)
Kind regards, Carsten
2014-12-29 12:13 GMT+01:00 Ben Langfeld ben@langfeld.co.uk:
On 27 December 2014 at 23:44, Carsten Bock carsten@ng-voice.com wrote:
Hi Mahmoud,
Thy typical way, to build a Active/Active setup is by using DNS-SRV records. The two servers get different IPs and you announce both IPs using DNS to the devices. Most common User-Agents support this nowadays, so that's kind of easy. It is specified in RFC3263: "Locating SIP-Servers" (http://tools.ietf.org/html/rfc3263).
However, when using DNS-SRV records, dialogs and transactions are still associated with a single server, even though the User-Agent has an Alternative, in case one server fails. If you want to increase the HA for this, you can advertise the Domain name instead of an IP (causes more DNS-Lookups).
Just a word of caution here, there are several SIP stacks which don't
handle
SRV lookups correctly. I don't mean to discourage you from this, but
just to
be aware of it. For example, Mobicents only understands SRV record sets which return domain names. If you return IPs, Mobicents will go ahead and look them up as A records and fail.
You can share the dialog state etween two nodes by using the dialog module in db-only mode (db_mode = 1, see http://kamailio.org/docs/modules/devel/modules/dialog.html#idp15368320
).
You cannot share transactions between two nodes, only dialogs.
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
At a big operator, we've used a combination of the two: Active/Passive for one site and DNS-SRV to distribute it among different sites.
Kind regards, Carsten
2014-12-26 19:07 GMT+01:00 Mahmoud Ramadan Ali cisco.and.more.blog@gmail.com:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and
Pacemaker
so if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering is there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a
cluster
mode ? i want to replicate all the DBs of the server to get consistent user registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
Hi Dears, Nobody answered my simple question yet ! what are the prerequisites that i need prior to using the db_mode = 1 dialog parameter to synchronize the dialogs between the two servers ? Do i need to configure Mysql DB Master / Master replication or use only the DB_Cluster module http://kamailio.org/docs/modules/4.1.x/modules/db_cluster.html to tell the servers where to synchronize dialogs ? in other words in Opensips there is a module parameter modparam("dialog", "replicate_dialogs_to", " 192.168.1.111:8080") to designate the destination that will send the dialogs to BUT such parameter is NOT exist in the Kamailio dialog module Doc so how the two Kamailo server will know about its peer to send dialogs to it ?!
Best regards
On Mon, Dec 29, 2014 at 1:32 PM, Ben Langfeld ben@langfeld.me wrote:
Good point. Mobicents is on my list of projects to which I'm due to contribute something. I'll get on it shortly.
On 29 December 2014 at 11:26, Carsten Bock carsten@ng-voice.com wrote:
Hi Ben,
that's absolutely for sure! It took us ~2 years to get the DNS-SRV implementation of major DSL-Modem-Manufacturer right ;-) Nevertheless, it's the way to go for redundancy. And since Mobicents is open-source, we can probably simply provide a patch to fix it :-)
Kind regards, Carsten
2014-12-29 12:13 GMT+01:00 Ben Langfeld ben@langfeld.co.uk:
On 27 December 2014 at 23:44, Carsten Bock carsten@ng-voice.com
wrote:
Hi Mahmoud,
Thy typical way, to build a Active/Active setup is by using DNS-SRV records. The two servers get different IPs and you announce both IPs using DNS to the devices. Most common User-Agents support this nowadays, so that's kind of easy. It is specified in RFC3263: "Locating SIP-Servers" (http://tools.ietf.org/html/rfc3263).
However, when using DNS-SRV records, dialogs and transactions are still associated with a single server, even though the User-Agent has an Alternative, in case one server fails. If you want to increase the HA for this, you can advertise the Domain name instead of an IP (causes more DNS-Lookups).
Just a word of caution here, there are several SIP stacks which don't
handle
SRV lookups correctly. I don't mean to discourage you from this, but
just to
be aware of it. For example, Mobicents only understands SRV record sets which return domain names. If you return IPs, Mobicents will go ahead
and
look them up as A records and fail.
You can share the dialog state etween two nodes by using the dialog module in db-only mode (db_mode = 1, see http://kamailio.org/docs/modules/devel/modules/dialog.html#idp15368320
).
You cannot share transactions between two nodes, only dialogs.
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
At a big operator, we've used a combination of the two: Active/Passive for one site and DNS-SRV to distribute it among different sites.
Kind regards, Carsten
2014-12-26 19:07 GMT+01:00 Mahmoud Ramadan Ali cisco.and.more.blog@gmail.com:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and
Pacemaker
so if one of the two servers should go down the other server will own
the
virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering
is
there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a
cluster
mode ? i want to replicate all the DBs of the server to get
consistent
user registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Mahmoud,
maybe no-one answered, since it is holiday season and we don't have guaranteed response times for an open-source mailinglist? Everybody does community work beside their regular job for free...
You basically need to share a database between the two. There is not "the one-and-only" way to do this, there are different options here. You can either use db_cluster to write to several databases in parallel or you can use some sort of Multi-Master Replication at database level. The only requirement is, that both servers have the same data at the same time, no matter how you achieve it.
I personally prefer Maria-DBs Galera Multi-Master-Replication in conjunction with db_cluster, where i use db_cluster just for database failover (i have a primary and a backup database server for my Kamailio-Servers). But that's only my personal view on it.
Thanks, Carsten
2014-12-29 17:01 GMT+01:00 Mahmoud Ramadan Ali cisco.and.more.blog@gmail.com:
Hi Dears, Nobody answered my simple question yet ! what are the prerequisites that i need prior to using the db_mode = 1 dialog parameter to synchronize the dialogs between the two servers ? Do i need to configure Mysql DB Master / Master replication or use only the DB_Cluster module http://kamailio.org/docs/modules/4.1.x/modules/db_cluster.html to tell the servers where to synchronize dialogs ? in other words in Opensips there is a module parameter modparam("dialog", "replicate_dialogs_to", "192.168.1.111:8080") to designate the destination that will send the dialogs to BUT such parameter is NOT exist in the Kamailio dialog module Doc so how the two Kamailo server will know about its peer to send dialogs to it ?!
Best regards
On Mon, Dec 29, 2014 at 1:32 PM, Ben Langfeld ben@langfeld.me wrote:
Good point. Mobicents is on my list of projects to which I'm due to contribute something. I'll get on it shortly.
On 29 December 2014 at 11:26, Carsten Bock carsten@ng-voice.com wrote:
Hi Ben,
that's absolutely for sure! It took us ~2 years to get the DNS-SRV implementation of major DSL-Modem-Manufacturer right ;-) Nevertheless, it's the way to go for redundancy. And since Mobicents is open-source, we can probably simply provide a patch to fix it :-)
Kind regards, Carsten
2014-12-29 12:13 GMT+01:00 Ben Langfeld ben@langfeld.co.uk:
On 27 December 2014 at 23:44, Carsten Bock carsten@ng-voice.com wrote:
Hi Mahmoud,
Thy typical way, to build a Active/Active setup is by using DNS-SRV records. The two servers get different IPs and you announce both IPs using DNS to the devices. Most common User-Agents support this nowadays, so that's kind of easy. It is specified in RFC3263: "Locating SIP-Servers" (http://tools.ietf.org/html/rfc3263).
However, when using DNS-SRV records, dialogs and transactions are still associated with a single server, even though the User-Agent has an Alternative, in case one server fails. If you want to increase the HA for this, you can advertise the Domain name instead of an IP (causes more DNS-Lookups).
Just a word of caution here, there are several SIP stacks which don't handle SRV lookups correctly. I don't mean to discourage you from this, but just to be aware of it. For example, Mobicents only understands SRV record sets which return domain names. If you return IPs, Mobicents will go ahead and look them up as A records and fail.
You can share the dialog state etween two nodes by using the dialog module in db-only mode (db_mode = 1, see
http://kamailio.org/docs/modules/devel/modules/dialog.html#idp15368320). You cannot share transactions between two nodes, only dialogs.
In addition, you can work with virtual IPs with Heartbeat/Pacemaker.
At a big operator, we've used a combination of the two: Active/Passive for one site and DNS-SRV to distribute it among different sites.
Kind regards, Carsten
2014-12-26 19:07 GMT+01:00 Mahmoud Ramadan Ali cisco.and.more.blog@gmail.com:
Hi Dears, I have successfully configured Kamailio HA using Heartbeat and Pacemaker so if one of the two servers should go down the other server will own the virtual IP address and take over. But i have two questions:
1.This model is considered to be Active / Passive redundancy so one server will process the SIP signaling until it goes down and i'm wondering is there is any way two achieve Active / Active redundancy and if so how the signaling will be handled on the servers so they can be aware of the transactions and dialogs traversing the servers ? does the signalling will be replicated or synchronized between the servers or what ?!
2.What about the servers DB and how they should be designed in a cluster mode ? i want to replicate all the DBs of the server to get consistent user registration using the subscriber table for example.
Thanks in advance and Best regards.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Carsten Bock CEO (Geschäftsführer)
ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany
http://www.ng-voice.com mailto:carsten@ng-voice.com
Office +49 40 5247593-0 Fax +49 40 5247593-99
Sitz der Gesellschaft: Hamburg Registergericht: Amtsgericht Hamburg, HRB 120189 Geschäftsführer: Carsten Bock Ust-ID: DE279344284
Hier finden Sie unsere handelsrechtlichen Pflichtangaben: http://www.ng-voice.com/imprint/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Subject: Re: [SR-Users] Kamailio Active / Active HA. Date: Mon, Dec 29, 2014 at 11:13:34AM +0000 Quoting Ben Langfeld (ben@langfeld.co.uk):
Just a word of caution here, there are several SIP stacks which don't handle SRV lookups correctly. I don't mean to discourage you from this, but just to be aware of it. For example, Mobicents only understands SRV record sets which return domain names. If you return IPs, Mobicents will go ahead and look them up as A records and fail.
I would never, ever, put an IP address in the Target field of a SRV record. The specification says:
Target The domain name of the target host. There MUST be one or more address records for this name, the name MUST NOT be an alias (in the sense of RFC 1034 or RFC 2181). Implementors are urged, but not required, to return the address record(s) in the Additional Data section. Unless and until permitted by future standards action, name compression is not to be used for this field.
RFC2782, p3
Pretty clear. A host name there should be, resolved to an AAAA/A record. Mobicents is actually Doing The Right Thing; even though one could claim the Robustness Principle in favour of the more lenient behaviour, it is indeed proper to expect to be able to do DNS AAAA/A lookups on the Target string.
Further, it is a syntax violation to put an IPv6 Address in the Target field. I made a copy of my zone file and threw in a bogus SRV record. Then I gave it to the BIND 10 syntax checker, which most predictably barfed on it:
ball-empfang:tmp mansaxel$ /usr/local/bind10-0a1/sbin/named-checkzone besserwisser.org bsu bsu:35: warning: 2001:470:28:842:201:2eff:fe48:86aa.besserwisser.org: bad name (check-names) zone besserwisser.org/IN: _knolk._tcp.besserwisser.org/SRV '2001:470:28:842:201:2eff:fe48:86aa.besserwisser.org' has no address records (A or AAAA) zone besserwisser.org/IN: loaded serial 2014122801 OK ball-empfang:tmp mansaxel$ sed -n 35p bsu _knolk._tcp 10 SRV 0 0 567 2001:470:28:842:201:2eff:fe48:86aa
So, dont! ;-)
/Måns, who has a population of specialised IP phone devices that most certainly won't do SRV.
On 30 December 2014 at 22:49, Måns Nilsson mansaxel@besserwisser.org wrote:
Subject: Re: [SR-Users] Kamailio Active / Active HA. Date: Mon, Dec 29, 2014 at 11:13:34AM +0000 Quoting Ben Langfeld (ben@langfeld.co.uk):
Just a word of caution here, there are several SIP stacks which don't handle SRV lookups correctly. I don't mean to discourage you from this,
but
just to be aware of it. For example, Mobicents only understands SRV
record
sets which return domain names. If you return IPs, Mobicents will go
ahead
and look them up as A records and fail.
I would never, ever, put an IP address in the Target field of a SRV record. The specification says:
Target The domain name of the target host. There MUST be one or more address records for this name, the name MUST NOT be an alias (in the sense of RFC 1034 or RFC 2181). Implementors are urged, but not required, to return the address record(s) in the Additional Data section. Unless and until permitted by future standards action, name compression is not to be used for this field.
RFC2782, p3
Pretty clear. A host name there should be, resolved to an AAAA/A record. Mobicents is actually Doing The Right Thing; even though one could claim the Robustness Principle in favour of the more lenient behaviour, it is indeed proper to expect to be able to do DNS AAAA/A lookups on the Target string.
Ah, I was not aware of this. Thanks for pointing it out :)
Further, it is a syntax violation to put an IPv6 Address in the Target field. I made a copy of my zone file and threw in a bogus SRV record. Then I gave it to the BIND 10 syntax checker, which most predictably barfed on it:
ball-empfang:tmp mansaxel$ /usr/local/bind10-0a1/sbin/named-checkzone besserwisser.org bsu bsu:35: warning: 2001:470:28:842:201:2eff:fe48:86aa.besserwisser.org: bad name (check-names) zone besserwisser.org/IN: _knolk._tcp.besserwisser.org/SRV '2001:470:28:842:201:2eff:fe48:86aa.besserwisser.org' has no address records (A or AAAA) zone besserwisser.org/IN: loaded serial 2014122801 OK ball-empfang:tmp mansaxel$ sed -n 35p bsu _knolk._tcp 10 SRV 0 0 567 2001:470:28:842:201:2eff:fe48:86aa
So, dont! ;-)
/Måns, who has a population of specialised IP phone devices that most certainly won't do SRV. -- Måns Nilsson primary/secondary/besserwisser/machina MN-1334-RIPE +46 705 989668 LOOK!! Sullen American teens wearing MADRAS shorts and "Flock of Seagulls" HAIRCUTS!