ringcentral / ringcentral-web-phone Goto Github PK
View Code? Open in Web Editor NEWRingCentral WebPhone Library for JavaScript WebRTC
Home Page: https://ringcentral.github.io/ringcentral-web-phone
RingCentral WebPhone Library for JavaScript WebRTC
Home Page: https://ringcentral.github.io/ringcentral-web-phone
Since Digital Lines are a requirement for RingCentral WebRTC, it would be useful to link to some resources on how to create and manage digital lines. Of note, a limited number of digital lines are available for free for sandbox test accounts.
For sandbox account device selection, we should mention selecting the RingCentral for Desktop softphone option.
Here are some KB articles on Digital Lines:
When you forward incoming call - this error occurs
Uncaught TypeError: Cannot read property 'sendRequest' of undefined
Implement warm transfer feature:
REFER
in session 1When we make a call on the target user page this code
console.log('To', session.request.to.displayName, session.request.to.friendlyName);
console.log('From', session.request.from.displayName, session.request.from.friendlyName);
print the same value the name of From user
Also there is away to get the caller user extension Id ??
Hi
I check out your code and I found the you have widget folder
so my question is finalized or under development ?
The fix that morphs PRACK into ACK needs to be removed:
https://github.com/ringcentral/ringcentral-web-phone/blob/master/src/ringcentral-web-phone.js#L350
The options are:
If option 1 will not produce errors, go with it, otherwise try option 2. If it will not work -- let @kirill-konshin know, so that we can find another solution.
Human readable phone numbers are not usable in the demo and return and "Invalid resource owner credentials." error.
For example:
It would be ideal to normalize numbers by removing non-digit characters.
Needs a panel to show all the active calls in the demo. There is no way to track the active calls which are on hold and jump to another call.
If you leave out the "1" and you're on an American-based number, you receive an "Invalid credentials" error from the auth request.
Need to do one or more of the following:
Register Sip Configurations
button in demo until all fields are correctCurrently we use custom handling of transfer process but SIP.js has own implementation of session.refer()
.
When using attended transfer of SIP.JS it adds extra "friendlyName"
part to Refer-To
header:
Refer-To: "friendlyName" <sip:...>
This part is rejected by RC telephony.
More info:
Currently SIP.JS's refer
method will not return a promise and it's hard to understand was the call successfully transferred.
Here's how target
is assembled in SIP.JS:
target = '"' + target.remoteIdentity.friendlyName + '" ' +
'<' + target.dialog.remote_target.toString() +
'?Replaces=' + target.dialog.id.call_id +
'%3Bto-tag%3D' + target.dialog.id.remote_tag +
'%3Bfrom-tag%3D' + target.dialog.id.local_tag + '>';
Hold & unhold functionality works when call has been started from the app. When the call has been received by the app hold & unhold breaks.
I have a complete set of device-agnostic favicon and appicons we can use that have the RingCentral circle logo on transparent backgrounds.
Will submit a PR in a moment.
PhoneLine.prototype.cancel = function() {
var session = this.getSession();
return new Promise(function(resolve, reject) {
session.terminate({statusCode: 486});
return null;
});
};
I am wondering if resolve()
need to be called after actions finish? Such as:
PhoneLine.prototype.cancel = function() {
var session = this.getSession();
return new Promise(function(resolve, reject) {
session.terminate({statusCode: 486});
resolve();
return null;
});
};
DOMException: Failed to set local answer sdp: Failed to push down transport description: Offerer must use actpass value for setup attribute.
When not on call and you try to flip the call
Call is disconnected by user when the user is put on hold
Uncaught (in promise) Error: Not on call
at PhoneLine.flip (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:965:31)
at callflip (http://localhost:63342/web-phone-1/demo/index.js:131:14)
at HTMLInputElement.onclick (http://localhost:63342/web-phone-1/demo/index.html:154:87)
Fix the error message
Write a minimal viable documentation for classes and methods.
This is what you receive if a phone is not configured with the outbound call flags, need to add better error handling (we did this the other day, and I thought I pushed it up).
After receiving positive Registered notification and then trying to call outbound, I'm receiving this console.log() error in Firefox v42.0:
WebPhone.prototype.call@http://localhost:8080/build/ringcentral-web-phone.js:398:1
startCall/<@http://localhost:8080/demo/index.js:48:17
lib$es6$promise$$internal$$tryCatch@http://localhost:8080/demo/ringcentral-bundle.js:1412:16
lib$es6$promise$$internal$$invokeCallback@http://localhost:8080/demo/ringcentral-bundle.js:1424:17
lib$es6$promise$$internal$$publish@http://localhost:8080/demo/ringcentral-bundle.js:1395:11
lib$es6$promise$asap$$flush@http://localhost:8080/demo/ringcentral-bundle.js:1206:9
I see the console.log above line (47) with the data which will be provided to webCall() being logged as SIP call to 131760097331 from 16506429233
, so the numbers going in appear correct.
The README.md file needs to have a section to address the "Prerequisites" for using RingCentral's WebRTC. Items such as:
Right now, it just seems like a property I have to add, but I don't know why or what options I may have as a developer.
Could you provide some better information, or links to learn more, and to understand why it is part of the SDK.
When use web-phone with commonjs module bundler, SIP(v0.7.4) will throw errors when trying to register:
LoggerFactory.js:72 Mon Jun 27 2016 10:44:47 GMT+0800 (CST) | sip.parser | error parsing header "Contact"
Following steps reproduce the error:
npm i ringcentral ringcentral-web-phone
After clicking the Register Sip Configurations button, my RC credentials can be authorized, but then I receive the following error messages:
WebSocket connection to 'wss://webphone-sip.devtest.ringcentral.com:8083/' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT
Not seeing any errors in the console or network tabs, so assuming all is working internally...but the call never is received from my cellular device.
On this call: https://platform.devtest.ringcentral.com/restapi/v1.0/client-info/sip-provision
Seeing this body returned (not capturing error and notifying developer):
"sipFlags" : {
"voipFeatureEnabled" : true,
"voipCountryBlocked" : false,
"outboundCallsEnabled" : false
}
}
Step 1: Enable flags check in register function
Step 2: Check flag again when call is created (reject Promise with something like "outbound calling is disabled")
Hi
I try the demo and its working but when I try to send DTMF I got this error
TypeError: peer.createDTMFSender is not a function
In ringcentral-web-phone.js
line 590
var dtmfSender = peer.createDTMFSender(stream.getAudioTracks()[0]);
Thanks
When not on call you try to transfer the call, hang the call
Uncaught (in promise) m…e.e…s.I…r.exception {code: 2, name: "INVALID_STATE_ERROR", status: 9, message: "Invalid status: 9"}
InviteServerContext.reject @ Session.js:1153InviteServerContext.terminate @ Session.js:1235PhoneLine.cancel @ web-phone.js:857(anonymous function) @ VM1265:2InjectedScript._evaluateOn @ VM842:875InjectedScript._evaluateAndWrap @ VM842:808InjectedScript.evaluate @ VM842:664
Fix the error handling
As my colleague and I are trying to explore how to work with the Web Phone, we stuck while configuring the RingCentral app for Web Phone according to the README file.
The issue is that when we try to set up a new browser-based app, there is no permission VoIP Calling
. Should I use different permissions?
When not on call but sip registered.
When you muting or unmuting
When press start/stop record
Could be handled with in app
TypeError: Cannot read property 'getAudioTracks' of undefined
at setStreamMute (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:1167:24)
at PhoneLine.setMute (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:1157:9)
at Object.service.mute (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:1559:22)
at mute (http://localhost:63342/web-phone-1/demo/index.js:45:20)
Clean up the error msg
Remove muted flag and use isOnMute
Hi
When you create a call from browser to another
when the target browser reject the call its not reflect on the other side I mean no events triggered on the caller side so the caller can not know the call is rejected
VM215 sip.js:2885 DOMException: Failed to set local answer sdp: Failed to push down transport description: Offerer must use actpass value for setup attribute.
Hi Kirill, we have shown you this issue when you were in China office. Please help fix it. Thanks.
Currently, looking at the demo code, the sip.js library is referenced externally from the tag. This means that if you do not add this JS src in your head tag, that you will receive a SIP undefined error in JS while trying to execute demo code.
Needs to be bundled within the library itself, especially for apps which hit the 3rd conditional statement of the UMD format being used by src/ringcentral-web-phone.js (lines 9-12)
When Call reaches voice mail You cannot disconnect the call
Call shows not connected, Cannot cancel/hangup the call, cannot be traces in active call array
The phone keeps ringing even after the call reaches voicemail
When pressed answer this error occurs
Uncaught (in promise) Error: The INFO response status code is: 481 (waiting for 200)(…)
Then when you disconnect the call this error occurs
Sun Feb 07 2016 22:50:17 GMT-0800 (PST) | sip.sipmessage | error parsing "From" header field with value "sip:@XXXXXXXXX;tag=434hg6583k"
Remote call doesn't end
Hangup from the phone . The current session in the local ends. The session in the remote doesn't end.
line.cancel() gives this error
Uncaught m…e.e…s.I…r.exception {code: 2, name: "INVALID_STATE_ERROR", status: 9, message: "Invalid status: 9"}
Need to add an option to create a pop up to allow microphone permission .
When making outbound call from RC Corp account even if user has direct number the company number is shown as caller ID on the mobile phone.
Making a call to a number and when the call is not picked if you try to disconnect this error is seen.
The call reaches voice mail
Uncaught INVALID_STATE_ERROR: Invalid status: 9InviteServerContext.reject @ Session.js:1153InviteServerContext.terminate @ Session.js:1235PhoneLine.cancel @ web-phone.js:857UserAgent.hangup @ web-phone.js:394service.hangup @ web-phone.js:1450disconnect @ index.js:84onclick @ index.html:139
index.js:15 emitting event newTransaction
index.js:15 emitting event stateChanged
index.js:15 emitting event stateChanged
index.js:15 emitting event accepted
Fix error handling
Cannot run the demo on Firefox
If you hangup incoming call. It does hangup localstream but not the remote stream. It throws this error:
Thu Feb 11 2016 13:34:58 GMT-0800 (PST) | sip.inviteservercontext | ReferenceError: service is not defined
at Object.<anonymous> (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:12453:23)
at Object.<anonymous> (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:1523:27)
at Array.forEach (native)
at Object.EventEmitter.emit (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:1521:32)
at Object.ServerContext.reject (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:5028:8)
at Object.InviteServerContext.reject (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:6341:40)
at Object.InviteServerContext.terminate (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:6418:12)
at PhoneLine.cancel (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:12585:13)
at UserAgent.hangup (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:12097:14)
at WebPhone.hangup (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:436:21)
Please add support for 3-legged OAuth to the demo app.
Need to check functionality of Info DTMF as it uses session.dtmf(tone, options{} )
- cannot send regular dtmf signals through this
If clicked for outgoing call session : this is the error you get-
Uncaught (in promise) TypeError: self.session.accept is not a function
at http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:1138:22
at PhoneLine.answer (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:1118:12)
at PhoneLine.forward (http://localhost:63342/web-phone-1/build/ringcentral-web-phone.js:1097:17)
at forward (http://localhost:63342/web-phone-1/demo/index.js:156:14)
Fix the error msg.
Include call-duration panel to show the call-duration for incoming call and out-going call.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.