Skip to content

Commit

Permalink
Merge pull request #287 from plivo/VT-8038
Browse files Browse the repository at this point in the history
VT-8038: SDK changes for stream xml element keepCallAlive
  • Loading branch information
manjunath-plivo authored Sep 3, 2024
2 parents 2778584 + c33de49 commit 3b0cacb
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 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

## [5.47.4](https://github.com/plivo/plivo-dotnet/tree/v5.47.4) (2024-09-03)
**Feature - Adding new element for Audio Stream XML **
- Added `keepCallAlive` element in Audio Stream XML

## [5.47.3](https://github.com/plivo/plivo-dotnet/tree/v5.47.3) (2024-07-09)
**Feature - Adding support for Locale param in Get and List Session**
- Support for param `locale` in get and list Session API Response
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ You can install this SDK either by referencing the .dll file or using NuGet.
Use the following line to install the latest SDK using the NuGet CLI.

```
PM> Install-Package Plivo -Version 5.47.3
PM> Install-Package Plivo -Version 5.47.4
```

You can also use the .NET CLI to install this package as follows

```
> dotnet add package Plivo --version 5.47.3
> dotnet add package Plivo --version 5.47.4
```

## Getting started
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Plivo.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard1.3</TargetFrameworks>
<ReleaseVersion>5.47.3</ReleaseVersion>
<ReleaseVersion>5.47.4</ReleaseVersion>
<Version />
<Authors>Plivo SDKs Team</Authors>
<Owners>Plivo Inc.</Owners>
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Plivo.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<summary>A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML</summary>
<description>A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML</description>
<id>Plivo</id>
<version>5.47.3</version>
<version>5.47.4</version>
<title>Plivo</title>
<authors>Plivo SDKs Team</authors>
<owners>Plivo, Inc.</owners>
Expand Down
2 changes: 1 addition & 1 deletion src/Plivo/Version.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class Version
/// <summary>
/// DotNet SDK version
/// </summary>
public const string SdkVersion = "5.47.3";
public const string SdkVersion = "5.47.4";
/// <summary>
/// Plivo API version
/// </summary>
Expand Down
3 changes: 2 additions & 1 deletion src/Plivo/XML/Stream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public Stream(string body, dict attributes)
"statusCallbackUrl",
"statusCallbackMethod",
"contentType",
"extraHeaders"
"extraHeaders",
"keepCallAlive"
};

if (body == null)
Expand Down
5 changes: 3 additions & 2 deletions tests_netcore/Plivo.NetCore.Test/XML/TestXML.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,14 @@ public void TestAllXml()

resp.AddStream("Hello, This is stream", new Dictionary<string, string>()
{
{"bidirectional", "true"}
{"bidirectional", "true"},
{"keepCallAlive", "true"}
});
var output = resp.ToString();
// Console.WriteLine(output);
Assert.Equal(
"<Response>\n <Conference callbackUrl=\"http://foo.com/confevents/\" callbackMethod=\"POST\" digitsMatch=\"#0,99,000\">My room</Conference>\n <Dial confirmSound=\"http://foo.com/sound/\" confirmKey=\"3\">\n <Number sendDigits=\"wwww2410\">18217654321</Number>\n <User sendDigits=\"wwww2410\">sip:[email protected]</User>\n </Dial>\n <Dial timeout=\"20\" action=\"http://foo.com/dial_action/\">\n <Number>18217654321</Number>\n </Dial>\n <Dial>\n <Number>15671234567</Number>\n </Dial>\n <DTMF>12345</DTMF>\n <GetDigits action=\"http://www.foo.com/gather_pin/\" method=\"POST\">\n <Speak>Enter PIN number.</Speak>\n </GetDigits>\n <Speak>Input not recieved.</Speak>\n <GetInput action=\"http://www.foo.com/gather_feedback/\" method=\"POST\">\n <Speak>Tell us more about your experience.</Speak>\n </GetInput>\n <Speak>Statement not recieved.</Speak>\n <Hangup schedule=\"60\" reason=\"rejected\" />\n <Speak loop=\"0\">Call will hangup after a min.</Speak>\n <Message src=\"12023222222\" dst=\"15671234567\" type=\"sms\" callbackUrl=\"http://foo.com/sms_status/\" callbackMethod=\"POST\">Hi, message from Plivo.</Message>\n <Play>https://amazonaws.com/Trumpet.mp3</Play>\n <PreAnswer>\n <Speak>This call will cost $2 a min.</Speak>\n </PreAnswer>\n <Speak>Thanks for dropping by.</Speak>\n <Record action=\"http://foo.com/get_recording/\" startOnDialAnswer=\"true\" redirect=\"false\" />\n <Dial>\n <Number>15551234567</Number>\n </Dial>\n <Speak>Leave message after the beep.</Speak>\n <Record action=\"http://foo.com/get_recording/\" maxLength=\"30\" finishOnKey=\"*\" />\n <Speak>Recording not received.</Speak>\n <Speak>Your call is being transferred.</Speak>\n <Redirect>http://foo.com/redirect/</Redirect>\n <Speak loop=\"3\">Go green, go plivo.</Speak>\n <Speak>I will wait 7 seconds starting now!</Speak>\n <Wait length=\"7\" />\n <Speak>I just waited 7 seconds.</Speak>\n <Wait length=\"120\" beep=\"true\" />\n <Play>https://s3.amazonaws.com/abc.mp3</Play>\n <Wait length=\"10\" />\n <Speak>Hello</Speak>\n <Wait length=\"10\" silence=\"true\" minSilence=\"3000\" />\n <Speak>Hello, welcome to the Jungle.</Speak>\n" +
" <MultiPartyCall role=\"Agent\" maxDuration=\"1000\" statusCallbackEvents=\"participant-speak-events, participant-digit-input-events, add-participant-api-events, participant-state-changes, mpc-state-changes\" maxParticipants=\"10\" recordMinMemberCount=\"1\" waitMusicMethod=\"GET\" agentHoldMusicMethod=\"GET\" customerHoldMusicMethod=\"GET\" record=\"false\" recordFileFormat=\"mp3\" recordingCallbackMethod=\"GET\" statusCallbackMethod=\"POST\" stayAlone=\"false\" coachMode=\"true\" mute=\"false\" hold=\"false\" startMpcOnEnter=\"true\" endMpcOnExit=\"false\" enterSound=\"beep:1\" enterSoundMethod=\"GET\" exitSound=\"beep:2\" exitSoundMethod=\"GET\" onExitActionMethod=\"POST\" relayDTMFInputs=\"false\" startRecordingAudioMethod=\"GET\" stopRecordingAudioMethod=\"GET\">Nairobi</MultiPartyCall>\n <Stream bidirectional=\"true\">Hello, This is stream</Stream>\n</Response>",
" <MultiPartyCall role=\"Agent\" maxDuration=\"1000\" statusCallbackEvents=\"participant-speak-events, participant-digit-input-events, add-participant-api-events, participant-state-changes, mpc-state-changes\" maxParticipants=\"10\" recordMinMemberCount=\"1\" waitMusicMethod=\"GET\" agentHoldMusicMethod=\"GET\" customerHoldMusicMethod=\"GET\" record=\"false\" recordFileFormat=\"mp3\" recordingCallbackMethod=\"GET\" statusCallbackMethod=\"POST\" stayAlone=\"false\" coachMode=\"true\" mute=\"false\" hold=\"false\" startMpcOnEnter=\"true\" endMpcOnExit=\"false\" enterSound=\"beep:1\" enterSoundMethod=\"GET\" exitSound=\"beep:2\" exitSoundMethod=\"GET\" onExitActionMethod=\"POST\" relayDTMFInputs=\"false\" startRecordingAudioMethod=\"GET\" stopRecordingAudioMethod=\"GET\">Nairobi</MultiPartyCall>\n <Stream bidirectional=\"true\" keepCallAlive=\"true\">Hello, This is stream</Stream>\n</Response>",
output.Replace(Environment.NewLine, "\n"));
}
}
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "5.47.3",
"version": "5.47.4",
"publicReleaseRefSpec": [
"^refs/heads/master$",
"^refs/heads/v\\d+(?:\\.\\d+)?$"
Expand Down

0 comments on commit 3b0cacb

Please sign in to comment.