<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>afaik, rtpengine is suitable when using Kamailio in proxy mode,
forwarding the INVITE, not sending 200ok from it.</p>
<p>Maybe you should look at rtp_media_server module for building an
announcement server:</p>
<p> * <a
href="https://www.kamailio.org/docs/modules/devel/modules/rtp_media_server.html">https://www.kamailio.org/docs/modules/devel/modules/rtp_media_server.html</a></p>
<p>It is only in master branch, not in a stable release, but maybe
you can just copy and paste it in an older branch clone tree.</p>
<p>Otherwise, iirc, there is a variable that you can get the sdp
returned by rtpengine and you can add it to the reply generated by
kamailio. If not, do msg_apply_changes() and get the new body with
$rb variable and append it to reply with the function from textops
module.</p>
<p>Cheers,<br>
Daniel<br>
</p>
<div class="moz-cite-prefix">On 11.06.19 16:36, Ali Shirvani wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFQ97XEXkRUfy9CwONGWK2Mf52eSeJgAXK_zAoUquAbwtqgS7g@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>I tried to implement simple announcer by using play_media
function in latest rtpengine module. I implemented simple Lua
script and I tried to test the implementation with simple SIPp
scenario.</div>
<div><br>
</div>
<div>Here is the Lua function to reply the received INVITE
request.</div>
<div><br>
</div>
<div>```Lua</div>
<div>
<table class="gmail-highlight gmail-tab-size
gmail-js-file-line-container"
style="box-sizing:border-box;border-collapse:collapse;border-spacing:0px;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
UI",Helvetica,Arial,sans-serif,"Apple Color
Emoji","Segoe UI Emoji","Segoe UI
Symbol";font-size:14px">
<tbody style="box-sizing:border-box">
<tr style="box-sizing:border-box">
<td id="gmail-LC93" class="gmail-blob-code
gmail-blob-code-inner gmail-js-file-line"
style="box-sizing:border-box;padding:0px
10px;line-height:20px;vertical-align:top;overflow:visible">function
ksr_route_announcer()<br>
KSR.info("======= Announcer =====\n");<br>
local u = KSR.pv.gete("$rU");<br>
KSR.info("username is: " .. u .. "\n");<br>
if u == "ann" then<br>
KSR.info("announcer has been called.\n");<br>
if
KSR.textops.has_body_type("application/sdp") then<br>
KSR.info("request contains SDP.\n");<br>
KSR.tm.t_newtran();<br>
KSR.rtpengine.rtpengine_manage0();<br>
KSR.tm.t_reply(200, "OK");<br>
KSR.x.exit();<br>
end<br>
end<br>
end<br>
</td>
</tr>
</tbody>
</table>
</div>
<div>```</div>
<div><br>
</div>
<div>According to kamailio logs rtpengine modified the INVITE
SDP, but I want to add SDP to 200 OK response. How should I
manage rtpengine to append SDP answer to the 200 OK response?</div>
<div><br>
</div>
<div>The attached is the SIPp log, as you can see that last 200
OK doesn't contain SDP.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Ali</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla -- <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
</body>
</html>