|
|
@ -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
|
|
|
|
}
|
|
|
|
}
|
|
|
|