Suggestions

close search

Stringee Call API Overview

The Stringee Call API is the easiest way to build high-quality voice applications in the Cloud. With the Stringee Call API you:

Concepts

Client authentication

In order to make or receive a call using Stringee API, your Client application must be authenticated. The authentication process is implemented between: Your App, Your Server and Stringee Server. It ensures the system's security (secret key is not stored on the client) and allows Your Server to block or unblock any client whenever you want.

Authentication process is described here: https://developer.stringee.com/docs/client-authentication

How Stringee Call works (some flows)

Flow 1: Make an app-to-app call

Use Stringee Call API to embed app-to-app voice or video, follow these steps:

Stringee Make an app-to-app call

  1. Your App calls the makeCall(from, to) method: "from" is the caller's ID (user_1), "to" is the called party's ID (user_2).

  2. Stringee Server gets SCCO from Your Server by sending a HTTP GET via answer_url (answer_url must be configed in your Project on https://developer.stringee.com), for example:
https://yourserver.com/answer_url-from_internal.php?from=user_1&to=user_2&fromInternal=true&userId=user_1&projectId=22512&callId=call-vn-1-ABCDWXKUQM-1542377678921&custom=
  1. Your Server returns SCCO in following format:
[{
  "action": "connect",

  "from": {
    "type": "internal",
    "number": "user_1",
    "alias": "user_1"
  },

  "to": {
    "type": "internal",//internal: app-to-app call type
    "number": "user_2",//make a call to user_2
    "alias": "user_2",
  },

  "customData": "test-custom-data"
}]

Flow 2: Make an app-to-phone call

Use Stringee Call API to make and control calls between mobile or web apps and landline or mobile phones, follow these steps:

Stringee Make an app-to-phone call

  1. Your App calls the makeCall(from, to) method: "from" is your number (phone_number_1) which will be displayed to called party, "to" is the called party's number (phone_number_2).

  2. Stringee Server gets SCCO from Your Server by sending a HTTP GET via answer_url (answer_url must be configed in your Project on https://developer.stringee.com), for example:
https://yourserver.com/answer_url-from_internal.php?from=phone_number_1&to=phone_number_2&fromInternal=true&userId=user_1&projectId=22512&callId=call-vn-1-ABCDWXKUQM-1542377678921&custom=
  1. Your Server returns SCCO in following format:
[{
  "action": "connect",

  "from": {
    "type": "internal",
    "number": "phone_number_1",//the phone number that displayed to the called party.
    "alias": "phone_number_1"
  },

  "to": {
    "type": "external",//external: app-to-phone call type
    "number": "phone_number_2",//make a call to this phone number
    "alias": "phone_number_2",
  },

  "customData": "test-custom-data"
}]
  1. Flow Stringee app-to-phone call flow

Flow 3: Receive a phone call

Use Stringee Call API to route a phone call to Your App, follow these steps:

Stringee Receive a phone call

  1. Your phone number (phone_number_1) which bought from Stringee receives a phone call (for example from a your customer).

  2. Stringee Server gets SCCO from Your Server by sending a HTTP GET via answer_url (answer_url must be configed in your Number on https://developer.stringee.com), for example:
https://yourserver.com/answer_url-from_external.php?from=phone_number_2&to=phone_number_1&uuid=882696e2-bb01-11e7-8056-3fae8fb0a1ad&callId=call-vn-1-ABCDWXKUQM-1542377678921&fromInternal=false
  1. Your Server returns SCCO in following format:
[{
    "action": "connect",

    "from": {
        "type": "external",
        "number": "phone_number_2",//the caller's phone number
        "alias": "phone_number_2"
    },

    "to": {
        "type": "internal",//internal: the call is routed to Your App
        "number": "user_1",// the call is routed to this user.
        "alias": "phone_number_1"//your phone number which bought from Stringee
    },

    "customData": "test-custom-data"
}]
  1. Flow Stringee phone-to-app call flow

Flow 4: Receive a phone call and route to phone

Use Stringee Call API to route a phone call to phone, follow these steps:

Stringee Receive a phone call

  1. Your phone number (phone_number_1) which bought from Stringee receives a phone call (for example from a your customer).

  2. Stringee Server gets SCCO from Your Server by sending a HTTP GET via answer_url (answer_url must be configed in your Number on https://developer.stringee.com), for example:
https://yourserver.com/answer_url-from_external.php?from=phone_number_2&to=phone_number_1&uuid=882696e2-bb01-11e7-8056-3fae8fb0a1ad&callId=call-vn-1-ABCDWXKUQM-1542377678921&fromInternal=false
  1. Your Server returns SCCO in following format:
[{
    "action": "connect",

    "from": {
        "type": "external",
        "number": "phone_number_2",//the caller's phone number
        "alias": "phone_number_4"//your phone number which bought from Stringee
    },

    "to": {
        "type": "external",//external: the call is routed to phone
        "number": "phone_number_3",// the call is routed to this phone.
        "alias": "phone_number_3"
    },

    "customData": "test-custom-data"
}]

Note: phone_number_4 may be similar or different phone_number_1