[SR-Users] How to remove attribute from SDP ?

Jorj Bauer jorj at isc.upenn.edu
Wed May 14 15:31:08 CEST 2014

> Can anybody suggest the way to remove a line/attribute from SDP that matches some pattern (regexp), some kind of "grep -v" for SDP ?

Another possibility might be to intentionally mangle an SDP offer so that it's unrecognizable.

Background: Asterisk is our VM and Media server. We had a case where we were using SRTP between handsets, but Asterisk would crash if a handset offered SRTP and Asterisk didn't have the SRTP module loaded. Our temporary workaround was to mangle the SDP offer so that Asterisk didn't see the offending SRTP offer.

This route replaces any "RTP/SAVP" with "RTP/GARBAGIO". Which Asterisk doesn't recognize, and therefore didn't invoke the bad behavior. We found this easier and lighter weight than trying to remove the line entirely, quite suitable for the temporary hack we needed.

       if (method=="INVITE") {

-- Jorj

Jorj Bauer
Manager of Engineering, Research and Development
Information Systems and Computing, University of Pennsylvania
XMPP: jorj at upenn.edu

More information about the sr-users mailing list