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

snoopChannel - Channel not in Stasis application #161

Open
davidvoisonics opened this issue May 20, 2024 · 0 comments
Open

snoopChannel - Channel not in Stasis application #161

davidvoisonics opened this issue May 20, 2024 · 0 comments

Comments

@davidvoisonics
Copy link

First, apologies for my code. I'm not a real JS programmer and am trying to create a solution anyway.

We are trying to snoop on a channel like this:

                try {
                        console.log( 'Snooping on "' + asteriskID + '"' );
                        await this.ari.channels.snoopChannel({
                                app: "externalMedia", channelId: asteriskID, snoopId: asteriskID + '_snoop', spy: 'both', whisper: 'out',
                        });
                } catch (error) {
                        console.log('snoopChannel::', error)
                        this.close();
                }

However it fails with an error as follows. Does this mean that we can't snoopChannel on a channel that isn't using ARI?

Thanks in advance for any advice.

Unhandled rejection Error: {"message":"Channel not in Stasis application"}
at SwaggerRequest.swaggerError [as errorCallback] (/opt/asterisk-external-media/node_modules/ari-client/lib/resources.js:949:19)
at Object.error (/opt/asterisk-external-media/node_modules/swagger-client/lib/swagger.js:1077:24)
at EventEmitter.error (/opt/asterisk-external-media/node_modules/swagger-client/lib/swagger.js:1296:19)
at EventEmitter.emit (node:events:513:28)
at emit (/opt/asterisk-external-media/node_modules/shred/lib/shred/request.js:454:21)
at /opt/asterisk-external-media/node_modules/shred/lib/shred/request.js:473:9
at setBodyAndFinish (/opt/asterisk-external-media/node_modules/shred/lib/shred/response.js:103:7)
at IncomingMessage. (/opt/asterisk-external-media/node_modules/shred/lib/shred/response.js:120:7)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

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

1 participant