<div dir="ltr"><div>Indeed, the call must be disconnected properly. <br></div>I would not rewrite the code unless absolutely necessary to avoid edge cases.<br><div>Kamailio can do some in the middle UAC tasks, in this case maybe you could look at :  <br>dialog module dlg_bye(side)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 5, 2020 at 6:05 AM Valter Nogueira <<a href="mailto:valter@fastway.com.br">valter@fastway.com.br</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"><div dir="auto">Thank you people. It seems an easy approach using htable.<div dir="auto"><br></div><div dir="auto">I was wondering that this is not compliant with RFC 3261, since a proxy should not change sip responses.<br></div><div><br></div><div>In fact not only I should change the sip response but I should send a BYE on behalf of the UAC. It seems like a B2BUA</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em sáb, 3 de out de 2020 12:45, David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> escreveu:<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="auto">Kamailio is so cool, you could even do it without the dialog module. You could simply use a hash table (htable module) and when/if a 183/180 is received store the callid in the table (with an expiration). Anytime a 200 is received check the table (it’s in memory, so really fast), if not found, reject.</div><div dir="auto">Super simple.</div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 3 Oct 2020 at 13:51, Valentin Christoph <<a href="mailto:Christoph.Valentin@kontron.com" rel="noreferrer" target="_blank">Christoph.Valentin@kontron.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"><br><br><br><br><br><br><br><br><br><br><div dir="ltr"><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br>I am not quite sure, but I would try to store a long-term flag with the help of the dialog module.</div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br><br><br><br></div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br>[...]The dialog module provides dialog awareness for the Kamailio proxy. It's functionality is to keep track of the current dialogs, to offer information about them (e.g. how many dialogs are active), and to manage various characteristics of dialogs. The module<br><br> exports several functions that can be used directly from the configuration route script as well as functions for the RPC interface. [...]</div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br><br><br><br></div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif"><br><br><h3 style="font-family:Calibri,Arial,Helvetica,sans-serif">[...]10.6. <code style="font-family:monospace">$dlg_var(key)</code></h3><br><br></div><br><br></div><br><br></div><br><br><p style="font-family:Calibri,Arial,Helvetica,sans-serif">This is a read/write variable that can be used to store custom values assigned with a dialog (e.g. the URI of a billing-server, an assigned emergency-server). This pseudo-variable will be available only for subsequential requests after doing loose_route().<br><br></p><br><br><p style="font-family:Calibri,Arial,Helvetica,sans-serif">Note: You will receive "NULL", if there is no dialog for this request.[...]</p><br><br><br><br><br></div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br>Hint: ACK is a subsequential request<br><br><br></div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br><br><br><br></div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br>Anyway, I am wondering if your approach would be compliant to RFC 3261.<br><br><br></div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br><br><br><br></div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br>KR<br><br><br></div><br><br><div><br><br><div id="gmail-m_-7004244214853213278gmail-m_242337684697229442m_-8712906361513475537m_-2525176864905095085appendonsend"></div><br><br><div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)"><br><br><br><br><br></div><br><br><hr style="display:inline-block;width:98%"><br><br><div id="gmail-m_-7004244214853213278gmail-m_242337684697229442m_-8712906361513475537m_-2525176864905095085divRplyFwdMsg" dir="ltr"><font style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(0,0,0)" face="Calibri, sans-serif"><b style="font-family:Calibri,sans-serif">Von:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" style="font-family:Calibri,sans-serif" rel="noreferrer" target="_blank">sr-users-bounces@lists.kamailio.org</a>> im Auftrag von Valter Nogueira <<a href="mailto:valter@fastway.com.br" style="font-family:Calibri,sans-serif" rel="noreferrer" target="_blank">valter@fastway.com.br</a>><br><br><br><b style="font-family:Calibri,sans-serif">Gesendet:</b> Freitag, 2. Oktober 2020 17:01<br><br><br><b style="font-family:Calibri,sans-serif">An:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" style="font-family:Calibri,sans-serif" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a>><br><br><br><b style="font-family:Calibri,sans-serif">Betreff:</b> [SR-Users] Drop calls with response 200 without previous 180/183 reponses</font><br><br><div> </div><br><br></div></div></div><div dir="ltr"><div><br><br><div><br><br><div dir="ltr"><br><br><div dir="ltr"><br><br><div dir="ltr"><br><br><div dir="ltr"><br><br><div>I would like to use Kamailio to drop every call that is answered with no previous 180 / 183 responses or with 180 / 183 responses with no media attached (no SDP?).</div><br><br><div><br><br><br></div><br><br><div>Is it possible? How could I accomplish this?</div><br><br><div><br><br><br></div><br><br><div>Thanks,</div><br><br><div><br><br><br></div><br><br><div>Valter</div><br><br><div><br><br><br></div><br><br><div><br><br><br></div><br><br></div><br><br></div><br><br></div><br><br></div><br><br></div><br><br></div><br><br></div><br><br><br><br>_______________________________________________<br><br>Kamailio (SER) - Users Mailing List<br><br><a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br><br><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br><br></blockquote></div></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" rel="noreferrer" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" rel="noreferrer" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>