# SRTP not detected

**URL:** <https://community.asterisk.org/t/srtp-not-detected/43443>\
**Category:** Asterisk Support\
**Created:** [July 23, 2013, 2:31pm UTC](https://community.asterisk.org/t/srtp-not-detected/43443 "2013-07-23T14:31:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![teck](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/teck/32/253_2.png) [@teck](https://community.asterisk.org/u/teck)\
**Post date:** [July 23, 2013, 2:31pm UTC](https://community.asterisk.org/t/srtp-not-detected/43443/1 "2013-07-23T14:31:39Z")

</div>

I cannot compile Asterisk, with SRTP 1.4.4.  
I’ve build the libsrtp libraries with CentOS and pkgconfig standards, but Asterisk refuses to detect the libs.

Steps To Reproduce  
On a CentOS minimal setup, install the libraries:

[quote]# find /usr/include -name srtp.h  
/usr/include/srtp/srtp.h  
/usr/include/openssl/srtp.h

$ cd SOURCES/asterisk-11.5.0  
$ ./configure --host=x86\_64-redhat-linux-gnu --build=x86\_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-asound --with-bluetooth --with-cap --with-cpg --with-crypto --with-dahdi --with-gsm --with-iconv --with-iksemel --with-inotify --with-ldap --with-libcurl --with-libxml2 --with-ltdl --with-lua --with-mysqlclient --with-netsnmp --with-ogg --with-postgres --with-popt --with-pri --with-radius --with-spandsp --with-srtp --with-ss7 --with-speex --with-speexdsp --with-sqlite3 --with-ssl --with-tds --with-unixodbc --with-vorbis ‘LDFLAGS=-lm -Wl,–as-needed -Wl,–strip-all’

checking for SSL\_CTX\_set\_tlsext\_use\_srtp in -lssl… yes  
checking for openssl/ssl.h… (cached) yes  
checking for srtp\_init in -lsrtp… yes  
checking srtp/srtp.h usability… no  
checking srtp/srtp.h presence… no  
checking for srtp/srtp.h… no  
checking for srtp\_shutdown in -lsrtp… yes  
checking for srtp/srtp.h… (cached) no  
…  
checking for mandatory modules: ALSA BLUETOOTH CAP COROSYNC CRYPTO DAHDI GSM ICONV IKSEMEL INOTIFY LDAP LIBXML2 LTDL LUA MYSQLCLIENT NETSNMP OGG PGSQL POPT PRI RADIUS SPANDSP SS7 SPEEX SPEEX\_PREPROCESS SPEEXDSP SQLITE3 SRTP OPENSSL FREETDS UNIXODBC VORBIS… fail  
configure: \*\*\*  
configure: \*\*\* The SRTP installation appears to be missing or broken.  
configure: \*\*\* Either correct the installation, or run configure  
configure: \*\*\* including --without-srtp.[/quote]

Can you let me know what am I missing? Thanks.

---

<div class="post-metadata">

**Author:** ![teck](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/teck/32/253_2.png) [@teck](https://community.asterisk.org/u/teck)\
**Post date:** [July 23, 2013, 9:24pm UTC](https://community.asterisk.org/t/srtp-not-detected/43443/2 "2013-07-23T21:24:32Z")

</div>

I got it solved. The crucial options for srtp are:  
export CFLAGS="%{optflags} -fPIC"  
%configure --program-prefix=srtp --disable-static

You can get the precompiled libs for CentOS/Redhat 6 only at [rpm.axivo.com](http://rpm.axivo.com).

Regards,

Floren
