[OpenSER-Users] remove message body

Andreas Granig agranig at sipwise.com
Wed May 14 18:04:16 CEST 2008


Hi,

I've written a small patch to introduce a new function 
replace_body_atonce with the same signature as replace_body_all to 
textops for the 1.3.x branch (see attached). The only difference is to 
allow the regexp to match the whole body, so one can use for example...

	if(has_body() && replace_body_atonce("^.+$", ""))
		remove_hf("Content-Type");

... to strip the body from the message if needed. It's not exactly what 
Klaus mentioned in his feature request, but it still gives more 
flexibility in manipulating the message body.

If this is something we could consider to integrate it into the main 
branch, I'll write the docs and upload a new patch to the tracker for a 
review.

Andreas


Andreas Granig wrote:
> Hi,
> 
> Is there any possibility to remove the whole message body of a SIP 
> message? replace_body_all and subst_body seem to operate per line, 
> leaving a bunch of "\n" behind.
> 
> There's a two year old feature request for that on the tracker 
> (https://sourceforge.net/tracker/?func=detail&atid=743023&aid=1546501&group_id=139143). 
> Any news on that? Any other possibilities?
> 
> Andreas
> 
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replace_body_atonce.diff
Type: text/x-diff
Size: 3324 bytes
Desc: not available
Url : http://lists.kamailio.org/pipermail/users/attachments/20080514/b6eea25a/attachment.diff 


More information about the Users mailing list