[SR-Users] Drop calls with response 200 without previous 180/183 reponses

Julien Chavanton jchavanton at gmail.com
Mon Oct 5 23:47:04 CEST 2020


Indeed, the call must be disconnected properly.
I would not rewrite the code unless absolutely necessary to avoid edge
cases.
Kamailio can do some in the middle UAC tasks, in this case maybe you could
look at :
dialog module dlg_bye(side)

On Mon, Oct 5, 2020 at 6:05 AM Valter Nogueira <valter at fastway.com.br>
wrote:

> Thank you people. It seems an easy approach using htable.
>
> I was wondering that this is not compliant with RFC 3261, since a proxy
> should not change sip responses.
>
> 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
>
>
> Em sáb, 3 de out de 2020 12:45, David Villasmil <
> david.villasmil.work at gmail.com> escreveu:
>
>> 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.
>> Super simple.
>>
>>
>> On Sat, 3 Oct 2020 at 13:51, Valentin Christoph <
>> Christoph.Valentin at kontron.com> wrote:
>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I am not quite sure, but I would try to store a long-term flag with the
>>> help of the dialog module.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> [...]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
>>>
>>> exports several functions that can be used directly from the
>>> configuration route script as well as functions for the RPC interface. [...]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> [...]10.6. $dlg_var(key)
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 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().
>>>
>>>
>>>
>>> Note: You will receive "NULL", if there is no dialog for this
>>> request.[...]
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Hint: ACK is a subsequential request
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Anyway, I am wondering if your approach would be compliant to RFC 3261.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> KR
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------
>>>
>>>
>>> *Von:* sr-users <sr-users-bounces at lists.kamailio.org> im Auftrag von
>>> Valter Nogueira <valter at fastway.com.br>
>>>
>>>
>>> *Gesendet:* Freitag, 2. Oktober 2020 17:01
>>>
>>>
>>> *An:* Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
>>>
>>>
>>> *Betreff:* [SR-Users] Drop calls with response 200 without previous
>>> 180/183 reponses
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> 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?).
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Is it possible? How could I accomplish this?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Valter
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> Kamailio (SER) - Users Mailing List
>>>
>>> sr-users at lists.kamailio.org
>>>
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> --
>> Regards,
>>
>> David Villasmil
>> email: david.villasmil.work at gmail.com
>> phone: +34669448337
>> _______________________________________________
>> Kamailio (SER) - Users Mailing List
>> sr-users at lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201005/cbee37e8/attachment.htm>


More information about the sr-users mailing list