Hello,
to understand properly how message is updated, see the details at:
-
http://www.kamailio.org/wiki/tutorials/faq/main#why_changes_made_to_headers_or
Anyhow, I think you could try to append at the end of any a= ... line,
thus matching on "^a=.+$"
For long term, I think adding a function that adds content to body/sdp
would be useful, so you can add a request for a new feature in our
tracker not to forget about it.
Cheers,
Daniel
Post by aftHi,
if (is_method("INVITE") && has_body()) {
#search_append_body("nortpproxy", "a=ptime:20\r\n");
xlog("INVITE with SDP");
if(search_body("a=nortpproxy:yes"))
{
xlog("found nortpproxy");
replace_body("a=nortpproxy:yes","a=ptime:20");
}
}
But for some strange reason, the second log message, that is
xlog("found rtpproxy") is not executed. But from a packet capture, i
can see it does have a "a=nortpproxy:yes" field. Why its not matching?
Post by aftOn Mon, Sep 1, 2014 at 4:18 PM, Daniel-Constantin Mierla
Post by Daniel-Constantin MierlaHello,
see textops module -- there are some functions that work on body based on
regular expressions matching and substitution.
Problem is the original SDP does not have a "a=ptime" field. So what
should i search for?
I do not see an "append_body()" method :(
Post by Daniel-Constantin MierlaCheers,
Daniel
Post by aftHi,
I want to add this media attribute to SDP.
a=ptime:<packet time>
[1] Its not covered in SDPops module
[2] its not added when i use rtpproxy_manage("z<packet size>") to
repacketize the rtp stream.
So how should i do it?
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
-Cheers
-Arif
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany ::: Oct 15-17, San Francisco, USA