Hi
I created this patch to clean ugly experimental SDP lines. It is tested with Content-Type multipart/mixed and application/sdp and body cleaning seem to work fine.
Here is a sample of unwanted SDP attributes that can be filtered with this function: --- a=X-sqn:0 a=X-cap: 1 audio RTP/AVP 100 a=X-cpar: a=rtpmap:100 X-NSE/8000 a=X-cpar: a=fmtp:100 192-194,200-202 a=X-cap: 2 image udptl t38 ---
Comments appreciated.
mikko,
i think you could achieve the same by using replace_body_all(re, txt) from textops module.
-- juha
2012-10-01 (Mon) 08:52 UTC +0300 Juha Heinanen jh@tutpro.com:
i think you could achieve the same by using replace_body_all(re, txt) from textops module.
Yes, this works if body contains only SDP: replace_body_all("^a=X-.*\n","");
But I was thinking that it is not a good idea as it modifies blindly whole body part, ignoring boundaries of individual MIME parts.
Hello,
indeed it can offer more strict matching and removing. Since the code is ready I will commit it soon, thanks for the patch.
Cheers, Daniel
On 10/1/12 11:49 AM, Mikko Lehto wrote:
2012-10-01 (Mon) 08:52 UTC +0300 Juha Heinanen jh@tutpro.com:
i think you could achieve the same by using replace_body_all(re, txt) from textops module.
Yes, this works if body contains only SDP: replace_body_all("^a=X-.*\n","");
But I was thinking that it is not a good idea as it modifies blindly whole body part, ignoring boundaries of individual MIME parts.