diff --git a/CHANGELOG.md b/CHANGELOG.md index 895b8a95..39779d5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Change Log +## [5.52.4](https://github.com/plivo/plivo-dotnet/tree/v5.52.4) (2026-07-27) +**Feature - Endpoint internal flag support** +- Added optional `isInternal` (bool?) parameter to Endpoint `Create` and `CreateAsync` methods, sent as `internal` on the wire, to mark newly created SIP endpoints as internal at creation time +- C# reserved-keyword workaround: parameter is named `isInternal` because `internal` is a C# keyword; the outgoing JSON key is still `internal` + ## [5.52.2](https://github.com/plivo/plivo-dotnet/tree/v5.52.2) (2026-06-11) **Feature - PhoneNumber Buy compliance application support** - Added optional `complianceApplicationId` parameter to PhoneNumber `Buy` and `BuyAsync` methods, sent as `compliance_application_id`, to link a regulatory compliance application at purchase time for regulated numbers diff --git a/src/Plivo/Plivo.csproj b/src/Plivo/Plivo.csproj index d4272717..51a4fd7c 100644 --- a/src/Plivo/Plivo.csproj +++ b/src/Plivo/Plivo.csproj @@ -1,7 +1,7 @@ netstandard2.0;netstandard1.3 - 5.52.2 + 5.52.4 Plivo SDKs Team Plivo Inc. diff --git a/src/Plivo/Plivo.nuspec b/src/Plivo/Plivo.nuspec index 7b34b717..d01e280e 100644 --- a/src/Plivo/Plivo.nuspec +++ b/src/Plivo/Plivo.nuspec @@ -4,7 +4,7 @@ A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML A .NET SDK to make voice calls and send SMS using Plivo and to generate Plivo XML Plivo - 5.52.2 + 5.52.4 Plivo Plivo SDKs Team Plivo, Inc. diff --git a/src/Plivo/Resource/Endpoint/EndpointInterface.cs b/src/Plivo/Resource/Endpoint/EndpointInterface.cs index 8c0117e4..4ec570b9 100755 --- a/src/Plivo/Resource/Endpoint/EndpointInterface.cs +++ b/src/Plivo/Resource/Endpoint/EndpointInterface.cs @@ -32,8 +32,10 @@ public EndpointInterface(HttpClient client) : base(client) /// Password. /// Alias. /// App identifier. + /// Optional flag to mark the endpoint as internal. Serialized as internal on the wire (the C# keyword internal cannot be used as a parameter name). public EndpointCreateResponse Create( - string username, string password, string alias, string appId = null) + string username, string password, string alias, string appId = null, + bool? isInternal = null) { var mandatoryParams = new List { "" }; bool isVoiceRequest = true; @@ -47,6 +49,9 @@ public EndpointCreateResponse Create( appId, isVoiceRequest }); + if (isInternal.HasValue) { + data["internal"] = isInternal.Value; + } return ExecuteWithExceptionUnwrap(() => { @@ -66,9 +71,11 @@ public EndpointCreateResponse Create( /// App identifier. /// Callback URL. /// Callback Method. + /// Optional flag to mark the endpoint as internal. Serialized as internal on the wire (the C# keyword internal cannot be used as a parameter name). public async Task CreateAsync( string username, string password, string alias, string appId = null, - string callbackUrl = null, string callbackMethod = null) + string callbackUrl = null, string callbackMethod = null, + bool? isInternal = null) { MpcUtils.ValidUrl("callbackUrl", callbackUrl, true); var mandatoryParams = new List { "" }; @@ -88,6 +95,9 @@ public async Task CreateAsync( if (data.ContainsKey("callback_method") && callbackMethod == null) { data.Remove("callback_method"); } + if (isInternal.HasValue) { + data["internal"] = isInternal.Value; + } var result = Task.Run(async () => await Client.Update(Uri, data).ConfigureAwait(false)).Result; await Task.WhenAll(); result.Object.StatusCode = result.StatusCode; diff --git a/version.json b/version.json index 8b3cda3b..8c0c1972 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "5.52.2", + "version": "5.52.4", "publicReleaseRefSpec": [ "^refs/heads/master$", "^refs/heads/v\\d+(?:\\.\\d+)?$"