From 2b19b27f53e711d42c6037d0f66447f105435ef5 Mon Sep 17 00:00:00 2001 From: f1shs Date: Sat, 25 Dec 2021 13:53:25 +0100 Subject: [PATCH 01/11] Update P25Hosts.txt --- P25Gateway/P25Hosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/P25Gateway/P25Hosts.txt b/P25Gateway/P25Hosts.txt index 8ec1849..215e8bb 100644 --- a/P25Gateway/P25Hosts.txt +++ b/P25Gateway/P25Hosts.txt @@ -255,6 +255,9 @@ # 10473 LinAn, China, Fireside Chat Reflector 10473 p25.hamdao.com 41000 +# 10666 F5KFF P25 Net in Paris +10666 f5kff.hd.free.fr 41000 + # 10700 Australia NSW Bridge to AU NSW YSF 10700 p25nsw.gustotech.net 41000 From f692301cf687dde82c14d17ff12cc7887577a855 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 29 Dec 2021 19:51:32 +0000 Subject: [PATCH 02/11] Update P25Hosts.txt --- P25Gateway/P25Hosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/P25Gateway/P25Hosts.txt b/P25Gateway/P25Hosts.txt index 215e8bb..d027585 100644 --- a/P25Gateway/P25Hosts.txt +++ b/P25Gateway/P25Hosts.txt @@ -471,6 +471,9 @@ # 50536 FreeSTAR VK 50536 p25tg50536.vkradio.com 41001 +# 51502 DX1ACE +51502 p25-dx1ace.hopto.org 41000 + # 51503 US Philippines P25 network 51503 45.79.76.10 41000 From fe5bf211f1dc88301d37bd3f7015af5d2a4c88c1 Mon Sep 17 00:00:00 2001 From: skyler440 Date: Sat, 15 Jan 2022 19:32:16 -0700 Subject: [PATCH 03/11] Update P25Hosts.txt SkyHub ( skyhublink.com) --- P25Gateway/P25Hosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/P25Gateway/P25Hosts.txt b/P25Gateway/P25Hosts.txt index d027585..a82c4ba 100644 --- a/P25Gateway/P25Hosts.txt +++ b/P25Gateway/P25Hosts.txt @@ -186,6 +186,9 @@ # 10260 Poland 10260 80.211.249.221 41000 +# 10294 SkyHub https://skyhublink.com/connections +10294 hub.skyhublink.com 41000 + # 10300 Europe https://p25-eu.n18.de/ 10300 176.9.1.168 41000 From ccc744ec01beccbcdab8e1fd0198bf8dd0b03e6f Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Thu, 20 Jan 2022 12:55:53 +0100 Subject: [PATCH 04/11] Expect a space between Talkgroup and its number. --- P25Gateway/P25Gateway.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/P25Gateway/P25Gateway.cpp b/P25Gateway/P25Gateway.cpp index 225967b..9dd4a3e 100644 --- a/P25Gateway/P25Gateway.cpp +++ b/P25Gateway/P25Gateway.cpp @@ -449,7 +449,7 @@ void CP25Gateway::run() if (res > 0) { buffer[res] = '\0'; if (::memcmp(buffer + 0U, "TalkGroup", 9U) == 0) { - unsigned int tg = (unsigned int)::atoi((char*)(buffer + 9U)); + unsigned int tg = ((strlen((char*)buffer + 0U) > 10) ? (unsigned int)::atoi((char*)(buffer + 10U)) : 9999); if (tg != currentTG) { if (currentAddrLen > 0U) { From 2faf0c040f13f3a42e530d827c2bfa11ed1daf8f Mon Sep 17 00:00:00 2001 From: wb6dtb <62869527+wb6dtb@users.noreply.github.com> Date: Thu, 20 Jan 2022 08:22:53 -0800 Subject: [PATCH 05/11] Update P25Hosts.txt Change America-RC reflector IP address to DNS name due to location change of reflector. --- P25Gateway/P25Hosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/P25Gateway/P25Hosts.txt b/P25Gateway/P25Hosts.txt index d027585..96add2b 100644 --- a/P25Gateway/P25Hosts.txt +++ b/P25Gateway/P25Hosts.txt @@ -313,7 +313,7 @@ 26538 116.203.223.233 41000 # 28299 America-Ragchew -28299 65.101.7.51 41000 +28299 arcp25.duckdns.org 41000 # 29252 Oklahoma Hamsomniacs 29252 hamsomniac.mooo.com 41000 From 7aa94c14bd818c75e9ece5124fdb0fe8284fc690 Mon Sep 17 00:00:00 2001 From: skyler440 Date: Sat, 22 Jan 2022 11:59:08 -0700 Subject: [PATCH 06/11] Update P25Hosts.txt --- P25Gateway/P25Hosts.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/P25Gateway/P25Hosts.txt b/P25Gateway/P25Hosts.txt index d027585..15ea5f6 100644 --- a/P25Gateway/P25Hosts.txt +++ b/P25Gateway/P25Hosts.txt @@ -294,6 +294,9 @@ # 23426 FreeSTAR UK 23426 p25.freestar.network 41000 +#23456 SHARC Multi Mode System Sherman, ME +23456 kc1noc.duckdns.org 41000 + # 23551 P25 Scotland 23551 p25scotland.ddns.net 41000 From baa0271237ae60cce5a981376eaf14d6ec13b152 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Sun, 23 Jan 2022 18:07:55 +0000 Subject: [PATCH 07/11] Add new remote command: - status: displays network connection status (n/a, conn, disc), just like DMRGateway/MMDVMHost. - host: display connected host, or NONE if disconnected (surrounded with double quotes). --- P25Gateway/P25Gateway.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/P25Gateway/P25Gateway.cpp b/P25Gateway/P25Gateway.cpp index 9dd4a3e..f646597 100644 --- a/P25Gateway/P25Gateway.cpp +++ b/P25Gateway/P25Gateway.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -514,6 +515,21 @@ void CP25Gateway::run() voice->linkedTo(currentTG); } } + } else if (::memcmp(buffer + 0U, "status", 6U) == 0) { + std::string state = std::string("p25:") + ((currentAddrLen > 0) ? "conn" : "disc"); + remoteSocket->write((unsigned char*)state.c_str(), (unsigned int)state.length(), addr, addrLen); + } else if (::memcmp(buffer + 0U, "host", 4U) == 0) { + std::string ref; + + if (currentAddrLen > 0) { + char buffer[INET6_ADDRSTRLEN]; + if (getnameinfo((struct sockaddr*)¤tAddr, currentAddrLen, buffer, sizeof(buffer), 0, 0, NI_NUMERICHOST | NI_NUMERICSERV) == 0) { + ref = std::string(buffer); + } + } + + std::string host = std::string("p25:\"") + ((ref.length() == 0) ? "NONE" : ref) + "\""; + remoteSocket->write((unsigned char*)host.c_str(), (unsigned int)host.length(), addr, addrLen); } else { CUtils::dump("Invalid remote command received", buffer, res); } From ec69b5315becbf61987f5afa8f2394bfc54c2ec8 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Sun, 23 Jan 2022 19:54:18 +0000 Subject: [PATCH 08/11] Update P25Hosts.txt --- P25Gateway/P25Hosts.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/P25Gateway/P25Hosts.txt b/P25Gateway/P25Hosts.txt index f1b3a37..e005834 100644 --- a/P25Gateway/P25Hosts.txt +++ b/P25Gateway/P25Hosts.txt @@ -12,7 +12,7 @@ # 138 P25 PKT THAILAND 138 p25138.freeddns.org 41001 -# 149 Thailand P25 Link XLX149 Modules C +# 149 Thailand P25 Link XLX149 Modules D 149 p25.pwk.ac.th 41000 # 202 HELLAS Zone P25 @@ -495,12 +495,18 @@ # 51575 PH-Dumaguete Link (Multimode) 51575 140.82.14.24 41000 +# 52032 P25 Link XLX149 Modules C +52032 p52032.pwk.ac.th 41009 + # 52072 Phuket 52072 xlx727phuketdstar.ddns.net 41000 # 52138 P25 Link Thailand 52138 p2552138.freeddns.org 41000 +# 52910 XLX Nexus +52910 p25x.mywire.org 41000 + # 53099 New Zealand bridge to D-Star, DMR and NXDN 53099 203.86.206.49 41000 From 012456a3405bbcedb003a3fe8ea29719273d55c6 Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Tue, 25 Jan 2022 04:12:42 +0000 Subject: [PATCH 09/11] Fix Static on startup. If a static talkgroup is set in the configuration file is set, some 3 poll frames are sent, but replies are ignored, hence the connection status stays disconnected, and localnetwork won't get any data also. --- P25Gateway/P25Gateway.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/P25Gateway/P25Gateway.cpp b/P25Gateway/P25Gateway.cpp index f646597..360d72f 100644 --- a/P25Gateway/P25Gateway.cpp +++ b/P25Gateway/P25Gateway.cpp @@ -156,7 +156,7 @@ void CP25Gateway::run() return; } - // Double check it worked (AKA Paranoia) + // Double check it worked (AKA Paranoia) if (setuid(0) != -1) { ::fprintf(stderr, "It's possible to regain root - something is wrong!, exiting\n"); return; @@ -302,8 +302,18 @@ void CP25Gateway::run() hangTimer.start(); } } else if (currentTG == 0U) { + bool poll = false; + unsigned char pollReply[11U] = { 0xF0U }; + std::string callsign = m_conf.getCallsign(); + + callsign.resize(10U, ' '); + + // Build poll reply data + for (unsigned int i = 0U; i < 10U; i++) + pollReply[i + 1U] = callsign.at(i); + // Don't pass reflector control data through to the MMDVM - if (buffer[0U] != 0xF0U && buffer[0U] != 0xF1U) { + if ((buffer[0U] != 0xF0U && buffer[0U] != 0xF1U) || (poll = (::memcmp(buffer, pollReply, std::min(11U, len)) == 0))) { // Find the static TG that this audio data belongs to for (std::vector::const_iterator it = staticTGs.cbegin(); it != staticTGs.cend(); ++it) { if (CUDPSocket::match(addr, (*it).m_addr)) { @@ -326,7 +336,8 @@ void CP25Gateway::run() buffer[3U] = (currentTG >> 0) & 0xFFU; } - localNetwork.write(buffer, len); + if (poll == false) + localNetwork.write(buffer, len); LogMessage("Switched to reflector %u due to network activity", currentTG); @@ -348,7 +359,7 @@ void CP25Gateway::run() srcId = (buffer[1U] << 16) & 0xFF0000U; srcId |= (buffer[2U] << 8) & 0x00FF00U; srcId |= (buffer[3U] << 0) & 0x0000FFU; - + if (dstTG != currentTG) { if (currentAddrLen > 0U) { std::string callsign = lookup->find(srcId); From bd98561201aeae1336ee4abb623f59da017a063e Mon Sep 17 00:00:00 2001 From: Daniel Caujolle-Bert Date: Tue, 25 Jan 2022 18:44:37 +0000 Subject: [PATCH 10/11] Change negation checking coding style. --- P25Gateway/P25Gateway.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/P25Gateway/P25Gateway.cpp b/P25Gateway/P25Gateway.cpp index 360d72f..6a00e8a 100644 --- a/P25Gateway/P25Gateway.cpp +++ b/P25Gateway/P25Gateway.cpp @@ -336,7 +336,7 @@ void CP25Gateway::run() buffer[3U] = (currentTG >> 0) & 0xFFU; } - if (poll == false) + if (!poll) localNetwork.write(buffer, len); LogMessage("Switched to reflector %u due to network activity", currentTG); From 2e12636f3702ce958661548b40bceddfed5bc928 Mon Sep 17 00:00:00 2001 From: kb5rir <48778157+kb5rir@users.noreply.github.com> Date: Sat, 29 Jan 2022 08:09:43 -0600 Subject: [PATCH 11/11] Update P25Hosts.txt change line 76 from. 1007 43773.kb5rir.com 41000 to. 1007 43773.kb5rir.com 41003 --- P25Gateway/P25Hosts.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/P25Gateway/P25Hosts.txt b/P25Gateway/P25Hosts.txt index e005834..b2c57c5 100644 --- a/P25Gateway/P25Hosts.txt +++ b/P25Gateway/P25Hosts.txt @@ -73,7 +73,7 @@ 994 misc.openreflector.com 41000 # 1007 The Harley-Hangout "TGIF TG-1007 Multi-Function Bridge" -1007 43773.kb5rir.com 41000 +1007 43773.kb5rir.com 41003 # 1701 Sector 001 1701 hamsomniac.mooo.com 41001