[SOLVED] Correct libsrtp version - Asterisk 15.x & Ubuntu 16.04


I’m running v15.1.1 under Ubuntu 16.04 Server on a cloud VPS using PJSIP.

I’ve just seen the instruction that the supported version for libsrtp is 1.5.4.

Ubuntu doesn’t have this version in the repository (theirs is 1.4.5). I can compile from source but I’m concerned about anything breaking on the VPS if I do. I’m only running Asterisk and a couple of vpns (Shadowsocks and OpenVPN).

Everything seems to be working fine so what are the risks of not upgrading?

Has anyone done this on Ubuntu 16.04?

Any advise/help much appreciated.

Do you need that library at all – are you doing (a) WebRTC or (b) SIP-over-TLS?

That statement is not true anymore. Together with Teluu, I was able to resolve all issues with libSRTP 1.4.5. Any version/variant since 1.4.2 should do. If everything fails, you can even use libSRTP 2.1 and compile/install that yourself. That is the recommend way anyway. I am doing that on Ubuntu 16.04 LTS myself.

cd ~/Documents
wget github.com/cisco/libsrtp/archive/2_1_x_throttle.tar.gz
tar xf 2_1_*.tar.gz && rm 2_1_*.tar.gz
cd ./libsrtp*
./configure --prefix=/usr
make shared_library
sudo make install

Ahh, one additional note: The bundled PJProject in Asterisk has no sRTP part, see the config_site.h. Therefore, all this affects you only if you build PJSIP manually. Again, both Asterisk and PJSIP should do with any version/variant of libSRTP since 1.4.2. Everything else would be a bug worth to be reported.

1 Like

Thanks - very helpful info.

Perhaps you might want to update the wiki accordingly?

Marked as solved.

Please, post the URL of that Wiki, so I can ask for an update. By the way, you can do that yourself – that way you get honored.

The link is https://wiki.asterisk.org/wiki/display/AST/libsrtp

It might be possible for me to do it, but having the technical knowledge and understanding to explain it is another matter entirely!! I think this is one for someone with more knowledge than I (like you?!)!!

Mhm. First time I see that wiki entry and it points nowhere as reference (mailing list, discussion board or issue tracker). That is a real pity. Anyway, if you have to use libSRTP, I recommend to build it yourself and go for the latest version. Alternatively, you go for Ubuntu 17.10 which comes with libSRTP 2.1. If you face any issue, just say so, and we look into that together. Because I use Ubuntu 16.04 LTS and libSRTP 2.1 as well, that should be easy to reproduce/debug.