SRTP Module Missing in 3.211.63-5

Hello,

Testing FreePBX Distro here and I am very satisfied. Out of curiosity, why is the SRTP module missing from FreePBX 3.211.63-5? What’s the best way to get it on my system, should I just recompile Asterisk from source? If so, where is the source code on the distro? (Should I just pull the matching version from Digium?)

Thank you!

-R

Just to follow-up I’m seeing this message in the console:
chan_sip.c:32788 setup_srtp: No SRTP module loaded, can’t setup SRTP session.

There’s no res_srtp in /usr/lib64/asterisk/modules/

I managed to install srtp onto a system running the current “stable” 2.210.62-5 x86_64 version, which is running asterisk 1.8.20.1, based on http://blog.michael.kuron-germany.de/2011/04/asterisk-compile-srtp-module-without-recompiling-asterisk/

My steps:

  1. Download srtp-1.4.4.tgz from http://srtp.sourceforge.net/

  2. Extract the tgz file, change directory to srtp, run ./configure

  3. If you’re not using x86_64 skip this step. Edit the “Makefile” and add “-fPIC” to the “CFLAGS” line

  4. make; make install

  5. Download res_srtp.c for your version of asterisk. In my case that is http://svnview.digium.com/svn/asterisk/tags/1.8.20.1/res/res_srtp.c?revision=379878&content-type=text%2Fplain

  6. gcc -fPIC -shared res_srtp.c -o res_srtp.so -lsrtp -DAST_MODULE=“res_srtp”
    (if you’re not using x86_64 remove the “-fPIC”)

  7. cp res_srtp.so /usr/lib64/asterisk/modules/

When asterisk reloaded, the module was included

But I truly agree, the FreePBX maintainers really really ought to include libsrtp and res_srtp.so natively.

There will always be a difference of opinion between what “is considered necessary” by a particular user and what is “provided” by the developers of a “distro”, if you as a user feel the imperative need for a particular facility, then post a request for such inclusion to the developers, until then just do it yourself, it’s all open source (well, most of it :wink: ) and absolutely not brain surgery . . . .

thepossum, I tried that but it didn’t work with Asterisk 11.2.1. I tried compiling it as a whole and copying the module but Asterisk complained that the module was not compiled with the same options as the package included in the distro.

dicko, I would happily compile the module on my own but the SRPMs do not appear to be available nor are the compiler options that the FreePBX distro team used. Can anyone on the team share the SRPMs or the compiler options?

Thank you!

Why not compile the whole shebang? that way you would have what you wanted built just the way you choose.

Guys,
We will be adding res_srtp to any future asterisk builds and getting them added to the repo. My apologizes about any inconvenience as we used to have this added prior to switching up our build process.

1 Like

dicko,

It would likely break the upgrade script and the whole reason I decided to use the distro. I did consider it, but then I might as well start building everything from scratch starting with CentOS for one module. :slight_smile:

GameGamer43,

Thank you! Any ETA? :slight_smile:

Bryan,

Any chance we might get the SRPMs or the compile flags you used for other custom modules we may want to add to the distro?

Bryan,

TLS seems to have stopped working since you added the Asterisk with SRTP…can you take a look?