Distributed Asterisk, Follow Me, etc. advice

Hello, all!

First off, I’m sorta new to asterisk, so please bear with my bad terminology use (and I’d appreciate corrections for the future :smile: ). I’ve also been reading up on this and haven’t found enough information to answer all my questions.

I’m planning a large-scale asterisk deployment. The project isn’t on a hurried schedule which opens up the time for self-education and some experimentation (hence why I’d appreciate higher-level answers instead of technical details - those we can tackle later :smile: ).

There are 5 large offices with >100 people per office, and many ancillary offices with 10-20 people in them. The intent is to deploy a VOIP system (obviously) - but also have the following features:

  • Local “trunk” or “hub” or “PBX” per large site - smaller sites would VPN into the nearest “hub” and latch onto the phone system as such.
  • Hubs would be interconnected (via VPN, for security), thus providing company-wide VOIP
  • The tricky one: we’d like the ability for a single user to have the same extension regardless of which HUB they “connect” (register?) in, without having to accrue any management overhead save initial server configuration(s) whenever this happens (i.e. no manual work involved in the “extension move”).

For instance, say extension 2345 belongs to Bob who’s usually in the California office (which has it’s own “hub” server) but he travels to the New York office for a few days (which also has its own “hub” server). Bob would arrive at NY, and connect to the local NY server normally, as if he were connecting to his usual California server (DNS and whatnot would be dealt with separately - let’s assume that works magically). The trick is that now, if a call comes in for Bob, the call would need to get automagically routed to NY instead of California. Not sure if this is what “follow me” does. Ideally this would all be transparent - i.e. no “move his extension”, no “reconfigure the servers”, no special intervention from anyone - including Bob.

I’m sure there are other important details such as voicemail - how would the PBX system handle a voicemail check request from Bob if he’s in NY? (i.e. presumably his voicemail would be in the Cali server…)

I’m sure there are a billion other considerations but I’d like help and guidance as to what could be done, what couldn’t (easily, i.e. without substantial coding) be done, and any documentation that might prove enlightening.

From what I’ve read, Asterisk supports LDAP so I suppose a mechanism such as having a script that’s executed upon registration could be used to update LDAP and set the “current server” for the extension - thus it would be possible to program the PBX to do a translation such that 2345@california can be translated to 2345@new-york (for instance). This would achieve the transparent “call transfer” (I think… I’m sure it wouldn’t be this simple… please correct me as appropriate).

However, under that mechanism, how would voicemail reading be handled? I guess a “voicemail server” property in LDAP could also be kept but the question is: would it be possible to tell local PBX’s (hub?) to do a lookup and see which server a particular extension’s voicemail is stored in and fetch it (or forward the voicemail call or access request) accordingly?

Thanks for any insights you might offer![/list]

I’m in a similar boat, but much smaller scale with three offices and a total of 50 agents. Are you looking into Soft or Hard phones? I am still in the long term planning, but it looks like a softphone option integrated with our main LDAP will work best for us. As I see it, each agent will log into a computer. The LDAP info used to login will map to their extension and it’s like they are sitting at their home computer. I am unsure how asterisk would know to route through a different node. Perhaps the local LDAP could pass a variable to the local node which would act as a the first digit in the dial plan? I am not sure how this part would work. You could certainly have his soft phone always connect to his home node over the VPN though. It uses bandwidth, but most of that bandwidth would be used anyway. Let’s keep this discussion going. As I said, I am developing a similar system as we speak.

It can’t exactly happen automatically, since something needs to tell the Asterisk installations where Bob is, but the way I have done it is to have two types of extensions - physical extensions that correspond to real phones that ring, and virtual extensions that correspond to people. Each virtual extension owner can chose, via a website, which physical extensions she wants to ring on incoming calls, and during what time periods he wants calls to go directly to voicemail, etc.

Ian

What if you set the “person” as a hunt group. Then the person could log into the hunt group from wherever he was. This would mean the extension the users recognize and care about would be treated as hunt groups through asterisk, and the individual extensions would be hidden from the users?

this is very high level, and details aren’t well thought out. the basic concept:

Use Asterisk RealTime for all your SIP credentials. The accounts would be stored in a MySQL database. The SIP peers table would be replicated across all primary sites so that any user could register at any site.

You would have a single Global Catalog database which would store some basic presence/routing information. This database would be the lookup source for all routing which couldn’t be achieved locally.

You would have a Cron job which executed, say, once every minute on the primary Asterisk machines in the 100 person offices. The Cron jobs would be responsible for publishing registration information to the Global Catalog. They would write information about the locally registered peers out to the Global Catalog. Perhaps the record would look like:

User: Bob
Current Reg Server: California
SIP Trunk: trunk_cali

When a call came in on a local Asterisk machine, it would first check if the user was locally registered. If so, it would perform routing locally. If the user couldn’t be found, an AGI script (or similar) would query the Global Catalog (perhaps across the VPN). The AGI script would hopefully return the “Current Reg Server” and “Trunk” to execute a Dial(SIP/Bob@trunk_cali) to. This would connect the caller with whatever location they were currently registered.

Voicemail could be handled quite simply. Each user would have a ‘home’ office. If the user couldn’t be found the voicemails would always be left on their ‘home’ Asterisk machine. Your MySQL user table would know what the users home was. When the user picked up their phone and dialed, say, 99. You could have an AGI script which performed a VoiceMail lookup and routed via a dial to a special extension like: Dial(SIP/Bob_VM@homeserver). The Bob_VM extension would call VoiceMailMain() for Bob’s voicemail… meaning he could check it from anywhere on the network.

The only real challenge I see is the MySQL replication… and I am sure with some thought, a very clever model could be thought up. Perhaps a distributed MySQL Cluster might be a good option. Maybe just chained replication… who knows.

Sorry for the stream of consciousness… :smile:

I think that is an excellent idea. I am still chewing on it,but I think it has the makings of a very powerful framework.