mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
feat: update Dial method to limit active calls based on maxCalls
This commit is contained in:
parent
0098673a5e
commit
cff46532be
1 changed files with 3 additions and 1 deletions
|
|
@ -15,6 +15,8 @@ public class MockAC : AudioCodecBase, IAudioCodecPhonebook
|
||||||
|
|
||||||
public List<CodecPhonebookEntry> PhonebookEntries { get; }
|
public List<CodecPhonebookEntry> PhonebookEntries { get; }
|
||||||
|
|
||||||
|
private int maxCalls = 2;
|
||||||
|
|
||||||
public MockAC(string key, string name, MockAcPropertiesConfig props)
|
public MockAC(string key, string name, MockAcPropertiesConfig props)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
|
|
@ -40,7 +42,7 @@ public class MockAC : AudioCodecBase, IAudioCodecPhonebook
|
||||||
|
|
||||||
public override void Dial(string number)
|
public override void Dial(string number)
|
||||||
{
|
{
|
||||||
if (!IsInCall)
|
if (ActiveCalls.Count < maxCalls)
|
||||||
{
|
{
|
||||||
Debug.LogMessage(LogEventLevel.Debug, this, "Dial: {0}", number);
|
Debug.LogMessage(LogEventLevel.Debug, this, "Dial: {0}", number);
|
||||||
var call = new CodecActiveCallItem()
|
var call = new CodecActiveCallItem()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue