PJ_SSL_SOCK_MAX_CIPHERS’ undeclared (first use in this function)

Getting error while installing pjsip with asterisk

PJ_SSL_SOCK_MAX_CIPHERS’ undeclared (first use in this function)

Asked on December 31, 2019 in Asterisk.

Finally done this issue resolved by the below method:

Step 1 – Setup the environment

The first step is to install the dependencies required to build the PJSIP libraries and Asterisk 13. Using the CentOS yum package manager we’ll update all currently installed packages to their latest version and then install some of the most common dependencies for Asterisk and PJSIP.

# yum update

The kernel-devel package we install next could be slightly ahead of the kernel actually in use on your system. This is why we did a yum update first. If the kernel has been updated, be sure to reboot before moving forward. More information about the kernel-devel packages available for CentOS can be found here. The following command will install several packages that are needed to compile and install PJSIP and Asterisk.

# yum install -y epel-release dmidecode gcc-c++ ncurses-devel libxml2-devel make wget openssl-devel newt-devel kernel-devel sqlite-devel libuuid-devel gtk2-devel jansson-devel binutils-devel

NOTE:If you encounter an issue resolving the dependencies check out the fantastic install_prereq tool shipped with the Asterisk tarball. Located in the contrib/scripts directory of the Asterisk source directory that will be unpacked in step 3.

Step 2 – Install pjproject

Next you will download and install the pjproject sip library directly from pjsip.org. But first we’ll change directories to work in the /usr/src directory.

# cd /usr/src
# wget https://www.pjsip.org/release/2.3/pjproject-2.3.tar.bz2
# tar -jxvf pjproject-2.3.tar.bz2

This will create the pjproject-2.3 directory. Change to this directory and run the following set of commands to build and install the pjproject sip library.

# cd pjproject-2.3
# ./configure CFLAGS="-DNDEBUG -DPJ_HAS_IPV6=1" --prefix=/usr --libdir=/usr/lib64 --enable-shared --disable-video --disable-sound --disable-opencore-amr

This command must be modified when using a 32-bit operating system. Just remove the --libdir=/usr/lib64 option from the command. The other options may be different depending on how you want to use Asterisk. More information about these options can be found on the Asterisk wiki or by running the command ./configure --help. The next four commands will build, install and link the pjsip libraries.

# make dep
# make
# make install
# ldconfig

And finally this next command will verify the pjsip libraries have been dynamically linked.

# ldconfig -p | grep pj

 

on December 31, 2019.
Add Comment
1 Answer(s)

Download the fresh pjsip from here

https://blog.eduguru.in/downloadeb/pjproject-2.3.tar.bz2

Follow the below steps :

 

  • run:
# ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr CFLAGS='-O2 -DNDEBUG'
  • Build and install pjproject:
# make dep
# make
# make install
  • Update shared library links:
# ldconfig
  • Verify that pjproject is installed:
# ldconfig -p | grep pj
  • The result should be:
libpjsua.so (libc6,x86-64) => /usr/lib/libpjsua.so
libpjsip.so (libc6,x86-64) => /usr/lib/libpjsip.so
libpjsip-ua.so (libc6,x86-64) => /usr/lib/libpjsip-ua.so
libpjsip-simple.so (libc6,x86-64) => /usr/lib/libpjsip-simple.so
libpjnath.so (libc6,x86-64) => /usr/lib/libpjnath.so
libpjmedia.so (libc6,x86-64) => /usr/lib/libpjmedia.so
libpjmedia-videodev.so (libc6,x86-64) => /usr/lib/libpjmedia-videodev.so
libpjmedia-codec.so (libc6,x86-64) => /usr/lib/libpjmedia-codec.so
libpjmedia-audiodev.so (libc6,x86-64) => /usr/lib/libpjmedia-audiodev.so
libpjlib-util.so (libc6,x86-64) => /usr/lib/libpjlib-util.so
libpj.so (libc6,x86-64) => /usr/lib/libpj.so

and then reconfigure asterisk.

 

Answered on January 3, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.