Giter Site home page Giter Site logo

ringcentral-web-phone's People

Contributors

alex-us avatar anilkumarbp avatar anton-bulyenov avatar chanjunxin avatar chenghaoc avatar creatovisguru avatar egreenmachine avatar embbnux avatar grokify avatar jarvis-rc avatar jimmyxu1985 avatar kirill-konshin avatar lewis-rc avatar mangatinanda avatar nerdchacha avatar pavelberezhnoy avatar tylerlong avatar u9520107 avatar vladyslav-korenkov avatar vyshakhbabji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ringcentral-web-phone's Issues

Add links to information on Digital Lines

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:

  1. DigitalLine Overview (KB 5862)
  2. Purchasing an IP Phone or RingCentral Digital Line from the online account (KB 3136)
  3. Assigning a Digital Line to a Different Extension (KB 3748)

Warm Transfer

Implement warm transfer feature:

  1. client puts session on hold
  2. client creates a new call
  3. client sends REFER in session 1
  4. client handles disconnect of session 1

Calling request to.displayName its the same value of from.displayName

When 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 ??

Is the widget working ?

Hi
I check out your code and I found the you have widget folder
so my question is finalized or under development ?

Remove PRACK special handler

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:

  1. Only remove the fix and verify that everything works OK (there might be 4xx errors in console)
  2. Completely cancel the PRACK request -- this has never been tested, behavior is unpredictable

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.

Error when human formatted phone number is used

Human readable phone numbers are not usable in the demo and return and "Invalid resource owner credentials." error.

For example:

  • 1-650-555-1212
  • +1 (650) 555-1212

It would be ideal to normalize numbers by removing non-digit characters.

Error when country code is omitted from Auth

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:

  • Disable the Register Sip Configurations button in demo until all fields are correct
  • Change style settings to reflect error on the fromNumber field in the UI to be in error state (use Bootstrap)
  • Provide example of a 'passing' fromNumber as a placeholder
  • Provide notification message above fromNumber field with details on issue

Use session.refer() for transfers instead of custom handling

Currently 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 + '>';

404 on the favicon for the demo

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.

Promise usage on some methods

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;
    });
};

Error when unhold

DOMException: Failed to set local answer sdp: Failed to push down transport description: Offerer must use actpass value for setup attribute.

Documentation

Write a minimal viable documentation for classes and methods.

Improve error reporting when outbound calls flag is not enabled.

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.

Add "Prerequisites" to the README

The README.md file needs to have a section to address the "Prerequisites" for using RingCentral's WebRTC. Items such as:

  • A valid RingCentral Account with Connect Platform access
  • An extension configured with a Digital Line
  • An application defined in the Developer Portal with the appropriate type and permissions

Errors occur when setting up the demo app

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

Unable to Call from WebPhone to Outside number

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")

Hangup

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

Start/Stop Recording

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

session.reject(); is not reflect on the caller side

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

Unhold is broken with SIP.js 0.7.3

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.

SIP.js needs to be packaged with the bundle for factory reference

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)

Call Answering

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"}

NPM & Bower

  • Create a procedure to propagate version parameter to appropriate JSON files
  • Add necessary fields to JSON files

Answer Incoming Call

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

Disconnecting incoming call thows error

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)

sendDTMFInfo

Need to check functionality of Info DTMF as it uses session.dtmf(tone, options{} ) - cannot send regular dtmf signals through this

Call Forward

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.

Call-duration

Include call-duration panel to show the call-duration for incoming call and out-going call.

Make changes to demo

  1. Remove floating console window.
  2. Divide the demo into panels and hide/unhide functionality panel depending on the sip registrations status
  3. Clean up demo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.