<div dir="ltr">Thank you, Mikko,<div><br><div>I need to perform this actions inside my module (I don't want to use config files and config functions to perform this actions) because the module performs more actions than that ;-)</div><div>Also this means that it is not possible for me to just work on top of the sdpops.</div><div><br></div><div>But thanks I will look at data lumps. It's shame that all useful functions such as `msg_apply_changes()` (<a href="https://github.com/kamailio/kamailio/blob/fcdf5f9cfff634ebfa736d7084d5e5483a36355b/modules/textopsx/textopsx.c#L149">https://github.com/kamailio/kamailio/blob/fcdf5f9cfff634ebfa736d7084d5e5483a36355b/modules/textopsx/textopsx.c#L149</a>) are static so it means that I need to copy&paste them when I want to use them within module.</div><div><br></div><div>Also it is even possible to add SDP attribute by adding new data_lump? Isn't data_lumps dedicated to manage SIP message headers?</div><div><br></div><div>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?"</div><div>If it is not implemented yet how can I contribute? It is easy as modifying `buf` of `sip_msg`?</div><div><br></div><div>I am sorry maybe the subject of this email is not clear enough. I mentioned changing SIP message but not SDP body.</div><div><br></div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 29, 2015 at 9:00 AM, Mikko Lehto <span dir="ltr"><<a href="mailto:mslehto@iki.fi" target="_blank">mslehto@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Cockhootec Yahrabee <<a href="mailto:cockootec@gmail.com">cockootec@gmail.com</a>>:<br>
<span class=""><br>
> I have function where I cast `sip_msg`'s `body` to `sdp_info` structure and<br>
> within this function I am changing some fields in `sessions` and `streams`<br>
> list.<br>
><br>
> I am able to see changes when I am printing them after message leaves the<br>
> function but Kamailio sends the original message not the changed one. Do I<br>
> need somehow let the Kamailio know that the message was changed and it<br>
> should rebuild `buf` field? Or I need to change directly `buf` field within<br>
> `sip_msg`?<br>
<br>
</span>You need to handle message modifications as data lumps.<br>
Have a look at Kamailio development guide:<br>
<a href="http://www.asipto.com/pub/kamailio-devel-guide/#c14datalump" target="_blank">http://www.asipto.com/pub/kamailio-devel-guide/#c14datalump</a><br>
<br>
Also, look if you can extend sdpops module instead of baking new one:<br>
<a href="http://kamailio.org/docs/modules/devel/modules/sdpops.html" target="_blank">http://kamailio.org/docs/modules/devel/modules/sdpops.html</a><br>
<br>
Hope this helps :)<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Mikko Lehto<br>
<br>
_______________________________________________<br>
sr-dev mailing list<br>
<a href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a><br>
</font></span></blockquote></div><br></div>