Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing Issue With project Setup #38

Open
RashmiTechCraft opened this issue May 28, 2024 · 8 comments
Open

Facing Issue With project Setup #38

RashmiTechCraft opened this issue May 28, 2024 · 8 comments

Comments

@RashmiTechCraft
Copy link

I am Trying to setup the project and seems like i am not getting any logs
{"level":30,"time":1716892244292,"pid":1,"hostname":"bbe63e60c3ec","name":"Dialogflow-AudioServer","msg":"Connected to MQTT","v":1} 2024-05-28T10:30:45.223190860Z {"level":30,"time":1716892245222,"pid":1,"hostname":"bbe63e60c3ec","name":"Dialogflow-AudioServer","msg":"Subscribed to both newStream & streamEnded topic","v":1} 2024-05-28T10:30:45.223906037Z {"level":30,"time":1716892245223,"pid":1,"hostname":"bbe63e60c3ec","name":"Dialogflow-AudioServer","msg":"AudioServer listening on UDP port","v":1}
Above is the only 3 line log i am getting nothing more.

is this a port issue? Should i keep it in the same subnet or same machine as asterisk or different server?

@danjenkins
Copy link
Contributor

Are you also running the ARI project too? You need that too

@RashmiTechCraft
Copy link
Author

Are you also running the ARI project too? You need that too

Yes I am Running the ARI Project On The Same Machine As Asterisk

@danjenkins
Copy link
Contributor

Ah great ok.

See if you can send a netcat udp test from your asterisk box to your box handling the audio server?

@RashmiTechCraft
Copy link
Author

Ah great ok.

See if you can send a netcat udp test from your asterisk box to your box handling the audio server?

Yes While Doing The Below Command I Am getting ping inside audio server
echo "Hello from WSL" | nc -u MY_SERVER_IP 7777

{"level":30,"time":1716956739128,"pid":1660,"hostname":"ip-172-31-23-32","name":"Dialogflow-AudioServer","msg":"Subscribed to both newStream & streamEnded topic","v":1}
{"level":30,"time":1716956739129,"pid":1660,"hostname":"ip-172-31-23-32","name":"Dialogflow-AudioServer","msg":"AudioServer listening on UDP port","v":1}
node:buffer:1168
    throw new ERR_INVALID_BUFFER_SIZE('16-bits');
    ^

RangeError [ERR_INVALID_BUFFER_SIZE]: Buffer size must be a multiple of 16-bits
    at Buffer.swap16 (node:buffer:1168:11)
    at Socket.<anonymous> (/home/asterisk-dialogflow-rtp-audioserver/lib/RTPServer.js:47:21)
    at Socket.emit (node:events:519:28)
    at UDP.onMessage [as onmessage] (node:dgram:943:8) {
  code: 'ERR_INVALID_BUFFER_SIZE'
}```

@danjenkins
Copy link
Contributor

danjenkins commented May 29, 2024 via email

@RashmiTechCraft
Copy link
Author

Great. You’ll need to enable more logging in asterisk to see what’s happening with the rtp then. In the asterisk cli go and enable rtp logging and see what’s happening to the rtp Dan Jenkins Founder @ Nimble Ape / Everycast Labs / CommCon Nimble Ape: nimblea.pe Everycast Labs: everycastlabs.uk // broadcastbridge.app CommCon: commcon.xyz

On Wed, 29 May 2024 at 05:30, RashmiTechCraft @.> wrote: Ah great ok. See if you can send a netcat udp test from your asterisk box to your box handling the audio server? Yes While Doing The Below Command I Am getting ping inside audio server echo "Hello from WSL" | nc -u MY_SERVER_IP 7777 {"level":30,"time":1716956739128,"pid":1660,"hostname":"ip-172-31-23-32","name":"Dialogflow-AudioServer","msg":"Subscribed to both newStream & streamEnded topic","v":1} {"level":30,"time":1716956739129,"pid":1660,"hostname":"ip-172-31-23-32","name":"Dialogflow-AudioServer","msg":"AudioServer listening on UDP port","v":1} node:buffer:1168 throw new ERR_INVALID_BUFFER_SIZE('16-bits'); ^ RangeError [ERR_INVALID_BUFFER_SIZE]: Buffer size must be a multiple of 16-bits at Buffer.swap16 (node:buffer:1168:11) at Socket. (/home/asterisk-dialogflow-rtp-audioserver/lib/RTPServer.js:47:21) at Socket.emit (node:events:519:28) at UDP.onMessage [as onmessage] (node:dgram:943:8) { code: 'ERR_INVALID_BUFFER_SIZE' }``` — Reply to this email directly, view it on GitHub <#38 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB3LLPK4G2UO5HASBHZP2LZEVKWXAVCNFSM6AAAAABIMV2CTOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZWGQ4TCNZQHA . You are receiving this because you commented.Message ID: @. .com>

I am using FreePBX Setup

Here is the Bridge which is inside same machie as freepbx machine

yarn run v1.22.22
$ node index.js
{"level":30,"time":1716979190779,"pid":2519971,"hostname":"ip-172-31-54-247","name":"Asterisk-Dialogflow-ARI-Bridge","msg":"Starting","v":1}
{"level":30,"time":1716979190781,"pid":2519971,"hostname":"ip-172-31-54-247","name":"Asterisk-Dialogflow-ARI-Bridge","msg":"trying to connect to mqtt","v":1}
{"level":30,"time":1716979191064,"pid":2519971,"hostname":"ip-172-31-54-247","name":"Asterisk-Dialogflow-ARI-Bridge","msg":"connected to mqtt","v":1}
{"level":30,"time":1716979191065,"pid":2519971,"hostname":"ip-172-31-54-247","name":"Asterisk-Dialogflow-ARI-Bridge","ariConfig":{"url":"localhost:5038","username":"admin","password":"ASTERISK_PASS","appName":"dialogflow"},"msg":"ari config","v":1}

And Here is the Log Of Audio Server That is running inside a separate VM

root@ip-172-31-23-32:/home/asterisk-dialogflow-rtp-audioserver# yarn start
yarn run v1.22.22
$ node index.js
{"level":30,"time":1716979571344,"pid":1730,"hostname":"ip-172-31-23-32","name":"Dialogflow-AudioServer","msg":"Connected to MQTT","v":1}
{"level":30,"time":1716979571513,"pid":1730,"hostname":"ip-172-31-23-32","name":"Dialogflow-AudioServer","msg":"Subscribed to both newStream & streamEnded topic","v":1}
{"level":30,"time":1716979571515,"pid":1730,"hostname":"ip-172-31-23-32","name":"Dialogflow-AudioServer","msg":"AudioServer listening on UDP port","v":1}

Now Whenever i am placing a call to my Twilio Phone, I am Getting the same call Inside My VOIP Softphone and the conversation continues but i do not see extra logs in both The ARI Bridge Or Audio Server

Is there any Settings that i am missing here?

@RashmiTechCraft
Copy link
Author

@danjenkins Please let me know the steps to make sure the calls passes on to the ARI bridge rather than extension. Thanks

@danjenkins
Copy link
Contributor

You need to add the Stasis application into the call.

https://community.freepbx.org/t/add-stasis-application-in-dialplan-to-use-asterisk-ari-with-freepbx/49792

Thats how ARI works - replace Stasis(hello-world) with the name of the ari app youve put into the config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants