trying to hack around the possible fix_nated_sdp("1") issue that i outlined in previous message, i thought to remove video media description from sdp. in sdpops module there is sdp_with_media(type), but for some reason no sdp_remove_media(type) function. is there some other means to get rid of sdp video media description?
-- juha
Juha,
On 09/19/2011 02:54 PM, Juha Heinanen wrote:
trying to hack around the possible fix_nated_sdp("1") issue that i outlined in previous message, i thought to remove video media description from sdp. in sdpops module there is sdp_with_media(type), but for some reason no sdp_remove_media(type) function. is there some other means to get rid of sdp video media description?
I suppose you could use plain old subst_body() from textops to do it, if push came to shove:
http://www.kamailio.org/docs/modules/3.1.x/modules_k/textops.html#id2946106
I doubt that the PV ($rb) referring to the message body is mutable. The documentation does not suggest that. But if it were, you could use this transformation:
http://www.kamailio.org/dokuwiki/doku.php/transformations:3.1.x#resubst_expr...
It seems like a slightly cleaner way than subst_body().
alex,
thanks for the pointers. using regexs to manipulate sdp is really the scary last resort.
-- juha
Hello,
On 9/19/11 9:03 PM, Juha Heinanen wrote:
alex,
thanks for the pointers. using regexs to manipulate sdp is really the scary last resort.
it is in the roadmap for sdpops module, not time to make it for 3.2, but will get in there soon. Actually the implementation should be rather simple: - get the sdp part of the body (if multi-part, easy with the sdp parser from core) or the whole body - search for m=video and if found, search for next m= and remove till there or if not found to end of the sdp body
Cheers, Daniel