diff --git a/CHANGELOG.md b/CHANGELOG.md index aefe414..c487bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Change Log +## [7.51.1](https://github.com/plivo/plivo-go/tree/v7.51.1) (2024-09-05) +**Feature - Adding new element for Audio Stream XML ** +- Added `keepCallAlive` element in Audio Stream XML + ## [7.51.0](https://github.com/plivo/plivo-go/tree/v7.51.0) (2024-07-11) **Feature - Adding support for Locale param in Create, Get and List Session** - Added new request param `locale` in create Session API diff --git a/baseclient.go b/baseclient.go index d30cf35..55069d3 100644 --- a/baseclient.go +++ b/baseclient.go @@ -13,7 +13,7 @@ import ( "github.com/google/go-querystring/query" ) -const sdkVersion = "7.51.0" +const sdkVersion = "7.51.1" const lookupBaseUrl = "lookup.plivo.com" diff --git a/xml/plivoxml.go b/xml/plivoxml.go index a9c2c43..0c68697 100644 --- a/xml/plivoxml.go +++ b/xml/plivoxml.go @@ -1406,6 +1406,8 @@ type StreamElement struct { ExtraHeaders *string `xml:"extraHeaders,attr"` + KeepCallAlive *bool `xml:"keepCallAlive,attr"` + XMLName xml.Name `xml:"Stream"` } @@ -1444,6 +1446,11 @@ func (e StreamElement) SetExtraHeaders(value string) StreamElement { return e } +func (e StreamElement) SetKeepCallAlive(value bool) StreamElement { + e.KeepCallAlive = &value + return e +} + func (e StreamElement) SetContents(value string) StreamElement { e.Contents = value return e diff --git a/xml/plivoxml_test.go b/xml/plivoxml_test.go index 965f2cd..38dcd13 100644 --- a/xml/plivoxml_test.go +++ b/xml/plivoxml_test.go @@ -80,9 +80,9 @@ func TestMPCXMLWithHold(t *testing.T) { } func TestStreamXML(t *testing.T) { - assert.Equal(t, "wss://test.url", ResponseElement{ + assert.Equal(t, "wss://test.url", ResponseElement{ Contents: []interface{}{ - new(StreamElement).SetBidirectional(true).SetContents("wss://test.url").SetExtraHeaders("a=1,b=2"), + new(StreamElement).SetBidirectional(true).SetContents("wss://test.url").SetExtraHeaders("a=1,b=2").SetKeepCallAlive(true), }, }.String()) }