Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node sdk changes for machine detection optional params #343

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Change Log
## [v4.70.0](https://github.com/plivo/plivo-node/tree/v4.70.0) (2024-11-06)
**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.69.2](https://github.com/plivo/plivo-node/tree/v4.69.2) (2024-10-23)
**Feature - FraudCheck param in Create, Get and List Session**
- Support for the `fraud_check` parameter in sms verify session request
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.69.2",
"version": "4.70.0",
"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
3 changes: 1 addition & 2 deletions types/rest/client.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,4 @@ import { LOAInterface } from "../resources/loa";
import { HostedMessagingNumberInterface } from "../resources/hostedMessagingNumber";
import { MaskingSessionInterface } from "../resources/maskingSession.js";
import { TollfreeVerificationInterface } from "../resources/tollfree_verification.js";
import { VerifyInterface } from "../resources/verifyCallerId.js";

import { VerifyInterface } from "../resources/verifyCallerId.js";
Loading