Network Systems DesignLine | Achieve High Availability in VoIP: An Implementation Example--Part II

Get the latest news, products and how-to information on network systems. Sign up for the Network Systems DesignLine newsletter, a weekly e-mail guide dedicated to the needs of engineers developing networking equipment and components. Here is our RSS feed.








 Network Systems DesignLine » How-To » Last-Mile/Broadband Access

 
 HOW-TO : Last-Mile/Broadband Access

Achieve High Availability in VoIP: An Implementation Example--Part II

The SA Forum specifies open standards for high availability (HA) capable of matching those of traditional voice networks. To highlight ease of use and time-to-market benefits, a proof of concept was created combining SA Forum compliant middleware on a BladeCenter T platform with Asterisk, an open source VoIP solution. This article sets the stage and tells the story.
Print This Story Send As Email Discuss This Story Reprints

Page 1 of 2

Network Systems Designline

Rate this article
WORSE | BETTER
1 2 3 4 5
How was it done?
We will now take a closer look at how SIP is supported within Asterisk and the changes necessary to make the PBX highly available. For the purposes of the proof of concept, only the messaging, checkpoint and the value-added trace management services of SAFE4CS are used.

The clear modularity of the Asterisk software was helpful as the SIP channel specific layer was distinctly separate from other elements. There were a number of key challenges in porting the Asterisk application including:

  1. Understanding the external event handling loops or blocking function calls in order to recognize application process role changes
  2. Identifying the relevant call context "stateful" information for checkpointing

These elements are important to any highly available application--let's see why.

Detection--Application Process Roles
With elements and processes able to occupy either the Active or Standby role, it is crucial to be able to detect any changes in these roles. Depending on the direction of change either a save or a restore of the context data check-pointed previously is required for seamless failover. To affect this, an application, when registering with SAFE4CS, must be prepared to handle messages and signals delivered by the middleware so that it can take adequate actions. It is therefore important to identify the blocking event waits in the application where it should now be enhanced to recognize the aforementioned role changes.

The Asterisk PBX design contains a channel monitoring thread within the SIP module. It sits in a tight loop which monitors for external events on all its idle channels. This function is enhanced as shown in the code segment below to additionally monitor for events (such as role changes) detected via AMF and then take appropriate actions.


Checkpointing The complete inner state of the application is described by the Checkpoint data. It is crucially important that any "stateful" high availability application is capable of failover without any disruption of service. For the Asterisk PBX application to become highly available, it is necessary that call-state information is check-pointed such that in the case of a failure in the active blade, the hot-standby is able to takeover and maintain service continuity. A sample SIP session flow diagram is shown in figure 6 that identifies the call-state information checkpoints in the active blade.


Figure 6. Sample SIP session flows

In the Asterisk SIP module, the call-state information is saved in the handle_response() function as part of the INVITE and BYE processing. The checkpoint data consists of the channel control blocks (struct ast_channel, struct ast_channel_pvt) and the SIP private control block (struct sip_pvt) associated with both legs of the call (approximately 32KB). Note that no attempt was made to optimize the size of the checkpoint data as this would have required a deeper understanding of the usage of various fields within the Asterisk core control structures.

Registration, Deregistration and Signal handler changes
The application enhancements for utilizing high-availability services can be split into the following areas:

  • Registration/Deregistration
  • Signal handler
  • Main logic for checkpointing and process role detection (described previously)

As a general rule, an application needs to initialize the functionality it requires from SAFE4CS via Registration with the management component of the particular service. Asterisk's main() function (figure 7) are the extensions that implement the registration procedures.


Figure 7. Registration



Page 2: next page Print This Story Send As Email Discuss This Story Reprints

Page 1 | 2


 
eSearch  

 Top 5 Most Read
 How-To Stories
1. 2. 3. 4. 5.

 Top 5 Most Read
 News Stories
1. 2. 3. 4. 5.

  • Introduction to Optical Transmission Systems

  • Optimizing Embedded Systems for Broadband 10 Gigabit Ethernet Connectivity

  • Interfacing a DS3231 with an 8051-Type Microcontroller

  • The entire library >>  

     
     Top 5 Most Read
     Product Stories
    1. 2. 3. 4. 5.

     Sponsor

    EE Times TechCareers
    Search Jobs

    Enter Keyword(s):


    Function:


    State:
      

    Post Your Resume
    -----------------
    Employers Area
    Most Recent Posts More career-related news, resources and job postings for technology professionals

     Tech Library
    ¤ Looking for the appropriate Industry Association? This comprehensive, up-to-date list will take you to the right Web site for the help you need.

    ¤ Got a question about a standard? Here are direct links to resources detailing the industry's most important communications standards.

    ¤ Freshen up on technology, new and old, with these links to interesting and informative tutorials.

    More from TechLibrary

    Welcome to our DesignLine network of web communities. On these sites, we provide practical how-to technical information for engineers and engineering managers involved in Automotive,audio, DSP, DTV, EDA, Industrial Control, Mobile Handset, Power Management, Programmable Logic,RF,Video, and Wireless networking design. Check out the sites and let us know your thoughts.
     



    Career Center | CommsDesign.com | Embedded.com | EE Times | TechOnline
    Planet Analog | DeepChip | eeProductCenter | Electronic Supply & Manufacturing | Webinars