On 02/25/2009 06:16 PM, mayamatakeshi wrote:
On Thu, Feb 26, 2009 at 12:34 AM, mayamatakeshi mayamatakeshi@gmail.com wrote:
On Wed, Feb 25, 2009 at 7:29 PM, mayamatakeshi mayamatakeshi@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,
is the call answered? or the call is cancelled?
The profile should be removed as soon as the dialog terminates. 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.
Cheers, Daniel
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.