From 3853bd85dc5a6f830c0df3eadf823ebb2f228ef6 Mon Sep 17 00:00:00 2001 From: markjcrane Date: Tue, 12 Jan 2016 23:16:45 -0700 Subject: [PATCH] Complete adding application hangup. --- resources/classes/destinations.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/classes/destinations.php b/resources/classes/destinations.php index d95d3d7c1a..cff34ae040 100644 --- a/resources/classes/destinations.php +++ b/resources/classes/destinations.php @@ -99,6 +99,7 @@ class destinations { $y++; $this->destinations[$x]['result']['data'][$y]['label'] = 'hangup'; $this->destinations[$x]['result']['data'][$y]['name'] = 'hangup'; + $this->destinations[$x]['result']['data'][$y]['application'] = 'hangup'; $this->destinations[$x]['result']['data'][$y]['destination'] = ''; $y++; $this->destinations[$x]['result']['data'][$y]['label'] = 'record'; @@ -215,7 +216,7 @@ class destinations { } else { $label = $data['label']; - $select_label = str_replace("\${".$key."}", $text2['option-'.$label]."215", $select_label); + $select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label); } } } @@ -231,8 +232,13 @@ class destinations { $select_label = str_replace("\${".$key."}", $text2['option-'.$label], $select_label); } } + //application: hangup + if (strlen($data['application']) > 0) { + $select_value = str_replace("transfer", $data['application'], $select_value); + } } } + $select_value = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_value); $select_value = str_replace("\${context}", $_SESSION['context'], $select_value); //to do: context can come from the array $select_label = str_replace("\${domain_name}", $_SESSION['domain_name'], $select_label);