[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openser-devel
Subject:    Re: [sr-dev] Change SIP message within module
From:       Mikko Lehto <mslehto () iki ! fi>
Date:       2015-04-29 11:56:18
Message-ID: 20150429115618.GW10356 () lakka ! kapsi ! fi
[Download RAW message or body]

Cockhootec Yahrabee <cockootec@gmail.com>:

> Also it is even possible to add SDP attribute by adding new data_lump?
> Isn't data_lumps dedicated to manage SIP message headers?

Lumps work also for message bodies.

Have a look at modules/nathelper/nathelper.c -> fix_nated_sdp_f()
There is example of insert_new_lump_after() where stuff is added to body.

I have not personally written code that adds lumps to messages, but removing
from body works perfectly with data lumps i.e. sdpops/sdp_remove_line_by_prefix().

 
> I just need a solid answer for question: "Is the adding attribute to SDP
> body implemented in Kamailio? If yes where can I find it and how can I use
> it?"

In core there seem to be only SDP attribute get functions (/parser/sdp).
Examples of body modification can be found from different modules
(sdpops, nathelper, rtpengine, mangler).


> If it is not implemented yet how can I contribute? It is easy as modifying
> `buf` of `sip_msg`?

I think core committers can comment more on this, but in my view contributions
to sdpops -module would be great. For script writer or C module functions.

-- 
Mikko

_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic