<div dir="ltr"><div>Hello,</div><div><br></div><div>I am trying to play early media purely relaying on kamailio and i have accomplished that using the below:</div><div><br></div><div>rtpengine_manage();<br>append_to_reply("Content-Type: application/sdp\r\n");<br> $var(body)= $(rb{re.subst,/(IP4.).*/\<a href="http://127.0.0.1/g}">127.0.0.1/g}</a>);<br>set_reply_body($var(body), "application/sdp");<br>send_reply("100","Trying");<br>send_reply("183","Session In Progress");<br>play_media("totag=$ft file=/home/rawad/test.wav");</div><div><br></div><div>My problem is that once the RTP stream starts the call is kept open so my question is is there a way for kamailio to detect the end of rtp stream so that i can send BYE or can kamailio do that automatically.<br></div></div>