[Kamailio-Users] Profile takes some time to be cleared

mayamatakeshi mayamatakeshi at gmail.com
Wed Apr 15 05:43:38 CEST 2009


On Thu, Feb 26, 2009 at 3:22 AM, Daniel-Constantin Mierla
<miconda at gmail.com> wrote:
>
>
> On 02/25/2009 06:16 PM, mayamatakeshi wrote:
>>
>> On Thu, Feb 26, 2009 at 12:34 AM, mayamatakeshi <mayamatakeshi at gmail.com>
>> wrote:
>>
>>>
>>> On Wed, Feb 25, 2009 at 7:29 PM, mayamatakeshi <mayamatakeshi at gmail.com>
>>> wrote:
>>>
>>>>
>>>> Hello,
>>>> I'm using the set_dlg_profile function from the dialog module (kamailio
>>>> 1.4).
>>>> I use it to control limit of simultaneous calls to clients.
>>>> I'm noticing that after this function is called, even if the call
>>>> terminates immediately, it takes some 3 to 4 seconds for the profile
>>>> to be cleared. Is there any reason for this?
>>>> I can see even if I call unset_dlg_profile on failure_route, the
>>>> profile will take that time span to be cleared.
>>>>
>>>
>>> Sorry, I was retesting this. it seems unset_dlg_profile do has >immediate
>>> effect.
>>>
>>
>> Oh yes, unset_dlg_profile will immediately remove the dialog from the
>> profile, but this cannot be called from request_route, so if a call is
>> immediately answered and disconnected,

Hello Daniel,
sorry for the late reply (I was not aware of you response till some
days ago. I might have mistakenly deleted your message without reading
it).

> is the call answered? or the call is cancelled?

The call is answered immediately upon reception of the INVITE and
immediately terminated with BYE.

> The profile should be removed as soon as the dialog terminates.

This is not happening if you expect the profile to be cleared by
itself upon reception of BYE (it will only happen for calls longer
than 3 or 4 seconds from INVITE to BYE).

> I do not see
> a reason why not enabling the unset_dlg_profile for request_route. Edit
> modules/dialog/dialog.c and set REQUEST_ROUTE for unset_dlg_profile in:
>
> static cmd_export_t cmds[]
>
> Then in: modules/dialog/dlg_profile.c, in function unset_dlg_profile replace
> line:
> if (dlg==NULL || route_type==REQUEST_ROUTE) {
>
> with:
> if (dlg==NULL) {
>
> Recompile, reinstall, do some tests and report it here. If all ok, we can
> enable it.

I tried that with the 1.4 branch and it works.
Thanks for your assistance.

regards,
takeshi

>
>>  we will get to this situation
>> of  having the dialog still in the profile for some seconds. Well,
>> this would be very unlikely so, being able to resolve the case of
>> immediate disconnection will be just fine.
>>
>
> --
> Daniel-Constantin Mierla
> http://www.asipto.com
>
>




More information about the sr-users mailing list