clustering

Home » Asterisk Users » clustering
Asterisk Users 10 Comments

Hi all,
I am planning to do clustering for my company’s asterisk servers. I dont
know much about it, just read some articles on the internet and learned how
to use DUNDi and some basic information about clustering.
What I need to know is:
1. can i register end user with multiple asterisk servers at a time?
2. If not, Can I re-route registeration requests to different servers using
1 asterisk server as a gateway and multiple clustered asterisk servers
behind it?

cheers
Thanks in advance

10 thoughts on - clustering

  • Use camailio or opensips as the registrar server so it accepts the sip
    registrations. You can have copies running on a couple of boxes using
    either a shared databases or a database on each server configured in
    master-master replication mode. Opensips can be configured to use the
    same database table that asterisk uses for authentication. Then you can
    use the load balancer module to send the call to whichever asterisk box
    has the most free lines.
    Normally you try and use opensips for most things such as call routing
    and registrations and leave asterisk to do the application type stuff
    such as conference calls and voicemail.

    Rizwan Hisham wrote:

  • Hi,

    I have worked with only two servers setup, don’t know how it would work in
    three server setup. You’ll need to do an experiment, but know that it won’t
    work if you have T1 lines. HA and DRBD is good for pure VoIP.

    Before the end of this year hopefully I’ll be setting up two more redundancy
    solutions, and will try some new techniques, and probably try three server
    setup too. At that time I plan to post a tutorial on redundancy solution on
    my blog, because seems like a lot of people want to know how to do it, yet
    guidance is very limited.

    Zeeshan A Zakaria

  • How about setting up a high availability cluster using DRBD and Heartbeat?
    There is some good info on it on the Internet. In this type of setup you
    have two exact same servers running in parallel, and only one has the
    required services up. They keep themselves in sync. When the primary one
    goes down, the secondary instantly takes over. Active calls are though
    dropped, but after that everything is back to normal. There are various
    other options regarding which server will stay primary, or how and which
    services will be used on which server.

    Another option I am exploring is using the same thing but in Proxmox with
    DRBD. Somebody told me it could be setup so that even the active calls are
    not dropped. I haven’t set it up yet, but will try it when get time.

    Zeeshan A Zakaria

  • _____

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com
    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Rizwan Hisham
    Sent: Monday, October 18, 2010 9:43 AM

    Unfortunately we are too late to switch to Kamailio. I mean we have
    developed our pbx with call features and routing on asterisk only. If we
    switch to some other software that means we will have to redo a lot of
    development again. I was thinking of using DUNDi and distributing the
    registrations on different servers.

    I just dont get one point. lets say if i have 2 users registered on
    different asterisk servers and one of the server fails (dundi doea not get
    anything in return from lookup). But I can still get the contact information
    for the user who was registered on the failed server from db (realtime peer)
    for incoming calls. But what happens when that user tries to make a outgoing
    call? How do I redirect the call to the server which is still working?

    Sorry for second post, but I have a Polycom 501 registered to 3 servers. I
    hit the line button and if the server I pick is down, I don’t get a dial
    tone. Hope this is useful.

  • _____

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com
    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Rizwan Hisham
    Sent: Monday, October 18, 2010 9:43 AM

    Unfortunately we are too late to switch to Kamailio. I mean we have
    developed our pbx with call features and routing on asterisk only. If we
    switch to some other software that means we will have to redo a lot of
    development again. I was thinking of using DUNDi and distributing the
    registrations on different servers.

    I just dont get one point. lets say if i have 2 users registered on
    different asterisk servers and one of the server fails (dundi doea not get
    anything in return from lookup). But I can still get the contact information
    for the user who was registered on the failed server from db (realtime peer)
    for incoming calls. But what happens when that user tries to make a outgoing
    call? How do I redirect the call to the server which is still working?

    On Mon, Oct 18, 2010 at 4:39 PM, Gareth Blades wrote:

    Use camailio or opensips as the registrar server so it accepts the sip
    registrations. You can have copies running on a couple of boxes using
    either a shared databases or a database on each server configured in
    master-master replication mode. Opensips can be configured to use the
    same database table that asterisk uses for authentication. Then you can
    use the load balancer module to send the call to whichever asterisk box
    has the most free lines.
    Normally you try and use opensips for most things such as call routing
    and registrations and leave asterisk to do the application type stuff
    such as conference calls and voicemail.

    From what I have read, Asterisk and Kamalio can co-exist; some posters have
    used Kamalio to “supplement” the features that Asterisk either doesn’t
    provide or doesn’t provide in as nice a form as the OP desired – can’t
    really speak beyond this as I am not one of them.

  • Unfortunately we are too late to switch to Kamailio. I mean we have
    developed our pbx with call features and routing on asterisk only. If we
    switch to some other software that means we will have to redo a lot of
    development again. I was thinking of using DUNDi and distributing the
    registrations on different servers.

    I just dont get one point. lets say if i have 2 users registered on
    different asterisk servers and one of the server fails (dundi doea not get
    anything in return from lookup). But I can still get the contact information
    for the user who was registered on the failed server from db (realtime peer)
    for incoming calls. But what happens when that user tries to make a outgoing
    call? How do I redirect the call to the server which is still working?

    On Mon, Oct 18, 2010 at 4:39 PM, Gareth Blades wrote:

  • Hello Zeeshan,
    How about doing the mixture of what I want to do with your strategy. I mean,
    what if we have 3 asterisk servers with distributed registrations and also
    have heartbeat installed monitoring all the servers? will that work?

    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com [mailto:
    href=”mailto:asterisk-users-bounces@lists.digium.com”>asterisk-users-bounces@lists.digium.com] *On Behalf Of *Rizwan Hisham