A call to a mobile phone via the SIP server¶
Overview¶
A SIP call to a mobile phone is a special case of calls between a browser and a SIP device, when the SIP server either operates as a GSM/PSTN gateway itself or connects to one during the call.
Supported platforms and browsers¶
Chrome | Firefox | Safari | Edge | |
---|---|---|---|---|
Windows | ✅ | ✅ | ❌ | ✅ |
Mac OS | ✅ | ✅ | ✅ | ✅ |
Android | ✅ | ✅ | ❌ | ✅ |
iOS | ✅ | ✅ | ✅ | ✅ |
Supported protocols¶
- WebRTC
- RTP
- SIP
Supported codecs¶
- H.264
- VP8
- G.711
- Speex
- G.729
- Opus
Supported SIP functions¶
- DTMF
- Holding a call
- Transferring a call
SIP functions are managed using the WebSDK.
Operation flowchart¶
- The browser begins a call
- WCS connects to the SIP server
- The SIP server connects to the GSM/PSTN gateway
- The GSM/PSTN gateway connects to the mobile phone
- The browser and the phone exchange audio streams
Quick manual on testing¶
- For the test we use:
- a SIP account;
- the Phone UI web application to make a call;
-
a mobile phone to answer the call.
-
Open the Phone UI web application. Click
Log in
and enter the SIP account credentials:
-
Enter the mobile phone number and click
Voice call
. Dialing starts:
-
The mobile phone displays an incoming call on the screen:
-
Answer the call on the mobile phone:
-
The browser also shows that the connection is established:
-
To terminate the call, click the
Hangup
button.
Call flow¶
Below is the call flow when using the Phone example to create a call.
-
Creating a call
Session.createCall()
,Call.call()
code
-
Sending
SIP INVITE
to the SIP server -
Sending
SIP INVITE
to the GSM/PSTN gateway -
Establishing a connection to the mobile terminal
-
Receiving a confirmation from the GSM/PSTN gateway
-
Receiving a confirmation from the SIP server
-
Receiving from the server an event confirming successful connection
CALL_STATUS.ESTABLISHED
code
-
Participants of the call exchange audio streams
-
Terminating the call
Call.hangup()
code
Phone.prototype.hangup = function () { trace("Phone - hangup " + this.currentCall.id() + " status " + this.currentCall.status()); this.hideFlashAccess(); if (this.currentCall.status() == CALL_STATUS.PENDING) { this.callStatusListener(this.currentCall); } else { this.currentCall.hangup(); } this.flashphonerListener.onHangup(); };
-
Sending
SIP BYE
to the SIP server -
Sending
SIP BYE
to the GSM/PSTN gateway -
Receiving a confirmation from the GSM/PSTN gateway
-
Receiving a confirmation from the SIP server