Asterisk Manager Interface (AMI) を介して新しい会議室 (Asterisk ConfBridge) を作成できますか? お願い助けて!
3 に答える
この回答は、最初の回答とそれに対するコメントで十分かもしれませんが、私と同じようにこれを行うのに苦労した人のためのものです.
したがって、アクション Originate とアプリケーション ConfBridge を使用して、電話会議を開始できます (私の知る限り、独立ではなくアスタリスクが付属しています)。
ここで利用可能なすべてのフィールドを見ることができますhttp://www.voip-info.org/wiki/view/Asterisk+Manager+API+Action+Originate
すべてのフィールドのない例をスローしますが、アプリで知っていて必要なフィールドのみを使用します。
これは、会議に誰かを呼び出したい場合に、アスタリスク マネージャー インターフェースで投げるものです (c のコメントなしで)。
Action: Originate // The action type
ActionID: CreateConf-1 // This id will be linked to further events about the action
Channel: SIP/1001 // The sipId of the peer u wanna call
Timeout: 30000 // If he doesnt respons in 30000ms, drop it
CallerID: Asterisk // The id of the caller (will be seen on target phone)
Application: ConfBridge // The application
Async: true // (NOT SURE, MAYBE BULLSHIT) If false, i think you can no longer originate while he hasn't answered
Data: 1234 // Very important, this is like the conference id, will detail above
Action: Originate
ActionID: CreateConf
Channel: SIP/1000
Timeout: 30000
CallerID: Asterisk
Application: ConfBridge
Async: true
Data: 1234
これで、一度に 1 つのブロックで、2 人の男が会議に呼び出されます。ご覧のとおり、このData
フィールドは通話の識別子を表しているため、会議に ID を付けたい場合はそれを使用してください。このようにして、さまざまな会議を作成および管理できます。
私は NAMI (Asterisk Manager Interface の nodejs ライブラリ) ( https://github.com/marcelog/Nami ) を使用しているので、lib のおかげで行う方法も紹介します。
var namiLib = require('nami');
var namiInstance = new (namiLib.Nami)(config); // See more about config (and everything else about nami) in their docs
namiInstance.open();
var action = new namiLib.Actions.Originate();
action.channel = 'SIP/1000';
action.data = '12345'; // my conferenceId
action.timeout = 30000;
action.callerID = 'Metisse\'s king';
action.application = 'ConfBridge';
action.async = true;
namiInstance.send(action, function (response) {
// deal with the response
});
明らかに、NAMI を使用して他のアスタリスクを制御する必要がある場合は、アクションの送信と検証を処理し、エラーを監視するために、より一般的なことを行う必要があります。
動的な会議 (部屋が存在しない) 機能を使用し、アプリケーション Confbridge への発信コマンドを使用して通話を作成できます。
いいえ。ただし、AMI リダイレクトを使用して、チャネル変数、データベース検索、または新しい会議を設定するためのその他のメカニズムを読み取るダイヤルプラン コードに通話を転送することはできます。
ConfBridge の AMI アクションの完全なリストについては、 https ://wiki.asterisk.org/wiki/display/AST/ConfBridge+10#ConfBridge10-ConfBridgeAsteriskManagerInterface(AMI)Actions を参照してください 。