Commit a896af9630358ed32506739ce905d2c85e9b2128

Authored by totoro
1 parent b3734f8f

add Asterisk originate call

add no_action as alternative in WEB_Action_Name type description
Showing 2 changed files with 11 additions and 0 deletions   Show diff stats
asterisk/ami_commands.anubis
... ... @@ -22,3 +22,13 @@ public define AMI_Action ami_login(AMI_Auth ami_auth) =
22 22 if ami_auth is auth(user, password) then
23 23 ami_login(user, password, true).
24 24  
  25 +public define AMI_Action ami_originate_call(String extension, String out_number) =
  26 + action("Originate", [
  27 + key_value("Channel", "SIP/"+extension),
  28 + key_value("Exten", out_number),
  29 + key_value("Context", "default"),
  30 + key_value("Priority", "1"),
  31 + key_value("Async", "yes")
  32 + ]
  33 + )
  34 +.
... ...
ds_files/ds_types.anubis
... ... @@ -67,6 +67,7 @@ public define List(DS_Type) calexium_lib_types_description =
67 67 ]),
68 68  
69 69 ds_type("WEB_Action_Name", [
  70 + enum("no_action"),
70 71 alternative("controller_action", [
71 72 component(string, "controller"),
72 73 component(string, "ac_name")
... ...