Skip to content

Commit

Permalink
Added dtmfMode in preparation for DTMF-aware conferences
Browse files Browse the repository at this point in the history
  • Loading branch information
bjofra committed Aug 22, 2022
1 parent 0211eb0 commit 56bc61d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/Sinch.ServerSdk/Calling/Callbacks/Request/DtmfMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Sinch.ServerSdk.Calling.Callbacks.Request
{
public enum DtmfMode
{
Ignore,
Forward,
Detect
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Sinch.ServerSdk.Calling.Models;
using Sinch.ServerSdk.Calling.Callbacks.Request;
using Sinch.ServerSdk.Calling.Models;

namespace Sinch.ServerSdk.Calling.Callbacks.Response
{
Expand All @@ -13,5 +14,6 @@ public interface IConnectConferenceSvamletResponse : ISvamletResponse
IConnectConferenceSvamletResponse WithTwoParts();
IConnectConferenceSvamletResponse WithMultiParts();
IConnectConferenceSvamletResponse WithCallTag(CallTag tagType, string value);
IConnectConferenceSvamletResponse WithDtmfMode(DtmfMode mode);
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Sinch.ServerSdk.Calling.Callbacks.Request;
using Sinch.ServerSdk.Calling.Models;

namespace Sinch.ServerSdk.Calling.Callbacks.Response.Internal
Expand Down Expand Up @@ -58,5 +59,11 @@ public IConnectConferenceSvamletResponse WithCallTag(CallTag tagType, string val

return this;
}

public IConnectConferenceSvamletResponse WithDtmfMode(DtmfMode mode)
{
Model.Action.DtmfMode = mode.ToString();
return this;
}
}
}
3 changes: 3 additions & 0 deletions src/Sinch.ServerSdk/Calling/Models/SvamletActionModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@ public class SvamletActionModel

[JsonProperty(PropertyName = "amd", DefaultValueHandling = DefaultValueHandling.Ignore)]
public AmdOptions Amd { get; set; }

[JsonProperty(PropertyName = "dtmfMode", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string DtmfMode { get; set; }
}
}

0 comments on commit 56bc61d

Please sign in to comment.