added random potrs

master
cheetah 1 year ago
parent f055ec97e2
commit a9497d09cf

@ -3,14 +3,14 @@ package common
type TetraFlexCMoIPPayload byte type TetraFlexCMoIPPayload byte
const ( const (
TetraFlexCMoIPPayload_None TetraFlexCMoIPPayload = 0 TetraFlexCMoIPPayload_None TetraFlexCMoIPPayload = 0 // 0 Byte payload
TetraFlexCMoIPPayload_Tetra_STCH_U TetraFlexCMoIPPayload = 1 TetraFlexCMoIPPayload_Tetra_STCH_U TetraFlexCMoIPPayload = 1 // 16 Bytes
TetraFlexCMoIPPayload_Tetra_TCH_S TetraFlexCMoIPPayload = 2 TetraFlexCMoIPPayload_Tetra_TCH_S TetraFlexCMoIPPayload = 2 // 18 Bytes
TetraFlexCMoIPPayload_Tetra_TCH_7_2 TetraFlexCMoIPPayload = 3 TetraFlexCMoIPPayload_Tetra_TCH_7_2 TetraFlexCMoIPPayload = 3 // 27 Bytes
TetraFlexCMoIPPayload_Tetra_TCH_4_8 TetraFlexCMoIPPayload = 4 TetraFlexCMoIPPayload_Tetra_TCH_4_8 TetraFlexCMoIPPayload = 4 // 18 Bytes
TetraFlexCMoIPPayload_Tetra_TCH_2_4 TetraFlexCMoIPPayload = 5 TetraFlexCMoIPPayload_Tetra_TCH_2_4 TetraFlexCMoIPPayload = 5 // 9 Bytes
TetraFlexCMoIPPayload_aLaw TetraFlexCMoIPPayload = 7 TetraFlexCMoIPPayload_aLaw TetraFlexCMoIPPayload = 7 // 480 Bytes
TetraFlexCMoIPPayload_uLaw TetraFlexCMoIPPayload = 8 TetraFlexCMoIPPayload_uLaw TetraFlexCMoIPPayload = 8 // 480 Bytes
) )
type TetraFlexRTPPayload byte type TetraFlexRTPPayload byte

@ -251,13 +251,13 @@ func (tc *TerminalClient) PTTRelease(callRef byte) (err error) {
func (tc *TerminalClient) RTPConnect() (err error) { func (tc *TerminalClient) RTPConnect() (err error) {
portNum := tc.RegistrationInfo.RTPPorts[0] 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, ":") parts := strings.Split(tc.address, ":")
remoteTXAddr := fmt.Sprintf("%s:%d", parts[0], portNum) remoteTXAddr := fmt.Sprintf("%s:%d", parts[0], portNum)
remoteAddress, _ := net.ResolveUDPAddr("udp", remoteTXAddr) 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 { if err != nil {
return err return err
} }

Loading…
Cancel
Save