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

27 lines
945 B
C#

using System.Net.Sockets;
namespace SipComponent
{
class RTPListenerSimoco : RTPListener2
{
public RTPListenerSimoco(UdpClient udpClient, bool startAliveTimer, int bufferMiliseconds, int sipIDinDialogWith, bool isGroupCall, TypeOfCall typeOfCall) :
base(udpClient, startAliveTimer, bufferMiliseconds, sipIDinDialogWith, isGroupCall, typeOfCall)
{
}
protected override void HandlePTTStart(byte[] buffer, PTT_Type pttType, long radioID, byte TSN)
{
// Simoco does not send PTT request
// Must do here what I do on PTT request handling
if (_receivedTsnInfo.TSN != TSN) // He have received a start request with a new TSN
{
_receivedTsnInfo = new TSNinfo(TSN);
_receivedTsnInfo.Status = TSNstatus.Granted;
}
base.HandlePTTStart(buffer, pttType, radioID, TSN);
}
}
}