<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>I was able to get audio,  The problem I was having is the Originator string in the SDP.  However, I am still having the same issue with accepting the ACK from the Originator and not resending the 200OK.  Can someone please help with this issue?<div><br></div><div>Thank you</div><div><br><div><b>Code snippet for the Late Media route</b></div><div>route["LateMedia3"]{<br>    if (has_body("application/sdp")) {<br>        xlog("######## Entered route LateMedia3 with Fake SDP from Originator ########\r\n");<span class="gmail-im" style="color:rgb(80,0,80)"><br>        rtpengine_offer();<br>        $json(reply) := $rtpquery;<br>        $var(port)=$json_pretty(reply/tags/$ft/medias[0]/streams[0]/local port);<br></span>        $var(addr)=$json_pretty(reply/tags/$ft/medias[0]/streams[0]/local address);<br>        remove_body_part();<br>        append_to_reply("Contact:<sip:$rU@$socket_in(ip):$socket_in(port);user=phone>\r\n");<span class="gmail-im" style="color:rgb(80,0,80)"><br>        append_to_reply("Content-Type: application/sdp\r\n");<br></span>        $var(body) = $(rb{re.subst,/(IP4.).*/\1$var(addr)/g});<span class="gmail-im" style="color:rgb(80,0,80)"><br>        $var(body) = $(var(body){re.subst,/(audio.)...../\1$var(port)/g});<br>        t_reply_with_body(200, "OK", $var(body));<br></span>        rtpengine_play_media("call-id=$ci from-tag=$ft file=/etc/rtpengine/unk_num.wav");<br>        async(sleep(10), after_media);<br>     } else {<br>        xlog("######## Entered route LateMedia3 No SDP received, Create one from variable ########\r\n");<br>        $var(newbody) = ("v=0\r\no=Opensips " + $Ts + " 0 IN IP4 10.255.100.147\r\ns=-\r\nc=IN IP4 10.255.100.147\r\nt=0 0\r\nm=audio 3140 RTP/AVP 0 101\r\na<br>=sendrecv\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:101 telephone-event/8000\r\na=fmtp:101 0-15\r\n");<br>        xlog("######################### Body to RTPENGINE is ###########################\r\n$var(newbody)\r\n");<span class="gmail-im" style="color:rgb(80,0,80)"><br>        rtpengine_offer("from-tag=$ft replace-session-connection trust-address replace-origin codec-strip-g729",,$var(body),$var(newbody));<br></span>        xlog("######################### Body from RTPENGINE is ###########################\r\n$var(body)\r\n");<span class="gmail-im" style="color:rgb(80,0,80)"><br>        $json(reply) := $rtpquery;<br>        $var(port)=$json_pretty(reply/tags/$ft/medias[0]/streams[0]/local port);<br></span>        $var(addr)=$json_pretty(reply/tags/$ft/medias[0]/streams[0]/local address);<br>        append_to_reply("Contact:<sip:$rU@$socket_in(ip):$socket_in(port);transport=udp>\r\n");<span class="gmail-im" style="color:rgb(80,0,80)"><br>        append_to_reply("Content-Type: application/sdp\r\n");<br></span>        $var(body) = $(var(body){re.subst,/(IP4.).*/\1$var(addr)/g});<span class="gmail-im" style="color:rgb(80,0,80)"><br>        $var(body) = $(var(body){re.subst,/(audio.)...../\1$var(port)/g});<br></span>        xlog("######################### Body being sent in Reply is ######################\r\n$var(body)\r\n");<br>        t_reply_with_body(200, "OK", $var(body));<span class="gmail-im" style="color:rgb(80,0,80)"><br>        rtpengine_play_media("call-id=$ci from-tag=$ft file=/etc/rtpengine/unk_num.wav");<br>        async(sleep(10), after_media);<br>        }<br>}<br><br>route[after_media]<br>    { if (t_was_cancelled()) {<br>        rtpengine_delete();<br>        exit;<br>    } else {<br>        rtpengine_delete();<br>        sl_send_reply(486,"Busy here");<br>        exit;<br>    }<br>}</span></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>