From 0e7e802c1f65df593800a93a34aae9ed609a3d2d Mon Sep 17 00:00:00 2001 From: konradSC Date: Thu, 6 Dec 2018 11:24:33 -0500 Subject: [PATCH] Update dialplan.php (#3934) Adds the ability to set "dialplan_destination" db field from Upgrade App Defaults and xml dialplan templates. --- app/dialplans/resources/classes/dialplan.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/dialplans/resources/classes/dialplan.php b/app/dialplans/resources/classes/dialplan.php index 09342e2ca7..5c021ebc4d 100644 --- a/app/dialplans/resources/classes/dialplan.php +++ b/app/dialplans/resources/classes/dialplan.php @@ -93,7 +93,8 @@ include "root.php"; $sql .= "dialplan_order, "; $sql .= "dialplan_context, "; $sql .= "dialplan_enabled, "; - $sql .= "dialplan_description "; + $sql .= "dialplan_description, "; + $sql .= "dialplan_destination "; $sql .= ")"; $sql .= "values "; $sql .= "("; @@ -111,7 +112,8 @@ include "root.php"; $sql .= "'".check_str($this->dialplan_order)."', "; $sql .= "'".check_str($this->dialplan_context)."', "; $sql .= "'".check_str($this->dialplan_enabled)."', "; - $sql .= "'".check_str($this->dialplan_description)."' "; + $sql .= "'".check_str($this->dialplan_description)."', "; + $sql .= "'".check_str($this->dialplan_destination)."' "; $sql .= ")"; $this->db->exec(check_sql($sql)); unset($sql); @@ -347,6 +349,9 @@ include "root.php"; else { $this->dialplan_enabled = "true"; } + if (strlen($dialplan['extension']['@attributes']['destination']) > 0) { + $this->dialplan_destination = $dialplan['extension']['@attributes']['destination']; + } $this->dialplan_description = ''; $this->dialplan_add(); //loop through the condition array