0

録音したサウンド ファイルを保存したい音声アプリケーションが 1 つあります。私のコードは次のとおりです。

$record_file= $dir_path . "recordfile_".$file_count;
$this->obj_agi->exec("Record","$record_file.wav,5,$maxsecs");

録音中に電話を切るたびに、録音アプリケーションが実行できず、電話を切ってしまいます。

電話を切っている間にこのレコード機能を管理する方法を知っている人はいますか?

4

1 に答える 1

1

レコード アプリケーションは、ハングアップしてもレコードを正常に処理します。

ただし、AGI 内でハングアップをトラップする最善の方法は、Asterisk から AGI プロセスに送信されるシグナルをトラップすることです。SIGHUP をトラップすることで、やりたいことが何でもできます (請求、ファイルのタッチ、DB への挿入など)。

デフォルトでは、SIGHUP が送信されます。

詳細情報を取得するには、core show application AGI (CLI から) からの出力を次に示します。

     A locally executed AGI script will receive SIGHUP
     on hangup from the channel except when using DeadAGI. A fast AGI server will
     correspondingly receive a HANGUP inline with the command dialog. Both of theses
     signals may be disabled by setting the ${AGISIGHUP} channel variable to 'no'
     before executing the AGI application. Alternatively, if you would like the
     AGI application to exit immediately after a channel hangup is detected, set
     the ${AGIEXITONHANGUP} variable to 'yes'.
于 2012-11-23T04:53:13.920 に答える