SafeDispatch/SipComponent/RTPListenerLinx.cs
2024-02-22 18:43:59 +02:00

30 lines
948 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
namespace SipComponent
{
class RTPListenerLinx : RTPListener2
{
/// <summary>
/// Gets the id of the linx group or returns null if call is private
/// </summary>
public string LinxGroupID { get; private set; }
public RTPListenerLinx(UdpClient udpClient, bool startAliveTimer, int bufferMiliseconds, int sipIDinDialogWith, TypeOfCall typeOfCall, string linxGroupID = null)
:base(udpClient, startAliveTimer, bufferMiliseconds, sipIDinDialogWith, linxGroupID != null, typeOfCall)
{
LinxGroupID = linxGroupID;
}
protected override void OnVoiceReceived(AudioEventArgs e)
{
base.OnVoiceReceived(new LinxAudioEventArgs(e.Buffer, e.CallSourceID, LinxGroupID));
}
}
}