Complete Guide to Asterisk 22 New Features, Installation, and Upgrade Path

5 minutes read
Asterisk
Asterisk 22

QUICK SUMMARY

Asterisk 22 is about bulletproof reliability. This guide breaks down the two genuinely useful new features, critical security fixes, and performance improvements that actually matter. 

You’ll find installation instructions, honest upgrade advice, and optimization techniques that work in production. 

Regardless of the size of your setup, you need to know why Asterisk 22 might be one of the most important “boring” upgrades you’ll make.

None of us needs another feature-packed release that breaks existing deployments. 

What’s needed is rock-solid stability, security patches that matter, and Asterisk optimization that actually works. 

Asterisk 22 delivers exactly that.

This Asterisk update takes a surgical approach to telephony platform evolution. Asterisk 22 focuses on what actually keeps your phone system running at 3 AM when everything else has failed.

It has 22 commits from 8 authors, with 13 resolved issues and 1 security advisory. 

Every fix solves a problem someone actually reported, and every Asterisk feature improvement makes your system more reliable.

New Features in Asterisk 22

There’s no long list of half-baked features. The new features in Asterisk 22 introduce two genuinely useful additions that solve specific problems developers have been working around.

Asterisk 22 Core New Features

ARI ChannelToneDetected Event 

The most significant addition is enhanced tone detection integration with ARI (Asterisk REST Interface). When you set the TONE_DETECT dialplan function on a channel in ARI, it will now cause a ChannelToneDetected ARI event.

This opens up real-time tone detection for modern applications like automated IVR systems that need to detect DTMF, call progress tones, or custom audio signals.

Enhanced Recording Capabilities 

The RECORD_TIME variable now contains the duration of recordings in milliseconds. 

This seemingly simple addition gives developers precise control over call recording analytics and automated processing workflows.

Platform and Protocol Improvements

Beyond the headline features, Asterisk 22 includes targeted improvements to core components that directly impact system reliability and call quality.

PJSIP Enhancements 

The PJSIP stack received targeted improvements for DTMF handling. The system now properly negotiates DTMF payload types when there’s a bitrate mismatch between audio and DTMF streams. This resolves issues where endpoints supporting 48kHz audio but only 8kHz DTMF would fail to establish proper tone transmission.

Memory Management Optimizations 

Several memory leaks were identified and fixed, particularly in the res_pjsip_sdp_rtp module, where ast_format objects weren’t being properly dereferenced. These fixes improve long-term stability for high-volume systems.

Key Fixes and Improvements

While new features get the attention, the real value in Asterisk 22 lies in what it fixes. These aren’t huge patches. They’re solutions to problems that have been causing headaches in production environments.

Security Hardening

One security advisory was resolved: malformed Contact or Record-Route URIs in incoming SIP requests could crash Asterisk when res_resolver_unbound was used. The fix adds proper NULL pointer checking and graceful error handling.

ChanSpy Reliability

Two critical ChanSpy issues were resolved:

  • Fixed audiohook direction reading when monitoring specific call directions
  • Resolved whisper audiohook writing problems that prevented proper two-way communication during call monitoring

STIR/SHAKEN Stability

Multiple improvements to the STIR/SHAKEN implementation:

  • Fixed attestation level propagation from configuration to runtime
  • Resolved crash conditions with invalid configurations
  • Cleaned up memory management and removed stale dependencies
Wrestling with unstable telephony systems? Let our experts handle your Asterisk 22 migration!

Asterisk 22.2.0 Release Notes | What’s Fixed

Beyond the initial Asterisk 22 release, the Asterisk 22.2.0 release notes show continued focus on stability and bug fixes. This maintenance update addresses several edge cases and improves overall system reliability.

Key Improvements in Asterisk 22.2.0

  • Enhanced PJSIP registrar stability
  • Memory handling improvements in app_queue
  • Better CDR writing during call tear-down scenarios
  • Additional security hardening measures

Asterisk 22 vs Asterisk 21 Comparison

The differences between Asterisk 21 and 22 aren’t revolutionary but evolutionary improvements that address specific pain points. Here’s what actually changes when you upgrade.

Feature Asterisk 21 Asterisk 22
ARI Tone Detection Manual polling required Native ChannelToneDetected events
Recording Duration Manual calculation Built-in RECORD_TIME variable
PJSIP DTMF Handling Basic negotiation Mixed bitrate codec support
Memory Management Known leaks in SDP/RTP Fixed ast_format reference leaks
ChanSpy Reliability Audiohook direction issues Fully resolved monitoring problems
STIR/SHAKEN Basic implementation Hardened with crash prevention
Security Standard Enhanced with resolver fixes

Install Asterisk 22

Getting Asterisk 22 up and running follows the same proven process as previous versions, but there are a few specific considerations for this release.

Asterisk 22 Installation Prerequisites

Before starting your Asterisk 22 install, ensure you have:

  • Linux distribution with development tools
  • libjansson-dev (for JSON handling)
  • libxml2-dev (for XML processing)
  • PJSIP libraries (if not using bundled version)
  • SQLite3 development headers

Asterisk 22 Step-by-Step Installation

Here’s the complete installation process:

1. Download Source Code

bash

cd /usr/src

wget https://downloads.asterisk.org/pub/telephony/asterisk/asterisk-22-current.tar.gz

tar -xzf asterisk-22-current.tar.gz

cd asterisk-22.*/

2. Install Dependencies

contrib/scripts/install_prereq install

3. Configure Build Options

./configure –with-pjproject-bundled –with-jansson-bundled

make menuselect

4. Compile and Install

 

make -j$(nproc)

make install

make samples

make config

5. Initial Configuration

 

systemctl enable asterisk

systemctl start asterisk

asterisk -rx “core show version”

Asterisk 22 Post-Installation Verification

Connect to the CLI and verify core functionality:

asterisk -rvvv

CLI> core show channels

CLI> pjsip show endpoints

CLI> module show

Should You Upgrade to Asterisk 22?

As you know by now, the upgrade decision isn’t just about features. It’s about timing, risk tolerance, and whether the improvements actually solve problems you’re experiencing.

Let’s look at some scenarios to help you make a decision.

Asterisk 22 Upgrade Scenarios

Immediate upgrade recommended in these cases:

  • Running Asterisk 21 with ChanSpy monitoring issues
  • Experiencing memory leaks in high-volume SIP environments
  • Need real-time tone detection in ARI applications
  • Want enhanced recording duration tracking

Upgrade when convenient in these cases:

  • Stable Asterisk 21 deployments without specific issues
  • Development environments where new features would be beneficial
  • Testing environments preparing for future production upgrades

Consider waiting in these cases:

  • Mission-critical systems requiring LTS support
  • Environments with extensive custom modules requiring regression testing
  • Organizations with limited maintenance windows

Asterisk 22 Migration Best Practices

Here are some suggestions from our Asterisk team about migration:

Pre-Upgrade Steps:

  1. Test in the development environment first
  2. Backup all configuration files and databases
  3. Document current module configurations
  4. Plan for a potential downtime window

During Upgrade:

  1. Follow standard Asterisk upgrade procedures
  2. Monitor system logs for any deprecation warnings
  3. Test critical call flows immediately after the upgrade
  4. Verify all integrations (CRM, billing, monitoring)

Post-Upgrade Validation:

  1. Run comprehensive call testing
  2. Monitor system performance metrics
  3. Check for any new error messages or warnings
  4. Validate that all features work as expected
Skip the compile headaches and configuration nightmares. Let’s optimize your Asterisk system!

Optimizing Asterisk 22 Performance

The improvements in Asterisk 22 create new opportunities for Asterisk optimization, but only if you know how to leverage them effectively.

Memory Management

The fixes in Asterisk 22 improve memory handling, but proper configuration remains crucial:

  • Monitor memory usage with core show sysinfo
  • Configure appropriate limits in asterisk.conf
  • Use memory show summary for leak detection

PJSIP Optimization

Take advantage of the improved PJSIP handling:

  • Review endpoint configurations for mixed codec scenarios
  • Test DTMF negotiation in your specific environment
  • Consider transport reuse optimizations

ARI Application Development

Leverage the new tone detection capabilities:

  • Implement real-time audio analysis workflows
  • Use ChannelToneDetected events for automated call processing
  • Integrate with external systems for advanced call handling

Asterisk 22 might not grab headlines with revolutionary features, but it delivers exactly what production environments need: stability, security, and subtle improvements that make daily operations smoother. The focused development approach means you get battle-tested code that solves real problems without introducing new complexity.

Whether you’re running a small office setup or a carrier-grade deployment, Asterisk 22 offers the reliability and feature refinements that keep your communications infrastructure running smoothly. The upgrade path is straightforward, the improvements are meaningful, and the foundation is solid for whatever comes next.

Ready to optimize your Asterisk deployment

Our team specializes in seamless Asterisk upgrades and performance tuning. Get expert guidance for your specific environment here.

FAQs

What are the new features in Asterisk 22?

Asterisk 22 introduces two key features: ARI ChannelToneDetected events for real-time tone detection and the RECORD_TIME variable for precise recording duration tracking. The focus is on stability improvements rather than numerous new features.

How do I install Asterisk 22?

To install Asterisk 22, download the source from asterisk.org, run ./configure --with-pjproject-bundled, use make menuselect to choose features, then compile with make and install with make install. Full prerequisites include libjansson-dev and libxml2-dev.

What's in the Asterisk 22.2.0 release notes?

The Asterisk 22.2.0 release notes highlight bug fixes, including enhanced PJSIP registrar stability, improved memory handling in app_queue, better CDR writing during call termination, and additional security hardening measures.

Should I upgrade to Asterisk 22 now?

Upgrade to Asterisk 22 immediately if you're experiencing ChanSpy issues, memory leaks, or need ARI tone detection. For stable Asterisk 21 systems without problems, upgrade when convenient.

How does Asterisk 22 vs Asterisk 21 compare?

Asterisk 22 shows key improvements in ARI tone detection, recording capabilities, PJSIP DTMF handling, memory management, and ChanSpy reliability. The upgrade is additive; existing configurations work while new features become available.

Principal VoIP Solution Analyst
Strategy advisor
19+ Year in VoIP Industry

Before You Invest in a Telecom Platform, Talk to the Team Behind 2,500+ Projects Delivered.

Schedule a Strategy Call

Need a Consultation?

Access $263B VoIP Market Insights – Claim Your Free eBook

    * Your Name

    * Email

     Related Posts

    Menu