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

GO SDK changes to add new optional parameters #216

Open
wants to merge 3 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
## [7.51.4](https://github.com/plivo/plivo-go/tree/v7.51.4) (2024-09-10)
**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`

## [7.51.3](https://github.com/plivo/plivo-go/tree/v7.53.0) (2024-09-06)
**Feature - Adding support for Locale param in Create, Get and List Session**
- Enhance message object
Expand Down
2 changes: 1 addition & 1 deletion baseclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"encoding/json"
"errors"
"fmt"
"io/ioutil"

Check failure on line 8 in baseclient.go

View workflow job for this annotation

GitHub Actions / lint

SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package [io] or package [os], and those implementations should be preferred in new code. See the specific function documentation for details. (staticcheck)
"net/http"
"net/url"
"reflect"
Expand All @@ -13,7 +13,7 @@
"github.com/google/go-querystring/query"
)

const sdkVersion = "7.51.3"
const sdkVersion = "7.51.4"

const lookupBaseUrl = "lookup.plivo.com"

Expand Down
42 changes: 24 additions & 18 deletions calls.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,24 +79,30 @@ type CallCreateParams struct {
To string `json:"to,omitempty" url:"to,omitempty"`
AnswerURL string `json:"answer_url,omitempty" url:"answer_url,omitempty"`
// Optional parameters.
AnswerMethod string `json:"answer_method,omitempty" url:"answer_method,omitempty"`
RingURL string `json:"ring_url,omitempty" url:"ring_url,omitempty"`
RingMethod string `json:"ring_method,omitempty" url:"ring_method,omitempty"`
HangupURL string `json:"hangup_url,omitempty" url:"hangup_url,omitempty"`
HangupMethod string `json:"hangup_method,omitempty" url:"hangup_method,omitempty"`
FallbackURL string `json:"fallback_url,omitempty" url:"fallback_url,omitempty"`
FallbackMethod string `json:"fallback_method,omitempty" url:"fallback_method,omitempty"`
CallerName string `json:"caller_name,omitempty" url:"caller_name,omitempty"`
SendDigits string `json:"send_digits,omitempty" url:"send_digits,omitempty"`
SendOnPreanswer bool `json:"send_on_preanswer,omitempty" url:"send_on_preanswer,omitempty"`
TimeLimit int64 `json:"time_limit,omitempty" url:"time_limit,omitempty"`
HangupOnRing int64 `json:"hangup_on_ring,omitempty" url:"hangup_on_ring,omitempty"`
MachineDetection string `json:"machine_detection,omitempty" url:"machine_detection,omitempty"`
MachineDetectionTime int64 `json:"machine_detection_time,omitempty" url:"machine_detection_time,omitempty"`
MachineDetectionUrl string `json:"machine_detection_url,omitempty" url:"machine_detection_url,omitempty"`
MachineDetectionMethod string `json:"machine_detection_method,omitempty" url:"machine_detection_method,omitempty"`
SipHeaders string `json:"sip_headers,omitempty" url:"sip_headers,omitempty"`
RingTimeout int64 `json:"ring_timeout,omitempty" url:"ring_timeout,omitempty"`
AnswerMethod string `json:"answer_method,omitempty" url:"answer_method,omitempty"`
RingURL string `json:"ring_url,omitempty" url:"ring_url,omitempty"`
RingMethod string `json:"ring_method,omitempty" url:"ring_method,omitempty"`
HangupURL string `json:"hangup_url,omitempty" url:"hangup_url,omitempty"`
HangupMethod string `json:"hangup_method,omitempty" url:"hangup_method,omitempty"`
FallbackURL string `json:"fallback_url,omitempty" url:"fallback_url,omitempty"`
FallbackMethod string `json:"fallback_method,omitempty" url:"fallback_method,omitempty"`
CallerName string `json:"caller_name,omitempty" url:"caller_name,omitempty"`
SendDigits string `json:"send_digits,omitempty" url:"send_digits,omitempty"`
SendOnPreanswer bool `json:"send_on_preanswer,omitempty" url:"send_on_preanswer,omitempty"`
TimeLimit int64 `json:"time_limit,omitempty" url:"time_limit,omitempty"`
HangupOnRing int64 `json:"hangup_on_ring,omitempty" url:"hangup_on_ring,omitempty"`
MachineDetection string `json:"machine_detection,omitempty" url:"machine_detection,omitempty"`
MachineDetectionTime int64 `json:"machine_detection_time,omitempty" url:"machine_detection_time,omitempty"`
MachineDetectionUrl string `json:"machine_detection_url,omitempty" url:"machine_detection_url,omitempty"`
MachineDetectionMethod string `json:"machine_detection_method,omitempty" url:"machine_detection_method,omitempty"`
MachineDetectionMaximumSpeechLength int64 `json:"machine_detection_maximum_speech_length,omitempty" url:"machine_detection_maximum_speech_length"`
MachineDetectionInitialSilence int64 `json:"machine_detection_initial_silence,omitempty" url:"machine_detection_initial_silence"`
MachineDetectionMaximumWords int64 `json:"machine_detection_maximum_words,omitempty" url:"machine_detection_maximum_words"`
MachineDetectionInitialGreeting int64 `json:"machine_detection_initial_greeting,omitempty" url:"machine_detection_initial_greeting"`
MachineDetectionSilence int64 `json:"machine_detection_silence,omitempty" url:"machine_detection_silence"`
MachineDetectionAnswerTime int64 `json:"machine_detection_answer_time,omitempty" url:"machine_detection_answer_time"`
SipHeaders string `json:"sip_headers,omitempty" url:"sip_headers,omitempty"`
RingTimeout int64 `json:"ring_timeout,omitempty" url:"ring_timeout,omitempty"`
}

// Stores response for making a call.
Expand Down
Loading