diff --git a/include/functions.php b/include/functions.php index 50073be..04ad042 100644 --- a/include/functions.php +++ b/include/functions.php @@ -478,6 +478,13 @@ function getActiveYSFReflectors($logLines) { return $reflectorlist; } +function getName($callsign) { + exec("grep ".$callsign." ".DMRIDDATPATH, $output); + $name = substr($output[0], strpos($output[0]," ")+1); + $name = substr($name, strpos($name," ")+1); + return $name; +} + //Some basic inits $mmdvmconfigs = getMMDVMConfig(); $logLinesMMDVM = getMMDVMLog(); diff --git a/include/lh.php b/include/lh.php index beef10c..fd40fda 100644 --- a/include/lh.php +++ b/include/lh.php @@ -12,6 +12,13 @@ $totalLH = count($lastHeard); Time (UTC) Mode Callsign + + Name + DSTAR-ID Target Source @@ -28,6 +35,9 @@ for ($i = 0; ($i < $totalLH); $i++) { echo"$listElem[0]"; echo"$listElem[1]"; echo"$listElem[2]"; + if (defined("ENABLEXTDLOOKUP")) { + echo "".getName($listElem[2]).""; + } echo"$listElem[3]"; echo"$listElem[4]"; if ($listElem[5] == "RF"){ diff --git a/include/localtx.php b/include/localtx.php index 6a419bc..2237dcb 100644 --- a/include/localtx.php +++ b/include/localtx.php @@ -15,6 +15,13 @@ $localTXList = getHeardList($reverseLogLinesMMDVM); Time (UTC) Mode Callsign + + Name + DSTAR-ID Target Source @@ -33,6 +40,9 @@ for ($i = 0; $i < count($localTXList); $i++) { echo"$listElem[0]"; echo"$listElem[1]"; echo"$listElem[2]"; + if (defined("ENABLEXTDLOOKUP")) { + echo "".getName($listElem[2]).""; + } echo"$listElem[3]"; echo"$listElem[4]"; echo"$listElem[5]"; diff --git a/setup.php b/setup.php index 6560bc6..91f81dc 100644 --- a/setup.php +++ b/setup.php @@ -72,10 +72,17 @@ include "include/tools.php"; Path to MMDVMHost-executable " name="MMDVMHOSTPATH" class="form-control" placeholder="/usr/local/bin/" aria-describedby="MMDVMHOSTPATH" required data-fv-notempty-message="Value is required"> +
+ Enable extended lookup (show names) +
>
+
+
+ Path to DMR-ID-Database-File + " name="DMRIDDATPATH" class="form-control" placeholder="/var/mmdvm/DMRIDs.dat" aria-describedby="DMRIDDATPATH"> +

YSFGateway-Configuration

-
Enable YSFGateway
>
diff --git a/version.php b/version.php index d30858a..e61d70d 100644 --- a/version.php +++ b/version.php @@ -1,3 +1,3 @@ \ No newline at end of file