Jelajahi Sumber

cmd_dialog: added match subcommand

- filter the listed dialogs
Daniel-Constantin Mierla 5 tahun lalu
induk
melakukan
4e4b3c03d7
1 mengubah file dengan 20 tambahan dan 0 penghapusan
  1. 20 0
      kamcli/commands/cmd_dialog.py

+ 20 - 0
kamcli/commands/cmd_dialog.py

@@ -49,6 +49,26 @@ def dialog_list(ctx):
     command_ctl(ctx, 'dlg.list', [ ])
 
 
+##
+#
+#
[email protected]('match', short_help='Show the details for the matching dialogs')
[email protected]('mkey', metavar='<mkey>')
[email protected]('mop', metavar='<mkey>')
[email protected]('mval', metavar='<mval>')
+@pass_context
+def dialog_match(ctx, mkey, mop, mval):
+    """Show the details for the matching dialogs
+
+    \b
+    Parameters:
+        <mkey> - matching key: ruri - use R-URI; furi - use From-URI; turi - use To-URI; callid - use Call-Id
+        <mop> - matching operator: eq - string comparison; re - regular expression; sw - starts-with
+        <mval> - matching value
+    """
+    command_ctl(ctx, 'dlg.list_match', [ mkey, mop, tval ])
+
+
 ##
 #
 #