Issue 021 · Independently publishedFriday, 20 November 2026Open Communications · Technology Watch

AsteriskASTERISKCOMMS WATCH

Product & Technology

PJSIP, IAX2 and WebRTC: choosing between Asterisk's three protocol paths

One system, three protocols, three different problems. The cost of choosing badly is rarely 'it does not work' — it is debugging with no idea where to look.

Asterisk speaks many signalling protocols at once. On paper that is a strength; in practice it usually turns into confusion: which one should a new project use, does the IAX2 in the old system need migrating, does browser calling really require WebRTC?

PJSIP: the default answer now

chan_pjsip is the channel driver rewritten on the PJSIP stack and the officially recommended choice. Compared with the old chan_sip it is more complete on NAT traversal, TLS/SRTP, multiple transport bindings and IPv6, and its configuration model is cleaner, with endpoint, aor, auth and identify described separately.

New deployments have essentially no reason to use chan_sip. The bulk of a legacy migration is converting the configuration model and re-validating inherited dial rules.

IAX2: the undervalued private line

IAX2 is Asterisk's own protocol. Its defining trait is that signalling and media share one UDP port, which makes connecting two Asterisk nodes behind NAT far less painful than SIP. Many cross-site and branch links in older estates run on IAX2 trunks.

Its weaknesses are equally clear: the ecosystem barely extends beyond Asterisk, endpoint support is thin, and encryption and extensibility lag the SIP world. The sensible role is node-to-node connectivity inside your own network, not a protocol for serving the outside world.

WebRTC: the only real answer for browser calls

If you want to place calls from a web page, you go through WebRTC. Asterisk carries signalling over the PJSIP WebSocket transport and media over DTLS-SRTP. The technical difficulty clusters in three places: certificates and secure context (HTTPS is mandatory), ICE and TURN deployment, and codec negotiation (browsers effectively accept Opus and G.711 only).

WebRTC problems rarely originate in Asterisk. They usually come from the network path or the certificate.

A selection table

The reality of mixed deployments

Almost every real system is mixed: an external SIP trunk, internal IAX2 links and browser WebRTC, all on one server. The question that matters is not which protocol to pick but how to unify logs, monitoring and fault isolation across all three paths.

Decide on CDR fields, log format and capture points from day one. You can have three protocols; you should have one place to start troubleshooting.

PJSIPIAX2WebRTCProtocol Choice

R E L A T E D