To get started faster with the Stringee API, we have written the SCCO Helper. This Helper allows you to generate SCCO so you can quickly test simple cases like:
In more complicated call control cases, please build your own Answer URL and return the SCCO to control the call as you like. See details at: https://developer.stringee.com/docs/server/stringee-call-control-object
URL: https://developer.stringee.com/scco_helper/simple_project_answer_url
The GET parameters
Parameter | Description | Default value |
---|---|---|
appToPhone | false: App-to-App call true: App-to-Phone call auto: When "to" is an integer, greater than 600000, "appToPhone" has the value of "true". When "to" is a String or an integer - less than or equal to 600000: "appToPhone" has the value of "false". (To be able to handle the call according to your needs, please write your own answer_url) |
false |
timeout | Maximum ringing time in seconds | 60 |
maxConnectTime | Maximum call duration in seconds | -1 |
peerToPeerCall | true: is a Peer-to-Peer call; false: is the call that the media stream passes through the StringeeServer system | true |
record | true: turn on the recording; false: turn off the recording | false |
recordFormat | Allow recording / recording with one of 3 formats: wav, mp3, mp4 | mp3 |
Example: If you want to make App-to-Phone calls with audio recording, Project Answer URL should be set as follows:
https://developer.stringee.com/scco_helper/simple_project_answer_url?appToPhone=true&record=true
Then, the SCCO helper will generate SCCO which will be like this:
[{
"action": "record",
"eventUrl": "",
"format": "mp3"
}, {
"action": "connect",
"from": {
"type": "internal",
"number": "...",
"alias": "..."
},
"to": {
"type": "external",
"number": "...",
"alias": "..."
},
"customData": "...",
"timeout": 60,
"maxConnectTime": 0,
"peerToPeerCall": false
}]
URL: https://developer.stringee.com/scco_helper/simple_number_answer_url
The GET parameters:
Parameter | Description | Default value |
---|---|---|
phoneToPhone | false: Phone-to-App call; true: Phone-to-Phone call | false |
to_number | The call will be routed to the App with userId as the string (when phoneToPhone = false); or will pour to Phone with this number (when phoneToPhone = true) | |
custom | Transfer the data you want, the information will be pushed to the Client App (when phoneToPhone = false) | |
stringeeNumber | In the case of Phone-to-Phone, this number will be used to call out to 'to_number'; This number must be the number purchased on the Stringee system | |
record | true: turn on the recording; false: turn off the recording | false |
recordFormat | Allow recording / recording with one of 3 formats: wav, mp3, mp4 | mp3 |
Example 1: To make a Phone to App call with recording, ring the call to the Client App, authenticated with userId as 'user1', set the Number Answer URL as follows:
https://developer.stringee.com/scco_helper/simple_number_answer_url?record=true&to_number=user1&phoneToPhone=false
Then, the SCCO helper will generate SCCO which will be like this:
[{
"action": "record",
"eventUrl": "",
"format": "mp3"
}, {
"action": "connect",
"from": {
"type": "external",
"number": "...",
"alias": "..."
},
"to": {
"type": "internal",
"number": "user1",
"alias": "Call_to_"
},
"continueOnFail": false,
"onFailEventUrl": "",
"customData": "..."
}]
Example 2: To make a Phone to Phone call with recording, ring the call to the phone number TO_NUMBER, use the number purchased on Stringee as STRINGEE_NUMBER, the Number Answer URL should be set as follows:
https://developer.stringee.com/scco_helper/simple_number_answer_url?record=true&to_number=TO_NUMBER&phoneToPhone=true&stringeeNumber=STRINGEE_NUMBER
Then, the SCCO helper will generate SCCO which will be like this:
[{
"action": "record",
"eventUrl": "",
"format": "mp3"
}, {
"action": "connect",
"from": {
"type": "external",
"number": null,
"alias": "STRINGEE_NUMBER"
},
"to": {
"type": "external",
"number": "TO_NUMBER",
"alias": "Call_to_"
},
"continueOnFail": false,
"onFailEventUrl": "",
"customData": null
}]