From 1b1d8abdd03fcad4a0a56baa30847361d1e817ae Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 29 May 2017 19:32:34 -0600 Subject: [PATCH] Update dialplan.php --- app/dialplan/resources/classes/dialplan.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/dialplan/resources/classes/dialplan.php b/app/dialplan/resources/classes/dialplan.php index 7006e9ba3a..a7ed1222db 100644 --- a/app/dialplan/resources/classes/dialplan.php +++ b/app/dialplan/resources/classes/dialplan.php @@ -319,7 +319,11 @@ include "root.php"; foreach ($_SESSION['domains'] as $domain) { //get the domain_uuid $this->domain_uuid = $domain['domain_uuid']; - + //set the dialplan_context + $this->dialplan_context = $dialplan['@attributes']['name']; + if ($this->dialplan_context == "{v_context}") { + $this->dialplan_context = $domain['domain_name']; + } //check if the dialplan exists if (!$this->app_uuid_exists()) { //start the transaction @@ -328,12 +332,10 @@ include "root.php"; $this->dialplan_uuid = uuid(); $this->dialplan_name = $dialplan['extension']['@attributes']['name']; $this->dialplan_number = $dialplan['extension']['@attributes']['number']; - $this->dialplan_context = $domain['domain_name']; $this->dialplan_global = false; if (strlen($dialplan['extension']['@attributes']['global']) > 0) { if ($dialplan['extension']['@attributes']['global'] == "true") { $this->dialplan_global = true; - $this->dialplan_context = '${domain_name}'; } } if ($this->display_type == "text") {