Asterisk 13.8.0: Now With Easier PJSIP Install Method!

Asterisk 13.8.0: Now With Easier PJSIP Install Method!

Asterisk 13.8.0 will come with a new option for enabling PJSIP functionality. This functionality is called bundling and comes courtesy of a community member, George Joseph, who you can also thank for such PJSIP additions as wizards for configuration and the PJSIP_HEADER dialplan function. Before we talk about bundling let’s take a look at the history of PJSIP usage in Asterisk and how we got to where we are today.

PJSIP itself is part of a set of libraries and tools which forms PJPROJECT. Another part is referred to as PJNATH and has been used since Asterisk 11 to provide ICE, STUN, and TURN support in the res_rtp_asterisk module. When Asterisk 11 was released PJPROJECT was embedded in Asterisk itself to make it easier for users to have the new functionality available. When the decision was made to work on a new PJSIP channel driver one of the desires expressed by the community was to remove PJPROJECT from Asterisk and have it be distributed using other mechanisms, such as by the distributions as packages or from a manual install process. Before Asterisk 12 was released this was completed and contributed upstream to Teluu who created PJPROJECT. This has meant that to enable PJSIP support in Asterisk you have needed to install PJPROJECT yourself using some method. As of Asterisk 13.8.0 another simpler option will be available instead: bundling.

Bundling allows a self-contained PJSIP to exist within Asterisk and be used by all functionality within it. It is enabled by passing an option to the configure script:

./configure --with-pjproject-bundled

When the option is enabled the build process will download a version of PJPROJECT as specified in the bundling configuration, patch it with any changes that may not have yet been published in a PJPROJECT release, build it using the best options suitable for Asterisk, make it available to all the Asterisk PJSIP modules, and make the Asterisk PJSIP modules available for building. This reduces the barrier to entry for using PJSIP to a minimal amount allowing more people to use the new SIP functionality. There is no additional work required except for enabling the option.

While the lower barrier to entry may seem like the only immediate benefit there’s also some internal things that are improved by using bundling. By controlling the version of PJSIP that Asterisk is used against we can ensure that Asterisk will build and work properly against it. We can also ensure that both Asterisk and PJSIP have been built using the same configuration and that the configuration matches the usage required by Asterisk. This can lead to improved performance and reduce crashes.

There’s also no harm in using this new bundled support if you already have PJSIP installed. The PJSIP downloaded and built for Asterisk will only be bundled in Asterisk and not exposed to the rest of your system.

So if you’ve been hesitant to try PJSIP why wait? Use bundling and have PJSIP functionality enabled in no time! As each distribution and environment is different I urge you to file an issue on JIRA if you encounter any problems with the bundling option. We want to ensure it works for as many people as possible.

8 Responses

  1. Hello,
    there is new pjsip lib 2.6 instead of 2.5. this method pulls 2.5 version. could you update it please?
    thanks

  2. Updates to new versions of PJSIP occur as new releases of Asterisk are made. In this case the next releases of Asterisk, 13.15.0 and 14.4.0, will contain PJSIP 2.6 for the bundle support.

  3. Hi,
    I can’t install Asterisk on Ubuntu, everytime I run ./configure it breaks the installation process when trying to download pjproject2.10. I already tried the installation from various sources, even from GitHub, but I just can’t make it work.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

About the Author

What can we help you find?