レコード アプリケーションは、ハングアップしてもレコードを正常に処理します。
ただし、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'.