1
目標:我希望在創建通話時,應該播放音樂而不是響鈴,並且沒有人可以撥打電話。在播放音樂後應該說出來。 ,它應該重定向到反饋頁面twilio play保持音樂並重定向撥打
現在過:創建呼叫,當我們選擇當撥打電話
呼叫,並反饋頁面運行的MP3播放所以我想一個解決方案來處理這個
<?php
if (($nowtime >= $start_time) && ($nowtime <= $end_time)){
$the_mnum = $con ->load_field($the_id, 'the_mnum');
//$m= $the_mnum;
//echo $the_mnum;
?> <Say voice="woman">
We are directing your call to the therapist.
</Say>
<?php
$check_therapist = true;
$_SESSION["the_mnum"] = $the_mnum;
break;
}
}
if ($check_therapist){
$version = '';
$sid = '';
$token = '';
$client = new Services_Twilio($sid, $token, $version);
$call = $client->account->calls->create("+1", $the_mnum, "wekaw1.mp3", array());
echo $call->sid;
?>
<Redirect>feedback.php</Redirect>
<?php } else {?>
<Say voice="woman">
No listener is available right now.
We will give you a call back shortly when we have available listener.
</Say>
<?php } ?>
</Response>