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

mediaHandler.hasDescription is not a function #1

Open
ehsan94 opened this issue May 11, 2017 · 4 comments
Open

mediaHandler.hasDescription is not a function #1

ehsan94 opened this issue May 11, 2017 · 4 comments

Comments

@ehsan94
Copy link

ehsan94 commented May 11, 2017

I.ve sucessfully registered to asterisk from webapp by using extension 2000.Whenever the call is established between sip (extension :3000) and webapp ext:2000. Server crashes : kurento-asterisk/node_modules/sip.js/src/Session.js:2045
if(!this.mediaHandler.hasDescription(response)) {

TypeError: this.mediaHandler.hasDescription is not a function
at InviteClientContext.receiveInviteResponse (/home/ehsan/Downloads/kurento-asterisk/node_modules/sip.js/src/Session.js:2045:35)
at RequestSender.receiveResponse (/home/ehsan/Downloads/kurento-asterisk/node_modules/sip.js/src/RequestSender.js:133:22)
at InviteClientTransaction.receiveResponse (/home/ehsan/Downloads/kurento-asterisk/node_modules/sip.js/src/Transactions.js:310:29)
at Transport.onMessage (/home/ehsan/Downloads/kurento-asterisk/node_modules/sip.js/src/Transport.js:318:27)
at WebSocket.ws.onmessage (/home/ehsan/Downloads/kurento-asterisk/node_modules/sip.js/src/Transport.js:176:17)
at WebSocket.onMessage (/home/ehsan/Downloads/kurento-asterisk/node_modules/ws/lib/WebSocket.js:418:14)
at emitTwo (events.js:106:13)
at WebSocket.emit (events.js:194:7)
at Receiver.ontext (/home/ehsan/Downloads/kurento-asterisk/node_modules/ws/lib/WebSocket.js:816:10)
at /home/ehsan/Downloads/kurento-asterisk/node_modules/ws/lib/Receiver.js:477:18

@agonza1
Copy link

agonza1 commented Oct 25, 2018

To fix that error I created a hasDescription function, it might be related with an update in sip.js.
The following fixed it for me

KurentoMediaHandler.prototype = {

   // ...

    hasDescription: new Function(),
};

@avilaatencioa
Copy link

I have the same problems and I have not given solution, I do not know in file to add

KurentoMediaHandler.prototype = {

// ...

hasDescription: new Function(),

};

@ashokbk
Copy link

ashokbk commented May 9, 2019

can you mention exactly where to add this function

sip.js file or in session.js file?

@agonza1
Copy link

agonza1 commented May 9, 2019

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

4 participants