<div dir="ltr">I would like to clarify the issue in case its not 100% clear.<div>* Caller sends INVITE with No SDP(Late Media Invite) </div><div>* Another device in path (B2BUA) receives INVITE and sends dummy SDP to Opensips with just G.711 codec in the Offer  </div><div>* Opensips Creates Dialog and sends 200OK with SDP using t_reply_with_body based on previously provided information.</div><div>* B2BUA receives 200OK with SDP then sends ACK followed by a Re-INVITE with No SDP back to OpenSips.</div><div>* Opensips appears to accept the ACK as it doesn't retransmit the 200OK right away as before updated changes.</div><div>* Opensips sends 100 trying with new CSEQ from Re-INVITE with no SDP</div><div>* 200OK Loop created</div><div>    * Opensips send 200 OK with old CSEQ </div><div>    * B2BUA sends ACK with old CSEQ</div><div>* Call times out.</div><div><br></div><div>No audio sent</div><div><br></div><div>Thank you</div><div><br></div><div>Kevin.</div><div>* </div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 6, 2023 at 12:54 PM Kevin Kennedy <<a href="mailto:kennedy4260@gmail.com">kennedy4260@gmail.com</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">I tried updating from Opensips 3.2 to Opensips 3.4.2 as I saw that there was some re-invite fixes.  Still doesn't seem to resolve this issue.  What am I missing to handle this correctly?<div><br></div><div>Thank you.</div><div><br></div><div>Kevin</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 3, 2023 at 12:51 PM Kevin Kennedy <<a href="mailto:kennedy4260@gmail.com" target="_blank">kennedy4260@gmail.com</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">Dmitry,<div>Thank you for your response, it does appear to work this way and is absorbing the ACK now, but when a Re-INVITE happens, it responds correctly with the updated Cseq in the 100 Trying, but the 200 OK (using the t_reply_with_body), still has the same Cseq as the initial INVITE.  How can I make adjustments for this?<div><br></div><div>Thank you.</div><div><br></div><div>Kevin</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Nov 3, 2023 at 5:10 AM Dmitry Ponomaryov <<a href="mailto:iamhalje@gmail.com" target="_blank">iamhalje@gmail.com</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">It turns out that this is no early_media, there were simply successful <br>
attempts with 183 Session Progress, which is why there was such a <br>
misunderstanding, I’ll attach the snippet code again in plain text: <br>
route { if (is_method("INVITE")) { create_dialog(); route(media); exit; <br>
} } route[media] { if (has_body("application/sdp")) { rtpengine_offer(); <br>
} $json(reply) := $rtpquery; <br>
$var(port)=$json_pretty(reply/tags/$ft/medias[0]/streams[0]/local port); <br>
remove_body_part(); append_to_reply("Contact: <br>
<sip:$rU@$socket_in(ip):$socket_in(port);transport=udp;did=$DLG_did>\r\n"); <br>
append_to_reply("Content-Type: application/sdp\r\n"); $var(body) = <br>
$(rb{re.subst,/(IP4.).*/\1$socket_in(ip)/g}); $var(body) = <br>
$(var(body){re.subst,/(audio.)...../\1$var(port)/g}); <br>
t_reply_with_body(200, "OK", $var(body)); <br>
rtpengine_play_media("call-id=$ci from-tag=$ft <br>
file=/etc/rtpengine/media.wav"); async(sleep(10), after_media); } <br>
route[after_media] { if (t_was_cancelled()) { rtpengine_delete(); exit; <br>
} else { rtpengine_delete(); sl_send_reply(486,"Busy here"); exit; } }<br>
<br>
and pined previous posts below :)<br>
<br>
> ----------------------------------------------------------------------<br>
> Message: 2<br>
> Date: Fri, 3 Nov 2023 16:00:22 +0500<br>
> From: Dmitry Ponomaryov<<a href="mailto:iamhalje@gmail.com" target="_blank">iamhalje@gmail.com</a>><br>
> <a href="mailto:To%3Ausers@lists.opensips.org" target="_blank">To:users@lists.opensips.org</a><br>
> Subject: Re: [OpenSIPS-Users] Opensips and rtpengine_play_media not<br>
>       absorbing ACK<br>
> Message-ID:<<a href="mailto:3971cbc2-7281-2299-4212-7f241e8b8b5a@gmail.com" target="_blank">3971cbc2-7281-2299-4212-7f241e8b8b5a@gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
><br>
> Hello everyone, I would like to show my part of the code when playing<br>
> early media after 200OK, when creating dialogs, I substituted $DLG_did<br>
> in the contact of my dialog, and received the same $DLG_did for my<br>
> dialog in ACK, but OpenSIPS also continued to send 200OK , despite<br>
> having already received an ACK response.<br>
><br>
> route {<br>
><br>
> # initial invite<br>
><br>
> if (is_method("INVITE")) {<br>
><br>
> create_dialog();<br>
><br>
> route(early_media);<br>
><br>
> exit;<br>
><br>
> }<br>
><br>
> } route[early_media] { if (has_body("application/sdp")) {<br>
> rtpengine_manage(); } $json(reply) := $rtpquery;<br>
> $var(port)=$json_pretty(reply/tags/$ft/medias[0]/streams[0]/local port);<br>
> remove_body_part();<br>
><br>
> append_to_reply("Contact:<br>
> <sip:$rU@$socket_in(ip):$socket_in(port);transport=udp;did=$DLG_did>\r\n");<br>
><br>
> append_to_reply("Content-Type: application/sdp\r\n"); $var(body) =<br>
> $(rb{re.subst,/(IP4.).*/\1$socket_in(ip)/g}); $var(body) =<br>
> $(var(body){re.subst,/(audio.)...../\1$var(port)/g});<br>
> t_reply_with_body(200, "OK", $var(body));<br>
> rtpengine_play_media("call-id=$ci from-tag=$ft<br>
> file=/etc/rtpengine/media.wav"); async(sleep(10), after_early_media); }<br>
> route[after_early_media] { if (t_was_cancelled()) { rtpengine_delete();<br>
> exit; } else { rtpengine_delete(); sl_send_reply(486,"Busy here"); exit;<br>
> } }<br>
><br>
> I don’t know if Kevin example was with creating a dialog, but I also<br>
> noticed this problem through transaction... thanks<br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL:<<a href="http://lists.opensips.org/pipermail/users/attachments/20231103/059cb479/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.opensips.org/pipermail/users/attachments/20231103/059cb479/attachment-0001.html</a>><br>
> ----------------------------------------------------------------------<br>
><br>
> Message: 1<br>
> Date: Thu, 2 Nov 2023 16:32:02 -0700<br>
> From: Kevin Kennedy<<a href="mailto:kennedy4260@gmail.com" target="_blank">kennedy4260@gmail.com</a>><br>
> To: OpenSIPS users mailling list<<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
> Subject: [OpenSIPS-Users] Opensips and rtpengine_play_media not<br>
>       absorbing ACK<br>
> Message-ID:<br>
>       <<a href="mailto:CABDXsRxLTp2_uEX_UPX1adg16af6gaetzJujUTPki8c7H3KKLQ@mail.gmail.com" target="_blank">CABDXsRxLTp2_uEX_UPX1adg16af6gaetzJujUTPki8c7H3KKLQ@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> I am trying to build a solution where Opensips 3.2+ with RTPengine acts as<br>
> a UAC, answers a call with 200OK, plays media from file, and will terminate<br>
> the call right after playing announcement.<br>
><br>
> Opensips is responding with 200OK with SDP body and making the<br>
> correct changes for the IP, but when the ACK comes back from the UAS,<br>
> Opensips doesn't seem to absorb it and retransmits the 200OK.<br>
><br>
> Code snippet handling this scenario<br>
><br>
>          rtpengine_manage("from-tag=$ft replace-session-connection<br>
> trust-address replace-origin codec-strip-g729",,$var(body));<br>
>          append_to_reply("Contact:<sip:$socket_out>\r\n");<br>
>          append_to_reply("Content-Type: application/sdp\r\n");<br>
>          t_reply_with_body(200, "OK", $var(body));<br>
>          rtpengine_play_media("from-tag=$ft<br>
> file=/etc/rtpengine/unk_num.wav");<br>
>          sleep(10);<br>
>          rtpengine_delete("from-tag=$ft");<br>
>          #t_reply(603, "Decline");<br>
>          exit();<br>
><br>
><br>
> What do I need to add to handle this scenario correctly?<br>
><br>
> Note:  I was able to get this to work with Early Media (183<br>
> reply_with_body, and send t_reply(603, "Decline")), but we have customers<br>
> using late media invite as well, so the Early Media option wouldn't work in<br>
> that case.<br>
><br>
> Thank you.<br>
><br>
> Kevin Kennedy<br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL:<<a href="http://lists.opensips.org/pipermail/users/attachments/20231102/dd52d307/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.opensips.org/pipermail/users/attachments/20231102/dd52d307/attachment-0001.html</a>><br>
><br>
> ------------------------------<br>
><br>
<br>
_______________________________________________<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>
</blockquote></div>
</blockquote></div>