SafeDispatch/SipComponent/RTPListenerLinx.cs

30 lines
948 B
C#
Raw Permalink Normal View History

2024-02-22 16:43:59 +00:00
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));
}
}
}