You can be forgiven if you don’t know what srtp is. It is a secure version of rtp, which is the protocol most often used to carry voice traffic across data networks. VOIP also uses a signalling protocol like SIP to establish and terminate sessions, but rtp/strp transports it.
I became interested in this protocol following the release of Asterisk 1.8, a software pbx system which I run at home. I’m rebuilding my linux platform to make it more robust (right now because I’ve improperly installed things from source, yum no longer works on my current server), and decided to include srtp in the build.
The package is install in source form from a tarball, and installs in the usual way (./configure followed by make). Once you run make, the documentation recommends that you run make runtest to test the functionality before installing using make install. Unfortunately, on Centos 5.6 at least, this test failed with error 254, command not found, at line 27 of test/rtpw_test.sh.
It turned out that this script tried to define a symbol for the strp executable, rtpw, using the command RTPW=rtpw. This doesn’t work. I changed the line to RTPW=./rtpw, and the script ran fine and reporting that the tests passed.
One of my colleagues believes that some programmers of open source software leave little traps like this to ward off the incompetent but in this case I’m not sure. Certainly having to dig into the script caused me a fair amount of trouble, mostly because of the 2-3 hours of Google searching I did to see if anyone else had experienced the same problem. Strangely, I saw no evidence of that, and hopefully this post will inform anyone who treads the same path.
The other trick was that I had to run ./configure CFLAGS=-fPIC to make the srtp library shareable. Asterisk ./configure complains if you don’t. Note: Don’t forget the hyphen as in -fPIC!