asterisk / asterisk-external-media

Apache License 2.0
56 stars 27 forks source link

Unhandled Promise Rejection Warning #6

Closed thanhuchiha closed 3 years ago

thanhuchiha commented 3 years ago

I tried to run it but got an error like this ( run code with comand : node bin/ari-transcriber --format=slin16 'Local/1170' ): Creating ARI Controller to Asterisk instance http://127.0.0.1:8080 Starting audio listener on 127.0.0.1:9999 Starting speech provider Creating Bridge and Channels server listening 127.0.0.1:9999 (node:2659) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:8080 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) (node:2659) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

Please help me !

gtjoseph commented 3 years ago

The actual issue is (node:2659) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:8080. By default, Asterisk listens on port 8088 not port 8080.

thanhuchiha commented 3 years ago

i tried again: Creating ARI Controller to Asterisk instance http://127.0.0.1:8088 Starting audio listener on 127.0.0.1:9999 Starting speech provider Creating Bridge and Channels server listening 127.0.0.1:9999 (node:1508) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:8088 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) (node:1508) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

Help me :(((( Where did I go wrong?

gtjoseph commented 3 years ago

Do you have Asterisk configured to listen on port 8088? I'd suggest following the instructions in the link below to get Asterisk configured for ARI... https://wiki.asterisk.org/wiki/display/AST/Asterisk+Configuration+for+ARI