SIP Registration Fails

385 views
Skip to first unread message

te...@autoboys.co.za

unread,
Sep 18, 2018, 9:21:11 AM9/18/18
to SIP.js
I'm developing a soft phone using sip-0.11.3.min.js and I keep on getting "registration failed" after calling the UA.invite() function.

Can someone tell me why is my code not connecting or registering? Kindly point me to the right direction, here's my code below.

var userAgent = new SIP.UA({
uri: myAuth + "@" + wsserver,
password: extensionKey,
wsServers: "wss://" + wsserver + ":443",
traceSip: true,
authorizationUser: myAuth,
registerExpires: 1800,
hackWssInTransport: true,
stunServers: wsserver,
keepAliveInterval: 59,
rtcpMuxPolicy: "negotiate"
});

var session = userAgent.invite("sip:" + dialNumber + "@" + wsserver, {
media: {
constraints: {
audio: true,
video: false
}
}
});

userAgent.on('connecting', function () {
$("#msg").html("Connecting...");
});
userAgent.on('connected', function () {
$("#msg").html("Connected, attempting...");
});
userAgent.on('disconnected', function () {
$("#msg").html("Disconnected");
});
userAgent.on('registered', function () {
$("#msg").html("Registered!");
});
userAgent.on('registrationFailed', function () {
$("#msg").html("Registration Failed");
});
userAgent.on('unregistered', function () {
$("#msg").html("Unregistered, bye!");
});

Eric Green

unread,
Sep 18, 2018, 9:58:24 AM9/18/18
to SIP.js
If you have a question about why SIP.js isn't working for you, please enable traceSip in your UA config and include in your post a link to a gist containing the JS console output. See also: How to Report Bugs Effectively

te...@autoboys.co.za

unread,
Sep 19, 2018, 3:28:34 AM9/19/18
to SIP.js
I've enabled the microphone on my pc and tested it, enabled traceSip, ran the SIP.UA config and I still can't connect.

Here's a link to gist: https://gist.github.com/Tefojulius/82cf8fcf6a43678cceaf5339ef80f55f

James Criscuolo

unread,
Sep 19, 2018, 7:08:39 AM9/19/18
to SIP.js
line 43 of those logs:

sip-0.11.3.min.js:1 Wed Sep 19 2018 08:31:14 GMT+0200 (South Africa Standard Time) | sip.transport | · traceSip: false

Please enable and resend logs

James

Eric Green

unread,
Sep 19, 2018, 7:09:14 AM9/19/18
to SIP.js
sip-0.11.3.min.js:1 Wed Sep 19 2018 08:31:24 GMT+0200 (South Africa Standard Time) | sip.invitecontext.sessionDescriptionHandler | acquiring local media
sip-0.11.3.min.js:1 Wed Sep 19 2018 08:31:24 GMT+0200 (South Africa Standard Time) | sip.invitecontext.sessionDescriptionHandler | unable to acquire streams

getUserMedia failed. The log messages for this error case are a bit confusing, I will clean them up.

On Wednesday, September 19, 2018 at 3:28:34 AM UTC-4, te...@autoboys.co.za wrote:

te...@autoboys.co.za

unread,
Sep 20, 2018, 10:49:28 AM9/20/18
to SIP.js
I've enabled traceSip, my microphone is connected and tested but I still can't connect. I'm getting a "DOMException: Requested device not found" error.

Here's a link to my gist: https://gist.github.com/Tefojulius/b3ba8a95348e1e92063a1594ea324e05

Eric Green

unread,
Sep 20, 2018, 10:50:38 AM9/20/18
to SIP.js
It is definitely a local microphone issue. You will need to resolve that, there is nothing that we can do.
Reply all
Reply to author
Forward
0 new messages