Ver Fonte

cmd_dialplan: translate rpc command implementation

Daniel-Constantin Mierla há 7 anos atrás
pai
commit
e7416af091
1 ficheiros alterados com 19 adições e 0 exclusões
  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 ])
+
+