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 can:

Concepts

Client authentication

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

Details of the authentication process: 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 through the following 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 callee's ID (user_2).
  2. Stringee Server obtains SCCO from Your Server by sending a HTTP GET via answer_url (answer_url must be configured 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 the 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 manage calls between mobile/ web apps and landline/mobile phones, through the following 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 the callee, "to" is the callee's number (phone_number_2).

  2. Stringee Server obtains SCCO from Your Server by sending a HTTP GET via answer_url (answer_url must be configured 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 the 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 through the following steps:

Stringee Receive a phone call

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

  2. Stringee Server obtains SCCO from Your Server by sending a HTTP GET via answer_url (answer_url must be configured 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 the 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 in these following steps:

Stringee Receive a phone call

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

  2. Stringee Server obtains SCCO from Your Server by sending a HTTP GET via answer_url (answer_url must be configured 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 the 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 to or different from phone_number_1