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

route[INSECUREFWD]
{
       if (method=="INVITE") {
               subst("/^m=audio(.+)RTP\/SAVP/m=audio\1RTP\/GARBAGIO/");
       }
       route(FORWARD);
}

-- Jorj

-- 
Jorj Bauer
Manager of Engineering, Research and Development
Information Systems and Computing, University of Pennsylvania
215.746.3850
XMPP: j...@upenn.edu


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to