├── xivo.png ├── .gitignore ├── locales ├── cs_CZ.mo ├── en_GB.mo ├── en_US.mo ├── es_AR.mo ├── fr_FR.mo ├── nl_NL.mo ├── pl_PL.mo ├── pt_BR.mo ├── pt_PT.mo ├── ro_RO.mo ├── ru_RU.mo ├── tr_TR.mo ├── zh_CN.mo ├── pl_PL.po ├── xivo.pot ├── zh_CN.po ├── en_GB.po ├── en_US.po ├── nl_NL.po ├── es_AR.po ├── pt_BR.po ├── ro_RO.po ├── fr_FR.po ├── ru_RU.po ├── tr_TR.po ├── pt_PT.po └── cs_CZ.po ├── screenshots ├── click2call.png ├── inventory_lines.png ├── inventory_phones.png └── xuc_integration.png ├── .tx └── config ├── .github ├── workflows │ ├── release.yml │ ├── auto-tag-new-version.yml │ └── autoclose-issues.yml ├── ISSUE_TEMPLATE │ └── config.yml └── dependabot.yml ├── composer.json ├── SECURITY.md ├── tools └── HEADER ├── front ├── phone.form.php ├── line.php ├── config.form.php ├── phone_line.form.php ├── phonecall.php └── line.form.php ├── curl_commands.md ├── README.md ├── ajax └── xuc.php ├── js ├── common.js ├── sessionStorageTabs.js ├── app.js.php ├── xivo │ ├── membership.js │ └── callback.js └── store2.min.js ├── css ├── animation.css └── main.css ├── hook.php ├── xivo.xml ├── setup.php └── inc ├── inventory.class.php ├── xuc.class.php ├── phone.class.php └── apiclient.class.php /xivo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/xivo.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | vendor/ 3 | .gh_token 4 | *.min.* 5 | !js/store2.min.js 6 | -------------------------------------------------------------------------------- /locales/cs_CZ.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/cs_CZ.mo -------------------------------------------------------------------------------- /locales/en_GB.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/en_GB.mo -------------------------------------------------------------------------------- /locales/en_US.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/en_US.mo -------------------------------------------------------------------------------- /locales/es_AR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/es_AR.mo -------------------------------------------------------------------------------- /locales/fr_FR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/fr_FR.mo -------------------------------------------------------------------------------- /locales/nl_NL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/nl_NL.mo -------------------------------------------------------------------------------- /locales/pl_PL.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/pl_PL.mo -------------------------------------------------------------------------------- /locales/pt_BR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/pt_BR.mo -------------------------------------------------------------------------------- /locales/pt_PT.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/pt_PT.mo -------------------------------------------------------------------------------- /locales/ro_RO.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/ro_RO.mo -------------------------------------------------------------------------------- /locales/ru_RU.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/ru_RU.mo -------------------------------------------------------------------------------- /locales/tr_TR.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/tr_TR.mo -------------------------------------------------------------------------------- /locales/zh_CN.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/locales/zh_CN.mo -------------------------------------------------------------------------------- /screenshots/click2call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/screenshots/click2call.png -------------------------------------------------------------------------------- /screenshots/inventory_lines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/screenshots/inventory_lines.png -------------------------------------------------------------------------------- /screenshots/inventory_phones.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/screenshots/inventory_phones.png -------------------------------------------------------------------------------- /screenshots/xuc_integration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InfotelGLPI/xivo/main/screenshots/xuc_integration.png -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.com 3 | 4 | [glpi-plugin-xivo.xivopot] 5 | file_filter = locales/.po 6 | source_file = locales/xivo.pot 7 | source_lang = en 8 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: "Publish release" 2 | 3 | on: 4 | push: 5 | tags: 6 | - '*' 7 | 8 | jobs: 9 | publish-release: 10 | permissions: 11 | contents: "write" 12 | name: "Publish release" 13 | uses: "glpi-project/plugin-release-workflows/.github/workflows/publish-release.yml@v1" 14 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "php": "^7.2", 4 | "guzzlehttp/guzzle": "^6.2" 5 | }, 6 | "require-dev": { 7 | "glpi-project/tools": "^0.4" 8 | }, 9 | "config": { 10 | "optimize-autoloader": true, 11 | "platform": { 12 | "php": "7.2.0" 13 | }, 14 | "sort-packages": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.github/workflows/auto-tag-new-version.yml: -------------------------------------------------------------------------------- 1 | name: "Automatically tag new version" 2 | 3 | on: 4 | push: 5 | branches: 6 | - "main" 7 | paths: 8 | - "setup.php" 9 | 10 | jobs: 11 | auto-tag-new-version: 12 | name: "Automatically tag new version" 13 | uses: "glpi-project/plugin-release-workflows/.github/workflows/auto-tag-new-version.yml@v1" 14 | secrets: 15 | github-token: "${{ secrets.AUTOTAG_TOKEN }}" 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: "GLPI professional support" 4 | url: "https://services.glpi-network.com" 5 | about: "Get professional support from the editor and a network of local partners." 6 | - name: "Find an official partner" 7 | url: "https://glpi-project.org/partners/" 8 | about: "Get support to deploy GLPI in a professional manner." 9 | - name: "GLPI Community Forum" 10 | url: "https://forum.glpi-project.org" 11 | about: "Ask questions and get help from the community." 12 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Ensure GitHub Actions are used in their latest version 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "monthly" 8 | 9 | # Strategy for composer dependencies 10 | - package-ecosystem: "composer" 11 | directory: "/" 12 | schedule: 13 | interval: "monthly" 14 | allow: 15 | - dependency-type: "direct" 16 | open-pull-requests-limit: 100 17 | versioning-strategy: "increase" 18 | groups: 19 | dev-dependencies: 20 | dependency-type: "development" 21 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | **⚠️ Please never use standard issues to report security problems; vulnerabilities are published once a fix release is available. ⚠️** 4 | 5 | ## Reporting a Vulnerability 6 | 7 | If you found a security issue, please contact us by: 8 | 9 | - [our huntr page](https://huntr.dev/repos/pluginsGLPI/xivo/) 10 | - a mail to \[glpi-security AT ow2.org\] 11 | 12 | You should provide us all details about the issue and the way to reproduce it. 13 | You may also provide a script that can be used to check the issue exists. 14 | 15 | Once the report will be handled, and if the issue is not yet fixed (or in progress) 16 | we'll add it to the GitHub security tab, and add you as observer. Meanwhile, 17 | you will reserve a CVE for the issue. 18 | 19 | Thank you for improving the security of GLPI and its plugins. 20 | 21 | ## Supported Versions 22 | 23 | We follow the same version support policy as GLPI. 24 | This means that we provide security patches to versions of the plugin that target a version of GLPI itself maintained from a security point of view. 25 | -------------------------------------------------------------------------------- /tools/HEADER: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------- 2 | xivo plugin for GLPI 3 | ------------------------------------------------------------------------- 4 | 5 | LICENSE 6 | 7 | This file is part of xivo. 8 | 9 | xivo is free software; you can redistribute it and/or modify 10 | it under the terms of the GNU General Public License as published by 11 | the Free Software Foundation; either version 3 of the License, or 12 | (at your option) any later version. 13 | 14 | xivo is distributed in the hope that it will be useful, 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License 20 | along with xivo. If not, see . 21 | ------------------------------------------------------------------------- 22 | @copyright Copyright (C) 2017-2022 by xivo plugin team. 23 | @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 24 | @link https://github.com/pluginsGLPI/xivo 25 | ------------------------------------------------------------------------- 26 | -------------------------------------------------------------------------------- /.github/workflows/autoclose-issues.yml: -------------------------------------------------------------------------------- 1 | name: "Close issues" 2 | 3 | on: 4 | issues: 5 | types: ["opened"] 6 | 7 | jobs: 8 | close-issue: 9 | permissions: 10 | issues: "write" 11 | name: "Close issue" 12 | runs-on: "ubuntu-latest" 13 | steps: 14 | - uses: "actions/github-script@v7" 15 | with: 16 | script: | 17 | const issues_url = context.serverUrl + '/' + context.repo.owner + '/' + context.repo.repo + '/issues/new/choose'; 18 | await github.rest.issues.createComment({ 19 | issue_number: context.issue.number, 20 | owner: context.repo.owner, 21 | repo: context.repo.repo, 22 | body: `Issues opened on this repository are not processed. Please follow links proposed in ${issues_url}.` 23 | }); 24 | await github.rest.issues.lock({ 25 | issue_number: context.issue.number, 26 | owner: context.repo.owner, 27 | repo: context.repo.repo, 28 | }); 29 | await github.rest.issues.update({ 30 | issue_number: context.issue.number, 31 | owner: context.repo.owner, 32 | repo: context.repo.repo, 33 | state: "closed", 34 | }); 35 | -------------------------------------------------------------------------------- /front/phone.form.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | include ('../../../inc/includes.php'); 32 | 33 | Session::checkRight("phone", READ); 34 | 35 | if (isset($_REQUEST["forcesync"])) { 36 | PluginXivoPhone::forceSync($_REQUEST['xivo_id']); 37 | Html::back(); 38 | } 39 | -------------------------------------------------------------------------------- /front/line.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | include ('../../../inc/includes.php'); 32 | 33 | Html::header(PluginXivoLine::getTypeName(), 34 | $_SERVER['PHP_SELF'], 35 | "management", 36 | "pluginxivoline"); 37 | Search::show('PluginXivoLine'); 38 | Html::footer(); -------------------------------------------------------------------------------- /front/config.form.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | include ("../../../inc/includes.php"); 32 | 33 | if (isset($_REQUEST["forcesync"])) { 34 | CronTask::launch(-1, 1, 'xivoimport'); 35 | Html::back(); 36 | } else { 37 | Html::redirect($CFG_GLPI["root_doc"]."/front/config.form.php?forcetab=PluginXivoConfig\$1"); 38 | } 39 | -------------------------------------------------------------------------------- /curl_commands.md: -------------------------------------------------------------------------------- 1 | # CURL command for using XIVO Api 2 | 3 | Theses commands are extracted from https://documentation.xivo.solutions/en/stable/xivo/api_sdk/rest_api/rest_api.html 4 | 5 | ## Auth (get token) 6 | 7 | Create a new token, using the xivo_user backend, expiring in 10 minutes 8 | 9 | curl -k -X POST \ 10 | -H 'Content-Type: application/json' \ 11 | -u 'user:password' \ 12 | -d '{"backend": "xivo_service", "expiration": 600}' \ 13 | "https://ip_api:9497/0.1/token" 14 | 15 | >{"data": {"xivo_user_uuid": "49f4f44f-ce1f-41d4-b44d-09f4822f92d0", "expires_at": "2017-03-27T09:49:42.366064", "token": "4ccf942b-7371-4f19-bd04-0ac4fc4f70f5", "acls": ["confd.users.me.read", "confd.users.me.update", "confd.users.me.funckeys.*", "confd.users.me.funckeys.*.*", "confd.users.me.#.read", "confd.users.me.services.*.*", "confd.users.me.forwards.*.*", "ctid-ng.users.me.#", "ctid-ng.transfers.*.read", "ctid-ng.transfers.*.delete", "ctid-ng.transfers.*.complete.update", "dird.#.me.read", "dird.directories.favorites.#", "dird.directories.lookup.*.headers.read", "dird.directories.lookup.*.read", "dird.directories.personal.*.read", "dird.personal.#", "events.calls.me", "events.transfers.me", "events.chat.message.*.me", "events.statuses.*", "events.switchboards", "events.config.users.me.services.*.*", "events.config.users.me.forwards.*.*", "websocketd"], "issued_at": "2017-03-27T09:39:42.366094", "auth_id": "49f4f44f-ce1f-41d4-b44d-09f4822f92d0"}} 16 | 17 | ## Get list of devices 18 | 19 | curl -X GET \ 20 | --header 'Accept: application/json' \ 21 | --header 'X-Auth-Token: mytoken_givenby_auth' 22 | 'https://ip_api:9486/1.1/devices' -------------------------------------------------------------------------------- /front/phone_line.form.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | include ('../../../inc/includes.php'); 32 | 33 | Session::checkCentralAccess(); 34 | $phoneline = new PluginXivoPhone_Line(); 35 | if (isset($_POST["add"])) { 36 | $phoneline->check(-1, CREATE, $_POST); 37 | 38 | if (isset($_POST["phones_id"]) && ($_POST["phones_id"] > 0) 39 | && isset($_POST["lines_id"]) && ($_POST["lines_id"] > 0)) { 40 | $phoneline->add($_POST); 41 | } 42 | Html::back(); 43 | } 44 | 45 | Html::displayErrorAndDie('Lost'); 46 | -------------------------------------------------------------------------------- /front/phonecall.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | include ('../../../inc/includes.php'); 32 | 33 | if (!$plugin->isActivated('xivo')) { 34 | echo __("Xivo plugin not activated", 'xivo'); 35 | exit; 36 | } 37 | 38 | if (!isset($_REQUEST['caller_num'])) { 39 | exit; 40 | } 41 | 42 | $xuc = new PluginXivoXuc; 43 | $data = $xuc->getUserInfosByPhone($_REQUEST); 44 | 45 | if ($data['redirect'] && isset($_REQUEST['redirect'])) { 46 | \Session::checkValidSessionId(); 47 | \Html::redirect($data['redirect']); 48 | } else { 49 | echo json_encode($data); 50 | } 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Connector for [GLPI](http://glpi-project.org) with [XIVO](https://www.xivo.solutions/) 2 | 3 | **[DOWNLOAD the plugin](https://github.com/pluginsGLPI/xivo/releases)** 4 | 5 | ## Features 6 | 7 | Here is the list of currently working/planned features: 8 | 9 | - [x] Phones inventory 10 | - [x] Lines inventory 11 | - [x] Users presence (since xivo deneb version) 12 | - [x] Auto-open tickets or users form 13 | - [x] Click2Call (requires xivo client to handle `callto:` links) 14 | - [ ] Call logs 15 | - [ ] Directory 16 | 17 | Please contact [Teclib'](http://www.teclib-group.com) by [mail](http://www.teclib-group.com/contact/) or phone (+33 1 79 97 02 78) if you want informations for developing futures one. 18 | 19 | ## Configuration 20 | 21 | This plugin was tested with xivo versions [16.12, 2018.05.03, 2019.12.03] and should work correctly for versions above 16.04. 22 | 23 | ### Inventory 24 | 25 | We need a webservices user with these minimal acl: 26 | 27 | - confd.users.read 28 | - confd.devices.#.read 29 | - confd.lines.#.read 30 | - confd.devices.read 31 | - confd.lines.read 32 | 33 | ## Contributing 34 | 35 | * Open an [issue](https://github.com/pluginsGLPI/xivo/issues/new) for each bug/feature so it can be discussed 36 | * Follow [development guidelines](http://glpi-developer-documentation.readthedocs.io/en/latest/plugins.html) 37 | * Refer to [GitFlow](http://git-flow.readthedocs.io/) process for branching 38 | * Work on a new branch on your own fork 39 | * Open a PR that will be reviewed by a developer 40 | 41 | ## Screenshots 42 | 43 | inventory of phones 44 | inventory of lines 45 | XUC integration 46 | Click2Call 47 | -------------------------------------------------------------------------------- /ajax/xuc.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | include ("../../../inc/includes.php"); 32 | 33 | header("Content-Type: text/html; charset=UTF-8"); 34 | Html::header_nocache(); 35 | Session::checkLoginUser(); 36 | 37 | if (!isset($_REQUEST['action'])) { 38 | exit; 39 | } 40 | 41 | $xuc = new PluginXivoXuc; 42 | switch ($_REQUEST['action']) { 43 | case 'get_login_form': 44 | echo $xuc->getLoginForm(); 45 | break; 46 | 47 | case 'get_logged_form': 48 | echo $xuc->getLoggedForm(); 49 | break; 50 | 51 | case 'get_user_infos_by_phone': 52 | $data = $xuc->getUserInfosByPhone($_REQUEST); 53 | echo json_encode($data); 54 | break; 55 | 56 | case 'get_call_link': 57 | $data = []; 58 | if (isset($_REQUEST['id'])) { 59 | $data = $xuc->getCallLink((int) $_REQUEST['id']); 60 | echo json_encode($data); 61 | } 62 | break; 63 | } 64 | -------------------------------------------------------------------------------- /js/common.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ------------------------------------------------------------------------- 3 | * xivo plugin for GLPI 4 | * ------------------------------------------------------------------------- 5 | * 6 | * LICENSE 7 | * 8 | * This file is part of xivo. 9 | * 10 | * xivo is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * xivo is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with xivo. If not, see . 22 | * ------------------------------------------------------------------------- 23 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 24 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 25 | * @link https://github.com/pluginsGLPI/xivo 26 | * ------------------------------------------------------------------------- 27 | */ 28 | 29 | $(function() { 30 | // do like a jquery toggle but based on a parameter 31 | $.fn.toggleFromValue = function(val) { 32 | var that = this; 33 | if (val === 1 34 | || val === "1" 35 | || val === true) { 36 | that.show(); 37 | $(that).find('[_required]').prop('required', true); 38 | } else { 39 | that.hide(); 40 | $(that).find('[required]').prop('required', false).attr('_required', 'true'); 41 | } 42 | } 43 | 44 | // remove required from hidden fields 45 | $(document).on('click','.xivo_config form input[type=submit]',function() { 46 | xivoCheckConfig(); 47 | }); 48 | }); 49 | 50 | var xivoCheckConfig = function() { 51 | $(".xivo_config .xivo_config_block").each(function() { 52 | var that = $(this); 53 | if (that.css("display") == "none") { 54 | $(that).find('[required]').prop('required', false); 55 | } 56 | }); 57 | }; 58 | -------------------------------------------------------------------------------- /js/sessionStorageTabs.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ------------------------------------------------------------------------- 3 | * xivo plugin for GLPI 4 | * ------------------------------------------------------------------------- 5 | * 6 | * LICENSE 7 | * 8 | * This file is part of xivo. 9 | * 10 | * xivo is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * xivo is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with xivo. If not, see . 22 | * ------------------------------------------------------------------------- 23 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 24 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 25 | * @link https://github.com/pluginsGLPI/xivo 26 | * ------------------------------------------------------------------------- 27 | */ 28 | 29 | (function() { 30 | //source: http://blog.guya.net/2015/06/12/sharing-sessionstorage-between-tabs-for-secure-multi-tab-authentication/ 31 | if (!sessionStorage.length) { 32 | // Ask other tabs for session storage 33 | localStorage.setItem('getSessionStorage', Date.now()); 34 | }; 35 | 36 | window.addEventListener('storage', function(event) { 37 | if (event.key == 'getSessionStorage') { 38 | // Some tab asked for the sessionStorage -> send it 39 | localStorage.setItem('sessionStorage', JSON.stringify(sessionStorage)); 40 | localStorage.removeItem('sessionStorage'); 41 | } else if (event.key == 'sessionStorage' && !sessionStorage.length) { 42 | // sessionStorage is empty -> fill it 43 | var data = JSON.parse(event.newValue), value; 44 | 45 | for (key in data) { 46 | sessionStorage.setItem(key, data[key]); 47 | } 48 | } 49 | }); 50 | })(); 51 | -------------------------------------------------------------------------------- /front/line.form.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | include ('../../../inc/includes.php'); 32 | 33 | $line = new PluginXivoLine(); 34 | 35 | if (isset($_POST["add"])) { 36 | $newID = $line->add($_POST); 37 | 38 | if ($_SESSION['glpibackcreated']) { 39 | Html::redirect($line->getFormURL()."?id=".$newID); 40 | } 41 | Html::back(); 42 | 43 | } else if (isset($_POST["delete"])) { 44 | $line->delete($_POST); 45 | $line->redirectToList(); 46 | 47 | } else if (isset($_POST["restore"])) { 48 | $line->restore($_POST); 49 | $line->redirectToList(); 50 | 51 | } else if (isset($_POST["purge"])) { 52 | $line->delete($_POST, 1); 53 | $line->redirectToList(); 54 | 55 | } else if (isset($_POST["update"])) { 56 | $line->update($_POST); 57 | Html::back(); 58 | 59 | } else { 60 | // fill id, if missing 61 | isset($_GET['id']) 62 | ? $ID = intval($_GET['id']) 63 | : $ID = 0; 64 | 65 | // display form 66 | Html::header(PluginXivoLine::getTypeName(), 67 | $_SERVER['PHP_SELF'], 68 | "management", 69 | "pluginxivoline"); 70 | $line->display(['id' => $ID]); 71 | Html::footer(); 72 | } -------------------------------------------------------------------------------- /js/app.js.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | include ("../../../inc/includes.php"); 32 | 33 | //change mimetype 34 | header("Content-type: application/javascript"); 35 | 36 | if (!Plugin::isPluginActive("xivo")) { 37 | exit; 38 | } 39 | 40 | // retrieve plugin config 41 | $xivoconfig = json_encode(PluginXivoConfig::getConfig(), JSON_NUMERIC_CHECK); 42 | 43 | //check constants to disable builtin features 44 | $enable_presence = PLUGIN_XIVO_ENABLE_PRESENCE; 45 | $enable_callcenter = PLUGIN_XIVO_ENABLE_CALLCENTER; 46 | 47 | $JS = <<. 22 | * ------------------------------------------------------------------------- 23 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 24 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 25 | * @link https://github.com/pluginsGLPI/xivo 26 | * ------------------------------------------------------------------------- 27 | */ 28 | 29 | @keyframes ringing { 30 | 0% { 31 | -webkit-transform: rotate(-15deg); 32 | transform: rotate(-15deg) 33 | } 34 | 35 | 2% { 36 | -webkit-transform: rotate(15deg); 37 | transform: rotate(15deg) 38 | } 39 | 40 | 4% { 41 | -webkit-transform: rotate(-18deg); 42 | transform: rotate(-18deg) 43 | } 44 | 45 | 6% { 46 | -webkit-transform: rotate(18deg); 47 | transform: rotate(18deg) 48 | } 49 | 50 | 8% { 51 | -webkit-transform: rotate(-22deg); 52 | transform: rotate(-22deg) 53 | } 54 | 55 | 10% { 56 | -webkit-transform: rotate(22deg); 57 | transform: rotate(22deg) 58 | } 59 | 60 | 12% { 61 | -webkit-transform: rotate(-18deg); 62 | transform: rotate(-18deg) 63 | } 64 | 65 | 14% { 66 | -webkit-transform: rotate(18deg); 67 | transform: rotate(18deg) 68 | } 69 | 70 | 16% { 71 | -webkit-transform: rotate(-12deg); 72 | transform: rotate(-12deg) 73 | } 74 | 75 | 18% { 76 | -webkit-transform: rotate(12deg); 77 | transform: rotate(12deg) 78 | } 79 | 80 | 100%,20% { 81 | -webkit-transform: rotate(0); 82 | transform: rotate(0) 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /hook.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | /** 32 | * Plugin install process 33 | * 34 | * @return boolean 35 | */ 36 | function plugin_xivo_install() { 37 | global $DB; 38 | 39 | $version = plugin_version_xivo(); 40 | $migration = new Migration($version['version']); 41 | 42 | // Parse inc directory 43 | foreach (glob(dirname(__FILE__).'/inc/*') as $filepath) { 44 | // Load *.class.php files and get the class name 45 | if (preg_match("/inc.(.+)\.class.php$/", $filepath, $matches)) { 46 | $classname = 'PluginXivo' . ucfirst($matches[1]); 47 | include_once($filepath); 48 | // If the install method exists, load it 49 | if (method_exists($classname, 'install')) { 50 | $classname::install($migration); 51 | } 52 | } 53 | } 54 | 55 | $migration->executeMigration(); 56 | 57 | return true; 58 | } 59 | 60 | /** 61 | * Plugin uninstall process 62 | * 63 | * @return boolean 64 | */ 65 | function plugin_xivo_uninstall() { 66 | // Parse inc directory 67 | foreach (glob(dirname(__FILE__).'/inc/*') as $filepath) { 68 | // Load *.class.php files and get the class name 69 | if (preg_match("/inc.(.+)\.class.php/", $filepath, $matches)) { 70 | $classname = 'PluginXivo' . ucfirst($matches[1]); 71 | include_once($filepath); 72 | // If the install method exists, load it 73 | if (method_exists($classname, 'uninstall')) { 74 | $classname::uninstall(); 75 | } 76 | } 77 | } 78 | return true; 79 | } 80 | 81 | function plugin_xivo_getAddSearchOptions($itemtype) { 82 | if (isset($_SESSION['glpiactiveentities']) 83 | && is_array($_SESSION['glpiactiveentities']) 84 | && count($_SESSION['glpiactiveentities']) > 0) { 85 | 86 | switch ($itemtype) { 87 | case 'Phone': 88 | case 'Line': 89 | return PluginXivoLine::getAddSearchOptions($itemtype); 90 | } 91 | } 92 | 93 | return null; 94 | } -------------------------------------------------------------------------------- /js/xivo/membership.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ------------------------------------------------------------------------- 3 | * xivo plugin for GLPI 4 | * ------------------------------------------------------------------------- 5 | * 6 | * LICENSE 7 | * 8 | * This file is part of xivo. 9 | * 10 | * xivo is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * xivo is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with xivo. If not, see . 22 | * ------------------------------------------------------------------------- 23 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 24 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 25 | * @link https://github.com/pluginsGLPI/xivo 26 | * ------------------------------------------------------------------------- 27 | */ 28 | 29 | var Membership = { 30 | 31 | 32 | sendCallback : function() { 33 | console.error("Cti Not initialized: User not logged on"); 34 | }, 35 | init: function(cti) { 36 | this.MessageFactory.init(cti.WebsocketMessageFactory); 37 | this.sendCallback = cti.sendCallback; 38 | }, 39 | getUserDefaultMembership: function(userId) { 40 | var message = this.MessageFactory.createGetUserDefaultMembership(userId); 41 | this.sendCallback(message); 42 | }, 43 | setUserDefaultMembership: function(userId, membership) { 44 | var message = this.MessageFactory.createSetUserDefaultMembership(userId, membership); 45 | this.sendCallback(message); 46 | }, 47 | setUsersDefaultMembership: function(userIds, membership) { 48 | var message = this.MessageFactory.createSetUsersDefaultMembership(userIds, membership); 49 | this.sendCallback(message); 50 | }, 51 | applyUsersDefaultMembership: function(userIds) { 52 | var message = this.MessageFactory.createApplyUsersDefaultMembership(userIds); 53 | this.sendCallback(message); 54 | }, 55 | 56 | MessageType: { 57 | USERQUEUEDEFAULTMEMBERSHIP: 'UserQueueDefaultMembership', 58 | USERSQUEUEDEFAULTMEMBERSHIP: 'UsersQueueDefaultMembership' 59 | }, 60 | 61 | MessageFactory: { 62 | ctiMessageFactory: { 63 | createMessage: function () { 64 | console.error("Cti Not initialzed: User not logged on"); 65 | } 66 | }, 67 | init: function (ctiMessageFactory) { 68 | this.ctiMessageFactory = ctiMessageFactory; 69 | }, 70 | createMessage: function (command) { 71 | return this.ctiMessageFactory.createMessage(command); 72 | }, 73 | createGetUserDefaultMembership: function (userId) { 74 | var message = this.createMessage("getUserDefaultMembership"); 75 | message.userId = userId; 76 | return message; 77 | }, 78 | createSetUserDefaultMembership: function (userId, membership) { 79 | var message = this.createMessage("setUserDefaultMembership"); 80 | message.userId = userId; 81 | message.membership = membership; 82 | return message; 83 | }, 84 | createSetUsersDefaultMembership: function (userIds, membership) { 85 | var message = this.createMessage("setUsersDefaultMembership"); 86 | message.userIds = userIds; 87 | message.membership = membership; 88 | return message; 89 | }, 90 | createApplyUsersDefaultMembership: function(userIds) { 91 | var message = this.createMessage("applyUsersDefaultMembership"); 92 | message.userIds = userIds; 93 | return message; 94 | } 95 | } 96 | }; 97 | -------------------------------------------------------------------------------- /xivo.xml: -------------------------------------------------------------------------------- 1 | 2 | xivo 3 | xivo 4 | stable 5 | https://raw.githubusercontent.com/pluginsGLPI/xivo/main/xivo.png 6 | 7 | 8 | Napojení GLPI na XIVO nebo WAZO 9 | Connector for GLPI with XIVO or WAZO 10 | Connecteur GLPI avec XIVO ou WAZO 11 | 12 | 13 | Napojení GLPI na XIVO nebo WAZO 14 | 15 | Toto je seznam nyní dostupných/plánovaných funkcí: 16 | 17 | * [x] Inventorizace telefonů 18 | * [x] Inventarizace linek 19 | * [x] Přítomnost uživatelů 20 | * [x] Automatické otvírání požadavků nebo formulářů uživatele 21 | * [x] Zavolání kliknutím 22 | * [ ] Výpis hovorů 23 | * [ ] Adresář kontaktů 24 | 25 | Pokud byste stáli o přidání dalších, obraťte se na Teclib e-mailem (info@glpi-project.org) nebo telefonicky (+33 1 79 97 02 78). 26 | 27 | Connector for GLPI with XIVO or WAZO 28 | 29 | Here is the list of currently working/planned features: 30 | 31 | * [x] Phones inventory 32 | * [x] Lines inventory 33 | * [x] Users presence 34 | * [x] Auto-open tickets or users form 35 | * [x] Click2call 36 | * [ ] Call logs 37 | * [ ] Directory 38 | 39 | Please contact Teclib' by mail (info@glpi-project.org) or phone (+33 1 79 97 02 78) if you want informations for developing futures one. 40 | 41 | Connecteur GLPI avec XIVO 42 | 43 | Voici une list des fonctionnalités courantes / planifiées: 44 | 45 | * [x] Inventaire des téléphones 46 | * [x] Inventaire des lignes 47 | * [x] Présence des utilisateurs 48 | * [x] Auto ouverture des formulaires des tickets ou des utilisateurs 49 | * [x] Appel sur clic 50 | * [ ] Historique des appels 51 | * [ ] Annuaire 52 | 53 | Merci de contacter Teclib par mail (info@glpi-project.org) ou par téléphone (01 79 97 02 78) pour toutes informations sur les développements futurs. 54 | 55 | 56 | https://github.com/pluginsGLPI/xivo 57 | https://github.com/pluginsGLPI/xivo/releases 58 | https://github.com/pluginsGLPI/xivo/issues 59 | https://github.com/pluginsGLPI/xivo/blob/main/README.md 60 | 61 | Teclib' 62 | Alexandre Delaunay 63 | 64 | 65 | 66 | 1.0.0 67 | ~9.5.0 68 | https://github.com/pluginsGLPI/xivo/releases/download/1.0.0/glpi-xivo-1.0.0.tar.bz2 69 | 70 | 71 | 0.3.5 72 | 9.2 73 | 9.3 74 | https://github.com/pluginsGLPI/xivo/releases/download/0.3.5/glpi-xivo-0.3.5.tar.bz2 75 | 76 | 77 | 0.3.4 78 | 9.2 79 | 9.3 80 | 81 | 82 | 0.2.0 83 | 9.2 84 | 85 | 86 | 0.1.0 87 | 9.1 88 | 0.90 89 | 90 | 91 | 92 | cs_CZ 93 | en_GB 94 | es_AR 95 | fr_FR 96 | 97 | GPL V3+ 98 | 99 | 100 | Inventura 101 | Import 102 | Telefony 103 | Linky 104 | 105 | 106 | Inventory 107 | Import 108 | Phones 109 | Lines 110 | 111 | 112 | Inventaire 113 | Import 114 | Téléphone 115 | Lignes 116 | 117 | 118 | 119 | https://github.com/pluginsGLPI/xivo/blob/main/screenshots/inventory_lines.png?raw=true 120 | https://github.com/pluginsGLPI/xivo/blob/main/screenshots/inventory_phones.png?raw=true 121 | 122 | 123 | -------------------------------------------------------------------------------- /locales/pl_PL.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2017-04-04 09:36+0200\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: awiamo, 2017\n" 14 | "Language-Team: Polish (Poland) (https://www.transifex.com/teclib/teams/28042/pl_PL/)\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=CHARSET\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Language: pl_PL\n" 19 | "Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" 20 | 21 | #: setup.php:142 22 | msgid "Installed / not configured" 23 | msgstr "Zainstalowany / Nie skonfigurowany" 24 | 25 | #: inc/line.class.php:12 26 | msgid "Line" 27 | msgid_plural "Lines" 28 | msgstr[0] "" 29 | msgstr[1] "" 30 | msgstr[2] "" 31 | msgstr[3] "" 32 | 33 | #: inc/line.class.php:78 inc/line.class.php:170 inc/phone_line.class.php:237 34 | msgid "Protocol" 35 | msgstr "Protokół" 36 | 37 | #: inc/line.class.php:85 inc/line.class.php:177 38 | msgid "Provisioning extension" 39 | msgstr "" 40 | 41 | #: inc/line.class.php:89 inc/line.class.php:184 inc/phone_line.class.php:240 42 | msgid "Provisioning code" 43 | msgstr "" 44 | 45 | #: inc/line.class.php:96 inc/line.class.php:191 46 | msgid "Device slot" 47 | msgstr "" 48 | 49 | #: inc/line.class.php:100 inc/line.class.php:198 50 | msgid "Position" 51 | msgstr "Pozycja" 52 | 53 | #: inc/line.class.php:107 inc/line.class.php:205 inc/phone_line.class.php:241 54 | msgid "Caller num" 55 | msgstr "" 56 | 57 | #: inc/line.class.php:121 inc/line.class.php:212 inc/phone_line.class.php:242 58 | msgid "Caller name" 59 | msgstr "" 60 | 61 | #: inc/line.class.php:135 inc/line.class.php:227 62 | msgid "Registrar" 63 | msgstr "" 64 | 65 | #: inc/line.class.php:142 inc/line.class.php:234 66 | msgid "Xivo line_id" 67 | msgstr "" 68 | 69 | #: inc/line.class.php:241 70 | msgid "Associated phones" 71 | msgstr "" 72 | 73 | #: inc/line.class.php:297 74 | msgid "Associated lines" 75 | msgstr "" 76 | 77 | #: inc/phone_line.class.php:83 78 | msgid "Add a phone" 79 | msgstr "" 80 | 81 | #: inc/phone_line.class.php:204 82 | msgid "Add a line" 83 | msgstr "" 84 | 85 | #: inc/apiclient.class.php:71 86 | msgid "Api access" 87 | msgstr "Dostęp do API" 88 | 89 | #: inc/apiclient.class.php:72 90 | msgid "Get phone devices" 91 | msgstr "" 92 | 93 | #: inc/apiclient.class.php:74 94 | msgid "Get single device" 95 | msgstr "Pobierz pojedyncze urządzenie" 96 | 97 | #: inc/apiclient.class.php:84 98 | msgid "Get lines" 99 | msgstr "" 100 | 101 | #: inc/apiclient.class.php:86 102 | msgid "Get single line" 103 | msgstr "" 104 | 105 | #: inc/apiclient.class.php:92 106 | msgid "Get users" 107 | msgstr "" 108 | 109 | #: inc/config.class.php:10 110 | msgid "Xivo" 111 | msgstr "" 112 | 113 | #: inc/config.class.php:60 114 | msgid "Import phone devices" 115 | msgstr "" 116 | 117 | #: inc/config.class.php:74 118 | msgid "API url" 119 | msgstr "" 120 | 121 | #: inc/config.class.php:82 122 | msgid "API username" 123 | msgstr "" 124 | 125 | #: inc/config.class.php:91 126 | msgid "API password" 127 | msgstr "" 128 | 129 | #: inc/config.class.php:100 130 | msgid "API check SSL" 131 | msgstr "" 132 | 133 | #: inc/config.class.php:108 134 | msgid "Import devices with empty serial number" 135 | msgstr "" 136 | 137 | #: inc/config.class.php:116 138 | msgid "Import devices with empty mac" 139 | msgstr "" 140 | 141 | #: inc/config.class.php:124 142 | msgid "Import 'not_configured' devices" 143 | msgstr "" 144 | 145 | #: inc/config.class.php:133 146 | msgid "Default entity" 147 | msgstr "" 148 | 149 | #: inc/config.class.php:157 150 | msgid "API XIVO status" 151 | msgstr "" 152 | 153 | #: inc/config.class.php:178 154 | msgid "Last Error" 155 | msgstr "" 156 | 157 | #: inc/config.class.php:188 158 | msgid "Auth token" 159 | msgstr "" 160 | 161 | #: inc/config.class.php:194 162 | msgid "ACL" 163 | msgstr "" 164 | 165 | #: inc/inventory.class.php:13 166 | msgid "Import Xivo assets" 167 | msgstr "" 168 | 169 | #: inc/inventory.class.php:77 170 | #, php-format 171 | msgid "%1$d line imported" 172 | msgid_plural "%1$d lines imported" 173 | msgstr[0] "" 174 | msgstr[1] "" 175 | msgstr[2] "" 176 | msgstr[3] "" 177 | 178 | #: inc/inventory.class.php:115 179 | #, php-format 180 | msgid "%1$d phone imported" 181 | msgid_plural "%1$d phones imported" 182 | msgstr[0] "" 183 | msgstr[1] "" 184 | msgstr[2] "" 185 | msgstr[3] "" 186 | 187 | #: inc/phone.class.php:251 188 | msgid "XIVO informations" 189 | msgstr "" 190 | 191 | #: inc/phone.class.php:255 192 | msgid "Xivo ID" 193 | msgstr "" 194 | 195 | #: inc/phone.class.php:257 196 | msgid "Template" 197 | msgstr "" 198 | 199 | #: inc/phone.class.php:262 200 | msgid "Last synchronisation" 201 | msgstr "" 202 | -------------------------------------------------------------------------------- /js/store2.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ------------------------------------------------------------------------- 3 | * xivo plugin for GLPI 4 | * ------------------------------------------------------------------------- 5 | * 6 | * LICENSE 7 | * 8 | * This file is part of xivo. 9 | * 10 | * xivo is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * xivo is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with xivo. If not, see . 22 | * ------------------------------------------------------------------------- 23 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 24 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 25 | * @link https://github.com/pluginsGLPI/xivo 26 | * ------------------------------------------------------------------------- 27 | */ 28 | 29 | /*! store2 - v2.7.0 - 2018-03-04 30 | * Copyright (c) 2018 Nathan Bubna; Licensed (MIT OR GPL-3.0) */ 31 | 32 | !function(a,b){var c={version:"2.7.0",areas:{},apis:{},inherit:function(a,b){for(var c in a)b.hasOwnProperty(c)||(b[c]=a[c]);return b},stringify:function(a){return void 0===a||"function"==typeof a?a+"":JSON.stringify(a)},parse:function(a){try{return JSON.parse(a)}catch(b){return a}},fn:function(a,b){c.storeAPI[a]=b;for(var d in c.apis)c.apis[d][a]=b},get:function(a,b){return a.getItem(b)},set:function(a,b,c){a.setItem(b,c)},remove:function(a,b){a.removeItem(b)},key:function(a,b){return a.key(b)},length:function(a){return a.length},clear:function(a){a.clear()},Store:function(a,b,d){var e=c.inherit(c.storeAPI,function(a,b,c){return 0===arguments.length?e.getAll():"function"==typeof b?e.transact(a,b,c):void 0!==b?e.set(a,b,c):"string"==typeof a||"number"==typeof a?e.get(a):a?e.setAll(a,b):e.clear()});e._id=a;try{b.setItem("_-bad-_","wolf"),e._area=b,b.removeItem("_-bad-_")}catch(a){}return e._area||(e._area=c.inherit(c.storageAPI,{items:{},name:"fake"})),e._ns=d||"",c.areas[a]||(c.areas[a]=e._area),c.apis[e._ns+e._id]||(c.apis[e._ns+e._id]=e),e},storeAPI:{area:function(a,b){var d=this[a];return d&&d.area||(d=c.Store(a,b,this._ns),this[a]||(this[a]=d)),d},namespace:function(a,b){if(!a)return this._ns?this._ns.substring(0,this._ns.length-1):"";var d=a,e=this[d];return e&&e.namespace||(e=c.Store(this._id,this._area,this._ns+d+"."),this[d]||(this[d]=e),b||e.area("session",c.areas.session)),e},isFake:function(){return"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(a){return this._area.has?this._area.has(this._in(a)):!!(this._in(a)in this._area)},size:function(){return this.keys().length},each:function(a,b){for(var d=0,e=c.length(this._area);dc.length(this._area)&&(e--,d--)}return b||this},keys:function(a){return this.each(function(a,b){b.push(a)},a||[])},get:function(a,b){var d=c.get(this._area,this._in(a));return null!==d?c.parse(d):b||d},getAll:function(a){return this.each(function(a,b){b[a]=this.get(a)},a||{})},transact:function(a,b,c){var d=this.get(a,c),e=b(d);return this.set(a,void 0===e?d:e),this},set:function(a,b,d){var e=this.get(a);return null!=e&&d===!1?b:c.set(this._area,this._in(a),c.stringify(b),d)||e},setAll:function(a,b){var c,d;for(var e in a)d=a[e],this.set(e,d,b)!==d&&(c=!0);return c},add:function(a,b){var d=this.get(a);if(d instanceof Array)b=d.concat(b);else if(null!==d){var e=typeof d;if(e===typeof b&&"object"===e){for(var f in b)d[f]=b[f];b=d}else b=d+b}return c.set(this._area,this._in(a),c.stringify(b)),b},remove:function(a){var b=this.get(a);return c.remove(this._area,this._in(a)),b},clear:function(){return this._ns?this.each(function(a){c.remove(this._area,this._in(a))},1):c.clear(this._area),this},clearAll:function(){var a=this._area;for(var b in c.areas)c.areas.hasOwnProperty(b)&&(this._area=c.areas[b],this.clear());return this._area=a,this},_in:function(a){return"string"!=typeof a&&(a=c.stringify(a)),this._ns?this._ns+a:a},_out:function(a){return this._ns?a&&0===a.indexOf(this._ns)?a.substring(this._ns.length):void 0:a}},storageAPI:{length:0,has:function(a){return this.items.hasOwnProperty(a)},key:function(a){var b=0;for(var c in this.items)if(this.has(c)&&a===b++)return c},setItem:function(a,b){this.has(a)||this.length++,this.items[a]=b},removeItem:function(a){this.has(a)&&(delete this.items[a],this.length--)},getItem:function(a){return this.has(a)?this.items[a]:null},clear:function(){for(var a in this.items)this.removeItem(a)},toString:function(){return this.length+" items in "+this.name+"Storage"}}},d=c.Store("local",function(){try{return localStorage}catch(a){}}());d.local=d,d._=c,d.area("session",function(){try{return sessionStorage}catch(a){}}()),"function"==typeof b&&void 0!==b.amd?b("store2",[],function(){return d}):"undefined"!=typeof module&&module.exports?module.exports=d:(a.store&&(c.conflict=a.store),a.store=d)}(this,this.define); 33 | //# sourceMappingURL=store2.min.js.map -------------------------------------------------------------------------------- /setup.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | define('PLUGIN_XIVO_VERSION', '1.0.0'); 32 | 33 | // Minimal GLPI version, inclusive 34 | define('PLUGIN_XIVO_MIN_GLPI', '9.5'); 35 | // Maximum GLPI version, exclusive 36 | define('PLUGIN_XIVO_MAX_GLPI', '9.6'); 37 | 38 | // disable some feature as they are considered as experimental or deprecated by the editor 39 | define('PLUGIN_XIVO_ENABLE_PRESENCE', '1'); 40 | define('PLUGIN_XIVO_ENABLE_CALLCENTER', '0'); 41 | 42 | if (!defined("PLUGINXIVO_DIR")) { 43 | define("PLUGINXIVO_DIR", __DIR__); 44 | } 45 | 46 | /** 47 | * Init hooks of the plugin. 48 | * REQUIRED 49 | * 50 | * @return void 51 | */ 52 | function plugin_init_xivo() { 53 | global $PLUGIN_HOOKS; 54 | 55 | $PLUGIN_HOOKS['csrf_compliant']['xivo'] = true; 56 | 57 | // add autoload for vendor 58 | include_once(PLUGINXIVO_DIR . "/vendor/autoload.php"); 59 | 60 | // don't load hooks if plugin not enabled (or glpi not logged) 61 | if (!Plugin::isPluginActive('xivo') || !Session::getLoginUserID()) { 62 | return true; 63 | } 64 | 65 | //get plugin config 66 | $xivoconfig = PluginXivoConfig::getConfig(); 67 | 68 | // config page 69 | Plugin::registerClass('PluginXivoConfig', ['addtabon' => 'Config']); 70 | $PLUGIN_HOOKS['config_page']['xivo'] = 'front/config.form.php'; 71 | 72 | // additional tabs 73 | Plugin::registerClass('PluginXivoPhone_Line', 74 | ['addtabon' => ['Phone', 'Line']]); 75 | 76 | // add Line to GLPI types 77 | Plugin::registerClass('PluginXivoLine', 78 | ['addtabon' => 'Line']); 79 | 80 | // css & js 81 | $PLUGIN_HOOKS['add_css']['xivo'] = [ 82 | 'css/animation.css', 83 | 'css/main.css' 84 | ]; 85 | 86 | $PLUGIN_HOOKS['add_javascript']['xivo'] = [ 87 | 'js/common.js', 88 | ]; 89 | if ($xivoconfig['enable_xuc'] 90 | && ($_SESSION['glpiactiveprofile']['interface'] == "central" 91 | || $xivoconfig['enable_xuc_selfservice'])) { 92 | $PLUGIN_HOOKS['add_javascript']['xivo'][] = 'js/xivo/callback.js'; 93 | $PLUGIN_HOOKS['add_javascript']['xivo'][] = 'js/xivo/membership.js'; 94 | $PLUGIN_HOOKS['add_javascript']['xivo'][] = 'js/xivo/cti.js'; 95 | $PLUGIN_HOOKS['add_javascript']['xivo'][] = 'js/store2.min.js'; 96 | $PLUGIN_HOOKS['add_javascript']['xivo'][] = 'js/sessionStorageTabs.js'; 97 | $PLUGIN_HOOKS['add_javascript']['xivo'][] = 'js/xuc.js'; 98 | $PLUGIN_HOOKS['add_javascript']['xivo'][] = 'js/app.js.php'; 99 | } 100 | 101 | // standard hooks 102 | $PLUGIN_HOOKS['item_purge']['xivo'] = [ 103 | 'Phone' => ['PluginXivoPhone', 'phonePurged'] 104 | ]; 105 | 106 | // display autoinventory in phones 107 | $PLUGIN_HOOKS['autoinventory_information']['xivo'] = [ 108 | 'Phone' => ['PluginXivoPhone', 'displayAutoInventory'], 109 | ]; 110 | } 111 | 112 | 113 | /** 114 | * Get the name and the version of the plugin 115 | * REQUIRED 116 | * 117 | * @return array 118 | */ 119 | function plugin_version_xivo() { 120 | 121 | return [ 122 | 'name' => 'xivo', 123 | 'version' => PLUGIN_XIVO_VERSION, 124 | 'author' => 'Teclib\'', 125 | 'license' => '', 126 | 'homepage' => '', 127 | 'requirements' => [ 128 | 'glpi' => [ 129 | 'min' => PLUGIN_XIVO_MIN_GLPI, 130 | 'max' => PLUGIN_XIVO_MAX_GLPI, 131 | ] 132 | ] 133 | ]; 134 | } 135 | 136 | function plugin_xivo_recursive_remove_empty($haystack) { 137 | foreach ($haystack as $key => $value) { 138 | if (is_array($value)) { 139 | if (count($value) == 0) { 140 | unset($haystack[$key]); 141 | } else { 142 | $haystack[$key] = plugin_xivo_recursive_remove_empty($haystack[$key]); 143 | } 144 | } else if ($haystack[$key] === "") { 145 | unset($haystack[$key]); 146 | } 147 | } 148 | 149 | return $haystack; 150 | } 151 | -------------------------------------------------------------------------------- /js/xivo/callback.js: -------------------------------------------------------------------------------- 1 | /** 2 | * ------------------------------------------------------------------------- 3 | * xivo plugin for GLPI 4 | * ------------------------------------------------------------------------- 5 | * 6 | * LICENSE 7 | * 8 | * This file is part of xivo. 9 | * 10 | * xivo is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * xivo is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with xivo. If not, see . 22 | * ------------------------------------------------------------------------- 23 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 24 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 25 | * @link https://github.com/pluginsGLPI/xivo 26 | * ------------------------------------------------------------------------- 27 | */ 28 | 29 | var Callback = { 30 | 31 | 32 | sendCallback : function() { 33 | console.error("Cti Not initialzed: User not logged on"); 34 | }, 35 | init: function(cti) { 36 | this.MessageFactory.init(cti.WebsocketMessageFactory); 37 | this.sendCallback = cti.sendCallback; 38 | }, 39 | getCallbackLists: function() { 40 | var message = this.MessageFactory.createGetCallbackLists(); 41 | this.sendCallback(message); 42 | }, 43 | findCallbackRequest: function(requestId, filters, offset, limit) { 44 | var message = this.MessageFactory.createFindCallbackRequest(requestId, filters, offset, limit); 45 | this.sendCallback(message); 46 | }, 47 | getCallbackPreferredPeriods: function() { 48 | var message = this.MessageFactory.createGetCallbackPreferredPeriods(); 49 | this.sendCallback(message); 50 | }, 51 | takeCallback: function(uuid) { 52 | var message = this.MessageFactory.createTakeCallback(uuid); 53 | this.sendCallback(message); 54 | }, 55 | releaseCallback: function(uuid) { 56 | var message = this.MessageFactory.createReleaseCallback(uuid); 57 | this.sendCallback(message); 58 | }, 59 | startCallback: function(uuid, number) { 60 | var message = this.MessageFactory.createStartCallback(uuid, number); 61 | this.sendCallback(message); 62 | }, 63 | listenCallbackMessage: function(voiceMessageRef) { 64 | var message = this.MessageFactory.listenCallbackMessage(voiceMessageRef); 65 | this.sendCallback(message); 66 | }, 67 | updateCallbackTicket: function(uuid, status, comment, dueDate, periodUuid) { 68 | var message = this.MessageFactory.createUpdateCallbackTicket(uuid, status, comment, dueDate, periodUuid); 69 | this.sendCallback(message); 70 | }, 71 | 72 | MessageType: { 73 | CALLBACKLISTS: 'CallbackLists', 74 | CALLBACKFINDRESPONSE: 'FindCallbackResponseWithId', 75 | CALLBACKTAKEN: 'CallbackTaken', 76 | CALLBACKRELEASED: 'CallbackReleased', 77 | CALLBACKSTARTED: 'CallbackStarted', 78 | CALLBACKCLOTURED: 'CallbackClotured', 79 | CALLBACKPREFERREDPERIODS: 'PreferredCallbackPeriodList', 80 | CALLBACKREQUESTUPDATED: 'CallbackRequestUpdated' 81 | }, 82 | 83 | MessageFactory: { 84 | ctiMessageFactory : { 85 | createMessage : function() { 86 | console.error("Cti Not initialzed: User not logged on"); 87 | } 88 | }, 89 | init: function(ctiMessageFactory) { 90 | this.ctiMessageFactory = ctiMessageFactory; 91 | }, 92 | createMessage: function(command) { 93 | return this.ctiMessageFactory.createMessage(command); 94 | }, 95 | createGetCallbackLists: function() { 96 | return this.createMessage("getCallbackLists"); 97 | }, 98 | createFindCallbackRequest: function(requestId, filters, offset, limit) { 99 | var message = this.createMessage("findCallbackRequest"); 100 | message.id = requestId; 101 | message.request = { filters: filters, offset: offset, limit: limit }; 102 | return message; 103 | }, 104 | createGetCallbackPreferredPeriods: function() { 105 | return this.createMessage("getCallbackPreferredPeriods"); 106 | }, 107 | createTakeCallback: function(uuid) { 108 | var message = this.createMessage("takeCallback"); 109 | message.uuid = uuid; 110 | return message; 111 | }, 112 | createReleaseCallback: function(uuid) { 113 | var message = this.createMessage("releaseCallback"); 114 | message.uuid = uuid; 115 | return message; 116 | }, 117 | createStartCallback: function(uuid, number) { 118 | var message = this.createMessage("startCallback"); 119 | message.uuid = uuid; 120 | message.number = number; 121 | return message; 122 | }, 123 | listenCallbackMessage: function(voiceMessageRef) { 124 | var message = this.createMessage("listenCallbackMessage"); 125 | message.voiceMessageRef = voiceMessageRef; 126 | return message; 127 | }, 128 | createUpdateCallbackTicket: function(uuid, status, comment, dueDate, periodUuid) { 129 | var message = this.createMessage("updateCallbackTicket"); 130 | message.uuid = uuid; 131 | message.status = status; 132 | message.comment = comment; 133 | if(typeof(dueDate) !== "undefined" && typeof(periodUuid) !== "undefined") { 134 | message.dueDate = dueDate; 135 | message.periodUuid = periodUuid; 136 | } 137 | return message; 138 | } 139 | } 140 | }; -------------------------------------------------------------------------------- /locales/xivo.pot: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: PACKAGE VERSION\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" 20 | 21 | #: front/phonecall.php:32 22 | msgid "Xivo plugin not activated" 23 | msgstr "" 24 | 25 | #: inc/phone.class.php:307 26 | msgid "XIVO informations" 27 | msgstr "" 28 | 29 | #: inc/phone.class.php:311 30 | msgid "Xivo ID" 31 | msgstr "" 32 | 33 | #: inc/phone.class.php:313 34 | msgid "Template" 35 | msgstr "" 36 | 37 | #: inc/phone.class.php:318 38 | msgid "Last synchronisation" 39 | msgstr "" 40 | 41 | #: inc/apiclient.class.php:97 42 | msgid "REST API access" 43 | msgstr "" 44 | 45 | #: inc/apiclient.class.php:99 46 | msgid "Get phone devices" 47 | msgstr "" 48 | 49 | #: inc/apiclient.class.php:101 50 | msgid "Get single device" 51 | msgstr "" 52 | 53 | #: inc/apiclient.class.php:111 54 | msgid "Get lines" 55 | msgstr "" 56 | 57 | #: inc/apiclient.class.php:113 58 | msgid "Get single line" 59 | msgstr "" 60 | 61 | #: inc/apiclient.class.php:119 62 | msgid "Get users" 63 | msgstr "" 64 | 65 | #: inc/inventory.class.php:39 66 | msgid "Import Xivo assets" 67 | msgstr "" 68 | 69 | #: inc/inventory.class.php:114 70 | #, php-format 71 | msgid "%1$d line imported" 72 | msgid_plural "%1$d lines imported" 73 | msgstr[0] "" 74 | msgstr[1] "" 75 | 76 | #: inc/inventory.class.php:154 77 | #, php-format 78 | msgid "%1$d phone imported" 79 | msgid_plural "%1$d phones imported" 80 | msgstr[0] "" 81 | msgstr[1] "" 82 | 83 | #: inc/xuc.class.php:37 84 | msgid "Connect to XIVO" 85 | msgstr "" 86 | 87 | #: inc/xuc.class.php:39 88 | msgid "XIVO username" 89 | msgstr "" 90 | 91 | #: inc/xuc.class.php:42 92 | msgid "XIVO password" 93 | msgstr "" 94 | 95 | #: inc/xuc.class.php:45 96 | msgid "XIVO phone number" 97 | msgstr "" 98 | 99 | #: inc/xuc.class.php:69 100 | msgid "XIVO connected" 101 | msgstr "" 102 | 103 | #: inc/xuc.class.php:81 104 | msgid "User" 105 | msgstr "" 106 | 107 | #: inc/xuc.class.php:86 108 | msgid "Phone" 109 | msgstr "" 110 | 111 | #: inc/xuc.class.php:98 112 | msgid "Incoming call" 113 | msgstr "" 114 | 115 | #: inc/xuc.class.php:99 116 | msgid "On call" 117 | msgstr "" 118 | 119 | #: inc/xuc.class.php:100 120 | msgid "Dialing" 121 | msgstr "" 122 | 123 | #: inc/xuc.class.php:109 124 | msgid "Answer" 125 | msgstr "" 126 | 127 | #: inc/xuc.class.php:112 128 | msgid "Hangup" 129 | msgstr "" 130 | 131 | #: inc/xuc.class.php:115 132 | msgid "Hold" 133 | msgstr "" 134 | 135 | #: inc/xuc.class.php:120 136 | msgid "Phone actions" 137 | msgstr "" 138 | 139 | #: inc/xuc.class.php:123 140 | msgid "Dial number" 141 | msgstr "" 142 | 143 | #: inc/xuc.class.php:124 144 | msgid "Transfer to number" 145 | msgstr "" 146 | 147 | #: inc/xuc.class.php:127 148 | msgid "Dial" 149 | msgstr "" 150 | 151 | #: inc/xuc.class.php:130 152 | msgid "Transfer" 153 | msgstr "" 154 | 155 | #: inc/xuc.class.php:192 156 | msgid "User found in GLPI:" 157 | msgstr "" 158 | 159 | #: inc/xuc.class.php:206 160 | msgid "Multiple users found with this phone number" 161 | msgstr "" 162 | 163 | #: inc/phone_line.class.php:111 164 | msgid "Add a phone" 165 | msgstr "" 166 | 167 | #: inc/phone_line.class.php:233 168 | msgid "Add a line" 169 | msgstr "" 170 | 171 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 172 | msgid "Protocol" 173 | msgstr "" 174 | 175 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 176 | msgid "Provisioning code" 177 | msgstr "" 178 | 179 | #: inc/phone_line.class.php:270 180 | msgid "Caller num" 181 | msgstr "" 182 | 183 | #: inc/phone_line.class.php:271 184 | msgid "Caller name" 185 | msgstr "" 186 | 187 | #: inc/line.class.php:38 188 | msgid "Line" 189 | msgid_plural "Lines" 190 | msgstr[0] "" 191 | msgstr[1] "" 192 | 193 | #: inc/line.class.php:146 inc/line.class.php:264 194 | msgid "Xivo line_id" 195 | msgstr "" 196 | 197 | #: inc/line.class.php:153 inc/line.class.php:224 198 | msgid "Provisioning extension" 199 | msgstr "" 200 | 201 | #: inc/line.class.php:164 inc/line.class.php:240 202 | msgid "Device slot" 203 | msgstr "" 204 | 205 | #: inc/line.class.php:168 inc/line.class.php:248 206 | msgid "Position" 207 | msgstr "" 208 | 209 | #: inc/line.class.php:175 inc/line.class.php:256 210 | msgid "Registrar" 211 | msgstr "" 212 | 213 | #: inc/line.class.php:196 214 | msgid "Associated lines" 215 | msgstr "" 216 | 217 | #: inc/config.class.php:36 218 | msgid "Xivo" 219 | msgstr "" 220 | 221 | #: inc/config.class.php:79 222 | msgid "Configuration of XIVO integration" 223 | msgstr "" 224 | 225 | #: inc/config.class.php:84 226 | msgid "XUC integration (click2call, presence, etc)" 227 | msgstr "" 228 | 229 | #: inc/config.class.php:100 230 | msgid "XUC url (with port)" 231 | msgstr "" 232 | 233 | #: inc/config.class.php:109 234 | msgid "Secure connection to WebSocket" 235 | msgstr "" 236 | 237 | #: inc/config.class.php:117 238 | msgid "Enable for Self-service users" 239 | msgstr "" 240 | 241 | #: inc/config.class.php:129 242 | msgid "Click2call" 243 | msgstr "" 244 | 245 | #: inc/config.class.php:140 246 | msgid "Presence" 247 | msgstr "" 248 | 249 | #: inc/config.class.php:152 250 | msgid "Callcenter features" 251 | msgstr "" 252 | 253 | #: inc/config.class.php:163 254 | msgid "Auto-open user/ticket on call" 255 | msgstr "" 256 | 257 | #: inc/config.class.php:172 258 | msgid "Auto-open in new window" 259 | msgstr "" 260 | 261 | #: inc/config.class.php:181 262 | msgid "Keep xuc session" 263 | msgstr "" 264 | 265 | #: inc/config.class.php:195 266 | msgid "Import assets into GLPI inventory" 267 | msgstr "" 268 | 269 | #: inc/config.class.php:211 270 | msgid "API REST url" 271 | msgstr "" 272 | 273 | #: inc/config.class.php:266 274 | msgid "Import phones" 275 | msgstr "" 276 | 277 | #: inc/config.class.php:278 278 | msgid "Also import phones with" 279 | msgstr "" 280 | 281 | #: inc/config.class.php:282 282 | msgid "empty serial" 283 | msgstr "" 284 | 285 | #: inc/config.class.php:291 286 | msgid "empty mac" 287 | msgstr "" 288 | 289 | #: inc/config.class.php:300 290 | msgid "'not_configured' state" 291 | msgstr "" 292 | 293 | #: inc/config.class.php:311 294 | msgid "Import lines" 295 | msgstr "" 296 | 297 | #: inc/config.class.php:325 298 | msgid "Import phones-lines relation" 299 | msgstr "" 300 | 301 | #: inc/config.class.php:350 302 | msgid "REST API status" 303 | msgstr "" 304 | 305 | #: inc/config.class.php:371 306 | msgid "Last Error" 307 | msgstr "" 308 | 309 | #: inc/config.class.php:381 310 | msgid "Auth token" 311 | msgstr "" 312 | 313 | #: inc/config.class.php:387 314 | msgid "ACL" 315 | msgstr "" 316 | -------------------------------------------------------------------------------- /locales/zh_CN.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # liAnGjiA , 2018 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: liAnGjiA , 2018\n" 17 | "Language-Team: Chinese (China) (https://www.transifex.com/teclib/teams/28042/zh_CN/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: zh_CN\n" 22 | "Plural-Forms: nplurals=1; plural=0;\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "模板" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "导入Xivo 资产" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "" 77 | 78 | #: inc/inventory.class.php:154 79 | #, php-format 80 | msgid "%1$d phone imported" 81 | msgid_plural "%1$d phones imported" 82 | msgstr[0] "" 83 | 84 | #: inc/xuc.class.php:37 85 | msgid "Connect to XIVO" 86 | msgstr "" 87 | 88 | #: inc/xuc.class.php:39 89 | msgid "XIVO username" 90 | msgstr "" 91 | 92 | #: inc/xuc.class.php:42 93 | msgid "XIVO password" 94 | msgstr "" 95 | 96 | #: inc/xuc.class.php:45 97 | msgid "XIVO phone number" 98 | msgstr "" 99 | 100 | #: inc/xuc.class.php:69 101 | msgid "XIVO connected" 102 | msgstr "" 103 | 104 | #: inc/xuc.class.php:81 105 | msgid "User" 106 | msgstr "" 107 | 108 | #: inc/xuc.class.php:86 109 | msgid "Phone" 110 | msgstr "" 111 | 112 | #: inc/xuc.class.php:98 113 | msgid "Incoming call" 114 | msgstr "" 115 | 116 | #: inc/xuc.class.php:99 117 | msgid "On call" 118 | msgstr "" 119 | 120 | #: inc/xuc.class.php:100 121 | msgid "Dialing" 122 | msgstr "" 123 | 124 | #: inc/xuc.class.php:109 125 | msgid "Answer" 126 | msgstr "" 127 | 128 | #: inc/xuc.class.php:112 129 | msgid "Hangup" 130 | msgstr "" 131 | 132 | #: inc/xuc.class.php:115 133 | msgid "Hold" 134 | msgstr "" 135 | 136 | #: inc/xuc.class.php:120 137 | msgid "Phone actions" 138 | msgstr "" 139 | 140 | #: inc/xuc.class.php:123 141 | msgid "Dial number" 142 | msgstr "" 143 | 144 | #: inc/xuc.class.php:124 145 | msgid "Transfer to number" 146 | msgstr "" 147 | 148 | #: inc/xuc.class.php:127 149 | msgid "Dial" 150 | msgstr "" 151 | 152 | #: inc/xuc.class.php:130 153 | msgid "Transfer" 154 | msgstr "" 155 | 156 | #: inc/xuc.class.php:192 157 | msgid "User found in GLPI:" 158 | msgstr "" 159 | 160 | #: inc/xuc.class.php:206 161 | msgid "Multiple users found with this phone number" 162 | msgstr "" 163 | 164 | #: inc/phone_line.class.php:111 165 | msgid "Add a phone" 166 | msgstr "添加号码" 167 | 168 | #: inc/phone_line.class.php:233 169 | msgid "Add a line" 170 | msgstr "添加线路" 171 | 172 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 173 | msgid "Protocol" 174 | msgstr "协议" 175 | 176 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 177 | msgid "Provisioning code" 178 | msgstr "" 179 | 180 | #: inc/phone_line.class.php:270 181 | msgid "Caller num" 182 | msgstr "来电号码" 183 | 184 | #: inc/phone_line.class.php:271 185 | msgid "Caller name" 186 | msgstr "来电者" 187 | 188 | #: inc/line.class.php:38 189 | msgid "Line" 190 | msgid_plural "Lines" 191 | msgstr[0] "线路" 192 | 193 | #: inc/line.class.php:146 inc/line.class.php:264 194 | msgid "Xivo line_id" 195 | msgstr "Xivo line_id" 196 | 197 | #: inc/line.class.php:153 inc/line.class.php:224 198 | msgid "Provisioning extension" 199 | msgstr "" 200 | 201 | #: inc/line.class.php:164 inc/line.class.php:240 202 | msgid "Device slot" 203 | msgstr "设备插槽" 204 | 205 | #: inc/line.class.php:168 inc/line.class.php:248 206 | msgid "Position" 207 | msgstr "" 208 | 209 | #: inc/line.class.php:175 inc/line.class.php:256 210 | msgid "Registrar" 211 | msgstr "" 212 | 213 | #: inc/line.class.php:196 214 | msgid "Associated lines" 215 | msgstr "" 216 | 217 | #: inc/config.class.php:36 218 | msgid "Xivo" 219 | msgstr "Xivo" 220 | 221 | #: inc/config.class.php:79 222 | msgid "Configuration of XIVO integration" 223 | msgstr "" 224 | 225 | #: inc/config.class.php:84 226 | msgid "XUC integration (click2call, presence, etc)" 227 | msgstr "" 228 | 229 | #: inc/config.class.php:100 230 | msgid "XUC url (with port)" 231 | msgstr "" 232 | 233 | #: inc/config.class.php:109 234 | msgid "Secure connection to WebSocket" 235 | msgstr "" 236 | 237 | #: inc/config.class.php:117 238 | msgid "Enable for Self-service users" 239 | msgstr "" 240 | 241 | #: inc/config.class.php:129 242 | msgid "Click2call" 243 | msgstr "" 244 | 245 | #: inc/config.class.php:140 246 | msgid "Presence" 247 | msgstr "" 248 | 249 | #: inc/config.class.php:152 250 | msgid "Callcenter features" 251 | msgstr "" 252 | 253 | #: inc/config.class.php:163 254 | msgid "Auto-open user/ticket on call" 255 | msgstr "" 256 | 257 | #: inc/config.class.php:172 258 | msgid "Auto-open in new window" 259 | msgstr "" 260 | 261 | #: inc/config.class.php:181 262 | msgid "Keep xuc session" 263 | msgstr "" 264 | 265 | #: inc/config.class.php:195 266 | msgid "Import assets into GLPI inventory" 267 | msgstr "" 268 | 269 | #: inc/config.class.php:211 270 | msgid "API REST url" 271 | msgstr "" 272 | 273 | #: inc/config.class.php:266 274 | msgid "Import phones" 275 | msgstr "" 276 | 277 | #: inc/config.class.php:278 278 | msgid "Also import phones with" 279 | msgstr "" 280 | 281 | #: inc/config.class.php:282 282 | msgid "empty serial" 283 | msgstr "" 284 | 285 | #: inc/config.class.php:291 286 | msgid "empty mac" 287 | msgstr "" 288 | 289 | #: inc/config.class.php:300 290 | msgid "'not_configured' state" 291 | msgstr "" 292 | 293 | #: inc/config.class.php:311 294 | msgid "Import lines" 295 | msgstr "" 296 | 297 | #: inc/config.class.php:325 298 | msgid "Import phones-lines relation" 299 | msgstr "" 300 | 301 | #: inc/config.class.php:350 302 | msgid "REST API status" 303 | msgstr "" 304 | 305 | #: inc/config.class.php:371 306 | msgid "Last Error" 307 | msgstr "" 308 | 309 | #: inc/config.class.php:381 310 | msgid "Auth token" 311 | msgstr "认证token" 312 | 313 | #: inc/config.class.php:387 314 | msgid "ACL" 315 | msgstr "ACL" 316 | -------------------------------------------------------------------------------- /inc/inventory.class.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | if (!defined('GLPI_ROOT')) { 32 | die("Sorry. You can't access this file directly"); 33 | } 34 | 35 | class PluginXivoInventory extends CommonGLPI { 36 | const NOT_CONFIGURED = 'not_configured'; 37 | 38 | static function cronInfo($name) { 39 | switch ($name) { 40 | case 'xivoimport' : 41 | return ['description' => __('Import Xivo assets', 'xivo')]; 42 | } 43 | 44 | return []; 45 | } 46 | 47 | /** 48 | * Execute a full inventory synchronisation 49 | * Import from xivo api: 50 | * - Phones 51 | * - Lines 52 | * - Association with users 53 | * 54 | * @param CronTask $crontask 55 | * @return boolean 56 | */ 57 | static function cronXivoimport(CronTask $crontask) { 58 | $xivoconfig = PluginXivoConfig::getConfig(); 59 | $apiclient = new PluginXivoAPIClient; 60 | $totaldevices = 0; 61 | $totallines = 0; 62 | $phone_lines = []; 63 | 64 | // check if api config is valid 65 | if (!PluginXivoConfig::isValid(true)) { 66 | return false; 67 | } 68 | 69 | // check if import asset is enabled 70 | if (!$xivoconfig['import_assets']) { 71 | return true; 72 | } 73 | 74 | // track execution time 75 | $time_start = microtime(true); 76 | 77 | // retrieve phones 78 | $phones = []; 79 | if ($xivoconfig['import_phones']) { 80 | $phones = $apiclient->paginate('Devices'); 81 | } 82 | 83 | // retrieve lines 84 | $lines = []; 85 | if ($xivoconfig['import_lines']) { 86 | $lines = $apiclient->paginate('Lines'); 87 | } 88 | 89 | // retrieve users 90 | $users = $apiclient->paginate('Users'); 91 | 92 | // build an association between call_id (present in lines) and username (ldap) 93 | $caller_id_list = []; 94 | foreach ($users as $user) { 95 | if (!empty($user['username'])) { 96 | $caller_id_name = trim($user['caller_id'], '"'); 97 | $caller_id_list[$caller_id_name] = $user['username']; 98 | } 99 | } 100 | 101 | // import lines 102 | foreach ($lines as &$line) { 103 | //check if we can retrive the ldap username 104 | $line['glpi_users_id'] = 0; 105 | if (isset($caller_id_list[$line['caller_id_name']])) { 106 | $line['glpi_users_id'] = User::getIdByName($caller_id_list[$line['caller_id_name']]); 107 | } 108 | 109 | // add or update assets 110 | $lines_id = PluginXivoLine::importSingle($line); 111 | $line['lines_id'] = $lines_id; 112 | $totallines += (int) (bool) $lines_id; 113 | } 114 | 115 | if ($totallines) { 116 | $crontask->log(sprintf(_n('%1$d line imported', 117 | '%1$d lines imported', 118 | $totallines, 'xivo')."\n", 119 | $totallines)); 120 | } 121 | 122 | foreach ($phones as $index => &$phone) { 123 | // remove phones with missing mandatory informations 124 | if (!$xivoconfig['import_empty_sn'] 125 | && empty($phone['sn'])) { 126 | unset($phones[$index]); 127 | continue; 128 | } 129 | if (!$xivoconfig['import_empty_mac'] 130 | && empty($phone['mac'])) { 131 | unset($phones[$index]); 132 | continue; 133 | } 134 | if (!$xivoconfig['import_notconfig'] 135 | && $phone['status'] == self::NOT_CONFIGURED) { 136 | unset($phones[$index]); 137 | continue; 138 | } 139 | 140 | // find possible lines for this device 141 | $phone['lines'] = []; 142 | if ($xivoconfig['import_phonelines']) { 143 | foreach ($lines as $line) { 144 | if ($line['device_id'] == $phone['id']) { 145 | $phone['lines'][] = $line; 146 | } 147 | } 148 | } 149 | 150 | // add or update assets 151 | $phones_id = PluginXivoPhone::importSingle($phone); 152 | $totaldevices += (int) (bool) $phones_id; 153 | } 154 | 155 | if ($totaldevices) { 156 | $crontask->log(sprintf(_n('%1$d phone imported', 157 | '%1$d phones imported', 158 | $totaldevices, 'xivo')."\n", 159 | $totaldevices)); 160 | } 161 | $totalimported = $totaldevices + $totallines; 162 | 163 | // end track of execution time 164 | $time_end = microtime(true); 165 | $totaltime = $time_end - $time_start; 166 | if ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) { 167 | Toolbox::logDebug("XIVO import (time + number)", round($totaltime, 2), $totalimported); 168 | } 169 | 170 | $crontask->setVolume($totalimported); 171 | if ($totalimported) { 172 | return true; 173 | } else { 174 | return false; 175 | } 176 | } 177 | 178 | /** 179 | * Database table installation for the item type 180 | * 181 | * @param Migration $migration 182 | * @return boolean True on success 183 | */ 184 | static function install(Migration $migration) { 185 | CronTask::register(__CLASS__, 186 | 'xivoimport', 187 | 12 * HOUR_TIMESTAMP, 188 | [ 189 | 'comment' => 'Import assets from xivo-confd api', 190 | 'mode' => CronTask::MODE_EXTERNAL 191 | ]); 192 | 193 | return true; 194 | } 195 | 196 | /** 197 | * Database table uninstallation for the item type 198 | * 199 | * @return boolean True on success 200 | */ 201 | static function uninstall() { 202 | return true; 203 | } 204 | } -------------------------------------------------------------------------------- /locales/en_GB.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # alexandre delaunay , 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: alexandre delaunay , 2017\n" 17 | "Language-Team: English (United Kingdom) (https://www.transifex.com/teclib/teams/28042/en_GB/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: en_GB\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "XIVO informations" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "Xivo ID" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Template" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Last synchronisation" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Get phone devices" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Get single device" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Get lines" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Get single line" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Get users" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Import Xivo assets" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d line imported" 77 | msgstr[1] "%1$d lines imported" 78 | 79 | #: inc/inventory.class.php:154 80 | #, php-format 81 | msgid "%1$d phone imported" 82 | msgid_plural "%1$d phones imported" 83 | msgstr[0] "%1$d phone imported" 84 | msgstr[1] "%1$d phones imported" 85 | 86 | #: inc/xuc.class.php:37 87 | msgid "Connect to XIVO" 88 | msgstr "" 89 | 90 | #: inc/xuc.class.php:39 91 | msgid "XIVO username" 92 | msgstr "" 93 | 94 | #: inc/xuc.class.php:42 95 | msgid "XIVO password" 96 | msgstr "" 97 | 98 | #: inc/xuc.class.php:45 99 | msgid "XIVO phone number" 100 | msgstr "" 101 | 102 | #: inc/xuc.class.php:69 103 | msgid "XIVO connected" 104 | msgstr "" 105 | 106 | #: inc/xuc.class.php:81 107 | msgid "User" 108 | msgstr "" 109 | 110 | #: inc/xuc.class.php:86 111 | msgid "Phone" 112 | msgstr "" 113 | 114 | #: inc/xuc.class.php:98 115 | msgid "Incoming call" 116 | msgstr "" 117 | 118 | #: inc/xuc.class.php:99 119 | msgid "On call" 120 | msgstr "" 121 | 122 | #: inc/xuc.class.php:100 123 | msgid "Dialing" 124 | msgstr "" 125 | 126 | #: inc/xuc.class.php:109 127 | msgid "Answer" 128 | msgstr "" 129 | 130 | #: inc/xuc.class.php:112 131 | msgid "Hangup" 132 | msgstr "" 133 | 134 | #: inc/xuc.class.php:115 135 | msgid "Hold" 136 | msgstr "" 137 | 138 | #: inc/xuc.class.php:120 139 | msgid "Phone actions" 140 | msgstr "" 141 | 142 | #: inc/xuc.class.php:123 143 | msgid "Dial number" 144 | msgstr "" 145 | 146 | #: inc/xuc.class.php:124 147 | msgid "Transfer to number" 148 | msgstr "" 149 | 150 | #: inc/xuc.class.php:127 151 | msgid "Dial" 152 | msgstr "" 153 | 154 | #: inc/xuc.class.php:130 155 | msgid "Transfer" 156 | msgstr "" 157 | 158 | #: inc/xuc.class.php:192 159 | msgid "User found in GLPI:" 160 | msgstr "" 161 | 162 | #: inc/xuc.class.php:206 163 | msgid "Multiple users found with this phone number" 164 | msgstr "" 165 | 166 | #: inc/phone_line.class.php:111 167 | msgid "Add a phone" 168 | msgstr "Add a phone" 169 | 170 | #: inc/phone_line.class.php:233 171 | msgid "Add a line" 172 | msgstr "Add a line" 173 | 174 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 175 | msgid "Protocol" 176 | msgstr "Protocol" 177 | 178 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 179 | msgid "Provisioning code" 180 | msgstr "Provisioning code" 181 | 182 | #: inc/phone_line.class.php:270 183 | msgid "Caller num" 184 | msgstr "Caller num" 185 | 186 | #: inc/phone_line.class.php:271 187 | msgid "Caller name" 188 | msgstr "Caller name" 189 | 190 | #: inc/line.class.php:38 191 | msgid "Line" 192 | msgid_plural "Lines" 193 | msgstr[0] "Line" 194 | msgstr[1] "Lines" 195 | 196 | #: inc/line.class.php:146 inc/line.class.php:264 197 | msgid "Xivo line_id" 198 | msgstr "Xivo line_id" 199 | 200 | #: inc/line.class.php:153 inc/line.class.php:224 201 | msgid "Provisioning extension" 202 | msgstr "Provisioning extension" 203 | 204 | #: inc/line.class.php:164 inc/line.class.php:240 205 | msgid "Device slot" 206 | msgstr "Device slot" 207 | 208 | #: inc/line.class.php:168 inc/line.class.php:248 209 | msgid "Position" 210 | msgstr "Position" 211 | 212 | #: inc/line.class.php:175 inc/line.class.php:256 213 | msgid "Registrar" 214 | msgstr "Registrar" 215 | 216 | #: inc/line.class.php:196 217 | msgid "Associated lines" 218 | msgstr "Associated lines" 219 | 220 | #: inc/config.class.php:36 221 | msgid "Xivo" 222 | msgstr "Xivo" 223 | 224 | #: inc/config.class.php:79 225 | msgid "Configuration of XIVO integration" 226 | msgstr "" 227 | 228 | #: inc/config.class.php:84 229 | msgid "XUC integration (click2call, presence, etc)" 230 | msgstr "" 231 | 232 | #: inc/config.class.php:100 233 | msgid "XUC url (with port)" 234 | msgstr "" 235 | 236 | #: inc/config.class.php:109 237 | msgid "Secure connection to WebSocket" 238 | msgstr "" 239 | 240 | #: inc/config.class.php:117 241 | msgid "Enable for Self-service users" 242 | msgstr "" 243 | 244 | #: inc/config.class.php:129 245 | msgid "Click2call" 246 | msgstr "" 247 | 248 | #: inc/config.class.php:140 249 | msgid "Presence" 250 | msgstr "" 251 | 252 | #: inc/config.class.php:152 253 | msgid "Callcenter features" 254 | msgstr "" 255 | 256 | #: inc/config.class.php:163 257 | msgid "Auto-open user/ticket on call" 258 | msgstr "" 259 | 260 | #: inc/config.class.php:172 261 | msgid "Auto-open in new window" 262 | msgstr "" 263 | 264 | #: inc/config.class.php:181 265 | msgid "Keep xuc session" 266 | msgstr "" 267 | 268 | #: inc/config.class.php:195 269 | msgid "Import assets into GLPI inventory" 270 | msgstr "" 271 | 272 | #: inc/config.class.php:211 273 | msgid "API REST url" 274 | msgstr "" 275 | 276 | #: inc/config.class.php:266 277 | msgid "Import phones" 278 | msgstr "" 279 | 280 | #: inc/config.class.php:278 281 | msgid "Also import phones with" 282 | msgstr "" 283 | 284 | #: inc/config.class.php:282 285 | msgid "empty serial" 286 | msgstr "" 287 | 288 | #: inc/config.class.php:291 289 | msgid "empty mac" 290 | msgstr "" 291 | 292 | #: inc/config.class.php:300 293 | msgid "'not_configured' state" 294 | msgstr "" 295 | 296 | #: inc/config.class.php:311 297 | msgid "Import lines" 298 | msgstr "" 299 | 300 | #: inc/config.class.php:325 301 | msgid "Import phones-lines relation" 302 | msgstr "" 303 | 304 | #: inc/config.class.php:350 305 | msgid "REST API status" 306 | msgstr "" 307 | 308 | #: inc/config.class.php:371 309 | msgid "Last Error" 310 | msgstr "Last Error" 311 | 312 | #: inc/config.class.php:381 313 | msgid "Auth token" 314 | msgstr "Auth token" 315 | 316 | #: inc/config.class.php:387 317 | msgid "ACL" 318 | msgstr "ACL" 319 | -------------------------------------------------------------------------------- /locales/en_US.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # alexandre delaunay , 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: alexandre delaunay , 2017\n" 17 | "Language-Team: English (United States) (https://www.transifex.com/teclib/teams/28042/en_US/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: en_US\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "XIVO informations" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "Xivo ID" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Template" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Last synchronisation" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Get phone devices" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Get single device" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Get lines" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Get single line" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Get users" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Import Xivo assets" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d line imported" 77 | msgstr[1] "%1$d lines imported" 78 | 79 | #: inc/inventory.class.php:154 80 | #, php-format 81 | msgid "%1$d phone imported" 82 | msgid_plural "%1$d phones imported" 83 | msgstr[0] "%1$d phone imported" 84 | msgstr[1] "%1$d phones imported" 85 | 86 | #: inc/xuc.class.php:37 87 | msgid "Connect to XIVO" 88 | msgstr "" 89 | 90 | #: inc/xuc.class.php:39 91 | msgid "XIVO username" 92 | msgstr "" 93 | 94 | #: inc/xuc.class.php:42 95 | msgid "XIVO password" 96 | msgstr "" 97 | 98 | #: inc/xuc.class.php:45 99 | msgid "XIVO phone number" 100 | msgstr "" 101 | 102 | #: inc/xuc.class.php:69 103 | msgid "XIVO connected" 104 | msgstr "" 105 | 106 | #: inc/xuc.class.php:81 107 | msgid "User" 108 | msgstr "" 109 | 110 | #: inc/xuc.class.php:86 111 | msgid "Phone" 112 | msgstr "" 113 | 114 | #: inc/xuc.class.php:98 115 | msgid "Incoming call" 116 | msgstr "" 117 | 118 | #: inc/xuc.class.php:99 119 | msgid "On call" 120 | msgstr "" 121 | 122 | #: inc/xuc.class.php:100 123 | msgid "Dialing" 124 | msgstr "" 125 | 126 | #: inc/xuc.class.php:109 127 | msgid "Answer" 128 | msgstr "" 129 | 130 | #: inc/xuc.class.php:112 131 | msgid "Hangup" 132 | msgstr "" 133 | 134 | #: inc/xuc.class.php:115 135 | msgid "Hold" 136 | msgstr "" 137 | 138 | #: inc/xuc.class.php:120 139 | msgid "Phone actions" 140 | msgstr "" 141 | 142 | #: inc/xuc.class.php:123 143 | msgid "Dial number" 144 | msgstr "" 145 | 146 | #: inc/xuc.class.php:124 147 | msgid "Transfer to number" 148 | msgstr "" 149 | 150 | #: inc/xuc.class.php:127 151 | msgid "Dial" 152 | msgstr "" 153 | 154 | #: inc/xuc.class.php:130 155 | msgid "Transfer" 156 | msgstr "" 157 | 158 | #: inc/xuc.class.php:192 159 | msgid "User found in GLPI:" 160 | msgstr "" 161 | 162 | #: inc/xuc.class.php:206 163 | msgid "Multiple users found with this phone number" 164 | msgstr "" 165 | 166 | #: inc/phone_line.class.php:111 167 | msgid "Add a phone" 168 | msgstr "Add a phone" 169 | 170 | #: inc/phone_line.class.php:233 171 | msgid "Add a line" 172 | msgstr "Add a line" 173 | 174 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 175 | msgid "Protocol" 176 | msgstr "Protocol" 177 | 178 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 179 | msgid "Provisioning code" 180 | msgstr "Provisioning code" 181 | 182 | #: inc/phone_line.class.php:270 183 | msgid "Caller num" 184 | msgstr "Caller num" 185 | 186 | #: inc/phone_line.class.php:271 187 | msgid "Caller name" 188 | msgstr "Caller name" 189 | 190 | #: inc/line.class.php:38 191 | msgid "Line" 192 | msgid_plural "Lines" 193 | msgstr[0] "Line" 194 | msgstr[1] "Lines" 195 | 196 | #: inc/line.class.php:146 inc/line.class.php:264 197 | msgid "Xivo line_id" 198 | msgstr "Xivo line_id" 199 | 200 | #: inc/line.class.php:153 inc/line.class.php:224 201 | msgid "Provisioning extension" 202 | msgstr "Provisioning extension" 203 | 204 | #: inc/line.class.php:164 inc/line.class.php:240 205 | msgid "Device slot" 206 | msgstr "Device slot" 207 | 208 | #: inc/line.class.php:168 inc/line.class.php:248 209 | msgid "Position" 210 | msgstr "Position" 211 | 212 | #: inc/line.class.php:175 inc/line.class.php:256 213 | msgid "Registrar" 214 | msgstr "Registrar" 215 | 216 | #: inc/line.class.php:196 217 | msgid "Associated lines" 218 | msgstr "Associated lines" 219 | 220 | #: inc/config.class.php:36 221 | msgid "Xivo" 222 | msgstr "Xivo" 223 | 224 | #: inc/config.class.php:79 225 | msgid "Configuration of XIVO integration" 226 | msgstr "" 227 | 228 | #: inc/config.class.php:84 229 | msgid "XUC integration (click2call, presence, etc)" 230 | msgstr "" 231 | 232 | #: inc/config.class.php:100 233 | msgid "XUC url (with port)" 234 | msgstr "" 235 | 236 | #: inc/config.class.php:109 237 | msgid "Secure connection to WebSocket" 238 | msgstr "" 239 | 240 | #: inc/config.class.php:117 241 | msgid "Enable for Self-service users" 242 | msgstr "" 243 | 244 | #: inc/config.class.php:129 245 | msgid "Click2call" 246 | msgstr "" 247 | 248 | #: inc/config.class.php:140 249 | msgid "Presence" 250 | msgstr "" 251 | 252 | #: inc/config.class.php:152 253 | msgid "Callcenter features" 254 | msgstr "" 255 | 256 | #: inc/config.class.php:163 257 | msgid "Auto-open user/ticket on call" 258 | msgstr "" 259 | 260 | #: inc/config.class.php:172 261 | msgid "Auto-open in new window" 262 | msgstr "" 263 | 264 | #: inc/config.class.php:181 265 | msgid "Keep xuc session" 266 | msgstr "" 267 | 268 | #: inc/config.class.php:195 269 | msgid "Import assets into GLPI inventory" 270 | msgstr "" 271 | 272 | #: inc/config.class.php:211 273 | msgid "API REST url" 274 | msgstr "" 275 | 276 | #: inc/config.class.php:266 277 | msgid "Import phones" 278 | msgstr "" 279 | 280 | #: inc/config.class.php:278 281 | msgid "Also import phones with" 282 | msgstr "" 283 | 284 | #: inc/config.class.php:282 285 | msgid "empty serial" 286 | msgstr "" 287 | 288 | #: inc/config.class.php:291 289 | msgid "empty mac" 290 | msgstr "" 291 | 292 | #: inc/config.class.php:300 293 | msgid "'not_configured' state" 294 | msgstr "" 295 | 296 | #: inc/config.class.php:311 297 | msgid "Import lines" 298 | msgstr "" 299 | 300 | #: inc/config.class.php:325 301 | msgid "Import phones-lines relation" 302 | msgstr "" 303 | 304 | #: inc/config.class.php:350 305 | msgid "REST API status" 306 | msgstr "" 307 | 308 | #: inc/config.class.php:371 309 | msgid "Last Error" 310 | msgstr "Last Error" 311 | 312 | #: inc/config.class.php:381 313 | msgid "Auth token" 314 | msgstr "Auth token" 315 | 316 | #: inc/config.class.php:387 317 | msgid "ACL" 318 | msgstr "ACL" 319 | -------------------------------------------------------------------------------- /locales/nl_NL.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Dominique Depireux , 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: Dominique Depireux , 2017\n" 17 | "Language-Team: Dutch (Netherlands) (https://www.transifex.com/teclib/teams/28042/nl_NL/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: nl_NL\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "Xivo informaties" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "Xivo ID" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "sjabloon" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "laatste synchronisatie" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr " telefoon apparaten Krijgen" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "enkele apparaten krijgen" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Lijn krijgen" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Enkele lijn krijgen" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Gebrijkers krijgen" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Xivo activa importeren" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d geimporteerde lijn" 77 | msgstr[1] "%1$d geimporteerde lijnen" 78 | 79 | #: inc/inventory.class.php:154 80 | #, php-format 81 | msgid "%1$d phone imported" 82 | msgid_plural "%1$d phones imported" 83 | msgstr[0] "%1$d geimporteerde telefoon" 84 | msgstr[1] "%1$d geimporteerde telefoons" 85 | 86 | #: inc/xuc.class.php:37 87 | msgid "Connect to XIVO" 88 | msgstr "" 89 | 90 | #: inc/xuc.class.php:39 91 | msgid "XIVO username" 92 | msgstr "" 93 | 94 | #: inc/xuc.class.php:42 95 | msgid "XIVO password" 96 | msgstr "" 97 | 98 | #: inc/xuc.class.php:45 99 | msgid "XIVO phone number" 100 | msgstr "" 101 | 102 | #: inc/xuc.class.php:69 103 | msgid "XIVO connected" 104 | msgstr "" 105 | 106 | #: inc/xuc.class.php:81 107 | msgid "User" 108 | msgstr "" 109 | 110 | #: inc/xuc.class.php:86 111 | msgid "Phone" 112 | msgstr "" 113 | 114 | #: inc/xuc.class.php:98 115 | msgid "Incoming call" 116 | msgstr "" 117 | 118 | #: inc/xuc.class.php:99 119 | msgid "On call" 120 | msgstr "" 121 | 122 | #: inc/xuc.class.php:100 123 | msgid "Dialing" 124 | msgstr "" 125 | 126 | #: inc/xuc.class.php:109 127 | msgid "Answer" 128 | msgstr "" 129 | 130 | #: inc/xuc.class.php:112 131 | msgid "Hangup" 132 | msgstr "" 133 | 134 | #: inc/xuc.class.php:115 135 | msgid "Hold" 136 | msgstr "" 137 | 138 | #: inc/xuc.class.php:120 139 | msgid "Phone actions" 140 | msgstr "" 141 | 142 | #: inc/xuc.class.php:123 143 | msgid "Dial number" 144 | msgstr "" 145 | 146 | #: inc/xuc.class.php:124 147 | msgid "Transfer to number" 148 | msgstr "" 149 | 150 | #: inc/xuc.class.php:127 151 | msgid "Dial" 152 | msgstr "" 153 | 154 | #: inc/xuc.class.php:130 155 | msgid "Transfer" 156 | msgstr "" 157 | 158 | #: inc/xuc.class.php:192 159 | msgid "User found in GLPI:" 160 | msgstr "" 161 | 162 | #: inc/xuc.class.php:206 163 | msgid "Multiple users found with this phone number" 164 | msgstr "" 165 | 166 | #: inc/phone_line.class.php:111 167 | msgid "Add a phone" 168 | msgstr "Telefoon voegen" 169 | 170 | #: inc/phone_line.class.php:233 171 | msgid "Add a line" 172 | msgstr "Lijn voegen" 173 | 174 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 175 | msgid "Protocol" 176 | msgstr "Protocol" 177 | 178 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 179 | msgid "Provisioning code" 180 | msgstr "provisioning code" 181 | 182 | #: inc/phone_line.class.php:270 183 | msgid "Caller num" 184 | msgstr "beller num" 185 | 186 | #: inc/phone_line.class.php:271 187 | msgid "Caller name" 188 | msgstr "beller naam" 189 | 190 | #: inc/line.class.php:38 191 | msgid "Line" 192 | msgid_plural "Lines" 193 | msgstr[0] "lijn" 194 | msgstr[1] "lijnen" 195 | 196 | #: inc/line.class.php:146 inc/line.class.php:264 197 | msgid "Xivo line_id" 198 | msgstr "Xivo line_id" 199 | 200 | #: inc/line.class.php:153 inc/line.class.php:224 201 | msgid "Provisioning extension" 202 | msgstr "provisioning verlenging" 203 | 204 | #: inc/line.class.php:164 inc/line.class.php:240 205 | msgid "Device slot" 206 | msgstr "inrichting slot" 207 | 208 | #: inc/line.class.php:168 inc/line.class.php:248 209 | msgid "Position" 210 | msgstr "Positie" 211 | 212 | #: inc/line.class.php:175 inc/line.class.php:256 213 | msgid "Registrar" 214 | msgstr "griffier" 215 | 216 | #: inc/line.class.php:196 217 | msgid "Associated lines" 218 | msgstr "bijbehorende lijnen" 219 | 220 | #: inc/config.class.php:36 221 | msgid "Xivo" 222 | msgstr "Xivo" 223 | 224 | #: inc/config.class.php:79 225 | msgid "Configuration of XIVO integration" 226 | msgstr "" 227 | 228 | #: inc/config.class.php:84 229 | msgid "XUC integration (click2call, presence, etc)" 230 | msgstr "" 231 | 232 | #: inc/config.class.php:100 233 | msgid "XUC url (with port)" 234 | msgstr "" 235 | 236 | #: inc/config.class.php:109 237 | msgid "Secure connection to WebSocket" 238 | msgstr "" 239 | 240 | #: inc/config.class.php:117 241 | msgid "Enable for Self-service users" 242 | msgstr "" 243 | 244 | #: inc/config.class.php:129 245 | msgid "Click2call" 246 | msgstr "" 247 | 248 | #: inc/config.class.php:140 249 | msgid "Presence" 250 | msgstr "" 251 | 252 | #: inc/config.class.php:152 253 | msgid "Callcenter features" 254 | msgstr "" 255 | 256 | #: inc/config.class.php:163 257 | msgid "Auto-open user/ticket on call" 258 | msgstr "" 259 | 260 | #: inc/config.class.php:172 261 | msgid "Auto-open in new window" 262 | msgstr "" 263 | 264 | #: inc/config.class.php:181 265 | msgid "Keep xuc session" 266 | msgstr "" 267 | 268 | #: inc/config.class.php:195 269 | msgid "Import assets into GLPI inventory" 270 | msgstr "" 271 | 272 | #: inc/config.class.php:211 273 | msgid "API REST url" 274 | msgstr "" 275 | 276 | #: inc/config.class.php:266 277 | msgid "Import phones" 278 | msgstr "" 279 | 280 | #: inc/config.class.php:278 281 | msgid "Also import phones with" 282 | msgstr "" 283 | 284 | #: inc/config.class.php:282 285 | msgid "empty serial" 286 | msgstr "" 287 | 288 | #: inc/config.class.php:291 289 | msgid "empty mac" 290 | msgstr "" 291 | 292 | #: inc/config.class.php:300 293 | msgid "'not_configured' state" 294 | msgstr "" 295 | 296 | #: inc/config.class.php:311 297 | msgid "Import lines" 298 | msgstr "" 299 | 300 | #: inc/config.class.php:325 301 | msgid "Import phones-lines relation" 302 | msgstr "" 303 | 304 | #: inc/config.class.php:350 305 | msgid "REST API status" 306 | msgstr "" 307 | 308 | #: inc/config.class.php:371 309 | msgid "Last Error" 310 | msgstr "laatste fout" 311 | 312 | #: inc/config.class.php:381 313 | msgid "Auth token" 314 | msgstr "Auth token" 315 | 316 | #: inc/config.class.php:387 317 | msgid "ACL" 318 | msgstr "ACL" 319 | -------------------------------------------------------------------------------- /locales/es_AR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Luis Angel Uriarte , 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: Luis Angel Uriarte , 2017\n" 17 | "Language-Team: Spanish (Argentina) (https://www.transifex.com/teclib/teams/28042/es_AR/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: es_AR\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "Información XIVO" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "ID XIVO" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Plantilla" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Última sincronización" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Obtener dispositivos telefónicos" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Obtener dispositivos simples" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Obtener lineas" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Obtener linea simple" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Obtener usuarios" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Importar recursos Xivo" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d linea importada" 77 | msgstr[1] "%1$d lineas importadas" 78 | 79 | #: inc/inventory.class.php:154 80 | #, php-format 81 | msgid "%1$d phone imported" 82 | msgid_plural "%1$d phones imported" 83 | msgstr[0] "%1$d teléfono importado" 84 | msgstr[1] "%1$d teléfonos importados" 85 | 86 | #: inc/xuc.class.php:37 87 | msgid "Connect to XIVO" 88 | msgstr "" 89 | 90 | #: inc/xuc.class.php:39 91 | msgid "XIVO username" 92 | msgstr "" 93 | 94 | #: inc/xuc.class.php:42 95 | msgid "XIVO password" 96 | msgstr "" 97 | 98 | #: inc/xuc.class.php:45 99 | msgid "XIVO phone number" 100 | msgstr "" 101 | 102 | #: inc/xuc.class.php:69 103 | msgid "XIVO connected" 104 | msgstr "" 105 | 106 | #: inc/xuc.class.php:81 107 | msgid "User" 108 | msgstr "" 109 | 110 | #: inc/xuc.class.php:86 111 | msgid "Phone" 112 | msgstr "" 113 | 114 | #: inc/xuc.class.php:98 115 | msgid "Incoming call" 116 | msgstr "" 117 | 118 | #: inc/xuc.class.php:99 119 | msgid "On call" 120 | msgstr "" 121 | 122 | #: inc/xuc.class.php:100 123 | msgid "Dialing" 124 | msgstr "" 125 | 126 | #: inc/xuc.class.php:109 127 | msgid "Answer" 128 | msgstr "" 129 | 130 | #: inc/xuc.class.php:112 131 | msgid "Hangup" 132 | msgstr "" 133 | 134 | #: inc/xuc.class.php:115 135 | msgid "Hold" 136 | msgstr "" 137 | 138 | #: inc/xuc.class.php:120 139 | msgid "Phone actions" 140 | msgstr "" 141 | 142 | #: inc/xuc.class.php:123 143 | msgid "Dial number" 144 | msgstr "" 145 | 146 | #: inc/xuc.class.php:124 147 | msgid "Transfer to number" 148 | msgstr "" 149 | 150 | #: inc/xuc.class.php:127 151 | msgid "Dial" 152 | msgstr "" 153 | 154 | #: inc/xuc.class.php:130 155 | msgid "Transfer" 156 | msgstr "" 157 | 158 | #: inc/xuc.class.php:192 159 | msgid "User found in GLPI:" 160 | msgstr "" 161 | 162 | #: inc/xuc.class.php:206 163 | msgid "Multiple users found with this phone number" 164 | msgstr "" 165 | 166 | #: inc/phone_line.class.php:111 167 | msgid "Add a phone" 168 | msgstr "Agregar teléfono" 169 | 170 | #: inc/phone_line.class.php:233 171 | msgid "Add a line" 172 | msgstr "Agregar linea" 173 | 174 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 175 | msgid "Protocol" 176 | msgstr "Protocolo" 177 | 178 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 179 | msgid "Provisioning code" 180 | msgstr "Código de aprovisionamiento" 181 | 182 | #: inc/phone_line.class.php:270 183 | msgid "Caller num" 184 | msgstr "# de llamada" 185 | 186 | #: inc/phone_line.class.php:271 187 | msgid "Caller name" 188 | msgstr "Nombre de llamada" 189 | 190 | #: inc/line.class.php:38 191 | msgid "Line" 192 | msgid_plural "Lines" 193 | msgstr[0] "Linea" 194 | msgstr[1] "Lineas" 195 | 196 | #: inc/line.class.php:146 inc/line.class.php:264 197 | msgid "Xivo line_id" 198 | msgstr "Xivo linea_id" 199 | 200 | #: inc/line.class.php:153 inc/line.class.php:224 201 | msgid "Provisioning extension" 202 | msgstr "Extensión de aprovisionamiento" 203 | 204 | #: inc/line.class.php:164 inc/line.class.php:240 205 | msgid "Device slot" 206 | msgstr "Ranura del dispositivo" 207 | 208 | #: inc/line.class.php:168 inc/line.class.php:248 209 | msgid "Position" 210 | msgstr "Posición" 211 | 212 | #: inc/line.class.php:175 inc/line.class.php:256 213 | msgid "Registrar" 214 | msgstr "Registrar" 215 | 216 | #: inc/line.class.php:196 217 | msgid "Associated lines" 218 | msgstr "Lineas asociadas" 219 | 220 | #: inc/config.class.php:36 221 | msgid "Xivo" 222 | msgstr "Xivo" 223 | 224 | #: inc/config.class.php:79 225 | msgid "Configuration of XIVO integration" 226 | msgstr "" 227 | 228 | #: inc/config.class.php:84 229 | msgid "XUC integration (click2call, presence, etc)" 230 | msgstr "" 231 | 232 | #: inc/config.class.php:100 233 | msgid "XUC url (with port)" 234 | msgstr "" 235 | 236 | #: inc/config.class.php:109 237 | msgid "Secure connection to WebSocket" 238 | msgstr "" 239 | 240 | #: inc/config.class.php:117 241 | msgid "Enable for Self-service users" 242 | msgstr "" 243 | 244 | #: inc/config.class.php:129 245 | msgid "Click2call" 246 | msgstr "" 247 | 248 | #: inc/config.class.php:140 249 | msgid "Presence" 250 | msgstr "" 251 | 252 | #: inc/config.class.php:152 253 | msgid "Callcenter features" 254 | msgstr "" 255 | 256 | #: inc/config.class.php:163 257 | msgid "Auto-open user/ticket on call" 258 | msgstr "" 259 | 260 | #: inc/config.class.php:172 261 | msgid "Auto-open in new window" 262 | msgstr "" 263 | 264 | #: inc/config.class.php:181 265 | msgid "Keep xuc session" 266 | msgstr "" 267 | 268 | #: inc/config.class.php:195 269 | msgid "Import assets into GLPI inventory" 270 | msgstr "" 271 | 272 | #: inc/config.class.php:211 273 | msgid "API REST url" 274 | msgstr "" 275 | 276 | #: inc/config.class.php:266 277 | msgid "Import phones" 278 | msgstr "" 279 | 280 | #: inc/config.class.php:278 281 | msgid "Also import phones with" 282 | msgstr "" 283 | 284 | #: inc/config.class.php:282 285 | msgid "empty serial" 286 | msgstr "" 287 | 288 | #: inc/config.class.php:291 289 | msgid "empty mac" 290 | msgstr "" 291 | 292 | #: inc/config.class.php:300 293 | msgid "'not_configured' state" 294 | msgstr "" 295 | 296 | #: inc/config.class.php:311 297 | msgid "Import lines" 298 | msgstr "" 299 | 300 | #: inc/config.class.php:325 301 | msgid "Import phones-lines relation" 302 | msgstr "" 303 | 304 | #: inc/config.class.php:350 305 | msgid "REST API status" 306 | msgstr "" 307 | 308 | #: inc/config.class.php:371 309 | msgid "Last Error" 310 | msgstr "" 311 | 312 | #: inc/config.class.php:381 313 | msgid "Auth token" 314 | msgstr "Token de autenticación" 315 | 316 | #: inc/config.class.php:387 317 | msgid "ACL" 318 | msgstr "LCA" 319 | -------------------------------------------------------------------------------- /locales/pt_BR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Andrei Bernardo Simoni , 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: Andrei Bernardo Simoni , 2017\n" 17 | "Language-Team: Portuguese (Brazil) (https://www.transifex.com/teclib/teams/28042/pt_BR/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: pt_BR\n" 22 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "Informaçoes Xivo" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "ID Xivo" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Modelo" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Última sincronização" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Listar aparelhos telefônicos" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Listar um único dispositivo" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Listar linhas" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Listar uma única linha telefônica" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Listar usuários" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Importar ativos Xivo" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d linha importada" 77 | msgstr[1] "%1$d linhas importadas" 78 | 79 | #: inc/inventory.class.php:154 80 | #, php-format 81 | msgid "%1$d phone imported" 82 | msgid_plural "%1$d phones imported" 83 | msgstr[0] "%1$d telefone importado" 84 | msgstr[1] "%1$d telefones importados" 85 | 86 | #: inc/xuc.class.php:37 87 | msgid "Connect to XIVO" 88 | msgstr "" 89 | 90 | #: inc/xuc.class.php:39 91 | msgid "XIVO username" 92 | msgstr "" 93 | 94 | #: inc/xuc.class.php:42 95 | msgid "XIVO password" 96 | msgstr "" 97 | 98 | #: inc/xuc.class.php:45 99 | msgid "XIVO phone number" 100 | msgstr "" 101 | 102 | #: inc/xuc.class.php:69 103 | msgid "XIVO connected" 104 | msgstr "" 105 | 106 | #: inc/xuc.class.php:81 107 | msgid "User" 108 | msgstr "" 109 | 110 | #: inc/xuc.class.php:86 111 | msgid "Phone" 112 | msgstr "" 113 | 114 | #: inc/xuc.class.php:98 115 | msgid "Incoming call" 116 | msgstr "" 117 | 118 | #: inc/xuc.class.php:99 119 | msgid "On call" 120 | msgstr "" 121 | 122 | #: inc/xuc.class.php:100 123 | msgid "Dialing" 124 | msgstr "" 125 | 126 | #: inc/xuc.class.php:109 127 | msgid "Answer" 128 | msgstr "" 129 | 130 | #: inc/xuc.class.php:112 131 | msgid "Hangup" 132 | msgstr "" 133 | 134 | #: inc/xuc.class.php:115 135 | msgid "Hold" 136 | msgstr "" 137 | 138 | #: inc/xuc.class.php:120 139 | msgid "Phone actions" 140 | msgstr "" 141 | 142 | #: inc/xuc.class.php:123 143 | msgid "Dial number" 144 | msgstr "" 145 | 146 | #: inc/xuc.class.php:124 147 | msgid "Transfer to number" 148 | msgstr "" 149 | 150 | #: inc/xuc.class.php:127 151 | msgid "Dial" 152 | msgstr "" 153 | 154 | #: inc/xuc.class.php:130 155 | msgid "Transfer" 156 | msgstr "" 157 | 158 | #: inc/xuc.class.php:192 159 | msgid "User found in GLPI:" 160 | msgstr "" 161 | 162 | #: inc/xuc.class.php:206 163 | msgid "Multiple users found with this phone number" 164 | msgstr "" 165 | 166 | #: inc/phone_line.class.php:111 167 | msgid "Add a phone" 168 | msgstr "Adicionar telefone" 169 | 170 | #: inc/phone_line.class.php:233 171 | msgid "Add a line" 172 | msgstr "Adicionar linha" 173 | 174 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 175 | msgid "Protocol" 176 | msgstr "Protocolo" 177 | 178 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 179 | msgid "Provisioning code" 180 | msgstr "Provisioning code" 181 | 182 | #: inc/phone_line.class.php:270 183 | msgid "Caller num" 184 | msgstr "Número de quem liga" 185 | 186 | #: inc/phone_line.class.php:271 187 | msgid "Caller name" 188 | msgstr "Nome de quem liga" 189 | 190 | #: inc/line.class.php:38 191 | msgid "Line" 192 | msgid_plural "Lines" 193 | msgstr[0] "Linha" 194 | msgstr[1] "Linhas" 195 | 196 | #: inc/line.class.php:146 inc/line.class.php:264 197 | msgid "Xivo line_id" 198 | msgstr "Xivo line_id" 199 | 200 | #: inc/line.class.php:153 inc/line.class.php:224 201 | msgid "Provisioning extension" 202 | msgstr "Provisioning extension" 203 | 204 | #: inc/line.class.php:164 inc/line.class.php:240 205 | msgid "Device slot" 206 | msgstr "Slot de dispositivo" 207 | 208 | #: inc/line.class.php:168 inc/line.class.php:248 209 | msgid "Position" 210 | msgstr "Posição" 211 | 212 | #: inc/line.class.php:175 inc/line.class.php:256 213 | msgid "Registrar" 214 | msgstr "Registrar" 215 | 216 | #: inc/line.class.php:196 217 | msgid "Associated lines" 218 | msgstr "Linhas associadas" 219 | 220 | #: inc/config.class.php:36 221 | msgid "Xivo" 222 | msgstr "Xivo" 223 | 224 | #: inc/config.class.php:79 225 | msgid "Configuration of XIVO integration" 226 | msgstr "" 227 | 228 | #: inc/config.class.php:84 229 | msgid "XUC integration (click2call, presence, etc)" 230 | msgstr "" 231 | 232 | #: inc/config.class.php:100 233 | msgid "XUC url (with port)" 234 | msgstr "" 235 | 236 | #: inc/config.class.php:109 237 | msgid "Secure connection to WebSocket" 238 | msgstr "" 239 | 240 | #: inc/config.class.php:117 241 | msgid "Enable for Self-service users" 242 | msgstr "" 243 | 244 | #: inc/config.class.php:129 245 | msgid "Click2call" 246 | msgstr "" 247 | 248 | #: inc/config.class.php:140 249 | msgid "Presence" 250 | msgstr "" 251 | 252 | #: inc/config.class.php:152 253 | msgid "Callcenter features" 254 | msgstr "" 255 | 256 | #: inc/config.class.php:163 257 | msgid "Auto-open user/ticket on call" 258 | msgstr "" 259 | 260 | #: inc/config.class.php:172 261 | msgid "Auto-open in new window" 262 | msgstr "" 263 | 264 | #: inc/config.class.php:181 265 | msgid "Keep xuc session" 266 | msgstr "" 267 | 268 | #: inc/config.class.php:195 269 | msgid "Import assets into GLPI inventory" 270 | msgstr "" 271 | 272 | #: inc/config.class.php:211 273 | msgid "API REST url" 274 | msgstr "" 275 | 276 | #: inc/config.class.php:266 277 | msgid "Import phones" 278 | msgstr "" 279 | 280 | #: inc/config.class.php:278 281 | msgid "Also import phones with" 282 | msgstr "" 283 | 284 | #: inc/config.class.php:282 285 | msgid "empty serial" 286 | msgstr "" 287 | 288 | #: inc/config.class.php:291 289 | msgid "empty mac" 290 | msgstr "" 291 | 292 | #: inc/config.class.php:300 293 | msgid "'not_configured' state" 294 | msgstr "" 295 | 296 | #: inc/config.class.php:311 297 | msgid "Import lines" 298 | msgstr "" 299 | 300 | #: inc/config.class.php:325 301 | msgid "Import phones-lines relation" 302 | msgstr "" 303 | 304 | #: inc/config.class.php:350 305 | msgid "REST API status" 306 | msgstr "" 307 | 308 | #: inc/config.class.php:371 309 | msgid "Last Error" 310 | msgstr "Último erro" 311 | 312 | #: inc/config.class.php:381 313 | msgid "Auth token" 314 | msgstr "Token de autenticação" 315 | 316 | #: inc/config.class.php:387 317 | msgid "ACL" 318 | msgstr "ACL" 319 | -------------------------------------------------------------------------------- /locales/ro_RO.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Doru DEACONU , 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: Doru DEACONU , 2017\n" 17 | "Language-Team: Romanian (Romania) (https://www.transifex.com/teclib/teams/28042/ro_RO/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: ro_RO\n" 22 | "Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr " Informatii XIVO" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "ID Xivo" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Template" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Ultima sincronizare" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Arata device telefon" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Arata un singur device" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Arata linii" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Arata o singura linie" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Arata utilizatori" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Importa activ Xivo " 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d linie importata" 77 | msgstr[1] "%1$d linii importate" 78 | msgstr[2] "%1$d linii importate" 79 | 80 | #: inc/inventory.class.php:154 81 | #, php-format 82 | msgid "%1$d phone imported" 83 | msgid_plural "%1$d phones imported" 84 | msgstr[0] "%1$d telefon importat" 85 | msgstr[1] "%1$d telefoane importate" 86 | msgstr[2] "%1$d telefoane importate" 87 | 88 | #: inc/xuc.class.php:37 89 | msgid "Connect to XIVO" 90 | msgstr "" 91 | 92 | #: inc/xuc.class.php:39 93 | msgid "XIVO username" 94 | msgstr "" 95 | 96 | #: inc/xuc.class.php:42 97 | msgid "XIVO password" 98 | msgstr "" 99 | 100 | #: inc/xuc.class.php:45 101 | msgid "XIVO phone number" 102 | msgstr "" 103 | 104 | #: inc/xuc.class.php:69 105 | msgid "XIVO connected" 106 | msgstr "" 107 | 108 | #: inc/xuc.class.php:81 109 | msgid "User" 110 | msgstr "" 111 | 112 | #: inc/xuc.class.php:86 113 | msgid "Phone" 114 | msgstr "" 115 | 116 | #: inc/xuc.class.php:98 117 | msgid "Incoming call" 118 | msgstr "" 119 | 120 | #: inc/xuc.class.php:99 121 | msgid "On call" 122 | msgstr "" 123 | 124 | #: inc/xuc.class.php:100 125 | msgid "Dialing" 126 | msgstr "" 127 | 128 | #: inc/xuc.class.php:109 129 | msgid "Answer" 130 | msgstr "" 131 | 132 | #: inc/xuc.class.php:112 133 | msgid "Hangup" 134 | msgstr "" 135 | 136 | #: inc/xuc.class.php:115 137 | msgid "Hold" 138 | msgstr "" 139 | 140 | #: inc/xuc.class.php:120 141 | msgid "Phone actions" 142 | msgstr "" 143 | 144 | #: inc/xuc.class.php:123 145 | msgid "Dial number" 146 | msgstr "" 147 | 148 | #: inc/xuc.class.php:124 149 | msgid "Transfer to number" 150 | msgstr "" 151 | 152 | #: inc/xuc.class.php:127 153 | msgid "Dial" 154 | msgstr "" 155 | 156 | #: inc/xuc.class.php:130 157 | msgid "Transfer" 158 | msgstr "" 159 | 160 | #: inc/xuc.class.php:192 161 | msgid "User found in GLPI:" 162 | msgstr "" 163 | 164 | #: inc/xuc.class.php:206 165 | msgid "Multiple users found with this phone number" 166 | msgstr "" 167 | 168 | #: inc/phone_line.class.php:111 169 | msgid "Add a phone" 170 | msgstr "Add un telefon" 171 | 172 | #: inc/phone_line.class.php:233 173 | msgid "Add a line" 174 | msgstr "Add o linie" 175 | 176 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 177 | msgid "Protocol" 178 | msgstr "Protocol" 179 | 180 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 181 | msgid "Provisioning code" 182 | msgstr "Cod provizionare" 183 | 184 | #: inc/phone_line.class.php:270 185 | msgid "Caller num" 186 | msgstr "Num Apelant" 187 | 188 | #: inc/phone_line.class.php:271 189 | msgid "Caller name" 190 | msgstr "Nume Apelant" 191 | 192 | #: inc/line.class.php:38 193 | msgid "Line" 194 | msgid_plural "Lines" 195 | msgstr[0] "Linie" 196 | msgstr[1] "Linii" 197 | msgstr[2] "Linii" 198 | 199 | #: inc/line.class.php:146 inc/line.class.php:264 200 | msgid "Xivo line_id" 201 | msgstr "Xivo line_id" 202 | 203 | #: inc/line.class.php:153 inc/line.class.php:224 204 | msgid "Provisioning extension" 205 | msgstr "Extensie provizionare" 206 | 207 | #: inc/line.class.php:164 inc/line.class.php:240 208 | msgid "Device slot" 209 | msgstr "Slot Device" 210 | 211 | #: inc/line.class.php:168 inc/line.class.php:248 212 | msgid "Position" 213 | msgstr "Positie" 214 | 215 | #: inc/line.class.php:175 inc/line.class.php:256 216 | msgid "Registrar" 217 | msgstr "Registrar" 218 | 219 | #: inc/line.class.php:196 220 | msgid "Associated lines" 221 | msgstr "Linii asociate" 222 | 223 | #: inc/config.class.php:36 224 | msgid "Xivo" 225 | msgstr "Xivo" 226 | 227 | #: inc/config.class.php:79 228 | msgid "Configuration of XIVO integration" 229 | msgstr "" 230 | 231 | #: inc/config.class.php:84 232 | msgid "XUC integration (click2call, presence, etc)" 233 | msgstr "" 234 | 235 | #: inc/config.class.php:100 236 | msgid "XUC url (with port)" 237 | msgstr "" 238 | 239 | #: inc/config.class.php:109 240 | msgid "Secure connection to WebSocket" 241 | msgstr "" 242 | 243 | #: inc/config.class.php:117 244 | msgid "Enable for Self-service users" 245 | msgstr "" 246 | 247 | #: inc/config.class.php:129 248 | msgid "Click2call" 249 | msgstr "" 250 | 251 | #: inc/config.class.php:140 252 | msgid "Presence" 253 | msgstr "" 254 | 255 | #: inc/config.class.php:152 256 | msgid "Callcenter features" 257 | msgstr "" 258 | 259 | #: inc/config.class.php:163 260 | msgid "Auto-open user/ticket on call" 261 | msgstr "" 262 | 263 | #: inc/config.class.php:172 264 | msgid "Auto-open in new window" 265 | msgstr "" 266 | 267 | #: inc/config.class.php:181 268 | msgid "Keep xuc session" 269 | msgstr "" 270 | 271 | #: inc/config.class.php:195 272 | msgid "Import assets into GLPI inventory" 273 | msgstr "" 274 | 275 | #: inc/config.class.php:211 276 | msgid "API REST url" 277 | msgstr "" 278 | 279 | #: inc/config.class.php:266 280 | msgid "Import phones" 281 | msgstr "" 282 | 283 | #: inc/config.class.php:278 284 | msgid "Also import phones with" 285 | msgstr "" 286 | 287 | #: inc/config.class.php:282 288 | msgid "empty serial" 289 | msgstr "" 290 | 291 | #: inc/config.class.php:291 292 | msgid "empty mac" 293 | msgstr "" 294 | 295 | #: inc/config.class.php:300 296 | msgid "'not_configured' state" 297 | msgstr "" 298 | 299 | #: inc/config.class.php:311 300 | msgid "Import lines" 301 | msgstr "" 302 | 303 | #: inc/config.class.php:325 304 | msgid "Import phones-lines relation" 305 | msgstr "" 306 | 307 | #: inc/config.class.php:350 308 | msgid "REST API status" 309 | msgstr "" 310 | 311 | #: inc/config.class.php:371 312 | msgid "Last Error" 313 | msgstr "Ultima Eroare" 314 | 315 | #: inc/config.class.php:381 316 | msgid "Auth token" 317 | msgstr "Token Auth" 318 | 319 | #: inc/config.class.php:387 320 | msgid "ACL" 321 | msgstr "ACL" 322 | -------------------------------------------------------------------------------- /locales/fr_FR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # alexandre delaunay , 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: alexandre delaunay , 2017\n" 17 | "Language-Team: French (France) (https://www.transifex.com/teclib/teams/28042/fr_FR/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: fr_FR\n" 22 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "Informations XIVO" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "ID XIVO" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Modele de configuration" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Dernière synchronisation" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Récuperer les téléphones" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Récuperer un téléphone seul" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Récupérer les lignes" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Récupérer une ligne seule" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Récupérer les utilisateurs" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Récupérer l'inventaire de XIVO" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d ligne importée" 77 | msgstr[1] "%1$d lignes importées" 78 | 79 | #: inc/inventory.class.php:154 80 | #, php-format 81 | msgid "%1$d phone imported" 82 | msgid_plural "%1$d phones imported" 83 | msgstr[0] "%1$d téléphone importé" 84 | msgstr[1] "%1$d téléphones importés" 85 | 86 | #: inc/xuc.class.php:37 87 | msgid "Connect to XIVO" 88 | msgstr "" 89 | 90 | #: inc/xuc.class.php:39 91 | msgid "XIVO username" 92 | msgstr "" 93 | 94 | #: inc/xuc.class.php:42 95 | msgid "XIVO password" 96 | msgstr "" 97 | 98 | #: inc/xuc.class.php:45 99 | msgid "XIVO phone number" 100 | msgstr "" 101 | 102 | #: inc/xuc.class.php:69 103 | msgid "XIVO connected" 104 | msgstr "" 105 | 106 | #: inc/xuc.class.php:81 107 | msgid "User" 108 | msgstr "" 109 | 110 | #: inc/xuc.class.php:86 111 | msgid "Phone" 112 | msgstr "" 113 | 114 | #: inc/xuc.class.php:98 115 | msgid "Incoming call" 116 | msgstr "" 117 | 118 | #: inc/xuc.class.php:99 119 | msgid "On call" 120 | msgstr "" 121 | 122 | #: inc/xuc.class.php:100 123 | msgid "Dialing" 124 | msgstr "" 125 | 126 | #: inc/xuc.class.php:109 127 | msgid "Answer" 128 | msgstr "" 129 | 130 | #: inc/xuc.class.php:112 131 | msgid "Hangup" 132 | msgstr "" 133 | 134 | #: inc/xuc.class.php:115 135 | msgid "Hold" 136 | msgstr "" 137 | 138 | #: inc/xuc.class.php:120 139 | msgid "Phone actions" 140 | msgstr "" 141 | 142 | #: inc/xuc.class.php:123 143 | msgid "Dial number" 144 | msgstr "" 145 | 146 | #: inc/xuc.class.php:124 147 | msgid "Transfer to number" 148 | msgstr "" 149 | 150 | #: inc/xuc.class.php:127 151 | msgid "Dial" 152 | msgstr "" 153 | 154 | #: inc/xuc.class.php:130 155 | msgid "Transfer" 156 | msgstr "" 157 | 158 | #: inc/xuc.class.php:192 159 | msgid "User found in GLPI:" 160 | msgstr "" 161 | 162 | #: inc/xuc.class.php:206 163 | msgid "Multiple users found with this phone number" 164 | msgstr "" 165 | 166 | #: inc/phone_line.class.php:111 167 | msgid "Add a phone" 168 | msgstr "Ajouter un téléphone" 169 | 170 | #: inc/phone_line.class.php:233 171 | msgid "Add a line" 172 | msgstr "Ajouter une ligne" 173 | 174 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 175 | msgid "Protocol" 176 | msgstr "Protocole" 177 | 178 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 179 | msgid "Provisioning code" 180 | msgstr "Code d'approvisionnement" 181 | 182 | #: inc/phone_line.class.php:270 183 | msgid "Caller num" 184 | msgstr "Numéro d'appelant" 185 | 186 | #: inc/phone_line.class.php:271 187 | msgid "Caller name" 188 | msgstr "Nom de l'appelant" 189 | 190 | #: inc/line.class.php:38 191 | msgid "Line" 192 | msgid_plural "Lines" 193 | msgstr[0] "Ligne" 194 | msgstr[1] "Lignes" 195 | 196 | #: inc/line.class.php:146 inc/line.class.php:264 197 | msgid "Xivo line_id" 198 | msgstr "line_id Xivo" 199 | 200 | #: inc/line.class.php:153 inc/line.class.php:224 201 | msgid "Provisioning extension" 202 | msgstr "Extension d'approvisionnement" 203 | 204 | #: inc/line.class.php:164 inc/line.class.php:240 205 | msgid "Device slot" 206 | msgstr "\"Slot\" du téléphone" 207 | 208 | #: inc/line.class.php:168 inc/line.class.php:248 209 | msgid "Position" 210 | msgstr "Position" 211 | 212 | #: inc/line.class.php:175 inc/line.class.php:256 213 | msgid "Registrar" 214 | msgstr "Registrar" 215 | 216 | #: inc/line.class.php:196 217 | msgid "Associated lines" 218 | msgstr "Lignes associées" 219 | 220 | #: inc/config.class.php:36 221 | msgid "Xivo" 222 | msgstr "Xivo" 223 | 224 | #: inc/config.class.php:79 225 | msgid "Configuration of XIVO integration" 226 | msgstr "" 227 | 228 | #: inc/config.class.php:84 229 | msgid "XUC integration (click2call, presence, etc)" 230 | msgstr "" 231 | 232 | #: inc/config.class.php:100 233 | msgid "XUC url (with port)" 234 | msgstr "" 235 | 236 | #: inc/config.class.php:109 237 | msgid "Secure connection to WebSocket" 238 | msgstr "" 239 | 240 | #: inc/config.class.php:117 241 | msgid "Enable for Self-service users" 242 | msgstr "" 243 | 244 | #: inc/config.class.php:129 245 | msgid "Click2call" 246 | msgstr "" 247 | 248 | #: inc/config.class.php:140 249 | msgid "Presence" 250 | msgstr "" 251 | 252 | #: inc/config.class.php:152 253 | msgid "Callcenter features" 254 | msgstr "" 255 | 256 | #: inc/config.class.php:163 257 | msgid "Auto-open user/ticket on call" 258 | msgstr "" 259 | 260 | #: inc/config.class.php:172 261 | msgid "Auto-open in new window" 262 | msgstr "" 263 | 264 | #: inc/config.class.php:181 265 | msgid "Keep xuc session" 266 | msgstr "" 267 | 268 | #: inc/config.class.php:195 269 | msgid "Import assets into GLPI inventory" 270 | msgstr "" 271 | 272 | #: inc/config.class.php:211 273 | msgid "API REST url" 274 | msgstr "" 275 | 276 | #: inc/config.class.php:266 277 | msgid "Import phones" 278 | msgstr "" 279 | 280 | #: inc/config.class.php:278 281 | msgid "Also import phones with" 282 | msgstr "" 283 | 284 | #: inc/config.class.php:282 285 | msgid "empty serial" 286 | msgstr "" 287 | 288 | #: inc/config.class.php:291 289 | msgid "empty mac" 290 | msgstr "" 291 | 292 | #: inc/config.class.php:300 293 | msgid "'not_configured' state" 294 | msgstr "" 295 | 296 | #: inc/config.class.php:311 297 | msgid "Import lines" 298 | msgstr "" 299 | 300 | #: inc/config.class.php:325 301 | msgid "Import phones-lines relation" 302 | msgstr "" 303 | 304 | #: inc/config.class.php:350 305 | msgid "REST API status" 306 | msgstr "" 307 | 308 | #: inc/config.class.php:371 309 | msgid "Last Error" 310 | msgstr "Dernière erreur" 311 | 312 | #: inc/config.class.php:381 313 | msgid "Auth token" 314 | msgstr "Jeton d'authentification" 315 | 316 | #: inc/config.class.php:387 317 | msgid "ACL" 318 | msgstr "Droits" 319 | -------------------------------------------------------------------------------- /locales/ru_RU.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Alexey Petukhov , 2017 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: Alexey Petukhov , 2017\n" 17 | "Language-Team: Russian (Russia) (https://www.transifex.com/teclib/teams/28042/ru_RU/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: ru_RU\n" 22 | "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || (n%100>=11 && n%100<=14)? 2 : 3);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "XIVO информация" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "XIVO идентификатор" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Шаблон" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Последняя синхронизация" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Получить телефоны" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Получить одно устройство" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Получить линии" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Получить одну линию" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Получить пользователей" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Импортировать оборудование Xivo" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d линия импортирована" 77 | msgstr[1] "%1$d линий импортировано" 78 | msgstr[2] "%1$d линий импортировано" 79 | msgstr[3] "%1$d линий импортировано" 80 | 81 | #: inc/inventory.class.php:154 82 | #, php-format 83 | msgid "%1$d phone imported" 84 | msgid_plural "%1$d phones imported" 85 | msgstr[0] "%1$d телефон импортирован" 86 | msgstr[1] "%1$d телефонов импортировано" 87 | msgstr[2] "%1$d телефонов импортировано" 88 | msgstr[3] "%1$d телефонов импортировано" 89 | 90 | #: inc/xuc.class.php:37 91 | msgid "Connect to XIVO" 92 | msgstr "" 93 | 94 | #: inc/xuc.class.php:39 95 | msgid "XIVO username" 96 | msgstr "" 97 | 98 | #: inc/xuc.class.php:42 99 | msgid "XIVO password" 100 | msgstr "" 101 | 102 | #: inc/xuc.class.php:45 103 | msgid "XIVO phone number" 104 | msgstr "" 105 | 106 | #: inc/xuc.class.php:69 107 | msgid "XIVO connected" 108 | msgstr "" 109 | 110 | #: inc/xuc.class.php:81 111 | msgid "User" 112 | msgstr "" 113 | 114 | #: inc/xuc.class.php:86 115 | msgid "Phone" 116 | msgstr "" 117 | 118 | #: inc/xuc.class.php:98 119 | msgid "Incoming call" 120 | msgstr "" 121 | 122 | #: inc/xuc.class.php:99 123 | msgid "On call" 124 | msgstr "" 125 | 126 | #: inc/xuc.class.php:100 127 | msgid "Dialing" 128 | msgstr "" 129 | 130 | #: inc/xuc.class.php:109 131 | msgid "Answer" 132 | msgstr "" 133 | 134 | #: inc/xuc.class.php:112 135 | msgid "Hangup" 136 | msgstr "" 137 | 138 | #: inc/xuc.class.php:115 139 | msgid "Hold" 140 | msgstr "" 141 | 142 | #: inc/xuc.class.php:120 143 | msgid "Phone actions" 144 | msgstr "" 145 | 146 | #: inc/xuc.class.php:123 147 | msgid "Dial number" 148 | msgstr "" 149 | 150 | #: inc/xuc.class.php:124 151 | msgid "Transfer to number" 152 | msgstr "" 153 | 154 | #: inc/xuc.class.php:127 155 | msgid "Dial" 156 | msgstr "" 157 | 158 | #: inc/xuc.class.php:130 159 | msgid "Transfer" 160 | msgstr "" 161 | 162 | #: inc/xuc.class.php:192 163 | msgid "User found in GLPI:" 164 | msgstr "" 165 | 166 | #: inc/xuc.class.php:206 167 | msgid "Multiple users found with this phone number" 168 | msgstr "" 169 | 170 | #: inc/phone_line.class.php:111 171 | msgid "Add a phone" 172 | msgstr "Добавит телефон" 173 | 174 | #: inc/phone_line.class.php:233 175 | msgid "Add a line" 176 | msgstr "Добавить линию" 177 | 178 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 179 | msgid "Protocol" 180 | msgstr "Протокол" 181 | 182 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 183 | msgid "Provisioning code" 184 | msgstr "Код инициализации" 185 | 186 | #: inc/phone_line.class.php:270 187 | msgid "Caller num" 188 | msgstr "Номер звонящего" 189 | 190 | #: inc/phone_line.class.php:271 191 | msgid "Caller name" 192 | msgstr "Имя звонящего" 193 | 194 | #: inc/line.class.php:38 195 | msgid "Line" 196 | msgid_plural "Lines" 197 | msgstr[0] "Линия" 198 | msgstr[1] "Линий" 199 | msgstr[2] "Линий" 200 | msgstr[3] "Линий" 201 | 202 | #: inc/line.class.php:146 inc/line.class.php:264 203 | msgid "Xivo line_id" 204 | msgstr "Xivo идентификатор линии" 205 | 206 | #: inc/line.class.php:153 inc/line.class.php:224 207 | msgid "Provisioning extension" 208 | msgstr "Дополнительный код инициализации" 209 | 210 | #: inc/line.class.php:164 inc/line.class.php:240 211 | msgid "Device slot" 212 | msgstr "Слот устройства" 213 | 214 | #: inc/line.class.php:168 inc/line.class.php:248 215 | msgid "Position" 216 | msgstr "Расположение" 217 | 218 | #: inc/line.class.php:175 inc/line.class.php:256 219 | msgid "Registrar" 220 | msgstr "Регистратор" 221 | 222 | #: inc/line.class.php:196 223 | msgid "Associated lines" 224 | msgstr "Связанные линии" 225 | 226 | #: inc/config.class.php:36 227 | msgid "Xivo" 228 | msgstr "Xivo" 229 | 230 | #: inc/config.class.php:79 231 | msgid "Configuration of XIVO integration" 232 | msgstr "" 233 | 234 | #: inc/config.class.php:84 235 | msgid "XUC integration (click2call, presence, etc)" 236 | msgstr "" 237 | 238 | #: inc/config.class.php:100 239 | msgid "XUC url (with port)" 240 | msgstr "" 241 | 242 | #: inc/config.class.php:109 243 | msgid "Secure connection to WebSocket" 244 | msgstr "" 245 | 246 | #: inc/config.class.php:117 247 | msgid "Enable for Self-service users" 248 | msgstr "" 249 | 250 | #: inc/config.class.php:129 251 | msgid "Click2call" 252 | msgstr "" 253 | 254 | #: inc/config.class.php:140 255 | msgid "Presence" 256 | msgstr "" 257 | 258 | #: inc/config.class.php:152 259 | msgid "Callcenter features" 260 | msgstr "" 261 | 262 | #: inc/config.class.php:163 263 | msgid "Auto-open user/ticket on call" 264 | msgstr "" 265 | 266 | #: inc/config.class.php:172 267 | msgid "Auto-open in new window" 268 | msgstr "" 269 | 270 | #: inc/config.class.php:181 271 | msgid "Keep xuc session" 272 | msgstr "" 273 | 274 | #: inc/config.class.php:195 275 | msgid "Import assets into GLPI inventory" 276 | msgstr "" 277 | 278 | #: inc/config.class.php:211 279 | msgid "API REST url" 280 | msgstr "" 281 | 282 | #: inc/config.class.php:266 283 | msgid "Import phones" 284 | msgstr "" 285 | 286 | #: inc/config.class.php:278 287 | msgid "Also import phones with" 288 | msgstr "" 289 | 290 | #: inc/config.class.php:282 291 | msgid "empty serial" 292 | msgstr "" 293 | 294 | #: inc/config.class.php:291 295 | msgid "empty mac" 296 | msgstr "" 297 | 298 | #: inc/config.class.php:300 299 | msgid "'not_configured' state" 300 | msgstr "" 301 | 302 | #: inc/config.class.php:311 303 | msgid "Import lines" 304 | msgstr "" 305 | 306 | #: inc/config.class.php:325 307 | msgid "Import phones-lines relation" 308 | msgstr "" 309 | 310 | #: inc/config.class.php:350 311 | msgid "REST API status" 312 | msgstr "" 313 | 314 | #: inc/config.class.php:371 315 | msgid "Last Error" 316 | msgstr "Последняя ошибка" 317 | 318 | #: inc/config.class.php:381 319 | msgid "Auth token" 320 | msgstr "Токен аутентификации" 321 | 322 | #: inc/config.class.php:387 323 | msgid "ACL" 324 | msgstr "ACL" 325 | -------------------------------------------------------------------------------- /locales/tr_TR.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Kaya Zeren , 2019 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: Kaya Zeren , 2019\n" 17 | "Language-Team: Turkish (Turkey) (https://www.transifex.com/teclib/teams/28042/tr_TR/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: tr_TR\n" 22 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "XIVO Bilgileri" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "Xivo Kodu" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Kalıp" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Son Eşitleme" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "REST API erişimi" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Telefon Aygıtlarını Al" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Tek Aygıt Al" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Hatları Al" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Tek Hat Al" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Kullanıcıları Al" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Xivo Varlıklarını Al" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d hat alındı" 77 | msgstr[1] "%1$d hat alındı" 78 | 79 | #: inc/inventory.class.php:154 80 | #, php-format 81 | msgid "%1$d phone imported" 82 | msgid_plural "%1$d phones imported" 83 | msgstr[0] "%1$d telefon alındı" 84 | msgstr[1] "%1$d telefon alındı" 85 | 86 | #: inc/xuc.class.php:37 87 | msgid "Connect to XIVO" 88 | msgstr "XIVO bağlantısı kur" 89 | 90 | #: inc/xuc.class.php:39 91 | msgid "XIVO username" 92 | msgstr "XIVO kullanıcı adı" 93 | 94 | #: inc/xuc.class.php:42 95 | msgid "XIVO password" 96 | msgstr "XIVO parolası" 97 | 98 | #: inc/xuc.class.php:45 99 | msgid "XIVO phone number" 100 | msgstr "XIVO telefon numarası" 101 | 102 | #: inc/xuc.class.php:69 103 | msgid "XIVO connected" 104 | msgstr "XIVO bağlantısı kuruldu" 105 | 106 | #: inc/xuc.class.php:81 107 | msgid "User" 108 | msgstr "Kullanıcı" 109 | 110 | #: inc/xuc.class.php:86 111 | msgid "Phone" 112 | msgstr "Telefon" 113 | 114 | #: inc/xuc.class.php:98 115 | msgid "Incoming call" 116 | msgstr "Gelen çağrı" 117 | 118 | #: inc/xuc.class.php:99 119 | msgid "On call" 120 | msgstr "Görüşüyor" 121 | 122 | #: inc/xuc.class.php:100 123 | msgid "Dialing" 124 | msgstr "Arıyor" 125 | 126 | #: inc/xuc.class.php:109 127 | msgid "Answer" 128 | msgstr "Yanıtladı" 129 | 130 | #: inc/xuc.class.php:112 131 | msgid "Hangup" 132 | msgstr "Kapattı" 133 | 134 | #: inc/xuc.class.php:115 135 | msgid "Hold" 136 | msgstr "Bekliyor" 137 | 138 | #: inc/xuc.class.php:120 139 | msgid "Phone actions" 140 | msgstr "Telefon işlemleri" 141 | 142 | #: inc/xuc.class.php:123 143 | msgid "Dial number" 144 | msgstr "Numara ara" 145 | 146 | #: inc/xuc.class.php:124 147 | msgid "Transfer to number" 148 | msgstr "Numaraya aktar" 149 | 150 | #: inc/xuc.class.php:127 151 | msgid "Dial" 152 | msgstr "Ara" 153 | 154 | #: inc/xuc.class.php:130 155 | msgid "Transfer" 156 | msgstr "Aktar" 157 | 158 | #: inc/xuc.class.php:192 159 | msgid "User found in GLPI:" 160 | msgstr "GLPI üzerinde bulunan kullanıcı:" 161 | 162 | #: inc/xuc.class.php:206 163 | msgid "Multiple users found with this phone number" 164 | msgstr "Bu telefon numarasıyla kayıtlı birden çok kullanıcı bulundu" 165 | 166 | #: inc/phone_line.class.php:111 167 | msgid "Add a phone" 168 | msgstr "Telefon Ekle" 169 | 170 | #: inc/phone_line.class.php:233 171 | msgid "Add a line" 172 | msgstr "Hat Ekle" 173 | 174 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 175 | msgid "Protocol" 176 | msgstr "İletişim Kuralı" 177 | 178 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 179 | msgid "Provisioning code" 180 | msgstr "Sağlanan Alan Kodu" 181 | 182 | #: inc/phone_line.class.php:270 183 | msgid "Caller num" 184 | msgstr "Arayan Numara" 185 | 186 | #: inc/phone_line.class.php:271 187 | msgid "Caller name" 188 | msgstr "Arayan Adı" 189 | 190 | #: inc/line.class.php:38 191 | msgid "Line" 192 | msgid_plural "Lines" 193 | msgstr[0] "Hat" 194 | msgstr[1] "Hat" 195 | 196 | #: inc/line.class.php:146 inc/line.class.php:264 197 | msgid "Xivo line_id" 198 | msgstr "Xivo hat_kodu" 199 | 200 | #: inc/line.class.php:153 inc/line.class.php:224 201 | msgid "Provisioning extension" 202 | msgstr "Sağlanan Dahili" 203 | 204 | #: inc/line.class.php:164 inc/line.class.php:240 205 | msgid "Device slot" 206 | msgstr "Aygıt Konumu" 207 | 208 | #: inc/line.class.php:168 inc/line.class.php:248 209 | msgid "Position" 210 | msgstr "Konum" 211 | 212 | #: inc/line.class.php:175 inc/line.class.php:256 213 | msgid "Registrar" 214 | msgstr "Kayıt Eden" 215 | 216 | #: inc/line.class.php:196 217 | msgid "Associated lines" 218 | msgstr "İlgili Hatlar" 219 | 220 | #: inc/config.class.php:36 221 | msgid "Xivo" 222 | msgstr "Xivo" 223 | 224 | #: inc/config.class.php:79 225 | msgid "Configuration of XIVO integration" 226 | msgstr "XIVO bütünleştirmesi yapılandırması" 227 | 228 | #: inc/config.class.php:84 229 | msgid "XUC integration (click2call, presence, etc)" 230 | msgstr "XUC bütünleştirmesi (click2call, presence, vb)" 231 | 232 | #: inc/config.class.php:100 233 | msgid "XUC url (with port)" 234 | msgstr "XUC adresi (kapı numarası ile)" 235 | 236 | #: inc/config.class.php:109 237 | msgid "Secure connection to WebSocket" 238 | msgstr "Güvenli WebSocket bağlantısı" 239 | 240 | #: inc/config.class.php:117 241 | msgid "Enable for Self-service users" 242 | msgstr "Kendi kendine hizmet alan kullanıcılar için ektinleştir" 243 | 244 | #: inc/config.class.php:129 245 | msgid "Click2call" 246 | msgstr "Click2call" 247 | 248 | #: inc/config.class.php:140 249 | msgid "Presence" 250 | msgstr "Presence" 251 | 252 | #: inc/config.class.php:152 253 | msgid "Callcenter features" 254 | msgstr "Çağrı merkezi özellikleri" 255 | 256 | #: inc/config.class.php:163 257 | msgid "Auto-open user/ticket on call" 258 | msgstr "Çağrı yapıldığında kullanıcı/destek kaydı otomatik açılsın" 259 | 260 | #: inc/config.class.php:172 261 | msgid "Auto-open in new window" 262 | msgstr "Otomatik olarak yeni pencerede açılsın" 263 | 264 | #: inc/config.class.php:181 265 | msgid "Keep xuc session" 266 | msgstr "Xuc oturumu tutulsın" 267 | 268 | #: inc/config.class.php:195 269 | msgid "Import assets into GLPI inventory" 270 | msgstr "Varlıkları GLPI stoğuna içe aktar" 271 | 272 | #: inc/config.class.php:211 273 | msgid "API REST url" 274 | msgstr "API REST adresi" 275 | 276 | #: inc/config.class.php:266 277 | msgid "Import phones" 278 | msgstr "Telefonları içe aktar" 279 | 280 | #: inc/config.class.php:278 281 | msgid "Also import phones with" 282 | msgstr "Ayrıca şu telefonları içe aktar" 283 | 284 | #: inc/config.class.php:282 285 | msgid "empty serial" 286 | msgstr "seri numarası olmayan" 287 | 288 | #: inc/config.class.php:291 289 | msgid "empty mac" 290 | msgstr "mac adresi olmayan" 291 | 292 | #: inc/config.class.php:300 293 | msgid "'not_configured' state" 294 | msgstr "'yapılandırılmamış' durumda olan" 295 | 296 | #: inc/config.class.php:311 297 | msgid "Import lines" 298 | msgstr "Hatları içe aktar" 299 | 300 | #: inc/config.class.php:325 301 | msgid "Import phones-lines relation" 302 | msgstr "Telefon hattı ilişkilerini içe aktar" 303 | 304 | #: inc/config.class.php:350 305 | msgid "REST API status" 306 | msgstr "REST API durumu" 307 | 308 | #: inc/config.class.php:371 309 | msgid "Last Error" 310 | msgstr "Son Hata" 311 | 312 | #: inc/config.class.php:381 313 | msgid "Auth token" 314 | msgstr "Kimlik Doğrulama Kodu" 315 | 316 | #: inc/config.class.php:387 317 | msgid "ACL" 318 | msgstr "EDL" 319 | -------------------------------------------------------------------------------- /locales/pt_PT.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Rui Melo , 2019 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: Rui Melo , 2019\n" 17 | "Language-Team: Portuguese (Portugal) (https://www.transifex.com/teclib/teams/28042/pt_PT/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: pt_PT\n" 22 | "Plural-Forms: nplurals=2; plural=(n != 1);\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "Informaçoes Xivo" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "ID Xivo" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Modelo" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Última sincronização" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "Acesso à API REST" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Listar aparelhos telefônicos" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Listar um único dispositivo" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Listar linhas" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Listar uma única linha telefônica" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Listar usuários" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Importar ativos Xivo" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d linha importada" 77 | msgstr[1] "%1$d linhas importadas" 78 | 79 | #: inc/inventory.class.php:154 80 | #, php-format 81 | msgid "%1$d phone imported" 82 | msgid_plural "%1$d phones imported" 83 | msgstr[0] "%1$d telefone importado" 84 | msgstr[1] "%1$d telefones importados" 85 | 86 | #: inc/xuc.class.php:37 87 | msgid "Connect to XIVO" 88 | msgstr "Conetar a XIVO" 89 | 90 | #: inc/xuc.class.php:39 91 | msgid "XIVO username" 92 | msgstr "Nome de utilizador XIVO" 93 | 94 | #: inc/xuc.class.php:42 95 | msgid "XIVO password" 96 | msgstr "Senha XIVO" 97 | 98 | #: inc/xuc.class.php:45 99 | msgid "XIVO phone number" 100 | msgstr "Número de Telemóvel XIVO" 101 | 102 | #: inc/xuc.class.php:69 103 | msgid "XIVO connected" 104 | msgstr "Ligado a XIVO" 105 | 106 | #: inc/xuc.class.php:81 107 | msgid "User" 108 | msgstr "" 109 | 110 | #: inc/xuc.class.php:86 111 | msgid "Phone" 112 | msgstr "Telefone" 113 | 114 | #: inc/xuc.class.php:98 115 | msgid "Incoming call" 116 | msgstr "Chamada recebida" 117 | 118 | #: inc/xuc.class.php:99 119 | msgid "On call" 120 | msgstr "Em chamada" 121 | 122 | #: inc/xuc.class.php:100 123 | msgid "Dialing" 124 | msgstr "Marcando" 125 | 126 | #: inc/xuc.class.php:109 127 | msgid "Answer" 128 | msgstr "Resposta" 129 | 130 | #: inc/xuc.class.php:112 131 | msgid "Hangup" 132 | msgstr "Desligar" 133 | 134 | #: inc/xuc.class.php:115 135 | msgid "Hold" 136 | msgstr "Espera" 137 | 138 | #: inc/xuc.class.php:120 139 | msgid "Phone actions" 140 | msgstr "Ações por telefone" 141 | 142 | #: inc/xuc.class.php:123 143 | msgid "Dial number" 144 | msgstr "Introduza o número" 145 | 146 | #: inc/xuc.class.php:124 147 | msgid "Transfer to number" 148 | msgstr "Transferir para o número" 149 | 150 | #: inc/xuc.class.php:127 151 | msgid "Dial" 152 | msgstr "Marcar" 153 | 154 | #: inc/xuc.class.php:130 155 | msgid "Transfer" 156 | msgstr "Transferir" 157 | 158 | #: inc/xuc.class.php:192 159 | msgid "User found in GLPI:" 160 | msgstr "Utilizador encontrado em GLPI:" 161 | 162 | #: inc/xuc.class.php:206 163 | msgid "Multiple users found with this phone number" 164 | msgstr "Vários utilizadores encontrados com este número de telefone" 165 | 166 | #: inc/phone_line.class.php:111 167 | msgid "Add a phone" 168 | msgstr "Adicionar telefone" 169 | 170 | #: inc/phone_line.class.php:233 171 | msgid "Add a line" 172 | msgstr "Adicionar linha" 173 | 174 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 175 | msgid "Protocol" 176 | msgstr "Protocolo" 177 | 178 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 179 | msgid "Provisioning code" 180 | msgstr "Provisioning code" 181 | 182 | #: inc/phone_line.class.php:270 183 | msgid "Caller num" 184 | msgstr "Número de quem liga" 185 | 186 | #: inc/phone_line.class.php:271 187 | msgid "Caller name" 188 | msgstr "Nome de quem liga" 189 | 190 | #: inc/line.class.php:38 191 | msgid "Line" 192 | msgid_plural "Lines" 193 | msgstr[0] "Linha" 194 | msgstr[1] "Linhas" 195 | 196 | #: inc/line.class.php:146 inc/line.class.php:264 197 | msgid "Xivo line_id" 198 | msgstr "Xivo line_id" 199 | 200 | #: inc/line.class.php:153 inc/line.class.php:224 201 | msgid "Provisioning extension" 202 | msgstr "Provisioning extension" 203 | 204 | #: inc/line.class.php:164 inc/line.class.php:240 205 | msgid "Device slot" 206 | msgstr "Slot de dispositivo" 207 | 208 | #: inc/line.class.php:168 inc/line.class.php:248 209 | msgid "Position" 210 | msgstr "Posição" 211 | 212 | #: inc/line.class.php:175 inc/line.class.php:256 213 | msgid "Registrar" 214 | msgstr "Registar" 215 | 216 | #: inc/line.class.php:196 217 | msgid "Associated lines" 218 | msgstr "Linhas associadas" 219 | 220 | #: inc/config.class.php:36 221 | msgid "Xivo" 222 | msgstr "Xivo" 223 | 224 | #: inc/config.class.php:79 225 | msgid "Configuration of XIVO integration" 226 | msgstr "Configuração integração XIVO" 227 | 228 | #: inc/config.class.php:84 229 | msgid "XUC integration (click2call, presence, etc)" 230 | msgstr "Integração XUC (clicar para chamar, presença, etc)" 231 | 232 | #: inc/config.class.php:100 233 | msgid "XUC url (with port)" 234 | msgstr "XUC url (com porta)" 235 | 236 | #: inc/config.class.php:109 237 | msgid "Secure connection to WebSocket" 238 | msgstr "Conexão segura ao WebSocket" 239 | 240 | #: inc/config.class.php:117 241 | msgid "Enable for Self-service users" 242 | msgstr "Habilitar para utilizadores de Self-service" 243 | 244 | #: inc/config.class.php:129 245 | msgid "Click2call" 246 | msgstr "Clique para chamar" 247 | 248 | #: inc/config.class.php:140 249 | msgid "Presence" 250 | msgstr "Presença" 251 | 252 | #: inc/config.class.php:152 253 | msgid "Callcenter features" 254 | msgstr "" 255 | 256 | #: inc/config.class.php:163 257 | msgid "Auto-open user/ticket on call" 258 | msgstr "Auto-abrir utilizador/bilhete na chamada" 259 | 260 | #: inc/config.class.php:172 261 | msgid "Auto-open in new window" 262 | msgstr "Auto-abrir em uma nova janela" 263 | 264 | #: inc/config.class.php:181 265 | msgid "Keep xuc session" 266 | msgstr "Manter sessão xuc" 267 | 268 | #: inc/config.class.php:195 269 | msgid "Import assets into GLPI inventory" 270 | msgstr "Importar ativos para o inventário GLPI" 271 | 272 | #: inc/config.class.php:211 273 | msgid "API REST url" 274 | msgstr "URL API REST" 275 | 276 | #: inc/config.class.php:266 277 | msgid "Import phones" 278 | msgstr "Importar telefones" 279 | 280 | #: inc/config.class.php:278 281 | msgid "Also import phones with" 282 | msgstr "Também importe telefones com" 283 | 284 | #: inc/config.class.php:282 285 | msgid "empty serial" 286 | msgstr "série vazia" 287 | 288 | #: inc/config.class.php:291 289 | msgid "empty mac" 290 | msgstr "mac vazio" 291 | 292 | #: inc/config.class.php:300 293 | msgid "'not_configured' state" 294 | msgstr "estado ‘não_configurado’" 295 | 296 | #: inc/config.class.php:311 297 | msgid "Import lines" 298 | msgstr "Importar linhas" 299 | 300 | #: inc/config.class.php:325 301 | msgid "Import phones-lines relation" 302 | msgstr "Importar relação telefones-linhas" 303 | 304 | #: inc/config.class.php:350 305 | msgid "REST API status" 306 | msgstr "Status da API REST" 307 | 308 | #: inc/config.class.php:371 309 | msgid "Last Error" 310 | msgstr "Último erro" 311 | 312 | #: inc/config.class.php:381 313 | msgid "Auth token" 314 | msgstr "Token de autenticação" 315 | 316 | #: inc/config.class.php:387 317 | msgid "ACL" 318 | msgstr "ACL" 319 | -------------------------------------------------------------------------------- /locales/cs_CZ.po: -------------------------------------------------------------------------------- 1 | # SOME DESCRIPTIVE TITLE. 2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the PACKAGE package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | # Translators: 7 | # Pavel Borecki , 2019 8 | # 9 | #, fuzzy 10 | msgid "" 11 | msgstr "" 12 | "Project-Id-Version: PACKAGE VERSION\n" 13 | "Report-Msgid-Bugs-To: \n" 14 | "POT-Creation-Date: 2020-07-05 11:50+0000\n" 15 | "PO-Revision-Date: 2017-04-03 14:32+0000\n" 16 | "Last-Translator: Pavel Borecki , 2019\n" 17 | "Language-Team: Czech (Czech Republic) (https://www.transifex.com/teclib/teams/28042/cs_CZ/)\n" 18 | "MIME-Version: 1.0\n" 19 | "Content-Type: text/plain; charset=UTF-8\n" 20 | "Content-Transfer-Encoding: 8bit\n" 21 | "Language: cs_CZ\n" 22 | "Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n <= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" 23 | 24 | #: front/phonecall.php:32 25 | msgid "Xivo plugin not activated" 26 | msgstr "" 27 | 28 | #: inc/phone.class.php:307 29 | msgid "XIVO informations" 30 | msgstr "Informace z XIVO" 31 | 32 | #: inc/phone.class.php:311 33 | msgid "Xivo ID" 34 | msgstr "XIVO identifikátor" 35 | 36 | #: inc/phone.class.php:313 37 | msgid "Template" 38 | msgstr "Šablona" 39 | 40 | #: inc/phone.class.php:318 41 | msgid "Last synchronisation" 42 | msgstr "Minulá sychronizace" 43 | 44 | #: inc/apiclient.class.php:97 45 | msgid "REST API access" 46 | msgstr "Přístup k REST API" 47 | 48 | #: inc/apiclient.class.php:99 49 | msgid "Get phone devices" 50 | msgstr "Získat telefonní zařízení" 51 | 52 | #: inc/apiclient.class.php:101 53 | msgid "Get single device" 54 | msgstr "Získat jedno zařízení" 55 | 56 | #: inc/apiclient.class.php:111 57 | msgid "Get lines" 58 | msgstr "Získat linky" 59 | 60 | #: inc/apiclient.class.php:113 61 | msgid "Get single line" 62 | msgstr "Získat jednu linku" 63 | 64 | #: inc/apiclient.class.php:119 65 | msgid "Get users" 66 | msgstr "Získat uživatele" 67 | 68 | #: inc/inventory.class.php:39 69 | msgid "Import Xivo assets" 70 | msgstr "Importovat Xivo zařízení" 71 | 72 | #: inc/inventory.class.php:114 73 | #, php-format 74 | msgid "%1$d line imported" 75 | msgid_plural "%1$d lines imported" 76 | msgstr[0] "%1$d linka importována" 77 | msgstr[1] "%1$d linky importovány" 78 | msgstr[2] "%1$d linek importováno" 79 | msgstr[3] "%1$d linky importovány" 80 | 81 | #: inc/inventory.class.php:154 82 | #, php-format 83 | msgid "%1$d phone imported" 84 | msgid_plural "%1$d phones imported" 85 | msgstr[0] "%1$d telefon importován" 86 | msgstr[1] "%1$d telefony importovány" 87 | msgstr[2] "%1$d telefonů importováno" 88 | msgstr[3] "%1$d telefony importovány " 89 | 90 | #: inc/xuc.class.php:37 91 | msgid "Connect to XIVO" 92 | msgstr "Připojit k XIVO" 93 | 94 | #: inc/xuc.class.php:39 95 | msgid "XIVO username" 96 | msgstr "XIVO uživatelské jméno" 97 | 98 | #: inc/xuc.class.php:42 99 | msgid "XIVO password" 100 | msgstr "XIVO heslo" 101 | 102 | #: inc/xuc.class.php:45 103 | msgid "XIVO phone number" 104 | msgstr "XIVO telefonní číslo" 105 | 106 | #: inc/xuc.class.php:69 107 | msgid "XIVO connected" 108 | msgstr "XIVO připojeno" 109 | 110 | #: inc/xuc.class.php:81 111 | msgid "User" 112 | msgstr "Uživatel" 113 | 114 | #: inc/xuc.class.php:86 115 | msgid "Phone" 116 | msgstr "Telefon" 117 | 118 | #: inc/xuc.class.php:98 119 | msgid "Incoming call" 120 | msgstr "Příchozí volání" 121 | 122 | #: inc/xuc.class.php:99 123 | msgid "On call" 124 | msgstr "Na telefonu" 125 | 126 | #: inc/xuc.class.php:100 127 | msgid "Dialing" 128 | msgstr "Vytáčení" 129 | 130 | #: inc/xuc.class.php:109 131 | msgid "Answer" 132 | msgstr "Zvednout" 133 | 134 | #: inc/xuc.class.php:112 135 | msgid "Hangup" 136 | msgstr "Zavěsit" 137 | 138 | #: inc/xuc.class.php:115 139 | msgid "Hold" 140 | msgstr "Podržet" 141 | 142 | #: inc/xuc.class.php:120 143 | msgid "Phone actions" 144 | msgstr "Akce telefonu" 145 | 146 | #: inc/xuc.class.php:123 147 | msgid "Dial number" 148 | msgstr "Vytočit číslo" 149 | 150 | #: inc/xuc.class.php:124 151 | msgid "Transfer to number" 152 | msgstr "Přenést na číslo" 153 | 154 | #: inc/xuc.class.php:127 155 | msgid "Dial" 156 | msgstr "Vytočit" 157 | 158 | #: inc/xuc.class.php:130 159 | msgid "Transfer" 160 | msgstr "Přenos" 161 | 162 | #: inc/xuc.class.php:192 163 | msgid "User found in GLPI:" 164 | msgstr "Uživatel nalezený v GLPI:" 165 | 166 | #: inc/xuc.class.php:206 167 | msgid "Multiple users found with this phone number" 168 | msgstr "Pro toto tel. číslo nalezeno vícero uživatelů" 169 | 170 | #: inc/phone_line.class.php:111 171 | msgid "Add a phone" 172 | msgstr "Přidat telefon" 173 | 174 | #: inc/phone_line.class.php:233 175 | msgid "Add a line" 176 | msgstr "Přidat linku" 177 | 178 | #: inc/phone_line.class.php:266 inc/line.class.php:142 inc/line.class.php:216 179 | msgid "Protocol" 180 | msgstr "Protokol" 181 | 182 | #: inc/phone_line.class.php:269 inc/line.class.php:157 inc/line.class.php:232 183 | msgid "Provisioning code" 184 | msgstr "Kód zajištění" 185 | 186 | #: inc/phone_line.class.php:270 187 | msgid "Caller num" 188 | msgstr "Číslo volajícího" 189 | 190 | #: inc/phone_line.class.php:271 191 | msgid "Caller name" 192 | msgstr "Jméno volajícího" 193 | 194 | #: inc/line.class.php:38 195 | msgid "Line" 196 | msgid_plural "Lines" 197 | msgstr[0] "Linka" 198 | msgstr[1] "Linky" 199 | msgstr[2] "Linek" 200 | msgstr[3] "Linky" 201 | 202 | #: inc/line.class.php:146 inc/line.class.php:264 203 | msgid "Xivo line_id" 204 | msgstr "XIVO identifikátor linky" 205 | 206 | #: inc/line.class.php:153 inc/line.class.php:224 207 | msgid "Provisioning extension" 208 | msgstr "Linka zajištění" 209 | 210 | #: inc/line.class.php:164 inc/line.class.php:240 211 | msgid "Device slot" 212 | msgstr "Slot telefonu" 213 | 214 | #: inc/line.class.php:168 inc/line.class.php:248 215 | msgid "Position" 216 | msgstr "Pozice" 217 | 218 | #: inc/line.class.php:175 inc/line.class.php:256 219 | msgid "Registrar" 220 | msgstr "Registrátor" 221 | 222 | #: inc/line.class.php:196 223 | msgid "Associated lines" 224 | msgstr "Přiřazené linky" 225 | 226 | #: inc/config.class.php:36 227 | msgid "Xivo" 228 | msgstr "Xivo" 229 | 230 | #: inc/config.class.php:79 231 | msgid "Configuration of XIVO integration" 232 | msgstr "Nastavení integrace XIVO" 233 | 234 | #: inc/config.class.php:84 235 | msgid "XUC integration (click2call, presence, etc)" 236 | msgstr "Integrace XUC (zavolat kliknutím, přítomnost, atd)" 237 | 238 | #: inc/config.class.php:100 239 | msgid "XUC url (with port)" 240 | msgstr "URL adresa XUC (s portem)" 241 | 242 | #: inc/config.class.php:109 243 | msgid "Secure connection to WebSocket" 244 | msgstr "Zabezpečené připojení na WebSocket" 245 | 246 | #: inc/config.class.php:117 247 | msgid "Enable for Self-service users" 248 | msgstr "Zapnout pro samoobslužné uživatele" 249 | 250 | #: inc/config.class.php:129 251 | msgid "Click2call" 252 | msgstr "Volat kliknutím" 253 | 254 | #: inc/config.class.php:140 255 | msgid "Presence" 256 | msgstr "Přítomnost" 257 | 258 | #: inc/config.class.php:152 259 | msgid "Callcenter features" 260 | msgstr "Funkce kontaktního centra" 261 | 262 | #: inc/config.class.php:163 263 | msgid "Auto-open user/ticket on call" 264 | msgstr "Při volání automaticky otevřít uživatele/požadavek" 265 | 266 | #: inc/config.class.php:172 267 | msgid "Auto-open in new window" 268 | msgstr "Automaticky otevírat v novém okně" 269 | 270 | #: inc/config.class.php:181 271 | msgid "Keep xuc session" 272 | msgstr "Zachovat xuc relaci" 273 | 274 | #: inc/config.class.php:195 275 | msgid "Import assets into GLPI inventory" 276 | msgstr "Importovat majetek do GLPI inventáře" 277 | 278 | #: inc/config.class.php:211 279 | msgid "API REST url" 280 | msgstr "URL adresa REST API" 281 | 282 | #: inc/config.class.php:266 283 | msgid "Import phones" 284 | msgstr "Importovat telefony" 285 | 286 | #: inc/config.class.php:278 287 | msgid "Also import phones with" 288 | msgstr "Také importovat telefony s" 289 | 290 | #: inc/config.class.php:282 291 | msgid "empty serial" 292 | msgstr "nevyplněným sériovým číslem" 293 | 294 | #: inc/config.class.php:291 295 | msgid "empty mac" 296 | msgstr "nevyplněnou mac adresou" 297 | 298 | #: inc/config.class.php:300 299 | msgid "'not_configured' state" 300 | msgstr "stav „nenastaveno“" 301 | 302 | #: inc/config.class.php:311 303 | msgid "Import lines" 304 | msgstr "Importovat linky" 305 | 306 | #: inc/config.class.php:325 307 | msgid "Import phones-lines relation" 308 | msgstr "Importovat vztahy telefony-linky" 309 | 310 | #: inc/config.class.php:350 311 | msgid "REST API status" 312 | msgstr "Stav REST API" 313 | 314 | #: inc/config.class.php:371 315 | msgid "Last Error" 316 | msgstr "Poslední chyba" 317 | 318 | #: inc/config.class.php:381 319 | msgid "Auth token" 320 | msgstr "Ověřovací token" 321 | 322 | #: inc/config.class.php:387 323 | msgid "ACL" 324 | msgstr "ACL seznam" 325 | -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ------------------------------------------------------------------------- 3 | * xivo plugin for GLPI 4 | * ------------------------------------------------------------------------- 5 | * 6 | * LICENSE 7 | * 8 | * This file is part of xivo. 9 | * 10 | * xivo is free software; you can redistribute it and/or modify 11 | * it under the terms of the GNU General Public License as published by 12 | * the Free Software Foundation; either version 3 of the License, or 13 | * (at your option) any later version. 14 | * 15 | * xivo is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with xivo. If not, see . 22 | * ------------------------------------------------------------------------- 23 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 24 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 25 | * @link https://github.com/pluginsGLPI/xivo 26 | * ------------------------------------------------------------------------- 27 | */ 28 | 29 | .xivo_config { 30 | text-align: left; 31 | width: 950px; 32 | margin: 0 auto; 33 | } 34 | 35 | .xivo_config h1, 36 | .xivo_title { 37 | font-size: 12px; 38 | font-weight: bold; 39 | text-align: center; 40 | padding: 5px 10px 5px 0; 41 | border-radius: 0; 42 | margin: 15px 0 20px 0; 43 | font-size: 1.1em; 44 | color: #000; 45 | padding: 10px 5px; 46 | background-color: #F1F1F1; 47 | } 48 | 49 | .xivo_field { 50 | margin: 10px 0 30px 0; 51 | position: relative; 52 | height: 20px; 53 | text-align: left; 54 | } 55 | 56 | .inline_fields .xivo_field { 57 | float: left; 58 | margin-bottom: 15px; 59 | } 60 | 61 | .inline_fields_clear { 62 | height: 10px; 63 | clear: left; 64 | content: " "; 65 | } 66 | 67 | .xivo_field .xivo_input, 68 | .xivo_field .select2-container { 69 | position: absolute; 70 | top: 0; 71 | left: 10px; 72 | border-radius: 0; 73 | left: 0; 74 | z-index: 10; 75 | height: 25px; 76 | padding: 0 5px; 77 | } 78 | .xivo_field .xivo_input { 79 | background-color: transparent; 80 | border: 0 solid #CCC; 81 | border-bottom-width: 2px; 82 | } 83 | .xivo_field .select2-container { 84 | padding: inherit; 85 | } 86 | 87 | /* strangely, we can't do this with comma ...*/ 88 | .xivo_field .xivo_input::-webkit-input-placeholder { opacity: 0; transition: opacity 0.1s ease-in-out; } 89 | .xivo_field .xivo_input:-moz-placeholder { opacity: 0; transition: opacity 0.1s ease-in-out; } /* FF 4-18 */ 90 | .xivo_field .xivo_input::-moz-placeholder { opacity: 0; transition: opacity 0.1s ease-in-out; } /* FF 19+ */ 91 | .xivo_field .xivo_input:-ms-input-placeholder { opacity: 0; transition: opacity 0.1s ease-in-out; } /* IE 10+ */ 92 | .xivo_field .xivo_input:focus::-webkit-input-placeholder { opacity: 1; } 93 | .xivo_field .xivo_input:focus:-moz-placeholder { opacity: 1; } 94 | .xivo_field .xivo_input:focus::-moz-placeholder { opacity: 1; } 95 | .xivo_field .xivo_input:focus:-ms-input-placeholder { opacity: 1; } 96 | 97 | .xivo_field .xivo_input::-moz-placeholder { 98 | opacity: 0; 99 | transition: opacity 0.1s ease-in-out; 100 | } 101 | 102 | .xivo_field .xivo_label { 103 | position: absolute; 104 | top: 5px; 105 | left: 5px; 106 | color: #686868; 107 | z-index: 5; 108 | transition: 0.1s ease-in; 109 | } 110 | 111 | .xivo_field .xivo_input:focus { 112 | border-color: #5897fb; 113 | } 114 | 115 | .xivo_field .select2-container ~ .xivo_label, 116 | .xivo_field .no-wrap ~ .xivo_label, 117 | .xivo_field .xivo_input:focus ~ .xivo_label, 118 | .xivo_field .xivo_input:required:not(:valid) ~ .xivo_label, 119 | .xivo_field .xivo_input:valid ~ .xivo_label { 120 | top: -15px; 121 | } 122 | .xivo_field .xivo_input:focus ~ .xivo_label { 123 | color: #5897fb; 124 | font-weight: bold; 125 | } 126 | 127 | .xivo_config .submit { 128 | margin: 10px auto; 129 | } 130 | 131 | .xivo_config_block { 132 | background-color: #F3F3F3; 133 | padding: 10px; 134 | margin: -15px 0 20px 0; 135 | overflow: hidden; 136 | } 137 | 138 | .xivo_config_block.sub_config { 139 | background-color: #E8E7E7; 140 | padding-bottom: 0; 141 | border: 0 solid #C2C2C2; 142 | border-width: 0 0 0 5px; 143 | } 144 | 145 | .xivo_callto_link { 146 | position: relative; 147 | width: 15px; 148 | height: 15px; 149 | display: inline-block; 150 | margin-left: 2px; 151 | cursor: pointer; 152 | color: #B6B6B6; 153 | } 154 | .xivo_callto_link:before { 155 | position: absolute; 156 | top: 4px; 157 | left: 0; 158 | content: "\f098"; 159 | font-family:'FontAwesome','Font Awesome 5 Free'; 160 | font-size: 15px; 161 | opacity: .8; 162 | font-weight: 900; 163 | } 164 | 165 | .xivo_callto_link:hover:before { 166 | opacity: 1; 167 | } 168 | 169 | .xivo_callto_link.AgentReady:before { 170 | color: #9BC920; 171 | } 172 | .xivo_callto_link.AgentLogin:before, 173 | .xivo_callto_link.AgentOnPause:before { 174 | color: #FFB04A; 175 | } 176 | .xivo_callto_link.AgentDialing:before, 177 | .xivo_callto_link.AgentRinging:before, 178 | .xivo_callto_link.AgentOnCall:before { 179 | color: #D13224; 180 | } 181 | .xivo_callto_link.AgentOnWrapup:before { 182 | } 183 | .xivo_callto_link.AgentLoggedOut:before { 184 | color: #000000; 185 | } 186 | 187 | #c_preference #xivo_agent_button.fa { 188 | font-size: 1.8em; 189 | cursor: pointer; 190 | } 191 | 192 | #xivo_agent { 193 | position: relative; 194 | } 195 | #xivo_agent_form { 196 | display: none; 197 | text-align: left; 198 | top: 40px; 199 | right: -100px; 200 | position: absolute; 201 | min-width: 150px; 202 | background: white; 203 | box-shadow: 0px 2px 2px 1px #D2CAC6; 204 | z-index: 50; 205 | padding: 0 12px 12px 12px; 206 | } 207 | 208 | #xivo_agent_form a.vsubmit { 209 | color: #8f5a0a; 210 | } 211 | 212 | #xivo_agent_form:after { 213 | bottom: 100%; 214 | right: 92px; 215 | border: solid transparent; 216 | content: " "; 217 | height: 0; 218 | width: 0; 219 | position: absolute; 220 | pointer-events: none; 221 | border-color: rgba(255, 255, 255, 0); 222 | border-bottom-color: #FFF; 223 | border-width: 15px; 224 | margin-left: -15px; 225 | } 226 | 227 | #xivo_agent_form h2 { 228 | font-size: 1.2em; 229 | background: #D8D8D8; 230 | padding: 3px 5px; 231 | white-space: nowrap; 232 | } 233 | 234 | #xivo_agent_form label, 235 | #xivo_agent_form input { 236 | display: block; 237 | } 238 | 239 | #xivo_agent_form input { 240 | margin-bottom: 10px; 241 | } 242 | 243 | #xivo_agent_button { 244 | position: relative; 245 | } 246 | 247 | #xivo_agent_button.ringing { 248 | animation: ringing 2s linear infinite; 249 | } 250 | 251 | #xivo_agent_status { 252 | position: absolute; 253 | content: '\f111'; 254 | font-family:'FontAwesome'; 255 | color: transparent; 256 | font-size: 12px; 257 | top: -3px; 258 | right: -3px; 259 | } 260 | 261 | #xuc_statuses label { 262 | display: inline-block; 263 | min-width: 40px; 264 | } 265 | #xuc_statuses input { 266 | margin-bottom: inherit; 267 | border: none; 268 | display: inline-block; 269 | } 270 | 271 | #c_preference #xuc_statuses .select2-choice { 272 | color: inherit; 273 | text-transform: uppercase; 274 | } 275 | 276 | #xuc_statuses .select2-container .select2-choice { 277 | text-overflow: inherit; 278 | } 279 | 280 | #xuc_statuses .select2-container .select2-choice:before { 281 | content: none; 282 | } 283 | 284 | #xuc_statuses .select2-container .select2-choice > .select2-chosen { 285 | text-indent: inherit; 286 | } 287 | 288 | #xuc_statuses .select2-container .select2-choice > .select2-chosen:before { 289 | content: none; 290 | } 291 | 292 | #xuc_phone_status { 293 | margin-left: 6px; 294 | } 295 | 296 | #xuc_sign_out { 297 | font-size: 16px; 298 | float: right; 299 | } 300 | 301 | #xuc_user_info { 302 | min-width: 300px; 303 | } 304 | 305 | #xuc_user_picture { 306 | float: left; 307 | width: 50px; 308 | height: 50px; 309 | margin-right: 5px; 310 | padding:2px; 311 | border-radius: 51px; 312 | border: 3px inset #C2C2C2; 313 | } 314 | 315 | #xuc_user_picture img { 316 | width: 50px; 317 | height: 50px; 318 | border-radius: 50px; 319 | } 320 | 321 | #xuc_user_info .floating_text { 322 | float: left; 323 | } 324 | 325 | #xuc_fullname { 326 | margin-top: 5px; 327 | vertical-align: top; 328 | font-size: 1.2em; 329 | white-space: nowrap; 330 | text-transform: capitalize; 331 | display: block; 332 | font-weight: bold; 333 | } 334 | 335 | #xuc_user_status { 336 | color: #636363; 337 | text-transform: uppercase; 338 | } 339 | 340 | #xuc_call_informations, 341 | #xuc_ringing_title, 342 | #xuc_oncall_title { 343 | display: none; 344 | } 345 | 346 | #xuc_call_informations i.fa:hover { 347 | opacity: .8; 348 | } 349 | 350 | .xuc_content { 351 | margin-left: 10px; 352 | } 353 | 354 | #xuc_call_actions i.fa, 355 | #auto_actions i.fa { 356 | font-size: 22px; 357 | cursor: pointer; 358 | } 359 | 360 | #xuc_call_actions i.fa:hover, 361 | #auto_actions i.fa:hover { 362 | opacity: .8; 363 | } 364 | 365 | #auto_actions { 366 | display: none; 367 | margin-bottom: 5px; 368 | } 369 | 370 | #xuc_hangup { 371 | color: #CB2F2F; 372 | } 373 | 374 | #xuc_hold { 375 | display: none; /* feature doesn't work in Cti*/ 376 | } 377 | 378 | #xuc_answer { 379 | display: none; /* feature doesn't work in Cti*/ 380 | color: #4CA84C; 381 | } 382 | 383 | #xivo_agent_form .input-inline { 384 | display: inline-block; 385 | float: left; 386 | } 387 | 388 | #xuc_call_actions .manual_actions i.fa { 389 | margin-top: -2px; 390 | margin-left: 3px; 391 | float: left; 392 | } 393 | 394 | #xuc_call_actions #xuc_dial { 395 | color: #4CA84C; 396 | } 397 | 398 | #xivo_agent_form #transfer_phone_num { 399 | display: none; 400 | } 401 | 402 | #xuc_call_actions #xuc_transfer { 403 | color: #CB2F2F; 404 | display: none; 405 | } -------------------------------------------------------------------------------- /inc/xuc.class.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | if (!defined('GLPI_ROOT')) { 32 | die("Sorry. You can't access this file directly"); 33 | } 34 | 35 | class PluginXivoXuc { 36 | function getLoginForm() { 37 | // prepare a form for js submitting 38 | $out = "
39 |

".__("Connect to XIVO", 'xivo')."

40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 |
53 |
"; 54 | 55 | return $out; 56 | } 57 | 58 | function getLoggedForm() { 59 | $user = new User; 60 | $user->getFromDB($_SESSION['glpiID']); 61 | $picture = ""; 62 | if (isset($user->fields['picture'])) { 63 | $picture = $user->fields['picture']; 64 | } 65 | 66 | $current_config = PluginXivoConfig::getConfig(); 67 | 68 | $out = "
69 |

70 | ". 71 | __("XIVO connected", 'xivo')."  72 |

73 | 74 |
75 |
76 | 77 |
78 |
79 |
80 |
"; 81 | if ($current_config['enable_callcenter'] && PLUGIN_XIVO_ENABLE_CALLCENTER) { 82 | $out .= "
83 | 84 | 85 |
"; 86 | } 87 | $out .= "
88 | 89 | 90 |
91 |
92 |
93 |
94 |
95 | 96 |
97 | 98 |
99 |

100 |
".__("Incoming call", 'xivo')."
101 |
".__("On call", 'xivo')."
102 |
".__("Dialing", 'xivo')."
103 |

104 |
105 |
".__('Caller num:')." 
106 |
107 | 108 |
109 | 112 | 115 | 118 |
119 |
120 |
121 |
122 |

".__("Phone actions", 'xivo')."

123 |
124 |
125 | 126 | 127 | 130 | 133 |
134 |
135 |
"; 136 | 137 | return $out; 138 | } 139 | 140 | function getCallLink($users_id = 0) { 141 | $data = [ 142 | 'phone' => null, 143 | 'phone2' => null, 144 | 'mobile' => null, 145 | 'title' => '', 146 | ]; 147 | $user = new User; 148 | if ($user->getFromDB($users_id)) { 149 | if (!empty($user->fields['phone'])) { 150 | $data['phone'] = $user->fields['phone']; 151 | $data['phone2'] = $user->fields['phone2']; 152 | $data['mobile'] = $user->fields['mobile']; 153 | $data['title'] = sprintf(__("Call %s: %s"), $user->getName(), $user->fields['phone']); 154 | } 155 | } 156 | 157 | return $data; 158 | } 159 | 160 | function getUserInfosByPhone($params = []) { 161 | global $DB; 162 | 163 | $data = [ 164 | 'users' => [], 165 | 'tickets' => [], 166 | 'redirect' => false, 167 | 'message' => null 168 | ]; 169 | 170 | $caller_num = isset($params['caller_num']) 171 | ? preg_replace('/\D+/', '', $params['caller_num']) // only digits 172 | : 0; 173 | 174 | if (empty($caller_num)) { 175 | return $data; 176 | } 177 | 178 | $r_not_digit = "[^0-9]*"; 179 | $regex_num = "^".$r_not_digit.implode($r_not_digit, str_split($caller_num)).$r_not_digit."$"; 180 | 181 | // try to find user by its phone or mobile numbers 182 | $iterator_users = $DB->request([ 183 | 'SELECT' => ['id'], 184 | 'FROM' => 'glpi_users', 185 | 'WHERE' => [ 186 | 'OR' => [ 187 | 'phone' => ['REGEXP', $regex_num], 188 | 'mobile' => ['REGEXP', $regex_num], 189 | ] 190 | ] 191 | ]); 192 | foreach ($iterator_users as $data_user) { 193 | $userdata = getUserName($data_user["id"], 2); 194 | $name = "".__("User found in GLPI:", 'xivo')."". 195 | " ".$userdata['name']; 196 | $name = sprintf(__('%1$s %2$s'), $name, 197 | Html::showToolTip($userdata["comment"], 198 | ['link' => $userdata["link"], 199 | 'display' => false])); 200 | 201 | $data_user['link'] = $name; 202 | $data['users'][] = $data_user; 203 | } 204 | 205 | // one user search for tickets 206 | if (count($data['users']) > 1) { 207 | // mulitple user, no redirect and return a message 208 | $data['message'] = __("Multiple users found with this phone number", 'xivo'); 209 | } else if (count($data['users']) == 1) { 210 | $current_user = current($data['users']); 211 | $users_id = $current_user['id']; 212 | $iterator_tickets = $DB->request([ 213 | 'SELECT' => ['glpi_tickets.id', 'glpi_tickets.name', 'glpi_tickets.content'], 214 | 'FROM' => 'glpi_tickets', 215 | 'INNER JOIN' => [ 216 | 'glpi_tickets_users' => [ 217 | 'FKEY' => [ 218 | 'glpi_tickets_users' => 'tickets_id', 219 | 'glpi_tickets' => 'id', 220 | ] 221 | ] 222 | ], 223 | 'WHERE' => [ 224 | 'glpi_tickets_users.type' => CommonITILActor::REQUESTER, 225 | 'glpi_tickets.status' => ["<", CommonITILObject::SOLVED], 226 | ], 227 | ]); 228 | $data['tickets'] = iterator_to_array($iterator_tickets); 229 | $nb_tickets = count($iterator_tickets); 230 | 231 | $ticket = new Ticket; 232 | $user = new User; 233 | $user->getFromDB($users_id); 234 | 235 | if ($nb_tickets == 1) { 236 | // if we have one user with one ticket, redirect to ticket 237 | $ticket->getFromDB(current($data['tickets'])['id']); 238 | $data['redirect'] = $ticket->getLinkURL(); 239 | } else if ($nb_tickets > 1) { 240 | // if we have one user with multiple tickets, redirect to user (on Ticket tab) 241 | $data['redirect'] = $user->getLinkURL().'&forcetab=Ticket$1'; 242 | } else { 243 | // if the current user has no tickets, redirect to ticket creation form 244 | $data['redirect'] = $ticket->getFormUrl().'?_users_id_requester='.$user->getID(); 245 | } 246 | } 247 | 248 | return $data; 249 | } 250 | } -------------------------------------------------------------------------------- /inc/phone.class.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | if (!defined('GLPI_ROOT')) { 32 | die("Sorry. You can't access this file directly"); 33 | } 34 | 35 | class PluginXivoPhone extends CommonDBTM { 36 | static $rightname = 'phone'; 37 | 38 | /** 39 | * Import a single device (phone) into GLPI 40 | * 41 | * @param array $device the device to import 42 | * @return mixed the phone id (integer) or false 43 | */ 44 | static function importSingle($device = []) { 45 | if (!isset($device['id'])) { 46 | return false; 47 | } 48 | 49 | $phone = new Phone; 50 | $xivophone = new self; 51 | $model = new PhoneModel; 52 | $manufacturer = new Manufacturer; 53 | $networkport = new NetworkPort(); 54 | $xivoconfig = PluginXivoConfig::getConfig(); 55 | 56 | $manufacturers_id = $manufacturer->importExternal($device['vendor']); 57 | $phonemodels_id = $model->importExternal($device['model']); 58 | $number_line = count($device['lines']); 59 | $contact = ''; 60 | $contact_num = ''; 61 | if ($number_line) { 62 | $last_line = end($device['lines']); 63 | if (isset($last_line['caller_name'])) { 64 | $contact = $last_line['caller_name']; 65 | $contact_num = $last_line['caller_num']; 66 | } 67 | } 68 | 69 | $input = [ 70 | 'name' => Dropdown::getDropdownName('glpi_manufacturers', $manufacturers_id). 71 | '-'. 72 | Dropdown::getDropdownName('glpi_phonemodels', $phonemodels_id), 73 | 'serial' => $device['sn'], 74 | 'manufacturers_id' => $manufacturers_id, 75 | 'phonemodels_id' => $phonemodels_id, 76 | 'contact' => $contact, 77 | 'contact_num' => $contact_num, 78 | 'number_line' => $number_line, 79 | 'firmware' => $device['plugin'], 80 | 'comment' => $device['description'], 81 | 'is_dynamic' => 1, 82 | ]; 83 | 84 | $phones_id = self::getPhoneID($device); 85 | $input_xivophone = [ 86 | 'phones_id' => $phones_id, 87 | 'xivo_id' => $device['id'], 88 | 'template' => $device['template_id'] !== null ? $device['template_id'] : "", 89 | 'date_mod' => $_SESSION["glpi_currenttime"], 90 | ]; 91 | 92 | if ($number_line && isset($last_line['protocol'])) { 93 | $input_xivophone['line_name'] = $last_line['protocol']."/". 94 | $last_line['name']; 95 | $input_xivophone['provisioning_code'] = $last_line['provisioning_code']; 96 | if (isset($last_line['glpi_users_id'])) { 97 | $input['users_id'] = $last_line['glpi_users_id']; 98 | } 99 | } 100 | 101 | if (!$phones_id) { 102 | // add phone 103 | $input['entities_id'] = $xivoconfig['default_entity']; 104 | $phones_id = $phone->add($input); 105 | 106 | // add a line in object table (to store xivo id) 107 | $input_xivophone['phones_id'] = $phones_id; 108 | $xivophone->add($input_xivophone); 109 | } else { 110 | //update phone 111 | $input['id'] = $phones_id; 112 | unset($input['name']); 113 | $phone->update($input); 114 | 115 | // add line in object table (to store xivo id) 116 | if ($xivophone->getFromDBByCrit([ 117 | 'xivo_id' => $device['id'] 118 | ])) { 119 | $input_xivophone['id'] = $xivophone->getID(); 120 | $xivophone->update($input_xivophone); 121 | } else { 122 | $input_xivophone['phones_id'] = $phones_id; 123 | $xivophone->add($input_xivophone); 124 | } 125 | } 126 | 127 | // import network ports 128 | if (!empty($device['mac'])) { 129 | $found_netports = self::getFullNetworkPort($phones_id); 130 | $net_input = [ 131 | 'items_id' => $phones_id, 132 | 'itemtype' => 'Phone', 133 | 'entities_id' => $phone->fields['entities_id'], 134 | 'mac' => $device['mac'], 135 | 'instantiation_type' => 'NetworkPortEthernet', 136 | 'name' => '', 137 | 'NetworkName_name' => '', 138 | 'NetworkName__ipaddresses' => ['-1' => $device['ip']], 139 | '_create_children' => true 140 | ]; 141 | if (count($found_netports) == 0) { 142 | $networkport->add($net_input); 143 | } else { 144 | $netport = end($found_netports); 145 | if (isset($netport['networknames'])) { 146 | $net_input['id'] = $netport['id']; 147 | $net_input['NetworkName_id'] = $netport['networknames'][0]['id']; 148 | if (isset($netport['networknames'][0]['ipaddresses'][0]['id'])) { 149 | $net_input['NetworkName__ipaddresses'] = [ 150 | $netport['networknames'][0]['ipaddresses'][0]['id'] => $device['ip'] 151 | ]; 152 | } 153 | $networkport->update($net_input); 154 | } 155 | } 156 | } 157 | 158 | // import line of this phones 159 | PluginXivoPhone_Line::importAll($device['lines'], $phones_id); 160 | 161 | return $phones_id; 162 | } 163 | 164 | /** 165 | * Retrieve the tree of netports (with name and ipaddresses) for a glpi phone 166 | * 167 | * @param integer $phones_id the phone id 168 | * @return array the netport tree 169 | */ 170 | static function getFullNetworkPort($phones_id = 0) { 171 | 172 | global $DB; 173 | 174 | $networports_iterator = $DB->request( 175 | [ 176 | 'FROM' => NetworkPort::getTable(), 177 | 'WHERE' => [ 178 | 'itemtype' => 'Phone', 179 | 'items_id' => $phones_id, 180 | ] 181 | ] 182 | ); 183 | 184 | $found_networkports = []; 185 | 186 | foreach ($networports_iterator as $networkport) { 187 | $networknames_iterator = $DB->request( 188 | [ 189 | 'FROM' => NetworkName::getTable(), 190 | 'WHERE' => [ 191 | 'itemtype' => 'NetworkPort', 192 | 'items_id' => $networkport['id'], 193 | ] 194 | ] 195 | ); 196 | 197 | $networkport['networknames'] = []; 198 | 199 | foreach ($networknames_iterator as $networkname) { 200 | 201 | $ipaddresses_iterator = $DB->request( 202 | [ 203 | 'FROM' => IPAddress::getTable(), 204 | 'WHERE' => [ 205 | 'itemtype' => 'NetworkName', 206 | 'items_id' => $networkname['id'], 207 | ] 208 | ] 209 | ); 210 | 211 | $networkname['ipaddresses'] = []; 212 | foreach ($ipaddresses_iterator as $ipaddress) { 213 | $networkname['ipaddresses'][] = $ipaddress; 214 | } 215 | $networkport['networknames'][] = $networkname; 216 | } 217 | 218 | $found_networkports[$networkport['id']] = $networkport; 219 | } 220 | 221 | return $found_networkports; 222 | } 223 | 224 | /** 225 | * Trigger a synchronisation for a single phone 226 | * 227 | * @param string $xivo_id the device id known in XIVO 228 | * @return boolean 229 | */ 230 | static function forceSync($xivo_id = "") { 231 | // check if api config is valid 232 | if (!PluginXivoConfig::isValid(true)) { 233 | return false; 234 | } 235 | 236 | $apiclient = new PluginXivoAPIClient; 237 | $device = $apiclient->getSingleDevice($xivo_id); 238 | $device['lines'] = $apiclient->getSingleDeviceLines($xivo_id); 239 | 240 | // import lines 241 | foreach ($device['lines'] as &$line) { 242 | // add or update assets 243 | $lines_id = PluginXivoLine::importSingle($line); 244 | $line['lines_id'] = $lines_id; 245 | } 246 | 247 | // import phone 248 | return self::importSingle($device); 249 | } 250 | 251 | /** 252 | * Retrieve the GLPI by a device array, try to find by 253 | * - serial number 254 | * - mac address 255 | * - xivo id 256 | * 257 | * @param array $device the device from xivo api 258 | * @return mixed the phone id (integer) or false 259 | */ 260 | static function getPhoneID($device = []) { 261 | global $DB; 262 | 263 | $phonetable = Phone::getTable(); 264 | $table = self::getTable(); 265 | 266 | $query = "SELECT phone.`id` 267 | FROM `$phonetable` AS phone 268 | LEFT JOIN `$table` AS xivo 269 | ON xivo.`phones_id` = phone.`id` 270 | LEFT JOIN `glpi_networkports` AS net 271 | ON net.`itemtype` = 'Phone' 272 | AND net.`items_id` = phone.`id` 273 | WHERE phone.`serial` = '{$device['sn']}' 274 | AND phone.`serial` IS NOT NULL 275 | AND phone.`serial` != '' 276 | OR net.`mac` = '{$device['mac']}' 277 | OR xivo.`xivo_id` = '{$device['id']}' 278 | ORDER BY phone.`id` ASC"; 279 | $result = $DB->query($query); 280 | 281 | if ($DB->numrows($result) >= 1) { 282 | return $DB->result($result, 0, 'id'); 283 | } 284 | return false; 285 | } 286 | 287 | /** 288 | * Purge its dependencies when a GLPI Phone is purged 289 | * 290 | * @param Phone $phone the purged phone 291 | * @return boolean 292 | */ 293 | static function phonePurged(Phone $phone) { 294 | $xivophone = new self; 295 | return $xivophone->deleteByCriteria(['phones_id' => $phone->getID()]); 296 | } 297 | 298 | /** 299 | * Display on phone form additional informations 300 | * 301 | * @param Phone $phone 302 | * @return boolean 303 | */ 304 | static function displayAutoInventory(Phone $phone) { 305 | $xivophone = new self; 306 | if ($xivophone->getFromDBByCrit([ 307 | 'phones_id' => $phone->getID() 308 | ])) { 309 | echo "

".__('XIVO informations', 'xivo')."

"; 310 | echo ""; 311 | 312 | echo ""; 313 | echo "".__("Xivo ID", 'xivo')."". 314 | "".$xivophone->fields['xivo_id'].""; 315 | echo "".__("Template", 'xivo')."". 316 | "".$xivophone->fields['template'].""; 317 | echo ""; 318 | 319 | echo ""; 320 | echo "".__("Last synchronisation", 'xivo')."". 321 | "".Html::convDateTime($xivophone->fields['date_mod']).""; 322 | echo ""; 323 | 324 | echo ""; 325 | echo ""; 326 | $form_url = self::getFormURL(); 327 | echo Html::link(__("Force synchronization"), 328 | "$form_url?forcesync&xivo_id=".$xivophone->fields['xivo_id'], 329 | ['class' => 'vsubmit']); 330 | echo ""; 331 | echo ""; 332 | } 333 | 334 | return true; 335 | } 336 | 337 | /** 338 | * Database table installation for the item type 339 | * 340 | * @param Migration $migration 341 | * @return boolean true on success 342 | */ 343 | static function install(Migration $migration) { 344 | global $DB; 345 | 346 | $table = self::getTable(); 347 | if (!$DB->tableExists($table)) { 348 | $migration->displayMessage(sprintf(__("Installing %s"), $table)); 349 | 350 | $query = "CREATE TABLE `$table` ( 351 | `id` INT(11) NOT NULL auto_increment, 352 | `phones_id` INT(11) NOT NULL, 353 | `xivo_id` VARCHAR(255) NOT NULL DEFAULT '', 354 | `template` VARCHAR(255) NOT NULL DEFAULT '', 355 | `date_mod` DATETIME DEFAULT NULL, 356 | PRIMARY KEY (`id`), 357 | KEY `phones_id` (`phones_id`), 358 | KEY `xivo_id` (`xivo_id`) 359 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"; 360 | $DB->query($query) or die ($DB->error()); 361 | } 362 | 363 | return true; 364 | } 365 | 366 | /** 367 | * Database table uninstallation for the item type 368 | * 369 | * @return boolean True on success 370 | */ 371 | static function uninstall() { 372 | global $DB; 373 | $DB->query("DROP TABLE IF EXISTS `".self::getTable()."`"); 374 | 375 | return true; 376 | } 377 | } 378 | -------------------------------------------------------------------------------- /inc/apiclient.class.php: -------------------------------------------------------------------------------- 1 | . 24 | * ------------------------------------------------------------------------- 25 | * @copyright Copyright (C) 2017-2022 by xivo plugin team. 26 | * @license GPLv3 https://www.gnu.org/licenses/gpl-3.0.html 27 | * @link https://github.com/pluginsGLPI/xivo 28 | * ------------------------------------------------------------------------- 29 | */ 30 | 31 | if (!defined('GLPI_ROOT')) { 32 | die("Sorry. You can't access this file directly"); 33 | } 34 | 35 | use GuzzleHttp\Psr7; 36 | use GuzzleHttp\Exception\GuzzleException; 37 | 38 | class PluginXivoAPIClient extends CommonGLPI { 39 | private $api_config = []; 40 | private $auth_token = ''; 41 | private $current_port = 0; 42 | private $current_version = 0; 43 | private $last_error = []; 44 | 45 | function __construct() { 46 | // retrieve plugin config 47 | $this->api_config = PluginXivoConfig::getConfig(); 48 | } 49 | 50 | 51 | function __destruct() { 52 | //destroy current token 53 | $this->disconnect(); 54 | } 55 | 56 | 57 | /** 58 | * Use Xivo Auth backend 59 | * 60 | * @return nothing (set private properties) 61 | */ 62 | function useXivoAuth() { 63 | $this->current_port = 9497; 64 | $this->current_version = 0.1; 65 | } 66 | 67 | 68 | /** 69 | * Use Xivo confd backend 70 | * 71 | * @return nothing (set private properties) 72 | */ 73 | function useXivoConfd() { 74 | $this->current_port = 9486; 75 | $this->current_version = 1.1; 76 | } 77 | 78 | 79 | /** 80 | * Check with Xivo API the mandatory actions 81 | * 82 | * @return array of [label -> boolean] 83 | */ 84 | function status() { 85 | $device = $this->getDevices([ 86 | 'query' => [ 87 | 'limit' => 1 88 | ] 89 | ]); 90 | $device_id = is_array($device) ? end($device['items'])['id'] : false; 91 | $line = $this->getLines([ 92 | 'query' => [ 93 | 'limit' => 1 94 | ] 95 | ]); 96 | $line_id = is_array($line) ? end($line['items'])['id'] : false; 97 | 98 | return [ 99 | __('REST API access', 'xivo') 100 | => !empty($this->auth_token), 101 | __('Get phone devices', 'xivo')." (confd.devices.read)" 102 | => is_array($device), 103 | __('Get single device', 'xivo')." (confd.devices.#.read)" 104 | => is_array($this->getSingleDevice($device_id, [ 105 | 'query' => [ 106 | 'limit' => 1 107 | ] 108 | ])) && is_array($this->getSingleDeviceLines($device_id, [ 109 | 'query' => [ 110 | 'limit' => 1 111 | ] 112 | ])), 113 | __('Get lines', 'xivo')." (confd.lines.read)" 114 | => is_array($line), 115 | __('Get single line', 'xivo')." (confd.lines.#.read)" 116 | => is_array($this->getSingleLine($line_id, [ 117 | 'query' => [ 118 | 'limit' => 1 119 | ] 120 | ])), 121 | __('Get users', 'xivo')." (confd.users.read)" 122 | => is_array($this->getUsers([ 123 | 'query' => [ 124 | 'limit' => 1 125 | ] 126 | ] )), 127 | ]; 128 | } 129 | 130 | 131 | /** 132 | * Attempt an http connection on xivo api 133 | * if suceed, set auth_token private properties 134 | * 135 | * @return array data returned by the api 136 | */ 137 | function connect() { 138 | // we use Xivo-auth api 139 | $this->useXivoAuth(); 140 | 141 | // send connect with http query 142 | $data = $this->httpQuery('token', [ 143 | 'auth' => [ 144 | $this->api_config['api_username'], 145 | $this->api_config['api_password'], 146 | ], 147 | 'json' => [ 148 | 'backend' => 'xivo_service', 149 | 'expiration' => HOUR_TIMESTAMP, 150 | ] 151 | ], 'POST'); 152 | 153 | if (is_array($data)) { 154 | if (isset($data['data']['token'])) { 155 | $this->auth_token = $data['data']['token']; 156 | } 157 | } 158 | 159 | return $data; 160 | } 161 | 162 | 163 | /** 164 | * Destroy session on xivo api (auth endpoint) 165 | * 166 | * @return array data returned by the api 167 | */ 168 | function disconnect() { 169 | return; 170 | // we use Xivo-auth api 171 | $this->useXivoAuth(); 172 | 173 | // send disconnect with http query 174 | return $this->httpQuery('token', [ 175 | 'verify' => boolval($this->api_config['api_ssl_check']), 176 | 'json' => [ 177 | 'token' => $this->auth_token, 178 | ] 179 | ], 'DELETE'); 180 | } 181 | 182 | 183 | /** 184 | * Retrieve list of devices (phones) in xivo api 185 | * 186 | * @param array $params http params (@see self::httpQuery params) 187 | * @return array data returned by the api 188 | */ 189 | function getDevices($params = []) { 190 | return $this->getList('devices', $params); 191 | } 192 | 193 | /** 194 | * Retrieve list of lines in xivo api 195 | * 196 | * @param array $params http params (@see self::httpQuery params) 197 | * @return array data returned by the api 198 | */ 199 | function getLines($params = []) { 200 | return $this->getList('lines', $params); 201 | } 202 | 203 | /** 204 | * Retrieve list of users in xivo api 205 | * 206 | * @param array $params http params (@see self::httpQuery params) 207 | * @return array data returned by the api 208 | */ 209 | function getUsers($params = []) { 210 | return $this->getList('users', $params); 211 | } 212 | 213 | /** 214 | * Retrieve a list from a specified endpoint 215 | * 216 | * @param string $endpoint the resource to retrieve (ex: devices, users, etc) 217 | * @param array $params http params (@see self::httpQuery params) 218 | * @return array data returned by the api 219 | */ 220 | function getList($endpoint = '', $params = []) { 221 | // declare default params 222 | $default_params = [ 223 | 'query' => [ 224 | 'limit' => 50, 225 | 'direction' => 'asc', 226 | 'offset' => 0, 227 | 'order' => '', 228 | 'search' => '', 229 | ] 230 | ]; 231 | 232 | // merge default params 233 | $params = array_replace_recursive($default_params, $params); 234 | 235 | // check connection 236 | if (empty($this->auth_token)) { 237 | $this->connect(); 238 | } 239 | 240 | // we use Xivo-confd api 241 | $this->useXivoConfd(); 242 | 243 | // get devices with http query 244 | $data = $this->httpQuery($endpoint, $params, 'GET'); 245 | 246 | return $data; 247 | } 248 | 249 | 250 | /** 251 | * Paginate function getList to avoid a big http query 252 | * 253 | * @param string $function function to use, will be prefixed by get (ex: getDevice, getUsers, etc) 254 | * @return array data returned by the api 255 | */ 256 | function paginate($function = "Devices") { 257 | $offset = 0; 258 | $limit = 200; 259 | $items = []; 260 | 261 | if (!method_exists($this, "get$function")) { 262 | return false; 263 | } 264 | 265 | do { 266 | $page = $this->{"get$function"}([ 267 | 'query' => [ 268 | 'offset' => $offset, 269 | 'limit' => $limit, 270 | ], 271 | '_with_metadata' => true 272 | ]); 273 | 274 | $items = array_merge($items, $page['items']); 275 | $offset+= $limit; 276 | } while ($offset < $page['total']); 277 | 278 | return $items; 279 | } 280 | 281 | /** 282 | * Retrieve a single resource with xivo api 283 | * 284 | * @param string $endpoint the resource to retrieve (ex: devices, users, etc) 285 | * @param string $id the id to retrive in xivo api 286 | * @return array data returned by the api 287 | */ 288 | function getSingle($endpoint = '', $id = '') { 289 | // check connection 290 | if (empty($this->auth_token)) { 291 | $this->connect(); 292 | } 293 | 294 | // we use Xivo-confd api 295 | $this->useXivoConfd(); 296 | 297 | // get devices with http query 298 | $data = $this->httpQuery("$endpoint/$id", [], 'GET'); 299 | 300 | return $data; 301 | } 302 | 303 | /** 304 | * Get a single device (phone) with xivo api 305 | * 306 | * @param string $id the xivo id of the device 307 | * @return array data returned by the api 308 | */ 309 | function getSingleDevice($id = "") { 310 | return $this->getSingle('devices', $id); 311 | } 312 | 313 | /** 314 | * Get a single line with xivo api 315 | * 316 | * @param string $id the xivo id of the line 317 | * @return array data returned by the api 318 | */ 319 | function getSingleLine($id = "") { 320 | return $this->getSingle('lines', $id); 321 | } 322 | 323 | /** 324 | * Get lines of a single device (phone) with xivo api 325 | * 326 | * @param string $id the xivo id of the device 327 | * @return array data returned by the api 328 | */ 329 | function getSingleDeviceLines($id = "") { 330 | $lines_items = $this->getList("devices/$id/lines")['items']; 331 | if (!is_array($lines_items)) { 332 | return false; 333 | } 334 | $lines = []; 335 | foreach ($lines_items as $item) { 336 | $lines[] = $this->getSingleLine($item['line_id']); 337 | } 338 | return $lines; 339 | } 340 | 341 | /** 342 | * Return the XIVO API base uri constructed from config 343 | * 344 | * @return string the uri 345 | */ 346 | function getAPIBaseUri() { 347 | return trim($this->api_config['api_url'], '/').":{$this->current_port}/{$this->current_version}/"; 348 | } 349 | 350 | /** 351 | * Send an http query to the xivo api 352 | * 353 | * @param string $resource the endpoint to use 354 | * @param array $params an array containg these possible options: 355 | * - _with_metadata (bool, default false) 356 | * - allow_redirects (bool, default false) 357 | * - timeout (int, default 5) 358 | * - connect_timeout (int, default 5) 359 | * - connect_timeout (int, default 5) 360 | * - debug (bool, default false) 361 | * - verify (bool, default based on plugin config), check ssl certificate 362 | * - query (array) url parameters 363 | * - body (string) raw data to send in body 364 | * - json (array) array to pass into the body chich will be json_encoded 365 | * - json (headers) http headers 366 | * @param string $method Http verb (ex: GET, POST, etc) 367 | * @return array data returned by the api 368 | */ 369 | function httpQuery($resource = '', $params = [], $method = 'GET') { 370 | global $CFG_GLPI; 371 | 372 | // declare default params 373 | $default_params = [ 374 | '_with_metadata' => false, 375 | 'allow_redirects' => false, 376 | 'timeout' => 5, 377 | 'connect_timeout' => 5, 378 | 'debug' => false, 379 | 'verify' => boolval($this->api_config['api_ssl_check']), 380 | 'query' => [], // url parameter 381 | 'body' => '', // raw data to send in body 382 | 'json' => [], // json data to send 383 | 'headers' => ['content-type' => 'application/json', 384 | 'Accept' => 'application/json'], 385 | ]; 386 | // if connected, append auth token 387 | if (!empty($this->auth_token)) { 388 | $default_params['headers']['X-Auth-Token'] = $this->auth_token; 389 | } 390 | // append proxy params if exists 391 | if (!empty($CFG_GLPI['proxy_name'])) { 392 | $proxy = $CFG_GLPI['proxy_user']. 393 | ":".$CFG_GLPI['proxy_passwd']. 394 | "@".preg_replace('#https?://#', '', $CFG_GLPI['proxy_name']). 395 | ":".$CFG_GLPI['proxy_port']; 396 | 397 | $default_params['proxy'] = [ 398 | 'http' => "tcp://$proxy", 399 | 'https' => "tcp://$proxy", 400 | ]; 401 | } 402 | // merge default params 403 | $params = array_replace_recursive($default_params, $params); 404 | //remove empty values 405 | $params = plugin_xivo_recursive_remove_empty($params); 406 | 407 | // init guzzle 408 | $http_client = new GuzzleHttp\Client(['base_uri' => $this->getAPIBaseUri()]); 409 | 410 | // send http request 411 | try { 412 | $response = $http_client->request($method, 413 | $resource, 414 | $params); 415 | } catch (GuzzleException $e) { 416 | $this->last_error = [ 417 | 'title' => "XIVO API error", 418 | 'exception' => $e->getMessage(), 419 | 'params' => $params, 420 | 'request' => Psr7\str($e->getRequest()), 421 | ]; 422 | if ($e->hasResponse()) { 423 | $this->last_error['response'] = Psr7\str($e->getResponse()); 424 | } 425 | if ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) { 426 | Toolbox::logDebug($this->last_error); 427 | } 428 | return false; 429 | } 430 | 431 | // parse http response 432 | $http_code = $response->getStatusCode(); 433 | $reason_phrase = $response->getReasonPhrase(); 434 | $headers = $response->getHeaders(); 435 | 436 | // check http errors 437 | if (intval($http_code) > 400) { 438 | // we have an error if http code is greater than 400 439 | return false; 440 | } 441 | // cast body as string, guzzle return strems 442 | $json = (string) $response->getBody(); 443 | $prelude_res = json_decode($json, true); 444 | 445 | $data = json_decode($json, true); 446 | 447 | //append metadata 448 | if ($params['_with_metadata']) { 449 | $data['_headers'] = $headers; 450 | $data['_http_code'] = $http_code; 451 | } 452 | 453 | return $data; 454 | } 455 | 456 | /** 457 | * Return the error encountered with an http query 458 | * 459 | * @return array the error 460 | */ 461 | function getLastError() { 462 | return $this->last_error; 463 | } 464 | 465 | } 466 | 467 | --------------------------------------------------------------------------------