[SR-Users] Killing Calls for a Profile

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 13 11:49:28 CEST 2017


Hello,


On 13.09.17 08:42, Sunil More wrote:
> Hello All,
>
> Is there a method / command to kill calls related to one dialog
> profile. Right now i have to find all dialogs for a customer and loop
> through all the dialog hashes to run kamcmd dlg.end_dlg till i can
> kill all calls. Is there a easier way to do this.
>
if you don't want to go down the path of adding a RPC command for it
(which requires C coding), then you can try some workaround leveraging
the function that sets the timeout by profile:

  -
https://www.kamailio.org/docs/modules/stable/modules/dialog.html#dialog.f.dlg_set_timeout_by_profile

This is a function to be executed in config, you can trigger it by
sending a special sip packet with sipsak or sipp. The alternative is to
send an http request that will be handled via xhttp module, which then
executes an event route block from config and you call the function there.

Because the function is not terminating the calls immediately, the
workaround is to use a very short time out, like few seconds.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170913/7aa74c92/attachment.html>


More information about the sr-users mailing list