Wiki -VoIP Topics

WebPhone -How It Works?


The web phone is working like a desktop SIP softphone but instead of an installed application, it runs from web.

Its purpose is to offer a robust and high quality solution which can be used from any OS and any browser, talking directly with your SIP server/softswitch/PBX without the usual incompatibility headache or the complicated and error-phone WebRTC related configurations.

The webphone is a client side software. This means that it is running in the client browser (usually as pure JavaScript but sometimes/optionally it might load some native library or plugin depending on circumstances and configuration) and doesn't have any server-side dependencies. It doesn't require any specific web server, database, app server or framework). Just copy its files to your web server and refer to it from your website by using it as a softphone, a click-to-call button or as a custom VoIP client solution. However, if you wish, you can integrate it with any website, app, CRM or server/client side framework such as PHP, .NET, NodeJs, React, Angular, or whatever you are using.

Here is how it works, simplified:

  1. You copy the webphone to your webserver, set its parameters (such as specifying your sip server address in the webphone_config.js) and refer to it from your webpage.
    More then 160 optional parameters are available to customize and fine-tune the webphone after your needs.
    You can also test it by launching from local file or localhost.
  2. The enduser visit's your page from its browser.
    Your page loads the web phone or the enduser clicks on a link/button which will load the webphone in a separate page or in a DIV element or a separate iFrame.
    Depending on the html you are using, the webphone can present itself as a softphone, as a click to call button or as a custom solution (or not display any user interface at all).
  3. The webphone will start the best suitable VoIP engine.
    The web phone will talk (register) now directly with your SIP server (or via a gateway if you have configured it so).
  4. At this point it is capable to accept any incoming calls.
    Optionally it can auto call a number on startup (if you configured it as click-to-call).
  5. The enduser now can work with the webphone user interface (for example the softphone skin will present a main page, a dialpad, a contact list and history for the users).
    The enduser enter a number or select from the contact list and makes voice calls, video calls, conference, chat, sms or file transfer.
    It is also possible to initiate outgoing calls or auto accept incoming calls automatically from your script.


The webphone has many advantages over similar solutions, such as:

  • robust, battle-tested solution for the SIP from web problem
  • full SIP compatibility (it can connect to your SIP server/softswitch/PBX) and it can call any other SIP endpoints or to PSTN via your gateway/service/trunk/carrier.
  • it has multiple VoIP engines built-in thus compatible with all operating system and browsers
  • it's high-level stable API offers a robust way to create any custom solution with long term support (since its engines are separate modules, it will survive all kind of technology changes as we already seen in the past by the evaporation of the old popular platforms such as NPAPI, Silverlight and Flash)
  • ready to use customizable turn-key skins are included
  • unless pure WebRTC solutions, it works also in most browsers where WebRTC is not natively supported and even if WebRTC is supported, it might use a better approach such as native SIP/RTP directly with your sip server
  • when WebRTC is supported it can use its highly optimized built-in WebRTC engine which is fine-tuned for a trouble-free operation with any SIP server
  • unless Flash, Silverlight or Java solutions the webphone has full support for the newest HTML5 standards and works fine in modern browsers where these technologies are not available or deprecated
  • unless pure WebRTC clients, the webphone is capable to use also other engines which migh be more optimal for your environment, will require less server side processing and it works in all browsers including browsers with no WebRTC support or if you don't have server side WebRTC support
  • will connect directly to your SIP server (using native SIP/RTP) whenever possible (unless other WebRTC solutions which needs protocol conversion or Flash which needs an intermediary RTMP gateway to handle the conversion between Flash and SIP)
  • it works also if you wish to use (force) WebRTC but your SIP server doesn't have WebRTC support. In this case it will auto convert WebRTC to simple SIP/RTP
  • more advantages as described on the webphone homepage and documentation

 

For more details about the engines see this wiki and the "Technical details" section in the documentation or compare sip web client solutions.
For more details about the usage, please follow the quick start guide and the documentation.

WebPhone