13.8.2 compilation fails at res_pjsip_transport_management

On Debian 8 Jessie, 3.16.0-4-686-pae, after install_prereq install, compilation fails at:

[CC] res_pjsip_transport_management.c → res_pjsip_transport_management.o
res_pjsip_transport_management.c: In function ‘monitored_transport_state_callback’:
res_pjsip_transport_management.c:177:8: error: ‘PJSIP_TP_STATE_SHUTDOWN’ undeclared (first use in this function)
case PJSIP_TP_STATE_SHUTDOWN:

Does anyone have idea, why? Currently install_prereq test shows only following:

aptitude update
aptitude install -y

so I guess all dependencies are already matched?
Before the first install_prereq I tried to install a few packets manually, but finally I decided to use the script. What is wrong now?

What version of PJSIP do you have installed?

How can I check that?

There’s the CLI command “pjsip show version” but if you don’t have a running version you’d need to look at where it was installed from. If it’s an old version and this was added later then that is likely the cause. It’s not critical to the functionality of the transport management module though so if you file an issue[1] we should be able to add a check to have it continue to build with the older version. I do recommend ensuring you run the latest PJSIP though as there have been other fixes in it.

[1] https://issues.asterisk.org/jira

After a few attempts, here is more information.

The libpjproject-dev package which caused mentioned error is libpjproject-dev_2.1.0.0.ast20130823-1_i386.deb, which was installed via apt-get. Next, I downloaded, compiled and installed PJSIP 2.4.5 from Download PJSIP - Open Source SIP, Media, and NAT Traversal library, which lead to following error during Asterisk compilation:

res_pjsip/pjsip_distributor.c: In function ‘find_request_serializer’:
res_pjsip/pjsip_distributor.c:118:21: error: ‘pjsip_transaction’ has no member named ‘mutex’
pj_mutex_unlock(tsx->mutex);

res_pjsip/pjsip_distributor.c: In function ‘find_dialog’:
res_pjsip/pjsip_distributor.c:234:21: error: ‘pjsip_transaction’ has no member named ‘mutex’
pj_mutex_unlock(tsx->mutex);

Finally,

./configure --with-pjproject-bundled

lead to proper build without problems.

Your installation of PJSIP 2.4.5 from source did not overwrite the installed package, causing two installs to be present on the system which made the build fail. The configure script may have detected one but the paths on the system caused another to be used.

1 Like