Commit 3032f6415ff5cb70067f4d94c75eb289d122d940

Authored by David RENÉ
1 parent 4152ce3a

add caller_id in ami_originate_call to let show the called name.

Showing 1 changed file with 15 additions and 2 deletions   Show diff stats
asterisk/ami_commands.anubis
@@ -38,16 +38,29 @@ public define AMI_Action ami_originate_call(String extension, String out_number) @@ -38,16 +38,29 @@ public define AMI_Action ami_originate_call(String extension, String out_number)
38 ) 38 )
39 . 39 .
40 40
  41 +public define AMI_Action ami_originate_call(String extension, String out_number, String caller_id ) =
  42 + action("Originate", [
  43 + key_value("Channel", "SIP/"+extension),
  44 + key_value("CallerID", caller_id),
  45 + key_value("Exten", out_number),
  46 + key_value("Context", "default"),
  47 + key_value("Priority", "1"),
  48 + key_value("Async", "true")
  49 + ]
  50 + )
  51 +.
  52 +
41 public define AMI_Action 53 public define AMI_Action
42 ami_originate_call 54 ami_originate_call
43 ( 55 (
44 String extension, 56 String extension,
45 - String out_number, 57 + String out_number,
  58 + String caller_id,
46 String context 59 String context
47 )= 60 )=
48 action("Originate", [ 61 action("Originate", [
49 key_value("Channel", "SIP/"+extension), 62 key_value("Channel", "SIP/"+extension),
50 - key_value("CallerID", out_number), 63 + key_value("CallerID", caller_id),
51 key_value("Exten", out_number), 64 key_value("Exten", out_number),
52 key_value("Context", context), 65 key_value("Context", context),
53 key_value("Priority", "1"), 66 key_value("Priority", "1"),