使用している番号をダイヤルする場合
exec("DIAL", "DAHDI/g0/" + callingPhoneNo + "," + currentTimeOut + ",mg,");
私のJavaアプリケーションで。そして、このスニペットを使用して発信者にサウンドを再生するには:
exec("background", "custom/incorrectPassword");
しかし、電話をかけた後に着信音を鳴らすにはどうすればよいですか?
これを行うには 3 つのオプションがあります。実際には必要なオプションは 1 つだけですが、歴史的には 3 つありました
1) まさにこの目的のために、Dial コマンドのダイヤルアウト パラメータのオプション A
A(x): x - The file to play to the called party Play an announcement to the called party, where <x> is the prompt to be played
2) プライバシー モードのオプション。
p: このオプションは、スクリーニング モードを有効にします。これは基本的にメモリなしのプライバシー モードです。
P([x]): Enable privacy mode. Use <x> as the family/key in the AstDB
database if it is provided. The current extension is used if a database
family/key is not specified.
callerid に基づくプライバシー再生メッセージと、見つからない場合は名前を聞く
3) 答えのマクロとゴサブ。入力/確認/拒否コールなどを収集することができます.
M(マクロ[^arg[^...]]):
macro - Name of the macro that should be executed. arg - Macro arguments Execute the specified <macro> for the *called* channel before connecting to the calling channel. Arguments can be specified to the Macro using '^' as a delimiter. The macro can set the variable ${MACRO_RESULT} to specify the following actions after the macro is finished executing: ${MACRO_RESULT}: If set, this action will be taken after the macro finished executing. ABORT: Hangup both legs of the call CONGESTION: Behave as if line congestion was encountered BUSY: Behave as if a busy signal was encountered CONTINUE: Hangup the called party and allow the calling party to continue dialplan execution at the next priority GOTO:[[<context>^]<exten>^]<priority>: Transfer the call to the specified destination. U(x[^arg[^...]]): x - Name of the subroutine to execute via Gosub arg - Arguments for the Gosub routine Execute via Gosub the routine <x> for the *called* channel before connecting to the calling channel. Arguments can be specified to the Gosub using '^' as a delimiter. The Gosub routine can set the variable ${GO SUB_RESULT} to specify the following actions after the Gosub returns. ${GOSUB_RESULT}: ABORT: Hangup both legs of the call. CONGESTION: Behave as if line congestion was encountered. BUSY: Behave as if a busy signal was encountered. CONTINUE: Hangup the called party and allow the calling party to continue dialplan execution at the next priority. GOTO:[[<context>^]<exten>^]<priority>: Transfer the call to the specified destination.
: voip-infoで述べたように、A オプションで可能です。この場合、使用することを意味します
exec("DIAL", "DAHDI/g0/" + callingPhoneNo + "," + currentTimeOut + ",mg|A(custom/greet)");
コマンド、greet
電話を取った後、呼び出し先のファイルを再生します。
また、Dial アプリケーションで特別な拡張機能 (マクロ) を使用することもできます。これは、呼び出し先が電話に出た後に実行されます。パラメータも渡すことができます。
例 2: ダイヤル マクロ http://www.voip-info.org/wiki/view/Asterisk+cmd+Dial