瀏覽代碼

cmd_dialplan: translate rpc command implementation

Daniel-Constantin Mierla 7 年之前
父節點
當前提交
e7416af091
共有 1 個文件被更改,包括 19 次插入0 次删除
  1. 19 0
      kamcli/commands/cmd_dialplan.py

+ 19 - 0
kamcli/commands/cmd_dialplan.py

@@ -139,3 +139,22 @@ def dialplan_reload(ctx):
     """
     command_ctl(ctx, 'dialplan.reload', [ ])
 
+
+##
+#
+#
[email protected]('translate', short_help='Translate using the rules from dialplan applied to input value')
[email protected]('dpid', metavar='<dpid>', type=int)
[email protected]('ivalue', metavar='<ivalue>')
+@pass_context
+def dispatcher_list(ctx, dpid, ivalue):
+    """Translate using the rules from dialplan applied to input value
+
+    \b
+    Parameters:
+        <dpid> - dialplan id
+        <ivalue> - input value
+    """
+    command_ctl(ctx, 'dialplan.translate', [ dpid, ivalue ])
+
+