Outbound and Inbound Voice
Endpoint: https://mapi.gynetix.com/prizm/api/sm/calls/makecall.json
| Field | Required | Description |
|---|---|---|
| From | Yes |
A valid RooR Voice enabled number (E.164 format) that will be initiating the phone call. Note: Valid values: Default value: |
| To | Yes |
A valid To phone number (E.164 format) that will be receiving the phone call. Note: Valid values: Default value: |
| Url | Yes |
An absolute path to your InboundXML/TwiML instructions Note: Valid values: Default value: |
| MachineDetection | No |
Use Enable if you would like RooR to return an AnsweredBy value as soon as it identifies the called party. This is useful if you would like to take a specific action — for example, connect to an agent, play a message) for a human but hang up on a machine.
If you would like to leave a voicemail on an answering machine, specify DetectMessageEnd. In this case, RooR will return an AnsweredBy immediately when a human is detected but for an answering machine, AnsweredBy is returned only once the end of the greeting is reached. Note: Valid values: Enable or DetectMessageEnd Default value: none |
| AsyncAmd | No |
Select whether to perform AMD in the background. When this is true, the call is continued while AMD makes its decision in the background. When this is false, which is the default, RooR blocks the execution of the call until AMD is completed. Note: Currently this only works with Bi Directional streaming Valid values: true or false Default value: false |
| AsyncAmdStatusCallbackMethod | No |
The HTTP method that we should use to send the results of the AMD Note: Should be used in conjunction with AsyncAmdStatusCallback Valid values: POST Default value: POST |
| AsyncAmdStatusCallback | No |
The absolute or relative URL that we should call using the AsyncAmdStatusCallbackMethod to notify whether the call was answered by a human, machine or fax. When AMD makes a decision, RooR will make a request to this URL with the following parameters: Note: Needs to be supplied if using AsyncAmd Valid values: Absolute URL Default value: none |
| MachineDetectionTimeout | No |
The number of seconds that RooR should attempt to perform answering machine detection before timing out and returning AnsweredBy as unknown. Note: Increasing this value will provide the engine more time to make a determination. This can be useful when DetectMessageEnd is provided in the MachineDetection parameter and there is an expectation of long answering machine greetings that can exceed 30 seconds. Decreasing this value will reduce the amount of time the engine has to make a determination. This can be particularly useful when the Enable option is provided in the MachineDetection parameter and you want to limit the time for initial detection. Valid values: Between 3 and 59 Default value: 30 |
| MachineDetectionSpeechThreshold | No |
The number of milliseconds that is used as the measuring stick for the length of the speech activity. Durations lower than this value will be interpreted as a human, longer as a machine. Note: Increasing this value will reduce the chance of a False Machine (detected machine, actually human) for a long human greeting (e.g., a business greeting) but increase the time it takes to detect a machine. Decreasing this value will reduce the chances of a False Human (detected human, actually machine) for short voicemail greetings. The value of this parameter may need to be reduced by more than 1000ms to detect very short voicemail greetings. A reduction of that significance can result in increased False Machine detections. Adjusting the MachineDetectionSpeechEndThreshold is likely the better approach for short voicemails. Decreasing MachineDetectionSpeechThreshold will also reduce the time it takes to detect a machine. Valid values: Between 1000 and 6000 Default value: 2400 |
| MachineDetectionSpeechEndThreshold | No |
The number of milliseconds of silence after speech activity at which point the speech activity is considered complete. Note: Increasing this value will typically be used to better address the short voicemail greeting scenarios. For short voicemails, there is typically 1000-2000ms of audio followed by 1200-2400ms of silence and then additional audio before the beep. Increasing the MachineDetectionSpeechEndThreshold to ~2500ms will treat the 1200-2400ms of silence as a gap in the greeting but not the end of the greeting and will result in a machine detection. The downsides of such a change include: Increasing the delay for human detection by the amount you increase this parameter, e.g., a change of 1200ms to 2500ms increases human detection delay by 1300ms. Cases where a human has two utterances separated by a period of silence (e.g. a "Hello", then 2000ms of silence, and another "Hello") may be interpreted as a machine. Decreasing this value will result in faster human detection. The consequence is that it can lead to increased False Human (detected human, actually machine) detections because a silence gap in a voicemail greeting (not necessarily just in short voicemail scenarios) can be incorrectly interpreted as the end of speech. Valid values: Between 500 and 5000 Default value: 1200 |
| MachineDetectionSilenceTimeout | No |
The number of milliseconds of initial silence after which an unknown AnsweredBy result will be returned. Note: Increasing this value will result in waiting for a longer period of initial silence before returning an 'unknown' AMD result. Decreasing this value will result in waiting for a shorter period of initial silence before returning an 'unknown' AMD result. Valid values: Between 2000 and 10000 Default value: 5000 |
| Record | No |
Record the call, will send a url to download the recorded audio to the Url provided when the call completes Note: Valid values: True or False Default value: False |
| RecordingStatusCallback | No |
The URL we should call using the RecordingStatusCallbackMethod on each recording Note: Valid values: Absolute Path Default value: |
| RecordingStatusCallbackMethod | No |
The HTTP method we should use to call RecordingStatusCallback Note: Valid values: GET or POST Default value: POST |
curl -X POST 'https://mapi.gynetix.com/prizm/api/sm/calls/makecall.json' -u '{AccountSid}:{AuthToken}' --data-urlencode 'To=+1npanxxnxxx' --data-urlencode 'From=+1[RooRPhoneNumber]' --data-urlencode 'Url=https://...'
{
"RooR":{
"ResponseStatus":1,
"Call":{
"CallSid":"xxxxxxx-xxxx-xx-xxxx",
"DateCreated":"2024-03-14 23:04:58",
"From":"+1npanxxnxxx",
"To":"+1npanxxnxxx",
"Status":"in-queue",
"AccountSid":"{AccountSID}",
"StartTime":"",
"EndTime":"",
"Duration":"0",
"Price":0,
"Direction":"outbound",
"ApiVersion":"sm"
}
}
}
AMD Callback Response:
{
"MachineDetectionDuration" : 20000,
"CallSid": "xxxxx-xxxx-xx-xxxxxx",
"AnsweredBy": "human",
"AccountSid": "{AccountSID}"
}
Rcording Callback Response:
{
"recordstarttime":"2024-03-14 15:01:43",
"recordduration":42,
"recorddirection":"outbound",
"RecordUrl":"https://...mp3",
"RecordingSid":"RDxxx",
"From":"+1npanxxnxxx",
"To":"+1npanxxnxxx",
"CallSid":"xxxxxxx-xxxx-xx-xxxx",
"AccountSid":"{AccountSID}"
}