Installing srtp on Centos

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!

About these ads

About Chris Sullivan

Vice-President, Finance & Operations, IDC Canada. PADI Master Scuba Diver Trainer and Technical Diver.
This entry was posted in Google, Linux, Open Source, VOIP and tagged , , , , . Bookmark the permalink.

3 Responses to Installing srtp on Centos

  1. Thanx. You save me a couples hours and some damns!. Thnx again for sharing. Was stucked on runtest . So i can go ahead with my lab!.

    Best Regards!

    ivanofmg

    • Chris Sullivan says:

      Ivanof, I’m glad to be able to help you. After all the help I’ve received from blogs, forums and other web sites, and of course all the authors of open source software, it’s great to be able to contribute something myself.

      Chris

  2. spicyramen says:

    Thanks Chris, this was helpful,
    cd test; ./rtpw_test.sh >/dev/null
    ./rtpw_test.sh: line 27: rtpw: command not found
    make: *** [runtest] Error 254

    I no longer got the error after the changed you documented

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s