[asterisk-users] Redundant PSTN PRI Gateways using Asterisk

Alex Balashov abalashov at evaristesys.com
Tue Sep 2 03:20:27 CDT 2008


Michael Melia Jr. wrote:

> I am looking to implement Asterisk in front of the legacy PBX as the new 
> gateway to the PSTN for the company in an effort to begin a slow 
> transition to VoIP.  While I am familiar with Asterisk when it comes to 
> implementing it as a single box solution for PRI, SIP, voicemail, IVR, 
> etc, I get a little confused when you start to separate the functions to 
> different boxes for redundancy and scalability.

The main operative methodologies are:

1. Run services to a given Asterisk box in a dedicated way using SIP 
trunks among them.

2. On the TDM and/or VoIP provider side, make sure that redundant 
gateways can be cycled through using hunt groups.  If some sort of 
end-to-end reachability ping facility is available for verification on 
the VoIP side, a la the SIP OPTIONS ping that comes with the 'qualify' 
option in sip.conf, have the provider use it so unreachable servers are 
disabled if they are chronically unreachable in order to decrease call 
setup time.

> I don’t believe any fancy load balancing / 
> redundancy techniques are need for this part as that is handled on the 
> providers end which routes the DIDs over both PRIs.  

Yep, any switch that can generate PRIs from the provider side can handle 
that.

> The next step I would like to take is to move the voicemail from the 
> legacy PBX to another pair of asterisk servers acting as redundant 
> voicemail servers.  This is where I get a bit lost.  Here is the outline 
> of what I believe I need to do.
> 
> 1. build asterisk server to act as voicemail server
> 
> 2. setup mailboxes in voicemail.conf for each extension/user that is to 
> have voicemail
> 
> 3. connect both gateways to the voicemail server via IAX
> 
> 4. edit the dial plans on both gateway asterisk servers to include an 
> extension that points to voicemail() and voicemailmain() extension on 
> the voicemail server
> 
> 5. edit legacy pbx to direct voicemail (message button on phones) to 
> extension on asterisk server for voicemailmain app
> 
> 6. edit legacy pbx to direct unanswered call to extension on asterisk 
> server for voicemail app
> 
> 7. build second asterisk server to act as redundant voicemail server and 
> integrate it somehow

That is correct, although personally I would recommend the use of SIP 
trunks rather than IAX2.  But, that is a matter of perspective.

> 
> Questions on this include:
> 
> -       Best way to have active/active redundant voicemail nodes (iSCSI 
> SAN is available) to accomplish load balancing and failure redundancy 
> (LVS, Linux-HA, ultramonkey, etc)

You could store the actual messages in an IMAP backend or ODBC.  Both 
options are available.

Linux-HA and ultramonkey can both be made to work in this setup.  As 
long as you can tell the heartbeat daemon to run some script that checks 
for Asterisk's availability, you're set.  Tools like 'sipsak' offer an 
easy way to ping the SIP agent:

    sipsak -T -s sip:s at asterisk.ip

> -       Is it appropriate for the gateway server to directly link to the 
> voicemail servers when distributing the services like this or should 
> something like DUNDi or SER be used?

There's nothing inherently inappropriate about it, but an OpenSER proxy 
can be helpful because it can give you a point of control and possible 
call dialog manipulation if it is

However, a unitary proxy is another point of failure.

For something as simple as voicemail features, there's no inherent need 
for it unless you foresee one for the aforementioned purposes.

> The eventual next step would be to implement another cluster of asterisk 
> servers to act as media servers for call recording, moh, ivr menus, 
> conferences, and agi.  Setup a SER/openSER cluster for registering new 
> IP phones and somehow routing all the traffic between the IP phones, 
> media servers, gateways, voicemail servers, and legacy pbx.  Then, 
> eventual phasing out the pbx.  I will pose more specific question on 
> this when the time comes but I mention it in case anyone sees issue with 
> what I do in the early phases that would negatively impact where I 
> ultimately want to go.

Using a proxy (OpenSER) to direct distributed architectures would be 
quite sensible, and they are a critical component of enterprise VoIP 
platforms.

-- Alex


Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the asterisk-users mailing list