require_once "resources/header.php"; //send the call broadcast if (strlen($broadcast_phone_numbers) > 0) { $broadcast_phone_number_array = explode("\n", $broadcast_phone_numbers); $count = 1; $sched_seconds = '3'; foreach ($broadcast_phone_number_array as $tmp_value) { //set the variables $tmp_value = str_replace(";", "|", $tmp_value); $tmp_value_array = explode("|", $tmp_value); //remove the number formatting $phone_1 = preg_replace('{\\D}', '', $tmp_value_array[0]); //get the dialplan variables and bridge statement $dialplan = new dialplan(); $dialplan->domain_uuid = $_SESSION['domain_uuid']; $dialplan->outbound_routes($phone_1); $dialplan_variables = $dialplan->variables; $bridge_array[0] = $dialplan->bridges; //echo "var: ".$variables."\n"; //echo "bridges: ".$bridges."\n"; //prepare the string $channel_variables = $dialplan_variables . "ignore_early_media=true"; $channel_variables .= ",origination_number={$phone_1}"; $channel_variables .= ",origination_caller_id_name='{$broadcast_caller_id_name}'"; $channel_variables .= ",origination_caller_id_number={$broadcast_caller_id_number}"; $channel_variables .= ",domain_uuid=" . $_SESSION['domain_uuid']; $channel_variables .= ",domain=" . $_SESSION['domain_name']; $channel_variables .= ",domain_name=" . $_SESSION['domain_name']; $channel_variables .= ",accountcode='{$broadcast_accountcode}'"; if ($broadcast_avmd == "true") { $channel_variables .= ",execute_on_answer='avmd start'";