From 1196e26457c58a8e94cb5c0b8b7fa7784961de74 Mon Sep 17 00:00:00 2001 From: abinaya-plivo Date: Fri, 13 Sep 2024 10:54:38 +0530 Subject: [PATCH] node sdk changes for machine detection optional params --- CHANGELOG.md | 4 ++++ lib/resources/call.js | 6 ++++++ package.json | 2 +- types/resources/call.d.ts | 6 ++++++ types/rest/client.d.ts | 2 +- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b14cbef8..c666e2ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/resources/call.js b/lib/resources/call.js index 9fa9d125..0363a6dc 100644 --- a/lib/resources/call.js +++ b/lib/resources/call.js @@ -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. diff --git a/package.json b/package.json index 74d27f92..cc7ad226 100644 --- a/package.json +++ b/package.json @@ -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": [ diff --git a/types/resources/call.d.ts b/types/resources/call.d.ts index 0e2dc0ff..933cd765 100644 --- a/types/resources/call.d.ts +++ b/types/resources/call.d.ts @@ -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. diff --git a/types/rest/client.d.ts b/types/rest/client.d.ts index c77e2bb4..220bd03b 100644 --- a/types/rest/client.d.ts +++ b/types/rest/client.d.ts @@ -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"; \ No newline at end of file