Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/sv_SE/LC_MESSAGES/infoservices.po =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/sv_SE/LC_MESSAGES/infoservices.po (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/sv_SE/LC_MESSAGES/infoservices.po (revision 12696) @@ -0,0 +1,64 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# FreePBX language for infoservice +# Copyright (C) 2009, 2010, 2011 Mikael Carlsson +# +msgid "" +msgstr "" +"Project-Id-Version: FreePBX infoservice\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: 2011-03-20 00:00+0100\n" +"Last-Translator: Mikael Carlsson \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Swedish\n" +"X-Poedit-Country: SWEDEN\n" + +msgid "Info Services" +msgstr "InformationstjÀnster" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" +"Ger tillgÃ¥ng till ett flertal applikationer som kan nÃ¥s med funktionskod: " +"telefonkatalog, samtalsspÃ¥rning (sista samtalet), talande klocka och " +"upplÀsning av anknytningsnummer" + +msgid "Directory" +msgstr "Katalog" + +msgid "Call Trace" +msgstr "SamtalsspÃ¥rning" + +msgid "Echo Test" +msgstr "Eko-test" + +msgid "Speaking Clock" +msgstr "Talande klocka" + +msgid "Speak Your Exten Number" +msgstr "LÀs upp din anknytning" + +#~ msgid "Internal Options & Configuration" +#~ msgstr "Interna val och konfigurationer" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/bg_BG/LC_MESSAGES/infoservices.po =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/bg_BG/LC_MESSAGES/infoservices.po (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/bg_BG/LC_MESSAGES/infoservices.po (revision 12696) @@ -0,0 +1,47 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: FreePBX v2.5\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: 2008-11-03 02:03+0200\n" +"Last-Translator: \n" +"Language-Team: Chavdar Iliev \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Bulgarian\n" +"X-Poedit-Country: BULGARIA\n" +"X-Poedit-SourceCharset: utf-8\n" + +msgid "Info Services" +msgstr "ИМфПрЌацОПММО УслугО" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" + +msgid "Directory" +msgstr "ДОректПрОя" + +msgid "Call Trace" +msgstr "ПрПслеЎяваМе Ма РазгПвПр" + +msgid "Echo Test" +msgstr "Ð•Ñ +П Тест" + +msgid "Speaking Clock" +msgstr "Казва Часа" + +msgid "Speak Your Exten Number" +msgstr "ПрПЎОктува ВашОя ВътрешеМ НЌер" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/he_IL/LC_MESSAGES/infoservices.po =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/he_IL/LC_MESSAGES/infoservices.po (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/he_IL/LC_MESSAGES/infoservices.po (revision 12696) @@ -0,0 +1,56 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# FreePBX language template for infoservices +# Copyright (C) 2008, 2009, 2010 Bandwith.com +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Info Services" +msgstr "" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" + +msgid "Directory" +msgstr "" + +msgid "Call Trace" +msgstr "" + +msgid "Echo Test" +msgstr "" + +msgid "Speaking Clock" +msgstr "" + +msgid "Speak Your Exten Number" +msgstr "" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/infoservices.pot =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/infoservices.pot (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/infoservices.pot (revision 12696) @@ -0,0 +1,56 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# FreePBX language template for infoservices +# Copyright (C) 2008, 2009, 2010 Bandwith.com +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Info Services" +msgstr "" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" + +msgid "Directory" +msgstr "" + +msgid "Call Trace" +msgstr "" + +msgid "Echo Test" +msgstr "" + +msgid "Speaking Clock" +msgstr "" + +msgid "Speak Your Exten Number" +msgstr "" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/zh_CN/LC_MESSAGES/infoservices.po =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/zh_CN/LC_MESSAGES/infoservices.po (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/zh_CN/LC_MESSAGES/infoservices.po (revision 12696) @@ -0,0 +1,46 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: FreePBX 2.5 Chinese Translation\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: 2009-01-31 11:58+0800\n" +"Last-Translator: 呚埁晟 \n" +"Language-Team: EdwardBadBoy \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Chinese\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" + +msgid "Info Services" +msgstr "信息服务" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" + +msgid "Directory" +msgstr "目圕" + +msgid "Call Trace" +msgstr "呌叫远螪" + +msgid "Echo Test" +msgstr "回送测试" + +msgid "Speaking Clock" +msgstr "语音时钟" + +msgid "Speak Your Exten Number" +msgstr "播攟䜠的分机号" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/pt_BR/LC_MESSAGES/infoservices.po =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/pt_BR/LC_MESSAGES/infoservices.po (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/pt_BR/LC_MESSAGES/infoservices.po (revision 12696) @@ -0,0 +1,58 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright 2009, Marcelo Araujo +# +msgid "" +msgstr "" +"Project-Id-Version: freePBX 2.5.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: 2009-05-11 20:08-0300\n" +"Last-Translator: Marcelo Araujo \n" +"Language-Team: MidiVTS Team \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Portuguese\n" +"X-Poedit-Country: BRAZIL\n" +"X-Poedit-SourceCharset: utf-8\n" + +msgid "Info Services" +msgstr "Serviços de informação" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" + +msgid "Directory" +msgstr "Diretório" + +msgid "Call Trace" +msgstr "Rastreamento de Chamadas" + +msgid "Echo Test" +msgstr "Teste de Eco" + +msgid "Speaking Clock" +msgstr "Falar o horário" + +msgid "Speak Your Exten Number" +msgstr "Faler número de seu ramal" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/it_IT/LC_MESSAGES/infoservices.po =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/it_IT/LC_MESSAGES/infoservices.po (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/it_IT/LC_MESSAGES/infoservices.po (revision 12696) @@ -0,0 +1,40 @@ +msgid "" +msgstr "" +"Project-Id-Version: 2.5\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: \n" +"Last-Translator: Francesco Romano \n" +"Language-Team: Italian\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Italian\n" +"X-Poedit-Country: ITALY\n" + +msgid "Info Services" +msgstr "Servizi Aggiuntivi" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" + +msgid "Directory" +msgstr "Elenco Telefonico (Directory)" + +msgid "Call Trace" +msgstr "Ultima Chiamata" + +msgid "Echo Test" +msgstr "Test Eco" + +msgid "Speaking Clock" +msgstr "Data e Ora" + +msgid "Speak Your Exten Number" +msgstr "Riproduce il Numero d'Interno" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/es_ES/LC_MESSAGES/infoservices.po =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/es_ES/LC_MESSAGES/infoservices.po (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/es_ES/LC_MESSAGES/infoservices.po (revision 12696) @@ -0,0 +1,41 @@ +msgid "" +msgstr "" +"Project-Id-Version: FreePBX - infoservices module spanish translation\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: 2009-01-21 00:48+0100\n" +"Last-Translator: Juan Asensio Sánchez \n" +"Language-Team: Juan Asensio Sánchez \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Spanish\n" +"X-Poedit-Country: SPAIN\n" +"X-Poedit-SourceCharset: utf-8\n" + +msgid "Info Services" +msgstr "Servicios de información" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" + +msgid "Directory" +msgstr "Directorio" + +msgid "Call Trace" +msgstr "Traza de la llamada" + +msgid "Echo Test" +msgstr "Prueba de eco" + +msgid "Speaking Clock" +msgstr "Decir fecha y hora" + +msgid "Speak Your Exten Number" +msgstr "Decir número de extensión" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/fr_FR/LC_MESSAGES/infoservices.po =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/fr_FR/LC_MESSAGES/infoservices.po (revision 12696) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/i18n/fr_FR/LC_MESSAGES/infoservices.po (revision 12696) @@ -0,0 +1,56 @@ +# This file is part of FreePBX. +# +# FreePBX is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# FreePBX is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with FreePBX. If not, see . +# +# Copyright (C) 2009 Séverine GUTIERREZ, severine@medialsace.fr +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-23 09:52+0000\n" +"PO-Revision-Date: 2009-04-20 17:23+0100\n" +"Last-Translator: Séverine GUTIERREZ \n" +"Language-Team: Français \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +msgid "Info Services" +msgstr "Services d'Informations" + +msgid "Applications" +msgstr "" + +msgid "" +"Provides a number of applications accessible by feature codes: company " +"directory, call trace (last call information), echo test, speaking clock, " +"and speak current extension number." +msgstr "" + +msgid "Directory" +msgstr "Répertoire" + +msgid "Call Trace" +msgstr "Trace d'Appel" + +msgid "Echo Test" +msgstr "Test d'Echo" + +msgid "Speaking Clock" +msgstr "Horloge Parlante" + +msgid "Speak Your Exten Number" +msgstr "Dit votre Numéro d'Extension" Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/module.xml =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/module.xml (revision 13517) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/module.xml (revision 13517) @@ -0,0 +1,20 @@ + + infoservices + standard + Info Services + 2.10.0.2 + FreePBX + GPLv2+ + no + no + Applications + Provides a number of applications accessible by feature codes: company directory, call trace (last call information), echo test, speaking clock, and speak current extension number. + + *2.10.0.2* #5115 + *2.10.0.1* #5478 + *2.10.0.0* new version changes + *2.9.0.0* #4653 + + release/2.10/infoservices-2.10.0.2.tgz + 27d197642d183ded3c4ed4e1afcfba59 + Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/functions.inc.php =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/functions.inc.php (revision 13487) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/functions.inc.php (revision 13487) @@ -0,0 +1,186 @@ +getCodeActive(); + unset($fcc); + + if ($fc != '') + $fname($fc); + } else { + $ext->add('from-internal-additional', 'debug', '', new ext_noop($modulename.": No func $fname")); + var_dump($item); + } + } + } + break; + } +} + +function infoservices_directory($c) { + global $ext; + global $db; + + $oxtn = $db->getOne("SELECT value from globals where variable='OPERATOR_XTN'"); //this needs to be here! + + $id = "app-directory"; // The context to be included. This must be unique. + + // Start creating the dialplan + $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal + // Build the context + $ext->add($id, $c, '', new ext_answer('')); + $ext->add($id, $c, '', new ext_wait('1')); // $cmd,1,Wait(1) + $ext->add($id, $c, '', new ext_agi('directory,${DIR-CONTEXT},from-did-direct,${DIRECTORY:0:1}${DIRECTORY_OPTS}'.($oxtn != '' ? 'o' : '') )); + $ext->add($id, $c, '', new ext_playback('vm-goodbye')); // $cmd,n,Playback(vm-goodbye) + $ext->add($id, $c, '', new ext_hangup('')); // hangup + if ($oxtn != '') { + $ext->add($id, 'o', '', new ext_goto('from-internal,${OPERATOR_XTN},1')); + } else { + $ext->add($id, 'o', '', new ext_playback('privacy-incorrect')); + } +} + +function infoservices_calltrace($c) { + global $ext; + + $id = "app-calltrace"; // The context to be included + + $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal + + $ext->add($id, $c, '', new ext_goto('1', 's', 'app-calltrace-perform')); + + // Create the calltrace application, which we are doing a 'Goto' to above. + // I just reset these for ease of copying and pasting. + $id = 'app-calltrace-perform'; + $c = 's'; + $ext->add($id, $c, '', new ext_answer('')); + $ext->add($id, $c, '', new ext_wait('1')); + $ext->add($id, $c, '', new ext_macro('user-callerid')); + $ext->add($id, $c, '', new ext_playback('info-about-last-call&telephone-number')); + $ext->add($id, $c, '', new ext_setvar('lastcaller', '${DB(CALLTRACE/${AMPUSER})}')); + $ext->add($id, $c, '', new ext_gotoif('$[ $[ "${lastcaller}" = "" ] | $[ "${lastcaller}" = "unknown" ] ]', 'noinfo')); + $ext->add($id, $c, '', new ext_saydigits('${lastcaller}')); + $ext->add($id, $c, '', new ext_setvar('TIMEOUT(digit)', '3')); + $ext->add($id, $c, '', new ext_setvar('TIMEOUT(response)', '7')); + $ext->add($id, $c, '', new ext_background('to-call-this-number&press-1')); + $ext->add($id, $c, '', new ext_goto('fin')); + $ext->add($id, $c, 'noinfo', new ext_playback('from-unknown-caller')); + $ext->add($id, $c, '', new ext_macro('hangupcall')); + $ext->add($id, $c, 'fin', new ext_noop('Waiting for input')); + $ext->add($id, $c, '', new ext_waitexten(60)); + $ext->add($id, $c, '', new ext_Playback('sorry-youre-having-problems&goodbye')); + $ext->add($id, '1', '', new ext_goto('1', '${lastcaller}', 'from-internal')); + $ext->add($id, 'i', '', new ext_playback('vm-goodbye')); + $ext->add($id, 'i', '', new ext_macro('hangupcall')); + $ext->add($id, 't', '', new ext_playback('vm-goodbye')); + $ext->add($id, 't', '', new ext_macro('hangupcall')); + +} + +function infoservices_echotest($c) { + global $ext; + + $id = "app-echo-test"; // The context to be included + + $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal + + $ext->add($id, $c, '', new ext_answer('')); // $cmd,1,Answer + $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1) + $ext->add($id, $c, '', new ext_playback('demo-echotest')); // $cmd,n,Macro(user-callerid) + $ext->add($id, $c, '', new ext_echo('')); + $ext->add($id, $c, '', new ext_playback('demo-echodone')); // $cmd,n,Playback(...) + $ext->add($id, $c, '', new ext_hangup('')); // $cmd,n,Macro(user-callerid) +} + +function infoservices_speakingclock($c) { + global $ext; + + $id = "app-speakingclock"; // The context to be included + + $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal + + $ext->add($id, $c, '', new ext_answer('')); // $cmd,1,Answer + $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1) + $ext->add($id, $c, '', new ext_setvar('NumLoops','0')); + + $ext->add($id, $c, 'start', new ext_setvar('FutureTime','$[${EPOCH} + 11]')); // 10 seconds to try this out + $ext->add($id, $c, '', new ext_gosubif('$["${TIMEFORMAT}"="kM"]','sub-hr24format,s,1','sub-hr12format,s,1')); + + $ext->add($id, $c, 'waitloop', new ext_set('TimeLeft', '$[${FutureTime} - ${EPOCH}]')); + $ext->add($id, $c, '', new ext_gotoif('$[${TimeLeft} < 1]','playbeep')); + $ext->add($id, $c, '', new ext_wait(1)); + $ext->add($id, $c, '', new ext_goto('waitloop')); + $ext->add($id, $c, 'playbeep', new ext_playback('beep')); + $ext->add($id, $c, '', new ext_wait(5)); + $ext->add($id, $c, '', new ext_setvar('NumLoops','$[${NumLoops} + 1]')); + $ext->add($id, $c, '', new ext_gotoif('$[${NumLoops} < 5]','start')); // 5 is maximum number of times to repeat + $ext->add($id, $c, '', new ext_playback('goodbye')); + $ext->add($id, $c, '', new ext_hangup('')); + + + // 24 hr format default if no language provided + // + $id = "sub-hr24format"; + $ex = 'i'; + $ext->add($id, 's', '', new ext_goto('1', '${CHANNEL(language)}')); + $ext->add($id, $ex, '', new ext_playback('at-tone-time-exactly')); + $ext->add($id, $ex, '', new ext_sayunixtime('${FutureTime},,kM \\\'and\\\' S \\\'seconds\\\'')); + $ext->add($id, $ex, '', new ext_return('')); + + // German specific language format + $ex = 'de'; + $ext->add($id, $ex, '', new ext_playback('at-tone-time-exactly')); + $ext->add($id, $ex, '', new ext_sayunixtime('${FutureTime},,kMS')); + $ext->add($id, $ex, '', new ext_return('')); + + + // 12 hr format default if no language provided + // + $id = "sub-hr12format"; + $ex = 'i'; + $ext->add($id, 's', '', new ext_goto('1', '${CHANNEL(language)}')); + $ext->add($id, $ex, '', new ext_playback('at-tone-time-exactly')); + $ext->add($id, $ex, '', new ext_sayunixtime('${FutureTime},,IM \\\'and\\\' S \\\'seconds\\\' p')); + $ext->add($id, $ex, '', new ext_return('')); + + // German specific language format + $ex = 'de'; + $ext->add($id, $ex, '', new ext_playback('at-tone-time-exactly')); + $ext->add($id, $ex, '', new ext_sayunixtime('${FutureTime},,IMSp')); + $ext->add($id, $ex, '', new ext_return('')); + + // To add another language follow the pattern done for German. You should also be able to use + // extensions_custom.conf for this +} + +function infoservices_speakextennum($c) { + global $ext; + + $id = "app-speakextennum"; + + $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal + + $ext->add($id, $c, '', new ext_answer('')); // $cmd,1,Answer + $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1) + $ext->add($id, $c, '', new ext_macro('user-callerid')); // $cmd,n,Macro(user-callerid) + $ext->add($id, $c, '', new ext_playback('your')); + $ext->add($id, $c, '', new ext_playback('extension')); + $ext->add($id, $c, '', new ext_playback('number')); + $ext->add($id, $c, '', new ext_playback('is')); + $ext->add($id, $c, '', new ext_saydigits('${AMPUSER}')); + $ext->add($id, $c, '', new ext_wait('2')); // $cmd,n,Wait(1) + $ext->add($id, $c, '', new ext_hangup('')); +} +?> Index: /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/install.php =================================================================== --- /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/install.php (revision 13091) +++ /freepbx/tags/2.10.0/amp_conf/htdocs/admin/modules/infoservices/install.php (revision 13091) @@ -0,0 +1,46 @@ +setDescription('Directory'); +$fcc->setDefault('#'); +$fcc->setProvideDest(); +$fcc->update(); +unset($fcc); + +$fcc = new featurecode('infoservices', 'calltrace'); +$fcc->setDescription('Call Trace'); +$fcc->setDefault('*69'); +$fcc->update(); +unset($fcc); + +$fcc = new featurecode('infoservices', 'echotest'); +$fcc->setDescription('Echo Test'); +$fcc->setDefault('*43'); +$fcc->setProvideDest(); +$fcc->update(); +unset($fcc); + +$fcc = new featurecode('infoservices', 'speakingclock'); +$fcc->setDescription('Speaking Clock'); +$fcc->setDefault('*60'); +$fcc->setProvideDest(); +$fcc->update(); +unset($fcc); + +$fcc = new featurecode('infoservices', 'speakextennum'); +$fcc->setDescription('Speak Your Exten Number'); +$fcc->setDefault('*65'); +$fcc->update(); +unset($fcc); + +?>