Ver Fonte

Zoiper QR Codes (#50)

* Update INSTALL

* Update app_languages.php

* Update zoiper.php
konradSC há 8 anos atrás
pai
commit
791f0451ae
3 ficheiros alterados com 91 adições e 5 exclusões
  1. 14 1
      zoiper/INSTALL
  2. 54 4
      zoiper/app_languages.php
  3. 23 0
      zoiper/zoiper.php

+ 14 - 1
zoiper/INSTALL

@@ -10,6 +10,11 @@ This will give you a LINK with a PAGE ID:
 https://www.zoiper.com/en/page/MYPAGEID?u=&h=&p=&o=&t=&x=&a=&tr="
 Copy the page ID
 
+Then click "CONFIGURE" Under Mobile. 
+This will give you a LINK with a MOBILE PAGE ID:
+https://www.zoiper.com/en/page/MYMOBILEPAGEID?u=&h=&p=&o=&t=&x=&a=&tr="
+Copy the mobile page ID
+
 On your server
 git clone https://github.com/fusionpbx/fusionpbx-apps
 Copy or move the directory 'zoiper' into your main FusionPBX directory
@@ -23,6 +28,7 @@ Log out and back in
 
 Advanced -> Default Settings
 Add a Default Setting
+
 Category: zoiper
 Subcategory: page_id
 Type: text
@@ -30,8 +36,15 @@ Value: MYPAGEID
 Enabled: True
 Save
 
+Category: zoiper
+Subcategory: mobile_id
+Type: text
+Value: MYMOBILEPAGEID
+Enabled: True
+Save
+
 Then go to Apps -> Zoiper
 Superadmin will see a list of ALL USER EXTENSIONS
 Users will only see the extensions assigned to them.
 
-Click on a link and it will take you to the Zoiper Site. Follow instructions there to download and install.
+Click on a link and it will take you to the Zoiper Site. Follow instructions there to download and install.

+ 54 - 4
zoiper/app_languages.php

@@ -1,6 +1,6 @@
 <?php
 
-$text['title']['en-us'] = "Zoiper";
+$text['title']['en-us'] = "Zoiper Desktop";
 $text['title']['es-cl'] = "";
 $text['title']['pt-pt'] = "";
 $text['title']['fr-fr'] = "";
@@ -10,7 +10,7 @@ $text['title']['sv-se'] = "";
 $text['title']['uk'] = "";
 $text['title']['de-at'] = "";
 
-$text['table-tools']['en-us'] = "Tools";
+$text['table-tools']['en-us'] = "Zoiper Desktop Download";
 $text['table-tools']['es-cl'] = "Herramientas";
 $text['table-tools']['pt-pt'] = "Ferramentas";
 $text['table-tools']['fr-fr'] = "Outils";
@@ -40,7 +40,37 @@ $text['table-description']['sv-se'] = "Beskrivning ";
 $text['table-description']['uk'] = "Опис";
 $text['table-description']['de-at'] = "Beschreibung";
 
-$text['label-zoiper']['en-us'] = "Zoiper Desktop/Mobile Download";
+$text['table-password']['en-us'] = "Password";
+$text['table-password']['es-cl'] = "";
+$text['table-password']['pt-pt'] = "";
+$text['table-password']['fr-fr'] = "";
+$text['table-password']['pt-br'] = "";
+$text['table-password']['pl'] = "";
+$text['table-password']['sv-se'] = " ";
+$text['table-password']['uk'] = "";
+$text['table-password']['de-at'] = "";
+
+$text['table-qr']['en-us'] = "Mobile Provisioning QR Code";
+$text['table-qr']['es-cl'] = "";
+$text['table-qr']['pt-pt'] = "";
+$text['table-qr']['fr-fr'] = "";
+$text['table-qr']['pt-br'] = "";
+$text['table-qr']['pl'] = "";
+$text['table-qr']['sv-se'] = " ";
+$text['table-qr']['uk'] = "";
+$text['table-qr']['de-at'] = "";
+
+$text['title-mobile']['en-us'] = "Zoiper Smartphone";
+$text['title-mobile']['es-cl'] = "";
+$text['title-mobile']['pt-pt'] = "";
+$text['title-mobile']['fr-fr'] = "";
+$text['title-mobile']['pt-br'] = "";
+$text['title-mobile']['pl'] = "";
+$text['title-mobile']['sv-se'] = "";
+$text['title-mobile']['uk'] = "";
+$text['title-mobile']['de-at'] = "";
+
+$text['label-zoiper']['en-us'] = "Desktop Download";
 $text['label-zoiper']['es-cl'] = "";
 $text['label-zoiper']['pt-pt'] = "";
 $text['label-zoiper']['fr-fr'] = "";
@@ -50,7 +80,17 @@ $text['label-zoiper']['sv-se'] = "";
 $text['label-zoiper']['uk'] = "";
 $text['label-zoiper']['de-at'] = "";
 
-$text['description-zoiper']['en-us'] = "Install Zoiper softphone for Windows, Android, iOS, Windows Phone 8, Mac or Linux.";
+$text['label-qr']['en-us'] = "QR Code";
+$text['label-qr']['es-cl'] = "";
+$text['label-qr']['pt-pt'] = "";
+$text['label-qr']['fr-fr'] = "";
+$text['label-qr']['pt-br'] = "";
+$text['label-qr']['pl'] = "";
+$text['label-qr']['sv-se'] = "";
+$text['label-qr']['uk'] = "";
+$text['label-qr']['de-at'] = "";
+
+$text['description-zoiper']['en-us'] = "Download and install a preconfigured Zoiper softphone for Windows, Mac or Linux by selecting the extension's download link.";
 $text['description-zoiper']['es-cl'] = "";
 $text['description-zoiper']['pt-pt'] = "";
 $text['description-zoiper']['fr-fr'] = "";
@@ -60,6 +100,16 @@ $text['description-zoiper']['sv-se'] = "";
 $text['description-zoiper']['uk'] = "";
 $text['description-zoiper']['de-at'] = "";
 
+$text['description-zoiper2']['en-us'] = "For smartphones, download the Zoiper app from Google Play or Apple's App Store. Open the app on your phone and scan the extension's QR code below to configure. ";
+$text['description-zoiper2']['es-cl'] = "";
+$text['description-zoiper2']['pt-pt'] = "";
+$text['description-zoiper2']['fr-fr'] = "";
+$text['description-zoiper2']['pt-br'] = "";
+$text['description-zoiper2']['pl'] = "";
+$text['description-zoiper2']['sv-se'] = "";
+$text['description-zoiper2']['uk'] = "";
+$text['description-zoiper2']['de-at'] = "";
+
 $text['button-search']['en-us'] = "Search";
 $text['button-search']['es-cl'] = "Buscar";
 $text['button-search']['pt-pt'] = "Pesquisar";

+ 23 - 0
zoiper/zoiper.php

@@ -149,6 +149,16 @@
 	echo "			".$text['description-zoiper']."\n";
 	echo "		</td>\n";
 	echo "	</tr>\n";
+	echo "	<tr>\n";
+	echo "		<td colspan='2'>\n";
+	echo "			<b>".$text['title-mobile']."</b><br>\n";
+	echo "		</td>\n";
+	echo "	</tr>\n";
+	echo "	<tr>\n";
+	echo "		<td colspan='2'>\n";
+	echo "			".$text['description-zoiper2']."\n";	
+	echo "		</td>\n";
+	echo "	</tr>\n";	
 	echo "</table>\n";
 	echo "<br>";
 	
@@ -156,18 +166,31 @@
 	echo "<tr>\n";
 	echo th_order_by('extension', $text['table-extension'], $order_by,$order);
 	echo "<th>".$text['table-tools']."</th>\n";
+	echo "<th>".$text['table-qr']."</th>\n";
+//	echo "<th>".$text['table-password']."</th>\n";	
 	echo th_order_by('description', $text['table-description'], $order_by, $order);
 	echo "</tr>\n";
 
 	if ($result_count > 0) {
 		foreach($result as $row) {
 			$tr_url = "https://www.zoiper.com/en/page/" . $_SESSION['zoiper']['page_id']['text'] . "?u=" . $row['extension'] . "&h=" . $row['user_context'] . "&p=" . $row['password'] . "&o=&t=&x=&a=" . $row['extension'] . "&tr=";
+			$qr_img = "https://oem.zoiper.com/qr.php?provider_id=" . $_SESSION['zoiper']['mobile_id']['text'] . "&u=" . $row['extension'] . "&h=" . $row['user_context'] . "&p=" . $row['password'] . "&o=&t=&x=&a=" . $row['extension'] . "&tr=";
 			$tr_link = (permission_exists('zoiper')) ? "href='".$tr_url."'" : null;
 			echo "<tr>\n";
 			echo "	<td valign='top' class='".$row_style[$c]."'>".$row['extension']."</td>\n";
 			echo "	<td valign='top' class='".$row_style[$c]."'>\n";
 			if (permission_exists('zoiper')) { 	echo "<a href='".$tr_url."' target='_blank'>" . $text['label-zoiper'] . "</a>&nbsp;&nbsp;&nbsp;"; }
 			echo "	</td>\n";
+			echo "	<td valign='top' class='".$row_style[$c]."'>\n";
+			echo "	<a href='".$qr_img."' target='_blank'>" . $text['label-qr'] . "</a>&nbsp;&nbsp;&nbsp;";
+			echo "	</td>\n";
+//			echo "	<td valign='top' class='".$row_style[$c]."'>";
+//			echo "			<option data-toggle='tooltip' ";
+//			echo 				"title='User: ".$row['extension']."\n";
+//			echo 				"Password: ".$row['password']."' ";
+//			echo "			</option>\n";			
+//			echo "******";
+//			echo "&nbsp;</td>\n";
 			echo "	<td valign='top' class='row_stylebg' width='40%'>".$row['description']."&nbsp;</td>\n";
 			echo "</tr>\n";
 			if ($c==0) { $c=1; } else { $c=0; }