From dad1d1a3d484532b2f303cb3bf9a6068aef4092b Mon Sep 17 00:00:00 2001 From: "revanth.p" Date: Mon, 27 Jul 2026 17:46:24 +0530 Subject: [PATCH 1/2] feat: add internal flag to Endpoint create params (VT-9534) Adds an optional `isInternal` (bool?) parameter to `EndpointInterface.Create` and `CreateAsync` so callers can mark newly created SIP endpoints as internal at creation time. C# reserved-keyword workaround: `internal` is a C# keyword and cannot be used as a parameter identifier, so the SDK-facing parameter is named `isInternal`. The value is added directly to the outgoing request dictionary with the wire key `internal` (lowercase), matching the Trace backend contract - bypassing the anonymous-object -> snake_case conversion in CreateData that would otherwise produce `is_internal`. Backwards-compatible: when `isInternal` is null (the default), the key is omitted from the request body entirely - every existing caller sees identical wire behavior. Only callers that explicitly pass `isInternal: true` opt in. Unblocks Plivo CX (Contacto) tagging auto-created browser-SDK endpoints so they stop leaking into customer consoles (Pylon #2460). Co-Authored-By: Claude Opus 4.7 (1M context) --- src/Plivo/Resource/Endpoint/EndpointInterface.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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; From 9fc31392baab8c743c2ce0eee97dd0d6661ca5c7 Mon Sep 17 00:00:00 2001 From: "revanth.p" Date: Mon, 27 Jul 2026 17:47:25 +0530 Subject: [PATCH 2/2] chore: bump version to 5.52.4 and update changelog --- CHANGELOG.md | 5 +++++ src/Plivo/Plivo.csproj | 2 +- src/Plivo/Plivo.nuspec | 2 +- version.json | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) 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/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+)?$"