Browse Source

cmd_dialog: added terminate command

- end dialog by call-id, from-tag and to-tag
Daniel-Constantin Mierla 6 years ago
parent
commit
3f918262c7
1 changed files with 19 additions and 0 deletions
  1. 19 0
      kamcli/commands/cmd_dialog.py

+ 19 - 0
kamcli/commands/cmd_dialog.py

@@ -49,3 +49,22 @@ def dialog_list(ctx):
     command_ctl(ctx, 'dialog.list', [ ])
 
 
+##
+#
+#
[email protected]('terminate', short_help='Send BYE to the dialog identified by call-id, from-tag and to-tag')
[email protected]('callid', metavar='<domain>')
[email protected]('fromtag', metavar='<fromtag>')
[email protected]('totag', metavar='<totag>')
+@pass_context
+def dialog_list(ctx, callid, fromtag, totag):
+    """Send BYE to the dialog identified by callid, from-tag and to-tag
+
+    \b
+    Parameters:
+        <callid> - Call-Id value
+        <fromtag> - From-Tag value
+        <to-tag> - To-Tag value
+    """
+    command_ctl(ctx, 'dialog.terminate_dlg', [ callid, fromtag, totag ])
+