From a9497d09cf0bc6405ace7bfec57eff69cbfe3367 Mon Sep 17 00:00:00 2001 From: cheetah Date: Wed, 13 Sep 2023 21:17:15 +0000 Subject: [PATCH] added random potrs --- common/rtpenums.go | 16 ++++++++-------- common/terminalClient.go | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/common/rtpenums.go b/common/rtpenums.go index 01ee429..b1b736d 100644 --- a/common/rtpenums.go +++ b/common/rtpenums.go @@ -3,14 +3,14 @@ package common type TetraFlexCMoIPPayload byte const ( - TetraFlexCMoIPPayload_None TetraFlexCMoIPPayload = 0 - TetraFlexCMoIPPayload_Tetra_STCH_U TetraFlexCMoIPPayload = 1 - TetraFlexCMoIPPayload_Tetra_TCH_S TetraFlexCMoIPPayload = 2 - TetraFlexCMoIPPayload_Tetra_TCH_7_2 TetraFlexCMoIPPayload = 3 - TetraFlexCMoIPPayload_Tetra_TCH_4_8 TetraFlexCMoIPPayload = 4 - TetraFlexCMoIPPayload_Tetra_TCH_2_4 TetraFlexCMoIPPayload = 5 - TetraFlexCMoIPPayload_aLaw TetraFlexCMoIPPayload = 7 - TetraFlexCMoIPPayload_uLaw TetraFlexCMoIPPayload = 8 + TetraFlexCMoIPPayload_None TetraFlexCMoIPPayload = 0 // 0 Byte payload + TetraFlexCMoIPPayload_Tetra_STCH_U TetraFlexCMoIPPayload = 1 // 16 Bytes + TetraFlexCMoIPPayload_Tetra_TCH_S TetraFlexCMoIPPayload = 2 // 18 Bytes + TetraFlexCMoIPPayload_Tetra_TCH_7_2 TetraFlexCMoIPPayload = 3 // 27 Bytes + TetraFlexCMoIPPayload_Tetra_TCH_4_8 TetraFlexCMoIPPayload = 4 // 18 Bytes + TetraFlexCMoIPPayload_Tetra_TCH_2_4 TetraFlexCMoIPPayload = 5 // 9 Bytes + TetraFlexCMoIPPayload_aLaw TetraFlexCMoIPPayload = 7 // 480 Bytes + TetraFlexCMoIPPayload_uLaw TetraFlexCMoIPPayload = 8 // 480 Bytes ) type TetraFlexRTPPayload byte diff --git a/common/terminalClient.go b/common/terminalClient.go index a424b78..8f65f50 100644 --- a/common/terminalClient.go +++ b/common/terminalClient.go @@ -251,13 +251,13 @@ func (tc *TerminalClient) PTTRelease(callRef byte) (err error) { func (tc *TerminalClient) RTPConnect() (err error) { portNum := tc.RegistrationInfo.RTPPorts[0] - localAddress, _ := net.ResolveUDPAddr("udp", fmt.Sprintf("0.0.0.0:%d", portNum)) + //localAddress, _ := net.ResolveUDPAddr("udp", "0.0.0.0") parts := strings.Split(tc.address, ":") remoteTXAddr := fmt.Sprintf("%s:%d", parts[0], portNum) remoteAddress, _ := net.ResolveUDPAddr("udp", remoteTXAddr) - tc.udpRTP_TX, err = net.DialUDP("udp", localAddress, remoteAddress) + tc.udpRTP_TX, err = net.DialUDP("udp", nil, remoteAddress) if err != nil { return err }