The chan_sip module has been the defacto SIP module within Asterisk for many (10+) years and throughout that time it has grown and been developed in an organic fashion. This has had the benefit of being pretty much interoperable with anything on the planet but in the end this development strategy has made making changes a bit hap-hazard at times. You never really know if what you are going to change will cause a regression or not. There are other things about chan_sip that make it annoying but I’m going to limit myself just to the above as this post is about chan_pjsip.
The new chan_pjsip module is an alternative SIP module available as of Asterisk 12. It is built using a third-party SIP stack, PJSIP, which is used in many applications across the world. By using a third party stack us Asterisk developers can focus on the application logic and features instead of spending so much time on the lower level SIP parts. For users this means features you’ve always wanted faster than before!
Since this module is new though… it is not yet at feature parity. It covers a good portion of everyday things that you may want (and some things that even chan_sip didn’t have) but it does not cover everything. Is this an issue though? NO! Due to the policy in place for Asterisk 12 new features can continue to be added to chan_pjsip in the future allowing it to slowly reach as close to parity as possible.
What can it do?!?
- Audio and video calls
- Transfers (blind/attended) with accurate NOTIFY reporting
- Direct media (local and remote)
- T.38 fax
- DTMF (inband/INFO/RFC2833)
- Registrations (inbound/outbound)
- Database driven configuration
- Authentication (inbound/outbound)
- NAT (when we are behind it, and when remote side is behind it)
- ICE
- Multiple devices per inbound registration
- SRTP (SDES/DTLS)
- Subscriptions (MWI/Device State)
- Connected line
- Caller ID
- One touch recording
- Session timers
- PRACK
The nice thing about chan_pjsip is that it itself is built using a stack approach. There are different modules which provide the above functionality in a “use what you need” approach. This means that adding new functionality does not require messing with other modules which isolates regressions. Developing functionality is now also much more approachable because a lot of common stuff is taken care of for you (threading, locking, authentication, message/header validation, database access, etc). A developer only needs to focus on implementing what feature they want in the manner that the PJSIP architecture allows.
While this is a high level view of chan_pjsip I hope it shines some line on the new module and also gets you interested in trying it out! It needs testers to find new ways to improve configuring it and to make sure the functionality works for everyone. Go forth and place calls!
Cheers,