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

On 01/09/14 15:19, aft wrote:
Hi,

I'm trying with the following block of codes to do it... :

  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?

On Mon, Sep 1, 2014 at 4:23 PM, aft <[email protected]> wrote:
On Mon, Sep 1, 2014 at 4:18 PM, Daniel-Constantin Mierla
<[email protected]> wrote:
Hello,

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 :(


Cheers,
Daniel


On 01/09/14 12:12, aft wrote:
Hi,

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
[email protected]
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


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to