<div dir="ltr"><div>Good day Solarmon,</div><div>if to take a look at sipmsgops.so documentation here: <a href="https://opensips.org/html/docs/modules/2.4.x/sipmsgops#func_add_body_part">https://opensips.org/html/docs/modules/2.4.x/sipmsgops#func_add_body_part</a></div><div>(I just picked out the first appeared branch, which was 2.4, you can pick out either 3.0 or one you need).</div><div><br></div><div>The quotation here:<br></div><div>"This function can be used to add a new body part to the message body.
If another part already exists, the body of the message will be converted
to a multi-part body automatically."</div><div>It looks like this definition clears out your question well. If not, please let me know what is not clear for you here.<br></div><div><br></div><div>The same module (sipmsgops.so) has another functionality for SIP headers insertions instead.</div><div>For an insertion of SIP headers, please refer to "insert_hf()" : <a href="https://opensips.org/html/docs/modules/2.4.x/sipmsgops.html#func_insert_hf">https://opensips.org/html/docs/modules/2.4.x/sipmsgops.html#func_insert_hf</a></div><div>(same function exists for 3.0 branch as well)<br></div><div><br></div><div>For an insertion of SDP headers, you might try to use "search_append_body()" of textops.so: <a href="https://opensips.org/html/docs/modules/2.4.x/textops.html#func_search_append_body">https://opensips.org/html/docs/modules/2.4.x/textops.html#func_search_append_body</a></div><div>(same function exists for 3.0 branch as well)</div><div><br></div><div>For your case, I would try to use something like this:<br>"search_append_body("^a=.+$", "a=ptime:20\r\n");"</div><div><br></div><div>Otherwise, I don't see any function that could just simply insert one more SDP header,</div><div>without pointing out - after which particular SDP header, your new header, should be thrown in. Might be a case for a feature request.</div><div>I might be mistaken here. Please correct me, if I'm wrong.</div><div><br>
</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 8, 2020 at 1:08 PM solarmon <<a href="mailto:solarmon@one-n.co.uk">solarmon@one-n.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><div><br></div><div>How can I add/append a ptime value in the SDP packet?</div><div><br></div><div>I've tried using:</div><div><br></div><div><div>add_body_part("a=ptime:20", "application/sdp");</div></div><div><br></div><div>However, this just creates an additional "application/sdp" section rather than add/append to the existing one.</div><div><br></div><div>Is there not a sipmsgops or textops function to process the SDP headers/atttibutes?</div><div><br></div><div>Thank you. </div><div><br></div></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Best regards,<br></font></div><div dir="ltr"><font style="background-color:rgb(255,255,255)" color="#0b5394">Donat Zenichev<br><br></font></div></div></div></div></div></div></div></div>