forked from fusionpbx/fusionpbx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create an additional dialplan to set call_direction outbound.
- Loading branch information
1 parent
147956f
commit a0718f3
Showing
1 changed file
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
The Initial Developer of the Original Code is | ||
Mark J Crane <[email protected]> | ||
Portions created by the Initial Developer are Copyright (C) 2008-2021 | ||
Portions created by the Initial Developer are Copyright (C) 2008-2022 | ||
the Initial Developer. All Rights Reserved. | ||
Contributor(s): | ||
|
@@ -419,7 +419,55 @@ | |
//set the uuid | ||
$dialplan_uuid = uuid(); | ||
|
||
//build the array | ||
//build the array - set call_direction | ||
$x = 0; | ||
$array['dialplans'][$x]['domain_uuid'] = $_SESSION['domain_uuid']; | ||
$array['dialplans'][$x]['dialplan_uuid'] = $dialplan_uuid; | ||
$array['dialplans'][$x]['app_uuid'] = $app_uuid; | ||
$array['dialplans'][$x]['dialplan_name'] = 'call_direction-outbound'; | ||
$array['dialplans'][$x]['dialplan_order'] = '22'; | ||
$array['dialplans'][$x]['dialplan_continue'] = 'true'; | ||
$array['dialplans'][$x]['dialplan_context'] = $dialplan_context; | ||
$array['dialplans'][$x]['dialplan_enabled'] = $dialplan_enabled; | ||
$array['dialplans'][$x]['dialplan_description'] = $dialplan_description; | ||
$y = 0; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_uuid'] = uuid(); | ||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $_SESSION['domain_uuid']; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'condition'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = '${user_exists}'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = 'false'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true'; | ||
$y++; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_uuid'] = uuid(); | ||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $_SESSION['domain_uuid']; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'condition'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = 'destination_number'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = $dialplan_expression; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true'; | ||
$y++; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_uuid'] = uuid(); | ||
$array['dialplans'][$x]['dialplan_details'][$y]['domain_uuid'] = $_SESSION['domain_uuid']; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_uuid'] = $dialplan_uuid; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = 'export'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = 'call_direction=outbound'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_inline'] = 'true'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true'; | ||
$y++; | ||
$x++; | ||
|
||
//set the uuid | ||
$dialplan_uuid = uuid(); | ||
|
||
//build the array - outbound route | ||
$array['dialplans'][$x]['domain_uuid'] = $_SESSION['domain_uuid']; | ||
$array['dialplans'][$x]['dialplan_uuid'] = $dialplan_uuid; | ||
$array['dialplans'][$x]['app_uuid'] = $app_uuid; | ||
|
@@ -498,6 +546,7 @@ | |
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_tag'] = 'action'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_type'] = 'export'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_data'] = 'call_direction=outbound'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_inline'] = 'true'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_order'] = $y * 10; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_group'] = '0'; | ||
$array['dialplans'][$x]['dialplan_details'][$y]['dialplan_detail_enabled'] = 'true'; | ||
|