[SR-Users] Adding a media attribute to SDP

aft aftnix at gmail.com
Mon Sep 1 15:19:20 CEST 2014


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 <aftnix at gmail.com> wrote:
> On Mon, Sep 1, 2014 at 4:18 PM, Daniel-Constantin Mierla
> <miconda at gmail.com> 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
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> --
> -Cheers
> -Arif



-- 
-Cheers
-Arif



More information about the sr-users mailing list