0

LAN で Asterisk サーバーを実行しています。Javascript を使用して、AMI (Asterisk Manager Interface) を介して実行中のアプリケーションへのソケット接続を実行したいと考えています。

AMI 用の Javascript クライアントを提案して、 login 、通話の発信、その他のイベントのために Asterisk サーバーにコマンドを発行することはできますか?

コマンド リファレンス: アスタリスクを使用して Web サーバー経由で電話を鳴らす

編集 1: ご回答ありがとうございます。NodeJS-AsteriskManger を試しましたが、index.js を実行中にエラーが発生しました。

C:\wamp\www\ASTERISK\github\node-asterisk-master\node-asterisk-master\asterisk.j
s:145
 idCaller = headers.uniqueid, idCallee = self.participants[idCaller]['with'],
                                                                    ^
    C:\wamp\www\ASTERISK\github\NodeJS-AsteriskManager-master\NodeJS-AsteriskManager
    -master\index.js:16
                true); // This parameter determines whether events are emited.
                     ^
SyntaxError: Unexpected token ;
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:901:3
4

2 に答える 2

1

これらの Node.js モジュールを使用して、アスタリスク サーバーと通信できます。

https://github.com/phidelta/NodeJS-AsteriskManager
https://github.com/holidayextras/node-asterisk-ami
https://github.com/asterisk/node-ari-client (Digium/Asterisk 作)

于 2013-09-05T08:05:18.883 に答える