diff --git a/app/dialplan_outbound/dialplan_outbound_add.php b/app/dialplan_outbound/dialplan_outbound_add.php index 7ee05958d5..b33f058583 100644 --- a/app/dialplan_outbound/dialplan_outbound_add.php +++ b/app/dialplan_outbound/dialplan_outbound_add.php @@ -684,6 +684,11 @@ } //end foreach } + //add the dialplan permission + $p = new permissions; + $p->add("dialplan_add", "temp"); + $p->add("dialplan_detail_add", "temp"); + //save to the data $database = new database; $database->app_name = 'outbound_routes'; @@ -699,6 +704,10 @@ $dialplans->uuid = $dialplan_uuid; $dialplans->xml(); + //remove the temporary permission + $p->delete("dialplan_add", "temp"); + $p->delete("dialplan_detail_add", "temp"); + //clear the cache $cache = new cache; $cache->delete("dialplan:".$dialplan_context); @@ -806,50 +815,49 @@ function type_onchange(dialplan_detail_type) { echo "\n"; echo "