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/

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 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.

8 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!


    • 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.


  2. spicyramen says:

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

    I no longer got the error after the changed you documented

  3. Mr Trọng says:

    Thanks. It Worked for me

  4. Rendika Yoga says:

    Excuse me Sir. I have followed your tutorial, but still there is an error with error code make: *** [runtest] Error 1 and without any information below whether it is safe or not sir

    • Chris Sullivan says:

      Hi Rendika,

      That’s not much information to go on. Can you post a copy of, say, 20 lines prior to the error as well?


      • Rendika Yoga says:

        This my error Sir I’m sorry I just saw your blog ,this is sir a copy of my error
        crypto/test/cipher_driver -v >/dev/null
        crypto/test/kernel_driver -v >/dev/null
        test/rdbx_driver -v >/dev/null
        test/srtp_driver -v >/dev/null
        test/roc_driver -v >/dev/null
        test/replay_driver -v >/dev/null
        test/dtls_srtp_driver >/dev/null
        cd test; ./ >/dev/null
        2: no process found
        make: *** [runtest] Error 254

      • Chris Sullivan says:

        I’ve never seen an error like that. You could try locating and running it manually to see what it does

Leave a Reply

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

You are commenting using your 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