From a1e5bb36f96c16413ad8b5603bed554baf0849ab Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 9 May 2013 19:56:16 +0000 Subject: [PATCH] When adding the inbound route add the dialplan_uuid to the matching destination_uuid --- app/dialplan_inbound/dialplan_inbound_add.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/dialplan_inbound/dialplan_inbound_add.php b/app/dialplan_inbound/dialplan_inbound_add.php index 5892602817..2113711a73 100644 --- a/app/dialplan_inbound/dialplan_inbound_add.php +++ b/app/dialplan_inbound/dialplan_inbound_add.php @@ -558,6 +558,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); } + //update the destination dialplan_uuid + if (strlen($destination_uuid) > 0) { + $sql = "update v_destinations set "; + $sql .= "dialplan_uuid = '".$dialplan_uuid."' "; + $sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' "; + $sql .= "and destination_uuid = '".$destination_uuid."' "; + $db->exec(check_sql($sql)); + unset($sql); + } + //commit the atomic transaction $count = $db->exec("COMMIT;"); //returns affected rows