-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathParkingLotList.cs
31 lines (29 loc) · 918 Bytes
/
ParkingLotList.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FreeSWITCH.Managed.ParkingLot
{
public class ParkingLotList : IApiPlugin
{
public void Execute(ApiContext context)
{
context.Stream.Write("List of Parked Extensions:" + Environment.NewLine);
if (ParkingLot.ParkedCalls.Count == 0)
{
context.Stream.Write("No calls parked." + Environment.NewLine);
}
else
{
foreach (string key in ParkingLot.ParkedCalls.Keys)
{
context.Stream.Write(string.Format("{0}: {1}{2}", key, ParkingLot.ParkedCalls[key], Environment.NewLine));
}
}
}
public void ExecuteBackground(ApiBackgroundContext context)
{
throw new NotImplementedException();
}
}
}