Skip to content

Commit

Permalink
node sdk changes for machine detection optional params
Browse files Browse the repository at this point in the history
  • Loading branch information
Abinaya-Shunmugavel committed Sep 13, 2024
1 parent a26250c commit 1196e26
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [v4.68.4](https://github.com/plivo/plivo-node/tree/v4.68.4) (2024-09-13)
**Feature - Adding few optional parameters to the existing machine detection params**
- Added six new optional machine detection params `machine_detection_maximum_speech_length`,`machine_detection_initial_silence`,`machine_detection_maximum_words`,`machine_detection_initial_greeting`,`machine_detection_silence`,`machine_detection_answer_time`

## [v4.68.3](https://github.com/plivo/plivo-node/tree/v4.68.3) (2024-09-06)
**Feature - Adding more attribute on mdr object**
- Added `message_sent_time`, `message_updated_time` and `error-message` on get and list Message API
Expand Down
6 changes: 6 additions & 0 deletions lib/resources/call.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,12 @@ export class CallInterface extends PlivoResourceInterface {
* @param {number} [params.machineDetectionTime] Time allotted to analyze if the call has been answered by a machine. It should be an integer >= 2000 and <= 10000 and the unit is ms. The default value is 5000 ms.
* @param {string} [params.machineDetectionUrl] A URL where machine detection parameters will be sent by Plivo. This parameter should be used to make machine detection asynchronous
* @param {string} [params.machineDetectionMethod] The HTTP method which will be used by Plivo to request the machine_detection_url. Defaults to POST.
* @param {number} [params.machineDetectionMaximumSpeechLength] Time in milliseconds used to measure the length of speech activity.. It should be an integer >= 1000 and <= 6000 and the unit is ms. The default value is 5000 ms.
* @param {number} [params.machineDetectionInitialSilence] The duration of initial silence when the call is answered. It should be an integer >= 2000 and <= 10000 and the unit is ms. The default value is 4500 ms.
* @param {number} [params.machineDetectionMaximumWords] The maximum number of sentences detected.. It should be an integer >= 2 and <= 10. The default value is 3.
* @param {number} [params.machineDetectionInitialGreeting] Indicates the maximum length of the initial greeting in milliseconds. It should be an integer >= 1000 and <= 5000 and the unit is ms. The default value is 1500 ms.
* @param {number} [params.machineDetectionSilence] The silence after the initial greeting, expressed in milliseconds. It should be an integer >= 500 and <= 5000 and the unit is ms. The default value is 800 ms.
* @param {number} [params.machineDetectionAnswerTime] Time within which if the call is answered then the call has been considered as answered by a machine. It should be an integer >= 100 and <= 45000 and the unit is ms. The default value is 45000 ms.
* @param {string} [params.sipHeaders] List of SIP headers in the form of 'key=value' pairs, separated by commas.
* @param {number} [params.ringTimeout] Determines the time in seconds the call should ring. If the call is not answered within the ring_timeout value or the default value of 120s, it is canceled.
* @param {string} [params.parentCallUuid] The call_uuid of the first leg in an ongoing conference call. It is recommended to use this parameter in scenarios where a member who is already present in the conference intends to add new members by initiating outbound API calls.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plivo",
"version": "4.68.3",
"version": "4.68.4",
"description": "A Node.js SDK to make voice calls and send SMS using Plivo and to generate Plivo XML",
"homepage": "https://github.com/plivo/plivo-node",
"files": [
Expand Down
6 changes: 6 additions & 0 deletions types/resources/call.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ export class CallInterface extends PlivoResourceInterface {
* @param {number} [params.machineDetectionTime] Time allotted to analyze if the call has been answered by a machine. It should be an integer >= 2000 and <= 10000 and the unit is ms. The default value is 5000 ms.
* @param {string} [params.machineDetectionUrl] A URL where machine detection parameters will be sent by Plivo. This parameter should be used to make machine detection asynchronous
* @param {string} [params.machineDetectionMethod] The HTTP method which will be used by Plivo to request the machine_detection_url. Defaults to POST.
* @param {number} [params.machineDetectionMaximumSpeechLength] Time in milliseconds used to measure the length of speech activity.. It should be an integer >= 1000 and <= 6000 and the unit is ms. The default value is 5000 ms.
* @param {number} [params.machineDetectionInitialSilence] The duration of initial silence when the call is answered. It should be an integer >= 2000 and <= 10000 and the unit is ms. The default value is 4500 ms.
* @param {number} [params.machineDetectionMaximumWords] The maximum number of sentences detected.. It should be an integer >= 2 and <= 10. The default value is 3.
* @param {number} [params.machineDetectionInitialGreeting] Indicates the maximum length of the initial greeting in milliseconds. It should be an integer >= 1000 and <= 5000 and the unit is ms. The default value is 1500 ms.
* @param {number} [params.machineDetectionSilence] The silence after the initial greeting, expressed in milliseconds. It should be an integer >= 500 and <= 5000 and the unit is ms. The default value is 800 ms.
* @param {number} [params.machineDetectionAnswerTime] Time within which if the call is answered then the call has been considered as answered by a machine. It should be an integer >= 100 and <= 45000 and the unit is ms. The default value is 45000 ms.
* @param {string} [params.sipHeaders] List of SIP headers in the form of 'key=value' pairs, separated by commas.
* @param {number} [params.ringTimeout] Determines the time in seconds the call should ring. If the call is not answered within the ring_timeout value or the default value of 120s, it is canceled.
* @param {string} [params.parentCallUuid] The call_uuid of the first leg in an ongoing conference call. It is recommended to use this parameter in scenarios where a member who is already present in the conference intends to add new members by initiating outbound API calls.
Expand Down
2 changes: 1 addition & 1 deletion types/rest/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ import { HostedMessagingNumberInterface } from "../resources/hostedMessagingNumb
import { MaskingSessionInterface } from "../resources/maskingSession.js";
import { TollfreeVerificationInterface } from "../resources/tollfree_verification.js";
import { VerifyInterface } from "../resources/verifyCallerId.js";

import { VerifyCallerIdInterface } from "../resources/verifyCallerId.js";

0 comments on commit 1196e26

Please sign in to comment.