Asterisk 16 SRTP

Hello, i’m a bit confuse reading the documentation about srtp because sometimes you read that ASterisk 16 has native support for Srtp and on the other hand some tutorials said you must install it before installing Asterisk.

So, must we install it before or not?


Asterisk does not include an SRTP implementation, it relies on the libsrtp library which must be installed before Asterisk is built. The only SRTP logic in Asterisk is for SDP handling generally of it and the code that utilizes the functionality provided by libsrtp.

Thanks for your reply jcolp!
Must it be done with ./configure --with-xxxxx statement or is enough with the make menuconfig and mark the strp?

Another question is if i recompile and reinstall will i loose the .conf i had already from a previous installation?


Not passing --with to configure will cause it to look on the system in the normal paths for the library, unless libsrtp is installed in an obscure location it is not needed.

“make install” does not overwrite configs, only “make samples” and “make basic-pbx” does.

Ok, i see.

When i try to install it i see in the make menuconfig that res_srtp has 3x’s to the left. I assume this is because asterisk can not find it… but seems to be installed.
Any clue about that?

The important information is in the Depends on and Can Use lines, near the bottom. I’ve forgotten what “E” means.

Please copy as text, not as images.

Thanks for your reply, i still don’t understand what you mean about ‘important’

The “E” means an external dependency.

As for this I’d suggest looking at the output when running “configure” to see if libsrtp is detected.

It’s important because it tells you something about why the option cannot be selected.

After configure this is the output relating to strp

checking for srtp_init in -lsrtp2… yes
checking srtp2/srtp.h usability… yes
checking srtp2/srtp.h presence… yes
checking for srtp2/srtp.h… yes
checking for the ability of -lsrtp2 to be linked in a shared object… yes
checking for srtp_crypto_policy_set_aes_cm_256_hmac_sha1_80 in -lsrtp2… yes
checking for srtp_crypto_policy_set_aes_cm_192_hmac_sha1_80 in -lsrtp2… no
checking for srtp_crypto_policy_set_aes_gcm_128_8_auth in -lsrtp2… no
checking for srtp_shutdown in -lsrtp2… yes
checking for srtp2/srtp.h… (cached) yes
checking for srtp_get_version_string in -lsrtp2… yes
checking for srtp2/srtp.h… (cached) yes

It appears as though it was detected fine. It still isn’t selectable in “make menuselect”? What if you also install “libssl-dev” and re-run configure?

You could also use the install_prereq script in the contrib/scripts directory to install all the dependencies which may resolve the problem.

Great, seems to be installed well after reconfiguring! :beers:

But now i’m getting this message:
WARNING[15309][C-00000009]: res_rtp_asterisk.c:1093 ast_rtp_ice_start: No RTCP candidates; skipping ICE checklist (0x7ffb24046630)

and this one too
chan_sip.c:4321 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.