Hello,
can anybody give me a hint, how I could delete the _empty_ (blank) last line of the message body / SDP (it consists of #012#015 only)? This blank line is the rest of the original MIME message, which was reduced to a standard message with content SDP only by kamailio-3.3.4, which is principally working fine.
I´ve tried using the textops functions "subst" and "subst_body", but they do not behave as like as real SED. When I try this string manipulation with SED, it is working fine with [sed '${/^$/d}']. But the subst implementation does not support the additional parameters '${' / '}'.
Does anybody know how to delete the last line of the whole message?
regards, Klaus
P.S. the end of the message looks like this:
[...]#015#012a=rtpmap:8 PCMA/8000#015#012a=ptime:20#015#012#015#012
Is this broken body generated by Kamailio, or by some other entity? If it is done by Kamailio with filter_body(), it should be fixed.
If done by some other entity, it should be fixed in the broken entity. I have no idea why subst does not work, but as workaround you can try something like:
$var(sdp) = $(mb{s.striptail,2}); set_body("$var(sdp)", "application/sdp");
regards Klaus
On 05.07.2013 13:05, Klaus Feichtinger wrote:
Hello,
can anybody give me a hint, how I could delete the _empty_ (blank) last line of the message body / SDP (it consists of #012#015 only)? This blank line is the rest of the original MIME message, which was reduced to a standard message with content SDP only by kamailio-3.3.4, which is principally working fine.
I´ve tried using the textops functions "subst" and "subst_body", but they do not behave as like as real SED. When I try this string manipulation with SED, it is working fine with [sed '${/^$/d}']. But the subst implementation does not support the additional parameters '${' / '}'.
Does anybody know how to delete the last line of the whole message?
regards, Klaus
P.S. the end of the message looks like this:
[...]#015#012a=rtpmap:8 PCMA/8000#015#012a=ptime:20#015#012#015#012
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