[Pkg-voip-commits] r3184 - in freepbx: . modules-2.2
modules-2.2/modules modules-2.2/modules/freepbx-module-announcement
modules-2.2/modules/freepbx-module-announcement/debian
modules-2.2/modules/freepbx-module-asterisk-cli
modules-2.2/modules/freepbx-module-asterisk-cli/debian
modules-2.2/modules/freepbx-module-backup
modules-2.2/modules/freepbx-module-backup/bin
modules-2.2/modules/freepbx-module-backup/debian
modules-2.2/modules/freepbx-module-backup/i18n
modules-2.2/modules/freepbx-module-backup/i18n/he_IL
modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-blacklist
modules-2.2/modules/freepbx-module-blacklist/debian
modules-2.2/modules/freepbx-module-blacklist/i18n
modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL
modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-callback
modules-2.2/modules/freepbx-module-callback/debian
modules-2.2/modules/freepbx-module-callback/debian/patches
modules-2.2/modules/freepbx-module-callback/i18n
modules-2.2/modules/freepbx-module-callback/i18n/he_IL
modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-callforward
modules-2.2/modules/freepbx-module-callforward/debian
modules-2.2/modules/freepbx-module-callwaiting
modules-2.2/modules/freepbx-module-callwaiting/debian
modules-2.2/modules/freepbx-module-cidlookup
modules-2.2/modules/freepbx-module-cidlookup/debian
modules-2.2/modules/freepbx-module-cidlookup/debian/patches
modules-2.2/modules/freepbx-module-cidlookup/i18n
modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL
modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-conferences
modules-2.2/modules/freepbx-module-conferences/debian
modules-2.2/modules/freepbx-module-conferences/i18n
modules-2.2/modules/freepbx-module-conferences/i18n/he_IL
modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-customerdb
modules-2.2/modules/freepbx-module-customerdb/debian
modules-2.2/modules/freepbx-module-customerdb/debian/patches
modules-2.2/modules/freepbx-module-customerdb/i18n
modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL
modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-dictate
modules-2.2/modules/freepbx-module-dictate/bin
modules-2.2/modules/freepbx-module-dictate/debian
modules-2.2/modules/freepbx-module-dictate/sounds
modules-2.2/modules/freepbx-module-disa
modules-2.2/modules/freepbx-module-disa/debian
modules-2.2/modules/freepbx-module-disa/debian/patches
modules-2.2/modules/freepbx-module-disa/i18n
modules-2.2/modules/freepbx-module-disa/i18n/he_IL
modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-donotdisturb
modules-2.2/modules/freepbx-module-donotdisturb/debian
modules-2.2/modules/freepbx-module-featurecodeadmin
modules-2.2/modules/freepbx-module-featurecodeadmin/debian
modules-2.2/modules/freepbx-module-featurecodeadmin/i18n
modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL
modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-findmefollow
modules-2.2/modules/freepbx-module-findmefollow/debian
modules-2.2/modules/freepbx-module-findmefollow/debian/patches
modules-2.2/modules/freepbx-module-findmefollow/i18n
modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL
modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-findmefollow/sounds
modules-2.2/modules/freepbx-module-gabcast
modules-2.2/modules/freepbx-module-gabcast/debian
modules-2.2/modules/freepbx-module-gabcast/i18n
modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL
modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-infoservices
modules-2.2/modules/freepbx-module-infoservices/debian
modules-2.2/modules/freepbx-module-inventorydb
modules-2.2/modules/freepbx-module-inventorydb/debian
modules-2.2/modules/freepbx-module-inventorydb/debian/patches
modules-2.2/modules/freepbx-module-inventorydb/i18n
modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL
modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-ivr
modules-2.2/modules/freepbx-module-ivr/debian
modules-2.2/modules/freepbx-module-ivr/debian/patches
modules-2.2/modules/freepbx-module-ivr/i18n
modules-2.2/modules/freepbx-module-ivr/i18n/he_IL
modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-logfiles
modules-2.2/modules/freepbx-module-logfiles/debian
modules-2.2/modules/freepbx-module-manager
modules-2.2/modules/freepbx-module-manager/debian
modules-2.2/modules/freepbx-module-manager/debian/patches
modules-2.2/modules/freepbx-module-manager/i18n
modules-2.2/modules/freepbx-module-manager/i18n/fr_FR
modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES
modules-2.2/modules/freepbx-module-manager/i18n/he_IL
modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-miscapps
modules-2.2/modules/freepbx-module-miscapps/debian
modules-2.2/modules/freepbx-module-miscapps/debian/patches
modules-2.2/modules/freepbx-module-miscdests
modules-2.2/modules/freepbx-module-miscdests/debian
modules-2.2/modules/freepbx-module-miscdests/debian/patches
modules-2.2/modules/freepbx-module-miscdests/i18n
modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL
modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-music
modules-2.2/modules/freepbx-module-music/debian
modules-2.2/modules/freepbx-module-music/i18n
modules-2.2/modules/freepbx-module-music/i18n/he_IL
modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-paging
modules-2.2/modules/freepbx-module-paging/debian
modules-2.2/modules/freepbx-module-paging/i18n
modules-2.2/modules/freepbx-module-paging/i18n/he_IL
modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-paging/sounds
modules-2.2/modules/freepbx-module-parking
modules-2.2/modules/freepbx-module-parking/debian
modules-2.2/modules/freepbx-module-parking/i18n
modules-2.2/modules/freepbx-module-parking/i18n/he_IL
modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-pbdirectory
modules-2.2/modules/freepbx-module-pbdirectory/agi-bin
modules-2.2/modules/freepbx-module-pbdirectory/debian
modules-2.2/modules/freepbx-module-pbdirectory/sounds
modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory
modules-2.2/modules/freepbx-module-phonebook
modules-2.2/modules/freepbx-module-phonebook/debian
modules-2.2/modules/freepbx-module-phonebook/i18n
modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL
modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT
modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES
modules-2.2/modules/freepbx-module-phpagiconf
modules-2.2/modules/freepbx-module-phpagiconf/debian
modules-2.2/modules/freepbx-module-phpagiconf/debian/patches
modules-2.2/modules/freepbx-module-phpagiconf/i18n
modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR
modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES
modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL
modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-phpinfo
modules-2.2/modules/freepbx-module-phpinfo/debian
modules-2.2/modules/freepbx-module-pinsets
modules-2.2/modules/freepbx-module-pinsets/debian
modules-2.2/modules/freepbx-module-pinsets/debian/patches
modules-2.2/modules/freepbx-module-pinsets/i18n
modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL
modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-printextensions
modules-2.2/modules/freepbx-module-printextensions/debian
modules-2.2/modules/freepbx-module-printextensions/i18n
modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL
modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-queues
modules-2.2/modules/freepbx-module-queues/debian
modules-2.2/modules/freepbx-module-queues/i18n
modules-2.2/modules/freepbx-module-queues/i18n/he_IL
modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-recordings
modules-2.2/modules/freepbx-module-recordings/debian
modules-2.2/modules/freepbx-module-recordings/debian/patches
modules-2.2/modules/freepbx-module-recordings/i18n
modules-2.2/modules/freepbx-module-recordings/i18n/he_IL
modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-ringgroups
modules-2.2/modules/freepbx-module-ringgroups/debian
modules-2.2/modules/freepbx-module-ringgroups/debian/patches
modules-2.2/modules/freepbx-module-ringgroups/i18n
modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL
modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-ringgroups/sounds
modules-2.2/modules/freepbx-module-speeddial
modules-2.2/modules/freepbx-module-speeddial/debian
modules-2.2/modules/freepbx-module-speeddial/sounds
modules-2.2/modules/freepbx-module-timeconditions
modules-2.2/modules/freepbx-module-timeconditions/debian
modules-2.2/modules/freepbx-module-timeconditions/debian/patches
modules-2.2/modules/freepbx-module-timeconditions/i18n
modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL
modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES
modules-2.2/modules/freepbx-module-voicemail
modules-2.2/modules/freepbx-module-voicemail/debian
modules-2.2/modules/freepbx-module-zapauto
modules-2.2/modules/freepbx-module-zapauto/debian
modules-2.2/modules/freepbx-module-zapauto/share
Diego Iastrubni
elcuco-guest at alioth.debian.org
Thu Mar 1 10:52:09 CET 2007
Author: elcuco-guest
Date: 2007-03-01 11:51:04 +0100 (Thu, 01 Mar 2007)
New Revision: 3184
Added:
freepbx/build-area
freepbx/modules-2.2/
freepbx/modules-2.2/modules-2.2.xml
freepbx/modules-2.2/modules/
freepbx/modules-2.2/modules/freepbx-module-announcement/
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/compat
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/control
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/install
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-announcement/debian/rules
freepbx/modules-2.2/modules/freepbx-module-announcement/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-announcement/install.php
freepbx/modules-2.2/modules/freepbx-module-announcement/install.sql
freepbx/modules-2.2/modules/freepbx-module-announcement/module.xml
freepbx/modules-2.2/modules/freepbx-module-announcement/page.announcement.php
freepbx/modules-2.2/modules/freepbx-module-announcement/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/compat
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/control
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/install
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/rules
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/module.xml
freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/page.cli.php
freepbx/modules-2.2/modules/freepbx-module-backup/
freepbx/modules-2.2/modules/freepbx-module-backup/bin/
freepbx/modules-2.2/modules/freepbx-module-backup/bin/ampbackup.pl
freepbx/modules-2.2/modules/freepbx-module-backup/bin/dumpastdb.php
freepbx/modules-2.2/modules/freepbx-module-backup/bin/restoreastdb.php
freepbx/modules-2.2/modules/freepbx-module-backup/bin/retrieve_backup_cron_from_mysql.pl
freepbx/modules-2.2/modules/freepbx-module-backup/debian/
freepbx/modules-2.2/modules/freepbx-module-backup/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-backup/debian/compat
freepbx/modules-2.2/modules/freepbx-module-backup/debian/control
freepbx/modules-2.2/modules/freepbx-module-backup/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-backup/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-backup/debian/install
freepbx/modules-2.2/modules/freepbx-module-backup/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-backup/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-backup/debian/rules
freepbx/modules-2.2/modules/freepbx-module-backup/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-backup/i18n/
freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES/backup.mo
freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES/backup.po
freepbx/modules-2.2/modules/freepbx-module-backup/module.xml
freepbx/modules-2.2/modules/freepbx-module-backup/page.backup.php
freepbx/modules-2.2/modules/freepbx-module-backup/schedule_functions.php
freepbx/modules-2.2/modules/freepbx-module-blacklist/
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/compat
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/control
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/install
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/rules
freepbx/modules-2.2/modules/freepbx-module-blacklist/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/
freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES/blacklist.mo
freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES/blacklist.po
freepbx/modules-2.2/modules/freepbx-module-blacklist/install.php
freepbx/modules-2.2/modules/freepbx-module-blacklist/module.xml
freepbx/modules-2.2/modules/freepbx-module-blacklist/page.blacklist.php
freepbx/modules-2.2/modules/freepbx-module-blacklist/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-callback/
freepbx/modules-2.2/modules/freepbx-module-callback/debian/
freepbx/modules-2.2/modules/freepbx-module-callback/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-callback/debian/compat
freepbx/modules-2.2/modules/freepbx-module-callback/debian/control
freepbx/modules-2.2/modules/freepbx-module-callback/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-callback/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-callback/debian/install
freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-callback/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-callback/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-callback/debian/rules
freepbx/modules-2.2/modules/freepbx-module-callback/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-callback/i18n/
freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES/callback.mo
freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES/callback.po
freepbx/modules-2.2/modules/freepbx-module-callback/install.php
freepbx/modules-2.2/modules/freepbx-module-callback/install.sql
freepbx/modules-2.2/modules/freepbx-module-callback/module.xml
freepbx/modules-2.2/modules/freepbx-module-callback/page.callback.php
freepbx/modules-2.2/modules/freepbx-module-callback/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-callforward/
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/compat
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/control
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/install
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-callforward/debian/rules
freepbx/modules-2.2/modules/freepbx-module-callforward/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-callforward/install.php
freepbx/modules-2.2/modules/freepbx-module-callforward/module.xml
freepbx/modules-2.2/modules/freepbx-module-callforward/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-callwaiting/
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/compat
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/control
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/install
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/rules
freepbx/modules-2.2/modules/freepbx-module-callwaiting/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-callwaiting/install.php
freepbx/modules-2.2/modules/freepbx-module-callwaiting/module.xml
freepbx/modules-2.2/modules/freepbx-module-callwaiting/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-cidlookup/
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/compat
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/control
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/install
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/rules
freepbx/modules-2.2/modules/freepbx-module-cidlookup/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/
freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES/cidlookup.mo
freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES/cidlookup.po
freepbx/modules-2.2/modules/freepbx-module-cidlookup/install.php
freepbx/modules-2.2/modules/freepbx-module-cidlookup/install.sql
freepbx/modules-2.2/modules/freepbx-module-cidlookup/module.xml
freepbx/modules-2.2/modules/freepbx-module-cidlookup/page.cidlookup.php
freepbx/modules-2.2/modules/freepbx-module-cidlookup/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-cidlookup/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-conferences/
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/compat
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/control
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/install
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-conferences/debian/rules
freepbx/modules-2.2/modules/freepbx-module-conferences/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/
freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES/conferences.mo
freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES/conferences.po
freepbx/modules-2.2/modules/freepbx-module-conferences/install.sql
freepbx/modules-2.2/modules/freepbx-module-conferences/module.xml
freepbx/modules-2.2/modules/freepbx-module-conferences/page.conferences.php
freepbx/modules-2.2/modules/freepbx-module-conferences/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-customerdb/
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/compat
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/control
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/install
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/rules
freepbx/modules-2.2/modules/freepbx-module-customerdb/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/
freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES/customerdb.mo
freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES/customerdb.po
freepbx/modules-2.2/modules/freepbx-module-customerdb/install.sql
freepbx/modules-2.2/modules/freepbx-module-customerdb/module.xml
freepbx/modules-2.2/modules/freepbx-module-customerdb/page.customerdb.php
freepbx/modules-2.2/modules/freepbx-module-customerdb/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-dictate/
freepbx/modules-2.2/modules/freepbx-module-dictate/bin/
freepbx/modules-2.2/modules/freepbx-module-dictate/bin/audio-email.pl
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/compat
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/control
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/install
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-dictate/debian/rules
freepbx/modules-2.2/modules/freepbx-module-dictate/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-dictate/install.php
freepbx/modules-2.2/modules/freepbx-module-dictate/module.xml
freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/
freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-being-processed.sln
freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-being-processed.wav
freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-sent.sln
freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-sent.wav
freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/enter-filename-short.sln
freepbx/modules-2.2/modules/freepbx-module-disa/
freepbx/modules-2.2/modules/freepbx-module-disa/debian/
freepbx/modules-2.2/modules/freepbx-module-disa/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-disa/debian/compat
freepbx/modules-2.2/modules/freepbx-module-disa/debian/control
freepbx/modules-2.2/modules/freepbx-module-disa/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-disa/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-disa/debian/install
freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-disa/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-disa/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-disa/debian/rules
freepbx/modules-2.2/modules/freepbx-module-disa/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-disa/i18n/
freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES/disa.mo
freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES/disa.po
freepbx/modules-2.2/modules/freepbx-module-disa/install.php
freepbx/modules-2.2/modules/freepbx-module-disa/install.sql
freepbx/modules-2.2/modules/freepbx-module-disa/module.xml
freepbx/modules-2.2/modules/freepbx-module-disa/page.disa.php
freepbx/modules-2.2/modules/freepbx-module-disa/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/compat
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/control
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/install
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/rules
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/install.php
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/module.xml
freepbx/modules-2.2/modules/freepbx-module-donotdisturb/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/compat
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/control
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/install
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/rules
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES/featurecodeadmin.mo
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES/featurecodeadmin.po
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/module.xml
freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/page.featurecodeadmin.php
freepbx/modules-2.2/modules/freepbx-module-findmefollow/
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/compat
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/control
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/install
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/rules
freepbx/modules-2.2/modules/freepbx-module-findmefollow/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/
freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES/findmefollow.mo
freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES/findmefollow.po
freepbx/modules-2.2/modules/freepbx-module-findmefollow/install.php
freepbx/modules-2.2/modules/freepbx-module-findmefollow/install.sql
freepbx/modules-2.2/modules/freepbx-module-findmefollow/module.xml
freepbx/modules-2.2/modules/freepbx-module-findmefollow/page.findmefollow.php
freepbx/modules-2.2/modules/freepbx-module-findmefollow/sounds/
freepbx/modules-2.2/modules/freepbx-module-findmefollow/sounds/incoming-call-1-accept-2-decline.sln
freepbx/modules-2.2/modules/freepbx-module-findmefollow/sounds/incoming-call-no-longer-avail.sln
freepbx/modules-2.2/modules/freepbx-module-findmefollow/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-findmefollow/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-gabcast/
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/compat
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/control
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/install
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/rules
freepbx/modules-2.2/modules/freepbx-module-gabcast/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/
freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES/gabcast.mo
freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES/gabcast.po
freepbx/modules-2.2/modules/freepbx-module-gabcast/install.php
freepbx/modules-2.2/modules/freepbx-module-gabcast/install.sql
freepbx/modules-2.2/modules/freepbx-module-gabcast/module.xml
freepbx/modules-2.2/modules/freepbx-module-gabcast/page.gabcast.php
freepbx/modules-2.2/modules/freepbx-module-gabcast/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-infoservices/
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/compat
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/control
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/install
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/rules
freepbx/modules-2.2/modules/freepbx-module-infoservices/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-infoservices/install.php
freepbx/modules-2.2/modules/freepbx-module-infoservices/module.xml
freepbx/modules-2.2/modules/freepbx-module-inventorydb/
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/compat
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/control
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/install
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/rules
freepbx/modules-2.2/modules/freepbx-module-inventorydb/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/
freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES/inventorydb.mo
freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES/inventorydb.po
freepbx/modules-2.2/modules/freepbx-module-inventorydb/install.sql
freepbx/modules-2.2/modules/freepbx-module-inventorydb/module.xml
freepbx/modules-2.2/modules/freepbx-module-inventorydb/page.inventorydb.php
freepbx/modules-2.2/modules/freepbx-module-inventorydb/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-ivr/
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/compat
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/control
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/install
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-ivr/debian/rules
freepbx/modules-2.2/modules/freepbx-module-ivr/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/
freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES/ivr.mo
freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES/ivr.po
freepbx/modules-2.2/modules/freepbx-module-ivr/install.php
freepbx/modules-2.2/modules/freepbx-module-ivr/install.sql
freepbx/modules-2.2/modules/freepbx-module-ivr/module.xml
freepbx/modules-2.2/modules/freepbx-module-ivr/page.ivr.php
freepbx/modules-2.2/modules/freepbx-module-ivr/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-logfiles/
freepbx/modules-2.2/modules/freepbx-module-logfiles/asterisk-full-log.php
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/compat
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/control
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/install
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/rules
freepbx/modules-2.2/modules/freepbx-module-logfiles/logfiles.php
freepbx/modules-2.2/modules/freepbx-module-logfiles/module.xml
freepbx/modules-2.2/modules/freepbx-module-logfiles/page.logfiles.php
freepbx/modules-2.2/modules/freepbx-module-manager/
freepbx/modules-2.2/modules/freepbx-module-manager/debian/
freepbx/modules-2.2/modules/freepbx-module-manager/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-manager/debian/compat
freepbx/modules-2.2/modules/freepbx-module-manager/debian/control
freepbx/modules-2.2/modules/freepbx-module-manager/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-manager/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-manager/debian/install
freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-manager/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-manager/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-manager/debian/rules
freepbx/modules-2.2/modules/freepbx-module-manager/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES/manager.mo
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES/manager.po
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES/manager.mo
freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES/manager.po
freepbx/modules-2.2/modules/freepbx-module-manager/install.sql
freepbx/modules-2.2/modules/freepbx-module-manager/module.xml
freepbx/modules-2.2/modules/freepbx-module-manager/page.manager.php
freepbx/modules-2.2/modules/freepbx-module-manager/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-miscapps/
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/compat
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/control
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/install
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/rules
freepbx/modules-2.2/modules/freepbx-module-miscapps/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-miscapps/install.sql
freepbx/modules-2.2/modules/freepbx-module-miscapps/module.xml
freepbx/modules-2.2/modules/freepbx-module-miscapps/page.miscapps.php
freepbx/modules-2.2/modules/freepbx-module-miscdests/
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/compat
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/control
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/install
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/rules
freepbx/modules-2.2/modules/freepbx-module-miscdests/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/
freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES/miscdests.mo
freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES/miscdests.po
freepbx/modules-2.2/modules/freepbx-module-miscdests/install.sql
freepbx/modules-2.2/modules/freepbx-module-miscdests/module.xml
freepbx/modules-2.2/modules/freepbx-module-miscdests/page.miscdests.php
freepbx/modules-2.2/modules/freepbx-module-miscdests/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-music/
freepbx/modules-2.2/modules/freepbx-module-music/debian/
freepbx/modules-2.2/modules/freepbx-module-music/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-music/debian/compat
freepbx/modules-2.2/modules/freepbx-module-music/debian/control
freepbx/modules-2.2/modules/freepbx-module-music/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-music/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-music/debian/install
freepbx/modules-2.2/modules/freepbx-module-music/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-music/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-music/debian/rules
freepbx/modules-2.2/modules/freepbx-module-music/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-music/i18n/
freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES/music.mo
freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES/music.po
freepbx/modules-2.2/modules/freepbx-module-music/install.php
freepbx/modules-2.2/modules/freepbx-module-music/module.xml
freepbx/modules-2.2/modules/freepbx-module-music/page.music.php
freepbx/modules-2.2/modules/freepbx-module-paging/
freepbx/modules-2.2/modules/freepbx-module-paging/debian/
freepbx/modules-2.2/modules/freepbx-module-paging/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-paging/debian/compat
freepbx/modules-2.2/modules/freepbx-module-paging/debian/control
freepbx/modules-2.2/modules/freepbx-module-paging/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-paging/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-paging/debian/install
freepbx/modules-2.2/modules/freepbx-module-paging/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-paging/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-paging/debian/rules
freepbx/modules-2.2/modules/freepbx-module-paging/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-paging/i18n/
freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES/paging.mo
freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES/paging.po
freepbx/modules-2.2/modules/freepbx-module-paging/install.php
freepbx/modules-2.2/modules/freepbx-module-paging/install.sql
freepbx/modules-2.2/modules/freepbx-module-paging/module.xml
freepbx/modules-2.2/modules/freepbx-module-paging/page.paging.php
freepbx/modules-2.2/modules/freepbx-module-paging/phones.sql
freepbx/modules-2.2/modules/freepbx-module-paging/sounds/
freepbx/modules-2.2/modules/freepbx-module-paging/sounds/intercom.sln
freepbx/modules-2.2/modules/freepbx-module-paging/sounds/intercom.wav
freepbx/modules-2.2/modules/freepbx-module-paging/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-parking/
freepbx/modules-2.2/modules/freepbx-module-parking/debian/
freepbx/modules-2.2/modules/freepbx-module-parking/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-parking/debian/compat
freepbx/modules-2.2/modules/freepbx-module-parking/debian/control
freepbx/modules-2.2/modules/freepbx-module-parking/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-parking/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-parking/debian/install
freepbx/modules-2.2/modules/freepbx-module-parking/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-parking/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-parking/debian/rules
freepbx/modules-2.2/modules/freepbx-module-parking/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-parking/i18n/
freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES/parking.mo
freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES/parking.po
freepbx/modules-2.2/modules/freepbx-module-parking/install.sql
freepbx/modules-2.2/modules/freepbx-module-parking/module.xml
freepbx/modules-2.2/modules/freepbx-module-parking/page.parking.php
freepbx/modules-2.2/modules/freepbx-module-parking/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/agi-bin/
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/agi-bin/pbdirectory
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/compat
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/control
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/install
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/rules
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/install.php
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/module.xml
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/first-three-letters-entry.sln
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/if-correct-press.sln
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/if-incorrect-press.sln
freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/welcome-to-phonebook.sln
freepbx/modules-2.2/modules/freepbx-module-phonebook/
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/compat
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/control
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/install
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/rules
freepbx/modules-2.2/modules/freepbx-module-phonebook/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES/phonebook.mo
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES/phonebook.po
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES/phonebook.mo
freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES/phonebook.po
freepbx/modules-2.2/modules/freepbx-module-phonebook/module.xml
freepbx/modules-2.2/modules/freepbx-module-phonebook/page.phonebook.php
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/compat
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/control
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/install
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/rules
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES/phpagiconf.mo
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES/phpagiconf.po
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES/phpagiconf.mo
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES/phpagiconf.po
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/install.sql
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/module.xml
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/page.phpagiconf.php
freepbx/modules-2.2/modules/freepbx-module-phpagiconf/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-phpinfo/
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/compat
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/control
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/install
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/rules
freepbx/modules-2.2/modules/freepbx-module-phpinfo/module.xml
freepbx/modules-2.2/modules/freepbx-module-phpinfo/page.phpinfo.php
freepbx/modules-2.2/modules/freepbx-module-phpinfo/phpinfo.inc.php
freepbx/modules-2.2/modules/freepbx-module-pinsets/
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/compat
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/control
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/install
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/rules
freepbx/modules-2.2/modules/freepbx-module-pinsets/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/
freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES/pinsets.mo
freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES/pinsets.po
freepbx/modules-2.2/modules/freepbx-module-pinsets/install.php
freepbx/modules-2.2/modules/freepbx-module-pinsets/install.sql
freepbx/modules-2.2/modules/freepbx-module-pinsets/module.xml
freepbx/modules-2.2/modules/freepbx-module-pinsets/page.pinsets.php
freepbx/modules-2.2/modules/freepbx-module-pinsets/uninstall.php
freepbx/modules-2.2/modules/freepbx-module-printextensions/
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/compat
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/control
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/install
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/rules
freepbx/modules-2.2/modules/freepbx-module-printextensions/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/
freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES/printextensions.mo
freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES/printextensions.po
freepbx/modules-2.2/modules/freepbx-module-printextensions/module.xml
freepbx/modules-2.2/modules/freepbx-module-printextensions/page.printextensions.php
freepbx/modules-2.2/modules/freepbx-module-queues/
freepbx/modules-2.2/modules/freepbx-module-queues/debian/
freepbx/modules-2.2/modules/freepbx-module-queues/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-queues/debian/compat
freepbx/modules-2.2/modules/freepbx-module-queues/debian/control
freepbx/modules-2.2/modules/freepbx-module-queues/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-queues/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-queues/debian/install
freepbx/modules-2.2/modules/freepbx-module-queues/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-queues/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-queues/debian/rules
freepbx/modules-2.2/modules/freepbx-module-queues/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-queues/i18n/
freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES/queues.mo
freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES/queues.po
freepbx/modules-2.2/modules/freepbx-module-queues/module.xml
freepbx/modules-2.2/modules/freepbx-module-queues/page.queues.php
freepbx/modules-2.2/modules/freepbx-module-recordings/
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/compat
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/control
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/install
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-recordings/debian/rules
freepbx/modules-2.2/modules/freepbx-module-recordings/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/
freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES/recordings.mo
freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES/recordings.po
freepbx/modules-2.2/modules/freepbx-module-recordings/install.php
freepbx/modules-2.2/modules/freepbx-module-recordings/module.xml
freepbx/modules-2.2/modules/freepbx-module-recordings/page.recordings.php
freepbx/modules-2.2/modules/freepbx-module-recordings/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-ringgroups/
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/compat
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/control
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/install
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/rules
freepbx/modules-2.2/modules/freepbx-module-ringgroups/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/
freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES/ringgroups.mo
freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES/ringgroups.po
freepbx/modules-2.2/modules/freepbx-module-ringgroups/install.php
freepbx/modules-2.2/modules/freepbx-module-ringgroups/install.sql
freepbx/modules-2.2/modules/freepbx-module-ringgroups/module.xml
freepbx/modules-2.2/modules/freepbx-module-ringgroups/page.ringgroups.php
freepbx/modules-2.2/modules/freepbx-module-ringgroups/sounds/
freepbx/modules-2.2/modules/freepbx-module-ringgroups/sounds/incoming-call-1-accept-2-decline.sln
freepbx/modules-2.2/modules/freepbx-module-ringgroups/sounds/incoming-call-no-longer-avail.sln
freepbx/modules-2.2/modules/freepbx-module-ringgroups/uninstall.sql
freepbx/modules-2.2/modules/freepbx-module-speeddial/
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/compat
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/control
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/install
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/rules
freepbx/modules-2.2/modules/freepbx-module-speeddial/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-speeddial/install.php
freepbx/modules-2.2/modules/freepbx-module-speeddial/module.xml
freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/
freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/speed-enterlocation.gsm
freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/speed-enternumber.gsm
freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/to-change.gsm
freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/to-enter-a-diff.gsm
freepbx/modules-2.2/modules/freepbx-module-timeconditions/
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/compat
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/control
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/install
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/00list
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/sqlite3-support.dpatch
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/rules
freepbx/modules-2.2/modules/freepbx-module-timeconditions/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/
freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/
freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES/
freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES/timeconditions.mo
freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES/timeconditions.po
freepbx/modules-2.2/modules/freepbx-module-timeconditions/install.sql
freepbx/modules-2.2/modules/freepbx-module-timeconditions/module.xml
freepbx/modules-2.2/modules/freepbx-module-timeconditions/page.timeconditions.php
freepbx/modules-2.2/modules/freepbx-module-timeconditions/unistall.sql
freepbx/modules-2.2/modules/freepbx-module-voicemail/
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/compat
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/control
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/install
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/rules
freepbx/modules-2.2/modules/freepbx-module-voicemail/functions.inc.php
freepbx/modules-2.2/modules/freepbx-module-voicemail/install.php
freepbx/modules-2.2/modules/freepbx-module-voicemail/module.xml
freepbx/modules-2.2/modules/freepbx-module-zapauto/
freepbx/modules-2.2/modules/freepbx-module-zapauto/LICENSE
freepbx/modules-2.2/modules/freepbx-module-zapauto/Makefile
freepbx/modules-2.2/modules/freepbx-module-zapauto/README
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/changelog
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/compat
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/control
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/copyright
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/dirs
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/install
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/postinst
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/prerm
freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/rules
freepbx/modules-2.2/modules/freepbx-module-zapauto/freepbx-module-zapauto.spec
freepbx/modules-2.2/modules/freepbx-module-zapauto/module.xml
freepbx/modules-2.2/modules/freepbx-module-zapauto/page.zapauto.php
freepbx/modules-2.2/modules/freepbx-module-zapauto/share/
freepbx/modules-2.2/modules/freepbx-module-zapauto/share/detect_zap
freepbx/modules-2.2/modules/freepbx-module-zapauto/share/fix_ast_db
freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap.template
freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap2amp
freepbx/modules-2.2/modules/freepbx-module-zapauto/zap_auto_ask.php
freepbx/modules-2.2/modules/freepbx-module-zapauto/zap_auto_detect.php
freepbx/tarballs
Log:
lets import the modules as discussed a few weeks ago:
some modules have been patched, to work with debian, and some others to work with sqlite3.
Missing modules:
- irc : depends on non free software
- javassh : license unkown. IMHO not even "free". and I have a very loose definition of free, unlike DFSG.
- zoip: see above. not sure about it's status.
The music-on-hold module will be broken, also the backup. All others "seem to work for me".
To build the modules run:
cd freepbx/modules-2.2; ../trunk/debian/contrib/fpx-modules build
This will create all the modules on the modules-2.2/modules directory, + build log per module.
I hope I did not brake anything, but hey, it works for me :)
Added: freepbx/build-area
===================================================================
--- freepbx/build-area 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/build-area 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+link ../build-area/
\ No newline at end of file
Property changes on: freepbx/build-area
___________________________________________________________________
Name: svn:special
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,11 @@
+freepbx-module-announcement (2.2-0.7.0-2) unstable; urgency=low
+
+ * Added missing install.php and uninstall.php
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 25 Feb 2007 14:42:42 +0200
+
+freepbx-module-announcement (2.2-0.7.0-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:23 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-announcement
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-announcement
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Announcements
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:23 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/announcement/
+*.sql usr/share/freepbx/modules/announcement/
+*.sqlite usr/share/freepbx/modules/announcement/
+*.html usr/share/freepbx/modules/announcement/
+*.xml usr/share/freepbx/modules/announcement/
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install announcement || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall announcement || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall announcement || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-announcement/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,119 @@
+<?php
+
+function announcement_destinations() {
+ // return an associative array with destination and description
+ foreach (announcement_list() as $row) {
+ $extens[] = array('destination' => 'app-announcement-'.$row[0].',s,1', 'description' => $row[1]);
+ }
+ return $extens;
+}
+
+function announcement_get_config($engine) {
+ global $ext;
+ switch ($engine) {
+ case 'asterisk':
+ foreach (announcement_list() as $row) {
+ $ext->add('app-announcement-'.$row[0], 's', '', new ext_noop('Playing announcement '.$row[1]));
+ if (! $row[6]) {
+ $ext->add('app-announcement-'.$row[0], 's', '', new ext_answer(''));
+ $ext->add('app-announcement-'.$row[0], 's', '', new ext_wait('1'));
+ }
+ if ($row[3] || $row[7]) {
+ // allow skip
+ if ($row[7]) {
+ $ext->add('app-announcement-'.$row[0], 's', '', new ext_responsetimeout(10));
+ }
+ $ext->add('app-announcement-'.$row[0], 's', 'play', new ext_background($row[2].'|nm'));
+
+ if ($row[3]) {
+ $ext->add('app-announcement-'.$row[0], '_X', '', new ext_noop('User skipped announcement'));
+ if ($row[5]) {
+ $ext->add('app-announcement-'.$row[0], '_X', '', new ext_gotoif('$["x${IVR_CONTEXT}" = "x"]', $row[4].':${IVR_CONTEXT},return,1'));
+ } else {
+ $ext->add('app-announcement-'.$row[0], '_X', '', new ext_goto($row[4]));
+ }
+ }
+ if ($row[7]) {
+ $ext->add('app-announcement-'.$row[0], $row[7], '', new ext_goto('s,play'));
+ }
+ } else {
+ $ext->add('app-announcement-'.$row[0], 's', '', new ext_playback($row[2].'|noanswer'));
+ }
+
+ // if repeat_msg enabled then set exten to t to allow for the key to be pressed, otherwise play message and go
+ $exten = $row[7] ? 't':'s';
+ if ($row[5]) {
+ $ext->add('app-announcement-'.$row[0], $exten, '', new ext_gotoif('$["x${IVR_CONTEXT}" = "x"]', $row[4].':${IVR_CONTEXT},return,1'));
+ } else {
+ $ext->add('app-announcement-'.$row[0], $exten, '', new ext_goto($row[4]));
+ }
+
+ }
+ break;
+ }
+}
+
+function announcement_list() {
+ global $db;
+ $sql = "SELECT announcement_id, description, recording, allow_skip, post_dest, return_ivr, noanswer, repeat_msg FROM announcement ORDER BY description ";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ die($results->getMessage()."<br><br>Error selecting from announcement");
+ }
+ return $results;
+}
+
+function announcement_get($announcement_id) {
+ global $db;
+ $sql = "SELECT announcement_id, description, recording, allow_skip, post_dest, return_ivr, noanswer, repeat_msg FROM announcement WHERE announcement_id = ".addslashes($announcement_id);
+ $row = $db->getRow($sql);
+ if(DB::IsError($row)) {
+ die($row->getMessage()."<br><br>Errpr selecting row from announcement");
+ }
+ return $row;
+}
+
+function announcement_add($description, $recording, $allow_skip, $post_dest, $return_ivr, $noanswer, $repeat_msg) {
+ global $db;
+ $sql = "INSERT INTO announcement (description, recording, allow_skip, post_dest, return_ivr, noanswer, repeat_msg) VALUES (".
+ "'".addslashes($description)."', ".
+ "'".addslashes($recording)."', ".
+ "'".($allow_skip ? 1 : 0)."', ".
+ "'".addslashes($post_dest)."', ".
+ "'".($return_ivr ? 1 : 0)."', ".
+ "'".($noanswer ? 1 : 0)."', ".
+ "'".addslashes($repeat_msg)."')";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().$sql);
+ }
+}
+
+function announcement_delete($announcement_id) {
+ global $db;
+ $sql = "DELETE FROM announcement WHERE announcement_id = ".addslashes($announcement_id);
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().$sql);
+ }
+
+}
+
+function announcement_edit($announcement_id, $description, $recording, $allow_skip, $post_dest, $return_ivr, $noanswer, $repeat_msg) {
+ global $db;
+ $sql = "UPDATE announcement SET ".
+ "description = '".addslashes($description)."', ".
+ "recording = '".addslashes($recording)."', ".
+ "allow_skip = '".($allow_skip ? 1 : 0)."', ".
+ "post_dest = '".addslashes($post_dest)."', ".
+ "return_ivr = '".($return_ivr ? 1 : 0)."', ".
+ "noanswer = '".($noanswer ? 1 : 0)."', ".
+ "repeat_msg = '".addslashes($repeat_msg)."' ".
+ "WHERE announcement_id = ".addslashes($announcement_id);
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().$sql);
+ }
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,65 @@
+<?php
+
+global $db;
+global $amp_conf;
+
+$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
+$sql = "CREATE TABLE IF NOT EXISTS announcement (
+ announcement_id integer NOT NULL PRIMARY KEY $autoincrement,
+ description VARCHAR( 50 ),
+ recording VARCHAR( 255 ),
+ allow_skip INT,
+ post_dest VARCHAR( 255 ),
+ return_ivr TINYINT(1) NOT NULL DEFAULT 0,
+ noanswer TINYINT(1) NOT NULL DEFAULT 0,
+ repeat_msg VARCHAR(2) NOT NULL DEFAULT ''
+)";
+$check = $db->query($sql);
+if(DB::IsError($check)) {
+ die("Can not create annoucment table");
+}
+
+// Version 0.3 adds auto-return to IVR
+$sql = "SELECT return_ivr FROM announcement";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE announcement ADD return_ivr TINYINT(1) NOT NULL DEFAULT 0;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+
+// Version 0.4 adds auto-return to IVR
+$sql = "SELECT noanswer FROM announcement";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE announcement ADD noanswer TINYINT(1) NOT NULL DEFAULT 0;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+
+// Version 0.8 upgrade
+$repeat = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "repeat":"`repeat`";
+$sql = "SELECT $repeat FROM announcement";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(! DB::IsError($check)) {
+ // Change field name because php5 was not happy with repeat
+ //
+ $sql = "ALTER TABLE announcement CHANGE $repeat repeat_msg VARCHAR( 2 ) NOT NULL DEFAULT '' ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+}
+
+// Version 0.6 adds repeat_msg
+$sql = "SELECT repeat_msg FROM announcement";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE announcement ADD repeat_msg VARCHAR(2) NOT NULL DEFAULT '';";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/install.sql
===================================================================
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,25 @@
+<module>
+ <rawname>announcement</rawname>
+ <name>Announcements</name>
+ <version>0.7.0</version>
+ <changelog>
+ *0.7.0* more fixes to deal with sqlite and fix mysql5 (includes renaming of repeat to repeat_msg)
+ *0.6.1* Modified the install.sql to work on sqlite3
+ *0.6* added an option to choose a single digit that can be used to have the msg repeated
+ *0.5* chaned to jump to ivr's return context
+ *0.4* Added Don't Answer option to not answer the channel (and playback early media if supported)
+ *0.3* Added support to return to calling IVR
+ *0.2* First Module Intro
+ </changelog>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Plays back one of the system recordings (optionally allowing the user to skip it) and then goes to another destination.
+ </description>
+ <menuitems>
+ <announcement>Announcements</announcement>
+ </menuitems>
+ <location>release/2.2/announcement-0.6.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Announcement</info>
+ <md5sum>7f75a6ff6ce6f5c6ab410e50deafd3ff</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/page.announcement.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/page.announcement.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/page.announcement.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,186 @@
+<?php
+/** Announcments module for freePBX 2.2+
+ * Copyright 2006 Greg MacLellan
+ * This program 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.
+ *
+ * This program 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.
+ */
+
+$action = isset($_POST['action']) ? $_POST['action'] : '';
+if (isset($_POST['delete'])) $action = 'delete';
+
+
+$announcement_id = isset($_POST['announcement_id']) ? $_POST['announcement_id'] : false;
+$description = isset($_POST['description']) ? $_POST['description'] : '';
+$recording = isset($_POST['recording']) ? $_POST['recording'] : '';
+$allow_skip = isset($_POST['allow_skip']) ? $_POST['allow_skip'] : 0;
+$return_ivr = isset($_POST['return_ivr']) ? $_POST['return_ivr'] : 0;
+$noanswer = isset($_POST['noanswer']) ? $_POST['noanswer'] : 0;
+$post_dest = isset($_POST['post_dest']) ? $_POST['post_dest'] : '';
+$repeat_msg = isset($_POST['repeat_msg']) ? $_POST['repeat_msg'] : '';
+
+if ($_POST['goto0']) {
+ // 'ringgroup_post_dest' 'ivr_post_dest' or whatever
+ $post_dest = $_POST[ $_POST['goto0'].'0' ];
+}
+
+
+switch ($action) {
+ case 'add':
+ announcement_add($description, $recording, $allow_skip, $post_dest, $return_ivr, $noanswer, $repeat_msg);
+ needreload();
+ redirect_standard();
+ break;
+ case 'edit':
+ announcement_edit($announcement_id, $description, $recording, $allow_skip, $post_dest, $return_ivr, $noanswer, $repeat_msg);
+ needreload();
+ redirect_standard('extdisplay');
+ break;
+ case 'delete':
+ announcement_delete($announcement_id);
+ needreload();
+ redirect_standard();
+ break;
+}
+
+
+?>
+</div>
+
+<div class="rnav"><ul>
+<?php
+// Eventually I recon the drawListMenu could be built into the new component class thus making
+// the relevent page.php file unnessassary
+
+echo '<li><a href="config.php?display=announcement&type=setup">'._('Add Announcement').'</a></li>';
+
+foreach (announcement_list() as $row) {
+ echo '<li><a href="config.php?display=announcement&type=setup&extdisplay='.$row[0].'" class="">'.$row[1].'</a></li>';
+}
+
+?>
+</ul></div>
+
+<div class="content">
+
+<?php
+if ($extdisplay) {
+ // load
+ $row = announcement_get($extdisplay);
+
+ $description = $row[1];
+ $recording = $row[2];
+ $allow_skip = $row[3];
+ $post_dest = $row[4];
+ $return_ivr = $row[5];
+ $noanswer = $row[6];
+ $repeat_msg = $row[7];
+
+}
+
+?>
+<form name="editAnnouncement" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkAnnouncement(editAnnouncement);">
+ <input type="hidden" name="extdisplay" value="<?php echo $extdisplay; ?>">
+ <input type="hidden" name="announcement_id" value="<?php echo $extdisplay; ?>">
+ <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edit' : 'add'); ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($extdisplay ? _("Edit Announcement") : _("Add Announcement")) ?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Description")?>:<span><?php echo _("The name of this announcement")?></span></a></td>
+ <td><input size="15" type="text" name="description" value="<?php echo $description; ?>"></td>
+ </tr>
+
+<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Recording")?><span><?php echo _("Message to be played.<br>To add additional recordings use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="recording"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($recording) ? $recording : '');
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Repeat")?><span><?php echo _("Key to press that will allow for the message to be replayed. If you choose this option there will be a short delay inserted after the message. If a longer delay is needed it should be incoporated into the recording.")?></span></a></td>
+ <td>
+ <select name="repeat_msg"/>
+ <?php
+ $default = isset($repeat_msg) ? $repeat_msg : '';
+ for ($i=0; $i<=9; $i++ ) {
+ $digits[]="$i";
+ }
+ $digits[] = '*';
+ $digits[] = '#';
+ echo '<option value=""'.($default == '' ? ' SELECTED' : '').'>'._("Disable")."</option>";
+ foreach ($digits as $digit) {
+ echo '<option value="'.$digit.'"'.($digit == $default ? ' SELECTED' : '').'>'.$digit."</option>\n";
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Allow Skip")?><span><?php echo _("If the caller is allowed to press a key to skip the message.")?></span></a></td>
+ <td><input type="checkbox" name="allow_skip" value="1" <?php echo ($allow_skip ? 'CHECKED' : ''); ?> /></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Return to IVR")?><span><?php echo _("If this announcement came from an IVR and this box is checked, the destination below will be ignored and instead it will return to the calling IVR. Otherwise, the destinatino below will be taken. Don't check if not using in this mode. <br>The IVR return location will be to the last IVR in the call chain that was called so be careful to only check when needed. For example, if an IVR directs a call to another destination which eventually calls this annoucement and this box is checked, it will return to that IVR which may not be the expected behavior.")?></span></a></td>
+ <td><input type="checkbox" name="return_ivr" value="1" <?php echo ($return_ivr ? 'CHECKED' : ''); ?> /></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Don't Answer Channel")?><span><?php echo _("Check this to keep the channel from explicitly being answered. When checked, the message will be played and if the channel is not already answered it will be delivered as early media if the channel supports that. When not checked, the channel is answered followed by a 1 second delay. When using an annoucement from an IVR or other sources that have already answered the channel, that 1 second delay may not be desired.")?></span></a></td>
+ <td><input type="checkbox" name="noanswer" value="1" <?php echo ($noanswer ? 'CHECKED' : ''); ?> /></td>
+ </tr>
+
+ <tr><td colspan="2"><br><h5><?php echo _("Destination after playback")?>:<hr></h5></td></tr>
+
+<?php
+//draw goto selects
+echo drawselects($post_dest,0);
+?>
+
+ <tr>
+ <td colspan="2"><br><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>">
+ <?php if ($extdisplay) { echo ' <input name="delete" type="submit" value="'._("Delete").'">'; } ?>
+ </td>
+
+ </tr>
+ </table>
+ </form>
+
+
+<script language="javascript">
+<!--
+
+function checkAnnouncement(theForm) {
+ var msgInvalidDescription = "<?php echo _('Invalid description specified'); ?>";
+
+ // set up the Destination stuff
+ setDestinations(theForm, '_post_dest');
+
+ // form validation
+ defaultEmptyOK = false;
+ if (isEmpty(theForm.description.value))
+ return warnInvalid(theForm.description, msgInvalidDescription);
+
+ if (!validateDestinations(theForm, 1, true))
+ return false;
+
+ return true;
+}
+//-->
+</script>
Added: freepbx/modules-2.2/modules/freepbx-module-announcement/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-announcement/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-announcement/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+<?php
+
+sql('DROP TABLE announcement');
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-asterisk-cli (2.2-1.0-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:29 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-asterisk-cli
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-asterisk-cli
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Asterisk CLI
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:29 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/asterisk-cli/
+*.sql usr/share/freepbx/modules/asterisk-cli/
+*.sqlite usr/share/freepbx/modules/asterisk-cli/
+*.html usr/share/freepbx/modules/asterisk-cli/
+*.xml usr/share/freepbx/modules/asterisk-cli/
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install asterisk-cli || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall asterisk-cli || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall asterisk-cli || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,20 @@
+<module>
+ <rawname>asterisk-cli</rawname>
+ <name>Asterisk CLI</name>
+ <version>1.0</version>
+ <type>tool</type>
+ <category>System Admin</category>
+ <menuitems>
+ <cli>Asterisk CLI</cli>
+ </menuitems>
+ <depends>
+ <engine>asterisk</engine>
+ </depends>
+ <location>release//2.2/asterisk-cli-0.001.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-CLI</info>
+ <md5sum>d2f19494379f862545fbc4ac27185580</md5sum>
+ <changelog>
+*1.0* Fixed security issue, first release in 2.2
+*0.001* Original Release
+ </changelog>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/page.cli.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/page.cli.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-asterisk-cli/page.cli.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,79 @@
+<?php
+/*
+ * Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
+ * Copyright (C) 2005, Xorcom
+ *
+ * All rights reserved.
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * This code is derived from ASTLinux 0.3, from the file
+ * /var/www/admin/asterisk.php
+ *
+ * The original author of AST linux is:
+ * Kristian Kielhofner - KrisCompanies, LLC - http://astlinux.org/
+ */
+
+
+$txtCommand = isset($_POST['txtCommand'])?$_POST['txtCommand']:'';
+?>
+
+<h2><?php echo _("Asterisk CLI")?></h2>
+
+<form action="config.php?type=tool&display=cli" method="POST" enctype="multipart/form-data" name="frmExecPlus">
+ <table>
+ <tr>
+ <td class="label" align="right"><?php echo _("Command:")?></td>
+ <td class="type"><input name="txtCommand" type="text" size="70" value="<?=htmlspecialchars($txtCommand);?>"></td>
+ </tr>
+
+ <tr>
+ <td valign="top"> </td>
+ <td valign="top" class="label">
+ <input type="submit" class="button" value="<?php echo _("Execute:")?>">
+ </td>
+ </tr>
+
+ <tr>
+ <td height="8"></td>
+ <td></td>
+ </tr>
+ </table>
+</form>
+
+<p>
+<?php if (isBlank($txtCommand)): ?>
+</p>
+<?php endif;
+
+function isBlank( $arg ) { return ereg( "^\s*$", $arg ); }
+
+if (!isBlank($txtCommand))
+{
+ echo "<pre>";
+ putenv("TERM=vt100");
+ putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
+ putenv("SCRIPT_FILENAME=" . strtok(stripslashes($txtCommand), " ")); /* PHP scripts */
+ $badchars = array("'", "`", "\\", ";", "\""); // Strip off any nasty chars.
+ $fixedcmd = str_replace($badchars, "", $txtCommand);
+ $ph = popen(stripslashes("asterisk -rx \"$fixedcmd\""), "r" );
+ while ($line = fgets($ph))
+ echo htmlspecialchars($line);
+ pclose($ph);
+ echo "</pre>";
+}
+
+?>
+
+</div>
Added: freepbx/modules-2.2/modules/freepbx-module-backup/bin/ampbackup.pl
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/bin/ampbackup.pl 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/bin/ampbackup.pl 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,210 @@
+#!/usr/bin/perl -w
+# ampbackup.pl Copyright (C) 2005 VerCom Systems, Inc. & Ron Hartmann (rhartmann at vercomsystems.com)
+# Asterisk Management Portal Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+
+# this program is in charge of looking into the database to pick up the backup sets name and options
+# Then it creates the tar files and places them in the /var/lib/asterisk/backups folder
+#
+# The program if run from asterisk users crontab it is run as ampbackup.pl <Backup Job Record Number in Mysql>
+# OR
+# The program is called from the backup.php script and implemented immediately as such:
+# ampbackup.pl <Backup_Name> <Backup_Voicemail_(yes/no)> <Backup_Recordings_(yes/no)> <Backup_Configuration_files(yes/no)>
+# <Backup_CDR_(yes/no)> <Backup_FOP_(yes/no)
+#
+# example ampbackup.pl "My_Nightly_Backup" yes yes no no yes
+#
+
+# This program 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.
+
+# This program 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.
+
+
+use DBI;
+
+if (scalar @ARGV < 1)
+{
+ print "Usage: $0 Backup-set-ID \n";
+ print " This script Reads the backup options from the BackupTable.\n";
+ print " then runs the backup picking up the items that were turned\n";
+ print " OR\n";
+ print " \n";
+ print " The program is called from the backup.php script and implemented immediately as such:\n";
+ print " ampbackup.pl <Backup_Name> <Backup_Voicemail_(yes/no)> <Backup_Recordings_(yes/no)> <Backup_Configuration_files(yes/no)>\n";
+ print " <Backup_CDR_(yes/no)> <Backup_FOP_(yes/no)\n";
+ print " \n";
+ print " example ampbackup.pl \"My_Nightly_Backup\" yes yes no no yes\n";
+ exit(1);
+}
+
+################### BEGIN OF CONFIGURATION ####################
+
+# the name of the extensions table
+$table_name = "Backup";
+# WARNING: this file will be overwritten by the output of this program
+# the name of the box the MySQL database is running on
+$hostname = "localhost";
+# the name of the database our tables are kept
+# Now taken from $User_Preferences
+# $database = "asterisk";
+# scratch file to ftp results with
+$ftpfile = "/tmp/freepbx-backup.ftp";
+
+# Set Default if not defined below
+$User_Preferences{"AMPDBUSER"} = "asteriskuser";
+$User_Preferences{"AMPDBPASS"} = "amp109";
+$User_Preferences{"AMPDBNAME"} = "asterisk";
+$User_Preferences{"AMPWEBROOT"} = "/var/www/html";
+
+open(FILE, "/etc/amportal.conf") || die "Failed to open amportal.conf\n";
+while (<FILE>) {
+ chomp; # no newline
+ s/#.*//; # no comments
+ s/^\s+//; # no leading white
+ s/\s+$//; # no trailing white
+ next unless length; # anything left?
+ my ($var, $value) = split(/\s*=\s*/, $_, 2);
+ $User_Preferences{$var} = $value;
+}
+close(FILE);
+
+open(FILE, "/etc/asterisk/asterisk.conf") || die "Failed to open asterisk.conf\n";
+while (<FILE>) {
+ chomp;
+ s/\s//g; # No spaces, anywhere.
+ s/#.*//; # no comments
+ s/^\s+//; # no leading white
+ s/\s+$//; # no trailing white
+ if (/(.+)=>(.+)/) {
+ $ast{$1} = $2;
+ }
+}
+
+# username to connect to the database
+$username = $User_Preferences{"AMPDBUSER"} ;
+# password to connect to the database
+$password = $User_Preferences{"AMPDBPASS"};
+# Database name
+$database = $User_Preferences{"AMPDBNAME"};
+# the WEB ROOT directory
+$webroot = $User_Preferences{"AMPWEBROOT"};
+
+# If and where to send the backup file once created (still left on local machine as well)
+#
+$ftpbackup = uc $User_Preferences{"FTPBACKUP"};
+$ftpuser = $User_Preferences{"FTPUSER"};
+$ftppassword = $User_Preferences{"FTPPASSWORD"};
+$ftpsubdir = $User_Preferences{"FTPSUBDIR"};
+$ftpserver = $User_Preferences{"FTPSERVER"};
+
+################### END OF CONFIGURATION #######################
+my $now = localtime time;
+my ($sec,$min,$hour,$mday,$mon,$year, $wday,$yday,$isdst) = localtime time;
+$year += 1900;
+$mon +=1;
+#my $Stamp="$year$mon$mday.$hour.$min.$sec";
+my $Stamp=sprintf "%04d%02d%02d.%02d.%02d.%02d",$year,$mon,$mday,$hour,$min,$sec;
+
+
+if (scalar @ARGV > 1)
+{
+ $Backup_Name = $ARGV[0];
+ $Backup_Voicemail = $ARGV[1];
+ $Backup_Recordings = $ARGV[2];
+ $Backup_Configurations = $ARGV[3];
+ $Backup_CDR = $ARGV[4];
+ $Backup_FOP = $ARGV[5];
+}
+else
+{
+ $dbh = DBI->connect("dbi:mysql:dbname=$database;host=$hostname", "$username", "$password");
+
+ $statement = "SELECT Name, Voicemail, Recordings, Configurations, CDR, FOP from $table_name where ID= $ARGV[0]";
+
+ $result = $dbh->selectall_arrayref($statement);
+ unless ($result) {
+ # check for errors after every single database call
+ print "dbh->selectall_arrayref($statement) failed!\n";
+ print "DBI::err=[$DBI::err]\n";
+ print "DBI::errstr=[$DBI::errstr]\n";
+ }
+
+ @resultSet = @{$result};
+ if ( $#resultSet == -1 ) {
+ print "No Backup Schedules defined in $table_name\n";
+ exit;
+ }
+
+ foreach my $row ( @{ $result } ) {
+ $Backup_Name = @{ $row }[0];
+ $Backup_Voicemail = @{ $row }[1];
+ $Backup_Recordings = @{ $row }[2];
+ $Backup_Configurations = @{ $row }[3];
+ $Backup_CDR = @{ $row }[4];
+ $Backup_FOP = @{ $row }[5];
+ #print "$Backup_Name $Backup_Voicemail $Backup_Recordings $Backup_Configurations $Backup_CDR $Backup_FOP\n";
+ }
+}
+#print "$Backup_Name $Backup_Voicemail $Backup_Recordings $Backup_Configurations $Backup_CDR $Backup_FOP\n";
+
+
+ system ("/bin/rm -rf /tmp/ampbackups.$Stamp > /dev/null 2>&1");
+ system ("/bin/mkdir /tmp/ampbackups.$Stamp > /dev/null 2>&1");
+ if ( $Backup_Voicemail eq "yes" ){
+ system ("/bin/tar -Pcz -f /tmp/ampbackups.$Stamp/voicemail.tar.gz ".$ast{'astspooldir'}."/voicemail");
+ }
+ if ( $Backup_Recordings eq "yes" ){
+ system ("/bin/tar -Pcz -f /tmp/ampbackups.$Stamp/recordings.tar.gz ".$ast{'astvarlibdir'}."/sounds/custom");
+ }
+ if ( $Backup_Configurations eq "yes" ){
+ system ($ast{'astvarlibdir'}."/bin/dumpastdb.php $Stamp > /dev/null");
+ system ("/bin/tar -Pcz -f /tmp/ampbackups.$Stamp/configurations.tar.gz ".$ast{'astvarlibdir'}."/agi-bin/ ".$ast{'astvarlibdir'}."/bin/ /etc/asterisk $webroot/admin /etc/amportal.conf /tmp/ampbackups.$Stamp/astdb.dump ");
+ system ("mysqldump --add-drop-table -u $username -p$password --database $database > /tmp/ampbackups.$Stamp/asterisk.sql");
+ }
+ if ( $Backup_CDR eq "yes" ){
+ system ("/bin/tar -Pcz -f /tmp/ampbackups.$Stamp/cdr.tar.gz $webroot/admin/cdr");
+ system ("mysqldump --add-drop-table -u $username -p$password --database asteriskcdrdb > /tmp/ampbackups.$Stamp/asteriskcdr.sql");
+ }
+ if ( $Backup_FOP eq "yes" ){
+ system ("/bin/tar -Pcz -f /tmp/ampbackups.$Stamp/fop.tar.gz $webroot/panel");
+ }
+ system ("/bin/mkdir -p '/var/lib/asterisk/backups/$Backup_Name' > /dev/null 2>&1");
+ system ("/bin/tar -Pcz -f '/var/lib/asterisk/backups/$Backup_Name/$Stamp.tar.gz' /tmp/ampbackups.$Stamp");
+ system ("/bin/rm -rf /tmp/ampbackups.$Stamp > /dev/null 2>&1");
+#
+#
+# FTP Sucessfull Backup's to FTPSERVER
+#
+# leave $ftpbackup which gets overwritten next time but can be checked to see if there were errors.
+# IMPORTANT - if testing as root, delete files since backup runs as asterisk and will fail here since
+# root leave the file around and asterisk can't overwrite it.
+# Note - the hardcoded full backup that cron does will overwrite each day at destination.
+#
+if ( $ftpbackup ne "YES" ) {
+ exit
+}
+
+open(FILE, ">$ftpfile") || die "Failed to open $ftpfile\n";
+
+ printf FILE "user $ftpuser $ftppassword \n";
+ printf FILE "binary\n";
+ if ( $ftpsubdir ne "" ) {
+ printf FILE "cd $ftpsubdir \n";
+ }
+ printf FILE "lcd /var/lib/asterisk/backups/$Backup_Name/\n";
+ printf FILE "put $Stamp.tar.gz\n";
+ printf FILE "bye\n";
+ close(FILE);
+
+ system ("ftp -n $ftpserver < $ftpfile > /dev/null 2>&1");
+
+ #system ("/bin/rm -rf /tmp/ftp2cabana > /dev/null 2>&1");
+
+
+
+exit 0;
Property changes on: freepbx/modules-2.2/modules/freepbx-module-backup/bin/ampbackup.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-backup/bin/dumpastdb.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/bin/dumpastdb.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/bin/dumpastdb.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#!/usr/bin/env php
+<?
+// No use outputting anything, as env forces php headers to appear. Sigh.
+
+global $argv;
+
+function getconf($filename) {
+ $file = file($filename);
+ foreach ($file as $line) {
+ if (preg_match("/^\s*([\w]+)\s*=\s*\"?([\w\/\:\.\%-]*)\"?\s*([;#].*)?/",$line,$matches)) {
+ $conf[ $matches[1] ] = $matches[2];
+ }
+ }
+ return $conf;
+}
+
+$amp_conf = getconf("/etc/amportal.conf");
+
+require_once($amp_conf['AMPWEBROOT']."/admin/common/php-asmanager.php");
+$astman = new AGI_AsteriskManager();
+if (! $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) {
+ unset( $astman );
+}
+
+if (!$argv[1] || strstr($argv[1], "/") || strstr($argv[1], "..")) {
+ // You must supply a single filename, which will be written to /tmp
+ exit;
+}
+ at mkdir("/tmp/ampbackups.$argv[1]/");
+$fh = fopen("/tmp/ampbackups.$argv[1]/astdb.dump", "w");
+$astdb = $astman->database_show();
+foreach ($astdb as $key => $val) {
+ if ($key == "") { continue; }
+ if ($key == "Privilege") { continue; }
+ fwrite($fh, "[$key] [$val]\n");
+}
+fclose($fh);
+
+?>
+
Property changes on: freepbx/modules-2.2/modules/freepbx-module-backup/bin/dumpastdb.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-backup/bin/restoreastdb.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/bin/restoreastdb.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/bin/restoreastdb.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,45 @@
+#!/usr/bin/env php
+<?
+// No use outputting anything, as env forces php headers to appear. Sigh.
+
+global $argv;
+
+function getconf($filename) {
+ $file = file($filename);
+ foreach ($file as $line) {
+ if (preg_match("/^\s*([\w]+)\s*=\s*\"?([\w\/\:\.\%-]*)\"?\s*([;#].*)?/",$line,$matches)) {
+ $conf[ $matches[1] ] = $matches[2];
+ }
+ }
+ return $conf;
+}
+
+$amp_conf = getconf("/etc/amportal.conf");
+
+require_once($amp_conf['AMPWEBROOT']."/admin/common/php-asmanager.php");
+
+$astman = new AGI_AsteriskManager();
+if (! $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) {
+ unset( $astman );
+}
+
+if (!$argv[1] || strstr($argv[1], "/") || strstr($argv[1], "..")) {
+ // You must supply a single filename, which will be written to /tmp
+ exit;
+}
+$dump = file_get_contents("/tmp/ampbackups.$argv[1]/astdb.dump");
+$arr = explode("\n", $dump);
+foreach ($arr as $line) {
+ $result = preg_match("/\[(.+)\] \[(.+)\]/", $line, $matches);
+ // Now, the bad ones we know about are the ones that start with //, anything starting with SIP or IAX,
+ // and RG (which are only temporary anyway).
+ if (!isset($matches[1]) || $matches[1] == "") { continue; }
+ $pattern = "/(^\/\/)|(^\/IAX)|(^\/SIP)|(^\/RG)|(^\/BLKVM)|(^\/FM)/";
+ if (preg_match($pattern, $matches[1])) { continue; }
+ preg_match("/(.+)\/(.+)$/", $matches[1], $famkey);
+ $famkey[1]=trim($famkey[1], '/');
+ $astman->database_put($famkey[1], $famkey[2], $matches[2]);
+}
+
+?>
+
Property changes on: freepbx/modules-2.2/modules/freepbx-module-backup/bin/restoreastdb.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-backup/bin/retrieve_backup_cron_from_mysql.pl
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/bin/retrieve_backup_cron_from_mysql.pl 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/bin/retrieve_backup_cron_from_mysql.pl 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,84 @@
+#!/usr/bin/perl -w
+# retrieve_backup_cron_from_mysql.pl Copyright (C) 2005 VerCom Systems, Inc. & Ron Hartmann (rhartmann at vercomsystems.com)
+# Asterisk Management Portal Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+
+# this program is in charge of looking into the database and creating crontab jobs for each of the Backup Sets
+# The crontab file is for user asterisk.
+#
+# The program preserves any other cron jobs (Not part of the backup) that are installed for the user asterisk
+#
+
+# This program 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.
+
+# This program 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.
+
+use FindBin;
+push @INC, "$FindBin::Bin";
+
+use DBI;
+require "retrieve_parse_amportal_conf.pl";
+
+################### BEGIN OF CONFIGURATION ####################
+
+# the name of the extensions table
+$table_name = "Backup";
+# the path to the extensions.conf file
+# WARNING: this file will be substituted by the output of this program
+$Backup_cron = "/etc/asterisk/backup.conf";
+
+# cool hack by Julien BLACHE <jblache at debian.org>
+$ampconf = parse_amportal_conf( "/etc/amportal.conf" );
+
+################### END OF CONFIGURATION #######################
+
+# the name of the box the MySQL database is running on
+$hostname = $ampconf->{"AMPDBHOST"};
+# username to connect to the database
+$username = $ampconf->{"AMPDBUSER"} ;
+# password to connect to the database
+$password = $ampconf->{"AMPDBPASS"};
+# the name of the database our tables are kept
+$database = $ampconf->{"AMPDBNAME"};
+
+
+open EXTEN, ">$Backup_cron" or die "Cannot create\/overwrite cron file: $Backup_cron\n";
+
+$dbh = DBI->connect("dbi:mysql:dbname=$database;host=$hostname", "$username", "$password");
+
+$statement = "SELECT Command, ID from $table_name WHERE Method NOT LIKE 'now%'";
+
+$result = $dbh->selectall_arrayref($statement);
+unless ($result) {
+ # check for errors after every single database call
+ print "dbh->selectall_arrayref($statement) failed!\n";
+ print "DBI::err=[$DBI::err]\n";
+ print "DBI::errstr=[$DBI::errstr]\n";
+}
+
+ at resultSet = @{$result};
+if ( $#resultSet == -1 ) {
+ print "No Backup Schedules defined in $table_name\n";
+ #grab any other cronjobs that are running as asterisk and NOT associated with backups
+ system ("/usr/bin/crontab -l | grep -v ^#\ | grep -v ampbackup.pl >> $Backup_cron ");
+ #issue the schedule to the cron scheduler
+ system ("/usr/bin/crontab $Backup_cron");
+ exit;
+}
+
+foreach my $row ( @{ $result } ) {
+ my $Backup_Command = @{ $row }[0];
+ my $Backup_ID = @{ $row }[1];
+ print EXTEN "$Backup_Command $Backup_ID\n";
+}
+ #grab any other cronjobs that are running as asterisk and NOT associated with backups
+ system ("/usr/bin/crontab -l | grep -v ^#\ DO\ NOT | grep -v ^#\ \( | grep -v ampbackup.pl >> $Backup_cron ");
+ #issue the schedule to the cron scheduler
+ system ("/usr/bin/crontab $Backup_cron");
+
+exit 0;
Property changes on: freepbx/modules-2.2/modules/freepbx-module-backup/bin/retrieve_backup_cron_from_mysql.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-backup (2.2-2.1.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:24 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-backup
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-backup
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Backup @@NAME@@ Restore
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:24 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/backup/
+*.sql usr/share/freepbx/modules/backup/
+*.sqlite usr/share/freepbx/modules/backup/
+*.html usr/share/freepbx/modules/backup/
+*.xml usr/share/freepbx/modules/backup/
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install backup || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall backup || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall backup || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-backup/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-backup/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-backup/functions.inc.php
===================================================================
Added: freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES/backup.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES/backup.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES/backup.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES/backup.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/i18n/he_IL/LC_MESSAGES/backup.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,325 @@
+# Hebrew version for FreePBX Backup Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.backup.php:103
+msgid "Add Backup Schedule"
+msgstr "××סף ת××××× ×××××××"
+
+#: page.backup.php:104
+msgid "Restore from Backup"
+msgstr "ש××ר ××××××"
+
+#: page.backup.php:125 page.backup.php:148 page.backup.php:192
+msgid "System Backup"
+msgstr "××××× ×ער×ת"
+
+#: page.backup.php:133 page.backup.php:158
+msgid "Run Schedule"
+msgstr "×רץ ×××××"
+
+#: page.backup.php:149
+msgid "Delete Backup Schedule"
+msgstr "××ק ת××××× ×××××××"
+
+#: page.backup.php:173
+msgid "System Restore"
+msgstr "ש×××ר ×ער×ת"
+
+#: schedule_functions.php:22
+msgid "DELETE ALL THE DATA IN THIS SET"
+msgstr "<em>××ק ×ת ×× ×× ×ª×× ×× ××¡× ××</em>"
+
+#: schedule_functions.php:22
+msgid "Delete this backup set and all data associated with this backup set.."
+msgstr "××ק ×¡× ××××× ×× ××ת ×× ×× ×ª×× ×× ××ש×××××× ××¡× ××××× ××.."
+
+#: schedule_functions.php:38
+msgid "Delete File Set"
+msgstr "××ק ×¡× ×§×צ××"
+
+#: schedule_functions.php:38
+msgid "Delete this backup set."
+msgstr "××ק ×¡× ××××××× ××"
+
+#: schedule_functions.php:43
+msgid "Restore Entire Backup Set"
+msgstr "ש××ר ×¡× ××××× ×××"
+
+#: schedule_functions.php:43
+msgid "Restore your Complete Backup set overwriting all files."
+msgstr "ש××ר ×¡× ××××× ××× ×××× ×ר×ס ×ת ×× ×ק×צ×× ×ק×××××."
+
+#: schedule_functions.php:47
+msgid "Restore VoiceMail Files"
+msgstr "ש××ר ק××¦× ×ª× ×§×××"
+
+#: schedule_functions.php:47
+msgid ""
+"Restore your Voicemail files from this backup set. NOTE! This will delete "
+"any voicemail currently in the voicemail boxes."
+msgstr "ש××ר ×ת ×× ×§××¦× ××××ר ×ק××× ××¡× ××××× ××. <em>ש×× ××!</em> פע××× ×× ×ª××ק ×ת ×× ××××¢×ת ××××ר ×ק××× ×שר × ×צ××ת ×עת ×ת×××ת ××××ר ×ק×××."
+
+#: schedule_functions.php:54
+msgid "Restore System Recordings Files"
+msgstr "ש××ר ק××¦× ×ק×××ת ×ער×ת"
+
+#: schedule_functions.php:54
+msgid ""
+"Restore your system Voice Recordings including AutoAttendent files from this "
+"backup set. NOTE! This will OVERWRITE any voicerecordings currently on the "
+"system. It will NOT delete new files not currently in the backup set"
+msgstr "ש××ר ×ת ק××¦× ×ק×××ת ××ער×ת ×××× ×ת ××× ×©× ×ער×ת ×××¢× × ×ק××× ×××××××× ××¡× ××××× ××. <em>ש×× ××!</em> פע××× ×× <em>ת×ר×ס</em> ×ת ×× ××ק×××ת ש×ש ×ר××¢ ××ער×ת. ××× <em>××</em> ת×××ק ק×צ×× ××ש×× ×©××× × ×§××××× ××¡× ××××××"
+
+#: schedule_functions.php:59
+msgid "Restore System Configuration"
+msgstr "ש××ר תצ×רת ×ער×ת"
+
+#: schedule_functions.php:59
+msgid ""
+"Restore your system configuration from this backup set. NOTE! This will "
+"OVERWRITE any System changes you have made since this backup... ALL Itemes "
+"will be reset to what they were at the time of this backup set.."
+msgstr "ש××ר ×ת תצ×רת ××ער×ת ××¡× ××××× ××. <em>ש×× ××!</em> פע××× ×× <em>ת×ר×ס</em> ×× ×©×× ×× ×©×¢×©×ת ××ער×ת ××× ××××× ××... <em>××</em> ××××ר×ת ×ש××××¨× ××× ×©×× ××× ×××× ×צ×רת ×¡× ××××× ××.."
+
+#: schedule_functions.php:64
+msgid "Restore Operator Panel"
+msgstr "ש××ר פ×× × × ××××"
+
+#: schedule_functions.php:64
+msgid ""
+"Restore the Operator Panel from this backup set. NOTE! This will OVERWRITE "
+"any Operator Panel Changes you have made since this backup... ALL Itemes "
+"will be reset to what they were at the time of this backup set.."
+msgstr "ש××ר ×ת פ×× × ××פע×× ××¡× ××××× ××. <em>ש×× ××!</em> פע××× ×× <em>ת×ר×ס</em> ×× ×©×× ×× ×©×¢×©×ת ×פ×× × ××פע×× ××× ×©××צע ××××× ××... <em>××</em> ××××ר×ת ×××××¨× ×××¦× ×©×× ×× ××× ×××× ×צ×רת ×¡× ××××× ××.."
+
+#: schedule_functions.php:69
+msgid "Restore Call Detail Report"
+msgstr "ש××ר ××× ×¤×¨×× ×©×××ת"
+
+#: schedule_functions.php:69
+msgid ""
+"Restore the Call Detail Records from this backup set. NOTE! This will "
+"DELETE ALL CALL RECORDS that have been saved since this backup set.."
+msgstr "ש××ר ×ת רש×××ת פר×× ×ש×××ת ××¡× ××××× ××. <em>ש×× ××!</em> פע××× ×× <em>ת××ק ×ת ×× ×¨×ש××× ×ש×××ת</em> ×©× ×©××¨× ××× ×צ×רת ×¡× ××××× ××.."
+
+#: schedule_functions.php:74
+msgid "ERROR its not a BACKUP SET file"
+msgstr "<em>ש××××:</em> ××× ×× ×§×××¥ <em>×¡× ×××××</em>"
+
+#: schedule_functions.php:296
+msgid "Schedule Name:"
+msgstr "×©× ×ת××××:"
+
+#: schedule_functions.php:296
+msgid "Give this Backup Schedule a brief name to help you identify it."
+msgstr "×ª× ×ת××××× ××××× ×× ×©× ×§×¦×¨ ש××¢××ר ×× ××××ת ×××ª× ×עת××."
+
+#: schedule_functions.php:301
+msgid "VoiceMail"
+msgstr "×××ר ק×××"
+
+#: schedule_functions.php:301
+msgid ""
+"Backup the System VoiceMail Boxes... CAUTION: Could result in large file"
+msgstr "××× ×ת ת×××ת ××××ר ×ק××× ×©××ער×ת... <em>×××ר×:</em> עש×× ×××××צר ק×××¥ ×××× ××××"
+
+#: schedule_functions.php:303 schedule_functions.php:305
+#: schedule_functions.php:311 schedule_functions.php:313
+#: schedule_functions.php:319 schedule_functions.php:321
+#: schedule_functions.php:327 schedule_functions.php:329
+#: schedule_functions.php:335 schedule_functions.php:337
+msgid "yes"
+msgstr "××"
+
+#: schedule_functions.php:303 schedule_functions.php:305
+#: schedule_functions.php:311 schedule_functions.php:313
+#: schedule_functions.php:319 schedule_functions.php:321
+#: schedule_functions.php:327 schedule_functions.php:329
+#: schedule_functions.php:335 schedule_functions.php:337
+msgid "no"
+msgstr "××"
+
+#: schedule_functions.php:309
+msgid "System Recordings"
+msgstr "×ק×××ת ×ער×ת"
+
+#: schedule_functions.php:309
+msgid ""
+"Backup the System Recordings (AutoAttendent, Music On Hold, System "
+"Recordings)"
+msgstr "××× ×ת ×ק×××ת ××ער×ת (××¢× × ×§×××, ××ס×קת ×××ª× ×, ×ק×××ת ×ער×ת)"
+
+#: schedule_functions.php:317
+msgid "System Configuration"
+msgstr "תצ×רת ×ער×ת"
+
+#: schedule_functions.php:317
+msgid ""
+"Backup the System Configurations (Database, etc files, SQL Database, astdb)"
+msgstr "××× ×ת תצ×ר×ת ××ער×ת (××¡× × ×ª×× ××, ק××¦× etc, SQL ×-astdb)"
+
+#: schedule_functions.php:325
+msgid "CDR"
+msgstr "××× ×¨×ש×× ×©×××ת (CDR)"
+
+#: schedule_functions.php:325
+msgid "Backup the System Call Detail Reporting (HTML and Database)"
+msgstr "××× ×ת ××××× ×¤×¨×× ×ש×××ת ש××ער×ת (HTML ×××¡× × ×ª×× ××)"
+
+#: schedule_functions.php:333
+msgid "Operator Panel"
+msgstr "פ×× × ×פע××"
+
+#: schedule_functions.php:333
+msgid "Backup the Operator Panel (HTML and Database)"
+msgstr "××× ×ת פ×× × ××× ×× (HTML ×××¡× × ×ª×× ××)"
+
+#: schedule_functions.php:384 schedule_functions.php:388
+#: schedule_functions.php:413 schedule_functions.php:417
+#: schedule_functions.php:442 schedule_functions.php:446
+msgid "All"
+msgstr "×××"
+
+#: schedule_functions.php:385 schedule_functions.php:389
+#: schedule_functions.php:414 schedule_functions.php:418
+#: schedule_functions.php:443 schedule_functions.php:447
+msgid "Selected"
+msgstr "× ××ר"
+
+#: schedule_functions.php:422
+msgid "January"
+msgstr "×× ××ר"
+
+#: schedule_functions.php:423
+msgid "February"
+msgstr "פ×ר××ר"
+
+#: schedule_functions.php:424
+msgid "March"
+msgstr "×רץ"
+
+#: schedule_functions.php:425
+msgid "April"
+msgstr "×פר××"
+
+#: schedule_functions.php:426
+msgid "May"
+msgstr "×××"
+
+#: schedule_functions.php:427
+msgid "June"
+msgstr "××× ×"
+
+#: schedule_functions.php:428
+msgid "July"
+msgstr "××××"
+
+#: schedule_functions.php:429
+msgid "August"
+msgstr "××××ס×"
+
+#: schedule_functions.php:430
+msgid "September"
+msgstr "ספ×××ר"
+
+#: schedule_functions.php:431
+msgid "October"
+msgstr "××ק×××ר"
+
+#: schedule_functions.php:432
+msgid "November"
+msgstr "× ××××ר"
+
+#: schedule_functions.php:433
+msgid "December"
+msgstr "×צ××ר"
+
+#: schedule_functions.php:451
+msgid "Monday"
+msgstr "×©× ×"
+
+#: schedule_functions.php:452
+msgid "Tuesday"
+msgstr "ש××ש×"
+
+#: schedule_functions.php:453
+msgid "Wednesday"
+msgstr "ר×××¢×"
+
+#: schedule_functions.php:454
+msgid "Thursday"
+msgstr "×××ש×"
+
+#: schedule_functions.php:455
+msgid "Friday"
+msgstr "ש×ש×"
+
+#: schedule_functions.php:456
+msgid "Saturday"
+msgstr "ש×ת"
+
+#: schedule_functions.php:457
+msgid "Sunday"
+msgstr "ר×ש××"
+
+#: schedule_functions.php:465
+msgid "Run Backup"
+msgstr "×רץ ×××××"
+
+#: schedule_functions.php:467
+msgid "Follow Schedule Below"
+msgstr "עק×× ××ר ×ת×××× ×ק××"
+
+#: schedule_functions.php:468
+msgid "Now"
+msgstr "×¢×ש××"
+
+#: schedule_functions.php:469
+msgid "Daily (at midnight)"
+msgstr "×× ××× (××צ×ת)"
+
+#: schedule_functions.php:470
+msgid "Weekly (on Sunday)"
+msgstr "×¤×¢× ×ש×××¢ (×××× ×¨×ש××)"
+
+#: schedule_functions.php:471
+msgid "Monthly (on the 1st)"
+msgstr "×¤×¢× ××××ש (×ר×ש×× ××××ש)"
+
+#: schedule_functions.php:472
+msgid "Yearly (on 1st Jan)"
+msgstr "×¤×¢× ××©× × (× 1 ××× ××ר)"
+
+#: schedule_functions.php:497
+msgid "Minutes"
+msgstr "×ק×ת"
+
+#: schedule_functions.php:497
+msgid "Hours"
+msgstr "שע×ת"
+
+#: schedule_functions.php:497
+msgid "Days"
+msgstr "××××"
+
+#: schedule_functions.php:497
+msgid "Months"
+msgstr "×××ש××"
+
+#: schedule_functions.php:497
+msgid "Weekdays"
+msgstr "×××× ×ש×××¢"
Added: freepbx/modules-2.2/modules/freepbx-module-backup/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,26 @@
+<module>
+ <rawname>backup</rawname>
+ <name>Backup & Restore</name>
+ <version>2.1.1</version>
+ <type>tool</type>
+ <category>System Administration</category>
+ <menuitems>
+ <backup>Backup & Restore</backup>
+ </menuitems>
+ <depends>
+ <module>core</module>
+ </depends>
+ <changelog>
+ *2.1.1* Remove core_users2astdb and core_devices2astdb, it isn't needed and corrupts resotred ampuser info
+ *2.1* Actually, really, restore ASTDB now. Finally. Also add redirect_standard to avoid problems with TRBoE.
+ *2.0.4* Add he_IL translation
+ *2.0.3* don't have BLKVM and FM astdb trees, which shouldn't be left around anyhow
+ *2.0.2* fixed restore ALL to get it to actually work
+ *2.0.1* supplied defaults and fixed bug is weekdays schedule_functions.php - #1279
+ *2.0* Now backs up and restores astdb, which was causing problems with phone configurations.
+ *1.2* Potential fix for restore issues, clean up some warnings
+ </changelog>
+ <location>release/2.2/backup-2.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-BackupRestore</info>
+ <md5sum>841f691fa5dcf7a075103ebf4d472bd6</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-backup/page.backup.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/page.backup.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/page.backup.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,205 @@
+<?php
+// backup.php Copyright (C) 2005 VerCom Systems, Inc. & Ron Hartmann (rhartmann at vercomsystems.com)
+// Asterisk Management Portal Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+?>
+
+<?php
+include_once "schedule_functions.php";
+global $asterisk_conf;
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$display='backup';
+$type = 'tool';
+
+$dir=isset($_REQUEST['dir'])?$_REQUEST['dir']:'';
+$extdisplay=isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:'';
+$file=isset($_REQUEST['file'])?$_REQUEST['file']:'';
+$filetype=isset($_REQUEST['filetype'])?$_REQUEST['filetype']:'';
+$ID=isset($_REQUEST['backupid'])?$_REQUEST['backupid']:'';
+$name=isset($_REQUEST['name'])?$_REQUEST['name']:'backup';
+
+// Santity check passed params
+if (strstr($dir, '..') || strpos($dir, '\'') || strpos($dir, '"') || strpos($dir, '\'') || strpos($dir,'\`') ||
+ strstr($file, '..') || strpos($file, '\'') || strpos($file, '"') || strpos($file, '\'') || strpos($file,'\`') ||
+ strpos($ID, '.') || strpos($ID, '\'') || strpos($ID, '"') || strpos($ID, '\'') || strpos($ID,'\`') ||
+ strpos($filetype, '.') || strpos($filetype, '\'') || strpos($filetype, '"') || strpos($filetype, '\'') || strpos($filetype,'\`')) {
+ print "You're trying to use an invalid character. Please don't.\n";
+ exit;
+}
+
+
+switch ($action) {
+ case "addednew":
+ $ALL_days=isset($_POST['all_days'])?$_POST['all_days']:'';
+ $ALL_months=isset($_POST['all_months'])?$_POST['all_months']:'';
+ $ALL_weekdays=isset($_POST['all_weekdays'])?$_POST['all_weekdays']:'';
+
+ $backup_schedule=isset($_REQUEST['backup_schedule'])?$_REQUEST['backup_schedule']:'';
+ $name=(empty($_REQUEST['name'])?'backup':$_REQUEST['name']);
+ $mins=isset($_REQUEST['mins'])?$_REQUEST['mins']:'';
+ $hours=isset($_REQUEST['hours'])?$_REQUEST['hours']:'';
+ $days=isset($_REQUEST['days'])?$_REQUEST['days']:'';
+ $months=isset($_REQUEST['months'])?$_REQUEST['months']:'';
+ $weekdays=isset($_REQUEST['weekdays'])?$_REQUEST['weekdays']:'';
+
+ $backup_options[]=$_REQUEST['bk_voicemail'];
+ $backup_options[]=$_REQUEST['bk_sysrecordings'];
+ $backup_options[]=$_REQUEST['bk_sysconfig'];
+ $backup_options[]=$_REQUEST['bk_cdr'];
+ $backup_options[]=$_REQUEST['bk_fop'];
+
+ $Backup_Parms=Get_Backup_String($name,$backup_schedule, $ALL_days, $ALL_months, $ALL_weekdays, $mins, $hours, $days, $months, $weekdays);
+ Save_Backup_Schedule($Backup_Parms, $backup_options);
+ break;
+ case "edited":
+ Delete_Backup_set($ID);
+ $ALL_days=$_REQUEST['all_days'];
+ $ALL_months=$_REQUEST['all_months'];
+ $ALL_weekdays=$_REQUEST['all_weekdays'];
+
+ $backup_schedule=$_REQUEST['backup_schedule'];
+ $mins=$_REQUEST['mins'];
+ $hours=$_REQUEST['hours'];
+ $days=$_REQUEST['days'];
+ $months=$_REQUEST['months'];
+ $weekdays=$_REQUEST['weekdays'];
+
+ $backup_options[]=$_REQUEST['bk_voicemail'];
+ $backup_options[]=$_REQUEST['bk_sysrecordings'];
+ $backup_options[]=$_REQUEST['bk_sysconfig'];
+ $backup_options[]=$_REQUEST['bk_cdr'];
+ $backup_options[]=$_REQUEST['bk_fop'];
+
+ $Backup_Parms=Get_Backup_String($name,$backup_schedule, $ALL_days, $ALL_months, $ALL_weekdays, $mins, $hours, $days, $months, $weekdays);
+ Save_Backup_Schedule($Backup_Parms, $backup_options);
+ break;
+ case "delete":
+ Delete_Backup_set($ID);
+ break;
+ case "deletedataset":
+ exec("/bin/rm -rf '$dir'");
+ break;
+ case "deletefileset":
+ exec("/bin/rm -rf '$dir'");
+ break;
+ case "restored":
+ $Message=Restore_Tar_Files($dir, $file, $filetype, $display);
+ // Regenerate all the ASTDB stuff. Note, we need a way to do speedials and other astdb stuff here.
+ needreload();
+ redirect_standard();
+ break;
+}
+
+
+?>
+</div>
+<div class="rnav"><ul>
+ <li><a href="config.php?type=<?php echo urlencode($type)?>&display=<?php echo urlencode($display)?>&action=add"><?php echo _("Add Backup Schedule")?></a></li>
+ <li><a href="config.php?type=<?php echo urlencode($type)?>&display=<?php echo urlencode($display)?>&action=restore"><?php echo _("Restore from Backup")?></a></li>
+
+<?php
+//get unique account rows for navigation menu
+$results = Get_Backup_Sets();
+
+if (isset($results)) {
+ foreach ($results as $result) {
+ echo "<li><a id=\"".($extdisplay==$result[13] ? 'current':'')."\" href=\"config.php?type=".urlencode($type)."&display=".urlencode($display)."&action=edit&backupid=".urlencode($result[13])."&backupname=".urlencode($result[0])."\">{$result[0]}</a></li>";
+ }
+}
+?>
+</ul></div>
+
+
+<div class="content">
+
+<?php
+if ($action == 'add')
+{
+ ?>
+ <h2><?php echo _("System Backup")?></h2>
+ <form name="addbackup" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <input type="hidden" name="display" value="<?php echo $display?>">
+ <input type="hidden" name="type" value="<?php echo $type?>">
+ <input type="hidden" name="action" value="addednew">
+ <table>
+ <?php Show_Backup_Options(); ?>
+ </table>
+ <h5><?php echo _("Run Schedule")?><hr></h5>
+ <table>
+ <?php show_schedule("yes",""); ?>
+ <tr>
+ <td colspan="5" align="center"><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>" ></td>
+ </tr>
+ </table>
+ </form>
+ <br><br><br><br><br>
+
+<?php
+}
+else if ($action == 'edit')
+{
+ ?>
+ <h2><?php echo _("System Backup")?></h2>
+ <p><a href="config.php?type=<?php echo urlencode($type)?>&display=<?php echo urlencode($display) ?>&action=delete&backupid=<?php echo urlencode($_REQUEST['backupid']); ?>"><?php echo _("Delete Backup Schedule")?> <?php echo $_REQUEST['backupname']; ?></a></p>
+ <form name="addbackup" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <input type="hidden" name="display" value="<?php echo $display?>">
+ <input type="hidden" name="action" value="edited">
+ <input type="hidden" name="backupid" value="<?php echo $_REQUEST['backupid']; ?>">
+ <input type="hidden" name="type" value="<?php echo $type?>">
+ <table>
+ <?php Show_Backup_Options($_REQUEST['backupid']); ?>
+ </table>
+ <h5><?php echo _("Run Schedule")?><hr></h5>
+ <table>
+ <?php show_schedule("yes", "$_REQUEST[backupid]"); ?>
+ <tr>
+ <td colspan="5" align="center"><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>" ></td>
+ </tr>
+ </table>
+ </form>
+ <br><br><br><br><br>
+
+<?php
+}
+else if ($action == 'restore')
+{
+?>
+ <h2><?php echo _("System Restore")?></h2>
+<?php
+ if (empty($dir)) {
+ $dir = $asterisk_conf['astvarlibdir']."/backups";
+ if(!is_dir($dir)) mkdir($dir);
+ }
+
+ Get_Tar_Files($dir, $display, $file);
+ echo "<br><br><br><br><br><br><br><br><br><br><br><br>";
+
+}
+else
+{
+ if (isset($Message)){
+ ?>
+ <h3><?php echo $Message ?></h3>
+ <?php }
+ else{
+ ?>
+ <h2><?php echo _("System Backup") ?></h2>
+ <?php }
+?>
+
+
+
+ <br><br><br><br><br><br>
+ <br><br><br><br><br><br>
+<?php
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-backup/schedule_functions.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-backup/schedule_functions.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-backup/schedule_functions.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,522 @@
+<?php
+// schedule_functions.php Copyright (C) 2005 VerCom Systems, Inc. & Ron Hartmann (rhartmann at vercomsystems.com)
+// Asterisk Management Portal Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+function Get_Tar_Files($dir="", $display="", $file="")
+{
+ global $type;
+ global $asterisk_conf;
+ if (is_dir($dir)) {
+ if (($file!=".") && ($file!="..") && ($file!="")){
+ echo "<li><a class=\"info\" href=\"javascript:decision('Are you sure you want to delete this File Set?','config.php?type=$type&display=$display&action=deletedataset&dir=$dir')\">";
+ echo _("DELETE ALL THE DATA IN THIS SET"); echo "<span>"; echo _("Delete this backup set and all data associated with this backup set..");echo "</span></a><br></li>";
+ echo "<br>";
+ }
+ if ($dh = opendir($dir)){
+ while (($file = readdir($dh)) !== false)
+ {
+ if (($file!=".") && ($file!="..") && ($dir==$asterisk_conf['astvarlibdir']."/backups/"))
+ echo "<li><a href=\"config.php?type=$type&display=$display&action=restore&dir=$dir/$file\">$file</a><br></li>";
+ else if (($file!=".") && ($file!="..") )
+ echo "<li><a href=\"config.php?type=$type&display=$display&action=restore&dir=$dir/$file&file=$file\">$file</a><br></li>";
+ }
+ closedir($dh);
+ }
+ }
+ else if (substr($dir, -6)=="tar.gz" ){
+ echo "<li><a class=\"info\" href=\"javascript:decision('Are you sure you want to delete this File Set?','config.php?type=$type&display=$display&action=deletefileset&dir=$dir&file=$file')\">";
+ echo _("Delete File Set"); echo "<span>"; echo _("Delete this backup set."); echo "</span></a><br></li>";
+ echo "<br>";
+ $tar_string="tar tfz \"$dir\" | cut -d'/' -f4";
+ exec($tar_string,$restore_files,$error);
+ echo "<li><a class=\"info\" href=\"javascript:decision('Are you sure you want to restore this COMPLETE file set?\nDoing so will permanently over-write all freePBX and Asterisk files\n You will loose all Your Call Detail Records and any Voicemail that was recorded between the BACKUP DATE and NOW.','config.php?type=$type&display=$display&action=restored&dir=$dir&filetype=ALL&file=$file')\">";
+ echo _("Restore Entire Backup Set"); echo "<span>"; echo _("Restore your Complete Backup set overwriting all files."); echo "</span></a><br></li>";
+ echo "<br>";
+ if (array_search('voicemail.tar.gz',$restore_files)){
+ echo "<li><a class=\"info\" href=\"javascript:decision('Are you sure you want to Restore this file set?\nDoing so will permanently delete any new voicemail you have in your mailbox\n since this backup on $file?','config.php?type=$type&display=$display&action=restored&dir=$dir&filetype=VoiceMail&file=$file')\">";
+ echo _("Restore VoiceMail Files");echo "<span>"; echo _("Restore your Voicemail files from this backup set. NOTE! This will delete any voicemail currently in the voicemail boxes.");
+ echo "</span></a><br></li>";
+ echo "<br>";
+ }
+
+ if (array_search('recordings.tar.gz',$restore_files)){
+ echo "<li><a class=\"info\" href=\"config.php?type=$type&display=$display&action=restored&dir=$dir&filetype=Recordings&file=$file\">";
+ echo _("Restore System Recordings Files"); echo "<span>"; echo _("Restore your system Voice Recordings including AutoAttendent files from this backup set. NOTE! This will OVERWRITE any voicerecordings currently on the system. It will NOT delete new files not currently in the backup set"); echo "</span></a><br></li>";
+ echo "<br>";
+ }
+ if (array_search('configurations.tar.gz',$restore_files)){
+ echo "<li><a class=\"info\" href=\"javascript:decision('Are you sure you want to Restore this File Set\nDoing so will Permanently Over-Write all AMP and Asterisk Files?','config.php?type=$type&display=$display&action=restored&dir=$dir&filetype=Configurations&file=$file')\">";
+ echo _("Restore System Configuration"); echo "<span>"; echo _("Restore your system configuration from this backup set. NOTE! This will OVERWRITE any System changes you have made since this backup... ALL Itemes will be reset to what they were at the time of this backup set.."); echo "</span></a><br></li>";
+ echo "<br>";
+ }
+ if (array_search('fop.tar.gz',$restore_files)){
+ echo "<li><a class=\"info\" href=\"javascript:decision('Are you sure you want to Restore the Operator Panel Files\nDoing so will Permanently Over-Write all Operator Panel Files?','config.php?type=$type&display=$display&action=restored&dir=$dir&filetype=FOP&file=$file')\">";
+ echo _("Restore Operator Panel"); echo "<span>"; echo _("Restore the Operator Panel from this backup set. NOTE! This will OVERWRITE any Operator Panel Changes you have made since this backup... ALL Itemes will be reset to what they were at the time of this backup set.."); echo "</span></a><br></li>";
+ echo "<br>";
+ }
+ if (array_search('cdr.tar.gz',$restore_files)){
+ echo "<li><a class=\"info\" href=\"javascript:decision('Are you sure you want to Restore the CALL DETAIL FILES \nDoing so will Permanently DELETE all CALL RECORDS.?','config.php?type=$type&display=$display&action=restored&dir=$dir&filetype=CDR&file=$file')\">";
+ echo _("Restore Call Detail Report"); echo "<span>"; echo _("Restore the Call Detail Records from this backup set. NOTE! This will DELETE ALL CALL RECORDS that have been saved since this backup set.."); echo "</span></a><br></li>";
+ echo "<br>";
+ }
+ }
+ else{
+ echo "<h2>"; echo _("ERROR its not a BACKUP SET file");echo "</h2>";
+ }
+}
+function Restore_Tar_Files($dir="", $file="",$filetype="", $display="") {
+ global $asterisk_conf;
+ global $amp_conf;
+ $Message="Restore Failed";
+
+ if($filetype=="ALL") {
+ $Message="Restored All Files in BackupSet";
+ $fileholder=substr($file, 0,-7);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+
+ // First restore voicemial (for some reason if you do it all at once these don't get restored
+ //
+ exec('/bin/rm -rf '.$asterisk_conf['astspooldir'].'/voicemail');
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/voicemail.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+
+ // Next, recordings cause same issue as above
+ //
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/recordings.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+
+ // Now the rest and then we'll get on with the databases
+ //
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/configurations.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/fop.tar.gz /tmp/ampbackups.$fileholder/cdr.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+ $tar_cmd="tar -Pxvz -f \"$dir\" /tmp/ampbackups.$fileholder/asterisk.sql /tmp/ampbackups.$fileholder/asteriskcdr.sql /tmp/ampbackups.$fileholder/astdb.dump";
+ exec($tar_cmd);
+
+ $sql_cmd="mysql -u $amp_conf[AMPDBUSER] -p$amp_conf[AMPDBPASS] < /tmp/ampbackups.$fileholder/asterisk.sql";
+ exec($sql_cmd);
+ $sql_cmd="mysql -u $amp_conf[AMPDBUSER] -p$amp_conf[AMPDBPASS] < /tmp/ampbackups.$fileholder/asteriskcdr.sql";
+ exec($sql_cmd);
+ exec($asterisk_conf['astvarlibdir']."/bin/restoreastdb.php $fileholder");
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ } else if($filetype=="VoiceMail") {
+ $Message="Restored VoiceMail";
+ $fileholder=substr($file, 0,-7);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ exec('/bin/rm -rf '.$asterisk_conf['astspooldir'].'/voicemail');
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/voicemail.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ } else if($filetype=="Recordings") {
+ $Message="Restored System Recordings";
+ $fileholder=substr($file, 0,-7);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/recordings.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ } else if($filetype=="Configurations"){
+ $Message="Restored System Configuration";
+ $fileholder=substr($file, 0,-7);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/configurations.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+ $tar_cmd="tar -Pxvz -f \"$dir\" /tmp/ampbackups.$fileholder/asterisk.sql";
+ exec($tar_cmd);
+ $sql_cmd="mysql -u $amp_conf[AMPDBUSER] -p$amp_conf[AMPDBPASS] < /tmp/ampbackups.$fileholder/asterisk.sql";
+ exec($sql_cmd);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ } else if($filetype=="FOP"){
+ $Message="Restored Operator Panel";
+ $fileholder=substr($file, 0,-7);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/fop.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ } else if($filetype=="CDR"){
+ $Message="Restored CDR logs";
+ $fileholder=substr($file, 0,-7);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ $tar_cmd="tar -PxvOz -f \"$dir\" /tmp/ampbackups.$fileholder/cdr.tar.gz | tar -Pxvz";
+ exec($tar_cmd);
+ $tar_cmd="tar -Pxvz -f \"$dir\" /tmp/ampbackups.$fileholder/asteriskcdr.sql";
+ exec($tar_cmd);
+ $sql_cmd="mysql -u $amp_conf[AMPDBUSER] -p$amp_conf[AMPDBPASS] < /tmp/ampbackups.$fileholder/asteriskcdr.sql";
+ exec($sql_cmd);
+ exec('/bin/rm -rf /tmp/ampbackups.$fileholder');
+ }
+ return ($Message);
+}
+function Get_Backup_Sets() {
+ global $db;
+ $sql = "SELECT * FROM Backup";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ return $results;
+}
+function Delete_Backup_Set($ID="") {
+ global $db;
+ global $asterisk_conf;
+ $sql = "DELETE FROM Backup WHERE ID = '$ID'";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage());
+ }
+ $Cron_Script=$asterisk_conf['astvarlibdir']."/bin/retrieve_backup_cron_from_mysql.pl";
+ exec($Cron_Script);
+}
+function Save_Backup_Schedule($Backup_Parms, $backup_options )
+{
+ global $db;
+ global $asterisk_conf;
+ if ($Backup_Parms[1]=="now")
+ {
+ $Cron_Script=$asterisk_conf['astvarlibdir']."/bin/ampbackup.pl '$Backup_Parms[0]' $backup_options[0] $backup_options[1] $backup_options[2] $backup_options[3] $backup_options[4]";
+ //echo "$Cron_Script";
+ exec($Cron_Script);
+ }
+ $sql = "INSERT INTO Backup (Name, Voicemail, Recordings, Configurations, CDR, FOP, Minutes, Hours, Days, Months,Weekdays, Command, Method ) VALUES (";
+ $sql .= "'".$Backup_Parms[0]."',";
+ $sql .= "'".$backup_options[0]."',";
+ $sql .= "'".$backup_options[1]."',";
+ $sql .= "'".$backup_options[2]."',";
+ $sql .= "'".$backup_options[3]."',";
+ $sql .= "'".$backup_options[4]."',";
+ $sql .= "'".$Backup_Parms[2]."',";
+ $sql .= "'".$Backup_Parms[3]."',";
+ $sql .= "'".$Backup_Parms[4]."',";
+ $sql .= "'".$Backup_Parms[5]."',";
+ $sql .= "'".$Backup_Parms[6]."',";
+ $sql .= "'".$Backup_Parms[7]."',";
+ $sql .= "'".$Backup_Parms[1]."');";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().'<hr>'.$sql);
+ }
+ $Cron_Script=$asterisk_conf['astvarlibdir']."/bin/retrieve_backup_cron_from_mysql.pl";
+ exec($Cron_Script);
+
+}
+function Get_Backup_String($name, $backup_schedule, $ALL_days, $ALL_months, $ALL_weekdays, $mins="", $hours="", $days="", $months="", $weekdays="") {
+ global $asterisk_conf;
+ if ($backup_schedule=="hourly")
+ $Cron_String="0 * * * * ".$asterisk_conf['astvarlibdir']."/bin/ampbackup.pl";
+ else if ($backup_schedule=="daily")
+ $Cron_String="0 0 * * * ".$asterisk_conf['astvarlibdir']."/bin/ampbackup.pl";
+ else if ($backup_schedule=="weekly")
+ $Cron_String="0 0 * * 0 ".$asterisk_conf['astvarlibdir']."/bin/ampbackup.pl";
+ else if ($backup_schedule=="monthly")
+ $Cron_String="0 0 1 * * ".$asterisk_conf['astvarlibdir']."/bin/ampbackup.pl";
+ else if ($backup_schedule=="yearly")
+ $Cron_String="0 0 1 1 * ".$asterisk_conf['astvarlibdir']."/bin/ampbackup.pl";
+ else if ($backup_schedule=="follow_schedule")
+ {
+
+ if (count($mins)<1)
+ $mins_string=":0:";
+ else{
+ foreach ($mins as $value)
+ $mins_string.=":$value:";
+ }
+ if (count($hours)<1)
+ $hours_string=":0:";
+ else{
+ foreach ($hours as $value)
+ $hours_string.=":$value:";
+ }
+ if(($ALL_days=="1")||(count($days)<1))
+ $days_string="*";
+ else{
+ foreach ($days as $value)
+ $days_string.=":$value:";
+ }
+ if(($ALL_months=="1")||(count($months)<1))
+ $months_string="*";
+ else{
+ foreach ($months as $value)
+ $months_string.=":$value:";
+ }
+ if($ALL_weekdays=="1"||(count($weekdays)<1))
+ $weekdays_string="*";
+ else{
+ foreach ($weekdays as $value)
+ $weekdays_string.=":$value:";
+ }
+
+ $cron_mins_string=trim($mins_string,":");
+ $cron_hours_string=trim($hours_string,":");
+ $cron_days_string=trim($days_string,":");
+ $cron_months_string=trim($months_string,":");
+ $cron_weekdays_string=trim($weekdays_string,":");
+ $Cron_String=str_replace("::", ",", "$cron_mins_string $cron_hours_string $cron_days_string $cron_months_string $cron_weekdays_string ".$asterisk_conf['astvarlibdir']."/bin/ampbackup.pl");
+ }
+ else if ($backup_schedule=="now")
+ $Cron_String="0 0 0 0 0 ".$asterisk_conf['astvarlibdir']."/bin/ampbackup.pl";
+ $Backup_String[]="$name";
+ $Backup_String[]="$backup_schedule";
+ $Backup_String[]="$mins_string";
+ $Backup_String[]="$hours_string";
+ $Backup_String[]="$days_string";
+ $Backup_String[]="$months_string";
+ $Backup_String[]="$weekdays_string";
+ $Backup_String[]="$Cron_String";
+
+ return ($Backup_String);
+}
+function Get_Backup_Times($BackupID)
+{
+ global $db;
+ $sql = "SELECT Minutes, Hours, Days, Months, Weekdays, Method From Backup where ID=\"$BackupID\"";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = Array(null, null, null, null, null, null);
+ }
+ return $results;
+}
+function Get_Backup_Options($BackupID)
+{
+ global $db;
+ $sql = "SELECT Name, Voicemail, Recordings, Configurations, CDR, FOP FROM Backup where ID=\"$BackupID\"";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = Array(null, null, null, null, null, null);
+ }
+ return $results;
+}
+function Show_Backup_Options($ID="")
+{
+ if ($ID==""){
+ $name=""; $voicemail="no"; $sysrecordings="no"; $sysconfig="no"; $cdr="no"; $fop="no";}
+ else{
+ $backup_options=Get_Backup_Options($ID);
+ foreach ($backup_options as $bk_options)
+ $name="$bk_options[0]";$voicemail="$bk_options[1]"; $sysrecordings="$bk_options[2]"; $sysconfig="$bk_options[3]"; $cdr="$bk_options[4]"; $fop="$bk_options[5]";
+ }
+ ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Schedule Name:")?><span><?php echo _("Give this Backup Schedule a brief name to help you identify it.");?></span></a></td>
+ <td><input type="text" name="name" value="<?php echo (isset($name) ? $name : ''); ?>"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("VoiceMail");?><span><?php echo _("Backup the System VoiceMail Boxes... CAUTION: Could result in large file");?></span></a>: </td>
+ <?php if ($voicemail == "yes"){?>
+ <td><input type="radio" name="bk_voicemail" value="yes" checked=checked/> <?php echo _("yes");?> <input type="radio" name="bk_voicemail" value="no"/> <?php echo _("no");?></td>
+ <?php } else{ ?>
+ <td><input type="radio" name="bk_voicemail" value="yes" /> <?php echo _("yes");?> <input type="radio" name="bk_voicemail" value="no" checked=checked/> <?php echo _("no");?></td>
+ <?php } ?>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("System Recordings");?><span><?php echo _("Backup the System Recordings (AutoAttendent, Music On Hold, System Recordings)");?></span></a>: </td>
+ <?php if ($sysrecordings == "yes"){?>
+ <td><input type="radio" name="bk_sysrecordings" value="yes" checked=checked/> <?php echo _("yes");?> <input type="radio" name="bk_sysrecordings" value="no"/> <?php echo _("no");?></td>
+ <?php } else{ ?>
+ <td><input type="radio" name="bk_sysrecordings" value="yes" /> <?php echo _("yes");?> <input type="radio" name="bk_sysrecordings" value="no" checked=checked/> <?php echo _("no");?></td>
+ <?php } ?>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("System Configuration");?><span><?php echo _("Backup the System Configurations (Database, etc files, SQL Database, astdb)");?></span></a>: </td>
+ <?php if ($sysconfig == "yes"){?>
+ <td><input type="radio" name="bk_sysconfig" value="yes" checked=checked/> <?php echo _("yes");?> <input type="radio" name="bk_sysconfig" value="no"/> <?php echo _("no");?></td>
+ <?php } else{ ?>
+ <td><input type="radio" name="bk_sysconfig" value="yes" /> <?php echo _("yes");?> <input type="radio" name="bk_sysconfig" value="no" checked=checked/> <?php echo _("no");?></td>
+ <?php } ?>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("CDR");?><span><?php echo _("Backup the System Call Detail Reporting (HTML and Database)");?></span></a>: </td>
+ <?php if ($cdr == "yes"){?>
+ <td><input type="radio" name="bk_cdr" value="yes" checked=checked/> <?php echo _("yes");?> <input type="radio" name="bk_cdr" value="no"/> <?php echo _("no");?></td>
+ <?php } else{ ?>
+ <td><input type="radio" name="bk_cdr" value="yes" /> <?php echo _("yes");?> <input type="radio" name="bk_cdr" value="no" checked=checked/> <?php echo _("no");?></td>
+ <?php } ?>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Operator Panel");?><span><?php echo _("Backup the Operator Panel (HTML and Database)");?></span></a>: </td>
+ <?php if ($fop == "yes"){?>
+ <td><input type="radio" name="bk_fop" value="yes" checked=checked/> <?php echo _("yes");?> <input type="radio" name="bk_fop" value="no"/> <?php echo _("no");?></td>
+ <?php } else{ ?>
+ <td><input type="radio" name="bk_fop" value="yes" /> <?php echo _("yes");?> <input type="radio" name="bk_fop" value="no" checked=checked/> <?php echo _("no");?></td>
+ <?php } ?>
+ </tr>
+ <?php
+}
+function Schedule_Show_Minutes($Minutes_Set="")
+{
+ echo "<br><br><table> <tr>";
+ echo "<td valign=top><select multiple size=12 name=mins[]>";
+ for ($minutes=0; $minutes<=59; $minutes++)
+ {
+/* if (($minutes==12)||($minutes==24)||($minutes==36)||($minutes==48))
+ {
+ echo "</select></td>";
+ echo "<td width=2 valign=top><select multiple size=12 name=mins[]>";
+ }
+*/ if (strstr($Minutes_Set,":$minutes:"))
+ echo "<option value=\"$minutes\" selected>$minutes";
+ else
+ echo "<option value=\"$minutes\" >$minutes";
+ }
+ echo "</select></td>";
+ echo "</tr></table></td>";
+}
+function Schedule_Show_Hours($Hours_Set="")
+{
+ echo "<br><br><table> <tr>";
+ echo "<td valign=top><select multiple size=12 name=hours[]>";
+ for ($hours=0; $hours<=23; $hours++)
+ {
+/* if ($hours==12)
+ {
+ echo "</select></td>";
+ echo "<td valign=top><select multiple size=12 name=hours[]>";
+ }
+*/ if (strstr($Hours_Set,":$hours:"))
+ echo "<option value=\"$hours\" selected>$hours";
+ else
+ echo "<option value=\"$hours\" >$hours";
+ }
+ echo "</select></td>";
+ echo "</tr></table></td>";
+}
+
+function Schedule_Show_Days($Days_Set="")
+{
+ if ($Days_Set==""){
+ echo "<input type=radio name=all_days value=1 checked>"; echo _("All"); echo "<br>";
+ echo "<input type=radio name=all_days value=0 >"; echo _("Selected"); echo "<br>";
+ }
+ else{
+ echo "<input type=radio name=all_days value=1 >"; echo _("All"); echo "<br>";
+ echo "<input type=radio name=all_days value=0 checked>"; echo _("Selected"); echo "<br>";
+ }
+
+ echo "<table> <tr>";
+ echo "<td valign=top><select multiple size=12 name=days[]>";
+ for ($days=1; $days<=31; $days++)
+ {
+/* if (($days==13)||($days==25))
+ {
+ echo "</select></td>";
+ echo "<td valign=top><select multiple size=12 name=days[]>";
+ }
+*/ if (strstr($Days_Set,":$days:"))
+ echo "<option value=\"$days\" selected>$days";
+ else
+ echo "<option value=\"$days\" >$days";
+ }
+ echo "</select></td>";
+ echo "</tr></table></td>";
+}
+
+function Schedule_Show_Months($Months_Set="")
+{
+ if ($Months_Set==""){
+ echo "<input type=radio name=all_months value=1 checked>"; echo _("All"); echo "<br>";
+ echo "<input type=radio name=all_months value=0 >"; echo _("Selected"); echo "<br>";
+ }
+ else{
+ echo "<input type=radio name=all_months value=1 >"; echo _("All"); echo "<br>";
+ echo "<input type=radio name=all_months value=0 checked>"; echo _("Selected"); echo "<br>";
+ }
+ echo "<table> <tr>";
+ echo "<td valign=top><select multiple size=12 name=months[]>";
+ echo (strstr($Months_Set,":1:") ? '<option value="1" selected>'._("January"):'<option value="1" >'._("January"));
+ echo (strstr($Months_Set,":2:") ? '<option value="2" selected>'._("February"):'<option value="2" >'._("February"));
+ echo (strstr($Months_Set,":3:") ? '<option value="3" selected>'._("March"):'<option value="3" >'._("March"));
+ echo (strstr($Months_Set,":4:") ? '<option value="4" selected>'._("April"):'<option value="4" >'._("April"));
+ echo (strstr($Months_Set,":5:") ? '<option value="5" selected>'._("May"):'<option value="5" >'._("May"));
+ echo (strstr($Months_Set,":6:") ? '<option value="6" selected>'._("June"):'<option value="6" >'._("June"));
+ echo (strstr($Months_Set,":7:") ? '<option value="7" selected>'._("July"):'<option value="7" >'._("July"));
+ echo (strstr($Months_Set,":8:") ? '<option value="8" selected>'._("August"):'<option value="8" >'._("August"));
+ echo (strstr($Months_Set,":9:") ? '<option value="9" selected>'._("September"):'<option value="9" >'._("September"));
+ echo (strstr($Months_Set,":10:") ? '<option value="10" selected>'._("October"):'<option value="10" >'._("October"));
+ echo (strstr($Months_Set,":11:") ? '<option value="11" selected>'._("November"):'<option value="11" >'._("November"));
+ echo (strstr($Months_Set,":12:") ? '<option value="12" selected>'._("December"):'<option value="12" >'._("December"));
+
+ echo "</select></td>";
+ echo "</tr></table></td>";
+}
+
+function Schedule_Show_Weekdays($Weekdays_Set="")
+{
+ if ($Weekdays_Set==""){
+ echo "<input type=radio name=all_weekdays value=1 checked>";echo _("All"); echo "<br>";
+ echo "<input type=radio name=all_weekdays value=0 >";echo _("Selected"); echo "<br>";
+ }
+ else{
+ echo "<input type=radio name=all_weekdays value=1 >";echo _("All"); echo "<br>";
+ echo "<input type=radio name=all_weekdays value=0 checked>";echo _("Selected"); echo "<br>";
+ }
+ echo "<table> <tr>";
+ echo "<td valign=top><select multiple size=12 name=weekdays[]>";
+ echo (strstr($Weekdays_Set,":1:") ? '<option value="1" selected>'._("Monday"):'<option value="1" >'._("Monday"));
+ echo (strstr($Weekdays_Set,":2:") ? '<option value="2" selected>'._("Tuesday"):'<option value="2" >'._("Tuesday"));
+ echo (strstr($Weekdays_Set,":3:") ? '<option value="3" selected>'._("Wednesday"):'<option value="3" >'._("Wednesday"));
+ echo (strstr($Weekdays_Set,":4:") ? '<option value="4" selected>'._("Thursday"):'<option value="4" >'._("Thursday"));
+ echo (strstr($Weekdays_Set,":5:") ? '<option value="5" selected>'._("Friday"):'<option value="5" >'._("Friday"));
+ echo (strstr($Weekdays_Set,":6:") ? '<option value="6" selected>'._("Saturday"):'<option value="6" >'._("Saturday"));
+ echo (strstr($Weekdays_Set,":0:") ? '<option value="0" selected>'._("Sunday"):'<option value="0" >'._("Sunday"));
+
+ echo "</select></td>";
+ echo "</tr></table></td>";
+}
+function show_quickbar($Method="")
+{
+?>
+ <tr bgcolor=#b7b7b7> <td colspan=6><?php echo _("Run Backup");?>
+ <select name=backup_schedule>
+ <option value=follow_schedule <?php echo ($Method == "follow_schedule" ? "SELECTED" : "")?>><?php echo _("Follow Schedule Below");?>
+ <option value=now <?php echo ($Method == "now" ? "SELECTED" : "")?>><?php echo _("Now");?>
+ <option value=daily <?php echo ($Method == "daily" ? "SELECTED" : "")?>><?php echo _("Daily (at midnight)");?>
+ <option value=weekly <?php echo ($Method == "weekly" ? "SELECTED" : "")?>><?php echo _("Weekly (on Sunday)");?>
+ <option value=monthly <?php echo ($Method == "monthly" ? "SELECTED" : "")?>><?php echo _("Monthly (on the 1st)");?>
+ <option value=yearly <?php echo ($Method == "yearly" ? "SELECTED" : "")?>><?php echo _("Yearly (on 1st Jan)");?>
+ </select>
+ </td></tr>
+<?php
+}
+function show_schedule($quickbar="no", $BackupID="")
+{
+ if ($BackupID==""){
+ $Minutes="";
+ $Hours="";
+ $Days="";
+ $Months="";
+ $Weekdays="";
+ $Method="follow_schedule";
+ }
+ else{
+ $backup_times=Get_Backup_Times($BackupID);
+ foreach ($backup_times as $bk_times)
+ $Minutes="$bk_times[0]"; $Hours="$bk_times[1]"; $Days="$bk_times[2]"; $Months="$bk_times[3]"; $Weekdays="$bk_times[4]"; $Method="$bk_times[5]";
+
+ }
+ if ($quickbar=="yes")
+ show_quickbar($Method);
+ else
+ echo "<tr bgcolor=#7f7f7f>";
+ echo "<td><b>"._("Minutes")."</b></td> <td><b>"._("Hours")."</b></td> <td><b>"._("Days")."</b></td> <td><b>"._("Months")."</b></td><td><b>"._("Weekdays")."</b></td> </tr> <tr bgcolor=#b7b7b7>";
+ echo "<td valign=top>";
+ Schedule_Show_Minutes($Minutes);
+ echo "<td valign=top>";
+ Schedule_Show_Hours($Hours);
+ echo "<td valign=top>";
+ Schedule_Show_Days($Days);
+ echo "<td valign=top>";
+ Schedule_Show_Months($Months);
+ echo "<td valign=top>";
+ Schedule_Show_Weekdays($Weekdays);
+}
+
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-blacklist (2.2-1.1.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:22 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-blacklist
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-blacklist
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Blacklist
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:22 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/blacklist/
+*.sql usr/share/freepbx/modules/blacklist/
+*.sqlite usr/share/freepbx/modules/blacklist/
+*.html usr/share/freepbx/modules/blacklist/
+*.xml usr/share/freepbx/modules/blacklist/
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install blacklist || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall blacklist || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall blacklist || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-blacklist/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,212 @@
+<?php /* $Id */
+
+if( !class_exists('extension') ) {
+ require('extensions.class.php');
+}
+function blacklist_get_config($engine) {
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+
+ $id = "app-blacklist";
+ $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal
+
+ $id = "app-blacklist-check";
+ $c = "s";
+ $ext->add($id, $c, '', new ext_lookupblacklist(''));
+ $ext->add($id, $c, '', new ext_gotoif('$["${LOOKUPBLSTATUS}"="FOUND"]', 'blacklisted'));
+ $ext->add($id, $c, '', new ext_return(''));
+ $ext->add($id, $c, 'blacklisted', new ext_answer(''));
+ $ext->add($id, $c, '', new ext_wait(1));
+ $ext->add($id, $c, '', new ext_zapateller(''));
+ $ext->add($id, $c, '', new ext_zapateller(''));
+ $ext->add($id, $c, '', new ext_playback('ss-noservice'));
+ $ext->add($id, $c, '', new ext_hangup(''));
+
+ $modulename = 'blacklist';
+
+ if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) {
+ foreach($featurelist as $item) {
+ $featurename = $item['featurename'];
+ $fname = $modulename.'_'.$featurename;
+ if (function_exists($fname)) {
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->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 blacklist_blacklist_add($fc) {
+ global $ext;
+
+ $ext->add('app-blacklist', $fc, '', new ext_goto('1', 's', 'app-blacklist-add'));
+
+ $id = "app-blacklist-add";
+ $c = "s";
+ $ext->add($id, $c, '', new ext_answer);
+ $ext->add($id, $c, '', new ext_wait(1));
+ $ext->add($id, $c, '', new ext_Playback('enter-num-blacklist'));
+ $ext->add($id, $c, '', new ext_digittimeout(5));
+ $ext->add($id, $c, '', new ext_responsetimeout(60));
+ $ext->add($id, $c, '', new ext_read('blacknr', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_saydigits('${blacknr}'));
+ $ext->add($id, $c, '', new ext_Playback('if-correct-press'));
+ $ext->add($id, $c, '', new ext_Playback('digits/1'));
+ $ext->add($id, $c, 'end', new ext_noop('Waiting for input'));
+ $c = "1";
+ $ext->add($id, $c, '', new ext_set('DB(blacklist/${blacknr})', 1));
+ $ext->add($id, $c, '', new ext_Playback('num-was-successfully'));
+ $ext->add($id, $c, '', new ext_Playback('added'));
+ $ext->add($id, $c, '', new ext_wait(1));
+ $ext->add($id, $c, '', new ext_hangup);
+}
+
+function blacklist_blacklist_remove($fc) {
+ global $ext;
+
+ $ext->add('app-blacklist', $fc, '', new ext_goto('1', 's', 'app-blacklist-remove'));
+
+ $id = "app-blacklist-remove";
+ $c = "s";
+ $ext->add($id, $c, '', new ext_answer);
+ $ext->add($id, $c, '', new ext_wait(1));
+ $ext->add($id, $c, '', new ext_Playback('entr-num-rmv-blklist'));
+ $ext->add($id, $c, '', new ext_digittimeout(5));
+ $ext->add($id, $c, '', new ext_responsetimeout(60));
+ $ext->add($id, $c, '', new ext_read('blacknr', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_saydigits('${blacknr}'));
+ $ext->add($id, $c, '', new ext_Playback('if-correct-press'));
+ $ext->add($id, $c, '', new ext_Playback('digits/1'));
+ $ext->add($id, $c, 'end', new ext_noop('Waiting for input'));
+ $c = "1";
+ $ext->add($id, $c, '', new ext_dbdel('blacklist/${blacknr}'));
+ $ext->add($id, $c, '', new ext_Playback('num-was-successfully'));
+ $ext->add($id, $c, '', new ext_Playback('removed'));
+ $ext->add($id, $c, '', new ext_wait(1));
+ $ext->add($id, $c, '', new ext_hangup);
+}
+
+function blacklist_blacklist_last($fc) {
+ global $ext;
+
+ $ext->add('app-blacklist', $fc, '', new ext_goto('1', 's', 'app-blacklist-last'));
+
+ $id = "app-blacklist-last";
+ $c = "s";
+ $ext->add($id, $c, '', new ext_answer);
+ $ext->add($id, $c, '', new ext_wait(1));
+ $ext->add($id, $c, '', new ext_setvar('lastcaller', '${DB(CALLTRACE/${CALLERID(number)})}'));
+ $ext->add($id, $c, '', new ext_gotoif('$[ $[ "${lastcaller}" = "" ] | $[ "${lastcaller}" = "unknown" ] ]', 'noinfo'));
+ $ext->add($id, $c, '', new ext_playback('privacy-to-blacklist-last-caller'));
+ $ext->add($id, $c, '', new ext_playback('telephone-number'));
+ $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_playback('if-correct-press'));
+ $ext->add($id, $c, '', new ext_playback('digits/1'));
+ $ext->add($id, $c, '', new ext_goto('end'));
+ $ext->add($id, $c, 'noinfo', new ext_playback('unidentified-no-callback'));
+ $ext->add($id, $c, '', new ext_hangup);
+ $ext->add($id, $c, 'end', new ext_noop('Waiting for input'));
+ $c = "1";
+ $ext->add($id, $c, '', new ext_set('DB(blacklist/${lastcaller})', 1));
+ $ext->add($id, $c, '', new ext_Playback('num-was-successfully'));
+ $ext->add($id, $c, '', new ext_Playback('added'));
+ $ext->add($id, $c, '', new ext_wait(1));
+ $ext->add($id, $c, '', new ext_hangup);
+}
+
+function blacklist_hookGet_config($engine) {
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ // Code from modules/core/functions.inc.php core_get_config inbound routes
+ $didlist = core_did_list();
+ if (is_array($didlist)) {
+ foreach ($didlist as $item) {
+ $did = core_did_get($item['extension'],$item['cidnum'],$item['channel']);
+ $exten = $item['extension'];
+ $cidnum = $item['cidnum'];
+ $channel = $item['channel'];
+
+ $exten = (empty($exten)?"s":$exten);
+ $exten = $exten.(empty($cidnum)?"":"/".$cidnum); //if a CID num is defined, add it
+
+ if (empty($channel))
+ $context = "ext-did";
+ else
+ $context = "macro-from-zaptel-{$channel}";
+
+ $ext->splice($context, $exten, 1, new ext_gosub('1', 's', 'app-blacklist-check'));
+ }
+ } // else no DID's defined. Not even a catchall.
+ break;
+ }
+}
+
+function blacklist_list() {
+ global $amp_conf;
+ global $astman;
+
+ if ($astman) {
+ $list = $astman->database_show();
+ foreach ($list as $k => $v) {
+ if (substr($k, 1, 9) == 'blacklist')
+ {
+ $numbers[substr($k, 11)] = substr($k, 11);
+ }
+ }
+
+ if (isset($numbers) && is_array($numbers))
+ natcasesort($numbers);
+
+ return isset($numbers)?$numbers:null;
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+function blacklist_del($number){
+ global $amp_conf;
+ global $astman;
+
+ if ($astman) {
+ $astman->database_del("blacklist",$number);
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+function blacklist_add($post){
+ global $amp_conf;
+ global $astman;
+
+ if(!blacklist_chk($post))
+ return false;
+
+ extract($post);
+ if ($astman) {
+ $astman->database_put("blacklist",$number, '1');
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+
+// ensures post vars is valid
+function blacklist_chk($post){
+ return true;
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES/blacklist.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES/blacklist.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES/blacklist.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES/blacklist.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/i18n/he_IL/LC_MESSAGES/blacklist.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,52 @@
+# Hebrew version for BlackList FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.blacklist.php:51
+msgid "Blacklist entry"
+msgstr "רש××ת רש××× ×©××ר×"
+
+#: page.blacklist.php:51
+msgid "deleted"
+msgstr "× ××ק×"
+
+#: page.blacklist.php:59
+msgid "Blacklist entries"
+msgstr "רש×××ת רש××× ×©××ר×"
+
+#: page.blacklist.php:63
+msgid "Number"
+msgstr "×ספר"
+
+#: page.blacklist.php:75
+msgid "Delete"
+msgstr "××ק"
+
+#: page.blacklist.php:77
+msgid "Edit"
+msgstr "ער××"
+
+#: page.blacklist.php:93
+msgid "Add or replace entry"
+msgstr "××סף ×× ××××£ רש×××"
+
+#: page.blacklist.php:96
+msgid "Number:"
+msgstr "×ספר:"
+
+#: page.blacklist.php:97
+msgid "Enter the number you want to block"
+msgstr "××× ×¡ ×ת ××ספר ש×רצ×× × ××ס××"
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,19 @@
+<?php
+$fcc = new featurecode('blacklist', 'blacklist_add');
+$fcc->setDescription('Blacklist a number');
+$fcc->setDefault('*30');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('blacklist', 'blacklist_remove');
+$fcc->setDescription('Remove a number from the blacklist');
+$fcc->setDefault('*31');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('blacklist', 'blacklist_last');
+$fcc->setDescription('Blacklist the last caller');
+$fcc->setDefault('*32');
+$fcc->update();
+unset($fcc);
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<module>
+ <rawname>blacklist</rawname>
+ <name>Blacklist</name>
+ <version>1.1.1</version>
+ <type>setup</type>
+ <category>CID & Number Management</category>
+ <menuitems>
+ <blacklist>Blacklist</blacklist>
+ </menuitems>
+ <changelog>
+ *1.1.1* Add he_IL translation
+ *1.1* First 2.2 release. Fix minor warnings.
+ </changelog>
+ <location>release/2.2/blacklist-1.1.tgz</location>
+ <info>http://freepbx.org/wiki/AsteriskBlacklist</info>
+ <md5sum>45f5c5e97680120c7c4e4cc9377f99fb</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/page.blacklist.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/page.blacklist.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/page.blacklist.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,127 @@
+<?php /* $Id */
+//Copyright (C) 2006 Magnus Ullberg (magnus at ullberg.us)
+//
+//This program 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.
+//
+//This program 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.
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+
+isset($_REQUEST['number'])?$number = $_REQUEST['number']:$number='';
+
+isset($_REQUEST['editnumber'])?$editnumber = $_REQUEST['editnumber']:$editnumber='';
+
+$dispnum = "blacklist"; //used for switch on config.php
+
+//if submitting form, update database
+
+if(isset($_REQUEST['action'])) {
+ switch ($action) {
+ case "add":
+ blacklist_add($_POST);
+ redirect_standard();
+ break;
+ case "delete":
+ blacklist_del($number);
+ redirect_standard();
+ break;
+ case "edit":
+ blacklist_del($editnumber);
+ blacklist_add($_POST);
+ redirect_standard('editnumber');
+ break;
+
+
+ }
+}
+
+$numbers = blacklist_list();
+?>
+</div>
+
+<!-- NO rnav in this module -->
+
+
+<div class="content">
+<?php
+if ($action == 'delete')
+ echo '<h3>'._("Blacklist entry").' '.$itemid.' '._("deleted").'!</h3>';
+
+if (is_array($numbers)) {
+
+?>
+
+<table cellpadding="5">
+ <tr>
+ <td colspan="4"><h5><?php echo _("Blacklist entries") ?><hr></h5></td>
+ </tr>
+
+ <tr>
+ <td><b><?=_("Number")?></b></td>
+ <td> </td>
+ <td> </td>
+ </tr>
+
+<?php
+// Why should I specify type=setup ???
+
+ foreach ($numbers as $num) {
+ print('<tr>');
+ printf('<td>%s</td>', $num);
+ printf('<td><a href="%s?type=setup&display=%s&number=%s&action=delete">%s</a></td>',
+ $_SERVER['PHP_SELF'], urlencode($dispnum), urlencode($num), _("Delete"));
+ printf('<td><a href="#" onClick="theForm.number.value = \'%s\'; theForm.editnumber.value = \'%s\' ; theForm.action.value = \'edit\' ; ">%s</a></td>',
+ $num, $num, _("Edit"));
+ print('</tr>');
+ }
+
+ print('</table>');
+}
+
+?>
+
+
+<form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="add">
+ <input type="hidden" name="editnumber" value="">
+
+ <table>
+ <tr><td colspan="2"><h5><?php echo _("Add or replace entry") ?><hr></h5></td></tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Number:")?>
+ <span><?php echo _("Enter the number you want to block")?></span></a></td>
+ <td><input type="text" name="number"></td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+
+<script language="javascript">
+<!--
+
+var theForm = document.edit;
+theForm.number.focus();
+
+function edit_onsubmit() {
+ defaultEmptyOK = false;
+ if (!isInteger(theForm.number.value))
+ return warnInvalid(theForm.number, "Please enter a valid Number");
+ return true;
+}
+
+
+-->
+</script>
+
+
+</form>
Added: freepbx/modules-2.2/modules/freepbx-module-blacklist/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-blacklist/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-blacklist/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,7 @@
+<?php
+
+sql('DELETE FROM featurecodes WHERE modulename="blacklist"');
+
+needreload();
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-callback (2.2-1.3.1-2) unstable; urgency=low
+
+ * Added SQLite 3 support. Fixes upstream
+ http://freepbx.org/trac/ticket/1793
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 18 Feb 2007 14:11:55 +0200
+
+freepbx-module-callback (2.2-1.3.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:26 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-callback
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-callback
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Callback
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:26 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/callback/
+*.sql usr/share/freepbx/modules/callback/
+*.sqlite usr/share/freepbx/modules/callback/
+*.html usr/share/freepbx/modules/callback/
+*.xml usr/share/freepbx/modules/callback/
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,39 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite 3 support. Fixes upstream http://freepbx.org/trac/ticket/1793
+
+ at DPATCH@
+diff -urNad freepbx-module-callback~/install.php freepbx-module-callback/install.php
+--- freepbx-module-callback~/install.php 2006-05-31 13:16:44.000000000 +0300
++++ freepbx-module-callback/install.php 2007-02-18 14:01:36.000000000 +0200
+@@ -1,6 +1,24 @@
+ <?php
+
+ global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS callback (
++ callback_id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ description VARCHAR( 50 ) ,
++ callbacknum VARCHAR( 100 ) ,
++ destination VARCHAR( 50 ) ,
++ sleep INTEGER,
++ deptname VARCHAR( 50 )
++);";
++
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die( "Can not create `callback` table: " . $check->getMessage() . "\n");
++}
++
+
+ // Version 1.1 upgrade - add sleep time.
+ $sql = "SELECT sleep FROM callback";
+diff -urNad freepbx-module-callback~/install.sql freepbx-module-callback/install.sql
+--- freepbx-module-callback~/install.sql 2006-05-31 13:16:44.000000000 +0300
++++ freepbx-module-callback/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-CREATE TABLE IF NOT EXISTS callback ( callback_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , description VARCHAR( 50 ) , callbacknum VARCHAR( 100 ) , destination VARCHAR( 50 ) , sleep INT, deptname VARCHAR( 50 ));
Property changes on: freepbx/modules-2.2/modules/freepbx-module-callback/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install callback || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall callback || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall callback || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-callback/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-callback/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-callback/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,106 @@
+<?php /* $Id */
+
+// returns a associative arrays with keys 'destination' and 'description'
+function callback_destinations() {
+ //get the list of meetmes
+ $results = callback_list();
+
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $extens[] = array('destination' => 'callback,'.$result['callback_id'].',1', 'description' => $result['description']);
+ }
+ return $extens;
+ } else {
+ return null;
+ }
+}
+
+/* Generates dialplan for callback
+ We call this with retrieve_conf
+*/
+function callback_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+ global $asterisk_conf;
+ switch($engine) {
+ case "asterisk":
+ $timelist = callback_list();
+ if(is_array($timelist)) {
+ foreach($timelist as $item) {
+ //$thisitem = callback_get(ltrim($item['callback_id']));
+ // add dialplan
+
+ // use callbacknum if avail, otherwise use cidnum
+ $callback_num = (empty($item['callbacknum']) ? '${CALLERID(number)}' : $item['callbacknum']);
+ $ext->add('callback', $item['callback_id'], '', new ext_setvar("CALL",$callback_num));
+
+ //substitute commas with periods to keep asterisk dialplan variables happy
+ $callback_destination = str_replace(",",".",$item['destination']);
+ $ext->add('callback', $item['callback_id'], '', new ext_setvar("DESTINATION",$callback_destination));
+
+ // set sleep time
+ $sleep = (empty($item['sleep']) ? '0' : $item['sleep']);
+ $ext->add('callback', $item['callback_id'], '', new ext_setvar("SLEEP",$sleep));
+
+ // kick off the callback script - run in background (&) so we can hangup
+ $ext->add('callback', $item['callback_id'], '', new ext_system((empty($asterisk_conf['astvarlib']) ? '/var/lib/asterisk' : $asterisk_conf['astvarlib']).'/bin/callback ${CALL} ${DESTINATION} ${SLEEP} &'));
+
+ //hangup
+ $ext->add('callback', $item['callback_id'], '', new ext_hangup(''));
+ }
+
+ }
+ break;
+ }
+}
+
+//get the existing meetme extensions
+function callback_list() {
+ $results = sql("SELECT * FROM callback","getAll",DB_FETCHMODE_ASSOC);
+ if(is_array($results)){
+ foreach($results as $result){
+ // check to see if we have a dept match for the current AMP User.
+ if (checkDept($result['deptname'])){
+ // return this item's dialplan destination, and the description
+ $allowed[] = $result;
+ }
+ }
+ }
+ if (isset($allowed)) {
+ return $allowed;
+ } else {
+ return null;
+ }
+}
+
+function callback_get($id){
+ //get all the variables for the meetme
+ $results = sql("SELECT * FROM callback WHERE callback_id = '$id'","getRow",DB_FETCHMODE_ASSOC);
+ return $results;
+}
+
+function callback_del($id){
+ $results = sql("DELETE FROM callback WHERE callback_id = '$id'","query");
+}
+
+function callback_add($post){
+ if(!callback_chk($post))
+ return false;
+ extract($post);
+ if(empty($description)) $description = ${$goto0.'0'};
+ $results = sql("INSERT INTO callback (description,callbacknum,destination,deptname,sleep) values (\"$description\",\"$callbacknum\",\"${$goto0.'0'}\",\"$deptname\",\"$sleep\")");
+}
+
+function callback_edit($id,$post){
+ if(!callback_chk($post))
+ return false;
+ extract($post);
+ if(empty($description)) $description = ${$goto0.'0'};
+ $results = sql("UPDATE callback SET description = \"$description\", callbacknum = \"$callbacknum\", destination = \"${$goto0.'0'}\", deptname = \"$deptname\", sleep = \"$sleep\" WHERE callback_id = \"$id\"");
+}
+
+// ensures post vars is valid
+function callback_chk($post){
+ return true;
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES/callback.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES/callback.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES/callback.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES/callback.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/i18n/he_IL/LC_MESSAGES/callback.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,80 @@
+# Hebrew version for Callback FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.callback.php:47 page.callback.php:78 page.callback.php:89
+msgid "Add Callback"
+msgstr "××סף ×××× ××ר×"
+
+#: page.callback.php:60
+msgid "Callback "
+msgstr "×××× ×××¨× "
+
+#: page.callback.php:60
+msgid "deleted"
+msgstr "× ××ק"
+
+#: page.callback.php:73
+msgid "Delete Callback"
+msgstr "××ק ×××× ××ר×"
+
+#: page.callback.php:78
+msgid "Callback:"
+msgstr "×××× ××ר×:"
+
+#: page.callback.php:80
+msgid ""
+"A callback will hang up on the caller and then call them back, directing "
+"them to the selected destination. This is useful for reducing mobile phone "
+"charges as well as other applications. Outbound calls will proceed according "
+"to the dial patterns in Outbound Routes."
+msgstr "×××× ×××¨× ×× ×ª×§ ×ת ××תקשר ××× ×צ××¦× ×××× ×××ר×, ת×× ××× ×©××× ××¤× × ×ת ×ש××× ×××¢× ×× ××ר. ××ר ×× ×××¢×× ××× ××ק××× ×××××× ×××פ×× ×× × ××××× ××× ×××ש×××× × ×ספ××. ש×××ת ××צ××ת ת×ש×× × ×¢× ×¤× ×פ××¡× ××××× ×שר ××××ר×× ×× ×ת×××× ××צ×××."
+
+#: page.callback.php:89
+msgid "Edit Callback"
+msgstr "ער×× ×××× ××ר×"
+
+#: page.callback.php:96
+msgid "Callback Description:"
+msgstr "ת×××ר ×××× ××ר×:"
+
+#: page.callback.php:96
+msgid "Enter a description for this callback."
+msgstr "××× ×¡ ת×××ר ×¢××ר ×××× ×××¨× ××."
+
+#: page.callback.php:100
+msgid "Callback Number:"
+msgstr "×ספר ××××× ××ר×:"
+
+#: page.callback.php:100
+msgid ""
+"Optional: Enter the number to dial for the callback. Leave this blank to "
+"just dial the incoming Caller ID Number"
+msgstr "רש×ת: ××× ×¡ ×ת ××ספר ש×××× ×ש ××תקשר ××××× ××ר×. ×ש×ר ש×× ×× ×¨×§ ×¢× ×× ×ª ××××× ×פש××ת ××ספר ש×תק×× ×ש×ר×ת ×ש××× ××××××"
+
+#: page.callback.php:104
+msgid "Delay Before Callback:"
+msgstr "×××ª× × ××¤× × ×××× ××ר×"
+
+#: page.callback.php:104
+msgid ""
+"Optional: Enter the number of seconds the system should wait before calling "
+"back."
+msgstr "רש×ת: ××× ×¡ ×ת ×ספר ××©× ××ת ×©×¢× ××ער×ת ××××ת ××¤× × ×©××× ×××××ת ×××ר×."
+
+#: page.callback.php:107
+msgid "Destination after Callback"
+msgstr "××¢× ×××ר ×××× ××ר×"
Added: freepbx/modules-2.2/modules/freepbx-module-callback/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,13 @@
+<?php
+
+global $db;
+
+// Version 1.1 upgrade - add sleep time.
+$sql = "SELECT sleep FROM callback";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ sql('ALTER TABLE callback ADD COLUMN sleep INT DEFAULT 0');
+ }
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-callback/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+CREATE TABLE IF NOT EXISTS callback ( callback_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , description VARCHAR( 50 ) , callbacknum VARCHAR( 100 ) , destination VARCHAR( 50 ) , sleep INT, deptname VARCHAR( 50 ));
Added: freepbx/modules-2.2/modules/freepbx-module-callback/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,18 @@
+<module>
+ <rawname>callback</rawname>
+ <name>Callback</name>
+ <version>1.3.1</version>
+ <type>setup</type>
+ <category>Remote Access</category>
+ <menuitems>
+ <callback>Callback</callback>
+ </menuitems>
+ <changelog>
+ *1.3.1* Add he_IL translation
+ *1.3* Fixed UI errors for new 2.2 look.
+ *1.2* First 2.2 release
+ </changelog>
+ <info>http://aussievoip.com.au/wiki/freePBX-Callback</info>
+ <location>release/2.2/callback-1.3.tgz</location>
+ <md5sum>233226526fd1fbf4601450a546233ad4</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-callback/page.callback.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/page.callback.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/page.callback.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,152 @@
+<?php /* $Id */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+
+//the item we are currently displaying
+isset($_REQUEST['itemid'])?$itemid=$_REQUEST['itemid']:$itemid='';
+
+$dispnum = "callback"; //used for switch on config.php
+
+//if submitting form, update database
+if(isset($_POST['action'])) {
+ switch ($action) {
+ case "add":
+ callback_add($_POST);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ callback_del($itemid);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit":
+ callback_edit($itemid,$_POST);
+ needreload();
+ redirect_standard('itemid');
+ break;
+ }
+}
+
+//get list of time conditions
+$callbacks = callback_list();
+?>
+
+</div> <!-- end content div so we can display rnav properly-->
+
+<!-- right side menu -->
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($itemid=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Callback")?></a></li>
+<?php
+if (isset($callbacks)) {
+ foreach ($callbacks as $callback) {
+ echo "<li><a id=\"".($itemid==$callback['callback_id'] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&itemid=".urlencode($callback['callback_id'])."\">{$callback['description']}</a></li>";
+ }
+}
+?>
+</ul></div>
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>'._("Callback ").' '.$itemid.' '._("deleted").'!</h3>';
+} else {
+ if ($itemid){
+ //get details for this time condition
+ $thisItem = callback_get($itemid);
+ }
+
+ $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete';
+ $delButton = "
+ <form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST>
+ <input type=\"hidden\" name=\"display\" value=\"{$dispnum}\">
+ <input type=\"hidden\" name=\"itemid\" value=\"{$itemid}\">
+ <input type=\"hidden\" name=\"action\" value=\"delete\">
+ <input type=submit value=\""._("Delete Callback")."\">
+ </form>";
+
+?>
+
+ <h2><?php echo ($itemid ? _("Callback:")." ". $itemid : _("Add Callback")); ?></h2>
+
+ <p><?php echo ($itemid ? '' : _("A callback will hang up on the caller and then call them back, directing them to the selected destination. This is useful for reducing mobile phone charges as well as other applications. Outbound calls will proceed according to the dial patterns in Outbound Routes.")); ?></p>
+
+<?php if ($itemid){ echo $delButton; } ?>
+
+<form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($itemid ? 'edit' : 'add') ?>">
+ <input type="hidden" name="deptname" value="<?php echo $_SESSION["AMP_user"]->_deptname ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($itemid ? _("Edit Callback") : _("Add Callback")) ?><hr></h5></td></tr>
+
+<?php if ($itemid){ ?>
+ <input type="hidden" name="account" value="<?php echo $itemid; ?>">
+<?php }?>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Callback Description:")?><span><?php echo _("Enter a description for this callback.")?></span></a></td>
+ <td><input type="text" name="description" value="<?php echo (isset($thisItem['description']) ? $thisItem['description'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Callback Number:")?><span><?php echo _("Optional: Enter the number to dial for the callback. Leave this blank to just dial the incoming Caller ID Number")?></span></a></td>
+ <td><input type="text" name="callbacknum" value="<?php echo (isset($thisItem['callbacknum']) ? $thisItem['callbacknum'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Delay Before Callback:")?><span><?php echo _("Optional: Enter the number of seconds the system should wait before calling back.")?></span></a></td>
+ <td><input size="3" type="text" name="sleep" value="<?php echo (isset($thisItem['sleep']) ? $thisItem['sleep'] : ''); ?>"></td>
+ </tr>
+ <tr><td colspan="2"><br><h5><?php echo _("Destination after Callback")?>:<hr></h5></td></tr>
+
+<?php
+//draw goto selects
+if (isset($thisItem)) {
+ echo drawselects($thisItem['destination'],0);
+} else {
+ echo drawselects(null, 0);
+}
+?>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+<script language="javascript">
+<!--
+
+var theForm = document.edit;
+theForm.description.focus();
+
+function edit_onsubmit() {
+ setDestinations(edit,1);
+
+ defaultEmptyOK = false;
+ if (!isAlphanumeric(theForm.description.value))
+ return warnInvalid(theForm.description, "Please enter a valid Description");
+
+ if (!validateDestinations(edit,1,true))
+ return false;
+
+ return true;
+}
+
+
+-->
+</script>
+
+
+ </form>
+<?php
+} //end if action == delete
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-callback/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callback/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callback/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+<?php
+
+sql('DROP TABLE callback');
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-callforward (2.2-1.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:44 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-callforward
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-callforward
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Call Forward
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:44 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/callforward/
+*.sql usr/share/freepbx/modules/callforward/
+*.sqlite usr/share/freepbx/modules/callforward/
+*.html usr/share/freepbx/modules/callforward/
+*.xml usr/share/freepbx/modules/callforward/
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install callforward || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall callforward || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall callforward || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-callforward/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,274 @@
+<?php
+
+function callforward_get_config($engine) {
+ $modulename = 'callforward';
+
+ // This generates the dialplan
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) {
+ foreach($featurelist as $item) {
+ $featurename = $item['featurename'];
+ $fname = $modulename.'_'.$featurename;
+ if (function_exists($fname)) {
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->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;
+ }
+}
+
+// Unconditional Call Forwarding
+function callforward_cfon($c) {
+ global $ext;
+
+ $id = "app-cf-on"; // 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('call-fwd-unconditional'));
+ $ext->add($id, $c, '', new ext_playback('please-enter-your&extension'));
+ $ext->add($id, $c, '', new ext_read('fromext', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_setvar('fromext', '${IF($["foo${fromext}"="foo"]?${CALLERID(number)}:${fromext})}'));
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, 'startread', new ext_playback('ent-target-attendant'));
+ $ext->add($id, $c, '', new ext_read('toext', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_gotoif('$["foo${toext}"="foo"]', 'startread'));
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, '', new ext_setvar('DB(CF/${fromext})', '${toext}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-unconditional&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('is-set-to'));
+ $ext->add($id, $c, '', new ext_saydigits('${toext}'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+
+ $clen = strlen($c);
+ $c = "_$c.";
+ $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_setvar('DB(CF/${CALLERID(number)})', '${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-unconditional&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${CALLERID(number)}'));
+ $ext->add($id, $c, '', new ext_playback('is-set-to'));
+ $ext->add($id, $c, '', new ext_saydigits('${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+function callforward_cfoff_any($c) {
+ global $ext;
+
+ $id = "app-cf-off-any"; // 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('please-enter-your&extension'));
+ $ext->add($id, $c, '', new ext_read('fromext', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, '', new ext_dbdel('CF/${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-unconditional&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('cancelled'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+function callforward_cfoff($c) {
+ global $ext;
+
+ $id = "app-cf-off"; // The context to be included
+
+ $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal
+
+ // for this extension
+ $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_dbdel('CF/${CALLERID(number)}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-unconditional&de-activated')); // $cmd,n,Playback(...)
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+
+ // for any extension, dial *XX<exten>
+ $clen = strlen($c);
+ $c = "_$c.";
+ $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('fromext', '${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_dbdel('CF/${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-unconditional&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('cancelled'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+
+}
+
+// Call Forward on Busy
+function callforward_cfbon($c) {
+ global $ext;
+
+ $id = "app-cf-busy-on"; // 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('call-fwd-on-busy'));
+ $ext->add($id, $c, '', new ext_playback('please-enter-your&extension'));
+ $ext->add($id, $c, '', new ext_read('fromext', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_setvar('fromext', '${IF($["foo${fromext}"="foo"]?${CALLERID(number)}:${fromext})}'));
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, 'startread', new ext_playback('ent-target-attendant'));
+ $ext->add($id, $c, '', new ext_read('toext', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_gotoif('$["foo${toext}"="foo"]', 'startread'));
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, '', new ext_setvar('DB(CFB/${fromext})', '${toext}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-on-busy&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('is-set-to'));
+ $ext->add($id, $c, '', new ext_saydigits('${toext}'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+
+ $clen = strlen($c);
+ $c = "_$c.";
+ $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_setvar('DB(CFB/${CALLERID(number)})', '${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-on-busy&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${CALLERID(number)}'));
+ $ext->add($id, $c, '', new ext_playback('is-set-to'));
+ $ext->add($id, $c, '', new ext_saydigits('${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+function callforward_cfboff_any($c) {
+ global $ext;
+
+ $id = "app-cf-busy-off-any"; // 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('please-enter-your&extension'));
+ $ext->add($id, $c, '', new ext_read('fromext', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, '', new ext_dbdel('CFB/${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-on-busy&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('cancelled'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+function callforward_cfboff($c) {
+ global $ext;
+
+ $id = "app-cf-busy-off"; // The context to be included
+
+ $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal
+
+ // for this extension
+ $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_dbdel('CFB/${CALLERID(number)}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-on-busy&de-activated')); // $cmd,n,Playback(...)
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+
+ // for any extension, dial *XX<exten>
+ $clen = strlen($c);
+ $c = "_$c.";
+ $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('fromext', '${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_dbdel('CFB/${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-on-busy&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('cancelled'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+
+}
+
+// Call Forward on No Answer/Unavailable (i.e. phone not registered)
+function callforward_cfuon($c) {
+ global $ext;
+
+ $id = "app-cf-unavailable-on"; // The context to be included
+
+ $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal
+
+ // prompt for extension
+ $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('call-fwd-no-ans'));
+ $ext->add($id, $c, '', new ext_playback('please-enter-your&extension'));
+ $ext->add($id, $c, '', new ext_read('fromext', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_setvar('fromext', '${IF($["foo${fromext}"="foo"]?${CALLERID(number)}:${fromext})}'));
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, 'startread', new ext_playback('ent-target-attendant'));
+ $ext->add($id, $c, '', new ext_read('toext', 'then-press-pound'));
+ $ext->add($id, $c, '', new ext_gotoif('$["foo${toext}"="foo"]', 'startread'));
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, '', new ext_setvar('DB(CFU/${fromext})', '${toext}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-no-ans&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('is-set-to'));
+ $ext->add($id, $c, '', new ext_saydigits('${toext}'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+
+ // assume this extension and forward to number after the feature code
+ $clen = strlen($c);
+ $c = "_$c.";
+ $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_setvar('DB(CFU/${CALLERID(number)})', '${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-no-ans&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${CALLERID(number)}'));
+ $ext->add($id, $c, '', new ext_playback('is-set-to'));
+ $ext->add($id, $c, '', new ext_saydigits('${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+function callforward_cfuoff($c) {
+ global $ext;
+
+ $id = "app-cf-unavailable-off"; // The context to be included
+
+ $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal
+
+ // for this extension
+ $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_dbdel('CFU/${CALLERID(number)}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-no-ans&de-activated')); // $cmd,n,Playback(...)
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+
+ // for any extension, dial *XX<exten>
+ $clen = strlen($c);
+ $c = "_$c.";
+ $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('fromext', '${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_dbdel('CFU/${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('call-fwd-no-ans&for&extension'));
+ $ext->add($id, $c, '', new ext_saydigits('${fromext}'));
+ $ext->add($id, $c, '', new ext_playback('cancelled'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,54 @@
+<?php
+
+// Unconditional Call Forwarding
+$fcc = new featurecode('callforward', 'cfon');
+$fcc->setDescription('Call Forward All Activate');
+$fcc->setDefault('*72');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('callforward', 'cfoff');
+$fcc->setDescription('Call Forward All Deactivate');
+$fcc->setDefault('*73');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('callforward', 'cfoff_any');
+$fcc->setDescription('Call Forward All Prompting Deactivate');
+$fcc->setDefault('*74');
+$fcc->update();
+unset($fcc);
+
+// Call Forward on Busy
+$fcc = new featurecode('callforward', 'cfbon');
+$fcc->setDescription('Call Forward Busy Activate');
+$fcc->setDefault('*90');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('callforward', 'cfboff');
+$fcc->setDescription('Call Forward Busy Deactivate');
+$fcc->setDefault('*91');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('callforward', 'cfboff_any');
+$fcc->setDescription('Call Forward Busy Prompting Deactivate');
+$fcc->setDefault('*92');
+$fcc->update();
+unset($fcc);
+
+// Call Forward on No Answer/Unavailable (i.e. phone not registered)
+$fcc = new featurecode('callforward', 'cfuon');
+$fcc->setDescription('Call Forward No Answer/Unavailable Activate');
+$fcc->setDefault('*52');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('callforward', 'cfuoff');
+$fcc->setDescription('Call Forward No Answer/Unavailable Deactivate');
+$fcc->setDefault('*53');
+$fcc->update();
+unset($fcc);
+
+?>
\ No newline at end of file
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+<module>
+ <rawname>callforward</rawname>
+ <name>Call Forward</name>
+ <version>1.1</version>
+ <changelog>*1.1* First release for 2.2
+ </changelog>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <location>release//2.2/callforward-1.0.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>504e013e078300db4b0029964eccb1e0</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-callforward/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callforward/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callforward/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,20 @@
+<?php
+
+require_once('common/php-asmanager.php');
+
+// remove all Call Forward options in effect on extensions
+$astman = new AGI_AsteriskManager();
+if ($res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) {
+
+ $astman->database_deltree('CF');
+ $astman->database_deltree('CFB');
+ $astman->database_deltree('CFU');
+
+} else {
+
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+
+}
+$astman->disconnect();
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-callwaiting (2.2-1.1.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:45 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-callwaiting
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-callwaiting
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Call Waiting
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:45 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/callwaiting/
+*.sql usr/share/freepbx/modules/callwaiting/
+*.sqlite usr/share/freepbx/modules/callwaiting/
+*.html usr/share/freepbx/modules/callwaiting/
+*.xml usr/share/freepbx/modules/callwaiting/
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install callwaiting || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall callwaiting || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall callwaiting || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-callwaiting/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,61 @@
+<?php
+
+function callwaiting_get_config($engine) {
+ $modulename = 'callwaiting';
+
+ // This generates the dialplan
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) {
+ foreach($featurelist as $item) {
+ $featurename = $item['featurename'];
+ $fname = $modulename.'_'.$featurename;
+ if (function_exists($fname)) {
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->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 callwaiting_cwon($c) {
+ global $ext;
+
+ $id = "app-callwaiting-cwon"; // 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_macro('user-callerid')); // $cmd,n,Macro(user-callerid)
+ $ext->add($id, $c, '', new ext_setvar('DB(CW/${CALLERID(number)})', 'ENABLED'));
+ $ext->add($id, $c, '', new ext_playback('call-waiting&activated')); // $cmd,n,Playback(...)
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+
+function callwaiting_cwoff($c) {
+ global $ext;
+
+ $id = "app-callwaiting-cwoff"; // 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_macro('user-callerid')); // $cmd,n,Macro(user-callerid)
+ $ext->add($id, $c, '', new ext_dbdel('CW/${CALLERID(number)}'));
+ $ext->add($id, $c, '', new ext_playback('call-waiting&de-activated')); // $cmd,n,Playback(...)
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+?>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-callwaiting/functions.inc.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<?php
+
+// Register FeatureCode - Activate
+$fcc = new featurecode('callwaiting', 'cwon');
+$fcc->setDescription('Call Waiting - Activate');
+$fcc->setDefault('*70');
+$fcc->update();
+unset($fcc);
+
+// Register FeatureCode - Deactivate
+$fcc = new featurecode('callwaiting', 'cwoff');
+$fcc->setDescription('Call Waiting - Deactivate');
+$fcc->setDefault('*71');
+$fcc->update();
+unset($fcc);
+
+?>
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-callwaiting/install.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,15 @@
+<module>
+ <rawname>callwaiting</rawname>
+ <name>Call Waiting</name>
+ <version>1.1.1</version>
+ <changelog>
+ *1.1.1* Fixed typo Provdes to Provides*
+ *1.1* First release for 2.2
+ </changelog>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <description>Provides an option to turn on/off call waiting</description>
+ <location>release/2.2/callwaiting-1.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>f0544cca6ea0f0aef0214206baf12570</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-callwaiting/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-callwaiting/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-callwaiting/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,15 @@
+<?php
+
+// TODO, is this needed...?
+// is this global...? what if we include this files
+// from a function...?
+global $astman;
+
+// remove all Call Waiting options in effect on extensions
+if ($astman) {
+ $astman->database_deltree('CW');
+} else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-cidlookup (2.2-1.1.1-2) unstable; urgency=low
+
+ * Add SQLite3 support. Fixes upstream
+ http://freepbx.org/trac/ticket/1796
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 18 Feb 2007 17:44:25 +0200
+
+freepbx-module-cidlookup (2.2-1.1.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:00 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-cidlookup
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-cidlookup
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Caller ID Lookup
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:00 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/cidlookup/
+*.sql usr/share/freepbx/modules/cidlookup/
+*.sqlite usr/share/freepbx/modules/cidlookup/
+*.html usr/share/freepbx/modules/cidlookup/
+*.xml usr/share/freepbx/modules/cidlookup/
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,125 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: Add SQLite3 support. Fixes upstream http://freepbx.org/trac/ticket/1796
+
+ at DPATCH@
+diff -urNad freepbx-module-cidlookup~/install.php freepbx-module-cidlookup/install.php
+--- freepbx-module-cidlookup~/install.php 2006-06-25 19:04:35.000000000 +0300
++++ freepbx-module-cidlookup/install.php 2007-02-20 11:02:01.000000000 +0200
+@@ -1,15 +1,69 @@
+ <?php
+
+ global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++// create the tables
++$sql = "CREATE TABLE IF NOT EXISTS cidlookup (
++ cidlookup_id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ description varchar(50) NOT NULL,
++ sourcetype varchar(100) NOT NULL,
++ cache tinyint(1) NOT NULL default '0',
++ deptname varchar(30) default NULL,
++ http_host varchar(30) default NULL,
++ http_port varchar(30) default NULL,
++ http_username varchar(30) default NULL,
++ http_password varchar(30) default NULL,
++ http_path varchar(100) default NULL,
++ http_query varchar(100) default NULL,
++ mysql_host varchar(60) default NULL,
++ mysql_dbname varchar(60) default NULL,
++ mysql_query text,
++ mysql_username varchar(30) default NULL,
++ mysql_password varchar(30) default NULL
++);";
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die( "Can not create `cidlookup` table: " . $check->getMessage() . "\n");
++}
++
++
++$sql = "CREATE TABLE IF NOT EXISTS cidlookup_incoming (
++ cidlookup_id INT NOT NULL,
++ extension VARCHAR(50),
++ cidnum VARCHAR(30),
++ channel VARCHAR(30)
++);";
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die( "Can not create `cidlookup_incomming` table: " . $check->getMessage() . "\n");
++}
+
++// first update
+ $sql = "SELECT cache FROM cidlookup";
+ $check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+-if(DB::IsError($check)) {
++if (DB::IsError($check)) {
+ // add new field
+- $sql = "ALTER TABLE cidlookup ADD cache TINYINT( 1 ) NOT NULL DEFAULT 0;";
++ $sql = "ALTER TABLE cidlookup ADD cache INTEGER NOT NULL DEFAULT 0;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+- die($result->getDebugInfo());
++ die($result->getMessage());
+ }
+ }
+
++// second update
++$sql = "SELECT cidlookup from incoming;";
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ $sql = "ALTER TABLE incoming ADD cidlookup INT(2);";
++ $check = $db->query($sql);
++ if (DB::IsError($check)) {
++ die( "Can not alter `incoming` table: " . $check->getMessage() . "\n");
++ }
++}
++
++
++?>
++
+diff -urNad freepbx-module-cidlookup~/install.sql freepbx-module-cidlookup/install.sql
+--- freepbx-module-cidlookup~/install.sql 2006-06-25 17:56:59.000000000 +0300
++++ freepbx-module-cidlookup/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1,29 +0,0 @@
+-ALTER TABLE incoming ADD cidlookup INT(2);
+-
+-CREATE TABLE IF NOT EXISTS cidlookup (
+- cidlookup_id int(11) NOT NULL auto_increment,
+- description varchar(50) NOT NULL,
+- sourcetype varchar(100) NOT NULL,
+- cache tinyint(1) NOT NULL default '0',
+- deptname varchar(30) default NULL,
+- http_host varchar(30) default NULL,
+- http_port varchar(30) default NULL,
+- http_username varchar(30) default NULL,
+- http_password varchar(30) default NULL,
+- http_path varchar(100) default NULL,
+- http_query varchar(100) default NULL,
+- mysql_host varchar(60) default NULL,
+- mysql_dbname varchar(60) default NULL,
+- mysql_query text,
+- mysql_username varchar(30) default NULL,
+- mysql_password varchar(30) default NULL,
+- PRIMARY KEY (cidlookup_id)
+-);
+-
+-
+-CREATE TABLE IF NOT EXISTS cidlookup_incoming (
+- cidlookup_id INT NOT NULL,
+- extension VARCHAR(50),
+- cidnum VARCHAR(30),
+- channel VARCHAR(30)
+-);
+diff -urNad freepbx-module-cidlookup~/uninstall.sql freepbx-module-cidlookup/uninstall.sql
+--- freepbx-module-cidlookup~/uninstall.sql 2006-06-02 20:04:01.000000000 +0300
++++ freepbx-module-cidlookup/uninstall.sql 2007-02-20 11:01:50.000000000 +0200
+@@ -1,4 +1,4 @@
+-DROP TABLE cidlookup;
+-DROP TABLE cidlookup_incoming;
++DROP TABLE IF EXISTS cidlookup;
++DROP TABLE IF EXISTS cidlookup_incoming;
+
+
Property changes on: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install cidlookup || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall cidlookup || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall cidlookup || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-cidlookup/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,304 @@
+<?php /* $Id */
+//Copyright (C) 2006 WeBRainstorm S.r.l. (ask at webrainstorm.it)
+//
+//This program 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.
+//
+//This program 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.
+
+function cidlookup_hook_core($viewing_itemid, $target_menuid) {
+ // TODO: add option to avoid callerid lookup if the telco already supply a callerid name (Overwrite checkbox ? )
+ $html = '';
+ if ($target_menuid == 'did') {
+ $html = '<tr><td colspan="2"><h5>';
+ $html .= _("CID Lookup Source");
+ $html .= '<hr></h5></td></tr>';
+ $html .= '<tr>';
+ $html .= '<td><a href="#" class="info">';
+ $html .= _("Source").'<span>'._("Sources can be added in Caller Name Lookup Sources section").'.</span></a>:</td>';
+ $html .= '<td><select name="cidlookup_id">';
+ $sources = cidlookup_list();
+ $current = cidlookup_did_get($viewing_itemid);
+ foreach ($sources as $source)
+ $html .= sprintf('<option value="%d" %s>%s</option>', $source['cidlookup_id'], ($current == $source['cidlookup_id']?'selected':''), $source['description']);
+ $html .= '</select></td></tr>';
+/*
+ // Not yet fully implemented
+ $html .= '<tr>';
+ $html .= '<td><a href="#" class="info">';
+ $html .= _("Overwrite Caller Name").'<span>'._("This option let the source specified overwrite the caller name if already supplied from telco").'.</span></a>:</td>';
+ $html .= '<td><input type="checkbox" name="overwrite" value="1"></td>';
+ $html .= '</tr>';
+*/
+
+ }
+
+ return $html;
+
+}
+
+function cidlookup_hookProcess_core($viewing_itemid, $request) {
+
+ // TODO: move sql to functions cidlookup_did_(add, del, edit)
+ if (!isset($request['action']))
+ return;
+ switch ($request['action']) {
+ case 'addIncoming':
+ $results = sql(sprintf('INSERT INTO cidlookup_incoming (cidlookup_id, extension, cidnum, channel) VALUES ("%d", "%s", "%s", "%s")',
+ $request['cidlookup_id'], $request['extension'], $request['cidnum'], $request['channel']));
+ break;
+ case 'delIncoming':
+ $extarray = explode('/', $request['extdisplay'], 3);
+ $results = sql(sprintf("DELETE FROM cidlookup_incoming WHERE extension = '%s' AND cidnum = '%s' AND channel = '%s'",
+ $extarray[0], $extarray[1], $extarray[2]));
+ break;
+ case 'edtIncoming': // deleting and adding as in core module
+ $extarray = explode('/', $request['extdisplay'], 3);
+ $results = sql(sprintf("DELETE FROM cidlookup_incoming WHERE extension = '%s' AND cidnum = '%s' AND channel = '%s'",
+ $extarray[0], $extarray[1], $extarray[2]));
+ $results = sql(sprintf('INSERT INTO cidlookup_incoming (cidlookup_id, extension, cidnum, channel) VALUES ("%d", "%s", "%s", "%s")',
+ $request['cidlookup_id'], $request['extension'], $request['cidnum'], $request['channel']));
+ break;
+ }
+}
+
+
+function cidlookup_hookGet_config($engine) {
+ // TODO: integrating with direct extension <-> DID association
+ // TODO: add option to avoid callerid lookup if the telco already supply a callerid name (GosubIf)
+ global $ext; // is this the best way to pass this?
+ switch($engine) {
+ case "asterisk":
+ $pairing = cidlookup_did_list();
+ if(is_array($pairing)) {
+ foreach($pairing as $item) {
+ if ($item['cidlookup_id'] != 0) {
+
+ // Code from modules/core/functions.inc.php core_get_config inbound routes
+ $exten = $item['extension'];
+ $cidnum = $item['cidnum'];
+ $channel = $item['channel'];
+
+ $exten = (empty($exten)?"s":$exten);
+ $exten = $exten.(empty($cidnum)?"":"/".$cidnum); //if a CID num is defined, add it
+
+ if (empty($channel))
+ $context = "ext-did";
+ else
+ $context = "macro-from-zaptel-{$channel}";
+
+ $ext->splice($context, $exten, 1, new ext_gosub('1', 'cidlookup_'.$item['cidlookup_id'], 'cidlookup'));
+
+ }
+ }
+ }
+ break;
+ }
+
+}
+
+/*
+
+// Generates dialplan for cidlookup
+// We call this with retrieve_conf
+
+*/
+
+function cidlookup_get_config($engine) {
+ // TODO: discuss if mysql and http lookup should be implemented in dialplan or in an external AGI
+ global $ext; // is this the best way to pass this?
+ global $asterisk_conf;
+ switch($engine) {
+ case "asterisk":
+ $sources = cidlookup_list();
+ if(is_array($sources)) {
+ foreach($sources as $item) {
+
+ // Search for number in the cache, if found lookupcidnum and return
+ if ($item['cidlookup_id'] != 0) {
+ if ($item['cache'] == 1 && $item['sourcetype'] != 'internal') {
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_gotoif('$[${DB_EXISTS(cidname/${CALLERID(num)})} = 1]', 'cidlookup|cidlookup_return|1'));
+ }
+ }
+
+ switch($item['sourcetype']) {
+
+ case "internal":
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_lookupcidname(''));
+ break;
+
+ case "enum":
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_txtcidname('${CALLERID(num)}'));
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_setvar('CALLERID(name)', '${TXTCIDNAME}'));
+ break;
+
+ case "http":
+ if (!empty($item['http_username']) && !empty($item['http_password']))
+ $auth = sprintf('%s:%s@', $item['http_username'], $item['http_password']);
+ else
+ $auth = '';
+
+ if (!empty($item['http_port']))
+ $host = sprintf('%s:%d', $item['http_host'], $item['http_port']);
+ else
+ $host = $item['http_host'].':80';
+
+ if (substr($item['http_path'], 0, 1) == '/')
+ $path = substr($item['http_path'], 1);
+ else
+ $path = $item['http_path'];
+
+ $query = str_replace('[NUMBER]', '${CALLERID(num)}', $item['http_query']);
+ $url = sprintf('http://%s%s/%s?%s', $auth, $host, $path, $query);
+ $curl = sprintf('${CURL(%s)}', $url);
+
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_setvar('CALLERID(name)', $curl));
+ break;
+
+ case "mysql":
+ //Escaping MySQL query - thanks to http://www.asteriskgui.com/index.php?get=utilities-mysqlscape
+
+ $replacements = array (
+ '\\' => '\\\\',
+ '"' => '\\"',
+ '\'' => '\\\'',
+ ' ' => '\\ ',
+ ',' => '\\,',
+ '(' => '\\(',
+ ')' => '\\)',
+ '.' => '\\.',
+ '|' => '\\|'
+ );
+
+ $query = str_replace(array_keys($replacements), array_values($replacements), $item['mysql_query']);
+ $query = str_replace('[NUMBER]', '${CALLERID(num)}', $query);
+
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_mysql_connect('connid', $item['mysql_host'], $item['mysql_username'], $item['mysql_password'], $item['mysql_dbname']));
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_mysql_query('resultid', 'connid', $query));
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_mysql_fetch('fetchid', 'resultid', 'CALLERID(name)'));
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_mysql_clear('resultid'));
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_mysql_disconnect('connid'));
+ break;
+
+ // TODO: implement SugarCRM lookup, look at code snippet at http://nerdvittles.com/index.php?p=82
+ case "sugarcrm":
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_noop('SugarCRM not yet implemented'));
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_return(''));
+ break;
+ }
+
+ // Put numbers in the cache
+ if ($item['cidlookup_id'] != 0) {
+ if ($item['cache'] == 1 && $item['sourcetype'] != 'internal') {
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_db_put('cidname', '${CALLERID(num)}', '${CALLERID(name)}' ));
+ }
+ $ext->add('cidlookup', 'cidlookup_'.$item['cidlookup_id'], '', new ext_return(''));
+ }
+ }
+
+ $ext->add('cidlookup', 'cidlookup_return', '', new ext_lookupcidname(''));
+ $ext->add('cidlookup', 'cidlookup_return', '', new ext_return(''));
+ }
+ break;
+ }
+}
+
+
+function cidlookup_did_get($did){
+ $extarray = explode('/', $did, 3);
+ if(count($extarray) == 3) { // differentiate beetween '//' (Any did / any cid and '' empty string)
+ $sql = sprintf("SELECT cidlookup_id FROM cidlookup_incoming WHERE extension = '%s' AND cidnum = '%s' AND channel = '%s'", $extarray[0], $extarray[1], $extarray[2]);
+ $result = sql($sql, "getRow", DB_FETCHMODE_ASSOC);
+ if(is_array($result)){
+ return $result['cidlookup_id'];
+ } else
+ return null;
+ } else { // $did is an empty string (for example when adding a new did)
+ return 0;
+ }
+}
+
+function cidlookup_did_list() {
+ $results = sql("SELECT * FROM cidlookup_incoming","getAll",DB_FETCHMODE_ASSOC);
+ return is_array($results)?$results:null;
+}
+
+function cidlookup_list() {
+ // TODO: discuss department isolation of sources
+ $allowed = array(array('cidlookup_id' => 0, 'description' => _("None"), 'sourcetype' => null));
+ $results = sql("SELECT * FROM cidlookup","getAll",DB_FETCHMODE_ASSOC);
+ if(is_array($results)){
+ foreach($results as $result){
+ // check to see if we have a dept match for the current AMP User.
+ if (checkDept($result['deptname'])){
+ // return this item
+ $allowed[] = $result;
+ }
+ }
+ }
+ return isset($allowed)?$allowed:null;
+}
+
+function cidlookup_get($id){
+ $results = sql("SELECT * FROM cidlookup WHERE cidlookup_id = '$id'","getRow",DB_FETCHMODE_ASSOC);
+ return isset($results)?$results:null;
+}
+
+function cidlookup_del($id){
+ // Deleting source and its associations
+ $results = sql("DELETE FROM cidlookup WHERE cidlookup_id = '$id'","query");
+ $results = sql("DELETE FROM cidlookup_incoming WHERE cidlookup_id = '$id'","query");
+}
+
+function cidlookup_add($post){
+ if(!cidlookup_chk($post))
+ return false;
+ extract($post);
+ if (!isset($cache))
+ $cache = 0;
+ $results = sql("
+ INSERT INTO cidlookup
+ (description, sourcetype, cache, deptname, http_host, http_port, http_username, http_password, http_path, http_query, mysql_host, mysql_dbname, mysql_query, mysql_username, mysql_password)
+ VALUES
+ (\"$description\", \"$sourcetype\", \"$cache\", \"$deptname\", \"$http_host\", \"$http_port\", \"$http_username\", \"$http_password\", \"$http_path\", \"$http_query\", \"$mysql_host\", \"$mysql_dbname\", \"$mysql_query\", \"$mysql_username\", \"$mysql_password\")
+ ");
+}
+
+function cidlookup_edit($id,$post){
+ if(!cidlookup_chk($post))
+ return false;
+ extract($post);
+ if ($cache != 1)
+ $cache = 0;
+ $results = sql("
+ UPDATE cidlookup
+ SET
+ description = \"$description\",
+ deptname = \"$deptname\",
+ sourcetype = \"$sourcetype\" ,
+ cache = \"$cache\",
+ http_host = \"$http_host\",
+ http_port = \"$http_port\",
+ http_username = \"$http_username\",
+ http_password = \"$http_password\",
+ http_path = \"$http_path\",
+ http_query = \"$http_query\",
+ mysql_host = \"$mysql_host\",
+ mysql_dbname = \"$mysql_dbname\",
+ mysql_query = \"$mysql_query\",
+ mysql_username = \"$mysql_username\",
+ mysql_password = \"$mysql_password\"
+ WHERE cidlookup_id = \"$id\"");
+}
+
+// ensures post vars is valid
+function cidlookup_chk($post){
+ // TODO: Add sanity checks on $_POST
+ return true;
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES/cidlookup.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES/cidlookup.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES/cidlookup.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES/cidlookup.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/i18n/he_IL/LC_MESSAGES/cidlookup.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,190 @@
+# Hebrew version for CID Lookup FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: functions.inc.php:19
+msgid "CID Lookup Source"
+msgstr "×ק×ר ××פ×ש ××××× ×©×××"
+
+#: functions.inc.php:23
+msgid "Source"
+msgstr "×ק×ר"
+
+#: functions.inc.php:23
+msgid "Sources can be added in Caller Name Lookup Sources section"
+msgstr "×ק×ר×ת × ××ª× ×××ס××£ ×××ק ×ק×ר×ת ××פ×ש ×©× ××תקשר"
+
+#: functions.inc.php:233
+msgid "None"
+msgstr "××£ ×××"
+
+#: page.cidlookup.php:47
+msgid "Add CID Lookup Source"
+msgstr "××סף ×ק×ר ××פ×ש ××××× ×©×××"
+
+#: page.cidlookup.php:61
+msgid "CID Lookup source"
+msgstr "×ק×ר ××פ×ש ××××× ×©×××"
+
+#: page.cidlookup.php:61
+msgid "deleted"
+msgstr "× ××ק"
+
+#: page.cidlookup.php:76
+msgid "Delete CID Lookup source"
+msgstr "××ק ×ק×ר ××פ×ש ××××× ×©×××"
+
+#: page.cidlookup.php:81
+msgid "Source:"
+msgstr "×ק×ר:"
+
+#: page.cidlookup.php:81 page.cidlookup.php:92
+msgid "Add Source"
+msgstr "××סף ×ק×ר"
+
+#: page.cidlookup.php:83
+msgid ""
+"A Lookup Source let you specify a source for resolving numeric caller IDs of "
+"incoming calls, you can then link an Inbound route to a specific CID source. "
+"This way you will have more detailed CDR reports with informations taken "
+"directly from your CRM. You can also install the phonebook module to have a "
+"small number <-> name association. Pay attention, name lookup may slow down "
+"your PBX"
+msgstr "×ק×ר ××פ×ש ××פשר ×× ×צ××× ×ק×ר ×תר××× ×ספר×× ××ער×ת ××××× ×ש××× ×©× ×©×××ת × ×× ×¡×ת, ×× ×©×ª××× ×קשר × ×ª×× ×©××× × ×× ×¡×ª ××ק×ר ש××× ×ס××××. פע××× ×× ××××× ×× ××צ×ר ××××ת ש××× ×פ×ר××× ××תר ×××צע×ת × ×ª×× ×× ×× ×ק××× ×ש×ר×ת ×× CRM ש××. ××ª× ×××× ×× ××תק×× ×ת ××××× ×¡×¤×¨ ×××פ×× ×× ××× ×©×××× ×× ×©××× ×§×× ×©× ×ספר ××פ×× >-< ש×. ש×× ××, ××פ×ש ש××ת עש×× ×××× ×ת ××ר×××× ×©××!"
+
+#: page.cidlookup.php:92
+msgid "Edit Source"
+msgstr "ער×× ×ק×ר"
+
+#: page.cidlookup.php:99
+msgid "Source Description:"
+msgstr "ת×××ר ××ק×ר:"
+
+#: page.cidlookup.php:99
+msgid "Enter a description for this source."
+msgstr "××× ×¡ ת×××ר ×¢××ר ×ק×ר ××."
+
+#: page.cidlookup.php:103
+msgid "Source type:"
+msgstr "ס×× ××ק×ר:"
+
+#: page.cidlookup.php:103
+msgid ""
+"Enter the source type, you can choose beetwen:<ul><li>Internal: use astdb as "
+"lookup source, use phonebook module to populate it</li><li>ENUM: Use DNS to "
+"lookup caller names, it uses ENUM lookup zones as configured in enum.conf</"
+"li><li>HTTP: It executes an HTTP GET passing the caller number as argument "
+"to retrieve the correct name</li><li>MySQL: It queryes a MySQL database to "
+"retrieve caller name</li></ul>"
+msgstr "××× ×¡ ×ת ס×× ××ק×ר, ××ª× ×××× ××××ר ×××:<ul><li>×¤× ×××: ×שת×ש × astdb ×ת×ר ×ק×ר ×××פ×ש, ××שת×ש ×××××× ×¡×¤×¨ ×××פ×× ×× ××× ××©× ×ת ×× × ×ª×× ××</li><li>ENUM: ש×××ש × DNS ××× ××פש ש××ת ×תקשר××, פע××× ×× ×שת×שת ×××××ר ××פ×ש ENUM ××¤× ×©××××ר×× × enum.conf</li><li>HTTP: ××צע פע××ת HTTP GET ×××¢×××¨× ×ת ×ספר ××תקשר ×ת×ר ×ר×××× × ××× ×ק×× ×ת ××©× ×× ×××</li>li>MySQL: ××צע ש××××ª× ×¢× ××¡× × ×ª×× ×× ×ס×× MySQL ××× ××ש×× ×ת ×©× ××שת×ש</li></ul>"
+
+#: page.cidlookup.php:115
+msgid "Cache results:"
+msgstr "ש××ר ת×צ××ת ××××××:"
+
+#: page.cidlookup.php:115
+msgid ""
+"Decide wether or not cache the results to astDB; it will overwrite present "
+"values. It does not affect Internal source behaviour"
+msgstr "×××× ×× ×ש××ר ×× ×× ×ש××ר ×ת ×ת×צ××ת × astDB; פע××× ×× ×ª×ר×ס ער××× ×§×××××. ××× ××× × ×שפ××¢× ×¢× ××ª× ×××ת ××ק×ר×ת ××¤× ×××××"
+
+#: page.cidlookup.php:123
+msgid "HTTP"
+msgstr "HTTP"
+
+#: page.cidlookup.php:126 page.cidlookup.php:165
+msgid "Host:"
+msgstr "×©× ×××©× ××ר×:"
+
+#: page.cidlookup.php:126
+msgid "Host name or IP address"
+msgstr "×©× ×××©× ×××¨× ×× ×ת××ת IP"
+
+#: page.cidlookup.php:131
+msgid "Port:"
+msgstr "×צ×××:"
+
+#: page.cidlookup.php:131
+msgid "Port HTTP server is listening at (default 80)"
+msgstr "×צ××× (פ×ר×) ש×× ×©×¨×ª × HTTP ××××× (××ר×רת ×××× 80)"
+
+#: page.cidlookup.php:136 page.cidlookup.php:178
+msgid "Username:"
+msgstr "×©× ×שת×ש:"
+
+#: page.cidlookup.php:136
+msgid "Username to use in HTTP authentication"
+msgstr "×©× ×שת×ש ש×× ×ש ××שת×ש ×××××ת HTTP"
+
+#: page.cidlookup.php:141 page.cidlookup.php:182
+msgid "Password:"
+msgstr "ס×ס××:"
+
+#: page.cidlookup.php:141
+msgid "Password to use in HTTP authentication"
+msgstr "ס×ס×× ×©×× ×ש ××שת×ש ×××××ת HTTP"
+
+#: page.cidlookup.php:146
+msgid "Path:"
+msgstr "× ×ª××:"
+
+#: page.cidlookup.php:146
+msgid "Path of the file to GET<br/>e.g.: /cidlookup.php"
+msgstr "× ×ª×× ×ק×××¥ ש×××¢×ר ×פק××× GET<br />××××××: /cidlookup.php"
+
+#: page.cidlookup.php:151 page.cidlookup.php:173
+msgid "Query:"
+msgstr "ש×××ת×:"
+
+#: page.cidlookup.php:151
+msgid ""
+"Query string, special token '[NUMBER]' will be replaced with caller "
+"number<br/>e.g.: number=[NUMBER]&source=crm"
+msgstr "××ר××ת ×ש×××ת×. ××××§× ×××××× '[NUMBER]' ×××××£ ×¢× ×ספר ×××פ×× ×©× ××תקשר<br />××××××: number=[NUMBER]&source=crm"
+
+#: page.cidlookup.php:162
+msgid "MySQL"
+msgstr "MySQL"
+
+#: page.cidlookup.php:165
+msgid "MySQL Host"
+msgstr "×ת××ת ××××¨× ×©× MySQL"
+
+#: page.cidlookup.php:169
+msgid "Database:"
+msgstr "××¡× ×× ×ª×× ××:"
+
+#: page.cidlookup.php:169
+msgid "Database name"
+msgstr "×©× ××¡× ×× ×ª×× ××"
+
+#: page.cidlookup.php:173
+msgid ""
+"Query, special token '[NUMBER]' will be replaced with caller number<br/>e."
+"g.: SELECT name FROM phonebook WHERE number LIKE '%[NUMBER]%'"
+msgstr "ש×××ת×, ××שר ××××§× ×××××× '[NUMBER]' ×××××£ ××ספר ×××פ×× ×©× ××תקשר<br />××××××: SELECT name FROM phonebook WHERE number LIKE '%[NUMBER]%'"
+
+#: page.cidlookup.php:178
+msgid "MySQL Username"
+msgstr "×©× ×שת×ש × MySQL"
+
+#: page.cidlookup.php:182
+msgid "MySQL Password"
+msgstr "ס×ס×ת ×שת×ש × MySQL"
+
+#: page.cidlookup.php:193
+msgid "SugarCRM"
+msgstr "SugarCRM"
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,15 @@
+<?php
+
+global $db;
+
+$sql = "SELECT cache FROM cidlookup";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE cidlookup ADD cache TINYINT( 1 ) NOT NULL DEFAULT 0;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+}
+
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,29 @@
+ALTER TABLE incoming ADD cidlookup INT(2);
+
+CREATE TABLE IF NOT EXISTS cidlookup (
+ cidlookup_id int(11) NOT NULL auto_increment,
+ description varchar(50) NOT NULL,
+ sourcetype varchar(100) NOT NULL,
+ cache tinyint(1) NOT NULL default '0',
+ deptname varchar(30) default NULL,
+ http_host varchar(30) default NULL,
+ http_port varchar(30) default NULL,
+ http_username varchar(30) default NULL,
+ http_password varchar(30) default NULL,
+ http_path varchar(100) default NULL,
+ http_query varchar(100) default NULL,
+ mysql_host varchar(60) default NULL,
+ mysql_dbname varchar(60) default NULL,
+ mysql_query text,
+ mysql_username varchar(30) default NULL,
+ mysql_password varchar(30) default NULL,
+ PRIMARY KEY (cidlookup_id)
+);
+
+
+CREATE TABLE IF NOT EXISTS cidlookup_incoming (
+ cidlookup_id INT NOT NULL,
+ extension VARCHAR(50),
+ cidnum VARCHAR(30),
+ channel VARCHAR(30)
+);
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,26 @@
+<module>
+ <rawname>cidlookup</rawname>
+ <name>Caller ID Lookup</name>
+ <version>1.1.1</version>
+ <description>Allows Caller ID Lookup of incoming calls against different sources (MySQL, HTTP, ENUM, Phonebook Module)</description>
+ <type>setup</type>
+ <category>CID & Number Management</category>
+ <menuitems>
+ <cidlookup>Caller Name Lookup Sources</cidlookup>
+ </menuitems>
+ <depends>
+ <engine>asterisk 1.2</engine>
+ </depends>
+ <location>release/2.2/cidlookup-1.1.tgz</location>
+ <md5sum>069bf88bc5cb14fd9b267a7264659c09</md5sum>
+ <info>http://freepbx.org/wiki/CallerIDLookup</info>
+ <changelog>
+ *1.1.1* Add he_IL translation
+ *1.1* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ *1.0.4* Updated module.xml format
+ *1.0.3* Fixes from #999
+ *1.0.1* Added possibility to cache in astDB
+ Added lookup from cache before querying external source
+ *1.0.0* First release
+ </changelog>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/page.cidlookup.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/page.cidlookup.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/page.cidlookup.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,274 @@
+<?php /* $Id */
+//Copyright (C) 2006 WeBRainstorm S.r.l. (ask at webrainstorm.it)
+//
+//This program 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.
+//
+//This program 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.
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+
+//the item we are currently displaying
+isset($_REQUEST['itemid'])?$itemid=$_REQUEST['itemid']:$itemid='';
+
+$dispnum = "cidlookup"; //used for switch on config.php
+
+//if submitting form, update database
+if(isset($_POST['action'])) {
+ switch ($action) {
+ case "add":
+ cidlookup_add($_POST);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ cidlookup_del($itemid);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit":
+ cidlookup_edit($itemid,$_POST);
+ needreload();
+ redirect_standard('itemid');
+ break;
+ }
+}
+
+//get list of callerid lookup sources
+$cidsources = cidlookup_list();
+?>
+
+</div> <!-- end content div so we can display rnav properly-->
+
+<!-- right side menu -->
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($itemid=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add CID Lookup Source")?></a></li>
+<?php
+if (isset($cidsources)) {
+ foreach ($cidsources as $cidsource) {
+ if ($cidsource['cidlookup_id'] != 0)
+ echo "<li><a id=\"".($itemid==$cidsource['cidlookup_id'] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&itemid=".urlencode($cidsource['cidlookup_id'])."\">{$cidsource['description']}</a></li>";
+ }
+}
+?>
+</ul></div>
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>'._("CID Lookup source").' '.$itemid.' '._("deleted").'!</h3>';
+} else {
+ if ($itemid){
+ //get details for this source
+ $thisItem = cidlookup_get($itemid);
+ } else {
+ $thisItem = Array( 'description' => null, 'sourcetype' => null, 'cache' => null);
+ }
+
+ $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete';
+ $delButton = "
+ <form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST>
+ <input type=\"hidden\" name=\"display\" value=\"{$dispnum}\">
+ <input type=\"hidden\" name=\"itemid\" value=\"{$itemid}\">
+ <input type=\"hidden\" name=\"action\" value=\"delete\">
+ <input type=submit value=\""._("Delete CID Lookup source")."\">
+ </form>";
+
+?>
+
+ <h2><?php echo ($itemid ? _("Source:")." ". $itemid : _("Add Source")); ?></h2>
+
+ <p style="width: 80%"><?php echo ($itemid ? '' : _("A Lookup Source let you specify a source for resolving numeric caller IDs of incoming calls, you can then link an Inbound route to a specific CID source. This way you will have more detailed CDR reports with informations taken directly from your CRM. You can also install the phonebook module to have a small number <-> name association. Pay attention, name lookup may slow down your PBX")); ?></p>
+
+<?php if ($itemid){ echo $delButton; } ?>
+
+<form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($itemid ? 'edit' : 'add') ?>">
+ <input type="hidden" name="deptname" value="<?php echo $_SESSION["AMP_user"]->_deptname ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($itemid ? _("Edit Source") : _("Add Source")) ?><hr></h5></td></tr>
+
+<?php if ($itemid){ ?>
+ <input type="hidden" name="itemid" value="<?php echo $itemid; ?>">
+<?php }?>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Source Description:")?><span><?php echo _("Enter a description for this source.")?></span></a></td>
+ <td><input type="text" name="description" value="<?php echo (isset($thisItem['description']) ? $thisItem['description'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Source type:")?><span><?php echo _("Enter the source type, you can choose beetwen:<ul><li>Internal: use astdb as lookup source, use phonebook module to populate it</li><li>ENUM: Use DNS to lookup caller names, it uses ENUM lookup zones as configured in enum.conf</li><li>HTTP: It executes an HTTP GET passing the caller number as argument to retrieve the correct name</li><li>MySQL: It queryes a MySQL database to retrieve caller name</li></ul>")?></span></a></td>
+ <td>
+ <select id="sourcetype" name="sourcetype" onChange="javascript:displaySourceParameters(this, this.selectedIndex)">
+ <option value="internal" <?php echo ($thisItem['sourcetype'] == 'internal' ? 'selected' : '')?>>Internal</option>
+ <option value="enum" <?php echo ($thisItem['sourcetype'] == 'enum' ? 'selected' : '')?>>ENUM</option>
+ <option value="http" <?php echo ($thisItem['sourcetype'] == 'http' ? 'selected' : '')?>>HTTP</option>
+ <option value="mysql" <?php echo ($thisItem['sourcetype'] == 'mysql' ? 'selected' : '')?>>MySQL</option>
+ <option value="sugarcrm" <?php echo ($thisItem['sourcetype'] == 'sugarcrm' ? 'selected' : '')?>>SugarCRM</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Cache results:")?><span><?php echo _("Decide wether or not cache the results to astDB; it will overwrite present values. It does not affect Internal source behaviour")?></span></a></td>
+ <td><input type="checkbox" name="cache" value="1" <?php echo ($thisItem['cache'] == 1 ? 'checked' : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div id="http" style="display: none">
+ <table cellpadding="2" cellspacing="0" width="100%">
+
+ <tr><td colspan="2"><h5><?php echo _("HTTP") ?><hr></h5></div></td></tr>
+
+ <tr>
+ <td width="50%"><a href="#" class="info"><?php echo _("Host:")?><span><?php echo _("Host name or IP address")?></span></a></td>
+ <td><input type="text" name="http_host" value="<?php echo (isset($thisItem['http_host']) ? $thisItem['http_host'] : ''); ?>"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Port:")?><span><?php echo _("Port HTTP server is listening at (default 80)")?></span></a></td>
+ <td><input type="text" name="http_port" value="<?php echo (isset($thisItem['http_port']) ? $thisItem['http_port'] : ''); ?>"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Username:")?><span><?php echo _("Username to use in HTTP authentication")?></span></a></td>
+ <td><input type="text" name="http_username" value="<?php echo (isset($thisItem['http_username']) ? $thisItem['http_username'] : ''); ?>"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Password:")?><span><?php echo _("Password to use in HTTP authentication")?></span></a></td>
+ <td><input type="text" name="http_password" value="<?php echo (isset($thisItem['http_password']) ? $thisItem['http_password'] : ''); ?>"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Path:")?><span><?php echo _("Path of the file to GET<br/>e.g.: /cidlookup.php")?></span></a></td>
+ <td><input type="text" name="http_path" value="<?php echo (isset($thisItem['http_path']) ? $thisItem['http_path'] : ''); ?>"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Query:")?><span><?php echo _("Query string, special token '[NUMBER]' will be replaced with caller number<br/>e.g.: number=[NUMBER]&source=crm")?></span></a></td>
+ <td><input type="text" name="http_query" value="<?php echo (isset($thisItem['http_query']) ? $thisItem['http_query'] : ''); ?>"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div id="mysql" style="display: none">
+ <table cellpadding="2" cellspacing="0" width="100%">
+ <tr><td colspan="2"><h5><?php echo _("MySQL") ?><hr></h5></td></tr>
+
+ <tr>
+ <td width="50%"><a href="#" class="info"><?php echo _("Host:")?><span><?php echo _("MySQL Host")?></span></a></td>
+ <td><input type="text" name="mysql_host" value="<?php echo (isset($thisItem['mysql_host']) ? $thisItem['mysql_host'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Database:")?><span><?php echo _("Database name")?></span></a></td>
+ <td><input type="text" name="mysql_dbname" value="<?php echo (isset($thisItem['mysql_dbname']) ? $thisItem['mysql_dbname'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Query:")?><span><?php echo _("Query, special token '[NUMBER]' will be replaced with caller number<br/>e.g.: SELECT name FROM phonebook WHERE number LIKE '%[NUMBER]%'")?></span></a></td>
+ <td><input type="text" name="mysql_query" value="<?php echo (isset($thisItem['mysql_query']) ? $thisItem['mysql_query'] : ''); ?>"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Username:")?><span><?php echo _("MySQL Username")?></span></a></td>
+ <td><input type="text" name="mysql_username" value="<?php echo (isset($thisItem['mysql_username']) ? $thisItem['mysql_username'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Password:")?><span><?php echo _("MySQL Password")?></span></a></td>
+ <td><input type="text" name="mysql_password" value="<?php echo (isset($thisItem['mysql_password']) ? $thisItem['mysql_password'] : ''); ?>"></td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div id="sugarcrm" style="display: none">
+ <table cellpadding="2" cellspacing="0" width="100%">
+ <tr><td colspan="2"><h5><?php echo _("SugarCRM") ?><hr></h5></td></tr>
+ <tr><td colspan="2">Not yet implemented</td></tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+
+
+<script language="javascript">
+<!--
+
+/* TODO: improve client side checking for different values of sourcetype */
+
+var theForm = document.edit;
+theForm.description.focus();
+
+displaySourceParameters(document.getElementById('sourcetype'), document.getElementById('sourcetype').selectedIndex);
+
+function edit_onsubmit() {
+
+ defaultEmptyOK = false;
+ if (!isAlphanumeric(theForm.description.value))
+ return warnInvalid(theForm.description, "Please enter a valid Description");
+
+ if (theForm.sourcetype.value == 'http') {
+ if (isEmpty(theForm.http_host.value))
+ return warnInvalid(theForm.http_host, "Please enter a valid HTTP Host name");
+ }
+
+ if (theForm.sourcetype.value == 'mysql') {
+ if (isEmpty(theForm.mysql_host.value))
+ return warnInvalid(theForm.mysql_host, "Please enter a valid MySQL Host name");
+
+ if (isEmpty(theForm.mysql_dbname.value))
+ return warnInvalid(theForm.mysql_dbname, "Please enter a valid MySQL Database name");
+
+ if (isEmpty(theForm.mysql_query.value))
+ return warnInvalid(theForm.mysql_query, "Please enter a valid MySQL Query string");
+
+ if (isEmpty(theForm.mysql_username.value))
+ return warnInvalid(theForm.mysql_username, "Please enter a valid MySQL Username");
+
+ }
+
+ return true;
+}
+
+function displaySourceParameters(sourcetypeSelect, key) {
+ if (sourcetypeSelect.options[key].value == 'http') {
+ document.getElementById('http').style.display = '';
+ document.getElementById('mysql').style.display = 'none';
+ document.getElementById('sugarcrm').style.display = 'none';
+ } else if (sourcetypeSelect.options[key].value == 'mysql') {
+ document.getElementById('http').style.display = 'none';
+ document.getElementById('mysql').style.display = '';
+ document.getElementById('sugarcrm').style.display = 'none';
+ } else if (sourcetypeSelect.options[key].value == 'sugarcrm') {
+ document.getElementById('http').style.display = 'none';
+ document.getElementById('mysql').style.display = 'none';
+ document.getElementById('sugarcrm').style.display = '';
+ } else {
+ document.getElementById('http').style.display = 'none';
+ document.getElementById('mysql').style.display = 'none';
+ document.getElementById('sugarcrm').style.display = 'none';
+ }
+}
+-->
+</script>
+
+
+ </form>
+<?php
+} //end if action == delete
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+<?php
+
+needreload();
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-cidlookup/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-cidlookup/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-cidlookup/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,4 @@
+DROP TABLE cidlookup;
+DROP TABLE cidlookup_incoming;
+
+
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-conferences (2.2-1.2-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:35 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-conferences
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-conferences
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Conferences
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:35 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/conferences/
+*.sql usr/share/freepbx/modules/conferences/
+*.sqlite usr/share/freepbx/modules/conferences/
+*.html usr/share/freepbx/modules/conferences/
+*.xml usr/share/freepbx/modules/conferences/
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install conferences || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall conferences || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall conferences || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-conferences/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,152 @@
+<?php /* $Id: functions.inc.php 3617 2007-01-23 06:49:08Z naftali5 $ */
+
+// extend extensions class.
+// This example is about as simple as it gets
+class conferences_conf {
+ // return the filename to write
+ function get_filename() {
+ return "meetme_additional.conf";
+ }
+ function addMeetme($room, $pin) {
+ $this->_meetmes[$room] = $pin;
+ }
+ // return the output that goes in the file
+ function generateConf() {
+ $output = "";
+ if (isset($this->_meetmes) && is_array($this->_meetmes)) {
+ foreach (array_keys($this->_meetmes) as $meetme) {
+ $output .= 'conf => '.$meetme."|".$this->_meetmes[$meetme]."\n";
+ }
+ }
+ return $output;
+ }
+}
+
+// returns a associative arrays with keys 'destination' and 'description'
+function conferences_destinations() {
+ //get the list of meetmes
+ $results = conferences_list();
+
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $extens[] = array('destination' => 'ext-meetme,'.$result['0'].',1', 'description' => $result['1']." <".$result['0'].">");
+ }
+ return $extens;
+ } else {
+ return null;
+ }
+}
+
+
+/* Generates dialplan for conferences
+ We call this with retrieve_conf
+*/
+function conferences_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+ global $conferences_conf;
+ switch($engine) {
+ case "asterisk":
+ $ext->addInclude('from-internal-additional','ext-meetme');
+ $contextname = 'ext-meetme';
+ if(is_array($conflist = conferences_list())) {
+
+ // Start the conference
+ $ext->add($contextname, 'STARTMEETME', '', new ext_meetme('${MEETME_ROOMNUM}','${MEETME_OPTS}','${PIN}'));
+ $ext->add($contextname, 'STARTMEETME', '', new ext_hangup(''));
+
+ // hangup for whole context
+ $ext->add($contextname, 'h', '', new ext_hangup(''));
+
+ foreach($conflist as $item) {
+ $room = conferences_get(ltrim($item['0']));
+
+ $roomnum = ltrim($item['0']);
+ $roomoptions = $room['options'];
+ $roomuserpin = $room['userpin'];
+ $roomadminpin = $room['adminpin'];
+ $roomjoinmsg = (isset($room['joinmsg'])?$room['joinmsg']:'');
+
+ // entry point
+ $ext->add($contextname, $roomnum, '', new ext_setvar('MEETME_ROOMNUM',$roomnum));
+ $ext->add($contextname, $roomnum, '', new ext_gotoif('$["${DIALSTATUS}" = "ANSWER"]',($roomuserpin == '' && $roomadminpin == '' ? 'USER' : 'READPIN')));
+ $ext->add($contextname, $roomnum, '', new ext_answer(''));
+ $ext->add($contextname, $roomnum, '', new ext_wait(1));
+
+ // Deal with PINs -- if exist
+ if ($roomuserpin != '' || $roomadminpin != '') {
+ $ext->add($contextname, $roomnum, '', new ext_setvar('PINCOUNT','0'));
+ $ext->add($contextname, $roomnum, 'READPIN', new ext_read('PIN','enter-conf-pin-number'));
+
+ // userpin -- must do always, otherwise if there is just an adminpin
+ // there would be no way to get to the conference !
+ $ext->add($contextname, $roomnum, '', new ext_gotoif('$[x${PIN} = x'.$roomuserpin.']','USER'));
+
+ // admin pin -- exists
+ if ($roomadminpin != '') {
+ $ext->add($contextname, $roomnum, '', new ext_gotoif('$[x${PIN} = x'.$roomadminpin.']','ADMIN'));
+ }
+
+ // pin invalid
+ $ext->add($contextname, $roomnum, '', new ext_setvar('PINCOUNT','$[${PINCOUNT}+1]'));
+ $ext->add($contextname, $roomnum, '', new ext_gotoif('$[${PINCOUNT}>3]', "h"));
+ $ext->add($contextname, $roomnum, '', new ext_playback('conf-invalidpin'));
+ $ext->add($contextname, $roomnum, '', new ext_goto('READPIN'));
+
+ // admin mode -- only valid if there is an admin pin
+ if ($roomadminpin != '') {
+ $ext->add($contextname, $roomnum, 'ADMIN', new ext_setvar('MEETME_OPTS','aA'.$roomoptions));
+ if ($roomjoinmsg != '') { // play joining message if one defined
+ $ext->add($contextname, $roomnum, '', new ext_playback($roomjoinmsg));
+ }
+ $ext->add($contextname, $roomnum, '', new ext_goto('STARTMEETME,1'));
+ }
+ }
+
+ // user mode
+ $ext->add($contextname, $roomnum, 'USER', new ext_setvar('MEETME_OPTS',$roomoptions));
+ if ($roomjoinmsg != '') { // play joining message if one defined
+ $ext->add($contextname, $roomnum, '', new ext_playback($roomjoinmsg));
+ }
+ $ext->add($contextname, $roomnum, '', new ext_goto('STARTMEETME,1'));
+
+ // add meetme config
+ $conferences_conf->addMeetme($room['exten'],$room['userpin']);
+ }
+ }
+
+ break;
+ }
+}
+
+//get the existing meetme extensions
+function conferences_list() {
+ $results = sql("SELECT exten,description FROM meetme ORDER BY exten","getAll",DB_FETCHMODE_ASSOC);
+ foreach($results as $result){
+ // check to see if we are in-range for the current AMP User.
+ if (isset($result['exten']) && checkRange($result['exten'])){
+ // return this item's dialplan destination, and the description
+ $extens[] = array($result['exten'],$result['description']);
+ }
+ }
+ if (isset($extens)) {
+ return $extens;
+ } else {
+ return null;
+ }
+}
+
+function conferences_get($account){
+ //get all the variables for the meetme
+ $results = sql("SELECT exten,options,userpin,adminpin,description,joinmsg FROM meetme WHERE exten = '$account'","getRow",DB_FETCHMODE_ASSOC);
+ return $results;
+}
+
+function conferences_del($account){
+ $results = sql("DELETE FROM meetme WHERE exten = \"$account\"","query");
+}
+
+function conferences_add($account,$name,$userpin,$adminpin,$options,$joinmsg=null){
+ $results = sql("INSERT INTO meetme (exten,description,userpin,adminpin,options,joinmsg) values (\"$account\",\"$name\",\"$userpin\",\"$adminpin\",\"$options\",\"$joinmsg\")");
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES/conferences.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES/conferences.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES/conferences.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES/conferences.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/i18n/he_IL/LC_MESSAGES/conferences.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,171 @@
+# Hebrew version for Asterisk Conferences FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.conferences.php:22
+msgid "Warning! Extension"
+msgstr "×××ר×! ש××××"
+
+#: page.conferences.php:22
+msgid "is not allowed for your account."
+msgstr "××× × ××רש×ת ×¢××ר ××ש××× ×©××."
+
+#: page.conferences.php:53 page.conferences.php:84 page.conferences.php:91
+msgid "Add Conference"
+msgstr "××סף ××¢×××"
+
+#: page.conferences.php:67
+msgid "Conference"
+msgstr "××¢×××"
+
+#: page.conferences.php:67
+msgid "deleted"
+msgstr "× ××ק×"
+
+#: page.conferences.php:81
+msgid "Conference:"
+msgstr "××¢×××:"
+
+#: page.conferences.php:82
+msgid "Delete Conference"
+msgstr "××ק ××¢×××"
+
+#: page.conferences.php:91
+msgid "Edit Conference"
+msgstr "ער×× ××¢×××"
+
+#: page.conferences.php:96
+msgid "conference number:"
+msgstr "×ספר ××¢×××:"
+
+#: page.conferences.php:96
+msgid "Use this number to dial into the conference."
+msgstr "×שת×ש ××ספר ×× ××× ××××× ×ת×× ×××¢×××"
+
+#: page.conferences.php:101
+msgid "conference name:"
+msgstr "×©× ×××¢×××:"
+
+#: page.conferences.php:101
+msgid "Give this conference a brief name to help you identify it."
+msgstr "×ª× ×××¢××× ×× ×©× ×§×¦×¨ ש××¢××ר ×× ××××ת ××ת×."
+
+#: page.conferences.php:105
+msgid "user PIN:"
+msgstr "ס×ס×ת ×שת×ש:"
+
+#: page.conferences.php:105
+msgid ""
+"You can require callers to enter a password before they can enter this "
+"conference.<br><br>This setting is optional.<br><br>If either PIN is "
+"entered, the user will be prompted to enter a PIN."
+msgstr "××ª× ×××× ××ר×ש ש×תקשר×× ×צ×ר×× ×××× ×ס ס×ס×× ××¤× × ×©×× ×××××× ××××× ×¡ ×××¢××× ××.<br /><br />××××¨× ×× ××× ×¨×©×ת.<br /><br />×× ×××× ×¡× ×¡×ס×ת ×שת×ש ××ש×××, ××שת×ש ×ת×קש ×××××× ××× ×ס×."
+
+#: page.conferences.php:109
+msgid "admin PIN:"
+msgstr "ס×ס×ת ×× ××:"
+
+#: page.conferences.php:109
+msgid ""
+"Enter a PIN number for the admin user.<br><br>This setting is optional "
+"unless the 'leader wait' option is in use, then this PIN will identify the "
+"leader."
+msgstr "××× ×¡ ס×ס×× ×¢××ר ××שת×ש ××× ××.<br /><br />×פשר×ת ×× ××× ×¨×©×ת ××× ×× ×× ××פשר×ת '×××ª× ××× ××' ×ס××× ×ª, ××××§×¨× ××, ס×ס×× ×× ×ª××× ×ת ××× ××."
+
+#: page.conferences.php:118
+msgid "Conference Options"
+msgstr "×פשר×××ת ××¢×××"
+
+#: page.conferences.php:121 page.conferences.php:139
+msgid "join message:"
+msgstr "×××עת ×צ×רפ×ת:"
+
+#: page.conferences.php:121
+msgid ""
+"Message to be played to the caller before joining the conference.<br><br>To "
+"add additional recordings please use the \"System Recordings\" MENU to the "
+"left"
+msgstr "××××¢× ×©×ª×ש××¢ ××תקשר ××¤× × ××× ××¡× ×××¢×××.<br /><br />××× ×××ס××£ ××××¢×ת × ×ספ×ת, ×× × ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ש××¦× ×©×××."
+
+#: page.conferences.php:127
+msgid "None"
+msgstr "×××"
+
+#: page.conferences.php:139
+msgid ""
+"Message to be played to the caller before joining the conference.<br><br>You "
+"must install and enable the \"Systems Recordings\" Module to edit this option"
+msgstr "××××¢× ×©×ª×ש××¢ ××תקשר ××¤× × ××× ××¡× ×××¢×××.<br /><br />××ª× ×××× ××תק×× ×××פע×× ×ת ×××××× \"×ק×××ת ×ער×ת\" ××× ×ער×× ×פשר×ת ××ת"
+
+#: page.conferences.php:149
+msgid "leader wait:"
+msgstr "×××ª× × ××× ××:"
+
+#: page.conferences.php:149
+msgid ""
+"wait until the conference leader (admin user) arrives before starting the "
+"conference"
+msgstr "×××ª× ×¢× ×©×× ×× ×××¢××× (×שת×ש ×¢× ×¡×ס×× ×××××ת) ××××¢ ××¤× × ×©×ª××ר ×ת ×××× ×××¢×××"
+
+#: page.conferences.php:154 page.conferences.php:166 page.conferences.php:178
+#: page.conferences.php:190 page.conferences.php:202 page.conferences.php:214
+msgid "No"
+msgstr "××"
+
+#: page.conferences.php:155 page.conferences.php:167 page.conferences.php:179
+#: page.conferences.php:191 page.conferences.php:203 page.conferences.php:215
+msgid "Yes"
+msgstr "××"
+
+#: page.conferences.php:161
+msgid "quiet mode:"
+msgstr "××¦× ×©×§×:"
+
+#: page.conferences.php:161
+msgid "quiet mode (do not play enter/leave sounds)"
+msgstr "××¦× ×©×§× (×× ×ª×©×××¢ צ×××× ×× ×ס×/×צ×××)"
+
+#: page.conferences.php:173
+msgid "user count:"
+msgstr "ספ×רת ×שת×ש××:"
+
+#: page.conferences.php:173
+msgid "announce user(s) count on joining conference"
+msgstr "×××¨× ×¢× ×ספר ×× ×צ××× ×××¢××× ×××× ××× ××¡× ×××¢×××"
+
+#: page.conferences.php:185
+msgid "user join/leave:"
+msgstr "×× ×סת/×צ××ת ×שת×ש:"
+
+#: page.conferences.php:185
+msgid "announce user join/leave"
+msgstr "×××¨× ×¢× ×× ×ס×/×צ××× ×©× ×שת×ש××"
+
+#: page.conferences.php:197
+msgid "music on hold:"
+msgstr "××ס××§× ××××ª× ×:"
+
+#: page.conferences.php:197
+msgid "enable music on hold when the conference has a single caller"
+msgstr "××¤×¢× ××ס××§× ××××ª× × ××שר ×××¢××× ×ש רק ×תקשר ×××"
+
+#: page.conferences.php:209
+msgid "allow menu:"
+msgstr "×פשר תפר××:"
+
+#: page.conferences.php:209
+msgid "present menu (user or admin) when '*' is received ('send' to menu)"
+msgstr "××¦× ×ª×¤×¨×× (×שת×ש ×× ×× ××) ××שר ×××צ×× ×¢× ×××××ת ('ש××××' ×× ×תפר××)"
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,4 @@
+
+CREATE TABLE IF NOT EXISTS `meetme` ( `exten` VARCHAR( 50 ) NOT NULL , `options` VARCHAR( 15 ) , `userpin` VARCHAR( 50 ) , `adminpin` VARCHAR( 50 ) , `description` VARCHAR( 50 ) , `joinmsg` VARCHAR( 255 ) );
+
+
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,20 @@
+<module>
+ <rawname>conferences</rawname>
+ <name>Conferences</name>
+ <version>1.2</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Allow creation of conference rooms (meet-me) where multiple people can talk together.</description>
+ <changelog>
+ *1.2* Fixed raising asterisk error on empty dialstatus #1708
+ *1.1.2* Add he_IL translation
+ *1.1.1* Updated for 2.2.0RC1
+ *1.1* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <menuitems>
+ <conferences>Conferences</conferences>
+ </menuitems>
+ <location>release/2.2/conferences-1.1.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Conf</info>
+ <md5sum>e8a848d85b2388214ebb95ae7c783cfe</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/page.conferences.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/page.conferences.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/page.conferences.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,280 @@
+<?php /* $Id: page.conferences.php 3204 2006-11-27 06:30:26Z gregmac $ */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+//the extension we are currently displaying
+isset($_REQUEST['extdisplay'])?$extdisplay=$_REQUEST['extdisplay']:$extdisplay='';
+$dispnum = "conferences"; //used for switch on config.php
+
+//check if the extension is within range for this user
+if (isset($account) && !checkRange($account)){
+ echo "<script>javascript:alert('"._("Warning! Extension")." $account "._("is not allowed for your account.")."');</script>";
+} else {
+
+ //if submitting form, update database
+ switch ($action) {
+ case "add":
+ conferences_add($_REQUEST['account'],$_REQUEST['name'],$_REQUEST['userpin'],$_REQUEST['adminpin'],$_REQUEST['options'],$_REQUEST['joinmsg']);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ conferences_del($extdisplay);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit": //just delete and re-add
+ conferences_del($_REQUEST['account']);
+ conferences_add($_REQUEST['account'],$_REQUEST['name'],$_REQUEST['userpin'],$_REQUEST['adminpin'],$_REQUEST['options'],$_REQUEST['joinmsg']);
+ needreload();
+ redirect_standard('extdisplay');
+ break;
+ }
+}
+
+//get meetme rooms
+//this function needs to be available to other modules (those that use goto destinations)
+//therefore we put it in globalfunctions.php
+$meetmes = conferences_list();
+?>
+
+</div>
+
+<!-- right side menu -->
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($extdisplay=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Conference")?></a></li>
+<?php
+if (isset($meetmes)) {
+ foreach ($meetmes as $meetme) {
+ echo "<li><a id=\"".($extdisplay==$meetme[0] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&extdisplay=".urlencode($meetme[0])."\">{$meetme[0]}:{$meetme[1]}</a></li>";
+ }
+}
+?>
+</ul></div>
+
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>'._("Conference").' '.$extdisplay.' '._("deleted").'!</h3><br><br><br><br><br><br><br><br>';
+} else {
+ if ($extdisplay){
+ //get details for this meetme
+ $thisMeetme = conferences_get($extdisplay);
+ //create variables
+ extract($thisMeetme);
+ }
+
+ $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete';
+?>
+
+
+<?php if ($extdisplay){ ?>
+ <h2><?php echo _("Conference:")." ". $extdisplay; ?></h2>
+ <p><a href="<?php echo $delURL ?>"><?php echo _("Delete Conference")?> <?php echo $extdisplay; ?></a></p>
+<?php } else { ?>
+ <h2><?php echo _("Add Conference"); ?></h2>
+<?php }
+?>
+ <form autocomplete="off" name="editMM" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkConf();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edit' : 'add') ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($extdisplay ? _("Edit Conference") : _("Add Conference")) ?><hr></h5></td></tr>
+ <tr>
+<?php if ($extdisplay){ ?>
+ <input type="hidden" name="account" value="<?php echo $extdisplay; ?>">
+<?php } else { ?>
+ <td><a href="#" class="info"><?php echo _("conference number:")?><span><?php echo _("Use this number to dial into the conference.")?></span></a></td>
+ <td><input type="text" name="account" value=""></td>
+<?php } ?>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("conference name:")?><span><?php echo _("Give this conference a brief name to help you identify it.")?></span></a></td>
+ <td><input type="text" name="name" value="<?php echo (isset($description) ? $description : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("user PIN:")?><span><?php echo _("You can require callers to enter a password before they can enter this conference.<br><br>This setting is optional.<br><br>If either PIN is entered, the user will be prompted to enter a PIN.")?></span></a></td>
+ <td><input size="8" type="text" name="userpin" value="<?php echo (isset($userpin) ? $userpin : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("admin PIN:")?><span><?php echo _("Enter a PIN number for the admin user.<br><br>This setting is optional unless the 'leader wait' option is in use, then this PIN will identify the leader.")?></span></a></td>
+ <td><input size="8" type="text" name="adminpin" value="<?php echo (isset($adminpin) ? $adminpin : ''); ?>"></td>
+ </tr>
+
+ <?php
+ $options = (isset($options) ? $options : "");
+ ?>
+ <input type="hidden" name="options" value="<?php echo $options; ?>">
+
+ <tr><td colspan="2"><br><h5><?php echo _("Conference Options")?><hr></h5></td></tr>
+<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("join message:")?><span><?php echo _("Message to be played to the caller before joining the conference.<br><br>To add additional recordings please use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="joinmsg"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($joinmsg) ? $joinmsg : '');
+ echo '<option value="">'._("None");
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1];
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } else { ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("join message:")?><span><?php echo _("Message to be played to the caller before joining the conference.<br><br>You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td>
+ <td>
+ <?php
+ $default = (isset($joinmsg) ? $joinmsg : '');
+ ?>
+ <input type="hidden" name="joinmsg" value="<?php echo $default; ?>"><?php echo ($default != '' ? $default : 'None'); ?>
+ </td>
+ </tr>
+<?php } ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("leader wait:")?><span><?php echo _("wait until the conference leader (admin user) arrives before starting the conference")?></span></a></td>
+ <td>
+ <select name="opt#w">
+ <?php
+ $optselect = strpos($options, "w");
+ echo '<option value=""' . ($optselect === false ? ' SELECTED' : '') . '>'._("No") . '</option>';
+ echo '<option value="w"'. ($optselect !== false ? ' SELECTED' : '') . '>'._("Yes"). '</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("quiet mode:")?><span><?php echo _("quiet mode (do not play enter/leave sounds)")?></span></a></td>
+ <td>
+ <select name="opt#q">
+ <?php
+ $optselect = strpos($options, "q");
+ echo '<option value=""' . ($optselect === false ? ' SELECTED' : '') . '>'._("No") . '</option>';
+ echo '<option value="q"'. ($optselect !== false ? ' SELECTED' : '') . '>'._("Yes"). '</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("user count:")?><span><?php echo _("announce user(s) count on joining conference")?></span></a></td>
+ <td>
+ <select name="opt#c">
+ <?php
+ $optselect = strpos($options, "c");
+ echo '<option value=""' . ($optselect === false ? ' SELECTED' : '') . '>'._("No") . '</option>';
+ echo '<option value="c"'. ($optselect !== false ? ' SELECTED' : '') . '>'._("Yes"). '</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("user join/leave:")?><span><?php echo _("announce user join/leave")?></span></a></td>
+ <td>
+ <select name="opt#i">
+ <?php
+ $optselect = strpos($options, "i");
+ echo '<option value=""' . ($optselect === false ? ' SELECTED' : '') . '>'._("No") . '</option>';
+ echo '<option value="i"'. ($optselect !== false ? ' SELECTED' : '') . '>'._("Yes"). '</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("music on hold:")?><span><?php echo _("enable music on hold when the conference has a single caller")?></span></a></td>
+ <td>
+ <select name="opt#M">
+ <?php
+ $optselect = strpos($options, "M");
+ echo '<option value=""' . ($optselect === false ? ' SELECTED' : '') . '>'._("No") . '</option>';
+ echo '<option value="M"'. ($optselect !== false ? ' SELECTED' : '') . '>'._("Yes"). '</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("allow menu:")?><span><?php echo _("present menu (user or admin) when '*' is received ('send' to menu)")?></span></a></td>
+ <td>
+ <select name="opt#s">
+ <?php
+ $optselect = strpos($options, "s");
+ echo '<option value=""' . ($optselect === false ? ' SELECTED' : '') . '>'._("No") . '</option>';
+ echo '<option value="s"'. ($optselect !== false ? ' SELECTED' : '') . '>'._("Yes"). '</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+<script language="javascript">
+<!--
+
+var theForm = document.editMM;
+
+if (theForm.account.value == "") {
+ theForm.account.focus();
+} else {
+ theForm.name.focus();
+}
+
+function checkConf()
+{
+ var msgInvalidConfNumb = "<?php echo _('Please enter a valid Conference Number'); ?>";
+ var msgInvalidConfName = "<?php echo _('Please enter a valid Conference Name'); ?>";
+ var msgNeedAdminPIN = "<?php echo _('You must set an admin PIN for the Conference Leader when selecting the leader wait option'); ?>";
+
+ defaultEmptyOK = false;
+ if (!isInteger(theForm.account.value))
+ return warnInvalid(theForm.account, msgInvalidConfNumb);
+
+ if (!isAlphanumeric(theForm.name.value))
+ return warnInvalid(theForm.name, msgInvalidConfName);
+
+ // update $options
+ var theOptionsFld = theForm.options;
+ theOptionsFld.value = "";
+ for (var i = 0; i < theForm.elements.length; i++)
+ {
+ var theEle = theForm.elements[i];
+ var theEleName = theEle.name;
+ if (theEleName.indexOf("#") > 1)
+ {
+ var arr = theEleName.split("#");
+ if (arr[0] == "opt")
+ theOptionsFld.value += theEle.value;
+ }
+ }
+
+ // not possible to have a 'leader' conference with no adminpin
+ if (theForm.options.value.indexOf("w") > -1 && theForm.adminpin.value == "")
+ return warnInvalid(theForm.adminpin, msgNeedAdminPIN);
+
+ return true;
+}
+
+//-->
+</script>
+ </form>
+<?php
+} //end if action == delGRP
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-conferences/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-conferences/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-conferences/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+
+DROP TABLE IF EXISTS meetme;
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-customerdb (2.2-1.2.3-2) unstable; urgency=low
+
+ * SQLite3 support. Fixes upstream
+ http://www.freepbx.org/trac/ticket/1777
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Thu, 15 Feb 2007 12:31:53 +0200
+
+freepbx-module-customerdb (2.2-1.2.3-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:28 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-customerdb
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-customerdb
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Customer DB
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:28 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/customerdb/
+*.sql usr/share/freepbx/modules/customerdb/
+*.sqlite usr/share/freepbx/modules/customerdb/
+*.html usr/share/freepbx/modules/customerdb/
+*.xml usr/share/freepbx/modules/customerdb/
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,53 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. Fixes upstream http://www.freepbx.org/trac/ticket/1777
+
+ at DPATCH@
+diff -urNad freepbx-module-customerdb~/install.php freepbx-module-customerdb/install.php
+--- freepbx-module-customerdb~/install.php 1970-01-01 02:00:00.000000000 +0200
++++ freepbx-module-customerdb/install.php 2007-02-15 12:44:56.000000000 +0200
+@@ -0,0 +1,32 @@
++<?php
++
++global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS customerdb (
++ id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ name varchar(45) NOT NULL,
++ addr1 varchar(150) NOT NULL,
++ addr2 varchar(150) NULL,
++ city varchar(50) NOT NULL,
++ state varchar(5) NOT NULL,
++ zip varchar(12) NULL,
++ sip varchar(20) NULL,
++ did varchar(45) NULL,
++ device varchar(50) NULL,
++ ip varchar(20) NULL,
++ serial varchar(50) NULL,
++ account varchar(6) NULL,
++ email varchar(150) NULL,
++ username varchar(25) NULL,
++ password varchar(25) NULL
++);";
++
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die( "Can not create `customerdb` table: " . $check->getMessage() . "\n");
++}
++
++?>
+diff -urNad freepbx-module-customerdb~/install.sql freepbx-module-customerdb/install.sql
+--- freepbx-module-customerdb~/install.sql 2006-06-04 01:43:46.000000000 +0300
++++ freepbx-module-customerdb/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-CREATE TABLE IF NOT EXISTS customerdb (id int UNIQUE AUTO_INCREMENT, name varchar(45) not null, addr1 varchar(150) not null, addr2 varchar(150) null, city varchar(50) not null, state varchar(5) not null, zip varchar(12) null, sip varchar(20) null, did varchar(45) null, device varchar(50) null, ip varchar(20) null, serial varchar(50) null, account varchar(6) null, email varchar(150) null, username varchar(25) null, password varchar(25) null);
+diff -urNad freepbx-module-customerdb~/uninstall.sql freepbx-module-customerdb/uninstall.sql
+--- freepbx-module-customerdb~/uninstall.sql 2006-06-04 01:43:46.000000000 +0300
++++ freepbx-module-customerdb/uninstall.sql 2007-02-15 12:44:12.000000000 +0200
+@@ -1 +1 @@
+-DROP TABLE customerdb;
++DROP TABLE IF EXISTS customerdb;
Property changes on: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install customerdb || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall customerdb || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall customerdb || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-customerdb/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,73 @@
+<?php
+
+function customerdb_list(){
+ $sql = "SELECT id, name FROM customerdb";
+ $results= sql($sql, "getAll");
+
+ foreach($results as $result){
+ $customers[] = array($result[0],$result[1]);
+ }
+ return isset($customers)?$customers:null;
+}
+
+function customerdb_get($extdisplay){
+ $sql="SELECT * FROM customerdb where id=$extdisplay";
+ $results=sql($sql, "getRow", DB_FETCHMODE_ASSOC);
+ return isset($results)?$results:null;
+}
+
+function customerdb_add($name, $addr1, $addr2, $city, $state, $zip, $sip, $did, $device, $ip, $serial, $account, $email, $username, $password){
+ $sql="INSERT INTO customerdb (name, addr1, addr2, city, state, zip, sip, did, device, ip, serial, account, email, username, password) values ('$name', '$addr1', '$addr2', '$city', '$state', '$zip', '$sip', '$did', '$device', '$ip', '$serial', '$account', '$email', '$username', '$password')";
+ sql($sql);
+}
+
+function customerdb_del($extdisplay){
+ $sql="DELETE FROM customerdb where id=$extdisplay";
+ sql($sql);
+}
+
+function customerdb_edit($extdisplay, $name, $addr1, $addr2, $city, $state, $zip, $sip, $did, $device, $ip, $serial, $account, $email, $username, $password){
+ $sql="UPDATE customerdb set name='$name' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set addr1='$addr1' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set addr2='$addr2' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set city='$city' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set state='$state' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set zip='$zip' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set sip='$sip' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set did='$did' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set device='$device' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set serial='$serial' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set ip='$ip' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set account='$account' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set email='$email' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set username='$username' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE customerdb set password='$password' where id='$extdisplay'";
+ sql($sql);
+}
+
+function customerdb_getsip(){
+ $sql="SELECT DISTINCT id from sip order by id";
+ $results=sql($sql, "getAll");
+ return isset($results)?$results:null;
+}
+
+function customerdb_getdid(){
+ $sql="SELECT extension from incoming order by extension";
+ $results=sql($sql, "getAll");
+ return isset($results)?$results:null;
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES/customerdb.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES/customerdb.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES/customerdb.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES/customerdb.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/i18n/he_IL/LC_MESSAGES/customerdb.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,24 @@
+# Hebrew version for Customer DB Asterisk Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.customerdb.php:81
+msgid "Customer"
+msgstr "×ק××"
+
+#: page.customerdb.php:89
+msgid "deleted"
+msgstr "× ××ק"
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+CREATE TABLE IF NOT EXISTS customerdb (id int UNIQUE AUTO_INCREMENT, name varchar(45) not null, addr1 varchar(150) not null, addr2 varchar(150) null, city varchar(50) not null, state varchar(5) not null, zip varchar(12) null, sip varchar(20) null, did varchar(45) null, device varchar(50) null, ip varchar(20) null, serial varchar(50) null, account varchar(6) null, email varchar(150) null, username varchar(25) null, password varchar(25) null);
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<module>
+ <rawname>customerdb</rawname>
+ <name>Customer DB</name>
+ <version>1.2.3</version>
+ <type>tool</type>
+ <category>Third Party Addon</category>
+ <menuitems>
+ <customerdb>Customer DB</customerdb>
+ </menuitems>
+ <changelog>
+ *1.2.3* Add he_IL translation
+ </changelog>
+ <location>release/2.2/customerdb-1.2.2.tgz</location>
+ <md5sum>835304cb4eca3f13423357afdb47c705</md5sum>
+ <info>http://freepbx.org/wiki/CustomerDB</info>
+</module>
+
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/page.customerdb.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/page.customerdb.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/page.customerdb.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,356 @@
+<?php
+//CustomerDB 1.00 written by Keith Dowell 2006-04-07
+//Copyright (C) 2006 Keith Dowell (snowolfex at yahoo.com)
+//
+//This program 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.
+//
+//This program 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.
+
+//Set all the vars so there arent a ton of errors in the httpd error_log
+
+$display = isset($_REQUEST['display'])?$_REQUEST['display']:'customerdb';
+$type = isset($_REQUEST['type'])?$_REQUEST['type']:'tool';
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$name = isset($_REQUEST['name'])?$_REQUEST['name']:'';
+$addr1 = isset($_REQUEST['addr1'])?$_REQUEST['addr1']:'';
+$addr2 = isset($_REQUEST['addr2'])?$_REQUEST['addr2']:'';
+$city = isset($_REQUEST['city'])?$_REQUEST['city']:'';
+$state = isset($_REQUEST['state'])?$_REQUEST['state']:'LA';
+$zip = isset($_REQUEST['zip'])?$_REQUEST['zip']:'';
+$sip = isset($_REQUEST['sip'])?$_REQUEST['sip']:'';
+$did = isset($_REQUEST['did'])?$_REQUEST['did']:'';
+$device = isset($_REQUEST['device'])?$_REQUEST['device']:'';
+$ip = isset($_REQUEST['ip'])?$_REQUEST['ip']:'';
+$serial = isset($_REQUEST['serial'])?$_REQUEST['serial']:'';
+$account = isset($_REQUEST['account'])?$_REQUEST['account']:'';
+$email = isset($_REQUEST['email'])?$_REQUEST['email']:'';
+$username = isset($_REQUEST['username'])?$_REQUEST['username']:'';
+$password = isset($_REQUEST['password'])?$_REQUEST['password']:'';
+
+extract($_REQUEST);
+
+$dispnum='customerdb';
+
+if(!isset($action))
+ $action='';
+switch($action) {
+ case "add":
+ customerdb_add($name, $addr1, $addr2, $city, $state, $zip, $sip, $did, $device, $ip, $serial, $account, $email, $username, $password);
+ $name='';
+ $addr1='';
+ $addr2='';
+ $city='';
+ $state='';
+ $zip='';
+ $sip='';
+ $did='';
+ $ip='';
+ $serial='';
+ $account='';
+ $email='';
+ $device='';
+ $username='';
+ $password='';
+ //needreload();
+ //right now... not writing config files... don't need to reload
+ redirect_standard();
+ break;
+ case "del":
+ customerdb_del($extdisplay);
+ //needreload();
+ redirect_standard();
+ break;
+ case "edit":
+ customerdb_edit($extdisplay, $name, $addr1, $addr2, $city, $state, $zip, $sip, $did, $device, $ip, $serial, $account, $email, $username, $password);
+ //needreload();
+ redirect_standard('extdisplay');
+ break;
+
+}
+?>
+</div>
+<div class="rnav">
+<?php
+$customers=customerdb_list();
+drawListMenu($customers, $skip, $type, $dispnum, $extdisplay, _("Customer"));
+?>
+</div>
+
+
+<div class="content">
+<?php
+if($action=='del'){
+ echo "<br><h3>ID ".$extdisplay." "._("deleted")."!</h3><br><Br><br><br><br><br><br>";
+}
+else if(!isset($extdisplay)) {
+
+
+ echo "<h2>Add a user</h2>";
+// echo "<li><a href=\"".$_SERVER['PHP_SELF']."?$action=add\";>Add</a><br>";
+
+}
+else {
+ $delURL = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."&action=del&extdisplay=$extdisplay";
+
+ //If we have some data, load it up... this means we are editing.
+ if($extdisplay!=""){
+ $customerInfo=customerdb_get($extdisplay);
+ $name=$customerInfo['name'];
+ $addr1=$customerInfo['addr1'];
+ $addr2=$customerInfo['addr2'];
+ $city=$customerInfo['city'];
+ $state=$customerInfo['state'];
+ $zip=$customerInfo['zip'];
+ $sip=$customerInfo['sip'];
+ $did=$customerInfo['did'];
+ $device=$customerInfo['device'];
+ $serial=$customerInfo['serial'];
+ $ip=$customerInfo['ip'];
+ $account=$customerInfo['account'];
+ $email=$customerInfo['email'];
+ $username=$customerInfo['username'];
+ $password=$customerInfo['password'];
+ }
+
+
+ if(isset($customerInfo) && is_array($customerInfo)){
+ $action="edit";
+ echo "<h2> ".$extdisplay." ".$name."</h2>";
+ echo "<p><a href=\"".$delURL."\">Delete Customer</a></p>";
+ }
+ else {
+ echo "<h2>Add Customer</h2>";
+ }
+
+}
+
+echo "<form name=\"addNew\" action=\"".$_SERVER['PHP_SELF']."\" method=\"post\" onsubmit=\"return addNew_onsubmit();\">";
+echo "<input type=hidden name=type value='tool'>\n";
+echo "<input type=hidden name=extdisplay value=$extdisplay>\n";
+echo "<input type=hidden name=action value=\"";
+echo ($action=="" ? "add" : $action);
+echo "\">\n";
+echo "<input type=hidden name=display value=\"customerdb\">";
+
+echo "<table>";
+
+echo "<tr><td colspan=2><h5>";
+echo ($extdisplay ? _('Edit Customer') : _('Add Customer'));
+echo "</h5></td></tr>\n";
+
+//Name
+echo "<tr ";
+echo ($extdisplay ? '' : '');
+echo "><td>";
+echo "<a href=\"#\" class=\"info\">Name\n";
+echo "<span>Name of business or person (REQUIRED)</span></a>\n";
+echo "</td>";
+echo "<td>";
+echo "<input type=text name=\"name\" value=\"$name\">\n";
+echo "</td></tr>\n";
+
+//Address Line 1
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Address 1\n";
+echo "<span>Address Line 1 (REQUIRED)</span></a>\n";
+echo "</td><td>\n";
+echo "<input type=text name=\"addr1\" value=\"$addr1\"\n";
+echo "</td></tr>\n";
+
+//Address Line 2
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Address 2\n";
+echo "<span>Address Line 2</span></a>\n";
+echo "</td><td>\n";
+echo "<input type=text name=\"addr2\" value=\"$addr2\">\n";
+echo "</td><tr>\n";
+
+//City
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">City\n";
+echo "<span>City (REQUIRED)</span></a>\n";
+echo "</td><td>\n";
+echo "<input type=text name=\"city\" value=\"$city\">\n";
+echo "</td></tr>\n";
+
+//State
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">State\n";
+echo "<span>State (REQUIRED)</span></a>\n";
+echo "</td><td>\n";
+$state=($extdisplay ? $state : "LA");
+$states = array('AL', 'AK', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA','MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'PR', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WV', 'WI', 'WY', 'TAS', 'VIC', 'NSW', 'ACT', 'QLD', 'NT', 'SA');
+echo " <select name=\"state\">\n";
+foreach ($states as $s){
+ echo "<option value=\"$s\"";
+ if($state==$s) echo " SELECTED";
+ echo ">$s</option>\n";
+}
+echo "</select>\n";
+echo "</td></tr>\n";
+
+//Zip
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Zip/Post Code\n";
+echo "<span>Zip (REQUIRED)</span></a>\n";
+echo "</td><td>\n";
+echo "<input type=text name=\"zip\" value=\"$zip\">\n";
+echo "</td></tr>\n";
+
+//Sip
+echo "<tr><td align=left>\n";
+echo "<input type=radio checked name=\"sipbtn\" onclick=\"switchit_sip();return true;\"><a
+href=\"#\" class=\"info\">Sip Account\n";
+echo "<span>Sip Account <font size=-1>(must have this or a did tied to the account)</font></span></a>\n";
+echo "</td><td>\n";
+$sips=customerdb_getsip();
+echo " <select name=\"sip\" onchange=\"switchit_sip(); return true;\">\n";
+echo "<option value=\"\">";
+foreach ($sips as $sipid){
+ echo "<option value=\"$sipid[0]\"";
+ if($sip==$sipid[0]) echo " SELECTED";
+ echo ">$sipid[0]</option>\n";
+}
+echo "</select>\n";
+echo "</td></tr>\n";
+
+//Did
+echo "<tr><td>\n";
+echo "<input type=radio name=\"didbtn\" onclick=\"switchit_did();return true;\"><a href=\"#\" class=\"info\">DID
+Number\n";
+echo "<span>DID Number <font size=-1>(must have this or sip tied to the account)</font></span></a>\n";
+echo "</td><td>\n";
+$dids=customerdb_getdid();
+echo " <select name=\"did\" onchange=\"switchit_did(); return true;\">\n";
+echo "<option value=\"\">";
+foreach ($dids as $didnum){
+ echo "<option value=\"$didnum[0]\"";
+ if($did==$didnum[0]) echo " SELECTED";
+ echo ">$didnum[0]</option>\n";
+}
+echo "</select>\n";
+echo "</td></tr>\n";
+
+//Device
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Device\n";
+echo "<span>Device <font size=-1>(example... Linksys PAP-2, Sipura)</font></span></a>\n";
+echo "</td><td>\n";
+echo "<input type=text name=\"device\" value=\"$device\">\n";
+echo "</td></tr>\n";
+
+//Serial
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Serial\n";
+echo "<span>Serial Number</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"serial\" value=\"$serial\">\n";
+echo "</td></tr>\n";
+
+//IP
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">IP Address\n";
+echo "<span>IP Address </font></span></a>\n";
+echo "</td><td>\n";
+echo "<input type=text name=\"ip\" value=\"$ip\">\n";
+echo "</td></tr>\n";
+
+//Account
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Account\n";
+echo "<span>Account Number (internal use)</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"account\" value=\"$account\">\n";
+echo "</td></tr>\n";
+
+//Email
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Email\n";
+echo "<span>Email Address</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"email\" value=\"$email\">\n";
+echo "</td></tr>\n";
+
+//Username
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Username\n";
+echo "<span>Username for the device</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"username\" value=\"$username\">\n";
+echo "</td></tr>\n";
+
+//Password
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Password\n";
+echo "<span>Password for device</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"password\" value=\"$password\">\n";
+echo "</td></tr>\n";
+
+?>
+<tr><td></td><td><input type=submit Value="Submit Changes"></td></tr></table>
+
+<script language="javascript">
+var cform = document.addNew;
+if(cform.name.value == ""){
+ cform.name.focus();
+}
+
+if(cform.did.selectedIndex>0){
+ cform.sipbtn.checked=false;
+ cform.didbtn.checked=true;
+}
+else{
+ if(cform.sip.selectedIndex>0){
+ cform.sipbtn.checked=true;
+ cform.didbtn.checked=false;
+ }
+ else{
+ cform.sipbtn.checked=false;
+ cform.didbtn.selected=false;
+ }
+}
+
+
+function addNew_onsubmit() {
+ if(isEmpty(cform.name.value)){
+ return warnInvalid(cform.name, "Please enter a name for this customer");
+ }
+ if(isEmpty(cform.addr1.value)){
+ return warnInvalid(cform.addr1, "Please enter an address for this customer");
+ }
+ if(isEmpty(cform.city.value)){
+ return warnInvalid(cform.city, "Pleast enter a city for this customer");
+ }
+ if(isEmpty(cform.zip.value)){
+ return warnInvalid(cform.zip, "Please enter a zip for this customer");
+ }
+ if(cform.sip.selectedIndex==0 && cform.did.selectedIndex==0){
+ return warnInvalid(cform.sipbtn, "You must choose either a sip or did number for this customer.");
+ }
+}
+
+function switchit_sip() {
+ cform.sipbtn.checked=true;
+ cform.didbtn.checked=false;
+ cform.did[0].selected=true;
+}
+
+function switchit_did() {
+ cform.sipbtn.checked=false;
+ cform.didbtn.checked=true;
+ cform.sip[0].selected=true;
+}
+
+</script>
+
+
+
+</form>
Added: freepbx/modules-2.2/modules/freepbx-module-customerdb/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-customerdb/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-customerdb/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE customerdb;
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/bin/audio-email.pl
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/bin/audio-email.pl 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/bin/audio-email.pl 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,146 @@
+#!/usr/bin/perl -w
+
+# Takes a slin (.raw) file, converts it to a user specified format, and emails it to the specified address.
+#
+# Distributed under the terms of the GNU General Public License (GPL) Version 2
+# Copyright 2006 by Rob Thomas (xrobau at gmail.com)
+
+use MIME::Base64;
+use Net::SMTP;
+
+# Default paramaters
+my $to = "xrobau\@gmail.com";
+my $from = "dictate\@";
+my $subject = "Audio File has been sent";
+my $file = undef;
+my $attachment = undef;
+my $format = "ogg";
+my $ct = "audio/$format";
+
+# Care about the hostname.
+my $hostname = `/bin/hostname`;
+chomp ($hostname);
+if ($hostname =~ /localhost/) {
+ $hostname = "set.your.hostname.com";
+}
+$from .= $hostname;
+
+# Usage:
+my $usage="Usage: --file filename [--attachment filename] [--format (gsm|wav|ogg)] [--to email_address] [--from email_address] [--type content/type] [--subject \"Subject Of Email\"]";
+
+# Parse command line..
+while (my $cmd = shift @ARGV) {
+ chomp $cmd;
+ # My kingdom for a 'switch'
+ if ($cmd eq "--to") {
+ my $tmp = shift @ARGV;
+ $to = $tmp if (defined $tmp);
+ } elsif ($cmd eq "--subject") {
+ my $tmp = shift @ARGV;
+ if ($tmp =~ /\^(\")|^(\')/) {
+ # It's a quoted string
+ my $delim = $+; # $+ is 'last match', which is ' or "
+ $tmp =~ s/\Q$delim\E//; # Strip out ' or "
+ $subject = $tmp;
+ while ($tmp = shift @ARGV) {
+ if ($tmp =~ /\Q$delim\E/) {
+ $tmp =~ s/\Q$delim\E//;
+ last;
+ }
+ $subject .= $tmp;
+ }
+ } else {
+ # It's a single word
+ $subject = $tmp;
+ }
+ } elsif ($cmd eq "--type") {
+ my $tmp = shift @ARGV;
+ $ct = $tmp if (defined $tmp);
+ } elsif ($cmd eq "--from") {
+ my $tmp = shift @ARGV;
+ $from = $tmp if (defined $tmp);
+ } elsif ($cmd eq "--file") {
+ my $tmp = shift @ARGV;
+ $file = $tmp if (defined $tmp);
+ } elsif ($cmd eq "--attachment") {
+ my $tmp = shift @ARGV;
+ $attachment = $tmp if (defined $tmp);
+ } elsif ($cmd eq "--format") {
+ my $tmp = shift @ARGV;
+ $format = $tmp if (defined $tmp);
+ } else {
+ die "$cmd not understood\n$usage\n";
+ }
+
+}
+
+# OK. All our variables are set up.
+# Lets make sure that we know about a file...
+die $usage unless $file;
+# and that the file exists...
+open FILE, $file or die "Error opening $file: $!";
+# Oh, did we possibly not specify an attachment name?
+$attachment = $file unless ($attachment);
+
+my $encoded="";
+# Create the file based on the format the user has specified
+open FILE, "sox -r 8000 -w -c 1 -s $file -t $format - |";
+$buf = "";
+while (read(FILE, $buf, 60*57)) {
+ $encoded .= encode_base64($buf);
+}
+close FILE;
+
+# Now we have the file, we should ensure that there's no paths on the
+# filename..
+$attachment =~ s/\.\.//g;
+
+# And that's pretty much all the hard work done. Now we just create the
+# headers for the MIME encapsulation:
+my $boundary = '------FREEPBX_AUDIO_MAIL:';
+my $dtime = `date`;
+chomp $dtime;
+my @chrs = ('0' .. '9', 'A' .. 'Z', 'a' .. 'z');
+foreach (0..16) { $boundary .= $chrs[rand (scalar @chrs)]; }
+
+my $len = length $encoded;
+# message body..
+my $msg ="Content-Class: urn:content-classes:message
+Content-Transfer-Encoding: 7bit
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary=\"$boundary\"
+From: $from
+Date: $dtime
+Reply-To: $from
+X-Mailer: audiomail.pl
+To: $to
+Subject: $subject
+
+This is a multi-part message in MIME format.
+
+--$boundary
+Content-Type: text/plain; charset=\"us-ascii\"
+Content-Transfer-Encoding: quoted-printable
+
+An audio file has been sent to you, and is attached to this message.
+
+
+--$boundary
+Content-Type: $ct; name=\"$attachment\"
+Content-Transfer-Encoding: base64
+Content-Disposition: attachment; filename=\"$attachment.$format\"
+
+$encoded
+--$boundary--
+";
+
+#print "$msg";
+# Now we just send it.
+my $smtp = Net::SMTP-> new("127.0.0.1", Debug => 0) or
+ die "Net::SMTP::new: $!";
+$smtp-> mail($from);
+$smtp-> recipient($to);
+$smtp-> data();
+$smtp-> datasend($msg);
+$smtp-> dataend();
+
Property changes on: freepbx/modules-2.2/modules/freepbx-module-dictate/bin/audio-email.pl
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-dictate (2.2-1.1.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:31 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-dictate
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-dictate
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Dictation
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:31 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/dictate/
+*.sql usr/share/freepbx/modules/dictate/
+*.sqlite usr/share/freepbx/modules/dictate/
+*.html usr/share/freepbx/modules/dictate/
+*.xml usr/share/freepbx/modules/dictate/
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install dictate || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall dictate || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall dictate || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-dictate/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,195 @@
+<?php
+
+function dictate_get_config($engine) {
+ $modulename = 'dictate';
+
+ // This generates the dialplan
+ global $ext;
+ global $asterisk_conf;
+ switch($engine) {
+ case "asterisk":
+ if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) {
+ foreach($featurelist as $item) {
+ $featurename = $item['featurename'];
+ $fname = $modulename.'_'.$featurename;
+ if (function_exists($fname)) {
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->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 dictate_dodictate($c) {
+ global $ext;
+ global $asterisk_conf;
+
+ $id = "app-dictate-record"; // The context to be included
+
+ $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal
+ $ext->add($id, $c, '', new ext_answer(''));
+ $ext->add($id, $c, '', new ext_macro('user-callerid'));
+ $ext->add($id, $c, '', new ext_NoOp('CallerID is ${CALLERID(num)}'));
+ $ext->add($id, $c, '', new ext_setvar('DICTENABLED','${DB(AMPUSER/${CALLERID(num)}/dictate/enabled)}'));
+ $ext->add($id, $c, '', new ext_gotoif('$[$["x${DICTENABLED}"="x"]|$["x${DICTENABLED}"="xdisabled"]]','nodict', 'dictok'));
+ $ext->add($id, $c, 'nodict', new ext_playback('feature-not-avail-line'));
+ $ext->add($id, $c, '', new ext_hangup(''));
+ $ext->add($id, $c, 'dictok', new ext_dictate($asterisk_conf['astvarlibdir'].'/sounds/dictate/${CALLERID(num)}'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall'));
+}
+
+function dictate_senddictate($c) {
+ global $ext;
+ global $asterisk_conf;
+
+ $id = "app-dictate-send"; // The context to be included
+ $ext->addInclude('from-internal-additional', $id); // Add the include from from-internal
+ $ext->add($id, $c, '', new ext_answer(''));
+ $ext->add($id, $c, '', new ext_macro('user-callerid'));
+ $ext->add($id, $c, '', new ext_NoOp('CallerID is ${CALLERID(num)}'));
+ $ext->add($id, $c, '', new ext_setvar('DICTENABLED','${DB(AMPUSER/${CALLERID(num)}/dictate/enabled)}'));
+ $ext->add($id, $c, '', new ext_gotoif('$[$["x${DICTENABLED}"="x"]|$["x${DICTENABLED}"="xdisabled"]]','nodict', 'dictok'));
+ $ext->add($id, $c, 'nodict', new ext_playback('feature-not-avail-line'));
+ $ext->add($id, $c, '', new ext_hangup(''));
+ $ext->add($id, $c, 'dictok', new ext_read('DICTFILE','enter-filename-short'));
+ $ext->add($id, $c, '', new ext_setvar('DICTEMAIL','${DB(AMPUSER/${CALLERID(num)}/dictate/email)}'));
+ $ext->add($id, $c, '', new ext_setvar('DICTFMT','${DB(AMPUSER/${CALLERID(num)}/dictate/format)}'));
+ $ext->add($id, $c, '', new ext_setvar('NAME','${DB(AMPUSER/${CALLERID(num)}/cidname)}'));
+ $ext->add($id, $c, '', new ext_playback('dictation-being-processed'));
+ $ext->add($id, $c, '', new ext_system($asterisk_conf['astvarlibdir'].'/bin/audio-email.pl --file '.$asterisk_conf['astvarlibdir'].'/sounds/dictate/${CALLERID(num)}/${DICTFILE}.raw --attachment dict-${DICTFILE} --format ${DICTFMT} --to ${DICTEMAIL} --subject "Dictation from ${NAME} Attached"'));
+ $ext->add($id, $c, '', new ext_playback('dictation-sent'));
+ $ext->add($id, $c, '', new ext_macro('hangupcall'));
+}
+
+function dictate_configpageinit($pagename) {
+ global $currentcomponent;
+
+ $action = isset($_REQUEST['action'])?$_REQUEST['action']:null;
+ $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;
+ $extension = isset($_REQUEST['extension'])?$_REQUEST['extension']:null;
+ $tech_hardware = isset($_REQUEST['tech_hardware'])?$_REQUEST['tech_hardware']:null;
+
+ // We only want to hook 'users' or 'extensions' pages.
+ if ($pagename != 'users' && $pagename != 'extensions')
+ return true;
+ // On a 'new' user, 'tech_hardware' is set, and there's no extension. Hook into the page.
+ if ($tech_hardware != null || $pagename == 'users') {
+ dictation_applyhooks();
+ } elseif ($action=="add") {
+ // We don't need to display anything on an 'add', but we do need to handle returned data.
+ $currentcomponent->addprocessfunc('dictate_configprocess', 5);
+ } elseif ($extdisplay != '') {
+ // We're now viewing an extension, so we need to display _and_ process.
+ dictation_applyhooks();
+ $currentcomponent->addprocessfunc('dictate_configprocess', 5);
+ }
+}
+
+
+function dictation_applyhooks() {
+ global $currentcomponent;
+
+ $currentcomponent->addoptlistitem('dictena', 'enabled', 'Enabled');
+ $currentcomponent->addoptlistitem('dictena', 'disabled', 'Disabled');
+ $currentcomponent->setoptlistopts('dictena', 'sort', false);
+
+ $currentcomponent->addoptlistitem('dictfmt', 'ogg', 'Ogg Vorbis');
+ $currentcomponent->addoptlistitem('dictfmt', 'gsm', 'GSM');
+ $currentcomponent->addoptlistitem('dictfmt', 'wav', 'WAV');
+ $currentcomponent->setoptlistopts('dictfmt', 'sort', false);
+ // Add the 'process' function - this gets called when the page is loaded, to hook into
+ // displaying stuff on the page.
+ $currentcomponent->addguifunc('dictate_configpageload');
+
+}
+
+// This is called before the page is actually displayed, so we can use addguielem().
+function dictate_configpageload() {
+ global $currentcomponent;
+
+ // Init vars from $_REQUEST[]
+ $action = isset($_REQUEST['action'])?$_REQUEST['action']:null;
+ $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;
+
+ // Don't display this stuff it it's on a 'This xtn has been deleted' page.
+ if ($action != 'del') {
+ $dibox = dictate_get($extdisplay);
+ // Defaults are in dictate_get, if they're not set.
+ $dodict = $dibox['enabled'];
+ $email = $dibox['email'];
+ $format = $dibox['format'];
+
+ $section = _('Dictation Services');
+ $msgInvalidEmail = _('Please enter a valid Email Address');
+ $currentcomponent->addguielem($section, new gui_selectbox('dictenabled', $currentcomponent->getoptlist('dictena'), $dodict, _('Dictation Service'), '', false));
+ $currentcomponent->addguielem($section, new gui_selectbox('dictformat', $currentcomponent->getoptlist('dictfmt'), $format, _('Dictation Format'), '', false));
+ $currentcomponent->addguielem($section, new gui_textbox('dictemail', $email, _('Email Address'), _('The email address that completed dictations are sent to.'), "!isEmail()", $msgInvalidEmail, true));
+ }
+}
+
+function dictate_configprocess() {
+ //create vars from the request
+ $action = isset($_REQUEST['action'])?$_REQUEST['action']:null;
+ $ext = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;
+ $extn = isset($_REQUEST['extension'])?$_REQUEST['extension']:null;
+ $dictenabled = isset($_REQUEST['dictenabled'])?$_REQUEST['dictenabled']:null;
+ $dictemail = isset($_REQUEST['dictemail'])?$_REQUEST['dictemail']:null;
+ $dictformat = isset($_REQUEST['dictformat'])?$_REQUEST['dictformat']:null;
+
+ if ($ext==='') {
+ $extdisplay = $extn;
+ } else {
+ $extdisplay = $ext;
+ }
+ if ($action == "add" || $action == "edit") {
+ dictate_update($extdisplay, $dictenabled, $dictformat, $dictemail);
+ } elseif ($action == "del") {
+ dictate_del($extdisplay);
+ }
+}
+
+function dictate_get($xtn) {
+ global $astman;
+
+ // Retrieve the dictation configuraiton from this user from ASTDB
+ $ena = $astman->database_get("AMPUSER",$xtn."/dictate/enabled");
+ $format = $astman->database_get("AMPUSER",$xtn."/dictate/format");
+ $email = $astman->database_get("AMPUSER",$xtn."/dictate/email");
+ // If it's blank, set it to disabled
+ if (!$ena) { $ena = "disabled"; }
+ // Default format is ogg
+ if (!$format) { $foramt = "ogg"; }
+
+ return array('enabled' => $ena, 'format' => $format, 'email' => $email);
+}
+
+function dictate_update($ext, $ena, $fmt, $email) {
+ global $astman;
+
+ if ($ena === 'disabled') {
+ dictate_del($ext);
+ } else {
+ // Update the settings in ASTDB
+ $astman->database_put("AMPUSER",$ext."/dictate/enabled",$ena);
+ $astman->database_put("AMPUSER",$ext."/dictate/format",$fmt);
+ $astman->database_put("AMPUSER",$ext."/dictate/email",$email);
+ }
+}
+
+function dictate_del($ext) {
+ global $astman;
+
+ // Clean up the tree when the user is deleted
+ $astman->database_deltree("AMPUSER/$ext/dictate");
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,18 @@
+<?php
+
+// Register Feature Code - Perform Dictation
+$fcc = new featurecode('dictate', 'dodictate');
+$fcc->setDescription('Perform dictation');
+$fcc->setDefault('*34');
+$fcc->update();
+unset($fcc);
+
+// Email dictation to user
+$fcc = new featurecode('dictate', 'senddictate');
+$fcc->setDescription('Email completed dictation');
+$fcc->setDefault('*35');
+$fcc->update();
+unset($fcc);
+
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-dictate/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-dictate/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<module>
+ <rawname>dictate</rawname>
+ <name>Dictation</name>
+ <version>1.1.1</version>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <changelog>
+ *1.1.1* Fix for Dictation not appearing on User page when in Device and User mode.
+ *1.1* Fix changes not sticking when creating an extension, replace Rob-sounds with Allison-sounds.
+ *1.0.1* Replaced 'invalid extension' with 'feature not available on this line' when disabled
+ *1.0.0* Original Release
+ </changelog>
+ <description>This uses the app_dictate module of Asterisk to let users record dictate into their phones. When complete, the dictations can be emailed to an email address specified in the extension page.</description>
+ <location>release/2.2/dictate-1.1.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Dictation</info>
+ <md5sum>20d218be75eb99a5c9c8528b561a18cf</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-being-processed.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-being-processed.sln
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-being-processed.wav
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-being-processed.wav
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-sent.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-sent.sln
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-sent.wav
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/dictation-sent.wav
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/enter-filename-short.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-dictate/sounds/enter-filename-short.sln
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-disa (2.2-2.2.1-2) unstable; urgency=low
+
+ * SQLite3 support. See upstream
+ http://www.freepbx.org/trac/ticket/1784
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Thu, 15 Feb 2007 14:13:23 +0200
+
+freepbx-module-disa (2.2-2.2.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:39 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-disa
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-disa
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: DISA
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:39 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/disa/
+*.sql usr/share/freepbx/modules/disa/
+*.sqlite usr/share/freepbx/modules/disa/
+*.html usr/share/freepbx/modules/disa/
+*.xml usr/share/freepbx/modules/disa/
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,69 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. See upstream http://www.freepbx.org/trac/ticket/1784
+
+ at DPATCH@
+diff -urNad freepbx-module-disa~/install.php freepbx-module-disa/install.php
+--- freepbx-module-disa~/install.php 2006-05-31 13:16:43.000000000 +0300
++++ freepbx-module-disa/install.php 2007-02-18 13:23:32.000000000 +0200
+@@ -1,12 +1,41 @@
+ <?php
+
+ global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS manager (
++ `manager_id` INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ `name` VARCHAR( 15 ) NOT NULL ,
++ `secret` VARCHAR( 50 ) ,
++ `deny` VARCHAR( 255 ) ,
++ `permit` VARCHAR( 255 ) ,
++ `read` VARCHAR( 50 ) ,
++ `write` VARCHAR( 50 )
++)";
++
++$sql = "CREATE TABLE IF NOT EXISTS disa (
++ disa_id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ displayname VARCHAR( 50 ),
++ pin VARCHAR ( 50 ),
++ cid VARCHAR ( 50 ),
++ context VARCHAR ( 50 ),
++ digittimeout INTEGER,
++ resptimeout INTEGER,
++ needconf VARCHAR( 10 )
++);";
++
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die( "Can not create `disa` table: " . $check->getMessage() . "\n");
++}
+
+ // Manage upgrade from DISA 1.0
+ // r2.0 Add Timeouts and add wait for confirmation
+ $sql = "SELECT digittimeout FROM disa";
+ $check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+-if(DB::IsError($check)) {
++if (DB::IsError($check)) {
+ // add new fields - Digit Timeout
+ $sql = 'ALTER TABLE disa ADD COLUMN digittimeout INT DEFAULT "5"';
+ $result = $db->query($sql);
+@@ -26,5 +55,4 @@
+ }
+ }
+
+-
+ ?>
+diff -urNad freepbx-module-disa~/install.sql freepbx-module-disa/install.sql
+--- freepbx-module-disa~/install.sql 2006-05-31 13:16:43.000000000 +0300
++++ freepbx-module-disa/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-CREATE TABLE IF NOT EXISTS disa ( disa_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , displayname VARCHAR( 50 ), pin VARCHAR ( 50 ), cid VARCHAR ( 50 ), context VARCHAR ( 50 ), digittimeout INT, resptimeout INT, needconf VARCHAR( 10 ) );
+diff -urNad freepbx-module-disa~/uninstall.sql freepbx-module-disa/uninstall.sql
+--- freepbx-module-disa~/uninstall.sql 2006-05-31 13:16:43.000000000 +0300
++++ freepbx-module-disa/uninstall.sql 2007-02-18 13:23:32.000000000 +0200
+@@ -1 +1 @@
+-DROP TABLE disa;
++DROP TABLE IF EXISTS disa;
Property changes on: freepbx/modules-2.2/modules/freepbx-module-disa/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install disa || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall disa || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall disa || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-disa/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-disa/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-disa/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,125 @@
+<?php
+/* $Id */
+
+
+// This is the hook for 'destinations'
+function disa_destinations() {
+ $results = disa_list();
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $extens[] = array('destination' => 'disa,'.$result['disa_id'].',1', 'description' => $result['displayname']);
+ }
+ return $extens;
+ } else {
+ return null;
+ }
+}
+
+// This actually generates the dialplan
+function disa_get_config($engine) {
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ $disalist = disa_list();
+ if(is_array($disalist)) {
+ foreach($disalist as $item) {
+ $nopass = false;
+
+ if (isset($item['pin']) && !empty($item['pin']) && (strtolower($item['pin']) != 'no-password')) {
+ // Create the disa-$id.conf file
+ $filename = "/etc/asterisk/disa-".$item['disa_id'].".conf";
+ $fh = fopen($filename, "w+");
+ $pinarr = explode(',' , $item['pin'] );
+ foreach($pinarr as $pin) {
+
+ // Don't support remote MWI, too easy for users to break.
+ fwrite($fh, "$pin|".$item['context']."|".$item['cid']."\n");
+ }
+ fclose($fh);
+ chmod($filename, 0660);
+ } else {
+ $nopass = true;
+ }
+
+ $thisitem = disa_get(ltrim($item['disa_id']));
+ // add dialplan
+
+ if ($thisitem['needconf'] == 'CHECKED') {
+ $ext->add('disa', $item['disa_id'], '', new ext_setvar('RESCOUNT', '1'));
+ $ext->add('disa', $item['disa_id'], 'loop', new ext_gotoif('$[ ${RESCOUNT} > 5]', 'end'));
+ $ext->add('disa', $item['disa_id'], '', new ext_read('RRES', 'press-1', '1', ',1,3'));
+ $ext->add('disa', $item['disa_id'], '', new ext_setvar('RESCOUNT', '$[${RESCOUNT}+1]'));
+ $ext->add('disa', $item['disa_id'], '', new ext_gotoif('$["x${RRES}"="x"]', 'loop'));
+ }
+ $ext->add('disa', $item['disa_id'], '', new ext_setvar('TIMEOUT(digit)', $thisitem['digittimeout']));
+ $ext->add('disa', $item['disa_id'], '', new ext_setvar('TIMEOUT(response)', $thisitem['resptimeout']));
+
+ if ($nopass) {
+ $ext->add('disa', $item['disa_id'], '', new ext_disa('no-password|'.$item['context']));
+ } else {
+ $ext->add('disa', $item['disa_id'], '', new ext_playback('enter-password'));
+ $ext->add('disa', $item['disa_id'], '', new ext_disa('/etc/asterisk/disa-'.$item['disa_id'].'.conf'));
+ }
+
+ $ext->add('disa', $item['disa_id'], 'end', new ext_hangup(''));
+ }
+ }
+ break;
+ }
+}
+
+
+function disa_list() {
+ $results = sql("SELECT * FROM disa","getAll",DB_FETCHMODE_ASSOC);
+ if(is_array($results)){
+ foreach($results as $result){
+ // check to see if we have a dept match for the current AMP User.
+ if (!isset($results['deptname']) || checkDept($result['deptname'])){
+ // return this item's dialplan destination, and the description
+ $allowed[] = $result;
+ }
+ }
+ }
+ if (isset($allowed)) {
+ return $allowed;
+ } else {
+ return null;
+ }
+}
+
+function disa_get($id){
+ //get all the variables for the meetme
+ $results = sql("SELECT * FROM disa WHERE disa_id = '$id'","getRow",DB_FETCHMODE_ASSOC);
+ return $results;
+}
+
+function disa_chk($post) {
+ return true;
+}
+
+function disa_add($post) {
+ if(!disa_chk($post))
+ return null;
+ extract($post);
+ if (!isset($needconf))
+ $needconf = '';
+ if(empty($displayname)) $displayname = "unnamed";
+ $results = sql("INSERT INTO disa (displayname,pin,cid,context,resptimeout,digittimeout,needconf) values (\"".str_replace("\"", "\"\"",$displayname)."\",\"".$pin."\",\"".str_replace("\"", "\"\"", $cid)."\",\"".$context."\", \"$resptimeout\", \"$digittimeout\", \"$needconf\")");
+}
+
+function disa_del($id) {
+ $results = sql("DELETE FROM disa WHERE disa_id = \"$id\"","query");
+ unlink("/etc/asterisk/disa-{$id}.conf");
+}
+
+function disa_edit($id, $post) {
+ if (!disa_chk($post))
+ return null;
+ extract($post);
+ if (!isset($needconf))
+ $needconf = '';
+ if(empty($displayname)) $displayname = "unnamed";
+ $results = sql("UPDATE disa set displayname = \"".str_replace("\"", "\"\"",$displayname)."\", pin = \"$pin\", cid = \"".str_replace("\"", "\"\"",$cid)."\", context = \"$context\", resptimeout = \"$resptimeout\", digittimeout = \"$digittimeout\", needconf = \"$needconf\" where disa_id = \"$id\"");
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES/disa.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES/disa.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES/disa.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES/disa.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/i18n/he_IL/LC_MESSAGES/disa.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,102 @@
+# Hebrew version for DISA FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.disa.php:43 page.disa.php:63 page.disa.php:72
+msgid "Add"
+msgstr "××סף"
+
+#: page.disa.php:56
+msgid "deleted"
+msgstr "× ××ק"
+
+#: page.disa.php:65
+msgid "Delete"
+msgstr "××ק"
+
+#: page.disa.php:72
+msgid "Edit"
+msgstr "ער××"
+
+#: page.disa.php:75
+msgid "name:"
+msgstr "ש×:"
+
+#: page.disa.php:75
+msgid "Give this DISA a brief name to help you identify it."
+msgstr "×ª× ×-DISA ×× ×©× ×§×¦×¨ ש××¢××ר ×× ××××ת ××ת×."
+
+#: page.disa.php:80
+msgid "PIN"
+msgstr "ס×ס××"
+
+#: page.disa.php:80
+msgid "The user will be prompted for this number."
+msgstr "××שת×ש ×ת×קש ×××× ×ס ×ספר ××"
+
+#: page.disa.php:80
+msgid "If you wish to have multiple PIN's, seperate them with commas"
+msgstr "×× ×רצ×× × ××צ×ר ×ספר ס×ס×××ת, ××¤×¨× ×××ª× ×פס×ק××"
+
+#: page.disa.php:84
+msgid "Response Timeout"
+msgstr "××× ×××ª× × ×ת××××"
+
+#: page.disa.php:84
+msgid ""
+"The maximum amount of time it will wait before hanging up if the user has "
+"dialled an incomplete or invalid number. Default of 10 seconds"
+msgstr "×××× ××קס×××× ×©××ער×ת ת×ת×× ××¤× × × ×ת×ק ××××××× ×× ××שת×ש ×××× ×ספר ×× ×©×× ×× ×©×××. ×ר×רת ××××× ××× 10 ×©× ××ת"
+
+#: page.disa.php:88
+msgid "Digit Timeout"
+msgstr "××× ×××ª× × ×ספר×"
+
+#: page.disa.php:88
+msgid ""
+"The maximum amount of time permitted between digits when the user is typing "
+"in an extension. Default of 5"
+msgstr "×××× ××קס×××× ×××תר ××× ×¡×¤×¨×ת ×ש××שת×ש ××××× ×ש××××. ×ר×רת ××××× ××× 5"
+
+#: page.disa.php:92
+msgid "Require Confirmation"
+msgstr "×ר×ש ××ש×ר"
+
+#: page.disa.php:92
+msgid ""
+"Require Confirmation before prompting for password. Used when your PSTN "
+"connection appears to answer the call immediately"
+msgstr "×ר×ש ××ש×ר ××¤× × ×קשת ס×ס××. × ××¦× ×ש×××ש ××שר × ×¨×× ×©×ש××× × ×¢× ×ª× ××××¤× ×××××"
+
+#: page.disa.php:96
+msgid "Caller ID"
+msgstr "ש××× ×××××"
+
+#: page.disa.php:96
+msgid ""
+"(Optional) When using this DISA, the users CallerID will be set to this. "
+"Format is \"User Name\" <5551234>"
+msgstr "(רש×ת) ××שר ×שת×ש×× × DISA ××, ×ש×××ת שתצ×× × ××¨× × DISA ××צ×× ×¢× ××××× ×©××× ××××× ×©×ª×§××¢ ×××. ×פ×ר×× ××× \"User Name\" <5551234>"
+
+#: page.disa.php:100
+msgid "Context"
+msgstr "×קשר (context)"
+
+#: page.disa.php:100
+msgid ""
+"(Experts Only) Sets the context that calls will originate from. Leave this "
+"as from-internal unless you know what you're doing."
+msgstr "(××××××× ××××) ××××ר ×ת ××קשר (context( ש××× × ×ר×× ×ק×ר ×ש×××. ×ש×ר ×¢×¨× ×× ×ת×ר from-internal ××× ×× ×× ××ª× ×××ת ××××¢ ×× ××ª× ×¢×ש×."
Added: freepbx/modules-2.2/modules/freepbx-module-disa/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,30 @@
+<?php
+
+global $db;
+
+// Manage upgrade from DISA 1.0
+// r2.0 Add Timeouts and add wait for confirmation
+$sql = "SELECT digittimeout FROM disa";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new fields - Digit Timeout
+ $sql = 'ALTER TABLE disa ADD COLUMN digittimeout INT DEFAULT "5"';
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+ // Response Timeout
+ $sql = 'ALTER TABLE disa ADD COLUMN resptimeout INT DEFAULT "10"';
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+ $sql = 'ALTER TABLE disa ADD COLUMN needconf VARCHAR ( 10 ) DEFAULT ""';
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+}
+
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-disa/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+CREATE TABLE IF NOT EXISTS disa ( disa_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , displayname VARCHAR( 50 ), pin VARCHAR ( 50 ), cid VARCHAR ( 50 ), context VARCHAR ( 50 ), digittimeout INT, resptimeout INT, needconf VARCHAR( 10 ) );
Added: freepbx/modules-2.2/modules/freepbx-module-disa/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,18 @@
+<module>
+ <rawname>disa</rawname>
+ <name>DISA</name>
+ <version>2.2.1</version>
+ <type>setup</type>
+ <category>Remote Access</category>
+ <menuitems>
+ <disa>DISA</disa>
+ </menuitems>
+ <description>DISA Allows you 'Direct Inward System Access'. This gives you the ability to have an option on an IVR that gives you a dial tone, and you're able to dial out from the freePBX machine as if you were connected to a standard extension. It appears as a Destination.</description>
+ <changelog>
+ *2.2.1* Add he_IL translation
+ *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <location>release/2.2/disa-2.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-DISA</info>
+ <md5sum>252f44814486f33bb06b71485678c79f</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-disa/page.disa.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/page.disa.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/page.disa.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,149 @@
+<?php /* $Id */
+//Copyright (C) 2006 Rob Thomas <xrobau at gmail.com>
+//
+//This program is free software; you can redistribute it and/or
+//modify it under the terms of version 2 the GNU General Public
+//License as published by the Free Software Foundation.
+//
+//This program 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.
+
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$itemid = isset($_REQUEST['itemid'])?$_REQUEST['itemid']:'';
+$dispnum = "disa"; //used for switch on config.php
+
+//if submitting form, update database
+switch ($action) {
+ case "add":
+ disa_add($_POST);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ $oldItem = disa_get($itemid);
+ disa_del($itemid);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit": //just delete and re-add
+ disa_edit($itemid,$_POST);
+ needreload();
+ redirect_standard('itemid');
+ break;
+}
+
+
+$disas = disa_list();
+?>
+
+</div> <!-- end content div so we can display rnav properly-->
+
+<!-- right side menu -->
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($itemid=='' ? 'current':'std') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add")." DISA" ?></a></li>
+<?php
+if (isset($disas)) {
+ foreach ($disas as $d) {
+ echo "<li><a id=\"".($itemid==$d['disa_id'] ? 'current':'std')."\" href=\"config.php?display=".urlencode($dispnum)."&itemid=".urlencode($d['disa_id'])."\">{$d['displayname']} ({$d['disa_id']})</a></li>";
+ }
+}
+?>
+</ul></div>
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>DISA '.$oldItem["displayname"].' '._("deleted").'!</h3>';
+} else {
+ //get details for this time condition
+ $thisItem = disa_get($itemid);
+ $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete';
+?>
+
+ <h2><?php echo ($itemid ? "DISA: ".$thisItem["displayname"]." ($itemid)" : _("Add")." DISA"); ?></h2>
+<?php if ($itemid){ ?>
+ <p><a href="<?php echo $delURL ?>"><?php echo _("Delete")." DISA"?> <?php echo $thisItem["displayname"]; ?></a></p>
+<?php } ?>
+ <form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($itemid ? 'edit' : 'add') ?>">
+ <input type="hidden" name="deptname" value="<?php echo $_SESSION["AMP_user"]->_deptname ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($itemid ? _("Edit")." DISA" : _("Add")." DISA") ?><hr></h5></td></tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo "DISA "._("name:")?><span><?php echo _("Give this DISA a brief name to help you identify it.")?></span></a></td>
+
+ <td><input type="text" name="displayname" value="<?php echo htmlspecialchars(isset($thisItem['displayname']) ? $thisItem['displayname'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("PIN"); ?><span><?php echo _("The user will be prompted for this number.")." "._("If you wish to have multiple PIN's, seperate them with commas"); ?></span></a></td>
+ <td><input type="text" name="pin" value="<?php echo htmlspecialchars(isset($thisItem['pin']) ? $thisItem['pin'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Response Timeout"); ?><span><?php echo _("The maximum amount of time it will wait before hanging up if the user has dialled an incomplete or invalid number. Default of 10 seconds"); ?></span></a></td>
+ <td><input type="text" name="resptimeout" value="<?php echo htmlspecialchars(isset($thisItem['resptimeout']) ? $thisItem['resptimeout'] : '10'); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Digit Timeout"); ?><span><?php echo _("The maximum amount of time permitted between digits when the user is typing in an extension. Default of 5"); ?></span></a></td>
+ <td><input type="text" name="digittimeout" value="<?php echo htmlspecialchars(isset($thisItem['digittimeout']) ? $thisItem['digittimeout'] : '5'); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Require Confirmation"); ?><span><?php echo _("Require Confirmation before prompting for password. Used when your PSTN connection appears to answer the call immediately"); ?></span></a></td>
+ <td><input type="checkbox" name="needconf" value="CHECKED" <?php echo $thisItem['needconf'] ?> /></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Caller ID"); ?><span><?php echo _("(Optional) When using this DISA, the users CallerID will be set to this. Format is \"User Name\" <5551234>"); ?></span></a></td>
+ <td><input type="text" name="cid" value="<?php echo htmlspecialchars(isset($thisItem['cid']) ? $thisItem['cid'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Context"); ?><span><?php echo _("(Experts Only) Sets the context that calls will originate from. Leave this as from-internal unless you know what you're doing."); ?></span></a></td>
+ <td><input type="text" name="context" value="<?php echo htmlspecialchars(isset($thisItem['context']) ? $thisItem['context'] : 'from-internal'); ?>"></td>
+ </tr>
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+
+<script language="javascript">
+<!--
+
+var theForm = document.edit;
+theForm.displayname.focus();
+
+function edit_onsubmit() {
+ var msgInvalidDISAName = "<?php echo _('Please enter a valid DISA Name'); ?>";
+ var msgInvalidDISAPIN = "<?php echo _('Please enter a valid DISA PIN'); ?>";
+ var msgInvalidCID = "<?php echo _('Please enter a valid Caller ID or leave it blank'); ?>";
+ var msgInvalidContext = "<?php echo _('Context cannot be blank'); ?>";
+
+ defaultEmptyOK = false;
+ if (!isAlphanumeric(theForm.displayname.value))
+ return warnInvalid(theForm.displayname, msgInvalidDISAName);
+
+ defaultEmptyOK = true;
+ if (!isPINList(theForm.pin.value))
+ return warnInvalid(theForm.pin, msgInvalidDISAPIN);
+
+ defaultEmptyOK = true;
+ if (!isCallerID(theForm.cid.value))
+ return warnInvalid(theForm.cid, msgInvalidCID);
+
+ defaultEmptyOK = false;
+ if (isEmpty(theForm.context.value))
+ return warnInvalid(theForm.context, msgInvalidContext);
+
+ return true;
+}
+
+//-->
+</script>
+
+ </form>
+<?php
+}
+?>
+
Added: freepbx/modules-2.2/modules/freepbx-module-disa/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-disa/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-disa/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE disa;
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-donotdisturb (2.2-1.0.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:19 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-donotdisturb
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-donotdisturb
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Do-Not-Disturb (DND)
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:19 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/donotdisturb/
+*.sql usr/share/freepbx/modules/donotdisturb/
+*.sqlite usr/share/freepbx/modules/donotdisturb/
+*.html usr/share/freepbx/modules/donotdisturb/
+*.xml usr/share/freepbx/modules/donotdisturb/
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install donotdisturb || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall donotdisturb || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall donotdisturb || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,61 @@
+<?php
+
+function donotdisturb_get_config($engine) {
+ $modulename = 'donotdisturb';
+
+ // This generates the dialplan
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) {
+ foreach($featurelist as $item) {
+ $featurename = $item['featurename'];
+ $fname = $modulename.'_'.$featurename;
+ if (function_exists($fname)) {
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->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 donotdisturb_dnd_on($c) {
+ global $ext;
+
+ $id = "app-dnd-on"; // 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_macro('user-callerid')); // $cmd,n,Macro(user-callerid)
+ $ext->add($id, $c, '', new ext_setvar('DB(DND/${CALLERID(number)})', 'YES')); // $cmd,n,Set(...=YES)
+ $ext->add($id, $c, '', new ext_playback('do-not-disturb&activated')); // $cmd,n,Playback(...)
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+function donotdisturb_dnd_off($c) {
+ global $ext;
+
+ $id = "app-dnd-off"; // 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_macro('user-callerid')); // $cmd,n,Macro(user-callerid)
+ $ext->add($id, $c, '', new ext_dbdel('DND/${CALLERID(number)}')); // $cmd,n,DBdel(..)
+ $ext->add($id, $c, '', new ext_playback('do-not-disturb&de-activated')); // $cmd,n,Playback(...)
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+?>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/functions.inc.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<?php
+
+// Register FeatureCode - Activate
+$fcc = new featurecode('donotdisturb', 'dnd_on');
+$fcc->setDescription('DND Activate');
+$fcc->setDefault('*78');
+$fcc->update();
+unset($fcc);
+
+// Register FeatureCode - Deactivate
+$fcc = new featurecode('donotdisturb', 'dnd_off');
+$fcc->setDescription('DND Deactivate');
+$fcc->setDefault('*79');
+$fcc->update();
+unset($fcc);
+
+?>
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/install.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,10 @@
+<module>
+ <rawname>donotdisturb</rawname>
+ <name>Do-Not-Disturb (DND)</name>
+ <version>1.0.1</version>
+ <type>setup</type>
+ <category>Call Management</category>
+ <location>release/donotdisturb-1.0.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>f2f87161fc0ac2fde9048543c3fd4fd0</md5sum>
+</module>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/module.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-donotdisturb/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-donotdisturb/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-donotdisturb/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,18 @@
+<?php
+
+require_once('common/php-asmanager.php');
+
+// remove all D-N-D options in effect on extensions
+$astman = new AGI_AsteriskManager();
+if ($res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) {
+
+ $astman->database_deltree('DND');
+
+} else {
+
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+
+}
+$astman->disconnect();
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-featurecodeadmin (2.2-1.0.4-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:01 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-featurecodeadmin
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-featurecodeadmin
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Feature Code Admin
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:01 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/featurecodeadmin/
+*.sql usr/share/freepbx/modules/featurecodeadmin/
+*.sqlite usr/share/freepbx/modules/featurecodeadmin/
+*.html usr/share/freepbx/modules/featurecodeadmin/
+*.xml usr/share/freepbx/modules/featurecodeadmin/
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install featurecodeadmin || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall featurecodeadmin || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall featurecodeadmin || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,43 @@
+<?php
+
+function featurecodeadmin_update($req) {
+ foreach ($req as $key => $item) {
+ // Split up...
+ // 0 - action
+ // 1 - modulename
+ // 2 - featurename
+ $arr = explode("#", $key);
+ if (count($arr) == 3) {
+ $action = $arr[0];
+ $modulename = $arr[1];
+ $featurename = $arr[2];
+ $fieldvalue = $item;
+
+ // Is there a more efficient way of doing this?
+ switch ($action)
+ {
+ case "ena":
+ $fcc = new featurecode($modulename, $featurename);
+ if ($fieldvalue == 1) {
+ $fcc->setEnabled(true);
+ } else {
+ $fcc->setEnabled(false);
+ }
+ $fcc->update();
+ break;
+ case "custom":
+ $fcc = new featurecode($modulename, $featurename);
+ if ($fieldvalue == $fcc->getDefault()) {
+ $fcc->setCode(''); // using default
+ } else {
+ $fcc->setCode($fieldvalue);
+ }
+ $fcc->update();
+ break;
+ }
+ }
+ }
+
+ needreload();
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES/featurecodeadmin.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES/featurecodeadmin.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES/featurecodeadmin.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES/featurecodeadmin.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/i18n/he_IL/LC_MESSAGES/featurecodeadmin.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,44 @@
+# Hebrew version for Feature Code Admin FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.featurecodeadmin.php:36
+msgid "Feature Code Admin"
+msgstr "×× ×× ×§××× ×ת××× ×ת"
+
+#: page.featurecodeadmin.php:39
+msgid "Use"
+msgstr "×שת×ש"
+
+#: page.featurecodeadmin.php:39
+msgid "Default"
+msgstr "×ר×רת ××××"
+
+#: page.featurecodeadmin.php:40
+msgid "Feature"
+msgstr "ת××× ×"
+
+#: page.featurecodeadmin.php:40
+msgid "Status"
+msgstr "ס×××ס"
+
+#: page.featurecodeadmin.php:62 page.featurecodeadmin.php:85
+msgid "Disabled"
+msgstr "××××"
+
+#: page.featurecodeadmin.php:84
+msgid "Enabled"
+msgstr "פע××"
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,18 @@
+<module>
+ <rawname>featurecodeadmin</rawname>
+ <name>Feature Code Admin</name>
+ <version>1.0.4</version>
+ <type>setup</type>
+ <category>Basic</category>
+ <menuitems>
+ <featurecodeadmin>Feature Codes</featurecodeadmin>
+ </menuitems>
+ <changelog>
+ *1.0.4* Add support for duplicate feature codes
+ *1.0.3* Add he_IL translation
+ *1.0.2* Fix minor font/display issues
+ </changelog>
+ <location>release/2.2/featurecodeadmin-1.0.3.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-FeatureCodeAdmin</info>
+ <md5sum>e2c8211003d680c4c85070b502029ed0</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/page.featurecodeadmin.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/page.featurecodeadmin.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-featurecodeadmin/page.featurecodeadmin.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,165 @@
+<?php
+// Original Copyright (C) 2006 Niklas Larsson
+// Re-written 20060331, Rob Thomas <xrobau at gmail.com>
+//
+//This program 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.
+//
+//This program 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.
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$dispnum = "featurecodeadmin"; //used for switch on config.php
+
+//if submitting form, update database
+switch ($action) {
+ case "save":
+ featurecodeadmin_update($_REQUEST);
+ needreload();
+ break;
+}
+
+$featurecodes = featurecodes_getAllFeaturesDetailed();
+?>
+
+</div>
+
+<div class="content">
+ <form autocomplete="off" name="frmAdmin" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return frmAdmin_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="save">
+ <table>
+ <tr><td colspan="4"><h3><?php echo _("Feature Code Admin"); ?><hr></h3></td></tr>
+ <tr>
+ <td colspan="2"> </td>
+ <td align="center"><b><?php echo _("Use"); ?><br><?php echo _("Default"); ?>?</b></td>
+ <td align="center"><b><?php echo _("Feature"); ?><br><?php echo _("Status"); ?></b></td>
+ </tr>
+ <?php
+ $currentmodule = "(none)";
+ foreach($featurecodes as $item) {
+ $moduledesc = isset($item['moduledescription'])?_($item['moduledescription']):null;
+ $moduleena = ($item['moduleenabled'] == 1 ? true : false);
+
+ $featuredesc = _($item['featuredescription']);
+ $featureid = $item['modulename'] . '#' . $item['featurename'];
+ $featureena = ($item['featureenabled'] == 1 ? true : false);
+ $featurecodedefault = (isset($item['defaultcode']) ? $item['defaultcode'] : '');
+ $featurecodecustom = (isset($item['customcode']) ? $item['customcode'] : '');
+
+ if ($currentmodule != $moduledesc) {
+ $currentmodule = $moduledesc;
+ ?>
+ <tr>
+ <td colspan="4">
+ <h4>
+ <?php echo $currentmodule; ?>
+ <?php if ($moduleena == false) {?>
+ <i>(<?php echo _("Disabled"); ?>)</i>
+ <?php } ?>
+ </h4>
+ </td>
+ </tr>
+ <?php
+ }
+ ?>
+ <tr>
+ <td>
+ <?php echo $featuredesc; ?>
+ </td>
+ <td>
+ <input type="text" name="custom#<?php echo $featureid; ?>" value="<?php echo $featurecodecustom; ?>" size="4">
+ </td>
+ <td align="center">
+ <input type="checkbox" onclick="usedefault_onclick(this);" name="usedefault_<?php echo $featureid; ?>"<?php if ($featurecodecustom == '') echo "checked"; ?>>
+ <input type="hidden" name="default_<?php echo $featureid; ?>" value="<?php echo $featurecodedefault; ?>">
+ <input type="hidden" name="origcustom_<?php echo $featureid; ?>" value="<?php echo $featurecodecustom; ?>">
+ </td>
+ <td>
+ <select name="ena#<?php echo $featureid; ?>">
+ <option <?php if ($featureena == true) echo ("selected "); ?>value="1"><?php echo _("Enabled"); ?></option>
+ <option <?php if ($featureena == false) echo ("selected "); ?>value="0"><?php echo _("Disabled"); ?></option>
+ </select>
+ </td>
+ </tr>
+ <?php
+ }
+ ?>
+ <tr>
+ <td colspan="4"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+
+ <script language="javascript">
+ <!--
+
+ var theForm = document.frmAdmin;
+
+ callallusedefaults();
+
+ // call the onclick function for all the Use Default boxes
+ function callallusedefaults() {
+ for (var i=0; i<theForm.elements.length; i++) {
+ var theFld = theForm.elements[i];
+ if (theFld.name.substring(0,11) == "usedefault_") {
+ usedefault_onclick(theFld);
+ }
+ }
+ }
+
+ // disabled the custom code box if using default and also puts the default number in the box
+ function usedefault_onclick(chk) {
+ var featureid = chk.name.substring(11);
+ if (chk.checked) {
+ theForm.elements['origcustom_' + featureid].value = theForm.elements['custom#' + featureid].value;
+ theForm.elements['custom#' + featureid].value = theForm.elements['default_' + featureid].value;
+ } else {
+ theForm.elements['custom#' + featureid].value = theForm.elements['origcustom_' + featureid].value;
+ }
+ theForm.elements['custom#' + featureid].readOnly = chk.checked;
+ }
+
+ // form validation
+ function frmAdmin_onsubmit() {
+ var msgErrorMissingFC = "<?php echo _("Please enter a Feature Code or check Use Default for all Enabled Feature Codes"); ?>";
+ var msgErrorDuplicateFC = "<?php echo _("Feature Codes have been duplicated"); ?>";
+ var msgErrorProceedOK = "<?php echo _("Are you sure you wish to proceed?"); ?>";
+
+ for (var i=0; i<theForm.elements.length; i++) {
+ var theFld = theForm.elements[i];
+ if (theFld.name.substring(0,7) == "custom#") {
+ var featureid = theFld.name.substring(7);
+ // check that every non default has a custom code
+ if (!theForm.elements['usedefault_' + featureid].checked && theForm.elements['ena#' + featureid].value == 1) {
+ defaultEmptyOK = false;
+ if (!isDialDigits(theFld.value))
+ return warnInvalid(theFld, msgErrorMissingFC);
+
+ if (isDuplicated(theFld.name, theFld.value))
+ return confirm(msgErrorDuplicateFC+". "+msgErrorProceedOK);
+ }
+ }
+ }
+
+
+ return true;
+ }
+
+ function isDuplicated(firstfldname, firstfc) {
+ for (var i=0; i<theForm.elements.length; i++) {
+ var theFld = theForm.elements[i];
+ if (theFld.name.substring(0,7) == "custom#" && theFld.name != firstfldname) {
+ if (theFld.value == firstfc)
+ return true;
+ }
+ }
+ }
+
+ //-->
+ </script>
+
+ </form>
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-findmefollow (2.2-2.4.9-2) unstable; urgency=low
+
+ * SQLite3 support. Fixes upstream
+ http://freepbx.org/trac/ticket/1791
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 18 Feb 2007 11:51:49 +0200
+
+freepbx-module-findmefollow (2.2-2.4.9-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:47 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-findmefollow
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-findmefollow
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Follow Me
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:47 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/findmefollow/
+*.sql usr/share/freepbx/modules/findmefollow/
+*.sqlite usr/share/freepbx/modules/findmefollow/
+*.html usr/share/freepbx/modules/findmefollow/
+*.xml usr/share/freepbx/modules/findmefollow/
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. Fixes upstream http://freepbx.org/trac/ticket/1791
+
+ at DPATCH@
+diff -urNad freepbx-module-findmefollow~/install.sql freepbx-module-findmefollow/install.sql
+--- freepbx-module-findmefollow~/install.sql 2006-10-15 11:11:20.000000000 +0200
++++ freepbx-module-findmefollow/install.sql 2007-02-18 11:39:26.000000000 +0200
+@@ -1,3 +1,3 @@
+
+-CREATE TABLE IF NOT EXISTS `findmefollow` ( `grpnum` BIGINT( 11 ) NOT NULL , `strategy` VARCHAR( 50 ) NOT NULL , `grptime` SMALLINT NOT NULL , `grppre` VARCHAR( 100 ) NULL , `grplist` VARCHAR( 255 ) NOT NULL , `annmsg` VARCHAR( 255 ) NULL , `postdest` VARCHAR( 255 ) NULL , `dring` VARCHAR ( 50 ) NULL , remotealert VARCHAR ( 80 ), needsconf VARCHAR ( 10 ), toolate VARCHAR ( 80 ), pre_ring SMALLINT NOT NULL DEFAULT 0, PRIMARY KEY (`grpnum`) ) TYPE = MYISAM ;
++CREATE TABLE IF NOT EXISTS `findmefollow` ( `grpnum` BIGINT( 11 ) NOT NULL , `strategy` VARCHAR( 50 ) NOT NULL , `grptime` SMALLINT NOT NULL , `grppre` VARCHAR( 100 ) NULL , `grplist` VARCHAR( 255 ) NOT NULL , `annmsg` VARCHAR( 255 ) NULL , `postdest` VARCHAR( 255 ) NULL , `dring` VARCHAR ( 50 ) NULL , remotealert VARCHAR ( 80 ), needsconf VARCHAR ( 10 ), toolate VARCHAR ( 80 ), pre_ring SMALLINT NOT NULL DEFAULT 0, PRIMARY KEY (`grpnum`) );
+
Property changes on: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install findmefollow || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall findmefollow || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall findmefollow || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-findmefollow/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,334 @@
+<?php /* $Id: functions.inc.php 175 2006-10-03 19:12:39Z plindheimer $ */
+
+// The destinations this module provides
+// returns a associative arrays with keys 'destination' and 'description'
+function findmefollow_destinations() {
+ //get the list of findmefollow
+ $results = findmefollow_full_list();
+
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $thisgrp = findmefollow_get(ltrim($result['0']));
+ $extens[] = array('destination' => 'ext-findmefollow,'.ltrim($result['0']).',1', 'description' => $thisgrp['grppre'].' <'.ltrim($result['0']).'>');
+ }
+ }
+
+ return isset($extens)?$extens:null;
+}
+
+/* Generates dialplan for findmefollow
+ We call this with retrieve_conf
+*/
+function findmefollow_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+ switch($engine) {
+ case "asterisk":
+ $ext->addInclude('from-internal-additional','ext-findmefollow');
+ $ext->addInclude('from-internal-additional','fmgrps');
+ $contextname = 'ext-findmefollow';
+ $ringlist = findmefollow_full_list();
+ if (is_array($ringlist)) {
+ foreach($ringlist as $item) {
+ $grpnum = ltrim($item['0']);
+ $grp = findmefollow_get($grpnum);
+
+ $strategy = $grp['strategy'];
+ $grptime = $grp['grptime'];
+ $grplist = $grp['grplist'];
+ $postdest = $grp['postdest'];
+ $grppre = (isset($grp['grppre'])?$grp['grppre']:'');
+ $annmsg = $grp['annmsg'];
+ $dring = $grp['dring'];
+
+ $needsconf = $grp['needsconf'];
+ $remotealert = $grp['remotealert'];
+ $toolate = $grp['toolate'];
+ $ringing = $grp['ringing'];
+ $pre_ring = $grp['pre_ring'];
+
+ if($ringing == 'Ring' || empty($ringing) ) {
+ $dialopts = '${DIAL_OPTIONS}';
+ } else {
+ // We need the DIAL_OPTIONS variable
+ $sops = sql("SELECT value from globals where variable='DIAL_OPTIONS'", "getRow");
+ $dialopts = "m(${ringing})".str_replace('r', '', $sops[0]);
+ }
+
+
+ $ext->add($contextname, $grpnum, '', new ext_macro('user-callerid'));
+
+ // block voicemail until phone is answered at which point a macro should be called on the answering
+ // line to clear this flag so that subsequent transfers can occur, if already set by a the caller
+ // then don't change.
+ //
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${BLKVM_OVERRIDE}" = "foo"]', 'skipdb'));
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]', 'skipov'));
+
+ $ext->add($contextname, $grpnum, 'skipdb', new ext_setvar('__NODEST', ''));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('__BLKVM_OVERRIDE', 'BLKVM/${EXTEN}/${CHANNEL}'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('__BLKVM_BASE', '${EXTEN}'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('DB(${BLKVM_OVERRIDE})', 'TRUE'));
+
+ // Remember if NODEST was set later, but clear it in case the call is answered so that subsequent
+ // transfers work.
+ //
+ $ext->add($contextname, $grpnum, 'skipov', new ext_setvar('RRNODEST', '${NODEST}'));
+ $ext->add($contextname, $grpnum, 'skipvmblk', new ext_setvar('__NODEST', '${EXTEN}'));
+
+ // deal with group CID prefix
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${RGPREFIX}" = "foo"]', 'REPCID'));
+ $ext->add($contextname, $grpnum, '', new ext_noop('Current RGPREFIX is ${RGPREFIX}....stripping from Caller ID'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('CALLERID(name)', '${CALLERID(name):${LEN(${RGPREFIX})}}'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('RGPREFIX', ''));
+ $ext->add($contextname, $grpnum, 'REPCID', new ext_noop('CALLERID(name) is ${CALLERID(name)}'));
+ if ($grppre != '') {
+ $ext->add($contextname, $grpnum, '', new ext_setvar('RGPREFIX', $grppre));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('CALLERID(name)','${RGPREFIX}${CALLERID(name)}'));
+ }
+
+ // MODIFIED (PL)
+ // Add Alert Info if set but don't override and already set value (could be from ringgroup, directdid, etc.)
+ //
+ if ((isset($dring) ? $dring : '') != '') {
+ $ext->add($contextname, $grpnum, '', new ext_setvar("__ALERT_INFO", '${IF($["x${ALERT_INFO}"="x"]?"'.str_replace(';', '\;', $dring).'":"")}'));
+ }
+ // If pre_ring is set, then ring this number of seconds prior to moving on
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$[$[ "${DB(AMPUSER/'.$grpnum.'/followme/prering)}" = "0" ] | $[ "${DB(AMPUSER/'.$grpnum.'/followme/prering)}" = "" ]] ', 'skipsimple'));
+ $ext->add($contextname, $grpnum, '', new ext_macro('simple-dial',$grpnum.',${DB(AMPUSER/'."$grpnum/followme/prering)}"));
+
+ // recording stuff
+ $ext->add($contextname, $grpnum, 'skipsimple', new ext_setvar('RecordMethod','Group'));
+ $ext->add($contextname, $grpnum, '', new ext_macro('record-enable','${DB(AMPUSER/'."$grpnum/followme/grplist)}".',${RecordMethod}'));
+
+ // group dial
+ $ext->add($contextname, $grpnum, '', new ext_setvar('RingGroupMethod',$strategy));
+ if ((isset($annmsg) ? $annmsg : '') != '') {
+ // should always answer before playing anything, shouldn't we ?
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$[$["${DIALSTATUS}" = "ANSWER"] | $["foo${RRNODEST}" != "foo"]]','DIALGRP'));
+ $ext->add($contextname, $grpnum, '', new ext_answer(''));
+ $ext->add($contextname, $grpnum, '', new ext_wait(1));
+ $ext->add($contextname, $grpnum, '', new ext_playback($annmsg));
+ }
+
+ // Create the confirm target
+ $len=strlen($grpnum)+4;
+ $ext->add("fmgrps", "_RG-${grpnum}-.", '', new ext_macro('dial','${DB(AMPUSER/'."$grpnum/followme/grptime)},".
+ "M(confirm^${remotealert}^${toolate}^${grpnum})$dialopts".',${EXTEN:'.$len.'}'));
+
+ // If grpconf == ENABLED call with confirmation ELSE call normal
+ $ext->add($contextname, $grpnum, 'DIALGRP', new
+ ext_gotoif('$[ "${DB(AMPUSER/'.$grpnum.'/followme/grpconf)}" = "ENABLED" ]', 'doconfirm'));
+
+ // Normal call
+ $ext->add($contextname, $grpnum, '', new
+ ext_macro('dial','${DB(AMPUSER/'."$grpnum/followme/grptime)},$dialopts,".'${DB(AMPUSER/'."$grpnum/followme/grplist)}"));
+ $ext->add($contextname, $grpnum, '', new ext_goto('nextstep'));
+
+ // Call Confirm call
+ $ext->add($contextname, $grpnum, 'doconfirm', new
+ ext_macro('dial-confirm','${DB(AMPUSER/'."$grpnum/followme/grptime)},$dialopts,".'${DB(AMPUSER/'."$grpnum/followme/grplist)},".$grpnum));
+
+ $ext->add($contextname, $grpnum, 'nextstep', new ext_setvar('RingGroupMethod',''));
+
+ // Did the call come from a queue or ringgroup, if so, don't go to the destination, just end and let
+ // the queue or ringgroup decide what to do next
+ //
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${RRNODEST}" != "foo"]', 'nodest'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('__NODEST', ''));
+
+ $ext->add($contextname, $grpnum, '', new ext_dbdel('${BLKVM_OVERRIDE}'));
+
+ // where next?
+ if ((isset($postdest) ? $postdest : '') != '') {
+ $ext->add($contextname, $grpnum, '', new ext_goto($postdest));
+ } else {
+ $ext->add($contextname, $grpnum, '', new ext_hangup(''));
+ }
+ $ext->add($contextname, $grpnum, 'nodest', new ext_noop('SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST}'));
+ }
+ }
+ break;
+ }
+}
+
+function findmefollow_add($grpnum,$strategy,$grptime,$grplist,$postdest,$grppre='',$annmsg='',$dring,$needsconf,$remotealert,$toolate,$ringing,$pre_ring) {
+ global $amp_conf;
+ global $astman;
+
+ $sql = "INSERT INTO findmefollow (grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, dring, needsconf, remotealert, toolate, ringing, pre_ring) VALUES (".$grpnum.", '".str_replace("'", "''", $strategy)."', ".str_replace("'", "''", $grptime).", '".str_replace("'", "''", $grppre)."', '".str_replace("'", "''", $grplist)."', '".str_replace("'", "''", $annmsg)."', '".str_replace("'", "''", $postdest)."', '".str_replace("'", "''", $dring)."', '$needsconf', '$remotealert', '$toolate', '$ringing', '$pre_ring')";
+ $results = sql($sql);
+
+ if ($astman) {
+ $astman->database_put("AMPUSER",$grpnum."/followme/prering",isset($pre_ring)?$pre_ring:'');
+ $astman->database_put("AMPUSER",$grpnum."/followme/grptime",isset($grptime)?$grptime:'');
+ $astman->database_put("AMPUSER",$grpnum."/followme/grplist",isset($grplist)?$grplist:'');
+ $confvalue = ($needsconf == 'CHECKED')?'ENABLED':'DISABLED';
+ $astman->database_put("AMPUSER",$grpnum."/followme/grpconf",isset($needsconf)?$confvalue:'');
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+function findmefollow_del($grpnum) {
+ global $amp_conf;
+ global $astman;
+
+ $results = sql("DELETE FROM findmefollow WHERE grpnum = $grpnum","query");
+
+ if ($astman) {
+ $astman->database_del("AMPUSER",$grpnum."/followme/prering");
+ $astman->database_del("AMPUSER",$grpnum."/followme/grptime");
+ $astman->database_del("AMPUSER",$grpnum."/followme/grplist");
+ $astman->database_del("AMPUSER",$grpnum."/followme/grpconf");
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+function findmefollow_full_list() {
+ $results = sql("SELECT grpnum FROM findmefollow ORDER BY grpnum","getAll",DB_FETCHMODE_ASSOC);
+ foreach ($results as $result) {
+ if (isset($result['grpnum']) && checkRange($result['grpnum'])) {
+ $grps[] = array($result['grpnum']);
+ }
+ }
+ if (isset($grps))
+ return $grps;
+ else
+ return null;
+}
+
+function findmefollow_list() {
+
+ global $db;
+ $sql = "SELECT grpnum FROM findmefollow ORDER BY grpnum";
+ $results = $db->getCol($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ if (isset($results)) {
+ foreach($results as $result) {
+ if (checkRange($result)){
+ $grps[] = $result;
+ }
+ }
+ }
+ if (isset($grps)) {
+ sort($grps); // hmm, should be sorted already
+ return $grps;
+ }
+ else {
+ return null;
+ }
+}
+
+// This gets the list of all active users so that the Find Me Follow display can limit the options to only created users.
+// the returned arrays contain [0]:extension [1]:name
+//
+// This was pulled straight out of previous 1.x version, might need cleanup laster
+//
+function findmefollow_allusers() {
+ global $db;
+ $sql = "SELECT extension,name FROM users ORDER BY extension";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ foreach($results as $result){
+ if (checkRange($result[0])){
+ $users[] = array($result[0],$result[1]);
+ }
+ }
+ if (isset($users)) sort($users);
+ return $users;
+}
+
+// Only check astdb if check_astdb is not 0. For some reason, this fails if the asterisk manager code
+// is included (executed) by all calls to this function. This results in silently not generating the
+// extensions_additional.conf file. page.findmefollow.php does set it to 1 which means that when running
+// the GUI, any changes not reflected in SQL will be detected and written back to SQL so that they are
+// in sync. Ideally, anything that changes the astdb should change SQL. (in some ways, these should both
+// not be here but ...
+//
+function findmefollow_get($grpnum, $check_astdb=0) {
+ global $amp_conf;
+ global $astman;
+
+ $results = sql("SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, dring, needsconf, remotealert, toolate, ringing, pre_ring FROM findmefollow WHERE grpnum = $grpnum","getRow",DB_FETCHMODE_ASSOC);
+
+ if ($check_astdb) {
+ if ($astman) {
+ $astdb_prering = $astman->database_get("AMPUSER",$grpnum."/followme/prering");
+ $astdb_grptime = $astman->database_get("AMPUSER",$grpnum."/followme/grptime");
+ $astdb_grplist = $astman->database_get("AMPUSER",$grpnum."/followme/grplist");
+ $astdb_grpconf = $astman->database_get("AMPUSER",$grpnum."/followme/grpconf");
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+ // If the values are different then use what is in astdb as it may have been changed.
+ //
+ $changed=0;
+ if (($astdb_prering != $results['pre_ring']) && ($astdb_prering >= 0)) {
+ $results['pre_ring'] = $astdb_prering;
+ $changed=1;
+ }
+ if (($astdb_grptime != $results['grptime']) && ($astdb_grptime > 0)) {
+ $results['grptime'] = $astdb_grptime;
+ $changed=1;
+ }
+ if ((trim($astdb_grplist) != trim($results['grplist'])) && (trim($astdb_grplist) != '')) {
+ $results['grplist'] = $astdb_grplist;
+ $changed=1;
+ }
+
+ if (trim($astdb_grpconf) == 'ENABLED') {
+ $confvalue = 'CHECKED';
+ } elseif (trim($astdb_grpconf) == 'DISABLED') {
+ $confvalue = '';
+ } else {
+ //Bogus value, should not get here but treat as disabled
+ $confvalue = '';
+ }
+ if ($confvalue != trim($results['needsconf'])) {
+ $results['needsconf'] = $confvalue;
+ $changed=1;
+ }
+
+ if ($changed) {
+ $sql = "UPDATE findmefollow SET grptime = '".$results['grptime']."', grplist = '".
+ str_replace("'", "''", trim($results['grplist']))."', pre_ring = '".$results['pre_ring'].
+ "', needsconf = '".$results['needsconf']."' WHERE grpnum = $grpnum LIMIT 1";
+ $sql_results = sql($sql);
+ }
+ } // if check_astdb
+
+ return $results;
+}
+
+function findmefollow_configpageinit($dispnum) {
+ global $currentcomponent;
+
+ if ( ($dispnum == 'users' || $dispnum == 'extensions') ) {
+ $currentcomponent->addguifunc('findmefollow_configpageload');
+ }
+}
+
+function findmefollow_configpageload() {
+ global $currentcomponent;
+
+ $viewing_itemid = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;
+ $action = isset($_REQUEST['action'])?$_REQUEST['action']:null;
+ if ( $viewing_itemid != '' && $action != 'del') {
+ $set_findmefollow = findmefollow_list();
+ $grpURL = $_SERVER['PHP_SELF'].'?'.'display=findmefollow&extdisplay=GRP-'.$viewing_itemid;
+ if (is_array($set_findmefollow)) {
+ $grpTEXT = (in_array($viewing_itemid,$set_findmefollow) ? "Edit" : "Add")." Follow Me Settings";
+ } else {
+ $grpTEXT = "Add Follow Me Settings";
+ }
+ $currentcomponent->addguielem('_top', new gui_link('findmefollowlink', $grpTEXT, $grpURL));
+ }
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES/findmefollow.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES/findmefollow.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES/findmefollow.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES/findmefollow.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/i18n/he_IL/LC_MESSAGES/findmefollow.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,209 @@
+# Hebrew version for Find Me Follow FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.findmefollow.php:65
+msgid "Warning! Extension"
+msgstr "×××ר×! ש××××"
+
+#: page.findmefollow.php:65
+msgid "is not allowed for your account"
+msgstr "××× × ××רש×ת ×¢××ר ×ש××× ×"
+
+#: page.findmefollow.php:101
+msgid "$gresult[1]"
+msgstr ""
+
+#: page.findmefollow.php:112 page.findmefollow.php:115
+#: page.findmefollow.php:144
+msgid "Follow Me"
+msgstr "עק×× ××ר×"
+
+#: page.findmefollow.php:115
+msgid "deleted"
+msgstr "× ××ק"
+
+#: page.findmefollow.php:141
+msgid "Delete Entries"
+msgstr "××ק רש×××ת"
+
+#: page.findmefollow.php:166
+msgid "Edit Follow Me"
+msgstr "ער×× ×¢×§×× ××ר×"
+
+#: page.findmefollow.php:166
+msgid "Add Follow Me"
+msgstr "××סף עק×× ××ר×"
+
+#: page.findmefollow.php:174
+msgid "group number"
+msgstr "×ספר ק××צ×"
+
+#: page.findmefollow.php:174
+msgid "The number users will dial to ring extensions in this ring group"
+msgstr "××ספר ש×××× ×שת×ש×× ×××××× ××× ××××× ×ש××××ת ×ק××צת צ×צ×× ××"
+
+#: page.findmefollow.php:180
+msgid "Initial Ring Time:"
+msgstr "××× ×¦×צ×× ×¨×ש×× ×:"
+
+#: page.findmefollow.php:181
+msgid ""
+"This is the number of seconds to ring the primary extension prior to "
+"proceeding to the follow-me list. The extension can also be included in the "
+"follow-me list. A 0 setting will bypass this."
+msgstr "×ספר ××©× ××ת ש×ש ×צ××¦× ×ש×××× ×ר×ש×ת ××¤× × ×©××ש×××× ×רש××ת ×עק××-××ר×. ×ש×××× ××××× ×××××× ×× ×רש××ת ×עק××-××ר×. ×××רת 0 תעק××£ ××ת."
+
+#: page.findmefollow.php:199
+msgid "ring strategy:"
+msgstr "×ס×ר××××ת צ×צ××:"
+
+#: page.findmefollow.php:201
+msgid "ringall"
+msgstr "צ××¦× ××× ×ש××××ת"
+
+#: page.findmefollow.php:201
+msgid "ring all available channels until one answers (default)"
+msgstr "צ××¦× ××× ×ער×צ×× ××××× ×× ×¢× ×©××ש×× ××¢× × (×ר×רת ××××)"
+
+#: page.findmefollow.php:202
+msgid "hunt"
+msgstr "צ××"
+
+#: page.findmefollow.php:202
+msgid "take turns ringing each available extension"
+msgstr "×¢××ר ×ת×ר ×צ××¦× ××× ×©×××× ×××× ×"
+
+#: page.findmefollow.php:203
+msgid "memoryhunt"
+msgstr "צ×× ×¢× ×××ר××"
+
+#: page.findmefollow.php:203
+msgid ""
+"ring first extension in the list, then ring the 1st and 2nd extension, then "
+"ring 1st 2nd and 3rd extension in the list.... etc."
+msgstr "צ××¦× ×ש×××× ×ר×ש×× × ×רש×××, ×××ר ××× ×¦××¦× ×ר×ש×× × ×××©× ×××, ×××ר ××× ×ר×ש×× × ××©× ××× ××ש××ש×ת, ××× ××××."
+
+#: page.findmefollow.php:204
+msgid "*-prim"
+msgstr ""
+
+#: page.findmefollow.php:204
+msgid ""
+"these modes act as described above. However, if the primary extension (first "
+"in list) is occupied, the other extensions will not be rung. If the primary "
+"is freepbx DND, it won't be run. If the primary is freepbx CF unconditional, "
+"then all will be rung"
+msgstr "×צ××× ××× ××ª× ××× ××ת××ר ××¢××. ××, ×× ×ש×××× ×ר×ש×ת (×ר×ש×× × ×רש×××) × ×צ×ת ×ש×××ש, ×× ×××× ×¦×צ×× ×ש××××ת ×××ר×ת. ×× ×ש×××× ×ר×ש×ת ××××רת ×××¦× × ×-××-××פר××¢, ×× \"×. ×× ×ש×××× ×ר×ש×ת ××××רת ××ער×ת ×××¦× ×¢×§××-××ר×-×××-×צ×, ××× ×× ×ש××××ת תצ×צ×× ×."
+
+#: page.findmefollow.php:220
+msgid "Alert Info"
+msgstr "××××¢ ×תר××"
+
+#: page.findmefollow.php:224
+msgid "Confirm Calls"
+msgstr "×שר ש×××ת"
+
+#: page.findmefollow.php:225
+msgid "System Recordings not installed. Option Disabled"
+msgstr "××××× ×ק×××ת ×ער×ת ×× ××תק×. ××פשר×ת ×××××ת"
+
+#: page.findmefollow.php:231
+msgid "Remote Announce:"
+msgstr "××ר×× ××ר××ק:"
+
+#: page.findmefollow.php:231
+msgid ""
+"Message to be played to the person RECEIVING the call, if 'Confirm Calls' is "
+"enabled.<br><br>To add additional recordings use the \"System Recordings\" "
+"MENU to the left"
+msgstr "××××¢× ×שר ת×ש××¢ ×××× <em>ש×ק××</em> ×ת ×ש×××, ×× ××פשר×ת '×שר ש×××ת' ××פע×ת.<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ש××¦× ×©×××"
+
+#: page.findmefollow.php:237 page.findmefollow.php:254
+#: page.findmefollow.php:298
+msgid "None"
+msgstr "×××"
+
+#: page.findmefollow.php:248
+msgid "Too-Late Announce:"
+msgstr "××ר×ת ××תר-×××-××××ר:"
+
+#: page.findmefollow.php:248
+msgid ""
+"Message to be played to the person RECEIVING the call, if the call has "
+"already been accepted before they push 1.<br><br>To add additional "
+"recordings use the \"System Recordings\" MENU to the left"
+msgstr "××××¢× ×©×ª×ש××¢ ×××× <em>ש×ק××</em> ×ת ×ש×××, ×× ×ש××× ××ר ×תק××× ××¤× × ×©××× ×××¥ 1.<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ש××¦× ×©×××"
+
+#: page.findmefollow.php:266
+msgid "extension list"
+msgstr "רש××ת ש××××ת"
+
+#: page.findmefollow.php:266
+msgid ""
+"List extensions to ring, one per line.<br><br>You can include an extension "
+"on a remote system, or an external number by suffixing a number with a pound "
+"(#). ex: 2448089# would dial 2448089 on the appropriate trunk (see "
+"Outbound Routing)."
+msgstr "רש××ת ש××××ת ש×ש ×צ××¦× ×××××, ××ת ×ש×ר×.<br /><br />××ª× ×××× ××××× ×©×××× ×¢× ×ער×ת ×ר××קת, ×× ×ספר ××צ×× ×, ×¢× ××× ×ק××ת ××ספר ×ס××××ת (#). ××××××: #2448089 ××××× ××ספר 2448089 ××¨× ×ס××£ ××צ××× ××ת××× (ר×× × ×ת×× ×××צ×)"
+
+#: page.findmefollow.php:281
+msgid "CID name prefix"
+msgstr "ק××××ת ×©× ××××× ×©×××ת"
+
+#: page.findmefollow.php:287
+msgid "ring time (max 60 sec)"
+msgstr "××× ×¦×צ×× (×קס 60 ×©× ××ת)"
+
+#: page.findmefollow.php:292 page.findmefollow.php:310
+msgid "announcement:"
+msgstr "××ר××:"
+
+#: page.findmefollow.php:292
+msgid ""
+"Message to be played to the caller before dialing this group.<br><br>To add "
+"additional recordings please use the \"System Recordings\" MENU to the left"
+msgstr "××××¢× ×©×ª×ש××¢ ××תקשר ××¤× × ××××× ×ק×××¦× ××.<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×× × ×שת×ש <em>×תפר××</em> \"××××¢×ת ×ער×ת\" ×שר ××¦× ×©×××"
+
+#: page.findmefollow.php:310
+msgid ""
+"Message to be played to the caller before dialing this group.<br><br>You "
+"must install and enable the \"Systems Recordings\" Module to edit this option"
+msgstr "××××¢× ×שר ת×ש××¢ ××תקשר ××¤× × ××××× ×ק×××¦× ××.<br /><br />××ª× ×××× ××תק×× ×××פע×× ×ת ×××××× \"×ק×××ת ×ער×ת\" ××× ×ער×× ×פשר×ת ××"
+
+#: page.findmefollow.php:320
+msgid "Play Music On Hold?"
+msgstr "× ×× ××ס×קת ×××ª× ×?"
+
+#: page.findmefollow.php:320
+msgid ""
+"If you select a Music on Hold class to play, instead of 'Ring', they will "
+"hear that instead of Ringing while they are waiting for someone to pick up. "
+"Note this DOES NOT WORK with call confirmation, due to limitations of "
+"Asterisk"
+msgstr "×× ×ª××ר ס×× ××ס××§× ×× ××× ×, ××ק×× 'צ×צ××', ×× ×ש××¢× ××ס××§× ×× ××ק×× ×¦×צ×× ×××× ×©×× ××ת×× ×× ×©××ש×× ×ר×× ×ת ×××פ××. ש×× ×× <em>ש×× ×× ×¢×××<em> ×¢× ××ש×ר ש×××ת, ×××× ×××××ת ×©× ×ס×ר×סק"
+
+#: page.findmefollow.php:326
+msgid "Ring"
+msgstr "צ×צ××"
+
+#: page.findmefollow.php:338
+msgid "Destination if no answer"
+msgstr "××¢× ×× ××× ××¢× ×"
+
+#: install.php:67 uninstall.php:31
+msgid "Cannot connect to Asterisk Manager with "
+msgstr "×× ×צ××× ××ת××ר ××× ×× ××ס×ר×סק ×¢× "
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,69 @@
+<?php
+
+global $db;
+
+// Adding support for a pre_ring before follow-me group
+$sql = "SELECT pre_ring FROM findmefollow";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE findmefollow ADD pre_ring SMALLINT( 6 ) NOT NULL DEFAULT 0 ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+// Version 2.0 upgrade. Yeah. 2.0 baby!
+$sql = "SELECT remotealert FROM findmefollow";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE findmefollow ADD remotealert VARCHAR( 80 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+
+ $sql = "ALTER TABLE findmefollow ADD needsconf VARCHAR( 10 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+
+ $sql = "ALTER TABLE findmefollow ADD toolate VARCHAR( 80 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+// Version 2.1 upgrade. Add support for ${DIALOPTS} override, playing MOH
+$sql = "SELECT ringing FROM findmefollow";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE findmefollow ADD ringing VARCHAR( 80 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+
+// this function builds the AMPUSER/<grpnum>/followme tree for each user who has a group number
+// it's purpose is to convert after an upgrade
+
+
+// TODO, is this needed...?
+// is this global...? what if we include this files
+// from a function...?
+global $astman;
+global $amp_conf;
+
+$sql = "SELECT * FROM findmefollow";
+$userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC);
+
+//add details to astdb
+if ($astman) {
+ foreach($userresults as $usr) {
+ extract($usr);
+
+ $astman->database_put("AMPUSER",$grpnum."/followme/prering",isset($pre_ring)?$pre_ring:'');
+ $astman->database_put("AMPUSER",$grpnum."/followme/grptime",isset($grptime)?$grptime:'');
+ $astman->database_put("AMPUSER",$grpnum."/followme/grplist",isset($grplist)?$grplist:'');
+ $confvalue = ($needsconf == 'CHECKED')?'ENABLED':'DISABLED';
+ $astman->database_put("AMPUSER",$grpnum."/followme/grpconf",isset($needsconf)?$confvalue:'');
+ }
+} else {
+ echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"];
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,3 @@
+
+CREATE TABLE IF NOT EXISTS `findmefollow` ( `grpnum` BIGINT( 11 ) NOT NULL , `strategy` VARCHAR( 50 ) NOT NULL , `grptime` SMALLINT NOT NULL , `grppre` VARCHAR( 100 ) NULL , `grplist` VARCHAR( 255 ) NOT NULL , `annmsg` VARCHAR( 255 ) NULL , `postdest` VARCHAR( 255 ) NULL , `dring` VARCHAR ( 50 ) NULL , remotealert VARCHAR ( 80 ), needsconf VARCHAR ( 10 ), toolate VARCHAR ( 80 ), pre_ring SMALLINT NOT NULL DEFAULT 0, PRIMARY KEY (`grpnum`) ) TYPE = MYISAM ;
+
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,38 @@
+<module>
+ <rawname>findmefollow</rawname>
+ <name>Follow Me</name>
+ <version>2.4.9</version>
+ <changelog>
+ *2.4.9* Add he_IL translation
+ *2.4.8* never allow extension to include itself as nnn# and create infinite loop
+ *2.4.7* Changed to not set alertinfo value if already set from before hitting followme
+ *2.4.6* Added BLKVM DB tree to fix inability to transfer a received call to another user, and make NODEST stuff work overall
+ *2.4.5* Modified NODEST stuff to improve some cases where it was still failing, and improve '#' transfer scenarios
+ *2.4.4* Add NODEST so that destination (often vm) is not taken if called from queue or ringgroup
+ *2.4.3* Sanity check for prefing that if not set or there, it won't ring the extension forever (should not happen)
+ *2.4.2* Modified flyover help - since moh works with confirmation now
+ *2.4.1* Added sound files for default confirmation messages
+ 2.4: First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ 2.3.1: removed checkastman
+ 2.3: First release for 2.2, fixed minor display issues
+ 2.2.5: fixed so extension number is put into empty lists
+ 2.2.4: moved require_once() in functions.php, was breaking other stuff
+ 2.2.3: full path in require_once to keep retrieve_conf from dieing
+ 2.2.2: bug fix = should be ==
+ 2.2.1: Use astdb for some settings
+ 2.2.0: Add Pre-Ring
+ 2.1.5: Fix bug #1142
+ 2.1.4: Code cleanup
+ </changelog>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Much like a ring group, but works on individual extensions. When someone calls the extension, it can be setup to ring for a number of seconds before trying to ring other extensions and/or external numbers, or to ring all at once, or in other various 'hunt' configurations. Most commonly used to ring someone's cell phone if they don't answer their extension.
+ </description>
+ <menuitems>
+ <findmefollow>Follow Me</findmefollow>
+ </menuitems>
+ <location>release/2.2/findmefollow-2.4.8.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-FollowMe</info>
+ <md5sum>782a49d8c87c7a5b13fc697edb2be017</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/page.findmefollow.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/page.findmefollow.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/page.findmefollow.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,407 @@
+<?php /* $Id: page.findmefollow.php 1197 2006-03-19 17:59:02Z mheydon1973 $ */
+//Copyright (C) 2006 Philippe Lindheimer (p_lindheimer at yahoo dot com)
+//
+//This program 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.
+//
+//This program 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.
+
+$dispnum = 'findmefollow'; //used for switch on config.php
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+//the extension we are currently displaying
+isset($_REQUEST['extdisplay'])?$extdisplay=$_REQUEST['extdisplay']:$extdisplay='';
+isset($_REQUEST['account'])?$account = $_REQUEST['account']:$account='';
+isset($_REQUEST['grptime'])?$grptime = $_REQUEST['grptime']:$grptime='';
+isset($_REQUEST['grppre'])?$grppre = $_REQUEST['grppre']:$grppre='';
+isset($_REQUEST['strategy'])?$strategy = $_REQUEST['strategy']:$strategy='';
+isset($_REQUEST['annmsg'])?$annmsg = $_REQUEST['annmsg']:$annmsg='';
+isset($_REQUEST['dring'])?$dring = $_REQUEST['dring']:$dring='';
+isset($_REQUEST['needsconf'])?$needsconf = $_REQUEST['needsconf']:$needsconf='';
+isset($_REQUEST['remotealert'])?$remotealert = $_REQUEST['remotealert']:$remotealert='';
+isset($_REQUEST['toolate'])?$toolate = $_REQUEST['toolate']:$toolate='';
+isset($_REQUEST['ringing'])?$ringing = $_REQUEST['ringing']:$ringing='';
+isset($_REQUEST['pre_ring'])?$pre_ring = $_REQUEST['pre_ring']:$pre_ring='0';
+
+
+if (isset($_REQUEST['goto0']) && isset($_REQUEST[$_REQUEST['goto0']."0"])) {
+ $goto = $_REQUEST[$_REQUEST['goto0']."0"];
+} else {
+ $goto = '';
+}
+
+
+if (isset($_REQUEST["grplist"])) {
+ $grplist = explode("\n",$_REQUEST["grplist"]);
+
+ if (!$grplist) {
+ $grplist = null;
+ }
+
+ foreach (array_keys($grplist) as $key) {
+ //trim it
+ $grplist[$key] = trim($grplist[$key]);
+
+ // remove invalid chars
+ $grplist[$key] = preg_replace("/[^0-9#*]/", "", $grplist[$key]);
+
+ if ($grplist[$key] == ltrim($extdisplay,'GRP-').'#')
+ $grplist[$key] = rtrim($grplist[$key],'#');
+
+ // remove blanks
+ if ($grplist[$key] == "") unset($grplist[$key]);
+ }
+
+ // check for duplicates, and re-sequence
+ $grplist = array_values(array_unique($grplist));
+}
+
+// do if we are submitting a form
+if(isset($_POST['action'])){
+ //check if the extension is within range for this user
+ if (isset($account) && !checkRange($account)){
+ echo "<script>javascript:alert('". _("Warning! Extension")." ".$account." "._("is not allowed for your account").".');</script>";
+ } else {
+ //add group
+ if ($action == 'addGRP') {
+ findmefollow_add($account,$strategy,$grptime,implode("-",$grplist),$goto,$grppre,$annmsg,$dring,$needsconf,$remotealert,$toolate,$ringing,$pre_ring);
+
+ needreload();
+ redirect_standard();
+ }
+
+ //del group
+ if ($action == 'delGRP') {
+ findmefollow_del($account);
+ needreload();
+ redirect_standard();
+ }
+
+ //edit group - just delete and then re-add the extension
+ if ($action == 'edtGRP') {
+ findmefollow_del($account);
+ findmefollow_add($account,$strategy,$grptime,implode("-",$grplist),$goto,$grppre,$annmsg,$dring,$needsconf,$remotealert,$toolate,$ringing,$pre_ring);
+
+ needreload();
+ redirect_standard('extdisplay');
+ }
+ }
+}
+?>
+</div>
+
+<div class="rnav"><ul>
+<?php
+//get unique ring groups
+$gresults = findmefollow_allusers();
+$set_users = findmefollow_list();
+
+if (isset($gresults)) {
+ foreach ($gresults as $gresult) {
+ $defined = is_array($set_users) ? (in_array($gresult[0], $set_users) ? "(edit)" : "(add)") : "add";
+ echo "<li><a id=\"".($extdisplay=='GRP-'.$gresult[0] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&extdisplay=".urlencode("GRP-".$gresult[0])."\">"._("$gresult[1]")." <{$gresult[0]}> $defined </a></li>";
+
+ }
+}
+?>
+</ul></div>
+
+<div class="content">
+<?php
+
+if (!$extdisplay) {
+ echo '<br><h2>'._("Follow Me").'</h2><br><h3>'._('Choose a user/extension:').'</h3><br><br><br><br><br><br><br>';
+ }
+elseif ($action == 'delGRP') {
+ echo '<br><h3>'._("Follow Me").' '.$account.' '._("deleted").'!</h3><br><br><br><br><br><br><br><br>';
+} else {
+ if ($extdisplay) {
+ // We need to populate grplist with the existing extension list.
+ $thisgrp = findmefollow_get(ltrim($extdisplay,'GRP-'), 1);
+ $grpliststr = $thisgrp['grplist'];
+ $grplist = explode("-", $grpliststr);
+ $strategy = $thisgrp['strategy'];
+ $grppre = $thisgrp['grppre'];
+ $grptime = $thisgrp['grptime'];
+ $goto = $thisgrp['postdest'];
+ $annmsg = $thisgrp['annmsg'];
+ $dring = $thisgrp['dring'];
+ $remotealert = $thisgrp['remotealert'];
+ $needsconf = $thisgrp['needsconf'];
+ $toolate = $thisgrp['toolate'];
+ $ringing = $thisgrp['ringing'];
+ $pre_ring = $thisgrp['pre_ring'];
+ unset($grpliststr);
+ unset($thisgrp);
+
+ $delButton = "
+ <form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST>
+ <input type=\"hidden\" name=\"display\" value=\"{$dispnum}\">
+ <input type=\"hidden\" name=\"account\" value=\"".ltrim($extdisplay,'GRP-')."\">
+ <input type=\"hidden\" name=\"action\" value=\"delGRP\">
+ <input type=submit value=\""._("Delete Entries")."\">
+ </form>";
+
+ echo "<h2>"._("Follow Me").": ".ltrim($extdisplay,'GRP-')."</h2>";
+
+
+ // Copied straight out of old code,let's see if it works?
+ //
+ if (isset($amp_conf["AMPEXTENSIONS"]) && ($amp_conf["AMPEXTENSIONS"] == "deviceanduser")) {
+ $editURL = $_SERVER['PHP_SELF'].'?display=users&extdisplay='.ltrim($extdisplay,'GRP-');
+ $EXTorUSER = "User";
+ }
+ else {
+ $editURL = $_SERVER['PHP_SELF'].'?display=extensions&extdisplay='.ltrim($extdisplay,'GRP-');
+ $EXTorUSER = "Extension";
+ }
+
+ echo "<p><a href=".$editURL."> Edit ".$EXTorUSER." ".ltrim($extdisplay,'GRP-')."</a></p>";
+ echo "<p>".$delButton."</p>";
+ }
+ ?>
+ <form name="editGRP" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkGRP(editGRP);">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edtGRP' : 'addGRP'); ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($extdisplay ? _("Edit Follow Me") : _("Add Follow Me")) ?><hr></h5></td></tr>
+ <tr>
+<?php
+ if ($extdisplay) {
+
+?>
+ <input size="5" type="hidden" name="account" value="<?php echo ltrim($extdisplay,'GRP-'); ?>">
+<?php } else { ?>
+ <td><a href="#" class="info"><?php echo _("group number")?>:<span><?php echo _("The number users will dial to ring extensions in this ring group")?></span></a></td>
+ <td><input size="5" type="text" name="account" value="<?php echo $gresult[0] + 1; ?>"></td>
+<?php } ?>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Initial Ring Time:")?>
+ <span><?php echo _("This is the number of seconds to ring the primary extension prior to proceeding to the follow-me list. The extension can also be included in the follow-me list. A 0 setting will bypass this.")?>
+ </span></a>
+ </td>
+ <td>
+
+ <select name="pre_ring"/>
+ <?php
+ $default = (isset($pre_ring) ? $pre_ring : 0);
+ for ($i=0; $i <= 60; $i++) {
+ echo '<option value="'.$i.'" '.($i == $default ? 'SELECTED' : '').'>'.$i.'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td> <a href="#" class="info"><?php echo _("ring strategy:")?>
+ <span>
+ <b><?php echo _("ringall")?></b>: <?php echo _("ring all available channels until one answers (default)")?><br>
+ <b><?php echo _("hunt")?></b>: <?php echo _("take turns ringing each available extension")?><br>
+ <b><?php echo _("memoryhunt")?></b>: <?php echo _("ring first extension in the list, then ring the 1st and 2nd extension, then ring 1st 2nd and 3rd extension in the list.... etc.")?><br>
+ <b><?php echo _("*-prim")?></b>: <?php echo _("these modes act as described above. However, if the primary extension (first in list) is occupied, the other extensions will not be rung. If the primary is freepbx DND, it won't be run. If the primary is freepbx CF unconditional, then all will be rung")?><br>
+ </span>
+ </a></td>
+ <td>
+ <select name="strategy"/>
+ <?php
+ $default = (isset($strategy) ? $strategy : 'ringall');
+ $items = array('ringall','ringall-prim','hunt','hunt-prim','memoryhunt','memoryhunt-prim');
+ foreach ($items as $item) {
+ echo '<option value="'.$item.'" '.($default == $item ? 'SELECTED' : '').'>'._($item);
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Alert Info")?>:<span><?php echo _('You can optionally include an Alert Info which can create distinctive rings on SIP phones.')?></span></a></td>
+ <td><input size="18" type="text" name="dring" value="<?php echo $dring ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Confirm Calls")?><span><?php echo _('Enable this if you\'re calling external numbers that need confirmation - eg, a mobile phone may go to voicemail which will pick up the call. Enabling this requires the remote side push 1 on their phone before the call is put through. This feature only works with the ringall/ringall-prim ring strategy')?></span></a>:</td>
+ <td> <?php if (!function_exists('recordings_list')) { echo _("System Recordings not installed. Option Disabled"); } else { ?>
+ <input type="checkbox" name="needsconf" value="CHECKED" <?php echo $needsconf ?> /></td>
+<?php } ?>
+ </tr>
+<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Remote Announce:")?><span><?php echo _("Message to be played to the person RECEIVING the call, if 'Confirm Calls' is enabled.<br><br>To add additional recordings use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="remotealert"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($remotealert) ? $remotealert : '');
+ echo '<option value="">'._("Default")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Too-Late Announce:")?><span><?php echo _("Message to be played to the person RECEIVING the call, if the call has already been accepted before they push 1.<br><br>To add additional recordings use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="toolate"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($toolate) ? $toolate : '');
+ echo '<option value="">'._("Default")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } ?>
+ <tr>
+ <td valign="top"><a href="#" class="info"><?php echo _("extension list")?>:<span><br><?php echo _("List extensions to ring, one per line.<br><br>You can include an extension on a remote system, or an external number by suffixing a number with a pound (#). ex: 2448089# would dial 2448089 on the appropriate trunk (see Outbound Routing).")?><br><br></span></a></td>
+ <td valign="top">
+<?php
+ $rows = count($grplist)+1;
+ if ($rows <= 2 && trim($grplist[0]) == "") {
+ $grplist[0] = ltrim($extdisplay,'GRP-');
+ }
+ ($rows < 5) ? 5 : (($rows > 20) ? 20 : $rows);
+?>
+ <textarea id="grplist" cols="15" rows="<?php echo $rows ?>" name="grplist"><?php echo implode("\n",$grplist);?></textarea><br>
+
+ <input type="submit" style="font-size:10px;" value="<?php echo _("Clean & Remove duplicates")?>" />
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("CID name prefix")?>:<span><?php echo _('You can optionally prefix the Caller ID name when ringing extensions in this group. ie: If you prefix with "Sales:", a call from John Doe would display as "Sales:John Doe" on the extensions that ring.')?></span></a></td>
+ <td><input size="4" type="text" name="grppre" value="<?php echo $grppre ?>"></td>
+ </tr>
+
+
+ <tr>
+ <td><?php echo _("ring time (max 60 sec)")?>:</td>
+ <td><input size="4" type="text" name="grptime" value="<?php echo $grptime?$grptime:20 ?>"></td>
+ </tr>
+<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("announcement:")?><span><?php echo _("Message to be played to the caller before dialing this group.<br><br>To add additional recordings please use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="annmsg"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($annmsg) ? $annmsg : '');
+ echo '<option value="">'._("None");
+ if (isset($tresults)) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1];
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } else { ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("announcement:")?><span><?php echo _("Message to be played to the caller before dialing this group.<br><br>You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td>
+ <td>
+ <?php
+ $default = (isset($annmsg) ? $annmsg : '');
+ ?>
+ <input type="hidden" name="annmsg" value="<?php echo $default; ?>"><?php echo ($default != '' ? $default : 'None'); ?>
+ </td>
+ </tr>
+<?php } if (function_exists('music_list')) { ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Play Music On Hold?")?><span><?php echo _("If you select a Music on Hold class to play, instead of 'Ring', they will hear that instead of Ringing while they are waiting for someone to pick up.")?></span></a></td>
+ <td>
+ <select name="ringing"/>
+ <?php
+ $tresults = music_list("/var/lib/asterisk/mohmp3");
+ $cur = (isset($ringing) ? $ringing : 'Ring');
+ echo '<option value="Ring">'._("Ring")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult.'"'.($tresult == $cur ? ' SELECTED' : '').'>'.$tresult."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } ?>
+
+ <tr><td colspan="2"><br><h5><?php echo _("Destination if no answer")?>:<hr></h5></td></tr>
+
+<?php
+//draw goto selects
+echo drawselects($goto,0);
+?>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+
+ </tr>
+ </table>
+ </form>
+<?php
+ } //end if action == delGRP
+
+?>
+<script language="javascript">
+<!--
+
+function checkGRP(theForm) {
+ var msgInvalidGrpNum = "<?php echo _('Invalid Group Number specified'); ?>";
+ var msgInvalidGrpNumStartWithZero = "<?php echo _('Group numbers with more than one digit cannot begin with 0'); ?>";
+ var msgInvalidExtList = "<?php echo _('Please enter an extension list.'); ?>";
+ var msgInvalidGrpPrefix = "<?php echo _('Invalid prefix. Valid characters: a-z A-Z 0-9 : _ -'); ?>";
+ var msgInvalidTime = "<?php echo _('Invalid time specified'); ?>";
+ var msgInvalidGrpTimeRange = "<?php echo _('Time must be between 1 and 60 seconds'); ?>";
+ var msgInvalidRingStrategy = "<?php echo _('You must choose ringall or ringall-prim ring strategy when using Confirm Calls'); ?>";
+
+
+
+ // set up the Destination stuff
+ setDestinations(theForm, 1);
+
+ // form validation
+ defaultEmptyOK = false;
+ if (isEmpty(theForm.grplist.value))
+ return warnInvalid(theForm.grplist, msgInvalidExtList);
+
+ defaultEmptyOK = false;
+ if (!isInteger(theForm.grptime.value)) {
+ return warnInvalid(theForm.grptime, msgInvalidTime);
+ } else {
+ var grptimeVal = theForm.grptime.value;
+ if (grptimeVal < 1 || grptimeVal > 60)
+ return warnInvalid(theForm.grptime, msgInvalidGrpTimeRange);
+ }
+
+ if (theForm.needsconf.checked && theForm.strategy.value.substring(0,7) != "ringall") {
+ return warnInvalid(theForm.needsconf, msgInvalidRingStrategy);
+ }
+
+ defaultEmptyOK = true;
+ if (!isPrefix(theForm.grppre.value))
+ return warnInvalid(theForm.grppre, msgInvalidGrpPrefix);
+
+ if (!validateDestinations(theForm, 1, true))
+ return false;
+
+ return true;
+}
+//-->
+</script>
+
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/sounds/incoming-call-1-accept-2-decline.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-findmefollow/sounds/incoming-call-1-accept-2-decline.sln
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/sounds/incoming-call-no-longer-avail.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-findmefollow/sounds/incoming-call-no-longer-avail.sln
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,33 @@
+<?php
+
+// Delete all the followme trees. This function selects from the users table
+// and not the findmefollow table because the uninstall code deletes the tables
+// prior to running the uninstall script. (probably should be the opposite but...)
+// It is probably better this way anyhow, as there is no harm done if the user
+// has not followme settings and who knows ... maybe some stray ones got left
+// behind somehow.
+
+
+// TODO, is this needed...?
+// is this global...? what if we include this files
+// from a function...?
+global $astman;
+global $amp_conf;
+
+$sql = "SELECT * FROM users";
+$userresults = sql($sql,"getAll",DB_FETCHMODE_ASSOC);
+
+//add details to astdb
+if ($astman) {
+ foreach($userresults as $usr) {
+ extract($usr);
+ $astman->database_del("AMPUSER",$extension."/followme/prering");
+ $astman->database_del("AMPUSER",$extension."/followme/grptime");
+ $astman->database_del("AMPUSER",$extension."/followme/grplist");
+ $astman->database_del("AMPUSER",$extension."/followme/grpconf");
+ }
+} else {
+ echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"];
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-findmefollow/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-findmefollow/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-findmefollow/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+
+DROP TABLE IF EXISTS findmefollow;
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-gabcast (2.2-1.2.3-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:54 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-gabcast
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-gabcast
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Gabcast
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:54 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/gabcast/
+*.sql usr/share/freepbx/modules/gabcast/
+*.sqlite usr/share/freepbx/modules/gabcast/
+*.html usr/share/freepbx/modules/gabcast/
+*.xml usr/share/freepbx/modules/gabcast/
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install gabcast || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall gabcast || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall gabcast || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-gabcast/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,147 @@
+<?php
+ /* $Id:$ */
+
+function gabcast_configpageinit($dispnum) {
+ global $currentcomponent;
+
+ if ( $dispnum == 'users' || $dispnum == 'extensions' ) {
+ $currentcomponent->addguifunc('gabcast_configpageload');
+ }
+}
+
+function gabcast_configpageload() {
+ global $currentcomponent;
+
+ $viewing_itemid = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;
+ $action = isset($_REQUEST['action'])?$_REQUEST['action']:null;
+ if ( $viewing_itemid != '' && $action != 'del') {
+ $list = gabcast_get($viewing_itemid);
+ if (is_array($list)) {
+ $res = $_SERVER['PHP_SELF']."?display=gabcast&type=tool&ext=$viewing_itemid&action=edit";
+ $currentcomponent->addguielem('_top', new gui_link('gabcastlink', 'Edit Gabcast Settings', $res));
+ } else {
+ $res = $_SERVER['PHP_SELF']."?display=gabcast&type=tool&ext=$viewing_itemid&action=add";
+ $currentcomponent->addguielem('_top', new gui_link('gabcastlink', 'Add Gabcast Settings', $res));
+ }
+ }
+}
+
+// returns a associative arrays with keys 'destination' and 'description'
+function gabcast_destinations() {
+ //get the list of meetmes
+ $results = gabcast_list();
+
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $extens[] = array('destination' => 'gabcast,'.$result['0'].',1', 'description' => 'gabcast channel '. $result['1'].' <'.$result[0].'>');
+ }
+ return isset($extens)?$extens:null;
+ } else {
+ return null;
+ }
+}
+
+function gabcast_get_config($engine) {
+ $modulename = 'gabcast';
+
+ // This generates the dialplan
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) {
+ foreach($featurelist as $item) {
+ $featurename = $item['featurename'];
+ $fname = $modulename.'_'.$featurename;
+ if (function_exists($fname)) {
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->getCodeActive();
+ unset($fcc);
+
+ if ($fc != '')
+ $fname($fc);
+ } else {
+ $ext->add('from-internal-additional', 'debug', '', new ext_noop($modulename.": No func $fname"));
+ var_dump($item);
+ }
+ }
+ } else {
+ $ext->add('from-internal-additional', 'debug', new ext_noop($modulename.": No modules??"));
+ }
+
+ $context = "gabcast";
+ $ext->add($context, '_X.', '', new ext_dial('IAX2/iax.gabcast.com/422,120'));
+ $ext->add($context, 's', '', new ext_dial('IAX2/iax.gabcast.com/422,120'));
+
+ $gablist = gabcast_list();
+ if($gablist) {
+ foreach ($gablist as $gab) {
+ $extension = $gab[0];
+ $channbr = $gab[1];
+ $pin = $gab[2];
+
+ $ext->add($context, $extension, '', new ext_dial('IAX2/iax.gabcast.com/'.$channbr.'*'.$pin.',120'));
+ }
+ }
+ break;
+ }
+}
+
+function gabcast_list() {
+ global $db;
+
+ $sql = "SELECT * FROM gabcast ORDER BY channbr";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ return $results;
+}
+
+function gabcast_get($xtn) {
+ global $db;
+
+ $sql = "SELECT * FROM gabcast where ext='$xtn'";
+ $results = $db->getRow($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ return $results;
+}
+
+function gabcast_add($xtn, $channbr, $pin) {
+ // fail if this exten already exists in DB
+ if(is_array(gabcast_get($xtn))) {
+ echo "<div class=error>An error occured when writing to database</div>";
+ return;
+ }
+ sql("INSERT INTO gabcast (ext, channbr, pin) values ('{$xtn}','{$channbr}','{$pin}')");
+}
+
+function gabcast_del($xtn) {
+ sql("DELETE FROM gabcast WHERE ext = '{$xtn}'");
+}
+
+function gabcast_edit($xtn, $channbr, $pin) {
+ gabcast_del($xtn);
+ sql("INSERT INTO gabcast (ext, channbr, pin) values ('{$xtn}','{$channbr}','{$pin}')");
+}
+
+function gabcast_gabdial($c) {
+ global $ext;
+
+ $id = "app-gabcast"; // The context to be included
+ $ext->addInclude('from-internal-additional', $id);
+ $ext->add($id, $c, '', new ext_goto('1','${CALLERID(num)}','gabcast'));
+/*
+ $ext->add($id, $c, '', new ext_macro('user-callerid'));
+ $ext->add($id, $c, '', new ext_noop('Checking for ${CALLERID(num)}'));
+ $ext->add($id, $c, '', new ext_gotoif('$[ ${DB_EXISTS(GABCAST/${CALLERID(num)} = 1 ]', 'hasgabcast:nogabcast'));
+ $ext->add($id, $c, 'hasgabcast', new ext_setvar('DIALSTRING', 'IAX2/iax.gabcast.com/${DB_RESULT}'));
+ $ext->add($id, $c, '', new ext_goto('dodial'));
+ $ext->add($id, $c, 'nogabcast', new ext_setvar('DIALSTRING', 'IAX2/iax.gabcast.com/gab'));
+ $ext->add($id, $c, 'dodial', new ext_dial('${DIALSTRING},120'));
+*/
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES/gabcast.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES/gabcast.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES/gabcast.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES/gabcast.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/i18n/he_IL/LC_MESSAGES/gabcast.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+# Hebrew version for Gabcast FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.gabcast.php:141
+msgid "Add Gabcast Channel"
+msgstr "××סף ער××¥ Gabcast"
+
+#: page.gabcast.php:150
+msgid "Ext"
+msgstr "ש××××"
+
+#: page.gabcast.php:150
+msgid "Chan"
+msgstr "ער××¥"
+
+#: page.gabcast.php:153
+msgid "Gabcast Configuration"
+msgstr "תצ×רת Gabcast"
+
+#: page.gabcast.php:158
+msgid "<h4>The latest episodes in channel #{$chanid}"
+msgstr "<h4>×פרק×× ×××ר×× ×× ×ער××¥ #{$chanid}"
+
+#: page.gabcast.php:161
+msgid "<h4>The latest episodes across all channels"
+msgstr "<h4>×פרק×× ×××ר×× ×× ××× ×ער×צ××"
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,10 @@
+<?php
+
+// Enable direct dial to Gabcast as a feature code
+$fcc = new featurecode('gabcast', 'gabdial');
+$fcc->setDescription('Connect to Gabcast');
+$fcc->setDefault('*422');
+$fcc->update();
+unset($fcc);
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+CREATE TABLE IF NOT EXISTS gabcast ( ext VARCHAR( 50 ) NOT NULL PRIMARY KEY , channbr VARCHAR( 50 ), pin VARCHAR ( 50 ) );
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<module>
+ <rawname>gabcast</rawname>
+ <name>Gabcast</name>
+ <version>1.2.3</version>
+ <type>tool</type>
+ <category>Third Party Addon</category>
+ <menuitems>
+ <gabcast>Gabcast</gabcast>
+ </menuitems>
+ <changelog>
+ *1.2.3* Add he_IL translation
+ *1.2.2* Fix issue where you were unable to add a channel
+ </changelog>
+ <location>release/2.2/gabcast-1.2.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-gabcast</info>
+ <md5sum>c3d15a633d06425ccbd1e4064aed4995</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/page.gabcast.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/page.gabcast.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/page.gabcast.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,172 @@
+<?php
+/* $Id:$ */
+//This program 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.
+//
+//This program 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.
+
+$iam = 'gabcast'; //used for switch on config.php
+$type = 'tool';
+
+// look for form post
+isset($_POST['action'])?$postaction = $_POST['action']:$postaction='';
+
+switch ($postaction) {
+ case "add":
+ gabcast_add($_POST['ext'],$_POST['channbr'],$_POST['pin']);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ gabcast_del($_POST['ext']);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit":
+ gabcast_edit($_POST['ext'],$_POST['channbr'],$_POST['pin']);
+ needreload();
+ redirect_standard('ext');
+ break;
+}
+
+// look for get
+isset($_GET['action'])?$action = $_GET['action']:$action='';
+isset($_GET['ext'])?$ext=$_GET['ext']:$ext='';
+
+switch ($action) {
+ case "add":
+ gabcast_sidebar($ext, $type, $iam);
+ gabcast_show(null, $type, $iam);
+ break;
+ case "edit":
+ gabcast_sidebar($ext, $type, $iam);
+ gabcast_show($ext, $type, $iam);
+ break;
+ default:
+ gabcast_sidebar(null, $type, $iam);
+ gabcast_text();
+ break;
+}
+
+
+function gabcast_text() {
+?>
+
+<div>
+ This
+ <a class=info href="http://www.gabcast.com" target=_new>Gabcast
+ <span>
+ Gabcast is a social broadcasting
+ platform that offers virtual communities, individuals, and organizations an easy
+ way to create and distribute audio content.<br><br>Visit www.gabcast.com for more info.
+ </span>
+ </a> module allows you to:
+ <ul>
+ <li>Link extensions to Gabcast channels. It creates a feature code (which defaults to <u>*422</u> "gab" - you can change this in
+ <a href="config.php?type=setup&display=featurecodeadmin">Feature Code Admin</a>) which allows you to log directly into your Gabcast account. This is ideal for personal podcasting!
+
+ <li>Define a Gabcast channel as a Destination for other modules. For example, you can direct a DID or IVR menu option directly to Gabcast. This is ideal for group and public podcasting!
+ </ul>
+</div>
+
+
+<div style=;margin-top:20px;>
+ <?php echo gabcast_player();?>
+</div>
+<?
+}
+
+function gabcast_show($xtn, $type, $iam) {
+
+ //get settings if editing
+ if(!empty($xtn)) {
+ $thisxtn = gabcast_get($xtn);
+ if(!is_array($thisxtn)) {
+ echo "Error: cannot retreive Gabcast info for this extension";
+ return;
+ }
+ $player = gabcast_player($thisxtn[1]);
+ $action = 'edit';
+
+ //draw delete button
+ echo <<< End_Of_Delete
+ <form method="POST" action="{$_SERVER['PHP_SELF']}?type={$type}&display={$iam}">
+ <input type="hidden" name="action" value="delete">
+ <input type="hidden" name="ext" value="{$thisxtn[0]}">
+ <input type="submit" value="delete settings"></form><hr>
+End_Of_Delete;
+ }
+
+ if(isset($_REQUEST['action']) && $_REQUEST['action'] == 'add') {
+ $thisxtn['ext'] = $_REQUEST['ext'];
+ $thisxtn[0] = $_REQUEST['ext'];
+ $player = "";
+ $action = 'add';
+
+ echo '<div style=margin-bottom:10px;>You <u>must</u> have a Gabcast account & channel to use this feature. Visit <a href="http://www.gabcast.com" target="_blank">www.gabcast.com</a> to sign up. <u>It\'s a free service</u>!</div>';
+ }
+
+ echo <<< End_Of_Html
+
+ <form method="POST" action="{$_SERVER['PHP_SELF']}?type={$type}&display={$iam}&action={$action}">
+ <input type="hidden" name="action" value="{$action}">
+ <div>
+ Gabcast Channel Number:
+ <input size="10" type="text" name="channbr" value="{$thisxtn[1]}">
+ </div>
+ <div>
+ Gabcast Channel Password:
+ <input size="10" type="text" name="pin" value="{$thisxtn[2]}">
+ </div>
+ <div>
+ Link to Extension/User Number:
+ <input size="10" type="text" name="ext" value="{$thisxtn[0]}">
+ </div>
+ <div>
+ <input type="submit">
+ </div>
+ <div style="margin-top:20px;">
+ {$player}
+ </div>
+ </form>
+
+End_Of_Html;
+}
+
+function gabcast_sidebar($sel, $type, $iam) {
+ echo "</div><div class='rnav'>\n";
+ echo "<li><a id='".($sel==''?'current':'std')."' ";
+ echo "href='config.php?type={$type}&display={$iam}&action=add'>"._("Add Gabcast Channel")."</a></li>";
+ //get the list of paging groups
+ $resarr = gabcast_list();
+ if ($resarr) {
+ foreach ($resarr as $resar) {
+ $cursel = $resar[0];
+ echo "<li><a id=\"".($sel==$cursel ? 'current':'std');
+ echo "\" href=\"config.php?type=${type}&display=";
+ echo "${iam}&ext=${cursel}&action=edit\">";
+ echo _("Ext")." ${cursel} -> "._("Chan")." ${resar[1]} </a></li>";
+ }
+ }
+ echo "</div><div class='content'><h2>"._("Gabcast Configuration")."</h2>\n";
+}
+
+function gabcast_player($chanid = false) {
+ if ($chanid) {
+ $title = _("<h4>The latest episodes in channel #{$chanid}").":</h4>";
+ $feed = "http://www.gabcast.com/casts/{$chanid}/rss/rss.xml";
+ } else {
+ $title = _("<h4>The latest episodes across all channels").":</h4>";
+ $feed = "http://www.gabcast.com/casts/feeds/latest.xml";
+ }
+
+ return $title.'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="300" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"><param name="movie" value="http://www.gabcast.com/mp3play/mp3player.swf?file='.$feed.'&config=http://www.gabcast.com/mp3play/config.php?ini=full.0.l" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always"><embed src="http://www.gabcast.com/mp3play/mp3player.swf?file='.$feed.'&config=http://www.gabcast.com/mp3play/config.php?ini=full.0.l" allowScriptAccess="always" wmode="transparent" width="300" height="300" name="mp3player" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object><br><br><div>Feed URL: <a href="'.$feed.'" target=_blank>'.$feed.'</a></div>';
+
+}
+?>
+
Added: freepbx/modules-2.2/modules/freepbx-module-gabcast/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-gabcast/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-gabcast/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE gabcast;
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-infoservices (2.2-1.3.3-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:10 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-infoservices
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-infoservices
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Info Services
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:10 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/infoservices/
+*.sql usr/share/freepbx/modules/infoservices/
+*.sqlite usr/share/freepbx/modules/infoservices/
+*.html usr/share/freepbx/modules/infoservices/
+*.xml usr/share/freepbx/modules/infoservices/
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install infoservices || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall infoservices || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall infoservices || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-infoservices/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,152 @@
+<?php
+
+function infoservices_get_config($engine) {
+ $modulename = 'infoservices';
+
+ // This generates the dialplan
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) {
+ foreach($featurelist as $item) {
+ $featurename = $item['featurename'];
+ $fname = $modulename.'_'.$featurename;
+ if (function_exists($fname)) {
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->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;
+
+ $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}'.(!empty($oxtn) ? 'o' : '') )); // AGI
+ $ext->add($id, $c, '', new ext_playback('vm-goodbye')); // $cmd,n,Playback(vm-goodbye)
+ $ext->add($id, $c, '', new ext_hangup('')); // hangup
+ $oxtn = $db->getOne("SELECT value from globals where variable='OPERATOR_XTN'");
+ if ($oxtn != '') {
+ $ext->add($id, 'o', '', new ext_goto('from-internal,${OPERATOR_XTN},1'));
+ } else {
+ $ext->add($id, 'i', '', 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_macro('user-callerid'));
+ $ext->add($id, $c, '', new ext_answer(''));
+ $ext->add($id, $c, '', new ext_wait('1'));
+ $ext->add($id, $c, '', new ext_playback('info-about-last-call&telephone-number'));
+ $ext->add($id, $c, '', new ext_setvar('lastcaller', '${DB(CALLTRACE/${CALLERID(number)})}'));
+ $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, '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_playback('at-tone-time-exactly'));
+ $ext->add($id, $c, '', new ext_gotoif('$["${TIMEFORMAT}" = "kM"]','hr24format'));
+ $ext->add($id, $c, '', new ext_sayunixtime('${FutureTime},,IM \\\'and\\\' S \\\'seconds\\\' p'));
+ $ext->add($id, $c, '', new ext_goto('waitloop'));
+ $ext->add($id, $c, 'hr24format', new ext_sayunixtime('${FutureTime},,kM \\\'and\\\' S \\\'seconds\\\''));
+ $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_saynumber('${TimeLeft}'));
+ $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(''));
+}
+
+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('${CALLERID(number)}'));
+ $ext->add($id, $c, '', new ext_wait('2')); // $cmd,n,Wait(1)
+ $ext->add($id, $c, '', new ext_hangup(''));
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,33 @@
+<?php
+
+$fcc = new featurecode('infoservices', 'directory');
+$fcc->setDescription('Directory');
+$fcc->setDefault('#');
+$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->update();
+unset($fcc);
+
+$fcc = new featurecode('infoservices', 'speakingclock');
+$fcc->setDescription('Speaking Clock');
+$fcc->setDefault('*60');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('infoservices', 'speakextennum');
+$fcc->setDescription('Speak Your Exten Number');
+$fcc->setDefault('*65');
+$fcc->update();
+unset($fcc);
+
+?>
\ No newline at end of file
Added: freepbx/modules-2.2/modules/freepbx-module-infoservices/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-infoservices/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-infoservices/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,16 @@
+<module>
+ <rawname>infoservices</rawname>
+ <name>Info Services</name>
+ <version>1.3.3</version>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <description>Provides a number of applications accessable by feature codes: company directory, call trace (last call information), echo test, speaking clock, and speak current extension number.</description>
+ <changelog>
+ 1.3.3: Fixed SpeakExtension - replaced depricated ${CALLERID} variable
+ 1.3.2: Fixed SpeakExtension - add macro-user-callerid
+ 1.3.1: Improved accuracy of speaking clock
+ </changelog>
+ <location>release/2.2/infoservices-1.3.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>fc56917b226ccfb87fe546fcc9cae658</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-inventorydb (2.2-1.0.3-2) unstable; urgency=low
+
+ * SQLite3 support. Fixes upstream
+ http://www.freepbx.org/trac/ticket/1777
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Thu, 15 Feb 2007 12:54:34 +0200
+
+freepbx-module-inventorydb (2.2-1.0.3-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:14 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-inventorydb
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-inventorydb
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Inventory
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:14 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/inventorydb/
+*.sql usr/share/freepbx/modules/inventorydb/
+*.sqlite usr/share/freepbx/modules/inventorydb/
+*.html usr/share/freepbx/modules/inventorydb/
+*.xml usr/share/freepbx/modules/inventorydb/
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,70 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. Fixes upstream http://www.freepbx.org/trac/ticket/1777
+
+ at DPATCH@
+diff -urNad freepbx-module-inventorydb~/install.php freepbx-module-inventorydb/install.php
+--- freepbx-module-inventorydb~/install.php 1970-01-01 02:00:00.000000000 +0200
++++ freepbx-module-inventorydb/install.php 2007-02-15 12:53:49.000000000 +0200
+@@ -0,0 +1,35 @@
++<?php
++
++global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS inventorydb (
++ id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ empnum varchar(10) null,
++ empname varchar(20) NOT NULL,
++ building varchar(150) NULL,
++ floor varchar(10) NULL,
++ room varchar(10) NULL,
++ section varchar(6) NULL,
++ cubicle varchar(6) NULL,
++ desk varchar(6) NULL,
++ exten varchar(8) NULL,
++ phusername varchar(10) NULL,
++ phpassword varchar(10) NULL,
++ mac varchar(18) NULL,
++ serial varchar(20) NULL,
++ device varchar(20) NULL,
++ distdate varchar(10) NULL,
++ ip varchar(14) NULL,
++ pbxbox varchar(20) NULL,
++ extrainfo varchar(256) NULL
++);";
++
++$check = $db->query($sql);
++if(DB::IsError($check)) {
++ die("Can not create `inventorydb` table\n");
++}
++
++?>
+diff -urNad freepbx-module-inventorydb~/install.sql freepbx-module-inventorydb/install.sql
+--- freepbx-module-inventorydb~/install.sql 2006-06-04 02:58:45.000000000 +0300
++++ freepbx-module-inventorydb/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1,21 +0,0 @@
+-CREATE TABLE IF NOT EXISTS inventorydb (
+- id int UNIQUE AUTO_INCREMENT,
+- empnum varchar(10) null,
+- empname varchar(20) not null,
+- building varchar(150) null,
+- floor varchar(10) null,
+- room varchar(10) null,
+- section varchar(6) null,
+- cubicle varchar(6) null,
+- desk varchar(6) null,
+- exten varchar(8) null,
+- phusername varchar(10) null,
+- phpassword varchar(10) null,
+- mac varchar(18) null,
+- serial varchar(20) null,
+- device varchar(20) null,
+- distdate varchar(10) null,
+- ip varchar(14) null,
+- pbxbox varchar(20) null,
+- extrainfo varchar(256) null
+- );
Property changes on: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install inventorydb || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall inventorydb || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall inventorydb || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-inventorydb/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,75 @@
+<?php
+
+function inventorydb_list(){
+ $sql = "SELECT id, empname FROM inventorydb";
+ $results= sql($sql, "getAll");
+
+ foreach($results as $result){
+ $inventorys[] = array($result[0],$result[1]);
+ }
+ return isset($inventorys)?$inventorys:null;
+}
+
+function inventorydb_get($extdisplay){
+ $sql="SELECT * FROM inventorydb where id=$extdisplay";
+ $results=sql($sql, "getRow", DB_FETCHMODE_ASSOC);
+ return isset($results)?$results:null;
+}
+
+function inventorydb_add($empnum, $empname, $building, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, $phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo){
+ $sql = "INSERT INTO inventorydb(empnum, empname, building, floor, room, section,";
+ $sql .= "cubicle, desk, exten, phusername, phpassword, mac, serial, device,";
+ $sql .= "distdate, ip, pbxbox, extrainfo)";
+
+ $sql .= "VALUES ('$empnum', '$empname', '$building', '$floor', '$room', '$section',";
+ $sql .= "'$cubicle', '$desk', '$exten', '$phusername', '$phpassword', '$mac', '$serial',";
+ $sql .= "'$device', '$distdate', '$ip', '$pbxbox', '$extrainfo')";
+ sql($sql);
+}
+
+function inventorydb_del($extdisplay){
+ $sql="DELETE FROM inventorydb where id=$extdisplay";
+ sql($sql);
+}
+
+function inventorydb_edit($extdisplay, $empnum, $empname, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, $phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo){
+ $sql="UPDATE inventorydb set empnum='$empnum' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set empname='$empname' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set building='$building' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set floor='$floor' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set room='$room' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set section='$section' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set cubicle='$cubicle' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set desk='$desk' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set exten='$exten' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set phusername='$phusername' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set phpassword='$phpassword' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set mac='$mac' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set serial='$serial' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set device='$device' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set distdate='$distdate' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set ip='$ip' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set pbxbox='$pbxbox' where id='$extdisplay'";
+ sql($sql);
+ $sql="UPDATE inventorydb set extrainfo='$extrainfo' where id='$extdisplay'";
+ sql($sql);
+
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES/inventorydb.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES/inventorydb.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES/inventorydb.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES/inventorydb.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/i18n/he_IL/LC_MESSAGES/inventorydb.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,24 @@
+# Hebrew version for Inventory DB FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.inventorydb.php:88
+msgid "inventory"
+msgstr "×צ××"
+
+#: page.inventorydb.php:96
+msgid "deleted"
+msgstr "× ××ק"
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,21 @@
+CREATE TABLE IF NOT EXISTS inventorydb (
+ id int UNIQUE AUTO_INCREMENT,
+ empnum varchar(10) null,
+ empname varchar(20) not null,
+ building varchar(150) null,
+ floor varchar(10) null,
+ room varchar(10) null,
+ section varchar(6) null,
+ cubicle varchar(6) null,
+ desk varchar(6) null,
+ exten varchar(8) null,
+ phusername varchar(10) null,
+ phpassword varchar(10) null,
+ mac varchar(18) null,
+ serial varchar(20) null,
+ device varchar(20) null,
+ distdate varchar(10) null,
+ ip varchar(14) null,
+ pbxbox varchar(20) null,
+ extrainfo varchar(256) null
+ );
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<module>
+ <rawname>inventorydb</rawname>
+ <name>Inventory</name>
+ <version>1.0.3</version>
+ <type>tool</type>
+ <category>Third Party Addon</category>
+ <menuitems>
+ <inventorydb>Inventory</inventorydb>
+ </menuitems>
+ <changelog>
+ *1.0.3* Add he_IL translation
+ </changelog>
+ <location>release/2.2/inventorydb-1.0.2.tgz</location>
+ <md5sum>cc81eee30f026a2234bde90d7c2e4989</md5sum>
+ <info>http://freepbx.org/wiki/inventorydb</info>
+</module>
+
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/page.inventorydb.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/page.inventorydb.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/page.inventorydb.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,310 @@
+<?php
+//inventoryDB 1.0.0 written by Richard Neese 2006-05-24
+//Copyright (C) 2006 Richard Neese (r.neese at gmail.com)
+//
+//This program 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.
+//
+//This program 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.
+
+//Set all the vars so there arent a ton of errors in the httpd error_log
+
+$display = isset($_REQUEST['display'])?$_REQUEST['display']:'inventorydb';
+$extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:'';
+$type = isset($_REQUEST['type'])?$_REQUEST['type']:'setup';
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$empnum = isset($_REQUEST['empnum'])?$_REQUEST['empnum']:'';
+$empname = isset($_REQUEST['empname'])?$_REQUEST['empname']:'';
+$building = isset($_REQUEST['building'])?$_REQUEST['building']:'';
+$floor = isset($_REQUEST['floor'])?$_REQUEST['floor']:'';
+$room = isset($_REQUEST['room'])?$_REQUEST['room']:'';
+$section = isset($_REQUEST['section'])?$_REQUEST['section']:'';
+$cubicle = isset($_REQUEST['cubicle'])?$_REQUEST['cubicle']:'';
+$desk = isset($_REQUEST['desk'])?$_REQUEST['desk']:'';
+$exten = isset($_REQUEST['exten'])?$_REQUEST['exten']:'';
+$phusername = isset($_REQUEST['phusername'])?$_REQUEST['phusername']:'';
+$phpassword = isset($_REQUEST['phpassword'])?$_REQUEST['phpassword']:'';
+$mac = isset($_REQUEST['mac'])?$_REQUEST['mac']:'';
+$serial = isset($_REQUEST['serial'])?$_REQUEST['serial']:'';
+$device = isset($_REQUEST['device'])?$_REQUEST['device']:'';
+$distdate = isset($_REQUEST['distdate'])?$_REQUEST['distdate']:'';
+$ip = isset($_REQUEST['ip'])?$_REQUEST['ip']:'';
+$pbxbox = isset($_REQUEST['pbxbox'])?$_REQUEST['pbxbox']:'';
+$extrainfo = isset($_REQUEST['extrainfo'])?$_REQUEST['extrainfo']:'';
+
+extract($_REQUEST);
+
+$dispnum='inventorydb';
+
+if(!isset($action))
+ $action='';
+switch($action) {
+ case "add":
+ inventorydb_add($empnum, $empname, $building, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, $phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo);
+ $empnum='';
+ $empname='';
+ $building='';
+ $floor='';
+ $room='';
+ $section='';
+ $cubicle='';
+ $desk='';
+ $exten='';
+ $phusername='';
+ $phpassword='';
+ $mac='';
+ $serial='';
+ $device='';
+ $distdate='';
+ $ip='';
+ $pbxbox='';
+ $extrainfo='';
+ //needreload();
+ //right now... not writing config files... don't need to reload
+ redirect_standard();
+ break;
+ case "del":
+ inventorydb_del($extdisplay);
+ //needreload();
+ redirect_standard();
+ break;
+ case "edit":
+ inventorydb_edit($extdisplay, $empnum, $empname, $building, $floor, $room, $section, $cubicle, $desk, $exten, $phusername, phpassword, $mac, $serial, $device, $distdate, $ip, $pbxbox, $extrainfo);
+ //needreload();
+ redirect_standard('extdisplay');
+ break;
+
+}
+?>
+</div>
+<div class="rnav">
+<?php
+$inventorys=inventorydb_list();
+drawListMenu($inventorys, $skip, $type, $dispnum, $extdisplay, _("inventory"));
+?>
+</div>
+
+
+<div class="content">
+<?php
+if($action=='del'){
+ echo "<br><h3>ID ".$extdisplay." "._("deleted")."!</h3><br><Br><br><br><br><br><br>";
+}
+else if(!isset($extdisplay)) {
+
+
+ echo "<h2>Add a user</h2>";
+// echo "<li><a href=\"".$_SERVER['PHP_SELF']."?$action=add\";>Add</a><br>";
+
+}
+else {
+ $delURL = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']."&action=del&extdisplay=$extdisplay";
+
+ //If we have some data, load it up... this means we are editing.
+ if($extdisplay!=""){
+ $inventoryInfo=inventorydb_get($extdisplay);
+ $empnum=$inventoryInfo['empnum'];
+ $empname=$inventoryInfo['empname'];
+ $building=$inventoryInfo['building'];
+ $floor=$inventoryInfo['floor'];
+ $room=$inventoryInfo['room'];
+ $section=$inventoryInfo['section'];
+ $cubicle=$inventoryInfo['cubicle'];
+ $desk=$inventoryInfo['desk'];
+ $exten=$inventoryInfo['exten'];
+ $phusername=$inventoryInfo['phusername'];
+ $phpassword=$inventoryInfo['phpassword'];
+ $mac=$inventoryInfo['mac'];
+ $serial=$inventoryInfo['serial'];
+ $device=$inventoryInfo['device'];
+ $distdate=$inventoryInfo['distdate'];
+ $ip=$inventoryInfo['ip'];
+ $pbxbox=$inventoryInfo['pbxbox'];
+ $extrainfo=$inventoryInfo['extrainfo'];
+ }
+
+ if(isset($inventoryInfo) && is_array($inventoryInfo)){
+ $action="edit";
+ echo "<h2> ".$extdisplay." ".$empname."</h2>";
+ echo "<p><a href=\"".$delURL."\">Delete inventory</a></p>";
+ }
+ else {
+ echo "<h2>Add inventory</h2>";
+ }
+
+}
+
+echo "<form name=\"addNew\" action=\"".$_SERVER['PHP_SELF']."\" method=\"post\" onsubmit=\"return addNew_onsubmit();\">";
+echo "<input type=hidden name=extdisplay value=$extdisplay>\n";
+echo "<input type=hidden name=action value=\"";
+echo ($action=="" ? "add" : $action);
+echo "\">\n";
+echo "<input type=hidden name=display value=\"inventorydb\">";
+
+echo "<table>";
+
+echo "<tr><td colspan=2><h5>";
+echo ($extdisplay ? _('Edit inventory') : _('Add inventory'));
+echo "</h5></td></tr>\n";
+
+//empnum
+echo "<tr ";
+echo ($extdisplay ? '' : '');
+echo "><td>";
+echo "<a href=\"#\" class=\"info\">Employee #\n";
+echo "<span>Employee Number</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"empnum\" value=\"$empnum\">\n";
+echo "</td></tr>\n";
+
+//empname
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Employee Name\n";
+echo "<span>Employee Name</span></a>\n";
+echo "</td>";
+echo "<td>";
+echo "<input type=text name=\"empname\" value=\"$empname\">\n";
+echo "</td></tr>\n";
+
+//building
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Building Located\n";
+echo "<span>Building where the phone is located</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"building\" value=\"$building\"\n";
+echo "</td></tr>\n";
+
+//floor
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Floor #\n";
+echo "<span>Floor # phone is on</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"floor\" value=\"$floor\">\n";
+echo "</td><tr>\n";
+
+//room
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Room #\n";
+echo "<span>Room phone is in</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"room\" value=\"$room\">\n";
+echo "</td></tr>\n";
+
+//section
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Floor Section #\n";
+echo "<span>Floor Section # the phone is in</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"section\" value=\"$section\">\n";
+echo "</td></tr>\n";
+
+//cubicle
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Cubicle #\n";
+echo "<span>Cubicle phone is in</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"cubicle\" value=\"$cubicle\">\n";
+echo "</td></tr>\n";
+
+//desk
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Desk #\n";
+echo "<span>Desk Number phone is on</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"desk\" value=\"$desk\">\n";
+echo "</td></tr>\n";
+
+//exten
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Extension #\n";
+echo "<span>Exten Assigned to the phone</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"exten\" value=\"$exten\">\n";
+echo "</td></tr>\n";
+
+//phusername
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Phone UserName\n";
+echo "<span>Phone Admin Username</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"phusername\" value=\"$phusername\">\n";
+echo "</td></tr>\n";
+
+//phpassword
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Phone Password\n";
+echo "<span>Phone Admin Password </span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"phpassword\" value=\"$phpassword\">\n";
+echo "</td></tr>\n";
+
+//mac
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">MAC Address\n";
+echo "<span>MAC Address of phone</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"mac\" value=\"$mac\">\n";
+echo "</td></tr>\n";
+
+//Serial
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Serial #\n";
+echo "<span>Serial Number of the phone</span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"serial\" value=\"$serial\">\n";
+echo "</td></tr>\n";
+
+//Device
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Phone/Device\n";
+echo "<span>Device <font size=-1>(example... Linksys PAP-2, Sipura)</font></span></a>\n";
+echo "</td><td>\n";
+echo "<input type=text name=\"device\" value=\"$device\">\n";
+echo "</td></tr>\n";
+
+//DistDate
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Distributed Date\n";
+echo "<span>Distribution Date</font></span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"distdate\" value=\"$distdate\">\n";
+echo "</td></tr>\n";
+
+//IP
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">IP Address\n";
+echo "<span>IP Address Assigned If not DHCP</font></span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"ip\" value=\"$ip\">\n";
+echo "</td></tr>\n";
+
+//pbxbox
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">PBX Box Name\n";
+echo "<span>PBX Box Name</span></a>\n";
+echo "</td><td>\n";
+echo "<input type=text name=\"pbxbox\" value=\"$pbxbox\">\n";
+echo "</td></tr>\n";
+
+//extrainfo
+echo "<tr><td>\n";
+echo "<a href=\"#\" class=\"info\">Extra Info\n";
+echo "<span>Extra Information</span></span></a>\n";
+echo "</td><td>\n";
+echo "<input name=\"extrainfo\" value=\"$extrainfo\">\n";
+echo "</td></tr>\n";
+
+
+?>
+<tr><td></td><td><input type=submit Value="Submit Changes"></td></tr></table>
+
+</script>
+
+
+
+</form>
Added: freepbx/modules-2.2/modules/freepbx-module-inventorydb/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-inventorydb/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-inventorydb/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE inventorydb;
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,11 @@
+freepbx-module-ivr (2.2-2.5.10-2) unstable; urgency=low
+
+ * SQLite3 support. Fixes upstream http://freepbx.org/trac/ticket/1776
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 18 Feb 2007 12:08:01 +0200
+
+freepbx-module-ivr (2.2-2.5.10-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:22 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-ivr
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-ivr
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: IVR
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:22 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/ivr/
+*.sql usr/share/freepbx/modules/ivr/
+*.sqlite usr/share/freepbx/modules/ivr/
+*.html usr/share/freepbx/modules/ivr/
+*.xml usr/share/freepbx/modules/ivr/
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,65 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. Fixes upstream http://freepbx.org/trac/ticket/1776
+
+ at DPATCH@
+diff -urNad freepbx-module-ivr~/install.php freepbx-module-ivr/install.php
+--- freepbx-module-ivr~/install.php 2007-02-10 00:34:16.000000000 +0200
++++ freepbx-module-ivr/install.php 2007-02-18 12:11:38.000000000 +0200
+@@ -1,9 +1,37 @@
+ <?php
+-sql('CREATE TABLE IF NOT EXISTS ivr ( ivr_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, displayname VARCHAR(50), deptname VARCHAR(50), enable_directory VARCHAR(8), enable_directdial VARCHAR(8), timeout INT, announcement VARCHAR(255), dircontext VARCHAR ( 50 ) DEFAULT "default" )');
+-sql('CREATE TABLE IF NOT EXISTS ivr_dests ( ivr_id INT NOT NULL, selection VARCHAR(10), dest VARCHAR(50))');
+-
+ global $db;
+
++// install the tables
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS ivr (
++ ivr_id INTEGER NOT NULL $autoincrement PRIMARY KEY,
++ displayname VARCHAR(50),
++ deptname VARCHAR(50),
++ enable_directory VARCHAR(8),
++ enable_directdial VARCHAR(8),
++ timeout INTEGER,
++ announcement VARCHAR(255),
++ dircontext VARCHAR ( 50 ) DEFAULT \"default\"
++);";
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die( "Can not create `ivr` table: " . $check->getMessage() . "\n");
++}
++
++$sql = "CREATE TABLE IF NOT EXISTS ivr_dests (
++ ivr_id INTEGER NOT NULL,
++ selection VARCHAR(10),
++ dest VARCHAR(50),
++ ivr_ret TINYINT(1) NOT NULL DEFAULT 0
++);";
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die( "Can not create `ivrdests` table: " . $check->getMessage() . "\n");
++}
++
++$ivr_modcurrentvers = modules_getversion('ivr');
++
+ // Now, we need to check for upgrades.
+ // V1.0, old IVR. You shouldn't see this, but check for it anyway, and assume that it's 2.0
+ // V2.0, Original Release
+@@ -11,8 +39,6 @@
+ // v2.2, announcement changed to support filenames instead of ID's from recordings table
+ //
+
+-$ivr_modcurrentvers = modules_getversion('ivr');
+-
+ // Add the col
+ $sql = "SELECT dircontext FROM ivr";
+ $check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+diff -urNad freepbx-module-ivr~/install.sql freepbx-module-ivr/install.sql
+--- freepbx-module-ivr~/install.sql 2007-02-10 00:34:16.000000000 +0200
++++ freepbx-module-ivr/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1,2 +0,0 @@
+-CREATE TABLE IF NOT EXISTS ivr ( ivr_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, displayname VARCHAR(50), deptname VARCHAR(50), enable_directory VARCHAR(8), enable_directdial VARCHAR(8), timeout INT, announcement VARCHAR(255), dircontext VARCHAR ( 50 ) DEFAULT "default" );
+-CREATE TABLE IF NOT EXISTS ivr_dests ( ivr_id INT NOT NULL, selection VARCHAR(10), dest VARCHAR(50), ivr_ret TINYINT(1) NOT NULL DEFAULT 0);
Property changes on: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install ivr || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall ivr || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall ivr || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-ivr/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,316 @@
+<?php
+ /* $Id: functions.inc.php 3716 2007-02-06 07:55:22Z p_lindheimer $ */
+
+
+function ivr_init() {
+ global $db;
+
+ // Check to make sure that install.sql has been run
+ $sql = "SELECT deptname from ivr where displayname='__install_done' LIMIT 1";
+
+ $results = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+
+ if (DB::IsError($results)) {
+ // It couldn't locate the table. This is bad. Lets try to re-create it, just
+ // in case the user has had the brilliant idea to delete it.
+ // runModuleSQL taken from page.module.php. It's inclusion here is probably
+ // A bad thing. It should be, I think, globally available.
+ localrunModuleSQL('ivr', 'uninstall');
+ if (localrunModuleSQL('ivr', 'install')==false) {
+ echo _("There is a problem with install.sql, cannot re-create databases. Contact support\n");
+ die;
+ } else {
+ $results = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ }
+ }
+
+ if (!isset($results[0])) {
+ // Note: There's an invalid entry created, __invalid, after this is run,
+ // so as long as this has been run _once_, there will always be a result.
+
+ // Read old IVR format, part of xtns..
+ $sql = "SELECT context,descr FROM extensions WHERE extension = 's' AND application LIKE 'DigitTimeout' AND context LIKE '".$dept."aa_%' ORDER BY context,priority";
+ $unique_aas = $db->getAll($sql);
+ if (isset($unique_aas)) {
+ foreach($unique_aas as $aa){
+ // This gets all the menu options
+ $id = ivr_get_ivr_id($aa[1]);
+ // Save the old name, with a link to the new name, for upgrading
+ $ivr_newname[$aa[0]] = "ivr-$id";
+ // Get the old config
+ $sql = "SELECT extension,args from extensions where application='Goto' and context='{$aa[0]}'";
+ $cmds = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ if (isset($cmds)) {
+ // There were some actions, so loop through them
+ foreach ($cmds as $cmd) {
+ $arr=explode(',', $cmd['args']);
+ // s == old stuff. We don't care.
+ if ($arr[0] != 's')
+ ivr_add_command($id,$cmd['extension'],$cmd['args'],0);
+ }
+ }
+ }
+ // Now. Upgrade all the links inside the old IVR's
+ if (isset($ivr_newname)) {
+ // Some IVR's were upgraded
+ $sql = "SELECT * FROM ivr_dests WHERE dest LIKE '%aa_%'";
+ $dests = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ if (isset($dests)) {
+ foreach ($dests as $dest) {
+ $arr=explode(',', $dest['dest']);
+ sql("UPDATE ivr_dests set dest='".$ivr_newname[$arr[0]].",s,1' where ivr_id='".$dest['ivr_id']."' and selection='".$dest['selection']."'");
+ }
+ }
+ }
+
+ // Upgrade everything using IVR as a destination. Ick.
+
+ // Are queue's using an ivr failover?
+ // ***FIXME*** if upgrading queues away from legacy cruft.
+ $queues = $db->getAll("select extensions,args from extensions where args LIKE '%aa_%' and context='ext-queues' and priority='6'");
+ if (count($res) != 0) {
+ foreach ($queues as $q) {
+ $arr=explode(',', $q['args']);
+ sql("UPDATE extensions set args='".$ivr_newname[$arr[0]].",s,1' where context='ext-queues' and priority='6' and extension='".$q['extension']."'");
+ }
+ }
+
+ // Now process everything else - if there's anything to process.
+ if (isset($ivr_newname) && is_array($ivr_newname)) {
+ foreach (array_keys($ivr_newname) as $old) {
+ // Timeconditions
+ sql("UPDATE timeconditions set truegoto='".$ivr_newname[$arr[0]].",s,1' where truegoto='$old,s,1'");
+ sql("UPDATE timeconditions set falsegoto='".$ivr_newname[$arr[0]].",s,1' where falsegoto='$old,s,1'");
+ // Inbound Routes
+ sql("UPDATE incoming set destination='".$ivr_newname[$arr[0]].",s,1' where destination='$old,s,1'");
+ // Ring Groups
+ sql("UPDATE ringgroups set postdest='".$ivr_newname[$arr[0]].",s,1' where postdest='$old,s,1'");
+ }
+ }
+ }
+ // Note, the __install_done line is for internal version checking - the second field
+ // should be incremented and checked if the database ever changes.
+ $result = sql("INSERT INTO ivr (displayname, deptname) VALUES ('__install_done', '1')");
+ needreload();
+ }
+}
+
+// The destinations this module provides
+// returns a associative arrays with keys 'destination' and 'description'
+function ivr_destinations() {
+ //get the list of IVR's
+ $results = ivr_list();
+
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $extens[] = array('destination' => 'ivr-'.$result['ivr_id'].',s,1', 'description' => $result['displayname']);
+ }
+ }
+ if (isset($extens))
+ return $extens;
+ else
+ return null;
+}
+
+function ivr_get_config($engine) {
+ global $ext;
+ global $conferences_conf;
+
+ switch($engine) {
+ case "asterisk":
+ $ivrlist = ivr_list();
+ if(is_array($ivrlist)) {
+ foreach($ivrlist as $item) {
+ $id = "ivr-".$item['ivr_id'];
+ $details = ivr_get_details($item['ivr_id']);
+
+ $announcement = (isset($details['announcement']) ? $details['announcement'] : '');
+
+ if (!empty($details['enable_directdial'])) {
+ // MODIFIED (PL)
+ // always include ext-findmefollow whether or not the module is currenlty
+ // enabled since subsequent activations should work without regenerating the
+ // ivr. (and no harm done if context does not exist.
+ //
+ $ext->addInclude($id,'ext-findmefollow');
+ $ext->addInclude($id,'ext-local');
+ }
+ // I'm not sure I like the ability of people to send voicemail from the IVR.
+ // Make it a config option, possibly?
+ // $ext->addInclude($item[0],'app-messagecenter');
+ if (!empty($details['enable_directory'])) {
+ $ext->addInclude($id,'app-directory');
+ $dir = featurecodes_getFeatureCode('infoservices', 'directory');
+ $ext->add($id, '#', '', new ext_goto("app-directory,$dir,1"));
+ }
+
+ $ext->add($id, 'h', '', new ext_hangup(''));
+ $ext->add($id, 's', '', new ext_setvar('LOOPCOUNT', 0));
+ $ext->add($id, 's', '', new ext_setvar('__DIR-CONTEXT', $details['dircontext']));
+ $ext->add($id, 's', '', new ext_setvar('_IVR_CONTEXT_${CONTEXT}', '${IVR_CONTEXT}'));
+ $ext->add($id, 's', '', new ext_setvar('_IVR_CONTEXT', '${CONTEXT}'));
+ $ext->add($id, 's', '', new ext_answer(''));
+ $ext->add($id, 's', '', new ext_wait('1'));
+ $ext->add($id, 's', 'begin', new ext_digittimeout(3));
+ $ext->add($id, 's', '', new ext_responsetimeout($details['timeout']));
+ if ($announcement != '')
+ $ext->add($id, 's', '', new ext_background($announcement));
+ $ext->add($id, 'hang', '', new ext_playback('vm-goodbye'));
+ $ext->add($id, 'hang', '', new ext_hangup(''));
+
+ $default_t=true;
+
+ // Actually add the IVR commands now.
+ $dests = ivr_get_dests($item['ivr_id']);
+ if (!empty($dests)) {
+ foreach($dests as $dest) {
+ if ($dest['selection'] == 't') $timeout=true;
+ if ($dest['selection'] == 'i') $invalid=true;
+ $ext->add($id, $dest['selection'],'', new ext_dbdel('${BLKVM_OVERRIDE}'));
+ $ext->add($id, $dest['selection'],'', new ext_setvar('__NODEST', ''));
+ if ($dest['ivr_ret']) {
+ $ext->add($id, $dest['selection'],'', new ext_gotoif('$["x${IVR_CONTEXT_${CONTEXT}}" = "x"]', $dest['dest'].':${IVR_CONTEXT_${CONTEXT}},return,1'));
+ } else {
+ $ext->add($id, $dest['selection'],'', new ext_goto($dest['dest']));
+ }
+ }
+ }
+ // Apply invalid if required
+ if (!isset($invalid)) {
+ $ext->add($id, 'i', '', new ext_playback('invalid'));
+ $ext->add($id, 'i', '', new ext_goto('loop,1'));
+ $addloop=true;
+ }
+ if (!isset($timeout)) {
+ $ext->add($id, 't', '', new ext_goto('loop,1'));
+ $addloop=true;
+ }
+ if (isset($addloop)) {
+ $ext->add($id, 'loop', '', new ext_setvar('LOOPCOUNT','$[${LOOPCOUNT} + 1]'));
+ $ext->add($id, 'loop', '', new ext_gotoif('$[${LOOPCOUNT} > 2]','hang,1'));
+ $ext->add($id, 'loop', '', new ext_goto($id.',s,begin'));
+
+ // these need to be reset or inheritance problems makes them go away in some conditions and infinite inheritance creates other problems
+ //
+ $ext->add($id, 'return', '', new ext_setvar('_IVR_CONTEXT', '${CONTEXT}'));
+ $ext->add($id, 'return', '', new ext_setvar('_IVR_CONTEXT_${CONTEXT}', '${IVR_CONTEXT_${CONTEXT}}'));
+ $ext->add($id, 'return', '', new ext_goto($id.',s,begin'));
+ }
+ $ext->add($id, 'fax', '', new ext_goto('ext-fax,in_fax,1'));
+ }
+ }
+ break;
+ }
+}
+
+
+
+function ivr_get_ivr_id($name) {
+ global $db;
+ $res = $db->getRow("SELECT ivr_id from ivr where displayname='$name'");
+ if (count($res) == 0) {
+ // It's not there. Create it and return the ID
+ sql("INSERT INTO ivr (displayname, enable_directory, enable_directdial, timeout) values('$name', 'CHECKED', 'CHECKED', 10)");
+ $res = $db->getRow("SELECT ivr_id from ivr where displayname='$name'");
+ needreload();
+ }
+ return ($res[0]);
+
+}
+
+function ivr_add_command($id, $cmd, $dest, $ivr_ret) {
+ global $db;
+ // Does it already exist?
+ $res = $db->getRow("SELECT * from ivr_dests where ivr_id='$id' and selection='$cmd'");
+ $ivr_ret = $ivr_ret ? 1 : 0;
+ if (count($res) == 0) {
+ // Just add it.
+ sql("INSERT INTO ivr_dests VALUES('$id', '$cmd', '$dest', '$ivr_ret')");
+ } else {
+ // Update it.
+ sql("UPDATE ivr_dests SET dest='$dest', ivr_ret='$ivr_ret' where ivr_id='$id' and selection='$cmd'");
+ }
+ needreload();
+}
+function ivr_do_edit($id, $post) {
+
+ $displayname = isset($post['displayname'])?$post['displayname']:'';
+ $timeout = isset($post['timeout'])?$post['timeout']:'';
+ $ena_directory = isset($post['ena_directory'])?$post['ena_directory']:'';
+ $ena_directdial = isset($post['ena_directdial'])?$post['ena_directdial']:'';
+ $annmsg = isset($post['annmsg'])?$post['annmsg']:'';
+ $dircontext = isset($post['dircontext'])?$post['dircontext']:'';
+
+ if (!empty($ena_directory))
+ $ena_directory='CHECKED';
+
+
+ if (!empty($ena_directdial))
+ $ena_directdial='CHECKED';
+
+ sql("UPDATE ivr SET displayname='$displayname', enable_directory='$ena_directory', enable_directdial='$ena_directdial', timeout='$timeout', announcement='$annmsg', dircontext='$dircontext' WHERE ivr_id='$id'");
+
+ // Delete all the old dests
+ sql("DELETE FROM ivr_dests where ivr_id='$id'");
+ // Now, lets find all the goto's in the post. Destinations return gotoN => foo and get fooN for the dest.
+ // Is that right, or am I missing something?
+ foreach(array_keys($post) as $var) {
+ if (preg_match('/goto(\d+)/', $var, $match)) {
+ // This is a really horrible line of code. take N, and get value of fooN. See above. Note we
+ // get match[1] from the preg_match above
+ $dest = $post[$post[$var].$match[1]];
+ $cmd = $post['option'.$match[1]];
+ $ivr_ret = $post['ivr_ret'.$match[1]];
+ // Debugging if it all goes pear shaped.
+ // print "I think pushing $cmd does $dest<br>\n";
+ if (strlen($cmd))
+ ivr_add_command($id, $cmd, $dest, $ivr_ret);
+ }
+ }
+ needreload();
+}
+
+
+function ivr_list() {
+ global $db;
+
+ $sql = "SELECT * FROM ivr where displayname <> '__install_done' ORDER BY displayname";
+ $res = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($res)) {
+ return null;
+ }
+ return $res;
+}
+
+function ivr_get_details($id) {
+ global $db;
+
+ $sql = "SELECT * FROM ivr where ivr_id='$id'";
+ $res = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($res)) {
+ return null;
+ }
+ return $res[0];
+}
+
+function ivr_get_dests($id) {
+ global $db;
+
+ $sql = "SELECT selection, dest, ivr_ret FROM ivr_dests where ivr_id='$id' ORDER BY selection";
+ $res = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($res)) {
+ return null;
+ }
+ return $res;
+}
+
+function ivr_get_name($id) {
+ $res = ivr_get_details($id);
+ if (isset($res['displayname'])) {
+ return $res['displayname'];
+ } else {
+ return null;
+ }
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES/ivr.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES/ivr.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES/ivr.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES/ivr.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/i18n/he_IL/LC_MESSAGES/ivr.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,92 @@
+# Hebrew version for IVR FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.ivr.php:67 page.ivr.php:105
+msgid "Digital Receptionist"
+msgstr "××¢× × ×§×××"
+
+#: page.ivr.php:69
+msgid "Instructions"
+msgstr "×× ×××ת"
+
+#: page.ivr.php:70
+msgid ""
+"You use the Digital Receptionist to make IVR's, Interactive Voice Responce "
+"systems."
+msgstr "×שת×ש ××ער×ת ×××¢× × ×ק××× ××× ××צ×ר IVR (××¢× × ×§××× ××× ×ר×ק×××× - Interactive Voice Response)"
+
+#: page.ivr.php:71
+msgid ""
+"When creating a menu option, apart from the standard options of 0-9,* and #, "
+"you can also use 'i' and 't' destinations."
+msgstr "×ש××צר×× ×פשר×ת תפר××, ×××¥ ×××פשר×××ת ×ס×× ×ר×××ת ×©× 0-9, ×××××ת ×ס××××ת, ת××× ××שת×ש ×× ×××¢××× 'i' ×-'t'."
+
+#: page.ivr.php:72
+msgid ""
+"'i' is used when the caller pushes an invalid button, and 't' is used when "
+"there is no response."
+msgstr "×-'i' ×שת×ש×× ×שר×צ×× ×××¤× ×ת ×תקשר ש×××¥ ×¢× ×פשר×ת ש×× ×§×××ת, ××-'t' ×שת×ש×× ××שר ×× ×תק××ת ××××¦× ×¢× ××£ ×פשר×ת ×××שת×ש."
+
+#: page.ivr.php:73
+msgid ""
+"If those options aren't supplied, the default 't' is to replay the menu "
+"three times and then hang up,"
+msgstr "×× ×פשר×××ת ××× ××× × × ××ר×ת, ×ר×רת ××××× ×©× 't' ××× ××ש×××¢ ש×× ×ת ×תפר×× ×××©× ×¢× ×©××ש פע×××, ××××ר ××× ×× ×ª×§ ×ת ×ש×××, "
+
+#: page.ivr.php:74
+msgid ""
+"and the default 'i' is to say 'Invalid option, please try again' and replay "
+"the menu."
+msgstr "×××פשר×ת 'i' ××ר×רת ××××× ×ª×©×××¢ ×ת ×××©×¤× 'Invalid option, please try again' ×תש×××¢ ש×× ×ת ×תפר×× ×××ר ×××."
+
+#: page.ivr.php:75
+msgid "After three invalid attempts, the line is hung up."
+msgstr "×××¨× ×©×××©× × ×¡××× ×ת ××ש×××, ××§× ×× ×תק."
+
+#: page.ivr.php:85
+msgid "Add IVR"
+msgstr "××סף IVR"
+
+#: page.ivr.php:106
+msgid "Edit Menu"
+msgstr "ער×× ×ª×¤×¨××"
+
+#: page.ivr.php:153 page.ivr.php:173
+msgid "Announcement"
+msgstr "××ר××"
+
+#: page.ivr.php:153
+msgid ""
+"Message to be played to the caller. To add additional recordings please use "
+"the \"System Recordings\" MENU to the left"
+msgstr "××××¢× ×©×ª×ש××¢ ××תקשר. ××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ×שר ××¦× ×©×××"
+
+#: page.ivr.php:158
+msgid "None"
+msgstr "×××"
+
+#: page.ivr.php:173
+msgid ""
+"Message to be played to the caller.<br><br>You must install and enable the "
+"\"Systems Recordings\" Module to edit this option"
+msgstr "××××¢× ×שר ת×ש××¢ ××תקשר.<br /><br />××ª× ×××× ××תק×× ×××פע×× ×ת ×××××× \"×ק×××ת ×ער×ת\" ×¢× ×× ×ª ×ער×× ×פשר×ת ××ת"
+
+#: functions.inc.php:20
+msgid ""
+"There is a problem with install.sql, cannot re-create databases. Contact "
+"support\n"
+msgstr "××©× × ××¢××× ×¢× install.sql, ×× ×××× ××צ×ר ×××ש ×ת ×ס×× ×× ×ª×× ××. צ×ר קשר ×¢× ×ª××××\n"
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,67 @@
+<?php
+sql('CREATE TABLE IF NOT EXISTS ivr ( ivr_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, displayname VARCHAR(50), deptname VARCHAR(50), enable_directory VARCHAR(8), enable_directdial VARCHAR(8), timeout INT, announcement VARCHAR(255), dircontext VARCHAR ( 50 ) DEFAULT "default" )');
+sql('CREATE TABLE IF NOT EXISTS ivr_dests ( ivr_id INT NOT NULL, selection VARCHAR(10), dest VARCHAR(50))');
+
+global $db;
+
+// Now, we need to check for upgrades.
+// V1.0, old IVR. You shouldn't see this, but check for it anyway, and assume that it's 2.0
+// V2.0, Original Release
+// V2.1, added 'directorycontext' to the schema
+// v2.2, announcement changed to support filenames instead of ID's from recordings table
+//
+
+$ivr_modcurrentvers = modules_getversion('ivr');
+
+// Add the col
+$sql = "SELECT dircontext FROM ivr";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = 'ALTER TABLE ivr ADD COLUMN dircontext VARCHAR ( 50 ) DEFAULT "default"';
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+}
+
+if (version_compare($ivr_modcurrentvers, "2.2", "<")) {
+ //echo "<p>Start 2.2 upgrade</p>";
+ $sql = "ALTER TABLE ivr CHANGE COLUMN announcement announcement VARCHAR ( 255 )";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ } else {
+ // Change existing records
+ //echo "<p>Updating existing records</p>";
+ $existing = sql("SELECT DISTINCT announcement FROM ivr WHERE displayname <> '__install_done' AND announcement IS NOT NULL", "getAll");
+ foreach ($existing as $item) {
+ $recid = $item[0];
+ //echo "<p>processing '$recid'</p>";
+ $sql = "SELECT filename FROM recordings WHERE id = '$recid' AND displayname <> '__invalid'";
+ $recordings = sql($sql, "getRow");
+ if (is_array($recordings)) {
+ $filename = (isset($recordings[0]) ? $recordings[0] : '');
+ //echo "<p>filename: $filename";
+ if ($filename != '') {
+ $sql = "UPDATE ivr SET announcement = '".str_replace("'", "''", $filename)."' WHERE announcement = '$recid'";
+ $upcheck = $db->query($sql);
+ if(DB::IsError($upcheck))
+ die($upcheck->getDebugInfo());
+ }
+ }
+ }
+ }
+}
+
+// Version 2.5.7 adds auto-return to IVR
+$sql = "SELECT ivr_ret FROM ivr_dests";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE ivr_dests ADD ivr_ret TINYINT(1) NOT NULL DEFAULT 0;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+CREATE TABLE IF NOT EXISTS ivr ( ivr_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, displayname VARCHAR(50), deptname VARCHAR(50), enable_directory VARCHAR(8), enable_directdial VARCHAR(8), timeout INT, announcement VARCHAR(255), dircontext VARCHAR ( 50 ) DEFAULT "default" );
+CREATE TABLE IF NOT EXISTS ivr_dests ( ivr_id INT NOT NULL, selection VARCHAR(10), dest VARCHAR(50), ivr_ret TINYINT(1) NOT NULL DEFAULT 0);
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,29 @@
+<module>
+ <rawname>ivr</rawname>
+ <name>IVR</name>
+ <version>2.5.10</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Creates Digital Receptionist (aka Auto-Attendant, aka Interactive Voice Response) menus. These can be used to send callers to different locations (eg, "Press 1 for sales") and/or allow direct-dialing of extension numbers.
+ </description>
+ <changelog>
+ *2.5.10* Fix bug where pressing enter in a field would delete the IVR
+ *2.5.9* some tweaks because of strange inheritance behavior, so need to reset IVR variables upon returns for some looping conditions
+ *2.5.8* insert a return extension so that annoucements and ivrs returning don't trample back over the top
+ *2.5.7* extended schema and added ability to have ivr options to return to calling parent ivrs if appropriate, otherwise specified destination
+ *2.5.6* Added: Set(IVR_CONTEXT=${CONTEXT}) to facilitate simple returns to calling context (e.g. from an announcement or custom app)
+ *2.5.5* Fix bug #1651 and apply patch #1664, allow voicemail as destination if ivr is entered from a queue breakout option
+ *2.5.4* Fix bug #1417
+ *2.5.3* Add he_IL translation
+ *2.5.2* Updated for freepbx 2.2.0rc2
+ *2.5.1* Changed name to IVR (from Digital Receptionist)
+ *2.5* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <menuitems>
+ <ivr>IVR</ivr>
+ </menuitems>
+ <location>release/2.2/ivr-2.5.9.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-IVR</info>
+ <md5sum>20b2b50a74c3150b3904be5f9e0b7359</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/page.ivr.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/page.ivr.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/page.ivr.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,321 @@
+<?php
+/* $Id: page.ivr.php 3760 2007-02-09 22:44:33Z gregmac $ */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+// The Digital Receptionist code is a rat's nest. If you are planning on making significant modifications, just re-write from scratch.
+// OK! You're the boss. --Rob
+// Re-written from the ground up by Rob Thomas <xrobau at gmail.com> 23rd March, 2006.
+
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$id = isset($_REQUEST['id'])?$_REQUEST['id']:'';
+$dircontext = isset($_SESSION["AMP_user"]->_deptname)?$_SESSION["AMP_user"]->_deptname:'';
+$nbroptions = isset($_REQUEST['nbroptions'])?$_REQUEST['nbroptions']:'3';
+
+if (empty($dircontext))
+ $dircontext = 'default';
+// So. Lets check to make sure everything's happy
+ivr_init();
+
+switch ($action) {
+ case "add":
+ $id = ivr_get_ivr_id('Unnamed');
+ // Set the defaults
+ $def['timeout'] = 5;
+ $def['ena_directdial'] = 'CHECKED';
+ $def['ena_directory'] = 'CHECKED';
+ ivr_sidebar($id);
+ ivr_show_edit($id, 3, $def);
+ break;
+ case "edit":
+ ivr_sidebar($id);
+ ivr_show_edit($id, $nbroptions, $_POST);
+ break;
+ case "edited":
+ if (isset($_REQUEST['delete'])) {
+ sql("DELETE from ivr where ivr_id='$id'");
+ sql("DELETE FROM ivr_dests where ivr_id='$id'");
+ needreload();
+ } else {
+ ivr_do_edit($id, $_POST);
+ ivr_sidebar($id);
+ if (isset($_REQUEST['increase']))
+ $nbroptions++;
+ if (isset($_REQUEST['decrease'])) {
+ $nbroptions--;
+ }
+ if ($nbroptions < 1)
+ $nbroptions = 1;
+ //ivr_show_edit($id, $nbroptions, $_POST);
+ $url = 'config.php?type=setup&display=ivr&action=edit&id='.$id.'&nbroptions='.$nbroptions;
+ redirect($url);
+ break;
+ }
+ default:
+ ivr_sidebar($id);
+?>
+<div class="content">
+<h2><?php echo _("Digital Receptionist"); ?></h2>
+<h3><?php
+echo _("Instructions")."</h3>";
+echo _("You use the Digital Receptionist to make IVR's, Interactive Voice Responce systems.")."<br />\n";
+echo _("When creating a menu option, apart from the standard options of 0-9,* and #, you can also use 'i' and 't' destinations.")."\n";
+echo _("'i' is used when the caller pushes an invalid button, and 't' is used when there is no response.")."\n";
+echo _("If those options aren't supplied, the default 't' is to replay the menu three times and then hang up,")."\n";
+echo _("and the default 'i' is to say 'Invalid option, please try again' and replay the menu.")."\n";
+echo _("After three invalid attempts, the line is hung up.")."\n"; ?>
+</div>
+
+<?php
+}
+
+
+function ivr_sidebar($id) {
+?>
+ <div class="rnav"><ul>
+ <li><a id="<?php echo empty($id)?'current':'nul' ?>" href="config.php?display=ivr&action=add"><?php echo _("Add IVR")?></a></li>
+<?php
+
+ $tresults = ivr_list();
+ if (isset($tresults)){
+ foreach ($tresults as $tresult) {
+ echo "<li><a id=\"".($id==$tresult['ivr_id'] ? 'current':'nul')."\" href=\"config.php?display=ivr";
+ echo "&action=edit&id={$tresult['ivr_id']}\">{$tresult['displayname']}</a></li>\n";
+ }
+ }
+ echo "</ul></div>\n";
+}
+
+function ivr_show_edit($id, $nbroptions, $post) {
+ global $db;
+
+ $ivr_details = ivr_get_details($id);
+ $ivr_dests = ivr_get_dests($id);
+?>
+ <div class="content">
+ <h2><?php echo _("Digital Receptionist"); ?></h2>
+ <h3><?php echo _("Edit Menu")." ".$ivr_details['displayname']; ?></h3>
+<?php
+?>
+ <form name="prompt" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return prompt_onsubmit();">
+ <input type="hidden" name="action" value="edited" />
+ <input type="hidden" name="display" value="ivr" />
+ <input type="hidden" name="id" value="<?php echo $id ?>" />
+ <input name="Submit" type="submit" style="display:none;" value="save" />
+ <input name="delete" type="submit" value="<?php echo _("Delete")." "._("Digital Receptionist")." {$ivr_details['displayname']}"; ?>" />
+ <table>
+ <tr><td colspan=2><hr /></td></tr>
+ <tr>
+ <td><a href="#" class="info">Change Name<span>This changes the short name, visible on the right, of this IVR</span></a></td>
+ <td><input type="text" name="displayname" value="<?php echo $ivr_details['displayname'] ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">Timeout<span>The amount of time (in seconds) before the 't' option, if specified, is used</span></a></td>
+ <td><input type="text" name="timeout" value="<?php echo $ivr_details['timeout'] ?>"></td>
+ </tr>
+ <?php if ( function_exists('voicemail_getVoicemail') ) { ?>
+ <tr>
+ <td><a href="#" class="info">Enable Directory<span>Let callers into the IVR dial '#' to access the directory</span></a></td>
+ <td><input type="checkbox" name="ena_directory" <?php echo $ivr_details['enable_directory'] ?>></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">Directory Context<span>When # is selected, this is the voicemail directory context that is used</span></a></td>
+ <td>
+ <select name="dircontext"/>
+ <?php
+ $tresults = voicemail_getVoicemail();
+ $vmcontexts = array_keys($tresults);
+ foreach ($vmcontexts as $vmc) {
+ if ($vmc != 'general' )
+ echo '<option value="'.$vmc.'"'.($vmc == $ivr_details['dircontext'] ? ' SELECTED' : '').'>'.$vmc."</option>\n";
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <?php } ?>
+ <tr>
+ <td><a href="#" class="info">Enable Direct Dial<span>Let callers into the IVR dial an extension directly</span></a></td>
+ <td><input type="checkbox" name="ena_directdial" <?php echo $ivr_details['enable_directdial'] ?>></td>
+ </tr>
+<?php
+ $annmsg = isset($ivr_details['announcement'])?$ivr_details['announcement']:'';
+ if(function_exists('recordings_list')) { //only include if recordings is enabled ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Announcement")?><span><?php echo _("Message to be played to the caller. To add additional recordings please use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="annmsg"/>
+ <?php
+ $tresults = recordings_list();
+ echo '<option value="">'._("None")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $annmsg ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+
+<?php
+ } else {
+?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Announcement")?><span><?php echo _("Message to be played to the caller.<br><br>You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td>
+ <td>
+ <?php
+ $default = (isset($annmsg) ? $annmsg : '');
+ ?>
+ <input type="hidden" name="annmsg" value="<?php echo $default; ?>"><?php echo ($default != '' ? $default : 'None'); ?>
+ </td>
+ </tr>
+<?php
+ }
+?>
+
+
+ <tr><td colspan=2><hr /></td></tr>
+ <tr><td colspan=2>
+ <input name="increase" type="submit" value="<?php echo _("Increase Options")?>">
+
+ <input name="Submit" type="submit" value="<?php echo _("Save")?>">
+
+ <?php if ($nbroptions > 1) { ?>
+ <input name="decrease" type="submit" value="<?php echo _("Decrease Options")?>">
+ <?php } ?>
+ </td></tr>
+ <tr><td colspan=2><hr /></td></tr>
+<?php
+ // Draw the destinations
+ $dests = ivr_get_dests($id);
+ $count = 0;
+ if (!empty($dests)) {
+ foreach ($dests as $dest) {
+ drawdestinations($count, $dest['selection'], $dest['dest'], $dest['ivr_ret']);
+ $count++;
+ }
+ }
+ while ($count < $nbroptions) {
+ drawdestinations($count, null, null, 0);
+ $count++;
+ }
+?>
+
+ </table>
+<?php
+ if ($nbroptions < $count) {
+ echo "<input type='hidden' name='nbroptions' value=$count />\n";
+ } else {
+ echo "<input type='hidden' name='nbroptions' value=$nbroptions />\n";
+ }
+?>
+ <input name="increase" type="submit" value="<?php echo _("Increase Options")?>">
+
+ <input name="Submit" type="submit" value="<?php echo _("Save")?>">
+
+ <?php if ($nbroptions > 1) { ?>
+ <input name="decrease" type="submit" value="<?php echo _("Decrease Options")?>">
+ <?php } ?>
+
+ <script language="javascript">
+ <!--
+
+ var theForm = document.prompt;
+
+ function prompt_onsubmit() {
+ var msgInvalidOption = "<?php echo _("Invalid option"); ?>";
+
+ defaultEmptyOK = true;
+
+ // go thru the form looking for options
+ // where the option isn't blank (as that will be removed) do the validation
+ var allelems = theForm.elements;
+ if (allelems != null)
+ {
+ var i, elem;
+ for (i = 0; elem = allelems[i]; i++)
+ {
+ if (elem.type == 'text' && elem.name.indexOf('option') == 0)
+ {
+ if (elem.value != '') {
+ if (!isIVROption(elem.value))
+ return warnInvalid(elem, msgInvalidOption);
+
+ var gotoNum = elem.name.charAt(6);
+ var isok = validateSingleDestination(theForm,gotoNum,true);
+ if (!isok)
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+
+ //-->
+ </script>
+ </form>
+ </div>
+
+
+<?php
+
+echo "</div>\n";
+}
+
+function drawdestinations($count, $sel, $dest, $ivr_ret) { ?>
+ <tr> <td style="text-align:right;">
+
+ <small><a href="#" class="info"><?php echo _("Return to IVR")?><span><?php echo _("Check this box to have this option return to a parent IVR if it was called from a parent IVR. If not, it will go to the chosen destination.<br><br>The return path will be to any IVR that was in the call path prior to this IVR which could lead to strange results if there was an IVR called in the call path but not immediately before this")?></span></a></small><input type="checkbox" name="ivr_ret<?php echo $count ?>" "<?php echo $ivr_ret?'CHECKED':''; ?>"<br><br />
+ <input size="2" type="text" name="option<?php echo $count ?>" value="<?php echo $sel ?>"><br />
+<?php if (strlen($sel)) { ?>
+ <i style='font-size: x-small'>Leave blank to remove</i>
+<?php } ?>
+ </td>
+ <td> <table> <?php echo drawselects($dest,$count); ?> </table> </td>
+ </tr>
+ <tr><td colspan=2><hr /></td></tr>
+<?php
+}
+
+// this can be removed in 2.2 and put back to just runModuleSQL which is in admin/functions.inc.php
+// I didn't want to do it in 2.1 as there's a significant user base out there, and it will break
+// them if we do it here.
+
+function localrunModuleSQL($moddir,$type){
+ global $db;
+ $data='';
+ if (is_file("modules/{$moddir}/{$type}.sql")) {
+ // run sql script
+ $fd = fopen("modules/{$moddir}/{$type}.sql","r");
+ while (!feof($fd)) {
+ $data .= fread($fd, 1024);
+ }
+ fclose($fd);
+
+ preg_match_all("/((SELECT|INSERT|UPDATE|DELETE|CREATE|DROP).*);\s*\n/Us", $data, $matches);
+
+ foreach ($matches[1] as $sql) {
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ return true;
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-ivr/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ivr/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ivr/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+DROP TABLE IF EXISTS ivr;
+DROP TABLE IF EXISTS ivr_dests;
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/asterisk-full-log.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/asterisk-full-log.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/asterisk-full-log.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<html>
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
+<title>/var/log/asterisk/full - last 2000 lines</title>
+</head>
+
+<body>
+<b>/var/log/asterisk/full - last 2000 lines</b>
+<hr>
+<br>
+<?
+echo system ('tail --line=2000 /var/log/asterisk/full | sed -e "s/$/<br>/"');
+?>
+
+</body>
+</html>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-logfiles/asterisk-full-log.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-logfiles (2.2-1.0.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:29 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-logfiles
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-logfiles
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Asterisk Logfiles
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:29 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/logfiles/
+*.sql usr/share/freepbx/modules/logfiles/
+*.sqlite usr/share/freepbx/modules/logfiles/
+*.html usr/share/freepbx/modules/logfiles/
+*.xml usr/share/freepbx/modules/logfiles/
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install logfiles || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall logfiles || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall logfiles || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-logfiles/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/logfiles.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/logfiles.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/logfiles.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+<a target="AsteriskFullLog" href="modules/logfiles/asterisk-full-log.php">Asterisk Full debug log (last 2000 lines)</a><br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+<br>
+
Property changes on: freepbx/modules-2.2/modules/freepbx-module-logfiles/logfiles.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,13 @@
+<module>
+ <rawname>logfiles</rawname>
+ <name>Asterisk Logfiles</name>
+ <version>1.0.1</version>
+ <type>tool</type>
+ <category>Maintenance</category>
+ <menuitems>
+ <logfiles>Asterisk Logfiles</logfiles>
+ </menuitems>
+ <location>release/logfiles-1.0.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-LogFiles</info>
+ <md5sum>67f2388f242071742e22247ed0ac0898</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-logfiles/page.logfiles.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-logfiles/page.logfiles.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-logfiles/page.logfiles.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,16 @@
+<?php
+
+$display=$_REQUEST['display'];
+
+switch($display) {
+ default:
+
+ echo "<h2>Asterisk Log Files</h2>";
+ include 'logfiles.php';
+
+ break;
+
+}
+?>
+
+</div>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-logfiles/page.logfiles.php
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-manager (2.2-1.2-2) unstable; urgency=low
+
+ * SQLite3 support. See upstream
+ http://www.freepbx.org/trac/ticket/1776
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 15:35:51 +0200
+
+freepbx-module-manager (2.2-1.2-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:40 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-manager
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-manager
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Asterisk API
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:40 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/manager/
+*.sql usr/share/freepbx/modules/manager/
+*.sqlite usr/share/freepbx/modules/manager/
+*.html usr/share/freepbx/modules/manager/
+*.xml usr/share/freepbx/modules/manager/
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. See upstream http://www.freepbx.org/trac/ticket/1776
+
+ at DPATCH@
+diff -urNad freepbx-module-manager~/install.php freepbx-module-manager/install.php
+--- freepbx-module-manager~/install.php 1970-01-01 02:00:00.000000000 +0200
++++ freepbx-module-manager/install.php 2007-02-14 15:49:15.000000000 +0200
+@@ -0,0 +1,23 @@
++<?php
++
++global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS manager (
++ `manager_id` INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ `name` VARCHAR( 15 ) NOT NULL ,
++ `secret` VARCHAR( 50 ) ,
++ `deny` VARCHAR( 255 ) ,
++ `permit` VARCHAR( 255 ) ,
++ `read` VARCHAR( 50 ) ,
++ `write` VARCHAR( 50 )
++)";
++
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die("Can not create `manager` table" . $check->getMessage() . "\n");
++}
++
++?>
+diff -urNad freepbx-module-manager~/install.sql freepbx-module-manager/install.sql
+--- freepbx-module-manager~/install.sql 2006-05-31 13:16:54.000000000 +0300
++++ freepbx-module-manager/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1,3 +0,0 @@
+-
+-CREATE TABLE IF NOT EXISTS `manager` ( `manager_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` VARCHAR( 15 ) NOT NULL , `secret` VARCHAR( 50 ) , `deny` VARCHAR( 255 ) , `permit` VARCHAR( 255 ) , `read` VARCHAR( 50 ) , `write` VARCHAR( 50 ) );
+-
Property changes on: freepbx/modules-2.2/modules/freepbx-module-manager/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install manager || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall manager || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall manager || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-manager/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-manager/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-manager/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,161 @@
+<?php
+
+function manager_gen_conf() {
+ $file = "/tmp/manager_additional_".rand().".conf";
+ $content = "";
+ $managers = manager_list();
+ if (is_array($managers)) {
+ foreach ($managers as $manager) {
+ $res = manager_get($manager['name']);
+ $content .= "[".$res['name']."]\n";
+ $content .= "secret = ".$res['secret']."\n";
+ $tmp = explode("&", $res['deny']);
+ foreach ($tmp as $item) {
+ $content .= "deny=$item\n";
+ }
+ $tmp = explode("&", $res['permit']);
+ foreach ($tmp as $item) {
+ $content .= "permit=$item\n";
+ }
+ $content .= "read = ".$res['read']."\n";
+ $content .= "write = ".$res['write']."\n";
+ $content .= "\n";
+ }
+ }
+ $fd = fopen($file, "w");
+ fwrite($fd, $content);
+ fclose($fd);
+ if (!rename($file, "/etc/asterisk/manager_additional.conf")) {
+ echo "<script>javascript:alert('"._("Error writing the manager additional file.")."');</script>";
+ }
+}
+
+// Get the manager list
+function manager_list() {
+ global $db;
+ $sql = "SELECT name, secret FROM manager ORDER BY name";
+ $res = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($res)) {
+ return null;
+ }
+ return $res;
+}
+
+// Get manager infos
+function manager_get($p_name) {
+ global $db;
+ $sql = "SELECT name,secret,deny,permit,`read`,`write` FROM manager WHERE name = '$p_name'";
+ $res = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+ return $res;
+}
+
+// Used to set the correct values for the html checkboxes
+function manager_format_out($p_tab) {
+ $res['name'] = $p_tab['name'];
+ $res['secret'] = $p_tab['secret'];
+ $res['deny'] = $p_tab['deny'];
+ $res['permit'] = $p_tab['permit'];
+
+ $tmp = explode(',', $p_tab['read']);
+ foreach($tmp as $item) {
+ $res['r'.$item] = true;
+ }
+
+ $tmp = explode(',', $p_tab['write']);
+ foreach($tmp as $item) {
+ $res['w'.$item] = true;
+ }
+
+ return $res;
+}
+
+// Delete a manager
+function manager_del($p_name) {
+ $results = sql("DELETE FROM manager WHERE name = \"$p_name\"","query");
+}
+
+function manager_format_in($p_tab) {
+ if (!isset($res['read'])) {
+ $res['read'] = "";
+ }
+ if (!isset($res['write'])) {
+ $res['write'] = "";
+ }
+ if (isset($p_tab['rsystem']))
+ $res['read'] .= "system,";
+ if (isset($p_tab['rcall']))
+ $res['read'] .= "call,";
+ if (isset($p_tab['rlog']))
+ $res['read'] .= "log,";
+ if (isset($p_tab['rverbose']))
+ $res['read'] .= "verbose,";
+ if (isset($p_tab['rcommand']))
+ $res['read'] .= "command,";
+ if (isset($p_tab['ragent']))
+ $res['read'] .= "agent,";
+ if (isset($p_tab['ruser']))
+ $res['read'] .= "user";
+
+ if (isset($p_tab['wsystem']))
+ $res['write'] .= "system,";
+ if (isset($p_tab['wcall']))
+ $res['write'] .= "call,";
+ if (isset($p_tab['wlog']))
+ $res['write'] .= "log,";
+ if (isset($p_tab['wverbose']))
+ $res['write'] .= "verbose,";
+ if (isset($p_tab['wcommand']))
+ $res['write'] .= "command,";
+ if (isset($p_tab['wagent']))
+ $res['write'] .= "agent,";
+ if (isset($p_tab['wuser']))
+ $res['write'] .= "user";
+
+ return $res;
+}
+
+// Add a manager
+function manager_add($p_name, $p_secret, $p_deny, $p_permit, $p_read, $p_write) {
+ $managers = manager_list();
+ if (is_array($managers)) {
+ foreach ($managers as $manager) {
+ if ($manager['name'] === $p_name) {
+ echo "<script>javascript:alert('"._("This manager already exists")."');</script>";
+ return false;
+ }
+ }
+ }
+ $results = sql("INSERT INTO manager set name='$p_name' , secret='$p_secret' , deny='$p_deny' , permit='$p_permit' , `read`='$p_read' , `write`='$p_write'");
+}
+
+
+// Asterisk API Module hooking
+// Input:
+// $p_manager = default selected user
+// $dummy = unused
+// $viewing_itemid, $target_menuid
+function manager_hook_phpagiconf($viewing_itemid, $target_menuid) {
+ global $db;
+
+ switch($target_menuid) {
+ case 'phpagiconf':
+ $sql = "SELECT asman_user FROM phpagiconf";
+ $res = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($res)) {
+ return null;
+ }
+ $selectedmanager = $res['asman_user'];
+ break;
+ }
+ $output = "<tr><td><a href=\"#\" class=\"info\">"._("Choose Manager:")."<span>"._("Choose the user that PHPAGI will use to connect the Asterisk API.")."</span></a></td><td><select name=\"asmanager\">";
+ $selected = "";
+ $managers = manager_list();
+ foreach ($managers as $manager) {
+ ($manager['name'] === $selectedmanager) ? $selected="selected=\"selected\"" : $selected="";
+ $output .= "<option value=\"".$manager['name']."/".$manager['secret']."\" $selected>".$manager['name'];
+ }
+ $output .="</select></td></tr>";
+ return $output;
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES/manager.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES/manager.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES/manager.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES/manager.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/i18n/fr_FR/LC_MESSAGES/manager.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,112 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Xavier Ourcière <xourciere at propolys.com>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-05-04 20:03+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Xavier Ourcière <xourciere at propolys.com>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: functions.inc.php:29
+msgid "Error writing the manager additional file."
+msgstr "Erreur d'écriture du fichier de configuration."
+
+#: functions.inc.php:117
+msgid "This manager already exists"
+msgstr "Ce manager existe déjà"
+
+#: page.manager.php:49 page.manager.php:80 page.manager.php:87
+msgid "Add Manager"
+msgstr "Ajout Manager"
+
+#: page.manager.php:63
+msgid "Manager"
+msgstr ""
+
+#: page.manager.php:63
+msgid "deleted"
+msgstr "supprimé"
+
+#: page.manager.php:77
+msgid "Manager:"
+msgstr ""
+
+#: page.manager.php:78
+msgid "Delete Manager"
+msgstr "Supprimer le Manager"
+
+#: page.manager.php:87
+msgid "Edit Manager"
+msgstr "Edition Manager"
+
+#: page.manager.php:89
+msgid "manager name:"
+msgstr "nom du manager:"
+
+#: page.manager.php:89
+msgid "Name of the manager without space."
+msgstr "Nom du manager sans espace."
+
+#: page.manager.php:93
+msgid "manager secret:"
+msgstr "mot de passe:"
+
+#: page.manager.php:93
+msgid "Password for the manager."
+msgstr "Mot de passe du manager."
+
+#: page.manager.php:97
+msgid "deny:"
+msgstr ""
+
+#: page.manager.php:97
+msgid ""
+"If you want to deny many hosts or networks, use & char as separator.<br/><br/"
+">Example: 192.168.1.0/255.255.255.0&10.0.0.0/255.0.0.0"
+msgstr ""
+"Si vous souhaitez interdire plusieurs hosts ou réseaux, utilisez le caractère"
+" & comme séparateur.<br/><br>Exemple: 192.168.1.0/255.255.255.0&10.0.0.0/255."
+"0.0.0"
+
+#: page.manager.php:101
+msgid "permit:"
+msgstr ""
+
+#: page.manager.php:101
+msgid ""
+"If you want to permit many hosts or networks, use & char as separator. Look "
+"at deny example."
+msgstr ""
+"Si vous souhaitez autoriser plusieurs hosts ou réseaux, utilisez le caractère"
+" & comme séparateur."
+
+#: page.manager.php:105
+msgid "Rights"
+msgstr "Droits d'acces"
+
+#: page.manager.php:110
+msgid "Read"
+msgstr "Lecture"
+
+#: page.manager.php:110
+msgid "Write"
+msgstr "Ecriture"
+
+#: page.manager.php:112 page.manager.php:117 page.manager.php:122
+#: page.manager.php:127 page.manager.php:132 page.manager.php:137
+#: page.manager.php:142
+msgid "Check Asterisk documentation."
+msgstr "Consultez la documentation Asterisk."
+
+#: page.manager.php:147
+msgid "Check All/None."
+msgstr "Sélectionner tout/aucun"
Added: freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES/manager.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES/manager.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES/manager.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES/manager.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/i18n/he_IL/LC_MESSAGES/manager.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,116 @@
+# Hebrew version for Managers FreePBX Module
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-09-28 17:20+0300\n"
+"PO-Revision-Date: 2006-09-28 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: manager/functions.inc.php:29
+msgid "Error writing the manager additional file."
+msgstr "ש×××× ××ת××ת ×ק×××¥ ×× ×סף ×©× ××× ××××"
+
+#: manager/functions.inc.php:123
+msgid "This manager already exists"
+msgstr "××× ×× ××ר ק×××"
+
+#: manager/functions.inc.php:150
+msgid "Choose Manager:"
+msgstr "××ר ×× ××:"
+
+#: manager/functions.inc.php:150
+msgid "Choose the user that PHPAGI will use to connect the Asterisk API."
+msgstr "××ר ×ת ××שת×ש ש PHPAGI ×שת×ש ×× ××× ××ת××ר × API ×©× ×ס×ר×סק"
+
+#: manager/page.manager.php:49 manager/page.manager.php:80
+#: manager/page.manager.php:87
+msgid "Add Manager"
+msgstr "××סף ×× ××"
+
+#: manager/page.manager.php:63
+msgid "Manager"
+msgstr "×× ××"
+
+#: manager/page.manager.php:63
+msgid "deleted"
+msgstr "× ××ק"
+
+#: manager/page.manager.php:77
+msgid "Manager:"
+msgstr "×× ××:"
+
+#: manager/page.manager.php:78
+msgid "Delete Manager"
+msgstr "××ק ×× ××"
+
+#: manager/page.manager.php:87
+msgid "Edit Manager"
+msgstr "ער×× ×× ××"
+
+#: manager/page.manager.php:89
+msgid "manager name:"
+msgstr "×©× ××× ××:"
+
+#: manager/page.manager.php:89
+msgid "Name of the manager without space."
+msgstr "×©× ××× ×× ××× ×¨×××××."
+
+#: manager/page.manager.php:93
+msgid "manager secret:"
+msgstr "ס×ס×ת ×× ××:"
+
+#: manager/page.manager.php:93
+msgid "Password for the manager."
+msgstr "ס×ס×× ×¢××ר ××× ××"
+
+#: manager/page.manager.php:97
+msgid "deny:"
+msgstr "×ס××:"
+
+#: manager/page.manager.php:97
+msgid ""
+"If you want to deny many hosts or networks, use & char as separator.<br/><br/"
+">Example: 192.168.1.0/255.255.255.0&10.0.0.0/255.0.0.0"
+msgstr "×× ××ª× ×¨××¦× ××ס×× ×ר×× ××ש××× ×× ×¨×©×ª×ת, ×שת×ש ××ª× & ×ת×ר ×פר××.<br /><br />××××××: 192.168.1.0/255.255.255.0&10.0.0.0/255.0.0.0"
+
+#: manager/page.manager.php:101
+msgid "permit:"
+msgstr "×רש×:"
+
+#: manager/page.manager.php:101
+msgid ""
+"If you want to permit many hosts or networks, use & char as separator. Look "
+"at deny example."
+msgstr "×× ××ª× ×¨××¦× ××רש×ת ×ר×× ××ש××× ×× ×¨×©×ª×ת, ×שת×ש × & ×ת×ר ×פר××. ×סת×× ×××××ת ××ס×××."
+
+#: manager/page.manager.php:105
+msgid "Rights"
+msgstr "×רש××ת"
+
+#: manager/page.manager.php:110
+msgid "Read"
+msgstr "קר×××"
+
+#: manager/page.manager.php:110
+msgid "Write"
+msgstr "×ת×××"
+
+#: manager/page.manager.php:112 manager/page.manager.php:117
+#: manager/page.manager.php:122 manager/page.manager.php:127
+#: manager/page.manager.php:132 manager/page.manager.php:137
+#: manager/page.manager.php:142
+msgid "Check Asterisk documentation."
+msgstr "×××ק ×ת ×ת××¢×× ×©× ×ס×ר×סק"
+
+#: manager/page.manager.php:147
+msgid "Check All/None."
+msgstr "ס×× ×××/××××"
Added: freepbx/modules-2.2/modules/freepbx-module-manager/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,3 @@
+
+CREATE TABLE IF NOT EXISTS `manager` ( `manager_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` VARCHAR( 15 ) NOT NULL , `secret` VARCHAR( 50 ) , `deny` VARCHAR( 255 ) , `permit` VARCHAR( 255 ) , `read` VARCHAR( 50 ) , `write` VARCHAR( 50 ) );
+
Added: freepbx/modules-2.2/modules/freepbx-module-manager/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<module>
+ <rawname>manager</rawname>
+ <name>Asterisk API</name>
+ <version>1.2</version>
+ <type>tool</type>
+ <category>System Administration</category>
+ <menuitems>
+ <manager>Asterisk API</manager>
+ </menuitems>
+ <changelog>
+ *1.2* Fix UI issues, and 'Array' message.
+ *1.1* First 2.2 release. Added he_IL support, fixed some warnings.
+ </changelog>
+ <location>release/2.2/manager-1.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-ManagerAPI</info>
+ <md5sum>10c988b1df0744df34060711e2cdaf7c</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-manager/page.manager.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/page.manager.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/page.manager.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,240 @@
+<?php
+// Xavier Ourciere xourciere[at]propolys[dot]com
+//
+//This program 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.
+//
+//This program 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.
+
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+//the extension we are currently displaying
+$managerdisplay = isset($_REQUEST['managerdisplay'])?$_REQUEST['managerdisplay']:'';
+$name = isset($_REQUEST['name'])?$_REQUEST['name']:'';
+$secret = isset($_REQUEST['secret'])?$_REQUEST['secret']:'';
+$deny = isset($_REQUEST['deny'])?$_REQUEST['deny']:'';
+$permit = isset($_REQUEST['permit'])?$_REQUEST['permit']:'';
+$dispnum = "manager"; //used for switch on config.php
+
+//if submitting form, update database
+switch ($action) {
+ case "add":
+ $rights = manager_format_in($_REQUEST);
+ manager_add($name,$secret,$deny,$permit,$rights['read'],$rights['write']);
+ manager_gen_conf();
+ needreload();
+ break;
+ case "delete":
+ manager_del($managerdisplay);
+ manager_gen_conf();
+ needreload();
+ break;
+ case "edit": //just delete and re-add
+ manager_del($name);
+ $rights = manager_format_in($_REQUEST);
+ manager_add($name,$secret,$deny,$permit,$rights['read'],$rights['write']);
+ manager_gen_conf();
+ needreload();
+ break;
+}
+
+$managers = manager_list();
+?>
+
+</div>
+
+<!-- right side menu -->
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($managerdisplay=='' ? 'current':'') ?>" href="config.php?type=tool&display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Manager")?></a></li>
+<?php
+if (isset($managers)) {
+ foreach ($managers as $manager) {
+ echo "<li><a id=\"".($managerdisplay==$manager['name'] ? 'current':'')."\" href=\"config.php?type=tool&display=".urlencode($dispnum)."&managerdisplay=".$manager['name']."\">{$manager['name']}</a></li>";
+ }
+}
+?>
+<ul></div>
+
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>'._("Manager").' '.$managerdisplay.' '._("deleted").'!</h3><br><br><br><br><br><br><br><br>';
+} else {
+ if ($managerdisplay){
+ //get details for this manager
+ $thisManager = manager_get($managerdisplay);
+ //create variables
+ extract(manager_format_out($thisManager));
+ }
+
+ $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete';
+?>
+
+
+<?php if ($managerdisplay){ ?>
+ <h2><?php echo _("Manager:")." ". $managerdisplay; ?></h2>
+ <p><a href="<?php echo $delURL ?>"><?php echo _("Delete Manager")?> <?php echo $managerdisplay; ?></a></p>
+<?php } else { ?>
+ <h2><?php echo _("Add Manager"); ?></h2>
+<?php }
+?>
+ <form autocomplete="off" name="editMan" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkConf();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($managerdisplay ? 'edit' : 'add') ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($managerdisplay ? _("Edit Manager") : _("Add Manager")) ?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Manager name:")?><span><?php echo _("Name of the manager without space.")?></span></a></td>
+ <td><input type="text" name="name" value="<?php echo (isset($name) ? $name : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Manager secret:")?><span><?php echo _("Password for the manager.")?></span></a></td>
+ <td><input type="text" name="secret" value="<?php echo (isset($secret) ? $secret : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Deny:")?><span><?php echo _("If you want to deny many hosts or networks, use & char as separator.<br/><br/>Example: 192.168.1.0/255.255.255.0&10.0.0.0/255.0.0.0")?></span></a></td>
+ <td><input size="56" type="text" name="deny" value="<?php echo (isset($deny) ? $deny : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Permit:")?><span><?php echo _("If you want to permit many hosts or networks, use & char as separator. Look at deny example.")?></span></a></td>
+ <td><input size="56" type="text" name="permit" value="<?php echo (isset($permit) ? $permit : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td colspan="2"><h5><?php echo _("Rights")?><hr></h5></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <table>
+ <tr><th></th><th><?php echo _("Read")?></th><th><?php echo _("Write")?></th></tr>
+ <tr>
+ <td><a href="#" class="info">system<span><?php echo _("Check Asterisk documentation.")?></span></a></td>
+ <td><input type="checkbox" name="rsystem" <?php echo (isset($rsystem)?"checked":'');?>></input></td>
+ <td><input type="checkbox" name="wsystem" <?php echo (isset($wsystem)?"checked":'');?>></input></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">call<span><?php echo _("Check Asterisk documentation.")?></span></a></td>
+ <td><input type="checkbox" name="rcall" <?php echo (isset($rcall)?"checked":'');?>></input></td>
+ <td><input type="checkbox" name="wcall" <?php echo (isset($wcall)?"checked":'');?>></input></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">log<span><?php echo _("Check Asterisk documentation.")?></span></a></td>
+ <td><input type="checkbox" name="rlog" <?php echo (isset($rlog)?"checked":'');?>></input></td>
+ <td><input type="checkbox" name="wlog" <?php echo (isset($wlog)?"checked":'');?>></input></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">verbose<span><?php echo _("Check Asterisk documentation.")?></span></a></td>
+ <td><input type="checkbox" name="rverbose" <?php echo (isset($rverbose)?"checked":'');?>></input></td>
+ <td><input type="checkbox" name="wverbose" <?php echo (isset($wverbose)?"checked":'');?>></input></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">command<span><?php echo _("Check Asterisk documentation.")?></span></a></td>
+ <td><input type="checkbox" name="rcommand" <?php echo (isset($rcommand)?"checked":'');?>></input></td>
+ <td><input type="checkbox" name="wcommand" <?php echo (isset($wcommand)?"checked":'');?>></input></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">agent<span><?php echo _("Check Asterisk documentation.")?></span></a></td>
+ <td><input type="checkbox" name="ragent" <?php echo (isset($ragent)?"checked":'');?>></input></td>
+ <td><input type="checkbox" name="wagent" <?php echo (isset($wagent)?"checked":'');?>></input></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">user<span><?php echo _("Check Asterisk documentation.")?></span></a></td>
+ <td><input type="checkbox" name="ruser" <?php echo (isset($ruser)?"checked":'');?>></input></td>
+ <td><input type="checkbox" name="wuser" <?php echo (isset($wuser)?"checked":'');?>></input></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">ALL<span><?php echo _("Check All/None.")?></span></a></td>
+ <td><input type="checkbox" name="rallnone" onclick="readCheck();"></input></td>
+ <td><input type="checkbox" name="wallnone" onclick="writeCheck();"></input></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+<script language="javascript">
+<!--
+
+var theForm = document.editMan;
+
+theForm.name.focus();
+
+function writeCheck() {
+ if (theForm.wallnone.checked) {
+ theForm.wsystem.checked = true;
+ theForm.wcall.checked = true;
+ theForm.wlog.checked = true;
+ theForm.wverbose.checked = true;
+ theForm.wcommand.checked = true;
+ theForm.wagent.checked = true;
+ theForm.wuser.checked = true;
+ } else {
+ theForm.wsystem.checked = false;
+ theForm.wcall.checked = false;
+ theForm.wlog.checked = false;
+ theForm.wverbose.checked = false;
+ theForm.wcommand.checked = false;
+ theForm.wagent.checked = false;
+ theForm.wuser.checked = false;
+ }
+}
+
+function readCheck() {
+ if (theForm.rallnone.checked) {
+ theForm.rsystem.checked = true;
+ theForm.rcall.checked = true;
+ theForm.rlog.checked = true;
+ theForm.rverbose.checked = true;
+ theForm.rcommand.checked = true;
+ theForm.ragent.checked = true;
+ theForm.ruser.checked = true;
+ } else {
+ theForm.rsystem.checked = false;
+ theForm.rcall.checked = false;
+ theForm.rlog.checked = false;
+ theForm.rverbose.checked = false;
+ theForm.rcommand.checked = false;
+ theForm.ragent.checked = false;
+ theForm.ruser.checked = false;
+ }
+}
+
+function checkConf()
+{
+ var errName = "<?php echo _('The manager name cannot be empty or may not have any space in it.'); ?>";
+ var errSecret = "<?php echo _('The manager secret cannot be empty.'); ?>";
+ var errReadWrite = "<?php echo _('The manager read and write properties cannot be empty.'); ?>";
+ var errDeny = "<?php echo _('The manager deny is not well formated.'); ?>";
+ var errPermit = "<?php echo _('The manager permit is not well formated.'); ?>";
+ var errRead = "<?php echo _('The manager read field is not well formated.'); ?>";
+ var errWrite = "<?php echo _('The manager write field is not well formated.'); ?>";
+
+ defaultEmptyOK = false;
+ if ((theForm.name.value.search(/\s/) >= 0) || (theForm.name.value.length == 0))
+ return warnInvalid(theForm.name, errName);
+ if (theForm.secret.value.length == 0)
+ return warnInvalid(theForm.name, errSecret);
+ if ((theForm.read.value.length == 0) || (theForm.write.value.length == 0))
+ return warnInvalid(theForm.name, errReadWrite);
+ // Only IP/MASK format are checked
+ if (theForm.deny.value.search(/\b(?:\d{1,3}\.){3}\d{1,3}\b\/\b(?:\d{1,3}\.){3}\d{1,3}\b(&\b(?:\d{1,3}\.){3}\d{1,3}\b\/\b(?:\d{1,3}\.){3}\d{1,3}\b)*$/))
+ return warnInvalid(theForm.name, errDeny);
+ if (theForm.permit.value.search(/\b(?:\d{1,3}\.){3}\d{1,3}\b\/\b(?:\d{1,3}\.){3}\d{1,3}\b(&\b(?:\d{1,3}\.){3}\d{1,3}\b\/\b(?:\d{1,3}\.){3}\d{1,3}\b)*$/))
+ return warnInvalid(theForm.name, errPermit);
+ return true;
+}
+
+//-->
+</script>
+ </form>
+<?php
+} //end if action == delGRP
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-manager/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-manager/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-manager/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+
+DROP TABLE IF EXISTS manager;
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-miscapps (2.2-0.2-2) unstable; urgency=low
+
+ * Added sqlite support. Fixes upstream
+ http://www.freepbx.org/trac/ticket/1775
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 14:33:52 +0200
+
+freepbx-module-miscapps (2.2-0.2-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:28 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-miscapps
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-miscapps
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Misc Applications
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:28 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/miscapps/
+*.sql usr/share/freepbx/modules/miscapps/
+*.sqlite usr/share/freepbx/modules/miscapps/
+*.html usr/share/freepbx/modules/miscapps/
+*.xml usr/share/freepbx/modules/miscapps/
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+sqlite3-support
+
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,46 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. Fixes upstream: http://www.freepbx.org/trac/ticket/1775
+
+ at DPATCH@
+diff -urNad freepbx-module-miscapps~/install.php freepbx-module-miscapps/install.php
+--- freepbx-module-miscapps~/install.php 1970-01-01 02:00:00.000000000 +0200
++++ freepbx-module-miscapps/install.php 2007-02-14 14:31:49.000000000 +0200
+@@ -0,0 +1,21 @@
++<?php
++
++global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS miscapps (
++ miscapps_id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ ext VARCHAR( 50 ) ,
++ description VARCHAR( 50 ) ,
++ dest VARCHAR( 255 )
++)";
++
++
++$check = $db->query($sql);
++if(DB::IsError($check)) {
++ die("Can not create miscdests table\n");
++}
++
++?>
+diff -urNad freepbx-module-miscapps~/install.sql freepbx-module-miscapps/install.sql
+--- freepbx-module-miscapps~/install.sql 2006-12-20 02:32:28.000000000 +0200
++++ freepbx-module-miscapps/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1,6 +0,0 @@
+-CREATE TABLE IF NOT EXISTS miscapps (
+- miscapps_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+- ext VARCHAR( 50 ) ,
+- description VARCHAR( 50 ) ,
+- dest VARCHAR( 255 )
+-);
+diff -urNad freepbx-module-miscapps~/uninstall.sql freepbx-module-miscapps/uninstall.sql
+--- freepbx-module-miscapps~/uninstall.sql 1970-01-01 02:00:00.000000000 +0200
++++ freepbx-module-miscapps/uninstall.sql 2007-02-14 14:32:28.000000000 +0200
+@@ -0,0 +1 @@
++DROP TABLE IF EXISTS miscapps;
Property changes on: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install miscapps || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall miscapps || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall miscapps || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-miscapps/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,132 @@
+<?php
+/*
+function miscapp_destinations() {
+ // return an associative array with destination and description
+ foreach (announcement_list() as $row) {
+ $extens[] = array('destination' => 'app-announcement,ann-'.$row[0].',1', 'description' => $row[1]);
+ }
+ return $extens;
+}
+*/
+
+function miscapps_contexts() {
+ // return an associative array with context and description
+ foreach (miscapps_list() as $row) {
+ $contexts[] = array(
+ 'context' => 'app-miscapps-'.$row['miscapps_id'],
+ 'description'=> 'Misc Application: '.$row['description'],
+ 'source' => 'Misc Applications',
+ );
+ }
+ return $contexts;
+}
+
+function miscapps_get_config($engine) {
+ global $ext;
+ switch ($engine) {
+ case 'asterisk':
+ foreach (miscapps_list(true) as $row) {
+ if ($row['enabled']) {
+ $ext->add('app-miscapps-'.$row['miscapps_id'], $row['ext'], '', new ext_noop('Running miscapp '.$row['miscapps_id'].': '.$row['description']));
+ $ext->add('app-miscapps-'.$row['miscapps_id'], $row['ext'], '', new ext_goto($row['dest']));
+
+ $ext->addInclude('from-internal-additional', 'app-miscapps-'.$row['miscapps_id']);
+ }
+ }
+ break;
+ }
+}
+
+
+/** Get a list of all miscapps
+ * Optional parameter is get_ext. Potentially slow, because each row is extracted from the featurecodes table
+ * one-by-one
+ */
+function miscapps_list($get_ext = false) {
+ global $db;
+ $sql = "SELECT miscapps_id, description, dest FROM miscapps ORDER BY description ";
+ $results = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($results)) {
+ die($results->getMessage()."<br><br>Error selecting from miscapps");
+ }
+
+ if ($get_ext) {
+ foreach (array_keys($results) as $idx) {
+ $fc = new featurecode('miscapps', 'miscapp_'.$results[$idx]['miscapps_id']);
+ $results[$idx]['ext'] = $fc->getCode();
+ $results[$idx]['enabled'] = $fc->isEnabled();
+ }
+ }
+
+ return $results;
+}
+
+function miscapps_get($miscapps_id) {
+ global $db;
+ $sql = "SELECT miscapps_id, description, ext, dest FROM miscapps WHERE miscapps_id = ".addslashes($miscapps_id);
+ $row = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($row)) {
+ die($row->getMessage()."<br><br>Error selecting row from miscapps");
+ }
+
+ // we want to get the ext from featurecodes
+ $fc = new featurecode('miscapps', 'miscapp_'.$row['miscapps_id']);
+ $row['ext'] = $fc->getCode();
+ $row['enabled'] = $fc->isEnabled();
+
+ return $row;
+}
+
+function miscapps_add($description, $ext, $dest) {
+ global $db;
+ $sql = "INSERT INTO miscapps (description, ext, dest) VALUES (".
+ "'".addslashes($description)."', ".
+ "'".addslashes($ext)."', ".
+ "'".addslashes($dest)."')";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().$sql);
+ }
+ //get id..
+ $miscapps_id = $db->getOne('SELECT LAST_INSERT_ID()');
+ if (DB::IsError($miscapps_id)) {
+ //TODO -- handle this
+ }
+
+ $fc = new featurecode('miscapps', 'miscapp_'.$miscapps_id);
+ $fc->setDescription($description);
+ $fc->setDefault($ext, true);
+ $fc->update();
+}
+
+function miscapps_delete($miscapps_id) {
+ global $db;
+ $sql = "DELETE FROM miscapps WHERE miscapps_id = ".addslashes($miscapps_id);
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().$sql);
+ }
+
+ $fc = new featurecode('miscapps', 'miscapp_'.$miscapps_id);
+ $fc->delete();
+}
+
+function miscapps_edit($miscapps_id, $description, $ext, $dest) {
+ global $db;
+ $sql = "UPDATE miscapps SET ".
+ "description = '".addslashes($description)."', ".
+ "ext = '".addslashes($ext)."', ".
+ "dest = '".addslashes($dest)."' ".
+ "WHERE miscapps_id = ".addslashes($miscapps_id);
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().$sql);
+ }
+
+ $fc = new featurecode('miscapps', 'miscapp_'.$miscapps_id);
+ $fc->setDescription($description);
+ $fc->setCode($ext);
+ $fc->update();
+}
+
+?>
\ No newline at end of file
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,6 @@
+CREATE TABLE IF NOT EXISTS miscapps (
+ miscapps_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+ ext VARCHAR( 50 ) ,
+ description VARCHAR( 50 ) ,
+ dest VARCHAR( 255 )
+);
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,19 @@
+<module>
+ <rawname>miscapps</rawname>
+ <name>Misc Applications</name>
+ <version>0.2</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>
+ Adds the ability to create feature codes that can go to any freePBX destination (such as an IVR or queue)
+ </description>
+ <changelog>
+ *0.2* Fix bug with adding new apps
+ </changelog>
+ <menuitems>
+ <miscapps>Misc Applications</miscapps>
+ </menuitems>
+ <location>release/2.2/miscapps-0.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-MiscApplications</info>
+ <md5sum>6023f134dd505ea631d08750804de226</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-miscapps/page.miscapps.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscapps/page.miscapps.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscapps/page.miscapps.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,142 @@
+<?php
+/** Misc Applications module for freePBX 2.2+
+ * Copyright 2006 Greg MacLellan
+ * This program 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.
+ *
+ * This program 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.
+ */
+
+$action = isset($_POST['action']) ? $_POST['action'] : '';
+if (isset($_POST['delete'])) $action = 'delete';
+
+
+$miscapp_id = isset($_POST['miscapp_id']) ? $_POST['miscapp_id'] : false;
+$description = isset($_POST['description']) ? $_POST['description'] : '';
+$ext = isset($_POST['ext']) ? $_POST['ext'] : '';
+$dest = isset($_POST['dest']) ? $_POST['dest'] : '';
+$enabled = isset($_POST['enabled']) ? (!empty($_POST['enabled'])) : true;
+
+if ($_POST['goto0']) {
+ $dest = $_POST[ $_POST['goto0'].'0' ];
+}
+
+
+switch ($action) {
+ case 'add':
+ miscapps_add($description, $ext, $dest);
+ needreload();
+ redirect_standard();
+ break;
+ case 'edit':
+ miscapps_edit($miscapp_id, $description, $ext, $dest);
+ needreload();
+ redirect_standard('extdisplay');
+ break;
+ case 'delete':
+ miscapps_delete($miscapp_id);
+ needreload();
+ redirect_standard();
+ break;
+}
+
+
+?>
+</div>
+
+<div class="rnav"><ul>
+<?php
+
+echo '<li><a href="config.php?display=miscapps&type=setup">'._('Add Misc. Application').'</a></li>';
+
+foreach (miscapps_list() as $row) {
+ echo '<li><a href="config.php?display=miscapps&type=setup&extdisplay='.$row['miscapps_id'].'" class="">'.$row['description'].'</a></li>';
+}
+
+?>
+</ul></div>
+
+<div class="content">
+
+<?php
+
+if ($extdisplay) {
+ // load
+ $row = miscapps_get($extdisplay);
+
+ $description = $row['description'];
+ $ext = $row['ext'];
+ $dest = $row['dest'];
+ $enabled = $row['enabled'];
+
+}
+
+$helptext = _("Misc Applications are for adding feature codes that you can dial from internal phones that go to various destinations available in freePBX. This is in contrast to the <strong>Misc Destinations</strong> module, which is for creating destinations that can be used by other freePBX modules to dial internal numbers or feature codes.");
+echo "<p>".$helptext."</p>\n";
+?>
+
+<form name="editMiscapp" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkMiscapp(editMiscapp);">
+ <input type="hidden" name="extdisplay" value="<?php echo $extdisplay; ?>">
+ <input type="hidden" name="miscapp_id" value="<?php echo $extdisplay; ?>">
+ <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edit' : 'add'); ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($extdisplay ? _("Edit Misc Application") : _("Add Misc Application")) ?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Description")?>:<span><?php echo _("The name of this application")?></span></a></td>
+ <td><input size="15" type="text" name="description" value="<?php echo $description; ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Feature Code")?>:<span><?php echo _("The feature code/extension users can dial to access this application. This can also be modified on the Feature Codes page.")?></span></a></td>
+ <td><input type="text" name="ext" value="<?php echo $ext; ?>" /></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Feature Status")?>:<span><?php echo _("If this code is enabled or not.")?></span></a></td>
+ <td><select name="enabled">
+ <option value="1" <?php if ($enabled) echo "checked"; ?>>Enabled</option>
+ <option value="0" <?php if (!$enabled) echo "checked"; ?>>Disabled</option>
+ </select></td>
+ </tr>
+
+ <tr><td colspan="2"><br><h5><?php echo _("Destination")?>:<hr></h5></td></tr>
+
+<?php
+//draw goto selects
+echo drawselects($dest,0);
+?>
+
+ <tr>
+ <td colspan="2"><br><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>">
+ <?php if ($extdisplay) { echo ' <input name="delete" type="submit" value="'._("Delete").'">'; } ?>
+ </td>
+
+ </tr>
+ </table>
+ </form>
+
+
+<script language="javascript">
+<!--
+
+function checkMiscapp(theForm) {
+ var msgInvalidDescription = "<?php echo _('Invalid description specified'); ?>";
+
+ // set up the Destination stuff
+ setDestinations(theForm, '_post_dest');
+
+ // form validation
+ defaultEmptyOK = false;
+ if (isEmpty(theForm.description.value))
+ return warnInvalid(theForm.description, msgInvalidDescription);
+
+ if (!validateDestinations(theForm, 1, true))
+ return false;
+
+ return true;
+}
+//-->
+</script>
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,11 @@
+freepbx-module-miscdests (2.2-1.3.3-2) unstable; urgency=low
+
+ * added sqlite3 support, closes upstream #1773
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 13:01:11 +0200
+
+freepbx-module-miscdests (2.2-1.3.3-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:50 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-miscdests
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-miscdests
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Misc Destinations
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:50 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/miscdests/
+*.sql usr/share/freepbx/modules/miscdests/
+*.sqlite usr/share/freepbx/modules/miscdests/
+*.html usr/share/freepbx/modules/miscdests/
+*.xml usr/share/freepbx/modules/miscdests/
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+sqlite3-support
+
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni<diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. See http://www.freepbx.org/trac/ticket/1773
+
+ at DPATCH@
+diff -urNad freepbx-module-miscdests~/install.php freepbx-module-miscdests/install.php
+--- freepbx-module-miscdests~/install.php 1970-01-01 02:00:00.000000000 +0200
++++ freepbx-module-miscdests/install.php 2007-02-14 12:54:10.000000000 +0200
+@@ -0,0 +1,19 @@
++<?php
++
++global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS miscdests (
++ id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ description VARCHAR( 100 ) NOT NULL ,
++ destdial VARCHAR( 100 ) NOT NULL
++)";
++
++$check = $db->query($sql);
++if(DB::IsError($check)) {
++ die("Can not create miscdests table\n");
++}
++
++?>
+diff -urNad freepbx-module-miscdests~/install.sql freepbx-module-miscdests/install.sql
+--- freepbx-module-miscdests~/install.sql 2006-05-31 13:16:44.000000000 +0300
++++ freepbx-module-miscdests/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-CREATE TABLE IF NOT EXISTS `miscdests` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `description` VARCHAR( 100 ) NOT NULL , `destdial` VARCHAR( 100 ) NOT NULL ) TYPE = MYISAM ;
+diff -urNad freepbx-module-miscdests~/uninstall.sql freepbx-module-miscdests/uninstall.sql
+--- freepbx-module-miscdests~/uninstall.sql 2006-05-31 13:16:44.000000000 +0300
++++ freepbx-module-miscdests/uninstall.sql 2007-02-14 12:54:15.000000000 +0200
+@@ -1 +1 @@
+-DROP TABLE IF NOT EXISTS `miscdests`;
+\ No newline at end of file
++DROP TABLE IF EXISTS miscdests;
Property changes on: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install miscdests || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall miscdests || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall miscdests || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-miscdests/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,90 @@
+<?php /* $Id: $ */
+
+// returns a associative arrays with keys 'destination' and 'description'
+function miscdests_destinations() {
+ $results = miscdests_list();
+
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $extens[] = array('destination' => 'ext-miscdests,'.$result['0'].',1', 'description' => $result['1']);
+ }
+ return $extens;
+ } else {
+ return null;
+ }
+}
+
+/* Generates dialplan for conferences
+ We call this with retrieve_conf
+*/
+function miscdests_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+
+ switch($engine) {
+ case "asterisk":
+ $contextname = 'ext-miscdests';
+ $fctemplate = '/\{(.+)\:(.+)\}/';
+
+ if(is_array($destlist = miscdests_list())) {
+
+ foreach($destlist as $item) {
+ $miscdest = miscdests_get($item['0']);
+
+ $miscid = $miscdest['id'];
+ $miscdescription = $miscdest['description'];
+ $miscdialdest = $miscdest['destdial'];
+
+ // exchange {mod:fc} for the relevent feature codes in $miscdialdest
+ $miscdialdest = preg_replace_callback($fctemplate, "miscdests_lookupfc", $miscdialdest);
+
+ // write out the dialplan details
+ $ext->add($contextname, $miscid, '', new ext_noop('MiscDest: '.$miscdescription));
+ $ext->add($contextname, $miscid, '', new ext_dial('Local/'.$miscdialdest.'@from-internal', ''));
+
+ }
+ }
+
+ break;
+ }
+}
+
+function miscdests_list() {
+ $results = sql("SELECT id, description FROM miscdests ORDER BY description","getAll",DB_FETCHMODE_ASSOC);
+ foreach($results as $result){
+ $extens[] = array($result['id'],$result['description']);
+ }
+
+ if (isset($extens)) {
+ return $extens;
+ } else {
+ return null;
+ }
+}
+
+function miscdests_get($id){
+ $results = sql("SELECT id, description, destdial FROM miscdests WHERE id = $id","getRow",DB_FETCHMODE_ASSOC);
+ return $results;
+}
+
+function miscdests_del($id){
+ $results = sql("DELETE FROM miscdests WHERE id = $id","query");
+}
+
+function miscdests_add($description, $destdial){
+ $results = sql("INSERT INTO miscdests (description, destdial) VALUES (".sql_formattext($description).",".sql_formattext($destdial).")");
+}
+
+function miscdests_update($id, $description, $destdial){
+ $results = sql("UPDATE miscdests SET description = ".sql_formattext($description).", destdial = ".sql_formattext($destdial)." WHERE id = ".$id);
+}
+
+function miscdests_lookupfc($matches) {
+ $modulename = $matches[1];
+ $featurename = $matches[2];
+
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->getCodeActive();
+ return $fc;
+}
+?>
\ No newline at end of file
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES/miscdests.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES/miscdests.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES/miscdests.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES/miscdests.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/i18n/he_IL/LC_MESSAGES/miscdests.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,60 @@
+# Hebrew version for Misc. Destinations FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.miscdests.php:66 page.miscdests.php:99 page.miscdests.php:106
+msgid "Add Misc Destination"
+msgstr "××סף ××¢× ××××"
+
+#: page.miscdests.php:80
+msgid "Misc Destination"
+msgstr "××¢× ××××"
+
+#: page.miscdests.php:80
+msgid "deleted"
+msgstr "× ××ק"
+
+#: page.miscdests.php:96
+msgid "Misc Destination:"
+msgstr "××¢× ××××:"
+
+#: page.miscdests.php:97
+msgid "Delete Misc Destination"
+msgstr "××ק ××¢× ××××"
+
+#: page.miscdests.php:106
+msgid "Edit Misc Destination"
+msgstr "ער×× ××¢× ××××"
+
+#: page.miscdests.php:111
+msgid "description:"
+msgstr "ת×××ר:"
+
+#: page.miscdests.php:111
+msgid "Give this Misc Destination a brief name to help you identify it."
+msgstr "×ª× ×××¢× ×××× ×× ×©× ×§×¦×¨ ש××¢××ר ×× ××××ת ××ת×."
+
+#: page.miscdests.php:115
+msgid "dial:"
+msgstr "××××:"
+
+#: page.miscdests.php:115
+msgid "Enter the digits to dial for this Misc Destination."
+msgstr "××× ×¡ ×ת ×ספר×ת ש×ש ××××× ×¢××ר ××¢× ×××× ××."
+
+#: page.miscdests.php:120
+msgid "featurecode"
+msgstr "ק×× ×ª××× ×"
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+CREATE TABLE IF NOT EXISTS `miscdests` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `description` VARCHAR( 100 ) NOT NULL , `destdial` VARCHAR( 100 ) NOT NULL ) TYPE = MYISAM ;
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,20 @@
+<module>
+ <rawname>miscdests</rawname>
+ <name>Misc Destinations</name>
+ <version>1.3.3</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>Allows creating destinations that dial any local number (extensions, feature codes, outside phone numbers) that can be used by other modules (eg, IVR, time conditions) as a call destination.</description>
+ <changelog>
+ *1.3.3* Minor formatting changes
+ *1.3.2* Add he_IL translation
+ *1.3.1* Updated help text
+ *1.3* First release for FreePBX 2.2 - Fixed GUI issues
+ </changelog>
+ <menuitems>
+ <miscdests>Misc Destinations</miscdests>
+ </menuitems>
+ <location>release/2.2/miscdests-1.3.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-MiscDests</info>
+ <md5sum>8aa53fdd4a9bdfc9ed31409302ff6bab</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/page.miscdests.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/page.miscdests.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/page.miscdests.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,209 @@
+<?php /* $Id: $ */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+isset($_REQUEST['id'])?$extdisplay = $_REQUEST['id']:$extdisplay='';
+
+$dispnum = "miscdests"; //used for switch on config.php
+
+switch ($action) {
+ case "add":
+ miscdests_add($_REQUEST['description'],$_REQUEST['destdial']);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ miscdests_del($extdisplay);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit": //just delete and re-add
+ miscdests_update($extdisplay,$_REQUEST['description'],$_REQUEST['destdial']);
+ needreload();
+ redirect_standard('id');
+ break;
+}
+
+$miscdests = miscdests_list();
+
+// Make array of feature code for <SELECT> list
+$featurecodes = featurecodes_getAllFeaturesDetailed();
+if (isset($featurecodes)) {
+ foreach ($featurecodes as $item) {
+ $moduledesc =isset($item['moduledescription'])?_($item['moduledescription']):null;
+ $moduleena = ($item['moduleenabled'] == 1 ? true : false);
+ if ($moduleena) {
+ $featureena = ($item['featureenabled'] == 1 ? true : false);
+ if ($featureena) {
+ $featureid = $item['modulename'] . ':' . $item['featurename'];
+ $featuredesc = _($item['featuredescription']);
+
+ $featurecodedefault = (isset($item['defaultcode']) ? $item['defaultcode'] : '');
+ $featurecodecustom = (isset($item['customcode']) ? $item['customcode'] : '');
+ $featureactualcode = ($featurecodecustom != '' ? $featurecodecustom : $featurecodedefault);
+
+ $fclist[$featureid] = $featuredesc." ($featureactualcode)";
+ }
+ }
+ }
+ asort($fclist);
+}
+
+?>
+
+</div>
+
+<!-- right side menu -->
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($extdisplay=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Misc Destination")?></a></li>
+<?php
+if (isset($miscdests)) {
+ foreach ($miscdests as $miscdest) {
+ echo "<li><a id=\"".($extdisplay==$miscdest[0] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&id=".urlencode($miscdest[0])."\">{$miscdest[1]}</a></li>";
+ }
+}
+?>
+</ul></div>
+
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>'._("Misc Destination").' '.$extdisplay.' '._("deleted").'!</h3><br><br><br><br><br><br><br><br>';
+} else {
+ if ($extdisplay){
+ //get details for this meetme
+ $thisMiscDest = miscdests_get($extdisplay);
+ //create variables
+ $description = "";
+ $destdial = "";
+ extract($thisMiscDest);
+ }
+
+ $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete';
+
+
+$helptext = _("Misc Destinations are for adding destinations that can be used by other freePBX modules, generally used to route incoming calls. If you want to create feature codes that can be dialed by internal users and go to various destinations, please see the <strong>Misc Applications</strong> module.");
+
+
+
+ if ($extdisplay){ ?>
+ <h2><?php echo _("Misc Destination:")." ". $description; ?></h2>
+ <p><a href="<?php echo $delURL ?>"><?php echo _("Delete Misc Destination")?> '<?php echo $description; ?>'</a></p>
+<?php } else {
+ echo "<h2>"._("Misc Destinations")."</h2>";
+ echo "<p>".$helptext."</p>\n"; ?>
+ <h2><?php echo _("Add Misc Destination"); ?></h2>
+<?php }
+?>
+ <form autocomplete="off" name="editMD" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return editMD_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edit' : 'add') ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($extdisplay ? _("Edit Misc Destination") : _("Add Misc Destination")) ?><hr></h5></td></tr>
+<?php if ($extdisplay){ ?>
+ <tr><td><input type="hidden" name="id" value="<?php echo $extdisplay; ?>"></td></tr>
+<?php } ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("description:")?><span><?php echo _("Give this Misc Destination a brief name to help you identify it.")?></span></a></td>
+ <td><input type="text" name="description" value="<?php echo (isset($description) ? $description : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("dial:")?><span><?php echo _("Enter the number this destination will simulate dialing, exactly as you would dial it from an internal phone. When you route a call to this destination, it will be as if the caller dialed this number from an internal phone.") ?></span></a></td>
+ <td>
+ <input type="text" name="destdial" value="<?php echo (isset($destdial) ? $destdial : ''); ?>">
+ <?php if (isset($fclist)) { ?>
+ <select id="fc" onchange="fc_onchange();">
+ <option value="">--<?php echo _("featurecode shortcuts"); ?>--</option>
+ <?php
+ foreach ($fclist as $fckey => $fcdesc) {
+ ?>
+ <option value="{<?php echo $fckey; ?>}"><?php echo _($fcdesc); ?></option>
+ <?php
+ }
+ ?>
+ </select>
+ <?php } ?>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6>
+ </td>
+ </tr>
+ </table>
+<script language="javascript">
+<!--
+
+var theForm = document.editMD;
+
+if (theForm.description.value == "") {
+ theForm.description.focus();
+} else {
+ theForm.destdial.focus();
+}
+
+function editMD_onsubmit()
+{
+ var msgInvalidDescription = "<?php echo _('Please enter a valid Description'); ?>";
+ var msgInvalidDial = "<?php echo _('Please enter a valid Dial string'); ?>";
+
+ defaultEmptyOK = false;
+ if (!isAlphanumeric(theForm.description.value))
+ return warnInvalid(theForm.description, msgInvalidDescription);
+
+ // go thru text and remove the {} bits so we only check the actual dial digits
+ var fldText = theForm.destdial.value;
+ var chkText = "";
+
+ if ( (fldText.indexOf("{") > -1) && (fldText.indexOf("}") > -1) ) { // has one or more sets of {mod:fc}
+
+ var inbraces = false;
+ for (var i=0; i<fldText.length; i++) {
+ if ( (fldText.charAt(i) == "{") && (inbraces == false) ) {
+ inbraces = true;
+ } else if ( (fldText.charAt(i) == "}") && (inbraces == true) ) {
+ inbraces = false;
+ } else if ( inbraces == false ) {
+ chkText += fldText.charAt(i);
+ }
+ }
+
+ // if there is nothing in chkText but something in fldText
+ // then the field must contain a featurecode only, therefore
+ // there really is something in thre!
+ if ( (chkText == "") & (fldText != "") )
+ chkText = "0";
+
+ } else {
+ chkText = fldText;
+ }
+ // now do the check using the chkText var made above
+ if (!isDialDigits(chkText))
+ return warnInvalid(theForm.destdial, msgInvalidDial);
+
+ return true;
+}
+
+function fc_onchange() {
+ theForm.destdial.value = theForm.fc.value;
+ theForm.fc.selectedIndex = 0;
+}
+//-->
+</script>
+ </form>
+<?php
+} //end if action == delGRP
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-miscdests/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-miscdests/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-miscdests/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE IF NOT EXISTS `miscdests`;
\ No newline at end of file
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-music (2.2-1.5-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:01 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-music
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-music
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Music on Hold
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:01 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/music/
+*.sql usr/share/freepbx/modules/music/
+*.sqlite usr/share/freepbx/modules/music/
+*.html usr/share/freepbx/modules/music/
+*.xml usr/share/freepbx/modules/music/
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install music || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall music || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall music || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-music/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-music/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-music/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,58 @@
+<?php
+
+function music_list($path) {
+ $i = 1;
+ $arraycount = 0;
+
+ $filearray = Array("default");
+ if (is_dir($path)){
+ if ($handle = opendir($path)){
+ while (false !== ($file = readdir($handle))){
+ if ( ($file != ".") && ($file != "..") && ($file != "CVS") && ($file != ".svn") )
+ {
+ if (is_dir("$path/$file"))
+ $filearray[($i++)] = "$file";
+ }
+ }
+ closedir($handle);
+ }
+ }
+ if (isset($filearray)) {
+ sort($filearray);
+ return ($filearray);
+ } else {
+ return null;
+ }
+}
+
+function music_rmdirr($dirname)
+{
+ // Sanity check
+ if (!file_exists($dirname)) {
+ print "$dirname Doesn't exist\n";
+ return false;
+ }
+
+ // Simple delete for a file
+ if (is_file($dirname)) {
+ return unlink($dirname);
+ }
+
+ // Loop through the folder
+ $dir = dir($dirname);
+ while (false !== $entry = $dir->read()) {
+ // Skip pointers
+ if ($entry == '.' || $entry == '..') {
+ continue;
+ }
+
+ // Recurse
+ music_rmdirr("$dirname/$entry");
+ }
+
+ // Clean up
+ $dir->close();
+ return rmdir($dirname);
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES/music.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES/music.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES/music.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES/music.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/i18n/he_IL/LC_MESSAGES/music.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,97 @@
+# Hebrew version for Music FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.music.php:62 page.music.php:205
+msgid "Add Music Category"
+msgstr "××סף ק×××ר××ת ××ס×ק×"
+
+#: page.music.php:101
+msgid "Cannot write to file"
+msgstr "×× ×××× ××ת×× ×ק×××¥"
+
+#: page.music.php:162
+msgid "Delete"
+msgstr "××ק"
+
+#: page.music.php:195
+msgid "On Hold Music"
+msgstr "××ס×קת ×××ª× ×"
+
+#: page.music.php:207
+msgid "Category Name:"
+msgstr "×©× ×ק×××ר××:"
+
+#: page.music.php:207
+msgid ""
+"Allows you to Set up Different Categories for music on hold. This is useful "
+"if you would like to specify different Hold Music or Commercials for various "
+"ACD Queues."
+msgstr "××פשר ×× ×××××ר ק×××ר××ת ש×× ×ת ×¢××ר ××ס×קת ×××ª× ×. ××ר ×× ×××¢×× ×× ××ª× ×¨××¦× ×צ××× ×× ××× ×ת ש×× ×ת ×× ×¤×¨×¡×××ת ×¢××ר ת××¨× ACD ש×× ××."
+
+#: page.music.php:242
+msgid "Category:"
+msgstr "ק×××ר××:"
+
+#: page.music.php:242
+msgid "default"
+msgstr "×ר×רת ××××"
+
+#: page.music.php:244
+msgid "Delete Music Category"
+msgstr "××ק ק×××ר××ת ××ס×ק×"
+
+#: page.music.php:247
+msgid "Upload a .wav or .mp3 file:"
+msgstr "××¢×× ×§×××¥ wav ×× mp3:"
+
+#: page.music.php:270 page.music.php:272 page.music.php:280
+msgid "Error Processing"
+msgstr "תק×× ××¢××××"
+
+#: page.music.php:270
+msgid "No file provided"
+msgstr "×× ×¡×פק ק×××¥"
+
+#: page.music.php:270
+msgid "Please select a file to upload"
+msgstr "×× × ××ר ק×××¥ ×××¢×××"
+
+#: page.music.php:272
+msgid "Check"
+msgstr "×××ק"
+
+#: page.music.php:272
+msgid "in"
+msgstr "×ת××"
+
+#: page.music.php:281
+msgid "This is not a fatal error, your Music on Hold may still work."
+msgstr "ש×××× ×× ××× × ×××××ת, ××ת×× ×××ס×קת ××××ª× × ×©×× ××× ××ת תע×××."
+
+#: page.music.php:283
+msgid "Completed processing"
+msgstr "×¢×××× ××ש××"
+
+#: page.music.php:301
+msgid ""
+"You must have at least one file for On Hold Music. Please upload one before "
+"deleting this one."
+msgstr "×××× ××××ת ×× ×פ××ת ק×××¥ ××× ×¢××ר ××ס×קת ×××ª× ×. ×× × ××¢×× ××× ××¤× × ×©×ª×××ק ק×××¥ ××."
+
+#: page.music.php:305
+msgid "Deleted"
+msgstr "× ××ק"
Added: freepbx/modules-2.2/modules/freepbx-module-music/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,33 @@
+<?
+global $asterisk_conf;
+require_once("modules/music/functions.inc.php");
+
+$File_Write="";
+$tresults = music_list($asterisk_conf['astvarlibdir']."/mohmp3");
+if (isset($tresults)) {
+ foreach ($tresults as $tresult) {
+ if ($tresult != "default" ) {
+ $dir = $asterisk_conf['astvarlibdir']."/mohmp3/{$tresult}/";
+ } else {
+ $dir = $asterisk_conf['astvarlibdir']."/mohmp3/";
+ }
+ if (file_exists("{$dir}.random")) {
+ $File_Write.="[{$tresult}]\nmode=files\ndirectory={$dir}\nrandom=yes\n";
+ } else {
+ $File_Write.="[{$tresult}]\nmode=files\ndirectory={$dir}\n";
+ }
+ }
+}
+$handle = fopen("/etc/asterisk/musiconhold_additional.conf", "w");
+
+if (fwrite($handle, $File_Write) === FALSE) {
+ echo _("Cannot write to file")." ($tmpfname)";
+ exit;
+}
+
+fclose($handle);
+
+needreload();
+
+?>
+
Added: freepbx/modules-2.2/modules/freepbx-module-music/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,24 @@
+<module>
+ <rawname>music</rawname>
+ <name>Music on Hold</name>
+ <version>1.5</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Uploading and management of sound files (wav, mp3) to be used for on-hold music.</description>
+ <changelog>
+ *1.5* Fixed upload bug, #1646 could not upload files
+ *1.4.2* List wav files
+ *1.4.1* Add redirect_standard() call to avoid #1616
+ *1.4* Fix an issue of a new install not having a working MOH until they visit the page.
+ *1.3.2* Add he_IL translation
+ *1.3.1* Changed name to Music on Hold (from On Hold Music)
+ *1.3* Bumped version to assist upgraders from the 2.1 tree. No other changes.
+ *1.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <menuitems>
+ <music>Music on Hold</music>
+ </menuitems>
+ <location>release/2.2/music-1.4.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-OHM</info>
+ <md5sum>262936ab17e92413fca52618425881b8</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-music/page.music.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-music/page.music.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-music/page.music.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,314 @@
+<?php /* $Id: page.music.php 3623 2007-01-23 21:54:27Z naftali5 $ */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+?>
+
+<?php
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$randon = isset($_REQUEST['randon'])?$_REQUEST['randon']:'';
+$randoff = isset($_REQUEST['randoff'])?$_REQUEST['randoff']:'';
+$category = strtr(isset($_REQUEST['category'])?$_REQUEST['category']:''," ./\"\'\`", "------");
+if ($category == null) $category = 'default';
+$display='music';
+
+global $asterisk_conf;
+
+if ($category == "default")
+ $path_to_dir = $asterisk_conf['astvarlibdir']."/mohmp3"; //path to directory u want to read.
+else
+ $path_to_dir = $asterisk_conf['astvarlibdir']."/mohmp3/$category"; //path to directory u want to read.
+
+
+if (strlen($randon)) {
+ touch($path_to_dir."/.random");
+ createmusicconf();
+}
+if (strlen($randoff)) {
+ unlink($path_to_dir."/.random");
+ createmusicconf();
+}
+switch ($action) {
+ case "addednew":
+ makemusiccategory($path_to_dir,$category);
+ createmusicconf();
+ needreload();
+ redirect_standard();
+ break;
+ case "addedfile":
+ createmusicconf();
+ needreload();
+// redirect_standard();
+ break;
+ case "delete":
+ music_rmdirr("$path_to_dir");
+ $path_to_dir = "/var/lib/asterisk/mohmp3"; //path to directory u want to read.
+ $category='default';
+ createmusicconf();
+ needreload();
+ redirect_standard();
+ break;
+}
+
+
+?>
+</div>
+<div class="rnav"><ul>
+ <li><a href="config.php?display=<?php echo urlencode($display)?>&action=add"><?php echo _("Add Music Category")?></a></li>
+
+<?php
+//get existing trunk info
+$tresults = music_list($asterisk_conf['astvarlibdir']."/mohmp3");
+if (isset($tresults)) {
+ foreach ($tresults as $tresult) {
+ echo "<li><a id=\"".($category==$tresult ? 'current':'')."\" href=\"config.php?display=".urlencode($display)."&category=".urlencode($tresult)."&action=edit\">{$tresult}</a></li>";
+ }
+}
+?>
+</ul></div>
+
+
+<?php
+function createmusicconf()
+{
+ global $asterisk_conf;
+
+ $File_Write="";
+ $tresults = music_list($asterisk_conf['astvarlibdir']."/mohmp3");
+ if (isset($tresults)) {
+ foreach ($tresults as $tresult) {
+ if ($tresult != "default" ) {
+ $dir = $asterisk_conf['astvarlibdir']."/mohmp3/{$tresult}/";
+ } else {
+ $dir = $asterisk_conf['astvarlibdir']."/mohmp3/";
+ }
+ if (file_exists("{$dir}.random")) {
+ $File_Write.="[{$tresult}]\nmode=files\ndirectory={$dir}\nrandom=yes\n";
+ } else {
+ $File_Write.="[{$tresult}]\nmode=files\ndirectory={$dir}\n";
+ }
+ }
+ }
+
+ $handle = fopen("/etc/asterisk/musiconhold_additional.conf", "w");
+
+ if (fwrite($handle, $File_Write) === FALSE) {
+ echo _("Cannot write to file")." ($tmpfname)";
+ exit;
+ }
+
+ fclose($handle);
+
+ needreload();
+}
+
+function makemusiccategory($category)
+{
+ mkdir("$path_to_dir/$category", 0755);
+}
+
+function build_list()
+{
+ global $path_to_dir;
+ $pattern = '';
+ $handle=opendir($path_to_dir) ;
+ $extensions = array('mp3','wav'); // list of extensions to match
+
+ //generate the pattern to look for.
+ $pattern = '/(\.'.implode('|\.',$extensions).')$/i';
+
+ //store file names that match pattern in an array
+ $i = 0;
+ while (($file = readdir($handle))!==false)
+ {
+ if ($file != "." && $file != "..")
+ {
+
+ if(preg_match($pattern,$file))
+ {
+ $file_array[$i] = $file; //pattern is matched store it in file_array.
+ $i++;
+ }
+ }
+
+ }
+ closedir($handle);
+
+ return (isset($file_array))?$file_array:null; //return the size of the array
+
+}
+
+function draw_list($file_array, $path_to_dir, $category)
+{
+ global $display;
+ //list existing mp3s and provide delete buttons
+ if ($file_array) {
+ foreach ($file_array as $thisfile) {
+ print "<div style=\"text-align:right;width:350px;border: 1px solid;padding:2px;\">";
+ //print "<a style=\"float:left;margin-left:5px;\" href=\"file:". $path_to_dir ."". $thisfile ."\">".$thisfile."</a>";
+ print "<b style=\"float:left;margin-left:5px;\" >".$thisfile."</b>";
+ print "<a style=\"margin-right:5px;\" href=\"".$_SERVER['SCRIPT_NAME']."?display=";
+ print (isset($display)?$display:'')."&del=".$thisfile."&category=".$category."\">"._("Delete")."</a>";
+ print "</div><br>";
+ }
+ }
+}
+
+function process_mohfile($mohfile)
+{
+ global $path_to_dir;
+ $output = 0;
+ $returncode = 0;
+ $origmohfile=$path_to_dir."/orig_".$mohfile;
+ $newname = strtr($mohfile,"&", "_");
+ $newmohfile=$path_to_dir."/". ((strpos($newname,'.mp3') === false) ? $newname.".mp3" : $newname);
+ $lamecmd="lame --cbr -m m -t -F \"".$origmohfile."\" \"".$newmohfile."\" 2>&1 ";
+ if (strpos($newmohfile,'.mp3') !== false)
+ exec($lamecmd, $output, $returncode);
+ if ($returncode != 0) {
+ return join("<br>\n", $output);
+ }
+ $rmcmd="rm -f \"". $origmohfile."\"";
+ exec($rmcmd);
+ return null;
+}
+
+/*function kill_mpg123()
+{
+ $killcmd="killall -9 mpg123";
+ exec($killcmd);
+}*/
+?>
+
+<div class="content">
+<h2><?php echo _("On Hold Music")?></h2>
+
+<?php
+if ($action == 'add')
+{
+ ?>
+ <form name="addcategory" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return addcategory_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $display?>">
+ <input type="hidden" name="action" value="addednew">
+ <table>
+ <tr><td colspan="2"><h5><?php echo _("Add Music Category")?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Category Name:")?><span><?php echo _("Allows you to Set up Different Categories for music on hold. This is useful if you would like to specify different Hold Music or Commercials for various ACD Queues.")?> </span></a></td>
+ <td><input type="text" name="category" value=""></td>
+ </tr>
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value='<?php echo _("Submit Changes")?>' ></h6></td>
+ </tr>
+ </table>
+<script language="javascript">
+<!--
+
+var theForm = document.addcategory;
+theForm.category.focus();
+
+function addcategory_onsubmit() {
+ var msgInvalidCategoryName = "<?php echo _('Please enter a valid Category Name'); ?>";
+
+ defaultEmptyOK = false;
+ if (!isAlphanumeric(theForm.category.value))
+ return warnInvalid(theForm.category, msgInvalidCategoryName);
+
+ return true;
+}
+
+//-->
+</script>
+
+ </form>
+ <br><br><br><br><br>
+
+<?php
+}
+else
+{
+?>
+
+ <h5><?php echo _("Category:")?> <?php echo $category=="default"?_("default"):$category;?></h5>
+ <?php if ($category!="default"){?>
+ <p><a href="config.php?display=<?php echo urlencode($display) ?>&action=delete&category=<?php echo urlencode($category) ?>"><?php echo _("Delete Music Category")?> <?php echo $category; ?></a></p><?php }?>
+
+ <form enctype="multipart/form-data" name="upload" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST"/>
+ <?php echo _("Upload a .wav or .mp3 file:")?><br>
+ <input type="hidden" name="display" value="<?php echo $display?>">
+ <input type="hidden" name="category" value="<?php echo "$category" ?>">
+ <input type="hidden" name="action" value="addedfile">
+ <input type="file" name="mohfile"/>
+ <input type="button" value="<?php echo _("Upload")?>" onclick="document.upload.submit(upload);alert('<?php echo addslashes(_("Please wait until the page loads. Your file is being processed."))?>');"/>
+ </form>
+ <br />
+ <form name="randomon" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <?php
+ if (file_exists("{$path_to_dir}/.random")) {
+ ?> <input type="submit" name="randoff" value="Disable Random Play"> <?php
+ } else {
+ ?> <input type="submit" name="randon" value="Enable Random Play"> <?php
+ }
+ ?>
+ </form>
+ <br />
+ <?php
+
+ // Check to see if the upload failed for some reason
+ if (isset($_FILES['mohfile']['name']) && !is_uploaded_file($_FILES['mohfile']['tmp_name'])) {
+ if (strlen($_FILES['mohfile']['name']) == 0) {
+ echo "<h5> PHP "._("Error Processing")."! "._("No file provided")." "._("Please select a file to upload")."</h5>";
+ } else {
+ echo "<h5> PHP "._("Error Processing")." ".$_FILES['mohfile']['name']."! "._("Check")." upload_max_filesize "._("in")." /etc/php.ini</h5>";
+ }
+ }
+ if (isset($_FILES['mohfile']['tmp_name']) && is_uploaded_file($_FILES['mohfile']['tmp_name'])) {
+ //echo $_FILES['mohfile']['name']." uploaded OK";
+ move_uploaded_file($_FILES['mohfile']['tmp_name'], $path_to_dir."/orig_".$_FILES['mohfile']['name']);
+ $process_err = process_mohfile($_FILES['mohfile']['name']);
+ if (isset($process_err)) {
+ echo "<h5>"._("Error Processing").": \"$process_err\" for ".$_FILES['mohfile']['name']."!</h5>\n";
+ echo "<h5>"._("This is not a fatal error, your Music on Hold may still work.")."</h5>\n";
+ } else {
+ echo "<h5>"._("Completed processing")." ".$_FILES['mohfile']['name']."!</h5>";
+ }
+ needreload();
+ //kill_mpg123();
+ }
+
+ //build the array of files
+ $file_array = build_list();
+ $numf = count($file_array);
+
+
+ if (isset($_REQUEST['del'])) {
+ $del = $_REQUEST['del'];
+ if (strpos($del, "\"") || strpos($del, "\'") || strpos($del, "\;")) {
+ print "You're trying to use an invalid character. Please don't.\n";
+ exit;
+ }
+ if (($numf == 1) && ($category == "default") ){
+ echo "<h5>"._("You must have at least one file for On Hold Music. Please upload one before deleting this one.")."</h5>";
+ } else {
+ $rmcmd="rm -f \"".$path_to_dir."/".$del."\"";
+ exec($rmcmd);
+ echo "<h5>"._("Deleted")." ".$del."!</h5>";
+ //kill_mpg123();
+ needreload();
+ }
+ }
+ $file_array = build_list();
+ draw_list($file_array, $path_to_dir, $category);
+ ?>
+ <br><br><br><br><br><br>
+<?php
+}
+?>
+
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-paging (2.2-1.6.3-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:29 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-paging
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-paging
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Paging and Intercom
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:29 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/paging/
+*.sql usr/share/freepbx/modules/paging/
+*.sqlite usr/share/freepbx/modules/paging/
+*.html usr/share/freepbx/modules/paging/
+*.xml usr/share/freepbx/modules/paging/
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install paging || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall paging || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall paging || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-paging/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-paging/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-paging/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,319 @@
+<?php
+/* $Id $ */
+
+/* paging_init - Is run every time the page is loaded, checks
+ to make sure that the database is current and loaded, if not,
+ it propogates it. I expect that extra code will go here to
+ check for version upgrades, etc, of the paging database, to
+ allow for easy upgrades. */
+
+function paging_init() {
+ global $db;
+
+ // Check to make sure that install.sql has been run
+ $sql = "SELECT * from paging_overview";
+ $results = $db->getAssoc($sql);
+
+ if (DB::IsError($results)) {
+ // It couldn't locate the table. This is bad. Lets try to re-create it, just
+ // in case the user has had the brilliant idea to delete it.
+ // in 2.2, replace this with just runModuleSQL which is in admin/functions.inc.php
+ pagingrunModuleSQL('paging', 'uninstall');
+ if (pagingrunModuleSQL('paging', 'install')==false) {
+ echo _("There is a problem with install.sql, cannot re-create databases. Contact support\n");
+ die;
+ } else {
+ echo _("Database was deleted! Recreated successfully.<br>\n");
+ $results = $db->getAll($sql);
+ }
+ }
+ if (!isset($results['version'])) {
+ print "First-time use. Propogating databases.<br>\n";
+ // Here, you load up a current database schema. Below, if the version is
+ // different, you'd write some upgrade code. This is better than doing it
+ // in install.sql, becuase you don't know what's in there already.
+ $sql = "INSERT INTO paging_overview VALUES ('version', 1)";
+ $db->query($sql);
+ /* Load up the phone definitions */
+ $fd = fopen("modules/paging/phones.sql","r");
+ while (!feof($fd)) {
+ $data = fgets($fd, 1024);
+ if ($data{0}!=';' && $data{0}!='#' && strlen($data) > 3) {
+ // It's not a comment or a blank(ish) line. Add it.
+ $phoneresult = $db->query($data);
+ if(DB::IsError($phoneresult))
+ die($phoneresult->getMessage()."<br><br>error adding to phones table");
+ }
+ }
+ fclose($fd);
+ print "Init complete. Please click on this page again to start using this module<br>\n";
+ exit;
+ } /* else ... check the version and upgrade if needed. */
+}
+
+
+// Generates dialplan for paging - is called from retrieve_conf
+
+function paging_get_config($engine) {
+ global $db;
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ // Get a list of all the phones used for paging
+ $sql = "SELECT DISTINCT ext FROM paging_groups";
+ $results = $db->getAll($sql);
+ if (!isset($results[0][0])) {
+ // There are no phones here, no paging support, lets give up now.
+ return 0;
+ }
+ // We have paging support.
+ $ext->addInclude('from-internal-additional','ext-paging');
+ // Lets give all the phones their PAGExxx lines.
+ // TODO: Support for specific phones configurations
+ foreach ($results as $grouparr) {
+ $skipheaders = false;
+ $xtn=trim($grouparr[0]);
+ if (strtoupper(substr($xtn,-1)) == "X") {
+ // hack for allowing no SIP headers
+ //TODO : replace this with DevicesTakeTwo stuff
+ $xtn = rtrim($xtn,"xX");
+ $skipheaders = true;
+ }
+
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_gotoif('$[ ${CALLERID(number)} = '.$xtn.' ]','skipself'));
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_gotoif('$[ ${FORCE_PAGE} != 1 ]','AVAIL'));
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('AVAILSTATUS', 'not checked'));
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_goto('SKIPCHECK'));
+ $ext->add('ext-paging', "PAGE${xtn}", 'AVAIL', new ext_chanisavail('${DB(DEVICE/'.$xtn.'/dial)}', 'js'));
+ $ext->add('ext-paging', "PAGE${xtn}", 'SKIPCHECK', new ext_noop('Seems to be available (state = ${AVAILSTATUS}'));
+
+ if (!$skipheaders) {
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('__SIPADDHEADER', 'Call-Info: \;answer-after=0'));
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('__ALERT_INFO', 'Ring Answer'));
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_setvar('__SIP_URI_OPTIONS', 'intercom=true'));
+ }
+
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_dial("\${DB(DEVICE/${xtn}/dial)}", '5, A(beep)'));
+ $ext->add('ext-paging', "PAGE${xtn}", 'skipself', new ext_noop('Not paging originator'));
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_hangup());
+
+ $ext->add('ext-paging', "PAGE${xtn}", '', new ext_noop('Channel ${AVAILCHAN} is not available (state = ${AVAILSTATUS})'), 'AVAIL',101);
+ }
+ // Now get a list of all the paging groups...
+ $sql = "SELECT page_group, force_page FROM paging_config";
+ $paging_groups = $db->getAll($sql, DB_FETCHMODE_ASSOC);
+ foreach ($paging_groups as $thisgroup) {
+ $grp=trim($thisgroup['page_group']);
+ $sql = "SELECT ext FROM paging_groups WHERE page_number='$grp'";
+ $all_exts = $db->getAll($sql);
+ $dialstr='';
+ foreach($all_exts as $local_dial) {
+ if (strtoupper(substr($local_dial[0],-1)) == "X") {
+ $local_dial[0] = rtrim($local_dial[0],"xX");
+ }
+
+ $dialstr .= "LOCAL/PAGE".trim($local_dial[0])."@ext-paging&";
+ }
+ // It will always end with an &, so lets take that off.
+ $dialstr = rtrim($dialstr, "&");
+ $ext->add('ext-paging', "Debug", '', new ext_noop("dialstr is $dialstr"));
+ $ext->add('ext-paging', $grp, '', new ext_setvar("_FORCE_PAGE", ($thisgroup['force_page']?1:0)));
+ $ext->add('ext-paging', $grp, '', new ext_macro('user-callerid'));
+ $ext->add('ext-paging', $grp, '', new ext_page($dialstr));
+ }
+
+
+
+ // setup for intercom
+ $fcc = new featurecode('paging', 'intercom-prefix');
+ $code = $fcc->getCodeActive();
+ unset($fcc);
+
+ if (!empty($code)) {
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('dialnumber', '${EXTEN:'.strlen($code).'}'));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_dbget('user-intercom','AMPUSER/${dialnumber}/intercom'));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_gotoif('$["${user-intercom}" = "disabled" ]', 'nointercom'));
+
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('__SIPADDHEADER', 'Call-Info: \;answer-after=0'));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('__ALERT_INFO', 'Ring Answer'));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_setvar('__SIP_URI_OPTIONS', 'intercom=true'));
+
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_dial('Local/${dialnumber}@from-internal/n','',''));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_busy());
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_macro('hangupcall'));
+ $ext->add('ext-intercom', '_'.$code.'.', 'nointercom', new ext_noop('Intercom disallowed by ${dialnumber}'));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_playback('intercom&for&extension'));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_saydigits('${dialnumber}'));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_playback('is&disabled'));
+ $ext->add('ext-intercom', '_'.$code.'.', '', new ext_congestion());
+
+
+
+ $ext->addInclude('from-internal-additional', 'ext-intercom');
+
+
+ $fcc = new featurecode('paging', 'intercom-on');
+ $oncode = $fcc->getCodeActive();
+ unset($fcc);
+
+ if ($oncode) {
+ $ext->add('ext-intercom', $oncode, '', new ext_answer('')); // $cmd,1,Answer
+ $ext->add('ext-intercom', $oncode, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add('ext-intercom', $oncode, '', new ext_macro('user-callerid')); // $cmd,n,Macro(user-callerid)
+ $ext->add('ext-intercom', $oncode, '', new ext_setvar('DB(AMPUSER/${CALLERID(number)}/intercom)', 'enabled')); // $cmd,n,Set(...=enabled)
+ $ext->add('ext-intercom', $oncode, '', new ext_playback('intercom&enabled')); // $cmd,n,Playback(...)
+ $ext->add('ext-intercom', $oncode, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+ }
+
+ $fcc = new featurecode('paging', 'intercom-off');
+ $offcode = $fcc->getCodeActive();
+ unset($fcc);
+
+ if ($offcode) {
+ $ext->add('ext-intercom', $offcode, '', new ext_answer('')); // $cmd,1,Answer
+ $ext->add('ext-intercom', $offcode, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ $ext->add('ext-intercom', $offcode, '', new ext_macro('user-callerid')); // $cmd,n,Macro(user-callerid)
+ $ext->add('ext-intercom', $offcode, '', new ext_setvar('DB(AMPUSER/${CALLERID(number)}/intercom)', 'disabled')); // $cmd,n,Set(...=disabled)
+ $ext->add('ext-intercom', $offcode, '', new ext_playback('intercom&disabled')); // $cmd,n,Playback(...)
+ $ext->add('ext-intercom', $offcode, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+ }
+ }
+
+ break;
+ }
+}
+
+function paging_list() {
+ global $db;
+
+ $sql = "SELECT DISTINCT page_number FROM paging_groups ORDER BY page_number";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ // There should be a checkRange here I think, but I haven't looked into it yet.
+// return array('999', '998', '997');
+ return $results;
+}
+
+function paging_get_devs($grp) {
+ global $db;
+
+ // Just in case someone's trying to be smart with a SQL injection.
+ $grp = addslashes($grp);
+
+ $sql = "SELECT ext FROM paging_groups where page_number='$grp'";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results))
+ $results = null;
+ foreach ($results as $val)
+ $tmparray[] = $val[0];
+ return $tmparray;
+}
+
+function paging_get_pagingconfig($grp) {
+ global $db;
+
+ // Just in case someone's trying to be smart with a SQL injection.
+ $grp = addslashes($grp);
+
+ $sql = "SELECT * FROM paging_config WHERE page_group='$grp'";
+ $results = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($results))
+ $results = null;
+ return $results;
+}
+
+function paging_modify($oldxtn, $xtn, $plist, $force_page) {
+ global $db;
+
+ // Just in case someone's trying to be smart with a SQL injection.
+ $xtn = addslashes($xtn);
+
+ // Delete it if it's there.
+ paging_del($oldxtn);
+
+ // Now add it all back in.
+ paging_add($xtn, $plist, $force_page);
+
+ // Aaad we need a reload.
+ needreload();
+
+}
+
+function paging_del($xtn) {
+ global $db;
+ $sql = "DELETE FROM paging_groups WHERE page_number='$xtn'";
+ $res = $db->query($sql);
+ if (DB::isError($res)) {
+ var_dump($res);
+ die("Error in paging_del(): ");
+ }
+
+ $sql = "DELETE FROM paging_config WHERE page_group='$xtn'";
+ $res = $db->query($sql);
+ if (DB::isError($res)) {
+ var_dump($res);
+ die("Error in paging_del(): ");
+ }
+
+ needreload();
+}
+
+function paging_add($xtn, $plist, $force_page) {
+ global $db;
+
+ // $plist contains a string of extensions, with \n as a seperator.
+ // Split that up first.
+ if (is_array($plist)) {
+ $xtns = $plist;
+ } else {
+ $xtns = explode("\n",$plist);
+ }
+ foreach (array_keys($xtns) as $val) {
+ $val = addslashes(trim($xtns[$val]));
+ // Sanity check input.
+
+ $sql = "INSERT INTO paging_groups(page_number, ext) VALUES ('$xtn', '$val')";
+ $db->query($sql);
+ }
+
+ $sql = "INSERT INTO paging_config(page_group, force_page) VALUES ('$xtn', '$force_page')";
+ $db->query($sql);
+
+ needreload();
+}
+
+
+// this can be removed in 2.2 and put back to just runModuleSQL which is in admin/functions.inc.php
+// I didn't want to do it in 2.1 as there's a significant user base out there, and it will break
+// them if we do it here.
+
+function pagingrunModuleSQL($moddir,$type){
+ global $db;
+ $data='';
+ if (is_file("modules/{$moddir}/{$type}.sql")) {
+ // run sql script
+ $fd = fopen("modules/{$moddir}/{$type}.sql","r");
+ while (!feof($fd)) {
+ $data .= fread($fd, 1024);
+ }
+ fclose($fd);
+
+ preg_match_all("/((SELECT|INSERT|UPDATE|DELETE|CREATE|DROP).*);\s*\n/Us", $data, $matches);
+
+ foreach ($matches[1] as $sql) {
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ return true;
+}
+
+
+
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES/paging.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES/paging.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES/paging.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES/paging.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/i18n/he_IL/LC_MESSAGES/paging.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,81 @@
+# Hebrew version for Paging FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: functions.inc.php:23
+msgid ""
+"There is a problem with install.sql, cannot re-create databases. Contact "
+"support\n"
+msgstr "××©× × ××¢××× ×¢× install.sql, ×× ×××× ××צ×ר ×××ש ×ת ×ס×× ×× ×ª×× ××. צ×ר קשר ×¢× ×ª××××\n"
+
+#: functions.inc.php:26
+msgid "Database was deleted! Recreated successfully.<br>\n"
+msgstr "××¡× ×× ×ª×× ×× × ××ק! × ×צר ×××ש ××צ×××.<br />\n"
+
+#: page.paging.php:40
+msgid "Paging Group Deleted<br>\n"
+msgstr "ק××צת ×××ת×ת × ××ק×<br />\n"
+
+#: page.paging.php:49
+msgid "<h5>Paging Group $pagenbr Modified</h5>\n"
+msgstr "<h5>ק××צת ×××ת×ת $pagebr ש×× ×ª×</h5>\n"
+
+#: page.paging.php:59
+msgid ""
+"This module is for specific phones that are capable of Paging or Intercom. "
+"This section is for configuring group paging, intercom is configured through "
+"<strong>Feature Codes</strong>.<br /><br />The current list of supported "
+"phones is GXP-2000 with firmware 1.0.13 or higher, Snom phones with 'recent' "
+"firmware, Polycom phones (provisioned to auto answer), Linksys/Sipura "
+"phones, and a few various others. Any phone that is always set to auto-"
+"answer should also work (such as the console extension if configured)."
+msgstr "××××× ×× ××× ×¢××ר ××פ×× ×× ×ת××××× ×××ת×ת ×× ××× ×רק××. ××ק ×× × ××¢× ×¢××ר ק××עת תצ××¨× ×××ת×ת ק××צ×ת, ××× ×רק×× ××××ר ××¨× <strong>ק××× ×ª××× ×ת</strong>.<br /><br />×רש××× ×× ××××ת ×©× ×××פ×× ×× ×× ×ª×××× ××× GXP-2000 ×¢× ×§×ש×× 1.0.13 ×× ×××©× ××תר, ××פ×× ×× ×©× Snom ×¢× ×§×ש×× '×¢××× ×ת', ××פ×× ×× ×©× ×¤×××ק×× (ש××××ר×× ××¢× ×ת ××××¤× ×××××××), ××פ×× ×× ×©× ××× ×§×¡×ס/ס×פ×ר×, ×××¢× ××ר××. ×× ××פ×× ×©××××ר ××¢× ×ת ת××× ××××¤× ××××××× ×× ××¢××× )××× ×××©× ××ר×ת ק×× ×¡××× ×× ××××רת)."
+
+#: page.paging.php:71
+msgid "Delete Group"
+msgstr "××ק ק××צ×"
+
+#: page.paging.php:81
+msgid "Modify Paging Group"
+msgstr "×©× × ×§××צת ××ת×ת"
+
+#: page.paging.php:81 page.paging.php:142
+msgid "Add Paging Group"
+msgstr "××סף ק××צת ××ת×ת"
+
+#: page.paging.php:82
+msgid "Paging Extension"
+msgstr "ש×××ת ××ת×ת"
+
+#: page.paging.php:83
+msgid "The number users will dial to page this group"
+msgstr "××ספר ש×שת×ש×× ×××××× ××× ×××תת ×ק×××¦× ××ת"
+
+#: page.paging.php:86
+msgid "extension list:"
+msgstr "רש××ת ×ש××××ת:"
+
+#: page.paging.php:86
+msgid "List extensions to page, one per line."
+msgstr "רש××ת ×ש××××ת ש×ש ×××תת ×××, ××ת ××× ×©×ר×."
+
+#: page.paging.php:151
+msgid "Page Group"
+msgstr "ק××צת ××ת×ת"
+
+#: page.paging.php:154
+msgid "Paging and Intercom"
+msgstr "××ת×ת ×××× ×רק××"
Added: freepbx/modules-2.2/modules/freepbx-module-paging/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,51 @@
+<?php
+
+// Enable intercom as a feature code
+$fcc = new featurecode('paging', 'intercom-prefix');
+$fcc->setDescription('Intercom prefix');
+$fcc->setDefault('*80',false);
+$fcc->update();
+unset($fcc);
+
+// User intercom enable code
+$fcc = new featurecode('paging', 'intercom-on');
+$fcc->setDescription('User Intercom Allow');
+$fcc->setDefault('*54',false);
+$fcc->update();
+unset($fcc);
+
+// User intercom disable
+$fcc = new featurecode('paging', 'intercom-off');
+$fcc->setDescription('User Intercom Disallow');
+$fcc->setDefault('*55',false);
+$fcc->update();
+unset($fcc);
+
+
+// version 1.6 upgrade
+$sql = "SELECT page_group FROM paging_config";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // this table wasn't used up to this point, replace it with the new one
+ $sql = "DROP TABLE paging_config;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+
+ $sql = "CREATE TABLE IF NOT EXISTS paging_config ( page_group VARCHAR(50), force_page INTEGER(1) NOT NULL);";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+
+ // insert default values
+ $sql = "INSERT INTO paging_config SELECT DISTINCT page_number, 0 FROM paging_groups;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+}
+
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-paging/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,4 @@
+CREATE TABLE IF NOT EXISTS paging_overview ( config VARCHAR(50) , detail VARCHAR(25));
+CREATE TABLE IF NOT EXISTS paging_groups ( page_number VARCHAR(50) , ext VARCHAR(25));
+CREATE TABLE IF NOT EXISTS paging_config ( page_group VARCHAR(50), force_page INTEGER(1) NOT NULL);
+CREATE TABLE IF NOT EXISTS paging_phones ( phone_name VARCHAR(50), priority INT, command VARCHAR(50));
Added: freepbx/modules-2.2/modules/freepbx-module-paging/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,25 @@
+<module>
+ <rawname>paging</rawname>
+ <name>Paging and Intercom</name>
+ <version>1.6.3</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <changelog>
+ *1.6.3* Add he_IL translation
+ *1.6.2* Fix callerid bug
+ *1.6.1* Fix install bug
+ *1.6* Busy devices are no longer paged, flag added to allow overriding this behaviour.
+ *1.5.2* Pages now start with a "beep" sound. Fixed help text.
+ *1.5.1* Fixed bug with saving paging group
+ *1.5* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <description>Allows creation of paging groups to make announcements using the speaker built into most SIP phones.
+
+ Also creates an Intercom feature code that can be used as a prefix to talk directly to one person, as well as optional feature codes to block/allow intercom calls.</description>
+ <menuitems>
+ <paging>Paging and Intercom</paging>
+ </menuitems>
+ <location>release/2.2/paging-1.6.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Paging</info>
+ <md5sum>50514bdaa419836f01962ca501c00f22</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-paging/page.paging.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/page.paging.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/page.paging.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,163 @@
+<?php
+/* $Id: page.paging.php 3217 2006-11-28 01:40:23Z gregmac $ */
+//Copyright (C) 2006 Rob Thomas (xrobau at gmail.com)
+//
+//This program is free software; you can redistribute it and/or
+//modify it under the terms of version 2 of the GNU General Public
+//License as published by the Free Software Foundation.
+//
+//This program 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.
+
+//Both of these are used for switch on config.php
+$display = isset($_REQUEST['display'])?$_REQUEST['display']:'paging';
+$type = isset($_REQUEST['type'])?$_REQUEST['type']:'tool';
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$force_page = isset($_REQUEST['force_page']) ? $_REQUEST['force_page']:0;
+$selection = isset($_REQUEST['selection'])?$_REQUEST['selection']:'';
+$pagelist = isset($_REQUEST['pagelist'])?$_REQUEST['pagelist']:'';
+$pagenbr = isset($_REQUEST['pagenbr'])?$_REQUEST['pagenbr']:'';
+$pagegrp = isset($_REQUEST['pagegrp'])?$_REQUEST['pagegrp']:'';
+
+?>
+
+</div>
+<?php
+// Check to make sure that the paging database is propogated and
+// up to date.
+paging_init();
+
+switch ($action) {
+ case "add":
+ paging_sidebar($selection, $type, $display);
+ paging_show(null, $display, $type);
+ break;
+ case "delete":
+ paging_del($selection);
+ redirect_standard();
+ break;
+ case "modify":
+ paging_sidebar($selection, $type, $display);
+ paging_show($selection, $display, $type);
+ break;
+ case "submit":
+ paging_modify($pagegrp, $pagenbr, $pagelist, $force_page);
+ redirect_standard();
+ break;
+ default:
+ paging_sidebar($selection, $type, $display);
+ paging_text();
+}
+
+function paging_text() {
+?>
+<p><?php echo _("This module is for specific phones that are capable of Paging or Intercom. This section is for configuring group paging, intercom is configured through <strong>Feature Codes</strong>.<br /><br />The current list of supported phones is GXP-2000 with firmware 1.0.13 or higher, Snom phones with 'recent' firmware, Polycom phones (provisioned to auto answer), Linksys/Sipura phones, and a few various others. Any phone that is always set to auto-answer should also work (such as the console extension if configured).") ?></p>
+<?php
+}
+
+function paging_show($xtn, $display, $type) {
+ if ($xtn) {
+ $rows = count(paging_get_devs($xtn))+1;
+ if ($rows < 5)
+ $rows = 5;
+ if ($rows > 20)
+ $rows = 20;
+ echo "<p><a href='".$_SERVER['PHP_SELF']."?type=${type}&display=${display}&action=delete";
+ echo "&selection=${xtn}'>"._("Delete Group")." $xtn</a></p>";
+ } else {
+ $rows = 5;
+ }
+
+ $config = paging_get_pagingconfig($xtn);
+
+ $force_page = $config['force_page'];
+
+ echo "<form name='page_edit' action='".$_SERVER['PHP_SELF']."' method='post' onsubmit='return page_edit_onsubmit();'>\n";
+ echo "<input type='hidden' name='display' value='${display}'>\n";
+ echo "<input type='hidden' name='type' value='${type}'>\n";
+ echo "<input type='hidden' name='pagegrp' value='{$xtn}'>\n";
+ echo "<input type='hidden' name='action' value='submit'>\n";
+ echo "<table><tr><td colspan=2><h5>";
+ echo ($xtn)?_("Modify Paging Group"):_("Add Paging Group")."</h5></td></tr>\n"; ?>
+ <tr><td><a href='#' class='info'><?php echo _("Paging Extension") ?><span>
+ <?php echo _("The number users will dial to page this group") ?></span></a></td>
+ <td><input size='5' type='text' name='pagenbr' value='<?php echo $xtn ?>'></td>
+ </tr>
+ <tr><td valign='top'><a href='#' class='info'><?php echo _("extension list:")."<span><br>"._("Select extension(s)to page. If using users and devices mode, this will be the device number to page, potentially confusing if extension numbers and device numbers don't match. Use Ctrl key to select multiple..") ?>
+ <br><br></span></a></td>
+ <td valign="top">
+
+ <select multiple="multiple" name="pagelist[]" id="xtnlist" >
+ <?php
+ $selected = paging_get_devs($xtn);
+ if (is_null($selected)) $selected = array();
+ foreach (core_devices_list() as $device) {
+ echo '<option value="'.$device[0].'" ';
+ if (array_search($device[0], $selected) !== false) echo ' selected="selected" ';
+ echo '>'.$device[0].' - '.$device[1].'</option>';
+ }
+ ?>
+ </select>
+
+ <br>
+ </td></tr>
+
+ <tr><td><label for="force_page"><a href='#' class='info'><?php echo _("Force if busy") ?><span>
+ <?php echo _("If selected, will not check if the device is in use before paging it. This means conversations can be interrupted by a page (depending on how the device handles it). This is useful for \"emergency\" paging groups ") ?></span></a></label></td>
+ <td><input type='checkbox' name='force_page' id="force_page" value='1' <?php if ($force_page) { echo 'CHECKED'; } ?>></td>
+
+ <tr>
+ <td colspan="2"><br><h6><input type="submit" name="Submit" type="button" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+<script language="javascript">
+<!--
+var theForm = document.page_edit;
+theForm.pagenbr.focus();
+
+function page_edit_onsubmit() {
+ var msgInvalidPageExt = "<?php echo _('Please enter a valid Paging Extension'); ?>";
+ var msgInvalidExtList = "<?php echo _('Please select at least one extension'); ?>";
+
+ defaultEmptyOK = false;
+ if (!isInteger(theForm.pagenbr.value))
+ return warnInvalid(theForm.pagenbr, msgInvalidPageExt);
+
+ var selected = 0;
+ for (var i=0; i < theForm.xtnlist.options.length; i++) {
+ if (theForm.xtnlist.options[i].checked) selected += 1;
+ }
+ if (selected < 1) {
+ return warnInvalid(theForm.xtnlist, msgInvalidExtList);
+ }
+
+ return true;
+}
+
+-->
+</script>
+ </form>
+<?php
+}
+
+function paging_sidebar($selection, $type, $display) {
+ echo "<div class='rnav'><ul>\n";
+ echo "<li><a id='".($selection==''?'current':'std')."' ";
+ echo "href='config.php?type=${type}&display=${display}&action=add'>"._("Add Paging Group")."</a></li>";
+ //get the list of paging groups
+ $presults = paging_list();
+ if ($presults) {
+ foreach ($presults as $grouparr) {
+ $group = $grouparr[0];
+ echo "<li><a id=\"".($selection==$group ? 'current':'std');
+ echo "\" href=\"config.php?type=${type}&display=";
+ echo "${display}&selection=${group}&action=modify\">";
+ echo _("Page Group")." ${group}</a></li>";
+ }
+ }
+ echo "</ul></div><div class='content'><h2>"._("Paging and Intercom")."</h2>\n";
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-paging/phones.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/phones.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/phones.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,8 @@
+# These are the three most common ways of auto answering.
+INSERT INTO paging_phones VALUES ('GXP-2000', 1, 'Set(SIPADDHEADER="Call-Info: answer-after=0")')
+INSERT INTO paging_phones VALUES ('Polycom', 1, 'Set(ALERT_INFO="Ring Answer")')
+INSERT INTO paging_phones VALUES ('Snom', 1, 'Set(SIP_URI_OPTIONS="intercom=true")')
+
+
+
+
Added: freepbx/modules-2.2/modules/freepbx-module-paging/sounds/intercom.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-paging/sounds/intercom.sln
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-paging/sounds/intercom.wav
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-paging/sounds/intercom.wav
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-paging/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-paging/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-paging/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,3 @@
+DROP TABLE IF EXISTS paging_overview;
+DROP TABLE IF EXISTS paging_groups;
+DROP TABLE IF EXISTS paging_phones;
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-parking (2.2-2.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:31 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-parking
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-parking
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Parking Lot
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:31 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/parking/
+*.sql usr/share/freepbx/modules/parking/
+*.sqlite usr/share/freepbx/modules/parking/
+*.html usr/share/freepbx/modules/parking/
+*.xml usr/share/freepbx/modules/parking/
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install parking || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall parking || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall parking || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-parking/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-parking/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-parking/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,154 @@
+<?php /* $Id: functions.inc.php 2188 2006-07-27 02:21:52Z p_lindheimer $ */
+
+function parking_destinations() {
+}
+
+/* Generates dialplan for parkinglot
+ We call this with retrieve_conf
+*/
+function parking_get_config($engine) {
+ global $db;
+ global $ext; // is this the best way to pass this?
+ switch($engine) {
+ case "asterisk":
+
+ $contextname = 'park-dial';
+
+ $parkinglot_id = 1; // only 1 parking lot, but prepare for future
+ $results = parking_getconfig($parkinglot_id);
+
+ // Got the array, let's go work out the required variables
+ //
+ $parkingenabled = isset($results['parkingenabled'])?$results['parkingenabled']:'';
+ $parkext = isset($results['parkext'])?$results['parkext']:70;
+ $numslots = isset($results['numslots'])?$results['numslots']:8;
+ $parkingtime = isset($results['parkingtime'])?$results['parkingtime']:'';
+ $parkingcontext = isset($results['parkingcontext'])?$results['parkingcontext']:'parkedcalls';
+ $parkalertinfo = isset($results['parkalertinfo'])?$results['parkalertinfo']:'';
+ $parkcid = isset($results['parkcid'])?$results['parkcid']:'';
+ $parkingannmsg = isset($results['parkingannmsg'])?$results['parkingannmsg']:'';
+ $goto = isset($results['goto'])?$results['goto']:'from-pstn,s,1';
+
+ $parkpos1 = $parkext + 1;
+ $parkpos2 = $parkpos1 + $numslots;
+
+ //open the file and truncate. If diabled, file will be deleted this way
+ //AND GET THE ENV VARIABLES TO CALL THIS BY
+
+ $filename = (isset($amp_conf["ASTETCDIR"]) ? $amp_conf["ASTETCDIR"] : "/etc/asterisk/") . "parking_additional.inc";
+ $fh = fopen($filename, "w+");
+ fwrite($fh, ";*** WARNING: DO NOT HAND EDIT THIS FILE IT IS AUTO-GENERATD ***\n;\n");
+
+ if ($parkingenabled) {
+ // TODO: lookup ampportal.conf variables for this, don't hard code
+ // first write features_additional.inc include file
+ //
+ fwrite($fh, "parkext => ".$parkext."\n");
+ fwrite($fh, "parkpos => ".$parkpos1."-".$parkpos2."\n");
+ fwrite($fh, "context => ".$parkingcontext."\n");
+ if ($parkingtime) {
+ fwrite($fh, "parkingtime => ".$parkingtime."\n");
+ }
+
+ // Now generate dialplan
+ $ext->add($contextname, "t", '', new ext_noop('Parked Call Timed Out and Got Orphaned'));
+ if ($parkalertinfo) {
+ $ext->add($contextname, "t", '', new ext_setvar('__ALERT_INFO',str_replace(';', '\;', $parkalertinfo)));
+ }
+ if ($parkcid) {
+ $ext->add($contextname, "t", '', new ext_setvar('CALLERID(name)', $parkcid.'${CALLERID(name)}'));
+ }
+ if ($parkingannmsg) {
+ $ext->add($contextname, "t", '', new ext_playback($parkingannmsg));
+ }
+ // goto the destination here
+ //
+ $ext->add($contextname, "t", '', new ext_goto($goto));
+ } else {
+ fwrite($fh, ";*** PARKING LOT HAS BEEN DISABLED ***\n");
+ }
+ fclose($fh);
+ chmod($filename, 0660);
+ break;
+ }
+}
+
+function parking_add($parkingenabled, $parkext, $numslots, $parkingtime, $parkingcontext, $parkalertinfo, $parkcid, $parkingannmsg, $goto) {
+ global $db;
+
+ $parkinglot_id = 1; // only 1 parkinglot but prepare for future
+
+ // in future will do in a parking_del but not needed for now
+ //
+ $sql = "DELETE FROM parkinglot WHERE id = '$parkinglot_id'";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().$sql);
+ }
+
+ // Check for interger only inputs and set to default if not
+ // and set goto to default if not set for some reason
+ //
+ $parkext = ctype_digit($parkext) ? $parkext : 70;
+ $numslots = ctype_digit($numslots) ? $numslots : 8;
+ $parkingtime = ctype_digit($parkingtime) ? $parkingtime : '';
+ $goto = ($goto) ? $goto : 'from-pstn,s,1';
+
+ $parkfields = array(array($parkinglot_id, 'parkingenabled', "$parkingenabled"),
+ array($parkinglot_id, 'parkext', "$parkext"),
+ array($parkinglot_id, 'numslots', "$numslots"),
+ array($parkinglot_id, 'parkingtime', "$parkingtime"),
+ array($parkinglot_id, 'parkingcontext', trim("$parkingcontext")),
+ array($parkinglot_id, 'parkalertinfo', trim("$parkalertinfo")),
+ array($parkinglot_id, 'parkcid', trim("$parkcid")),
+ array($parkinglot_id, 'parkingannmsg', "$parkingannmsg"),
+ array($parkinglot_id, 'goto', "$goto"));
+
+ $compiled = $db->prepare('INSERT INTO parkinglot (id, keyword, data) values (?,?,?)');
+
+ $result = $db->executeMultiple($compiled,$parkfields);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo()."<br><br>".'error adding to PARKING table');
+ }
+}
+
+
+function parking_getconfig($parkinglot_id=1) {
+ global $db;
+ $sql = "SELECT keyword,data FROM parkinglot WHERE id = '$parkinglot_id'";
+ $results = $db->getAssoc($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ return $results;
+}
+
+// Duly stolen from the queues module (since I can't count on it being there, but would not be bad to stuff back in the common include
+//
+function parking_timeString($seconds, $full = false) {
+ if ($seconds == 0) {
+ return "0 ".($full ? "seconds" : "s");
+ }
+
+ $minutes = floor($seconds / 60);
+ $seconds = $seconds % 60;
+
+ $hours = floor($minutes / 60);
+ $minutes = $minutes % 60;
+
+ $days = floor($hours / 24);
+ $hours = $hours % 24;
+
+ if ($full) {
+ return substr(
+ ($days ? $days." day".(($days == 1) ? "" : "s").", " : "").
+ ($hours ? $hours." hour".(($hours == 1) ? "" : "s").", " : "").
+ ($minutes ? $minutes." minute".(($minutes == 1) ? "" : "s").", " : "").
+ ($seconds ? $seconds." second".(($seconds == 1) ? "" : "s").", " : ""),
+ 0, -2);
+ } else {
+ return substr(($days ? $days."d, " : "").($hours ? $hours."h, " : "").($minutes ? $minutes."m, " : "").($seconds ? $seconds."s, " : ""), 0, -2);
+ }
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES/parking.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES/parking.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES/parking.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES/parking.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/i18n/he_IL/LC_MESSAGES/parking.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,118 @@
+# Hebrew version for Parking FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.parking.php:60
+msgid "Parking Lot Options"
+msgstr "×פשר×××ת ××רש ×× ×××"
+
+#: page.parking.php:62
+msgid "Enable Parking Lot Feature"
+msgstr "×פשר ת××× ×ª ××רש ×× ×××"
+
+#: page.parking.php:62
+msgid "Check this box to enable the parking feature"
+msgstr "ס×× ×ª××× ×× ××× ××פשר ×ת ת××× ×ª ××× ××"
+
+#: page.parking.php:66
+msgid "Parking Lot Extension:"
+msgstr "ש××××ת ×× ××:"
+
+#: page.parking.php:67
+msgid "This is the extension where you will transfer a call to park it."
+msgstr "×××× ×ש×××× ×©×××× ×ª×¢××ר ש××× ××× ×××× ×ת ××ת×."
+
+#: page.parking.php:72
+msgid "Number of Slots:"
+msgstr "×ספר ××ק×××ת ש×ש ××קצ×ת:"
+
+#: page.parking.php:72
+msgid ""
+"The total number of parking lot spaces to configure. Example, if 70 is the "
+"extension and 8 slots are configured, the parking slots will be 71-79"
+msgstr "×¡× ××× ×ספר ××× ××ת ש×ש ×××××ר ××ער×ת. ××××××, ×× 70 ××× ×ש××××, × 8 ××× ×ספר ××× ××ת ש××××ר, ××× ×ק×××ת ××× ××× ×××× 71-78"
+
+#: page.parking.php:85
+msgid "Parking Timeout:"
+msgstr "××× ×× ×× ×קס××××:"
+
+#: page.parking.php:85
+msgid ""
+"The timeout period that a parked call will attempt to ring back the original "
+"parker if not answered"
+msgstr "×××× ××קס×××× ×©×× ×©××× ×ª×ת×× ××× ××, ××××ר ××× ×ª× ×¡× ××תקשר ×××¨× ×× ×× ×©××× × ×××ª× ×× ××× ×× × ×¢× ×ª×"
+
+#: page.parking.php:98
+msgid "Parking Lot Context:"
+msgstr "×קשר (context) ×©× ××רש ××× ××:"
+
+#: page.parking.php:99
+msgid ""
+"This is the parking lot context. You should not change it from the default "
+"unless you know what you are doing."
+msgstr "××× ××קשר (context( ×©× ××רש ××× ××. ×× ×ª×©× × ××××¨× ×× ××ר×רת ××××× ××× ×× ×× ××ª× ××××¢ ××× ×××× ×× ××ª× ×¢×ש×."
+
+#: page.parking.php:103
+msgid "Actions for Timed-Out Orphans"
+msgstr "פע×××ת ש×ש ××צע ×¢××ר ×ת×××× ×©×¢×ר ××× ××××ª× × ××קס×××× ×©××× ××× ××"
+
+#: page.parking.php:105
+msgid "Parking Alert-Info:"
+msgstr "××××¢ ×תר×× ×¢× ×× ××:"
+
+#: page.parking.php:106
+msgid ""
+"Alert-Info to put in channel before going to defined destination below. This "
+"can create distinct rings on some SIP phones and can serve to alert the "
+"recipients that the call is from an Orphaned parked call"
+msgstr "××××¢ ×תר×× ×©×ש ×ש××× ×ער××¥ ××¤× × ×©×××××× ×××¢× ×©××××ר ×ק××. פע××× ×× ××××× ××צ×ר צ×צ×× ××××× ×××ק ×××פ×× × ×-SIP ×××××× ××תר××¢ ××ק×× ×©×ש××× ××××¢× ×××¨× ××× ××× ×©××£ ××× ×× ××¨× ××¢× ×ת ××"
+
+#: page.parking.php:111
+msgid "CallerID Prepend:"
+msgstr "×ק×× ××××× ×©×××:"
+
+#: page.parking.php:112
+msgid ""
+"String to pre-pend to the current Caller-ID associated with this call (if "
+"any), before going to defined destination below. This can serve to alert the "
+"recipients that the call is from an Orphaned parked call"
+msgstr "×ק×× ×ת ××××× ×ש××× ××ש×××× ×ש××× ×× (×× ×××× ×ש) ×××ר××ת ××, ××¤× × ×©×××××× ×××¢× ×©×ק××. פע××× ×× ××××× ×ש×ש ××× ××תר××¢ ××¤× × ×ק×× ×ש×××, ש×ש××× ××××¢× ×ש××× ×××¨× ××× ××× ×©××£ ××× ×× ××¨× ××¢× ×ת ××"
+
+#: page.parking.php:118 page.parking.php:136
+msgid "Announcement:"
+msgstr "××ר××:"
+
+#: page.parking.php:118
+msgid ""
+"Optional message to be played to the orphaned caller prior to going on the "
+"to supplied destination below.<br><br>To add additional recordings please "
+"use the \"System Recordings\" MENU to the left"
+msgstr "×××עת רש×ת ש×ש ××ש×××¢ ××תקשר ××ת×× ××¤× × ×©×××××× ×××¢× ××צ×××× ×ק××.<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×× × ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ×שר ××¦× ×©×××"
+
+#: page.parking.php:124
+msgid "None"
+msgstr "×××"
+
+#: page.parking.php:136
+msgid ""
+"Optional message to be played to the orphaned caller prior to going on to "
+"the supplied destination below.<br><br>You must install and enable the "
+"\"Systems Recordings\" Module to edit this option"
+msgstr "×××עת רש×ת ש×ש ××ש×××¢ ××תקשר ××ת×× ××¤× × ×©×××××× ×××¢× ××צ×××× ×ק××.<br /><br />××ª× ×××× ××תק×× ×××פע×× ×ת ×××××× \"×ק×××ת ×ער×ת\" ××× ×ער×× ×פשר×ת ××"
+
+#: page.parking.php:146
+msgid "Destination for Orphaned Parked Calls"
+msgstr "××¢× ×¢××ר ש×××ת ×ת×××ת ש××£ ××× ×× ××¨× ××¢× ×ת ×××"
Added: freepbx/modules-2.2/modules/freepbx-module-parking/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,6 @@
+CREATE TABLE IF NOT EXISTS `parkinglot` (
+ `id` VARCHAR( 20 ) NOT NULL default '1',
+ `keyword` varchar(40) NOT NULL default '',
+ `data` varchar(150) NOT NULL default '',
+ PRIMARY KEY (`id`,`keyword`)
+) TYPE=MyISAM;
Added: freepbx/modules-2.2/modules/freepbx-module-parking/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,20 @@
+<module>
+ <rawname>parking</rawname>
+ <name>Parking Lot</name>
+ <version>2.1</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Manages parking lot extensions and other options.
+
+ Parking is a way of putting calls "on hold", and then picking them up from any extension.</description>
+ <menuitems>
+ <parking>Parking Lot</parking>
+ </menuitems>
+ <changelog>
+ *2.1* Remove settings on uninstall bug #1597
+ *2.0.2* Add he_IL translation
+ </changelog>
+ <location>release/2.2/parking-2.0.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-ParkingLot</info>
+ <md5sum>bfc593350434e47b8f291214fc2d137c</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-parking/page.parking.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/page.parking.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/page.parking.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,174 @@
+<?php /* $Id: page.parking.php 2243 2006-08-12 17:13:17Z p_lindheimer $ */
+//Copyright (C) 2006 Astrogen LLC
+//
+//This program 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.
+//
+//This program 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.
+
+$dispnum = 'parking'; //used for switch on config.php
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+
+isset($_REQUEST['parkingenabled'])?$parkingenabled=$_REQUEST['parkingenabled']:$parkingenabled='';
+isset($_REQUEST['parkext'])?$parkext = trim($_REQUEST['parkext']):$parkext='70';
+isset($_REQUEST['numslots'])?$numslots = trim($_REQUEST['numslots']):$numslots='8';
+isset($_REQUEST['parkingtime'])?$parkingtime = trim($_REQUEST['parkingtime']):$parkingtime='45';
+isset($_REQUEST['parkingcontext'])?$parkingcontext = trim($_REQUEST['parkingcontext']):$parkingcontext='parkedcalls';
+isset($_REQUEST['parkalertinfo'])?$parkalertinfo = trim($_REQUEST['parkalertinfo']):$parkalertinfo='';
+isset($_REQUEST['parkcid'])?$parkcid = trim($_REQUEST['parkcid']):$parkcid='';
+isset($_REQUEST['parkingannmsg'])?$parkingannmsg = trim($_REQUEST['parkingannmsg']):$parkingannmsg='';
+
+if (isset($_REQUEST['goto0']) && isset($_REQUEST[$_REQUEST['goto0']."0"])) {
+ $goto = $_REQUEST[$_REQUEST['goto0']."0"];
+} else {
+ $goto = '';
+}
+
+// do if we are submitting a form
+if(isset($_POST['action'])){
+
+ if ($action == 'edtPARKING') {
+ parking_add($parkingenabled, $parkext, $numslots, $parkingtime, $parkingcontext, $parkalertinfo, $parkcid, $parkingannmsg, $goto);
+ needreload();
+ redirect_standard();
+ }
+}
+?>
+</div>
+<div class="content">
+<?php
+
+// get the parkinglot settings if not a submit
+//
+if (!$action) {
+ $parkinglot_id = 1; // only 1 lot now but prepare for future
+ $parkingInfo = parking_getconfig($parkinglot_id);
+ if (is_array($parkingInfo)) extract($parkingInfo);
+}
+
+?>
+<h2>Parking Lot Configuration</h2>
+<form name="parking" action="config.php" method="post" onsubmit="return parking_onsubmit();">
+<input type="hidden" name="display" value="parking"/>
+<input type="hidden" name="action" value="edtPARKING"/>
+<table>
+<tr><td colspan="2"><h5><?php echo _("Parking Lot Options")?><hr></h5></td></tr>
+ <tr>
+ <td><a href=# class="info"><?php echo _("Enable Parking Lot Feature")?><span><?php echo _("Check this box to enable the parking feature")?></span></a></td>
+ <td align=right><input type="checkbox" value="s" name="parkingenabled" <?php echo ($parkingenabled ? 'CHECKED' : '')?>></td>
+ </tr>
+ <tr>
+ <td><a href=# class="info"><?php echo _("Parking Lot Extension:")?><span>
+<?php echo _("This is the extension where you will transfer a call to park it.")?><br>
+ </span></a></td>
+ <td align=right><input type="text" size="3" name="parkext" value="<?php echo htmlspecialchars($parkext)?>"/></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Number of Slots:")?><span><?php echo _("The total number of parking lot spaces to configure. Example, if 70 is the extension and 8 slots are configured, the parking slots will be 71-79")?></span></a></td>
+ <td align=right>
+ <select name="numslots"/>
+ <?php
+ $default = (isset($numslots) ? $numslots : 8);
+ for ($i=2; $i <= 20; $i++) {
+ echo '<option value="'.$i.'" '.($i == $default ? 'SELECTED' : '').'>'.$i.'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Parking Timeout:")?><span><?php echo _("The timeout period that a parked call will attempt to ring back the original parker if not answered")?></span></a></td>
+ <td align=right>
+ <select name="parkingtime"/>
+ <?php
+ $default = (isset($parkingtime) ? $parkingtime : 45);
+ for ($i=15; $i <= 600; $i+=15) {
+ echo '<option value="'.$i.'"'.($i == $parkingtime ? ' SELECTED' : '').'>'.parking_timeString($i,true).'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href=# class="info"><?php echo _("Parking Lot Context:")?><span>
+<?php echo _("This is the parking lot context. You should not change it from the default unless you know what you are doing.")?><br>
+ </span></a></td>
+ <td align=right><input type="text" size="19" name="parkingcontext" value="<?php echo htmlspecialchars($parkingcontext)?>"/></td>
+ </tr>
+<tr><td colspan="2"><br><h5><?php echo _("Actions for Timed-Out Orphans")?><hr></h5></td></tr>
+ <tr>
+ <td><a href=# class="info"><?php echo _("Parking Alert-Info:")?><span>
+<?php echo _("Alert-Info to put in channel before going to defined destination below. This can create distinct rings on some SIP phones and can serve to alert the recipients that the call is from an Orphaned parked call")?><br>
+ </span></a></td>
+ <td align=right><input type="text" size="19" name="parkalertinfo" value="<?php echo htmlspecialchars($parkalertinfo)?>"/></td>
+ </tr>
+ <tr>
+ <td><a href=# class="info"><?php echo _("CallerID Prepend:")?><span>
+<?php echo _("String to pre-pend to the current Caller-ID associated with this call (if any), before going to defined destination below. This can serve to alert the recipients that the call is from an Orphaned parked call")?><br>
+ </span></a></td>
+ <td align=right><input type="text" size="19" name="parkcid" value="<?php echo htmlspecialchars($parkcid)?>"/></td>
+ </tr>
+<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Announcement:")?><span><?php echo _("Optional message to be played to the orphaned caller prior to going on the to supplied destination below.<br><br>To add additional recordings please use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td align=right>
+ <select name="parkingannmsg"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($parkingannmsg) ? $parkingannmsg : '');
+ echo '<option value="">'._("None")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } else { ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Announcement:")?><span><?php echo _("Optional message to be played to the orphaned caller prior to going on to the supplied destination below.<br><br>You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td>
+ <td align=right>
+ <?php
+ $default = (isset($parkingannmsg) ? $parkingannmsg : '');
+ ?>
+ <input type="hidden" name="parkingannmsg" value="<?php echo $default; ?>"><?php echo ($default != '' ? $default : 'None'); ?>
+ </td>
+ </tr>
+<?php } ?>
+
+ <tr><td colspan="2"><br><h5><?php echo _("Destination for Orphaned Parked Calls")?>:<hr></h5></td></tr>
+<?php
+//draw goto selects
+echo drawselects($goto,0);
+?>
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+
+<script language="javascript">
+<!--
+
+var theForm = document.parking;
+
+function parking_onsubmit() {
+ var msgInvalidExtension = "<?php echo _('Please enter a valid numeric parking lot extension'); ?>";
+
+ defaultEmptyOK = false;
+ if (!isInteger(theForm.parkext.value))
+ return warnInvalid(theForm.parkext, msgInvalidExtension);
+ return true;
+}
+
+//-->
+</script>
+</form>
+
Added: freepbx/modules-2.2/modules/freepbx-module-parking/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-parking/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-parking/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE IF EXISTS parkinglot;
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/agi-bin/pbdirectory
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/agi-bin/pbdirectory 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/agi-bin/pbdirectory 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,422 @@
+#!/usr/bin/env php
+<?php
+
+/**
+// AGI directory Copyright (C) 2005 Greg MacLellan (greg at mtechsolutions.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+
+*/
+
+//define("AGIBIN_DIR", dirname(__FILE__));
+define("AGIBIN_DIR", '/var/lib/asterisk/agi-bin/');
+
+// set to 1 to say "zed" instead of "zee"
+define("SAY_ZED",0);
+
+/******************************************************************************/
+
+define("DEBUG", 1);
+
+define("DIR_LAST", 0);
+define("DIR_FIRST", 1);
+define("DIR_ANY", 2);
+
+define("NUM_DIGITS", 3);
+define("MAX_REPEAT", 2); // how many times can we repeat the menu before hanging up?
+
+// ordinal values of digits
+define("D_0",48);
+define("D_1",49);
+define("D_2",50);
+define("D_3",51);
+define("D_4",52);
+define("D_5",53);
+define("D_6",54);
+define("D_7",55);
+define("D_8",56);
+define("D_9",57);
+define("D_POUND",35);
+define("D_STAR",42);
+
+include(AGIBIN_DIR."/phpagi.php");
+
+function output(&$var) {
+ if (DEBUG) {
+ global $logfile;
+
+ if (!isset($logfile)) return false;
+
+ ob_start();
+ var_dump($var);
+ $output = ob_get_contents();
+ ob_end_clean();
+ fwrite($logfile, $output);
+ }
+}
+
+function parse_amportal_conf($filename) {
+ $file = file($filename);
+ if (is_array($file)) {
+ foreach ($file as $line) {
+ if (preg_match("/^\s*([a-zA-Z0-9]+)=([a-zA-Z0-9 .&-@=_<>\"\']+)\s*$/",$line,$matches)) {
+ $conf[ $matches[1] ] = $matches[2];
+ }
+ }
+ } else {
+ die("<h1>Missing or unreadable config file ($filename)...cannot continue</h1>");
+ }
+
+ if ( !isset($conf["AMPDBENGINE"]) || ($conf["AMPDBENGINE"] == ""))
+ {
+ $conf["AMPDBENGINE"] = "mysql";
+ }
+
+/*
+ if (($amp_conf["AMPDBENGINE"] == "sqlite") && (!isset($amp_conf["AMPDBENGINE"])))
+ $amp_conf["AMPDBFILE"] = "/var/lib/freepbx/freepbx.sqlite";
+*/
+
+ return $conf;
+}
+
+function phonebook_list() {
+ global $amp_conf;
+
+ $astman = new AGI_AsteriskManager();
+ if ($res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) {
+ $list = $astman->database_show();
+ foreach ($list as $k => $v) {
+ if (substr($k, 1, 7) == 'cidname')
+ $numbers[substr($k, 9)] = $v ;
+ }
+
+ if (is_array($numbers))
+ natcasesort($numbers);
+
+ return $numbers;
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+
+}
+
+/** Play a bunch of files, optionally accepting input and looping
+ * @param $files The file/files to play (for multiple files, pass array)
+ * @param $escape_digits The DTMF tones that can be pressed & returned, ie, "123*"
+ * @param $timeout The timeout waiting for a digit, or 0 to not wait at all.
+ * @param $max_digits Maximum number of digits to get. **NOT IMPLEMENTED YET.. 1 only**
+ * @param $loop False for no loop, or an integer >0 being the number of times to loop.
+ * @param $loopreturn Value to return when the loop expires
+*/
+function stream_multiple($files, $escape_digits = "", $timeout = 0, $max_digits = 1, $loop = false, $loopreturn = 0) {
+ global $agi;
+
+ if (!is_array($files)) {
+ $files = array($files);
+ }
+
+ $i = 0;
+ do {
+ foreach ($files as $file) {
+ $agi->verbose("-- Playing '".$file."' (language 'en')");
+ $r = $agi->stream_file($file, $escape_digits);
+ $agi->conlog("stream_multiple: $file returned ".$r["result"]);
+ switch ($r["result"]) {
+ case 0: // they did nothing
+ break;
+ case -1: // they hungup
+ $agi->verbose("remote user hungup");
+ return -1;
+ break;
+ default: // they pressed a key
+ return $r["result"];
+ break;
+ }
+ }
+
+ if ($timeout > 0) {
+ $r = $agi->wait_for_digit($timeout);
+ if (($r["result"] != 0) || (!$loop)) {
+ // return only if the reult is not 0 (timeout)
+ // or we're not doing a loop
+ return $r["result"];
+ }
+ }
+
+ if ($loop && (++$i > $loop)) {
+ return $loopreturn;
+ }
+ } while ($loop);
+
+ return 0;
+}
+
+/** If $file.(wav|WAV|gsm|GSM) exists
+ */
+function sound_file_exists($file) {
+ global $agi;
+
+ foreach (array("gsm","GSM","wav","WAV") as $ext) {
+ if (file_exists($file.".".$ext)) {
+ $agi->verbose("Found ".$file.".".$ext, 2);
+ return true;
+ }
+ }
+ return false;
+}
+
+function string_to_digits($string) {
+ $out = "";
+
+ for($i=0; $i<strlen($string); $i++) {
+ switch (strtoupper($string[$i])) {
+ case '1':
+ $out .= '1';
+ break;
+ case '2': case 'A': case 'B': case 'C':
+ $out .= '2';
+ break;
+ case '3': case 'D': case 'E': case 'F':
+ $out .= '3';
+ break;
+ case '4': case 'G': case 'H': case 'I':
+ $out .= '4';
+ break;
+ case '5': case 'J': case 'K': case 'L':
+ $out .= '5';
+ break;
+ case '6': case 'M': case 'N': case 'O':
+ $out .= '6';
+ break;
+ case '7': case 'P': case 'Q': case 'R': case 'S':
+ $out .= '7';
+ break;
+ case '8': case 'T': case 'U': case 'V':
+ $out .= '8';
+ break;
+ case '9': case 'W': case 'X': case 'Y': case 'Z':
+ $out .= '9';
+ break;
+ }
+
+ if ($i+1 == NUM_DIGITS) break;
+ }
+
+ return $out;
+}
+
+function say_alpha($string,$escape_digits) {
+ $string = strtolower($string);
+ $files = array();
+
+ for($i=0; $i<strlen($string); $i++) {
+ if (('a' <= $string[$i]) && ($string[$i] <= 'z')) {
+
+ if (($string[$i] == 'z') && SAY_ZED) {
+ $files[] = "letters/zed";
+ } else {
+ $files[] = "letters/".$string[$i];
+ }
+
+ } else if (('1' <= $string[$i]) && ($string[$i] <= '0')) {
+ $files[] = "digits/".$string[$i];
+
+ } else {
+ switch ($string[$i]) {
+ case "@": $files[] = "letters/at"; break;
+ case "-": $files[] = "letters/dash"; break;
+ case "$": $files[] = "letters/dollar"; break;
+ case ".": $files[] = "letters/dot"; break;
+ case "=": $files[] = "letters/equals"; break;
+ case "!": $files[] = "letters/exclaimation-point"; break;
+ case "+": $files[] = "letters/plus"; break;
+ case "/": case "\\": $files[] = "letters/slash"; break;
+ case " ": $files[] = "letters/space"; break;
+ }
+ }
+ }
+
+ return stream_multiple($files,$escape_digits);
+}
+
+function do_directory($type, &$directory, $dial_context, $say_exten, $operator) {
+ global $agi;
+
+ $agi->conlog('starting directory');
+
+ $escape_digits = "1*";
+ if ($operator) $escape_digits .= "0";
+
+ $agi->stream_file("pbdirectory/welcome-to-phonebook");
+
+ switch ($type) {
+ case DIR_FIRST: $intro = "pbdirectory/first-three-letters-entry"; break;
+ case DIR_ANY: $intro = "pbdirectory/first-three-letters-entry"; break;
+ }
+
+ if (DEBUG) $agi->verbose("start loop");
+
+ $loop = 0;
+ while ($loop < MAX_REPEAT) {
+ if (DEBUG) $agi->verbose("loop = ".$loop);
+ $r = $agi->get_data($intro, 4000, NUM_DIGITS);
+
+ if (($r["result"] == "0") && $operator) {
+ // operator
+ $agi->verbose("Dropping to operator");
+ // switch to o,1 in the current context
+ $agi->set_extension("o");
+ $agi->set_priority("1");
+ // exiting application immediately!
+ exit(0);
+ }
+ $digits = $r["result"];
+
+ usleep(500); // pause a bit, so digit presses get cleared
+
+ if ($digits !== "") {
+ // they entered SOMETHING, reset our loop
+ $loop = 0;
+ }
+
+ $i = 0;
+ $digit = false;
+ if (isset($directory[$digits]) && isset($directory[$digits][$i])) {
+ $loop = 0; // reset loop counter
+ do {
+ $match = & $directory[$digits][$i];
+
+ sleep(1);
+ //TODO: check if festival is available, say the name that way
+ $digit = say_alpha($match["name"],$escape_digits);
+
+ if (!$digit) {
+ $digit = stream_multiple(array("pbdirectory/if-correct-press","digits/1","pbdirectory/if-incorrect-press","digits/star"), $escape_digits, 3000);
+ }
+
+ switch ($digit) {
+ case D_1: // dial this
+ if ($say_exten) {
+ $agi->stream_file("try-extension");
+ $agi->say_digits($match["number"]);
+ }
+ $agi->conlog("Dial ".$match["number"]);
+
+ $agi->set_variable('dialnumber', $match['number']);
+ exit(0);
+ break;
+ case D_STAR: // not correct
+ $i += 1;
+ break;
+ case D_0: // operator
+ if ($operator) {
+ $agi->verbose("Dropping to operator");
+ // switch to o,1 in the current context
+ $agi->set_extension("o");
+ $agi->set_priority("1");
+ // exiting application immediately!
+ exit(0);
+ }
+ break;
+ case -1: // hungup
+ $agi->conlog("User hungup");
+ exit(1);
+ break;
+ case 0: // no response
+ $loop++;
+ break;
+ case -2: // loop timed out
+ $agi->stream_file("goodbye");
+ $agi->hangup();
+ exit(0);
+ break;
+ }
+
+ if ($digit !== 0) {
+ $loop = 0;
+ }
+ $digit = false;
+ } while (isset($directory[$digits][$i]) && ($loop < MAX_REPEAT));
+
+ if (!isset($directory[$digits][$i])) {
+ $agi->stream_file("dir-nomore");
+ $loop = 0; // reset our loop counter so it doesn't hangup
+ }
+ } else if (!empty($digits) || ($digits === "0")) {
+ // strict type checking as they may have entered "0" (string) which is empty()
+ $agi->stream_file("dir-nomatch");
+ } // else, we timed out
+
+ $loop++;
+ }
+}
+
+/******************************************************************************/
+$agi = new AGI;
+
+if (DEBUG) $logfile = fopen("/tmp/pbdirectory.log","w");
+$amp_conf = parse_amportal_conf('/etc/amportal.conf');
+
+$phonebook = phonebook_list();
+
+$operator = false;
+$dir_type = DIR_FIRST;
+$say_exten = false;
+
+if (isset($argv[1])) {
+ for($i=0; $i<strlen($argv[1]); $i++) {
+ switch ($argv[1][$i]) {
+ case "f": case "F":
+ $dir_type = DIR_FIRST;
+ break;
+ case "a": case "a":
+ $dir_type = DIR_ANY;
+ break;
+ case "o": case "O":
+ $operator = true;
+ break;
+ case "e": case "E":
+ $say_exten = true;
+ break;
+ }
+ }
+}
+
+$directory = array();
+foreach ($phonebook as $number=>$name) {
+ $names = explode(' ',$name);
+
+ switch ($dir_type) {
+ case DIR_FIRST: // first name only
+ $digits = string_to_digits($names[0]);
+ $directory[$digits][] = array("number"=>$number, "name"=>$name);
+ break;
+ case DIR_ANY: // all names
+ foreach ($names as $temp) {
+ $digits = string_to_digits($temp);
+ $directory[$digits][] = array("number"=>$number, "name"=>$name);
+ }
+ break;
+ }
+}
+
+if (DEBUG) {
+ output($argv);
+ output($dir_type);
+ output($directory);
+}
+
+$agi->verbose('test');
+do_directory($dir_type, $directory, $dial_context, $say_exten, $operator);
+
+?>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/agi-bin/pbdirectory
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-pbdirectory (2.2-0.3-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:37 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-pbdirectory
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-pbdirectory
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Phonebook Directory
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:37 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/pbdirectory/
+*.sql usr/share/freepbx/modules/pbdirectory/
+*.sqlite usr/share/freepbx/modules/pbdirectory/
+*.html usr/share/freepbx/modules/pbdirectory/
+*.xml usr/share/freepbx/modules/pbdirectory/
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install pbdirectory || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall pbdirectory || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall pbdirectory || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+<?php
+ /* $Id:$ */
+
+// returns a associative arrays with keys 'destination' and 'description'
+function pbdirectory_destinations() {
+ // return an associative array with destination and description
+ $extens[] = array('destination' => 'app-pbdirectory,pbdirectory,1', 'description' => 'Phonebook Directory');
+ return $extens;
+}
+
+function pbdirectory_get_config($engine) {
+ $modulename = 'pbdirectory';
+
+ // This generates the dialplan
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ $fcc = new featurecode('pbdirectory', 'app-pbdirectory');
+ $code = $fcc->getCodeActive();
+ unset($fcc);
+
+ if (!empty($code)) {
+ $ext->add('app-pbdirectory', $code, '', new ext_answer());
+ $ext->add('app-pbdirectory', $code, '', new ext_wait(1));
+ $ext->add('app-pbdirectory', $code, '', new ext_goto(1,'pbdirectory'));
+ }
+
+ $ext->add('app-pbdirectory', 'pbdirectory', '', new ext_agi('pbdirectory'));
+ $ext->add('app-pbdirectory', 'pbdirectory', '', new ext_gotoif('$["${dialnumber}"=""]','hangup,1'));
+ $ext->add('app-pbdirectory', 'pbdirectory', '', new ext_noop('Got number to dial: ${dialnumber}'));
+ $ext->add('app-pbdirectory', 'pbdirectory', '', new ext_dial('Local/${dialnumber}@from-internal/n','',''));
+ $ext->add('app-pbdirectory', 'hangup', '', new ext_hangup());
+
+ $ext->addInclude('from-internal-additional', 'app-pbdirectory');
+
+ break;
+ }
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,10 @@
+<?php
+
+// Enable phonebook directory as a feature code
+$fcc = new featurecode('pbdirectory', 'app-pbdirectory');
+$fcc->setDescription('Phonebook dial-by-name directory');
+$fcc->setDefault('411');
+$fcc->update();
+unset($fcc);
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pbdirectory/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pbdirectory/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,18 @@
+<module>
+ <rawname>pbdirectory</rawname>
+ <name>Phonebook Directory</name>
+ <version>0.3</version>
+ <type>tool</type>
+ <category>CID & Number Management</category>
+ <location>release/2.2/pbdirectory-2.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <description>Provides a dial-by-name directory for phonebook entries</description>
+ <requirements>
+ <version>2.2</version>
+ <module>phonebook</module>
+ <module>speeddial</module>
+ </requirements>
+ <md5sum>bc2a70884c09377ef212dd6e02c32cb7</md5sum>
+ <changelog>
+ </changelog>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/first-three-letters-entry.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/first-three-letters-entry.sln
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/if-correct-press.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/if-correct-press.sln
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/if-incorrect-press.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/if-incorrect-press.sln
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/welcome-to-phonebook.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pbdirectory/sounds/pbdirectory/welcome-to-phonebook.sln
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-phonebook (2.2-1.1.5-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:04 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-phonebook
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-phonebook
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Phonebook
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:04 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/phonebook/
+*.sql usr/share/freepbx/modules/phonebook/
+*.sqlite usr/share/freepbx/modules/phonebook/
+*.html usr/share/freepbx/modules/phonebook/
+*.xml usr/share/freepbx/modules/phonebook/
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install phonebook || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall phonebook || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall phonebook || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-phonebook/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,151 @@
+<?php /* $Id */
+//Copyright (C) 2006 WeBRainstorm S.r.l. (ask at webrainstorm.it)
+//
+//This program 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.
+//
+//This program 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.
+
+function phonebook_list() {
+ global $amp_conf;
+ global $astman;
+
+ if ($astman) {
+ $list = $astman->database_show();
+ foreach ($list as $k => $v) {
+ if (isset($v)) { // Somehow, a 'null' value is leaking into astdb.
+ if (substr($k, 1, 7) == 'cidname')
+ $numbers['foo'.substr($k, 9)]['name'] = $v ;
+ if (substr($k, 1, 13) == 'sysspeeddials')
+ $numbers['foo'.$v]['speeddial'] = substr($k, 15) ;
+ }
+ }
+
+ if (isset($numbers) && is_array($numbers)) {
+ foreach ($numbers as $key => $row) {
+ $names[$key] = strtolower($row['name']);
+ }
+ // Array multisort renumber keys if they are numeric, (casting doesn't work), that's why I added 'foo' in front of the key
+ // Quite ugly, I know... should recode it
+ array_multisort($names, SORT_ASC, SORT_STRING, $numbers);
+ foreach ($numbers as $key => $value) {
+ $retnumbers[substr($key, 3)] = $value;
+ }
+ }
+
+ return isset($retnumbers)?$retnumbers:null;
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+function phonebook_del($number, $speeddial){
+ global $amp_conf;
+ global $astman;
+
+ if ($astman) {
+ $astman->database_del("cidname",$number);
+ if ($speeddial != '')
+ $astman->database_del("sysspeeddials",$speeddial);
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+function phonebook_empty(){
+ global $amp_conf;
+ global $astman;
+
+ if ($astman) {
+ $astman->database_deltree("cidname");
+ $astman->database_deltree("sysspeeddials");
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+function phonebook_add($number, $name, $speeddial){
+ global $amp_conf;
+ global $astman;
+
+ if(!phonebook_chk($number))
+ return false;
+
+ if ($astman) {
+ // Was the user a twonk and didn't specify a speeddial?
+ // Should we really automatically generate a speeddial ?
+ // If yes I think we should start from 99 going down and leave easier speeddials to users
+ if (empty($speeddial)) {
+ for ($nbr = 99; $nbr > 0; $nbr--) {
+ if ($astman->database_get("sysspeeddials",sprintf("%02d",$nbr))===false) {
+ $speeddial = sprintf("%02d", $nbr);
+ break;
+ }
+ }
+ }
+ $astman->database_put("cidname",$number, '"'.$name.'"');
+ if ($speeddial != '')
+ $astman->database_put("sysspeeddials",$speeddial, '"'.$number.'"');
+ } else {
+ fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);
+ }
+}
+
+
+// TODO: ensures post vars is valid
+function phonebook_chk($post){
+ return true;
+}
+
+/*
+* @version V1.01 16 June 2004 (c) Petar Nedyalkov (bu at orbitel.bg). All rights reserved.
+* Released under the GPL license.
+* http://bu.orbitel.bg/fgetcsvfromline.php
+*/
+
+function phonebook_fgetcsvfromline ($line, $columnCount, $delimiterChar = ';', $enclosureChar = '"') {
+ $regExpSpecialChars = array (
+ "|" => "\\|",
+ "&" => "\\&",
+ "$" => "\\$",
+ "(" => "\\(",
+ ")" => "\\)",
+ "^" => "\\^",
+ "[" => "\\[",
+ "]" => "\\]",
+ "{" => "\\{",
+ "}" => "\\}",
+ "." => "\\.",
+ "*" => "\\*",
+ "\\" => "\\\\",
+ "/" => "\\/"
+ );
+
+ $matches = array();
+ $delimiterChar = strtr($delimiterChar, $regExpSpecialChars);
+ $enclosureChar = strtr($enclosureChar, $regExpSpecialChars);
+
+ $regExp = "/^";
+ for ($i = 0; $i < $columnCount; $i++) {
+ $regExp .= '('.$enclosureChar.'?)(.*)\\'.(2*$i + 1).$delimiterChar; // construct the regular expression
+ }
+ $regExp = substr($regExp, 0, (strlen($regExp) - strlen($delimiterChar)))."/"; // format the regular expression
+
+ if (preg_match($regExp, $line, $matches)) {
+ $result = array();
+ for ($i = 1; $i < count($matches)/2; $i++) {
+ if (strlen($matches[2*$i]) < 1)
+ $matches[2*$i] = "";
+ $result[$i] = $matches[2*$i]; // get only the fields but not the delimiters
+ }
+ return $result;
+ }
+ return FALSE;
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES/phonebook.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES/phonebook.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES/phonebook.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES/phonebook.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/he_IL/LC_MESSAGES/phonebook.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,118 @@
+# Hebrew version for phonebook module of FreePBX
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-09-28 17:20+0300\n"
+"PO-Revision-Date: 2006-09-28 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: phonebook/page.phonebook.php:84
+msgid "Phonebook entry"
+msgstr "רש××ת ספר ××פ×× ××"
+
+#: phonebook/page.phonebook.php:84
+msgid "deleted"
+msgstr "× ××ק×"
+
+#: phonebook/page.phonebook.php:86
+msgid "Imported"
+msgstr "×××××"
+
+#: phonebook/page.phonebook.php:86
+msgid "lines of"
+msgstr "ש×ר×ת ×ת××"
+
+#: phonebook/page.phonebook.php:88
+msgid "Phonebook emptied"
+msgstr "ספר ×××פ×× ×× ×¨×ק×"
+
+#: phonebook/page.phonebook.php:101
+msgid "Phonebook entries"
+msgstr "רש×××ת ספר ××פ×× ××"
+
+#: phonebook/page.phonebook.php:105
+msgid "Number"
+msgstr "×ספר"
+
+#: phonebook/page.phonebook.php:106
+msgid "Name"
+msgstr "ש×"
+
+#: phonebook/page.phonebook.php:107
+msgid "Speed dial"
+msgstr "×××× ×××ר"
+
+#: phonebook/page.phonebook.php:119
+msgid "Are you sure you want to delete this entry ?"
+msgstr "××× ××ª× ×××× ×©××ª× ×¨××¦× ××××ק רש××× ×× ?"
+
+#: phonebook/page.phonebook.php:119
+msgid "Delete"
+msgstr "××ק"
+
+#: phonebook/page.phonebook.php:121
+msgid "Edit"
+msgstr "ער××"
+
+#: phonebook/page.phonebook.php:128
+msgid "Export in CSV"
+msgstr "×××¦× × CSV"
+
+#: phonebook/page.phonebook.php:145
+msgid "Add or replace entry"
+msgstr "××סף ×× ××××£ ער×"
+
+#: phonebook/page.phonebook.php:148
+msgid "Number:"
+msgstr "×ספר:"
+
+#: phonebook/page.phonebook.php:149
+msgid ""
+"Enter the number (For caller ID lookup to work it should match the caller ID "
+"received from network)"
+msgstr "××× ×¡ ×ת ××ספר (××× ×©×××קת ××××× ×©×××ת תע×××, ××ספר צר×× ××××ת ת××× ××ספר ××תק×× ×ש×ר×ת ×ש××× ×××××× ×©× ××רת ×××פ×× ××)"
+
+#: phonebook/page.phonebook.php:154
+msgid "Name:"
+msgstr "ש×:"
+
+#: phonebook/page.phonebook.php:154
+msgid "Enter the name"
+msgstr "××× ×¡ ×ת ×ש×"
+
+#: phonebook/page.phonebook.php:159
+msgid "Speed dial code:"
+msgstr "ק×× ×××× ×××ר"
+
+#: phonebook/page.phonebook.php:159
+msgid ""
+"Enter a speed dial code<br/>Speeddial module is required to use speeddial "
+"codes"
+msgstr "××× ×¡ ק×× ×××× ×××ר<br />××××× ×××× ×××ר ×ר×ש ××× ××שת×ש ×ק××× ×××× ×××ר"
+
+#: phonebook/page.phonebook.php:176
+msgid "Import from CSV"
+msgstr "×××× × CSV"
+
+#: phonebook/page.phonebook.php:179
+msgid "File:"
+msgstr "ק×××¥:"
+
+#: phonebook/page.phonebook.php:180
+msgid ""
+"Import a CSV File formatted as follows:<br/>\"Name\";Number;Speeddial<br /> "
+"Names should be enclosed by '\"' and fields separated by ';' <br /><br /> "
+"Example:<br/>\"John Doe\";12345678;123"
+msgstr ""
+"×××× ×§×××¥ CSV ××¤× ×צ××¨× ×××:<br />\"ש×\";×ספר;××××-×××ר<br />"
+"ש××ת צר×××× ××××ת ××× ×¡××× × '\"', ×ש××ת צר×××× ××××ת ××פר××× ×¢× ××× ';' <br /><br />"
+"×××××:<br/>\"×שר×× ×שר×××\";12345678;123"
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES/phonebook.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES/phonebook.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES/phonebook.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES/phonebook.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/i18n/it_IT/LC_MESSAGES/phonebook.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,69 @@
+# 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 <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: 1.0\n"
+"Report-Msgid-Bugs-To: osdevel at webrainstorm.it\n"
+"POT-Creation-Date: 2006-05-29 11:35+0200\n"
+"PO-Revision-Date: 2006-05-29 11:35\n"
+"Last-Translator: Edoardo Serra <edoardo.serra at webrainstorm.it>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.phonebook.php:47
+msgid "Phonebook entry"
+msgstr "Voce di rubrica"
+
+#: page.phonebook.php:47
+msgid "deleted"
+msgstr "cancellata"
+
+#: page.phonebook.php:52
+msgid "Phonebook entries"
+msgstr "Voci di rubrica"
+
+#: page.phonebook.php:56
+msgid "Name"
+msgstr "Nome"
+
+#: page.phonebook.php:57
+msgid "Number"
+msgstr "Numero"
+
+#: page.phonebook.php:69
+msgid "Delete"
+msgstr "Cancella"
+
+#: page.phonebook.php:71
+msgid "Edit"
+msgstr "Modifica"
+
+#: page.phonebook.php:82
+msgid "Add or replace entry"
+msgstr "Aggiungi o sostituisci voce"
+
+#: page.phonebook.php:85
+msgid "Name:"
+msgstr "Nome:"
+
+#: page.phonebook.php:85
+msgid "Enter the name"
+msgstr "Inserire il nome"
+
+#: page.phonebook.php:89
+msgid "Number:"
+msgstr "Numero:"
+
+#: page.phonebook.php:90
+msgid ""
+"Enter the number (For caller ID lookup to work it should match the caller ID "
+"received from network)"
+msgstr ""
+"Inserire il numero (Per far funzionare la ricerca dell'ID chiamante"
+"deve corrispondere all'ID chiamante ricevuto dalla rete)"
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,36 @@
+<module>
+ <rawname>phonebook</rawname>
+ <name>Phonebook</name>
+ <version>1.1.5</version>
+ <description>Provides a phonebook for freePBX, it can be used as base for Caller ID Lookup and Speed Dial</description>
+ <type>tool</type>
+ <category>CID & Number Management</category>
+ <menuitems>
+ <phonebook>Asterisk Phonebook</phonebook>
+ </menuitems>
+ <location>release/2.2/phonebook-1.1.4.tgz</location>
+ <md5sum>6326ee297c853f3c9b4cec8655d17eaf</md5sum>
+ <info>http://freepbx.org/wiki/AsteriskPhonebook</info>
+ <changelog>
+ *1.1.5* Fixed a Warning when phonebook was empty
+ *1.1.4* Automatically generate Speed Dial Code if not supplied by user
+ Sort Phonebook alphabetically
+ Reuse Asterisk Manager connection
+ *1.1.3* Fixed copyright information for fgetcsvfromline()
+ Updated module.xml format
+ *1.1.2* freePBX 2.1.2 Released
+ *1.1.1* Apply #1105 - Fix up module naming conventions
+ *1.1.0* Added Speed dial field for phonebook entries (used by speeddial module)
+ Changed phonebook_list() return value
+ Numbers can no more contain '+' sign because of speeddial
+ *1.0.4* Added 'Export to CSV' function
+ Fixed some documentation errors
+ *1.0.3* Added 'Import from CSV' function
+ Added js confirmation to Delete link
+ Added possibility to empty phonebook
+ *1.0.2* Fixed bug in inserting names with spaces
+ Fixed a little bug in editing the a number associated with a name
+ Suppressed warnings when the phonebook was empty
+ *1.0.1* First Release
+ </changelog>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-phonebook/page.phonebook.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phonebook/page.phonebook.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phonebook/page.phonebook.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,211 @@
+<?php /* $Id */
+//Copyright (C) 2006 WeBRainstorm S.r.l. (ask at webrainstorm.it)
+//
+//This program 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.
+//
+//This program 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.
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+isset($_REQUEST['number'])?$number = $_REQUEST['number']:$number='';
+isset($_REQUEST['name'])?$name = $_REQUEST['name']:$name='';
+isset($_REQUEST['speeddial'])?$speeddial = $_REQUEST['speeddial']:$speeddial='';
+
+isset($_REQUEST['editnumber'])?$editnumber = $_REQUEST['editnumber']:$editnumber='';
+
+$dispnum = "phonebook"; //used for switch on config.php
+
+//if submitting form, update database
+
+if(isset($_REQUEST['action'])) {
+ switch ($action) {
+ case "add":
+ phonebook_add($number, $name, $speeddial);
+ break;
+ case "delete":
+ $numbers = phonebook_list();
+ phonebook_del($number, $numbers[$number]['speeddial']);
+ break;
+ case "edit":
+ $numbers = phonebook_list();
+ phonebook_del($editnumber, $numbers[$editnumber]['speeddial']);
+ phonebook_add($number, $name, $speeddial);
+ break;
+ case "empty":
+ phonebook_empty();
+ break;
+ case "import":
+ $i = 0; // imported lines
+ if(is_uploaded_file($_FILES['csv']['tmp_name'])) {
+ $lines = file($_FILES['csv']['tmp_name']);
+ if (is_array($lines)) {
+ $n = count($lines); // total lines
+ foreach($lines as $line) {
+ $fields = phonebook_fgetcsvfromline($line, 3);
+ $fields = array_map('trim', $fields);
+ if (is_array($fields) && count($fields) == 3 && is_numeric($fields[2]) && ($fields[3] == '' || is_numeric($fields[3]))) {
+ phonebook_del($fields[2], $numbers[$fields[2]]['speeddial']);
+ phonebook_add($fields[2], addslashes($fields[1]), $fields[3]);
+ $i++;
+ }
+ }
+ }
+ } else
+ $n = 0; // total lines if no file
+ break;
+ case "export":
+ header('Content-Type: text/csv');
+ header('Content-disposition: attachment; filename=phonebook.csv');
+ $numbers = phonebook_list();
+ foreach ($numbers as $number => $values)
+ printf("\"%s\";%s;%s\n", $values['name'], $number, $values['speeddial']);
+ die();
+ break;
+ }
+}
+
+$numbers = phonebook_list();
+
+?>
+
+</div>
+
+<!-- NO rnav in this module -->
+
+
+<div class="content">
+<?php
+if ($action == 'delete')
+ echo '<h3>'._("Phonebook entry").' '.$itemid.' '._("deleted").' !</h3>';
+elseif ($action == 'import')
+ echo '<h3>'._("Imported").' '.$i.' '._("lines of").' '.$n.' '.'!</h3>';
+elseif ($action == 'empty')
+ echo '<h3>'._("Phonebook emptied").' !</h3>';
+
+if (is_array($numbers)) {
+
+?>
+
+<table cellpadding="5" width="100%">
+
+<form autocomplete="off" name="delete" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return confirm('<? echo _("Are you sure you want to empty your phonebook ?")?>');">
+<?#onsubmit="return edit_onsubmit();"?>
+ <input type="hidden" name="action" value="empty">
+
+ <tr>
+ <td colspan="5"><h5><?php echo _("Phonebook entries") ?></h5><hr></td>
+ </tr>
+
+ <tr>
+ <td><b><?=_("Number")?></b></td>
+ <td><b><?=_("Name")?></b></td>
+ <td><b><?=_("Speed dial")?></b></td>
+ <td> </td>
+ <td> </td>
+ </tr>
+
+<?php
+// Why should I specify type=tool ???
+
+ foreach ($numbers as $num => $values) {
+ print('<tr>');
+ printf('<td>%s</td><td>%s</td><td>%s</td>', $num, $values['name'], $values['speeddial']);
+ printf('<td><a href="%s?type=tool&display=%s&number=%s&action=delete" onclick="return confirm(\'%s\')">%s</a></td>',
+ $_SERVER['PHP_SELF'], urlencode($dispnum), urlencode($num), _("Are you sure you want to delete this entry ?"), _("Delete"));
+ printf('<td><a href="#" onClick="theForm.number.value = \'%s\'; theForm.name.value = \'%s\' ; theForm.speeddial.value = \'%s\' ; theForm.editnumber.value = \'%s\' ; theForm.action.value = \'edit\' ; ">%s</a></td>',
+ $num, addslashes($values['name']), $values['speeddial'], $num, _("Edit"));
+ print('</tr>');
+ }
+
+?>
+
+ <tr>
+ <td colspan="3"><br><h6><a href="<?php echo $_SERVER['PHP_SELF'] ?>?type=tool&display=phonebook&action=export&quietmode=1"><?php echo _("Export in CSV") ?></a></h6></td><td colspan="2" align="center"><input name="submit" type="submit" value="<?php echo _("Empty Phonebook")?>"></td>
+ </tr>
+</form>
+
+</table>
+
+<?
+}
+?>
+
+<table cellpadding="5" width="100%">
+<form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="add">
+ <input type="hidden" name="editnumber" value="">
+
+
+ <tr><td colspan="4"><h5><?php echo _("Add or replace entry") ?><hr></h5></td></tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Number:")?>
+ <span><?php echo _("Enter the number (For caller ID lookup to work it should match the caller ID received from network)")?></span></a></td>
+ <td><input type="text" name="number"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Name:")?><span><?php echo _("Enter the name")?></span></a></td>
+ <td><input type="text" name="name"></td>
+ </tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Speed dial code:")?><span><?php echo _("Enter a speed dial code<br/>Speeddial module is required to use speeddial codes")?></span></a></td>
+ <td><input type="text" name="speeddial"></td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+</form>
+</table>
+
+<table cellpadding="5" width="100%">
+<form autocomplete="off" enctype="multipart/form-data" name="import" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <input type="hidden" name="MAX_FILE_SIZE" value="30000">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="import">
+
+
+ <tr><td colspan="4"><h5><?php echo _("Import from CSV") ?><hr></h5></td></tr>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("File:")?>
+ <span><?php echo _("Import a CSV File formatted as follows:<br/>\"Name\";Number;Speeddial<br /> Names should be enclosed by '\"' and fields separated by ';' <br /><br /> Example:<br/>\"John Doe\";12345678;123")?></span></a></td>
+ <td><input type="file" name="csv"></td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Upload")?>"></h6></td>
+ </tr>
+</form>
+</table>
+<script language="javascript">
+<!--
+
+var theForm = document.edit;
+theForm.number.focus();
+
+function edit_onsubmit() {
+ defaultEmptyOK = false;
+ if (!isInteger(theForm.number.value))
+ return warnInvalid(theForm.number, "Please enter a valid Number");
+ if (!isAlphanumeric(theForm.name.value))
+ return warnInvalid(theForm.name, "Please enter a valid Name");
+
+ defaultEmptyOK = true;
+ if (!isInteger(theForm.speeddial.value))
+ return warnInvalid(theForm.speeddial, "Please enter a valid Speeddial code or leave it empty");
+
+ return true;
+}
+
+
+-->
+</script>
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-phpagiconf (2.2-1.1-2) unstable; urgency=low
+
+ * SQLite3 support. Fixes upstream
+ http://www.freepbx.org/trac/ticket/1779
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 16:43:01 +0200
+
+freepbx-module-phpagiconf (2.2-1.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:32 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-phpagiconf
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-phpagiconf
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: PHPAGI Config
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:32 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/phpagiconf/
+*.sql usr/share/freepbx/modules/phpagiconf/
+*.sqlite usr/share/freepbx/modules/phpagiconf/
+*.html usr/share/freepbx/modules/phpagiconf/
+*.xml usr/share/freepbx/modules/phpagiconf/
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,54 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. See http://www.freepbx.org/trac/ticket/1779
+
+ at DPATCH@
+diff -urNad freepbx-module-phpagiconf~/install.php freepbx-module-phpagiconf/install.php
+--- freepbx-module-phpagiconf~/install.php 1970-01-01 02:00:00.000000000 +0200
++++ freepbx-module-phpagiconf/install.php 2007-02-14 16:36:47.000000000 +0200
+@@ -0,0 +1,32 @@
++<?php
++
++global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++
++$sql = "CREATE TABLE IF NOT EXISTS phpagiconf (
++ `phpagiid` INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ `debug` BOOL ,
++ `error_handler` BOOL ,
++ `err_email` VARCHAR( 50 ) ,
++ `hostname` VARCHAR( 255 ) ,
++ `tempdir` VARCHAR( 255 ) ,
++ `festival_text2wave` VARCHAR( 255 ) ,
++ `asman_server` VARCHAR( 255 ) ,
++ `asman_port` INT NOT NULL ,
++ `asman_user` VARCHAR( 50 ) ,
++ `asman_secret` VARCHAR( 255 ) ,
++ `cepstral_swift` VARCHAR( 255 ) ,
++ `cepstral_voice` VARCHAR( 50 ) ,
++ `setuid` BOOL ,
++ `basedir` VARCHAR( 255 )
++);";
++
++$check = $db->query($sql);
++if (DB::IsError($check)) {
++ die("Can not create `phpagiconf` table" . $check->getMessage() . "\n");
++}
++
++?>
+diff -urNad freepbx-module-phpagiconf~/install.sql freepbx-module-phpagiconf/install.sql
+--- freepbx-module-phpagiconf~/install.sql 2006-11-04 07:54:23.000000000 +0200
++++ freepbx-module-phpagiconf/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1,2 +0,0 @@
+-CREATE TABLE IF NOT EXISTS `phpagiconf` ( `phpagiid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `debug` BOOL , `error_handler` BOOL , `err_email` VARCHAR( 50 ) , `hostname` VARCHAR( 255 ) , `tempdir` VARCHAR( 255 ) , `festival_text2wave` VARCHAR( 255 ) , `asman_server` VARCHAR( 255 ) , `asman_port` INT NOT NULL , `asman_user` VARCHAR( 50 ) , `asman_secret` VARCHAR( 255 ) , `cepstral_swift` VARCHAR( 255 ) , `cepstral_voice` VARCHAR( 50 ) , `setuid` BOOL , `basedir` VARCHAR( 255 ) ) TYPE = MYISAM ;
+-
+diff -urNad freepbx-module-phpagiconf~/uninstall.sql freepbx-module-phpagiconf/uninstall.sql
+--- freepbx-module-phpagiconf~/uninstall.sql 2006-11-04 07:54:24.000000000 +0200
++++ freepbx-module-phpagiconf/uninstall.sql 2007-02-14 16:33:37.000000000 +0200
+@@ -1 +1 @@
+-DROP TABLE IF EXISTS `phpagiconf`;
++DROP TABLE IF EXISTS phpagiconf;
Property changes on: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install phpagiconf || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall phpagiconf || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall phpagiconf || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,58 @@
+<?php /* $Id: $ */
+
+function phpagiconf_gen_conf() {
+ global $active_modules;
+
+ $file = "/tmp/phpagi_".rand().".conf";
+ $data = phpagiconf_get();
+ $content = "[phpagi]\n";
+ $content .= "debug=".($data['debug']?'true':'false')."\n";
+ $content .= "error_handler=".($data['error_handler']?'true':'false')."\n";
+ $content .= "admin=".$data['err_email']."\n";
+ $content .= "hostname=".$data['hostname']."\n";
+ $content .= "tempdir=".$data['tempdir']."\n\n";
+ $content .= "[asmanager]\n";
+ $content .= "server=".$data['asman_server']."\n";
+ $content .= "port=".$data['asman_port']."\n";
+ $content .= "username=".$data['asman_user']."\n";
+ $content .= "secret=".$data['asman_secret']."\n\n";
+ $content .= "[fastagi]\n";
+ $content .= "setuid=".($data['setuid']?'true':'false')."\n";
+ $content .= "basedir=".$data['basedir']."\n\n";
+ $content .= "[festival]\n";
+ $content .= "text2wave=".$data['festival_text2wave']."\n\n";
+ $content .= "[cepstral]\n";
+ $content .= "swift=".$data['cepstral_swift']."\n";
+ $content .= "voice=".$data['cepstral_voice']."\n";
+
+ $fd = fopen($file, "w");
+ fwrite($fd, $content);
+ fclose($fd);
+ if (!rename($file, "/etc/asterisk/phpagi.conf")) {
+ echo "<script>javascript:alert('"._("Error writing the phpagi.conf file.")."');</script>";
+ }
+}
+
+function phpagiconf_get() {
+ global $db;
+ global $amp_conf;
+ $sql = "SELECT * FROM phpagiconf";
+ $res = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+ return $res;
+}
+
+function phpagiconf_update($p_id, $p_debug, $p_error_handler, $p_err_email, $p_hostname, $p_tempdir, $p_festival_text2wave, $p_asman_server, $p_asman_port, $p_asmanager, $p_cepstral_swift, $p_cepstral_voice, $p_setuid, $p_basedir) {
+ $asmanager = split('/', $p_asmanager);
+ $results = sql("UPDATE phpagiconf SET `debug`=$p_debug, error_handler=$p_error_handler, err_email='$p_err_email', hostname='$p_hostname', tempdir='$p_tempdir', festival_text2wave='$p_festival_text2wave', asman_server='$p_asman_server', asman_port=$p_asman_port, asman_user='".$asmanager[0]."', asman_secret='".$asmanager[1]."', cepstral_swift='$p_cepstral_swift', cepstral_voice='$p_cepstral_voice', setuid=$p_setuid, basedir='$p_basedir' where phpagiid=$p_id");
+}
+
+function phpagiconf_add($p_debug, $p_error_handler, $p_err_email, $p_hostname, $p_tempdir, $p_festival_text2wave, $p_asman_server, $p_asman_port, $p_asmanager, $p_cepstral_swift, $p_cepstral_voice, $p_setuid, $p_basedir) {
+ if (!empty($p_asmanager)) {
+ $asmanager = split('/', $p_asmanager);
+ } else {
+ $asmanager = array ($amp_conf['AMPDBUSER'], $amp_conf['AMPDBPASS']);
+ }
+ $results = sql("INSERT INTO phpagiconf SET `debug`=$p_debug, error_handler=$p_error_handler, err_email='$p_err_email', hostname='$p_hostname', tempdir='$p_tempdir', festival_text2wave='$p_festival_text2wave', asman_server='$p_asman_server', asman_port=$p_asman_port, asman_user='".$asmanager[0]."', asman_secret='".$asmanager[1]."', cepstral_swift='$p_cepstral_swift', cepstral_voice='$p_cepstral_voice', setuid=$p_setuid, basedir='$p_basedir'");
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES/phpagiconf.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES/phpagiconf.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES/phpagiconf.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES/phpagiconf.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/fr_FR/LC_MESSAGES/phpagiconf.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,153 @@
+# 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 <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: Xavier Ourcière <xourciere at propolys.com>\n"
+"POT-Creation-Date: 2006-05-20 00:17+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Xavier Ourcière <xourciere at propolys.com>\n"
+"Language-Team: French <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: functions.inc.php:32
+msgid "Error writing the phpagi.conf file."
+msgstr "Erreur lors de l'écriture du fichier phpagi.conf"
+
+#: page.phpagiconf.php:58
+msgid "PHPAGI Config:"
+msgstr "Configuration PHPAGI:"
+
+#: page.phpagiconf.php:63
+msgid "Main config:"
+msgstr "Paramètres principaux:"
+
+#: page.phpagiconf.php:66
+msgid "Debug:"
+msgstr ""
+
+#: page.phpagiconf.php:66
+msgid "Enable PHPAGI debugging."
+msgstr "Active le debogage PHPAGI."
+
+#: page.phpagiconf.php:68 page.phpagiconf.php:75 page.phpagiconf.php:110
+msgid "false"
+msgstr "non"
+
+#: page.phpagiconf.php:69 page.phpagiconf.php:76 page.phpagiconf.php:111
+msgid "true"
+msgstr "oui"
+
+#: page.phpagiconf.php:73
+msgid "Error handler:"
+msgstr "Gestion d'erreurs:"
+
+#: page.phpagiconf.php:73
+msgid "Use internal error handler."
+msgstr "Utiliser le gestionnaire d'erreurs interne."
+
+#: page.phpagiconf.php:80
+msgid "Mail errors to:"
+msgstr "Envoyer les erreurs à:"
+
+#: page.phpagiconf.php:80
+msgid "Email where the errors will be sent."
+msgstr "Email de réception des erreurs."
+
+#: page.phpagiconf.php:84
+msgid "Hostname of the server:"
+msgstr "Nom du serveur:"
+
+#: page.phpagiconf.php:84
+msgid "Hostname of this server."
+msgstr "Nom du serveur (hosname)."
+
+#: page.phpagiconf.php:88
+msgid "Temporary directory:"
+msgstr "Répertoire temporaire:"
+
+#: page.phpagiconf.php:88
+msgid "Temporary directory for storing temporary output."
+msgstr "Répertoire temporaire."
+
+#: page.phpagiconf.php:91
+msgid "Festival config:"
+msgstr "Configuration de festival:"
+
+#: page.phpagiconf.php:93
+msgid "Path to text2wave:"
+msgstr "Chemin de l'exécutable text2wave:"
+
+#: page.phpagiconf.php:93
+msgid "Path to text2wave binary."
+msgstr "Chemin de l'exécutable text2wave."
+
+#: page.phpagiconf.php:96
+msgid "Asterisk API settings:"
+msgstr "Paramètres d'accès à l'API Asterisk"
+
+#: page.phpagiconf.php:98
+msgid "Server:"
+msgstr "Serveur:"
+
+#: page.phpagiconf.php:98
+msgid "Server to connect to."
+msgstr "Adresse du serveur asterisk sur lequel se connecter."
+
+#: page.phpagiconf.php:102
+msgid "Port:"
+msgstr ""
+
+#: page.phpagiconf.php:102
+msgid "Port to connect to manager."
+msgstr "Port sur lequel se connecter."
+
+#: page.phpagiconf.php:106
+msgid "Fast AGI config:"
+msgstr "Configuration Fast AGI:"
+
+#: page.phpagiconf.php:108
+msgid "setuid:"
+msgstr ""
+
+#: page.phpagiconf.php:108
+msgid "Drop privileges to owner of script."
+msgstr "Permet aux scripts de s'exécuter avec les privilèges de leur propriétaire."
+
+#: page.phpagiconf.php:115
+msgid "Basedir:"
+msgstr ""
+
+#: page.phpagiconf.php:115
+msgid "Path to AGI scripts folder."
+msgstr "Chemin ou se trouvent les scripts AGI."
+
+#: page.phpagiconf.php:118
+msgid "Cepstral config:"
+msgstr "Configuration de Cepstral"
+
+#: page.phpagiconf.php:120
+msgid "Swift path:"
+msgstr "Chemin de swift"
+
+#: page.phpagiconf.php:120
+msgid "Path to cepstral TTS binary."
+msgstr "Chemin de l'exécutable swift."
+
+#: page.phpagiconf.php:124
+msgid "Cepstral voice:"
+msgstr "Voix:"
+
+#: page.phpagiconf.php:124
+msgid "TTS Voice used."
+msgstr "Voix a utiliser."
+
+#: page.phpagiconf.php:158
+msgid "To use this module you need to download and enable Asterisk API module."
+msgstr "Pour utiliser ce module vous devez télécharger et activer le module 'Asterisk API'."
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES/phpagiconf.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES/phpagiconf.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES/phpagiconf.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES/phpagiconf.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/i18n/he_IL/LC_MESSAGES/phpagiconf.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,158 @@
+# Hebrew version of PHPAGICONF module of FreePBX
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-09-28 17:20+0300\n"
+"PO-Revision-Date: 2006-09-28 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: phpagiconf/functions.inc.php:32
+msgid "Error writing the phpagi.conf file."
+msgstr "ש×××× ××ת××ת ק×××¥ phpagi.conf."
+
+#: phpagiconf/page.phpagiconf.php:64
+msgid "PHPAGI Config:"
+msgstr "תצ×רת PHPAGI:"
+
+#: phpagiconf/page.phpagiconf.php:69
+msgid "Main config:"
+msgstr "תצ××¨× ×¨×ש×ת:"
+
+#: phpagiconf/page.phpagiconf.php:72
+msgid "Debug:"
+msgstr "×××××:"
+
+#: phpagiconf/page.phpagiconf.php:72
+msgid "Enable PHPAGI debugging."
+msgstr "×פע×× ×¤×× ××ר×× ×©× PHPAGI ×צ××¨× ×צ××ת ×××××"
+
+#: phpagiconf/page.phpagiconf.php:74 phpagiconf/page.phpagiconf.php:81
+#: phpagiconf/page.phpagiconf.php:116
+msgid "false"
+msgstr "××"
+
+#: phpagiconf/page.phpagiconf.php:75 phpagiconf/page.phpagiconf.php:82
+#: phpagiconf/page.phpagiconf.php:117
+msgid "true"
+msgstr "××"
+
+#: phpagiconf/page.phpagiconf.php:79
+msgid "Error handler:"
+msgstr "×××¤× ×ש××××ת:"
+
+#: phpagiconf/page.phpagiconf.php:79
+msgid "Use internal error handler."
+msgstr "×שת×ש ××××¤× ×ש××××ת ××¤× ×××."
+
+#: phpagiconf/page.phpagiconf.php:86
+msgid "Mail errors to:"
+msgstr "ש×× ×©××××ת ××:"
+
+#: phpagiconf/page.phpagiconf.php:86
+msgid "Email where the errors will be sent."
+msgstr "×ת××ת ××××ר ש×××× ×ש××× ×©××××ת"
+
+#: phpagiconf/page.phpagiconf.php:90
+msgid "Hostname of the server:"
+msgstr "×ת××ת ××××¨× ×©× ×שרת:"
+
+#: phpagiconf/page.phpagiconf.php:90
+msgid "Hostname of this server."
+msgstr "×ת××ת ××××¨× (××ס×) ×©× ×שרת."
+
+#: phpagiconf/page.phpagiconf.php:94
+msgid "Temporary directory:"
+msgstr "ספר×× ××× ×ת:"
+
+#: phpagiconf/page.phpagiconf.php:94
+msgid "Temporary directory for storing temporary output."
+msgstr "ספר×× ××× ×ת ×××ס×× ×¤×××× ××× ×××."
+
+#: phpagiconf/page.phpagiconf.php:97
+msgid "Festival config:"
+msgstr "תצ×רת Festival"
+
+#: phpagiconf/page.phpagiconf.php:99
+msgid "Path to text2wave:"
+msgstr "× ×ª×× × text2wave:"
+
+#: phpagiconf/page.phpagiconf.php:99
+msgid "Path to text2wave binary."
+msgstr "× ×ª×× ×ק×××¥ ×××¨×¦× ×©× text2wave."
+
+#: phpagiconf/page.phpagiconf.php:102
+msgid "Asterisk API settings:"
+msgstr "×××ר×ת API ×©× ×ס×ר×סק"
+
+#: phpagiconf/page.phpagiconf.php:104
+msgid "Server:"
+msgstr "שרת:"
+
+#: phpagiconf/page.phpagiconf.php:104
+msgid "Server to connect to."
+msgstr "שרת ש×ש ××ת××ר ××××."
+
+#: phpagiconf/page.phpagiconf.php:108
+msgid "Port:"
+msgstr "×צ×××:"
+
+#: phpagiconf/page.phpagiconf.php:108
+msgid "Port to connect to manager."
+msgstr "×צ××× (פ×ר×) ש×ר×× ×ש ××ת××ר ×× ××××."
+
+#: phpagiconf/page.phpagiconf.php:112
+msgid "Fast AGI config:"
+msgstr "תצ×רת AGI ×××ר:"
+
+#: phpagiconf/page.phpagiconf.php:114
+msgid "setuid:"
+msgstr "×©× × ×שת×ש"
+
+#: phpagiconf/page.phpagiconf.php:114
+msgid "Drop privileges to owner of script."
+msgstr "×××¨× ×רש××ת ×¢× ××× ××¨×¦× ×ת×ר ×××¢××× ×©× ×סקר×פ×"
+
+#: phpagiconf/page.phpagiconf.php:121
+msgid "Basedir:"
+msgstr "ספר×× ×ס×ס×ת:"
+
+#: phpagiconf/page.phpagiconf.php:121
+msgid "Path to AGI scripts folder."
+msgstr "× ×ª×× ×ספר××ת סקר×פ×× × AGI"
+
+#: phpagiconf/page.phpagiconf.php:124
+msgid "Cepstral config:"
+msgstr "תצ×רת Cepstral:"
+
+#: phpagiconf/page.phpagiconf.php:126
+msgid "Swift path:"
+msgstr "× ×ª×× × Swift:"
+
+#: phpagiconf/page.phpagiconf.php:126
+msgid "Path to cepstral TTS binary."
+msgstr "× ×ª×× ×ק×××¥ ×××××ר ×©× cepstral TTS."
+
+#: phpagiconf/page.phpagiconf.php:130
+msgid "Cepstral voice:"
+msgstr "ק×× Cepstral:"
+
+#: phpagiconf/page.phpagiconf.php:130
+msgid "TTS Voice used."
+msgstr "ק×× × TTS ש×× ×ש ××שת×ש."
+
+#: phpagiconf/page.phpagiconf.php:164
+msgid "To use this module you need the Asterisk API module version >= 1.0.4"
+msgstr "××× ××שת×ש ×××××× ××, ××ª× ×¦×¨×× ××××× API ×©× ×ס×ר×סק ××××¨×¡× 1.0.4 ×× ×××©× ××תר"
+
+#: phpagiconf/page.phpagiconf.php:171
+msgid "To use this module you need to download and enable Asterisk API module."
+msgstr "××× ××שת×ש ××××¨×¡× ×× ×ª×¦××¨× ×××ר×× ×××פע×× ×ת ××××× × API ×©× ×ס×ר×סק"
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+CREATE TABLE IF NOT EXISTS `phpagiconf` ( `phpagiid` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `debug` BOOL , `error_handler` BOOL , `err_email` VARCHAR( 50 ) , `hostname` VARCHAR( 255 ) , `tempdir` VARCHAR( 255 ) , `festival_text2wave` VARCHAR( 255 ) , `asman_server` VARCHAR( 255 ) , `asman_port` INT NOT NULL , `asman_user` VARCHAR( 50 ) , `asman_secret` VARCHAR( 255 ) , `cepstral_swift` VARCHAR( 255 ) , `cepstral_voice` VARCHAR( 50 ) , `setuid` BOOL , `basedir` VARCHAR( 255 ) ) TYPE = MYISAM ;
+
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<module>
+ <rawname>phpagiconf</rawname>
+ <name>PHPAGI Config</name>
+ <version>1.1</version>
+ <type>tool</type>
+ <category>Config</category>
+ <menuitems>
+ <phpagiconf>PHPAGI Config</phpagiconf>
+ </menuitems>
+ <depends>
+ <module>manager ge1.0.4</module>
+ </depends>
+ <changelog>*1.1* Removed old dependancy checking code, first 2.2 release</changelog>
+ <location>release//2.2/phpagiconf-1.0.tgz</location>
+ <md5sum>d1e9128ba20fc1e08d397f29f7bf2737</md5sum>
+ <info>http://freepbx.org/wiki/phpagiconf</info>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/page.phpagiconf.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/page.phpagiconf.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/page.phpagiconf.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,166 @@
+<?php /* $Id:$ */
+// Xavier Ourciere xourciere[at]propolys[dot]com
+//
+//This program 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.
+//
+//This program 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.
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$phpagiid = isset($_REQUEST['phpagiid'])?$_REQUEST['phpagiid']:'';
+$id = isset($_REQUEST['id'])?$_REQUEST['id']:'';
+$debug = isset($_REQUEST['debug'])?$_REQUEST['debug']:'0';
+$error_handler = isset($_REQUEST['error_handler'])?$_REQUEST['error_handler']:'0';
+$err_email = isset($_REQUEST['err_email'])?$_REQUEST['err_email']:'admin at example.com';
+$hostname = isset($_REQUEST['hostname'])?$_REQUEST['hostname']:'freepbx.example.com';
+$tempdir = isset($_REQUEST['tempdir'])?$_REQUEST['tempdir']:'/tmp';
+$festival_text2wave = isset($_REQUEST['festival_text2wave'])?$_REQUEST['festival_text2wave']:'/usr/bin/text2wave';
+$asman_server = isset($_REQUEST['asman_server'])?$_REQUEST['asman_server']:'localhost';
+$asman_port = isset($_REQUEST['asman_port'])?$_REQUEST['asman_port']:'5038';
+$asmanager = isset($_REQUEST['asmanager'])?$_REQUEST['asmanager']:''; // This comes from the API module
+$cepstral_swift = isset($_REQUEST['cepstral_swift'])?$_REQUEST['cepstral_swift']:'/opt/swift/bin/swift';
+$cepstral_voice = isset($_REQUEST['cepstral_voice'])?$_REQUEST['cepstral_voice']:'David';
+$setuid = isset($_REQUEST['setuid'])?$_REQUEST['setuid']:'0';
+$basedir = isset($_REQUEST['basedir'])?$_REQUEST['basedir']:'/var/lib/asterisk/agi-bin/';
+
+$dispnum = "phpagiconf"; //used for switch on config.php
+
+switch ($action) {
+ case "edit":
+ phpagiconf_update($id, $debug, $error_handler, $err_email, $hostname, $tempdir,
+ $festival_text2wave, $asman_server, $asman_port, $asmanager,
+ $cepstral_swift, $cepstral_voice, $setuid, $basedir);
+ phpagiconf_gen_conf();
+ needreload();
+ break;
+ case "add":
+ phpagiconf_add($debug, $error_handler, $err_email, $hostname, $tempdir,
+ $festival_text2wave, $asman_server, $asman_port, $asmanager,
+ $cepstral_swift, $cepstral_voice, $setuid, $basedir);
+ phpagiconf_gen_conf();
+ needreload();
+ break;
+}
+
+//this function needs to be available to other modules (those that use goto destinations)
+//therefore we put it in globalfunctions.php
+$phpagiconf = phpagiconf_get();
+?>
+
+</div>
+
+<!-- right side menu -->
+<div class="rnav">
+</div>
+
+
+<div class="content">
+<?php
+//get details for this phpagiconf text
+$thisConfig = phpagiconf_get();
+//create variables
+if (isset($thisConfig)) {
+extract($thisConfig);
+}
+?>
+ <h2><?php echo _("PHPAGI Config:"); ?></h2>
+ <form autocomplete="on" name="editAGIConf" action="config.php?type=tool&display=phpagiconf" method="post" onsubmit="return editAGIConf_submit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo (isset($thisConfig) ? 'edit' : 'add') ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo _("Main config:"); ?><hr></h5></td></tr>
+ <tr><td><input type="hidden" name="id" value="<?php echo $phpagiid; ?>"></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Debug:")?><span><?php echo _("Enable PHPAGI debugging.")?></span></a></td>
+ <td><select name="debug">
+ <option value="0" <?php echo (($debug==0) ? 'selected="selected"' : ''); ?>><?php echo _("false"); ?>
+ <option value="1" <?php echo (($debug==1) ? 'selected="selected"' : ''); ?>><?php echo _("true"); ?>
+ </select></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Error handler:")?><span><?php echo _("Use internal error handler.")?></span></a></td>
+ <td><select name="error_handler">
+ <option value="0" <?php echo (($error_handler==0) ? 'selected="selected"' : ''); ?>><?php echo _("false");?>
+ <option value="1" <?php echo (($error_handler==1) ? 'selected="selected"' : ''); ?>><?php echo _("true");?>
+ </select></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Mail errors to:")?><span><?php echo _("Email where the errors will be sent.")?></span></a></td>
+ <td><input type="text" name="err_email" value="<?php echo $err_email; ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Hostname of the server:")?><span><?php echo _("Hostname of this server.")?></span></a></td>
+ <td><input type="text" name="hostname" value="<?php echo $hostname; ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Temporary directory:")?><span><?php echo _("Temporary directory for storing temporary output.")?></span></a></td>
+ <td><input size=40 type="text" name="tempdir" value="<?php echo $tempdir; ?>"></td>
+ </tr>
+ <tr><td colspan="2"><h5><?php echo _("Festival config:"); ?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Path to text2wave:")?><span><?php echo _("Path to text2wave binary.")?></span></a></td>
+ <td><input type="text" name="festival_text2wave" value="<?php echo $festival_text2wave; ?>"></td>
+ </tr>
+ <tr><td colspan="2"><h5><?php echo _("Asterisk API settings:"); ?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Server:")?><span><?php echo _("Server to connect to.")?></span></a></td>
+ <td><input type="text" name="asman_server" value="<?php echo $asman_server; ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Port:")?><span><?php echo _("Port to connect to manager.")?></span></a></td>
+ <td><input type="text" name="asman_port" value="<?php echo $asman_port; ?>"></td>
+ </tr>
+<?php echo $module_hook->hookHtml; ?>
+ <tr><td colspan="2"><h5><?php echo _("Fast AGI config:"); ?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("setuid:")?><span><?php echo _("Drop privileges to owner of script.")?></span></a></td>
+ <td><select name="setuid">
+ <option value="0" <?php echo (($setuid==0) ? 'selected="selected"' : ''); ?>><?php echo _("false");?>
+ <option value="1" <?php echo (($setuid==1) ? 'selected="selected"' : ''); ?>><?php echo _("true");?>
+ </select></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Basedir:")?><span><?php echo _("Path to AGI scripts folder.")?></span></a></td>
+ <td><input size=40 type="text" name="basedir" value="<?php echo $basedir; ?>"></td>
+ </tr>
+ <tr><td colspan="2"><h5><?php echo _("Cepstral config:"); ?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Swift path:")?><span><?php echo _("Path to cepstral TTS binary.")?></span></a></td>
+ <td><input type="text" name="cepstral_swift" value="<?php echo $cepstral_swift; ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Cepstral voice:")?><span><?php echo _("TTS Voice used.")?></span></a></td>
+ <td><input type="text" name="cepstral_voice" value="<?php echo $cepstral_voice; ?>"></td>
+ </tr>
+
+ <tr><td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes") ?>"></h6></td></tr>
+
+ </table>
+<script language="javascript">
+<!--
+
+var theForm = document.editAGIConf;
+
+if (theForm.description.value == "") {
+ theForm.name.focus();
+} else {
+ theForm.festtext.focus();
+}
+
+function editAGIConf_submit()
+{
+/*
+ * TODO: Check input
+*/
+ return true;
+}
+
+//-->
+</script>
+</form>
+</div>
Added: freepbx/modules-2.2/modules/freepbx-module-phpagiconf/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpagiconf/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpagiconf/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE IF EXISTS `phpagiconf`;
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-phpinfo (2.2-1.0-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:57 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-phpinfo
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-phpinfo
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: PHP Info
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:57 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/phpinfo/
+*.sql usr/share/freepbx/modules/phpinfo/
+*.sqlite usr/share/freepbx/modules/phpinfo/
+*.html usr/share/freepbx/modules/phpinfo/
+*.xml usr/share/freepbx/modules/phpinfo/
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install phpinfo || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall phpinfo || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall phpinfo || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-phpinfo/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,13 @@
+<module>
+ <rawname>phpinfo</rawname>
+ <name>PHP Info</name>
+ <version>1.0</version>
+ <type>tool</type>
+ <category>Basic</category>
+ <menuitems>
+ <phpinfo>PHP Info</phpinfo>
+ </menuitems>
+ <location>release/phpinfo-1.0.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-phpinfo</info>
+ <md5sum>4d779d78f8a2770dbb733eff7c9896c1</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/page.phpinfo.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/page.phpinfo.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/page.phpinfo.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,3 @@
+<iframe width=100% height=1000px src=modules/phpinfo/phpinfo.inc.php>
+</iframe>
+
Added: freepbx/modules-2.2/modules/freepbx-module-phpinfo/phpinfo.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-phpinfo/phpinfo.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-phpinfo/phpinfo.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,4 @@
+<?php
+phpinfo();
+?>
+
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-pinsets (2.2-1.1-2) unstable; urgency=low
+
+ * Add SQLite3 support. Fixes upstream
+ http://www.freepbx.org/trac/ticket/1778
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 14:58:48 +0200
+
+freepbx-module-pinsets (2.2-1.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:08 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-pinsets
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-pinsets
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: PIN Sets
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:08 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/pinsets/
+*.sql usr/share/freepbx/modules/pinsets/
+*.sqlite usr/share/freepbx/modules/pinsets/
+*.html usr/share/freepbx/modules/pinsets/
+*.xml usr/share/freepbx/modules/pinsets/
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,48 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. Fixes upstream http://www.freepbx.org/trac/ticket/1778
+
+ at DPATCH@
+diff -urNad freepbx-module-pinsets~/install.php freepbx-module-pinsets/install.php
+--- freepbx-module-pinsets~/install.php 2006-09-16 03:18:33.000000000 +0300
++++ freepbx-module-pinsets/install.php 2007-02-14 15:18:31.000000000 +0200
+@@ -1,4 +1,21 @@
+ <?php
+-// There is no way to delete a file supplied with modules.
+-// This is overwriting the existing file
++
++global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS pinsets (
++ pinsets_id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ passwords LONGTEXT, description VARCHAR( 50 ) ,
++ addtocdr TINYINT( 1 ) ,
++ deptname VARCHAR( 50 ) ,
++ used_by VARCHAR( 255 )
++)";
++
++$check = $db->query($sql);
++if(DB::IsError($check)) {
++ die("Can not create `pinsets` table\n");
++}
++
+ ?>
+diff -urNad freepbx-module-pinsets~/install.sql freepbx-module-pinsets/install.sql
+--- freepbx-module-pinsets~/install.sql 2006-09-16 03:18:34.000000000 +0300
++++ freepbx-module-pinsets/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-CREATE TABLE IF NOT EXISTS pinsets ( pinsets_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , passwords LONGTEXT, description VARCHAR( 50 ) , addtocdr TINYINT( 1 ) , deptname VARCHAR( 50 ) , used_by VARCHAR( 255 ));
+diff -urNad freepbx-module-pinsets~/uninstall.php freepbx-module-pinsets/uninstall.php
+--- freepbx-module-pinsets~/uninstall.php 2006-09-16 03:18:35.000000000 +0300
++++ freepbx-module-pinsets/uninstall.php 2007-02-14 15:18:21.000000000 +0200
+@@ -1,5 +1,5 @@
+ <?php
+
+-sql('DROP TABLE pinsets');
++sql('DROP TABLE IF EXISTS pinsets');
+
+ ?>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install pinsets || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall pinsets || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall pinsets || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pinsets/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,354 @@
+<?php /* $Id */
+
+// a class for generating passwdfile
+// retrieve_conf will create an object of and <modulename>_conf classes,
+// which can be used in <modulename>_get_conf below.
+class pinsets_conf {
+ // return an array of filenames to write
+ // files named like pinset_N
+ function get_filename() {
+ $files = array();
+ if (isset($this->_pinsets) && is_array($this->_pinsets)) {
+ foreach (array_keys($this->_pinsets) as $pinset) {
+ $files[] = 'pinset_'.$pinset;
+ }
+ return $files;
+ } else {
+ // jusr return an empty array
+ return array();
+ }
+ }
+
+ function addPinsets($setid, $pins) {
+ $this->_pinsets[$setid] = $pins;
+ }
+
+ // return the output that goes in each of the files
+ function generateConf($file) {
+ $setid = ltrim($file,'pinset_');
+ $output = $this->_pinsets[$setid];
+ return $output;
+ }
+}
+
+/* Generates passwd files for pinsets
+ We call this with retrieve_conf
+*/
+function pinsets_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+ global $asterisk_conf;
+ global $pinsets_conf; // our pinsets object (created in retrieve_conf)
+ switch($engine) {
+ case "asterisk":
+ $allpinsets = pinsets_list();
+ if(is_array($allpinsets)) {
+ foreach($allpinsets as $item) {
+ // write our own pin list files
+ $pinsets_conf->addPinsets($item['pinsets_id'],$item['passwords']);
+ }
+
+ // write out a macro that handles the authenticate
+ $ext->add('macro-pinsets', 's', '', new ext_gotoif('${ARG2} = 1','cdr,1'));
+ $ext->add('macro-pinsets', 's', '', new ext_authenticate($asterisk_conf['astetcdir'].'/pinset_${ARG1}'));
+ // authenticate with the CDR option (a)
+ $ext->add('macro-pinsets', 'cdr', '', new ext_authenticate($asterisk_conf['astetcdir'].'/pinset_${ARG1}','a'));
+ }
+ break;
+ }
+}
+
+function pinsets_hookGet_config($engine) {
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ $hooklist = pinsets_list();
+ if(is_array($hooklist)) {
+ foreach($hooklist as $thisitem) {
+
+ // get the used_by field
+ if(empty($thisitem['used_by'])) {
+ $usedby = "";
+ } else {
+ $usedby = $thisitem['used_by'];
+ }
+
+ // create an array from usedby
+ $arrUsedby = explode(',',$usedby);
+
+ if(is_array($arrUsedby)){
+ foreach($arrUsedby as $strUsedby){
+ // if it's an outbound route
+ if(strpos($strUsedby,'routing_') !== false) {
+ $route = substr($strUsedby,8);
+ $context = 'outrt-'.$route;
+
+ // get all the routes that are in this context
+ $routes = core_routing_getroutepatterns($route);
+
+ // we need to manipulate each route/extension
+ foreach($routes as $rt) {
+ //strip the pipe out as that's what we use for the dialplan extension
+ $extension = str_replace('|','',$rt);
+ // If there are any wildcards in there, add a _ to the start
+ if (preg_match("/\.|z|x|\[|\]/i", $extension)) { $extension = "_".$extension; }
+ $ext->splice($context, $extension, 0, new ext_macro('pinsets', $thisitem['pinsets_id'].'|'.$thisitem['addtocdr']));
+ }
+
+ }
+ }
+ }
+
+ }
+ }
+ break;
+ }
+}
+
+
+//get the existing meetme extensions
+function pinsets_list() {
+ $results = sql("SELECT * FROM pinsets","getAll",DB_FETCHMODE_ASSOC);
+ if(is_array($results)){
+ foreach($results as $result){
+ // check to see if we have a dept match for the current AMP User.
+ if (checkDept($result['deptname'])){
+ // return this item's dialplan destination, and the description
+ $allowed[] = $result;
+ }
+ }
+ }
+ if (isset($allowed)) {
+ return $allowed;
+ } else {
+ return null;
+ }
+}
+
+function pinsets_get($id){
+ $results = sql("SELECT * FROM pinsets WHERE pinsets_id = '$id'","getRow",DB_FETCHMODE_ASSOC);
+ return $results;
+}
+
+function pinsets_del($id){
+ global $asterisk_conf;
+
+ $filename = $asterisk_conf['astetcdir'].'/pinset_'.$id;
+ if (file_exists($filename)) {
+ unlink($filename);
+ }
+
+ $results = sql("DELETE FROM pinsets WHERE pinsets_id = '$id'","query");
+}
+
+function pinsets_add($post){
+ if(!pinsets_chk($post))
+ return false;
+ extract($post);
+ $passwords = pinsets_clean($passwords);
+ if(empty($description)) $description = 'Unnamed';
+ $results = sql("INSERT INTO pinsets (description,passwords,addtocdr,deptname) values (\"$description\",\"$passwords\",\"$addtocdr\",\"$deptname\")");
+}
+
+function pinsets_edit($id,$post){
+ if(!pinsets_chk($post))
+ return false;
+ extract($post);
+ $passwords = pinsets_clean($passwords);
+ if(empty($description)) $description = 'Unnamed';
+ $results = sql("UPDATE pinsets SET description = \"$description\", passwords = \"$passwords\", addtocdr = \"$addtocdr\", deptname = \"$deptname\" WHERE pinsets_id = \"$id\"");
+}
+
+// clean and remove duplicates
+function pinsets_clean($passwords) {
+
+ $passwords = explode("\n",$passwords);
+
+ if (!$passwords) {
+ $passwords = null;
+ }
+
+ foreach (array_keys($passwords) as $key) {
+ //trim it
+ $passwords[$key] = trim($passwords[$key]);
+
+ // remove invalid chars
+ $passwords[$key] = preg_replace("/[^0-9#*]/", "", $passwords[$key]);
+
+ // remove blanks
+ if ($passwords[$key] == "") unset($passwords[$key]);
+ }
+
+ // check for duplicates, and re-sequence
+ $passwords = array_values(array_unique($passwords));
+
+ if (is_array($passwords))
+ return implode($passwords,"\n");
+ else
+ return "";
+}
+
+// ensures post vars is valid
+function pinsets_chk($post){
+ return true;
+}
+
+//removes a pinset from a route and shifts priority for all outbound routing pinsets
+function pinsets_adjustroute($route,$action,$routepinset='',$direction='',$newname='') {
+ $priority = (int)substr($route,0,3);
+ //create a selection of available pinsets
+ $pinsets = pinsets_list();
+ // loop through all the pinsets
+ if(is_array($pinsets)){
+ foreach($pinsets as $pinset) {
+
+ // get the used_by field
+ if(empty($pinset['used_by'])) {
+ $usedby = "";
+ } else {
+ $usedby = $pinset['used_by'];
+ }
+
+ // remove the target if it's already in this row's used_by field
+ //$usedby = str_replace("routing_{$route}","",$usedby);
+
+ // create an array from usedby
+ $arrUsedby = explode(',',$usedby);
+
+ for($i=0;$i<count($arrUsedby);$i++) {
+ if (substr($arrUsedby[$i],0,8)=='routing_') {
+ switch($action){
+ case 'delroute':
+ if ($arrUsedby[$i] == "routing_{$route}") {
+ unset($arrUsedby[$i]);
+ }
+ $usedbypriority = (int)substr($arrUsedby[$i],8,3);
+ $usedbyroute = substr($arrUsedby[$i],12);
+ if ($usedbypriority > $priority) {
+ $newpriority = str_pad($usedbypriority - 1, 3, "0", STR_PAD_LEFT);
+ $arrUsedby[$i] = 'routing_'.$newpriority.'-'.$usedbyroute;
+ }
+ break;
+ case 'prioritizeroute';
+ $addpriority = ($direction=='up')?-1:1;
+ $usedbypriority = (int)substr($arrUsedby[$i],8,3);
+ $usedbyroute = substr($arrUsedby[$i],12);
+ if ($priority + $addpriority == $usedbypriority) {
+ $newpriority = str_pad($priority, 3, "0", STR_PAD_LEFT);
+ $arrUsedby[$i] = 'routing_'.$newpriority.'-'.$usedbyroute;
+ }
+ if ($arrUsedby[$i] == "routing_{$route}") {
+ $newpriority = str_pad($priority + $addpriority, 3, "0", STR_PAD_LEFT);
+ $arrUsedby[$i] = 'routing_'.$newpriority.'-'.$usedbyroute;
+ }
+
+ break;
+ case 'renameroute';
+ if ($arrUsedby[$i] == "routing_{$route}") {
+ $newpriority = str_pad($priority, 3, "0", STR_PAD_LEFT);
+ $arrUsedby[$i] = 'routing_'.$newpriority.'-'.$newname;
+ }
+ break;
+ case 'editroute';
+ $usedbyroute = (int)substr($arrUsedby[$i],12);
+ if ($arrUsedby[$i] == "routing_{$route}") {
+ unset($arrUsedby[$i]);
+ }
+ break;
+ }
+ }
+ }
+
+ // save the route in the selected pin
+ if ($routepinset == $pinset['pinsets_id'] && $action == 'editroute') {
+ $arrUsedby[] = 'routing_'.$route;
+ }
+
+ // remove any duplicates
+ $arrUsedby = array_values(array_unique($arrUsedby));
+
+ // create a new string
+ $strUsedby = implode($arrUsedby,',');
+
+ // Insure there's no leading or trailing commas
+ $strUsedby = trim ($strUsedby, ',');
+
+
+ // store the used_by column in the DB
+ sql("UPDATE pinsets SET used_by = \"{$strUsedby}\" WHERE pinsets_id = \"{$pinset['pinsets_id']}\"");
+ }
+ }
+}
+
+// provide hook for routing
+function pinsets_hook_core($viewing_itemid, $target_menuid) {
+ switch ($target_menuid) {
+ // only provide display for outbound routing
+ case 'routing':
+ //create a selection of available pinsets
+ $pinsets = pinsets_list();
+ $hookhtml = '
+ <tr>
+ <td><a href="#" class="info">'._("PIN Set").'<span>'._('Optional: Select a PIN set to use. If using this option, leave the Route Password field blank.').'</span></a>:</td>
+ <td>
+ <select name="pinsets">
+ <option value=></option>
+ ';
+
+ if (is_array($pinsets))
+ {
+ foreach($pinsets as $item) {
+ if (isset($viewing_itemid) && $viewing_itemid <> '' && strpos($item['used_by'], "routing_{$viewing_itemid}") !== false) {
+ $selected = 'selected';
+ } else {
+ $selected = '';
+ }
+ $hookhtml .= "<option value={$item['pinsets_id']} ".$selected.">{$item['description']}</option>";
+ }
+ }
+ $hookhtml .= '
+ </select>
+ </td>
+ </tr>
+ ';
+ return $hookhtml;
+ break;
+ default:
+ return false;
+ break;
+ }
+}
+
+function pinsets_hookProcess_core($viewing_itemid, $request) {
+
+ // Record any hook selections made by target modules
+ // We'll add these to the pinset's "used_by" column in the format <targetmodule>_<viewing_itemid>
+ // multiple targets could select a single pinset, so we'll comma delimiter them
+
+ // this is really a crappy way to store things.
+ // Any module that is hooked by pinsets when submitted will result in all the "used_by" fields being re-written
+ switch ($request['display']) {
+ case 'routing':
+ // if routing was using post for the form (incl delete), i wouldn't need all these conditions
+ // if(isset($request['Submit']) || (isset($request['action']) && ($request['action'] == "delroute" || $request['action'] == "prioritizeroute" || $request['action'] == "renameroute"))) {
+
+ $action = (isset($request['action']))?$request['action']:null;
+ $route = $viewing_itemid;
+ if (isset($request['reporoutekey']) && $action == 'prioritizeroute') {
+ $outbound_routes = core_routing_getroutenames();
+ $route = $outbound_routes[(int)$request['reporoutekey']][0];
+ }
+ if (isset($request['Submit']) ) {
+ $action = (isset($action))?$action:'editroute';
+ }
+ if (isset($action)) {
+ $direction = (isset($request['reporoutedirection']))?$request['reporoutedirection']:null;
+ $newname = (isset($request['newroutename']))?$request['newroutename']:null;
+ pinsets_adjustroute($route,$action,$request['pinsets'],$direction,$newname);
+ }
+
+ break;
+ }
+}
+
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES/pinsets.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES/pinsets.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES/pinsets.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES/pinsets.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/i18n/he_IL/LC_MESSAGES/pinsets.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,77 @@
+# Hebrew version for PIN Sets FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.pinsets.php:47
+msgid "Add Password Set"
+msgstr "××סף ×¡× ×¡×ס×××ת"
+
+#: page.pinsets.php:60
+msgid "PIN Set "
+msgstr "×¡× ×¡×ס×× "
+
+#: page.pinsets.php:60
+msgid "deleted"
+msgstr "× ××ק"
+
+#: page.pinsets.php:73
+msgid "Delete PIN Set"
+msgstr "××ק ×¡× ×¡×ס××"
+
+#: page.pinsets.php:78
+msgid "PIN Set:"
+msgstr "×¡× ×¡×ס××:"
+
+#: page.pinsets.php:78
+msgid "Add PIN Set"
+msgstr "××סף ×¡× ×¡×ס××"
+
+#: page.pinsets.php:80
+msgid ""
+"PIN Sets are used to manage lists of PINs that can be used to access "
+"restricted features such as Outbound Routes. The PIN can also be added to "
+"the CDR record's 'accountcode' field."
+msgstr "×ס×× ×¡×ס×××ת ×שת×ש×× ××× ×× ×× ×¨×©×××ת ×©× ×¡×ס×××ת ש××× × ××ª× ××שת×ש ×ת××× ×ת ××××××ת, ××× ×××©× × ×ת×× ×©×××ת ××צ××ת. ××× ××, × ××ª× ×××ס××£ ×ת ×ס×ס×× ×ש×× 'accountcode' ×ר×ש××× ×ש×××ת ×©× ××ער×ת."
+
+#: page.pinsets.php:90
+msgid "Edit PIN Set"
+msgstr "ער×× ×¡× ×¡×ס×××ת"
+
+#: page.pinsets.php:90
+msgid "New PIN Set"
+msgstr "×¡× ×¡×ס×××ת ××ש"
+
+#: page.pinsets.php:97
+msgid "PIN Set Description:"
+msgstr "ת×××ר ×¡× ×¡×ס×××ת:"
+
+#: page.pinsets.php:101
+msgid "Record In CDR?:"
+msgstr "רש×× ×ר×ש×× ×©×××ת?:"
+
+#: page.pinsets.php:101
+msgid ""
+"Select this box if you would like to record the PIN in the call detail "
+"records when used"
+msgstr "ס×× ×ª××× ×× ×× ×רצ×× × ×רש×× ×ת ×ס×ס×× ×פ×ר×× ×¨×ש××× ×ש×××ת ××שר ×ש ×× ×©×××ש"
+
+#: page.pinsets.php:105
+msgid "PIN List:"
+msgstr "רש××ת ס×ס×××ת:"
+
+#: page.pinsets.php:105
+msgid "Enter a list of one or more PINs. One PIN per line."
+msgstr "××× ×¡ רש××× ×©× ×¡×ס×× ××ת ×× ××תר. ס×ס×× ××ת ××× ×©×ר×."
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,4 @@
+<?php
+// There is no way to delete a file supplied with modules.
+// This is overwriting the existing file
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+CREATE TABLE IF NOT EXISTS pinsets ( pinsets_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , passwords LONGTEXT, description VARCHAR( 50 ) , addtocdr TINYINT( 1 ) , deptname VARCHAR( 50 ) , used_by VARCHAR( 255 ));
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,19 @@
+<module>
+ <rawname>pinsets</rawname>
+ <name>PIN Sets</name>
+ <version>1.1</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Allow creation of lists of PINs (numbers for passwords) that can be used by other modules (eg, trunks).</description>
+ <changelog>
+ *1.1* Add naftali5's fix for pinsets being lost when routes are moved.
+ *1.0.12* Add he_IL translation
+ *1.0.11* Stop potential error where a random pinset is appearing when creating a new trunk
+ </changelog>
+ <menuitems>
+ <pinsets>PIN Sets</pinsets>
+ </menuitems>
+ <info>http://aussievoip.com.au/wiki/freePBX-PinSets</info>
+ <location>release/2.2/pinsets-1.0.12.tgz</location>
+ <md5sum>3d6b404b18ece21998731979686ba91a</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/page.pinsets.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/page.pinsets.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/page.pinsets.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,145 @@
+<?php /* $Id */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+
+//the item we are currently displaying
+isset($_REQUEST['itemid'])?$itemid=$_REQUEST['itemid']:$itemid='';
+
+$dispnum = "pinsets"; //used for switch on config.php
+
+//if submitting form, update database
+if(isset($_POST['action'])) {
+ switch ($action) {
+ case "add":
+ pinsets_add($_POST);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ pinsets_del($itemid);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit":
+ pinsets_edit($itemid,$_POST);
+ needreload();
+ redirect_standard('itemid');
+ break;
+ }
+}
+
+//get list of time conditions
+$pinsetss = pinsets_list();
+?>
+
+</div> <!-- end content div so we can display rnav properly-->
+
+<!-- right side menu -->
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($itemid=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Password Set")?></a></li>
+<?php
+if (isset($pinsetss)) {
+ foreach ($pinsetss as $pinsets) {
+ echo "<li><a id=\"".($itemid==$pinsets['pinsets_id'] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&itemid=".urlencode($pinsets['pinsets_id'])."\">{$pinsets['description']}</a></li>";
+ }
+}
+?>
+</ul></div>
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>'._("PIN Set ").' '.$itemid.' '._("deleted").'!</h3>';
+} else {
+ if ($itemid){
+ //get details for this time condition
+ $thisItem = pinsets_get($itemid);
+ }
+
+ $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete';
+ $delButton = "
+ <form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST>
+ <input type=\"hidden\" name=\"display\" value=\"{$dispnum}\">
+ <input type=\"hidden\" name=\"itemid\" value=\"{$itemid}\">
+ <input type=\"hidden\" name=\"action\" value=\"delete\">
+ <input type=submit value=\""._("Delete PIN Set")."\">
+ </form>";
+
+?>
+
+ <h2><?php echo ($itemid ? _("PIN Set:")." ". $itemid : _("Add PIN Set")); ?></h2>
+
+ <p><?php echo ($itemid ? '' : _("PIN Sets are used to manage lists of PINs that can be used to access restricted features such as Outbound Routes. The PIN can also be added to the CDR record's 'accountcode' field.")); ?></p>
+
+<?php if ($itemid){ echo $delButton; } ?>
+
+<form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($itemid ? 'edit' : 'add') ?>">
+ <input type="hidden" name="deptname" value="<?php echo $_SESSION["AMP_user"]->_deptname ?>">
+
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($itemid ? _("Edit PIN Set") : _("New PIN Set")) ?><hr></h5></td></tr>
+
+<?php if ($itemid){ ?>
+ <input type="hidden" name="account" value="<?php echo $itemid; ?>">
+<?php }?>
+
+ <tr>
+ <td><?php echo _("PIN Set Description:")?></td>
+ <td><input type="text" size=23 name="description" value="<?php echo (isset($thisItem['description']) ? $thisItem['description'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Record In CDR?:")?><span><?php echo _("Select this box if you would like to record the PIN in the call detail records when used")?></span></a></td>
+ <td><input type="checkbox" name="addtocdr" value="1" <?php echo (isset($thisItem['addtocdr']) && $thisItem['addtocdr'] == '1' ? 'CHECKED' : ''); ?>></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("PIN List:")?><span><?php echo _("Enter a list of one or more PINs. One PIN per line.")?></span></a></td>
+ <td>
+ <textarea rows=15 cols=20 name="passwords"><?php echo (isset($thisItem['passwords']) ? $thisItem['passwords'] : ''); ?></textarea>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+<script language="javascript">
+<!--
+
+var theForm = document.edit;
+theForm.description.focus();
+
+function edit_onsubmit() {
+ setDestinations(edit,1);
+
+ defaultEmptyOK = false;
+ if (!isAlphanumeric(theForm.description.value))
+ return warnInvalid(theForm.description, "Please enter a valid Description");
+
+ if (!validateDestinations(edit,1,true))
+ return false;
+
+ return true;
+}
+
+
+-->
+</script>
+
+
+ </form>
+<?php
+} //end if action == delete
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-pinsets/uninstall.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-pinsets/uninstall.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-pinsets/uninstall.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+<?php
+
+sql('DROP TABLE pinsets');
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-printextensions (2.2-1.3.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:27 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-printextensions
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-printextensions
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Print Extensions
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:27 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/printextensions/
+*.sql usr/share/freepbx/modules/printextensions/
+*.sqlite usr/share/freepbx/modules/printextensions/
+*.html usr/share/freepbx/modules/printextensions/
+*.xml usr/share/freepbx/modules/printextensions/
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install printextensions || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall printextensions || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall printextensions || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-printextensions/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,19 @@
+<?php
+/* $Id:$ */
+
+function printextensions_allusers() {
+ global $db;
+ $sql = "SELECT extension,name,directdid FROM users ORDER BY extension";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ foreach($results as $result){
+ if (checkRange($result[0])){
+ $users[] = array($result[0],$result[1],$result[2]);
+ }
+ }
+ if (isset($users)) sort($users);
+ return $users;
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES/printextensions.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES/printextensions.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES/printextensions.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES/printextensions.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/i18n/he_IL/LC_MESSAGES/printextensions.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,20 @@
+# Hebrew version for Print Extensions FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.printextensions.php:61
+msgid "Company Directory"
+msgstr "××ר×× ×××ר×"
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,17 @@
+<module>
+ <rawname>printextensions</rawname>
+ <name>Print Extensions</name>
+ <version>1.3.1</version>
+ <type>tool</type>
+ <category>Third Party Addon</category>
+ <description>Creates a printable list of names and extension numbers</description>
+ <menuitems>
+ <printextensions>Print Extensions</printextensions>
+ </menuitems>
+ <changelog>
+ *1.3.1* Add he_IL translation
+ </changelog>
+ <location>release/2.2/printextensions-1.3.0.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-PrintExtensions</info>
+ <md5sum>7a5cee510617e9373eae856f86c4ddb8</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-printextensions/page.printextensions.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-printextensions/page.printextensions.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-printextensions/page.printextensions.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,45 @@
+<?php /* $Id: page.printextensions.php 1197 2006-04-26 21:12 KerryG $ */
+//Copyright (C) 2006 Kerry Garrison (kgarrison at servicepointe dot net)
+//
+//This program 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.
+//
+//This program 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.
+
+$dispnum = 'printextensions'; //used for switch on config.php
+
+//isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+
+
+$gresults = printextensions_allusers();
+?>
+
+<div class="content">
+<?php
+if (!$quietmode) {
+ echo "<a href=\"config.php?type=tool&display=printextensions&quietmode=on\" target=\"_blank\">Printer Friendly</a>\n";
+}
+
+
+if (!$extdisplay) {
+ echo '<br><h2>'._("Company Directory").'</h2><table border="0" width="500">';
+ echo "<tr width=250><td align=left><b>Name</b></td><td width=\"50\" align=\"center\"><b>Extension</b></td><td width=\"200\" align=\"center\"><b>Assigned DID</b></td></tr>";
+ echo "<tr><td colspan=\"3\"><hr noshade /></td></tr>";
+
+}
+
+if (isset($gresults)) {
+ foreach ($gresults as $gresult) {
+ $defined = is_array($set_users) ? (in_array($gresult[0], $set_users) ? "(edit)" : "(add)") : "add";
+ echo "<tr width=\"250\"><td>".$gresult[1]."</td><td width=\"50\" align=\"right\">".$gresult[0]."</td><td width=\"200\" align=\"right\">".$gresult[2]."</td></tr>";
+ }
+}
+?>
+</table>
+<p><a href="http://aussievoip.com.au/wiki/freePBX-PrintExtensions">Print Extensions v1.3</a></p>
+</div>
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-queues (2.2-2.2.8-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:12 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-queues
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-queues
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Queues
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:12 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/queues/
+*.sql usr/share/freepbx/modules/queues/
+*.sqlite usr/share/freepbx/modules/queues/
+*.html usr/share/freepbx/modules/queues/
+*.xml usr/share/freepbx/modules/queues/
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install queues || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall queues || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall queues || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-queues/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-queues/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-queues/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,306 @@
+<?php /* $id:$ */
+// The destinations this module provides
+// returns a associative arrays with keys 'destination' and 'description'
+function queues_destinations() {
+ //get the list of all exisiting
+ $results = queues_list();
+
+ //return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $extens[] = array('destination' => 'ext-queues,'.$result['0'].',1', 'description' => $result['1'].' <'.$result['0'].'>');
+ }
+ }
+
+ if (isset($extens))
+ return $extens;
+ else
+ return null;
+}
+
+/* Generates dialplan for "queues" components (extensions & inbound routing)
+ We call this with retrieve_conf
+*/
+function queues_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+ switch($engine) {
+ case "asterisk":
+ /* queue extensions */
+ $ext->addInclude('from-internal-additional','ext-queues');
+ $qlist = queues_list();
+ if (is_array($qlist)) {
+ foreach($qlist as $item) {
+
+ $exten = $item[0];
+ $q = queues_get($exten);
+
+ $ext->add('ext-queues', $exten, '', new ext_answer(''));
+
+ // block voicemail until phone is answered at which point a macro should be called on the answering
+ // line to clear this flag so that subsequent transfers can occur.
+ //
+ $ext->add('ext-queues', $exten, '', new ext_setvar('__BLKVM_OVERRIDE', 'BLKVM/${EXTEN}/${CHANNEL}'));
+ $ext->add('ext-queues', $exten, '', new ext_setvar('__BLKVM_BASE', '${EXTEN}'));
+ $ext->add('ext-queues', $exten, '', new ext_setvar('DB(${BLKVM_OVERRIDE})', 'TRUE'));
+ $ext->add('ext-queues', $exten, '', new ext_setvar('_DIAL_OPTIONS', '${DIAL_OPTIONS}M(auto-blkvm)'));
+
+ // Inform all the children NOT to send calls to destinations or voicemail
+ //
+ $ext->add('ext-queues', $exten, '', new ext_setvar('__NODEST', '${EXTEN}'));
+
+ $ext->add('ext-queues', $exten, '', new ext_gotoif('$["${CONTEXT}"="from-internal"]','USERCID','SETCID'));
+ $ext->add('ext-queues', $exten, 'USERCID', new ext_macro('user-callerid'));
+ $ext->add('ext-queues', $exten, 'SETCID', new ext_setcidname($q['prefix'].'${CALLERIDNAME}'));
+ $ext->add('ext-queues', $exten, '', new ext_setvar('MONITOR_FILENAME','/var/spool/asterisk/monitor/q${EXTEN}-${TIMESTAMP}-${UNIQUEID}'));
+ $joinannounce = (isset($q['joinannounce'])?$q['joinannounce']:'');
+ if($joinannounce != "") {
+ $ext->add('ext-queues', $exten, '', new ext_playback($joinannounce));
+ }
+ $options = 't';
+ if ($q['rtone'] == 1)
+ $options .= 'r';
+ $agentannounce = (isset($q['agentannounce'])?$q['agentannounce']:'');
+ $ext->add('ext-queues', $exten, '', new ext_queue($exten,$options,'',$agentannounce,$q['maxwait']));
+
+ $ext->add('ext-queues', $exten, '', new ext_dbdel('${BLKVM_OVERRIDE}'));
+ // If we are here, disable the NODEST as we want things to resume as normal
+ //
+ $ext->add('ext-queues', $exten, '', new ext_setvar('__NODEST', ''));
+
+ // destination field in 'incoming' database is backwards from what ext_goto expects
+ $goto_context = strtok($q['goto'],',');
+ $goto_exten = strtok(',');
+ $goto_pri = strtok(',');
+
+ $ext->add('ext-queues', $exten, '', new ext_goto($goto_pri,$goto_exten,$goto_context));
+
+ //dynamic agent login/logout
+ $ext->add('ext-queues', $exten."*", '', new ext_macro('agent-add',$exten.",".$q['password']));
+ $ext->add('ext-queues', $exten."**", '', new ext_macro('agent-del',$exten.",".$exten));
+ }
+ }
+ break;
+ }
+}
+
+function queues_timeString($seconds, $full = false) {
+ if ($seconds == 0) {
+ return "0 ".($full ? "seconds" : "s");
+ }
+
+ $minutes = floor($seconds / 60);
+ $seconds = $seconds % 60;
+
+ $hours = floor($minutes / 60);
+ $minutes = $minutes % 60;
+
+ $days = floor($hours / 24);
+ $hours = $hours % 24;
+
+ if ($full) {
+ return substr(
+ ($days ? $days." day".(($days == 1) ? "" : "s").", " : "").
+ ($hours ? $hours." hour".(($hours == 1) ? "" : "s").", " : "").
+ ($minutes ? $minutes." minute".(($minutes == 1) ? "" : "s").", " : "").
+ ($seconds ? $seconds." second".(($seconds == 1) ? "" : "s").", " : ""),
+ 0, -2);
+ } else {
+ return substr(($days ? $days."d, " : "").($hours ? $hours."h, " : "").($minutes ? $minutes."m, " : "").($seconds ? $seconds."s, " : ""), 0, -2);
+ }
+}
+
+/*
+This module needs to be updated to use it's own database table and not the extensions table
+*/
+
+function queues_add($account,$name,$password,$prefix,$goto,$agentannounce,$members,$joinannounce,$maxwait) {
+ global $db;
+
+ //add to extensions table
+ if (!empty($agentannounce) && $agentannounce != 'None')
+ $agentannounce="$agentannounce";
+ else
+ $agentannounce="";
+
+ $addarray = array('ext-queues',$account,'1','Answer',''.'','','0');
+ legacy_extensions_add($addarray);
+ $addarray = array('ext-queues',$account,'2','SetCIDName',$prefix.'${CALLERIDNAME}','','0');
+ legacy_extensions_add($addarray);
+ $addarray = array('ext-queues',$account,'3','SetVar','MONITOR_FILENAME=/var/spool/asterisk/monitor/q${EXTEN}-${TIMESTAMP}-${UNIQUEID}','','0');
+ legacy_extensions_add($addarray);
+ if ($joinannounce != 'None') {
+ $addarray = array('ext-queues',$account,'4','Playback',$joinannounce,'','0');
+ legacy_extensions_add($addarray);
+ }
+ $addarray = array('ext-queues',$account,'5','Queue',$account.'|t||'.$agentannounce.'|'.$maxwait,$name,'0');
+ legacy_extensions_add($addarray);
+ $addarray = array('ext-queues',$account.'*','1','Macro','agent-add,'.$account.','.$password,'','0');
+ legacy_extensions_add($addarray);
+ $addarray = array('ext-queues',$account.'**','1','Macro','agent-del,'.$account,'','0');
+ legacy_extensions_add($addarray);
+
+ //failover goto
+ $addarray = array('ext-queues',$account,'6','Goto',$goto,'jump','0');
+ legacy_extensions_add($addarray);
+ //setGoto($account,'ext-queues','6',$goto,0);
+ // Announce Menu?
+ if ($_REQUEST['announcemenu']=='none') {
+ $qthanku = 'queue-thankyou';
+ $context = '';
+ } else {
+ $arr = (ivr_get_details($_REQUEST['announcemenu']));
+ if( isset($arr['announcement']) && !empty($arr['announcement']) ) {
+ $qthanku = $arr['announcement'];
+ } else {
+ $qthanku = '';
+ }
+ $context = "ivr-".$_REQUEST['announcemenu'];
+ }
+
+
+ // now add to queues table
+ $fields = array(
+ array($account,'account',$account,0),
+ array($account,'maxlen',($_REQUEST['maxlen'])?$_REQUEST['maxlen']:'0',0),
+ array($account,'joinempty',($_REQUEST['joinempty'])?$_REQUEST['joinempty']:'yes',0),
+ array($account,'leavewhenempty',($_REQUEST['leavewhenempty'])?$_REQUEST['leavewhenempty']:'no',0),
+ array($account,'strategy',($_REQUEST['strategy'])?$_REQUEST['strategy']:'ringall',0),
+ array($account,'timeout',($_REQUEST['timeout'])?$_REQUEST['timeout']:'15',0),
+ array($account,'retry',($_REQUEST['retry'])?$_REQUEST['retry']:'5',0),
+ array($account,'wrapuptime',($_REQUEST['wrapuptime'])?$_REQUEST['wrapuptime']:'0',0),
+ //array($account,'agentannounce',($_REQUEST['agentannounce'])?$_REQUEST['agentannounce']:'None'),
+ array($account,'announce-frequency',($_REQUEST['announcefreq'])?$_REQUEST['announcefreq']:'0',0),
+ array($account,'announce-holdtime',($_REQUEST['announceholdtime'])?$_REQUEST['announceholdtime']:'no',0),
+ array($account,'queue-youarenext',($_REQUEST['announceposition']=='no')?'':'queue-youarenext',0), //if no, play no sound
+ array($account,'queue-thereare',($_REQUEST['announceposition']=='no')?'':'queue-thereare',0), //if no, play no sound
+ array($account,'queue-callswaiting',($_REQUEST['announceposition']=='no')?'':'queue-callswaiting',0), //if no, play no sound
+ array($account,'queue-thankyou',$qthanku,0),
+ array($account,'context',$context,0),
+ array($account,'monitor-format',($_REQUEST['monitor-format'])?$_REQUEST['monitor-format']:'',0),
+ array($account,'monitor-join','yes',0),
+ array($account,'music',($_REQUEST['music'])?$_REQUEST['music']:'default',0),
+ array($account,'rtone',($_REQUEST['rtone'])?$_REQUEST['rtone']:0,0),
+ array($account,'eventwhencalled',($_REQUEST['eventwhencalled'])?$_REQUEST['eventwhencalled']:'no',0),
+ array($account,'eventmemberstatus',($_REQUEST['eventmemberstatus'])?$_REQUEST['eventmemberstatus']:'no',0));
+
+
+ //there can be multiple members
+ if (isset($members)) {
+ $count = 0;
+ foreach ($members as $member) {
+ $fields[] = array($account,'member',$member,$count);
+ $count++;
+ }
+ }
+
+ $compiled = $db->prepare('INSERT INTO queues (id, keyword, data, flags) values (?,?,?,?)');
+ $result = $db->executeMultiple($compiled,$fields);
+ if(DB::IsError($result)) {
+ die($result->getMessage()."<br><br>error adding to queues table");
+ }
+}
+
+function queues_del($account) {
+ global $db;
+ //delete from extensions table
+ legacy_extensions_del('ext-queues',$account);
+ legacy_extensions_del('ext-queues',$account.'*');
+ legacy_extensions_del('ext-queues',$account.'**');
+
+ $sql = "DELETE FROM queues WHERE id = '$account'";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getMessage().$sql);
+ }
+
+}
+
+//get the existing queue extensions
+function queues_list() {
+ global $db;
+ $sql = "SELECT extension,descr FROM extensions WHERE application = 'Queue' ORDER BY extension";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ foreach($results as $result){
+ if (checkRange($result[0])){
+ $extens[] = array($result[0],$result[1]);
+ }
+ }
+ if (isset($extens)) {
+ return $extens;
+ } else {
+ return null;
+ }
+}
+
+
+function queues_get($account) {
+ global $db;
+
+ if ($account == "")
+ {
+ return array();
+ }
+
+ //get all the variables for the queue
+ $sql = "SELECT keyword,data FROM queues WHERE id = '$account'";
+ $results = $db->getAssoc($sql);
+
+ //okay, but there can be multiple member variables ... do another select for them
+ $sql = "SELECT data FROM queues WHERE id = '$account' AND keyword = 'member' order by flags";
+ $results['member'] = $db->getCol($sql);
+
+ //queues.php looks for 'announcemenu', which is the same a context
+ $results['announcemenu'] = $results['context'];
+
+ //if 'queue-youarenext=queue-youarenext', then assume we want to announce position
+ if($results['queue-youarenext'] == 'queue-youarenext')
+ $results['announce-position'] = 'yes';
+ else
+ $results['announce-position'] = 'no';
+
+ //if 'eventmemberstatusoff=Yes', then assume we want to 'eventmemberstatus=no'
+ if(isset($results['eventmemberstatusoff'])) {
+ if (strtolower($results['eventmemberstatusoff']) == 'yes') {
+ $results['eventmemberstatus'] = 'no';
+ } else {
+ $results['eventmemberstatus'] = 'yes';
+ }
+ } else {
+ $results['eventmemberstatus'] = 'no';
+ }
+
+ //get CID Prefix
+ $sql = "SELECT args FROM extensions WHERE extension = '$account' AND context = 'ext-queues' AND application = 'SetCIDName'";
+ list($args) = $db->getRow($sql);
+ $prefix = explode('$',$args); //in table like prefix${CALLERIDNAME}
+ $results['prefix'] = $prefix[0];
+
+ //get max wait time from Queue command
+ $sql = "SELECT args,descr FROM extensions WHERE extension = '$account' AND context = 'ext-queues' AND application = 'Queue'";
+ list($args, $descr) = $db->getRow($sql);
+ $maxwait = explode('|',$args); //in table like queuenum|t|||maxwait
+ $results['agentannounce'] = $maxwait[3];
+ $results['maxwait'] = $maxwait[4];
+ $results['name'] = $descr;
+
+ $sql = "SELECT args FROM extensions WHERE extension = '$account' AND context = 'ext-queues' and application = 'Playback'";
+ list($args) = $db->getRow($sql);
+ $results['joinannounce'] = $args;
+
+ //get password from AddQueueMember command
+ $sql = "SELECT args FROM extensions WHERE extension = '$account*' AND context = 'ext-queues'";
+ list($args) = $db->getRow($sql);
+ $password = explode(',',$args); //in table like agent-add,account,password
+ $results['password'] = $password[2];
+
+ //get the failover destination (desc=jump)
+ $sql = "SELECT args FROM extensions WHERE extension = '".$account."' AND descr = 'jump'";
+ list($args) = $db->getRow($sql);
+ $results['goto'] = $args;
+
+ return $results;
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES/queues.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES/queues.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES/queues.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES/queues.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/i18n/he_IL/LC_MESSAGES/queues.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,426 @@
+# Hebrew version for Queues FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.queues.php:85
+msgid "Warning! Extension"
+msgstr "×××ר×! ש××××"
+
+#: page.queues.php:85
+msgid "is not allowed for your account."
+msgstr "××× × ××רש×ת ×¢××ר ×ש××× ×."
+
+#: page.queues.php:114 page.queues.php:147 page.queues.php:157
+msgid "Add Queue"
+msgstr "××סף ת×ר"
+
+#: page.queues.php:127
+msgid "Queue"
+msgstr "ת×ר"
+
+#: page.queues.php:127
+msgid "deleted"
+msgstr "× ××ק"
+
+#: page.queues.php:140
+msgid "Delete Queue"
+msgstr "××ק ת×ר"
+
+#: page.queues.php:145
+msgid "Queue:"
+msgstr "ת×ר:"
+
+#: page.queues.php:157
+msgid "Edit Queue"
+msgstr "ער×× ×ª×ר"
+
+#: page.queues.php:162
+msgid "queue number:"
+msgstr "×ספר ת×ר:"
+
+#: page.queues.php:162
+msgid ""
+"Use this number to dial into the queue, or transfer callers to this number "
+"to put them into the queue.<br><br>Agents will dial this queue number plus * "
+"to log onto the queue, and this queue number plus ** to log out of the queue."
+"<br><br>For example, if the queue number is 123:<br><br><b>123* = log "
+"in<br>123** = log out</b>"
+msgstr "×שת×ש ××ספר ×× ××× ××××× ×ת×× ×ª×ר ××, ×× ××¢×ר ×תקשר×× ××ספר ×× ××× ×××× ××¡× ×× ×ת×ר.<br /><br />× ×¦××× ×©×ר×ת ×××××× ××ספר ת×ר ×× ××××ר×× ×××××ת ××× ××××× ×¡ ×רש××ת ×× ×¦×××× ×שר ×××××× ×ק×× ×©×××ת, ××ת ×ספר ×ת×ר ×¢× ×©×ª× ××××××ת ××ר×× ××× ×צ×ת ××ת×ר.<br /><br />××××××, ×× ×ספר ×ת×ר ××× 123:<br /><br /><b>123* = ×× ××¡× ×ש×ר×ת ×ת×ר<br />123** = ×צ××× ××ש×ר×ת ×ת×ר</b>"
+
+#: page.queues.php:167
+msgid "queue name:"
+msgstr "×©× ×ת×ר:"
+
+#: page.queues.php:167
+msgid "Give this queue a brief name to help you identify it."
+msgstr "×ª× ×ת×ר ×× ×©× ×§×¦×¨ ××× ××¢××ר ×× ××××ת ××ת×."
+
+#: page.queues.php:171
+msgid "queue password:"
+msgstr "ס×ס×× ×ת×ר:"
+
+#: page.queues.php:171
+msgid ""
+"You can require agents to enter a password before they can log in to this "
+"queue.<br><br>This setting is optional."
+msgstr "××ª× ×××× ××ר×ש ×©× ×¦××× ×©×ר×ת ××× ××¡× ×¡×ס×× ××¤× × ×©×× ×××××× ××ת××× ×תת ש×ר×ת ×ת×ר.<br /><br />××××¨× ×× ××× ×¨×©×ת."
+
+#: page.queues.php:175
+msgid "CID name prefix:"
+msgstr "ק××××ת ××©× ×××××× ×©×××ת:"
+
+#: page.queues.php:175
+msgid ""
+"You can optionally prefix the Caller ID name of callers to the queue. ie: If "
+"you prefix with \"Sales:\", a call from John Doe would display as \"Sales:"
+"John Doe\" on the extensions that ring."
+msgstr "××ª× ×××× (×× ××× × ××××) ××ק××× ×ת ××©× ×××××× ×ש××× ×©× ××תקשר×× ×ת×ר. ××××××: ×× ×ª×§××× ×-\"Sales:\", ××× ×©××× ×××ש×× ×©×©×× John Doe ת××¦× ×××פ×× ××: \"Sales: John Doe\" ×ש××××ת שתצ×צ×× ×."
+
+#: page.queues.php:179
+msgid "static agents"
+msgstr "× ×¦××× ×©×ר×ת שת××× × ×צ×××"
+
+#: page.queues.php:179
+msgid ""
+"Static agents are extensions that are assumed to always be on the queue. "
+"Static agents do not need to 'log in' to the queue, and cannot 'log out' of "
+"the queue.<br><br>List extensions to ring, one per line.<br><br>You can "
+"include an extension on a remote system, or an external number (Outbound "
+"Routing must contain a valid route for external numbers).<br><br>You can "
+"also list agents defined in agents.conf by preceding the agent number with "
+"A, so agent 4002 would be listed as A4002.<br><br>In all cases, you can put "
+"a \",\" after the agent followed by a penalty value."
+msgstr "'× ×¦××× ×©×ר×ת שת××× × ×צ×××' ××× × ×©××××ת ש×× ×××× ×©×× ×ª××× ×ת×ר. ×× ××× × ×¦×¨×××× '××××× ×¡' ×ת×× ×ת×ר, ×××× × ×××××× '×צ×ת' ×ת×× ×ת×ר.<br /><br />רש××ת ש××××ת ש××××× ×ש ×צ×צ×, ××ת ××× ×©×ר×.<br /><br />××ª× ×××× ×צ××× ×©×××× ××ער×ת ×ר××קת, ×× ×ספר ××צ×× × (× ×ת×× ××××¦× ×××× ××××× × ×ת×× ×××§× ×¢××ר ×ספר×× ××צ×× ×××).<br /><br />××ª× ×××× ×× ×צ××× × ×¦×××× ×××××ר×× ×ק×××¥ agents.conf ×¢× ××× ×ק××ת ×ספר ×× ×¦×× ×××ת A, ×× ×©× ×¦×× 4002 ×××¨×©× ×ת×ר A4002.<br /><br />××× ××קר××, ××ª× ×××× ×ש×× ×¡××× \",\" ×××ר ×× ×¦××, ×××ר×× ××× ×¢×× ×©××"
+
+#: page.queues.php:186
+msgid "Queue Options"
+msgstr "×פשר×××ת ת×ר"
+
+#: page.queues.php:189 page.queues.php:208
+msgid "Agent Announcement:"
+msgstr "××ר×× ×× ×¦××:"
+
+#: page.queues.php:189
+msgid ""
+"Announcement played to the Agent prior to bridging in the caller <br><br> "
+"Example: \"the Following call is from the Sales Queue\" or \"This call is "
+"from the Technical Support Queue\".<br><br>To add additional recordings "
+"please use the \"System Recordings\" MENU to the left"
+msgstr "××ר×× ×××ש×עת ×× ×¦×× ×ש×ר×ת ××¤× × ×§×ש××¨× ×× ××תקשר<br /><br />××××××: \"×ש××× ×××× ××××¢× ×ת×ר ××××ר×ת\" ×× \"ש××× ×× ××××¢× ×ת×ר ×ת×××× ×××× ×ת\".<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×× × ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ×שר ××¦× ×©×××"
+
+#: page.queues.php:195 page.queues.php:453 page.queues.php:483
+msgid "None"
+msgstr "×××"
+
+#: page.queues.php:208
+msgid ""
+"Announcement played to the Agent prior to bridging in the caller <br><br> "
+"Example: \"the Following call is from the Sales Queue\" or \"This call is "
+"from the Technical Support Queue\".<br><br>You must install and enable the "
+"\"Systems Recordings\" Module to edit this option"
+msgstr "××ר×× ×××ש×עת ×× ×¦×× ×ש×ר×ת ××¤× × ×§×ש××¨× ×× ××תקשר<br /><br />××××××: \"×ש××× ×××× ××××¢× ×ת×ר ××××ר×ת\" ××\"ש××× ×× ××××¢× ×ת×ר ×ת×××× ×××× ×ת\".<br /><br />××ª× ×××× ××תק×× ×××פע×× ×ת ×××××× \"×ק×××ת ×ער×ת\" ××× ×ער×× ×פשר×ת ××"
+
+#: page.queues.php:220
+msgid "Hold Music Category:"
+msgstr "ק×××ר××ת ××ס×קת ×××ª× ×:"
+
+#: page.queues.php:220
+msgid ""
+"Music (or Commercial) played to the caller while they wait in line for an "
+"available agent.<br><br> This music is defined in the \"On Hold Music\" "
+"Menu to the left."
+msgstr "××ס××§× (×× ×¤×¨×¡××ת) ש×ש ×× ×× ××תקשר ×××× ×©×× ××ת×× ×× ×ת×ר ×× ×¦×× ×ש×ר×ת ×××.<br /><br />×××ס××§× ××××רת ×תפר×× \"××ס×קת ×××ª× ×\" ×שר ××¦× ×©×××."
+
+#: page.queues.php:238
+msgid "Ringing tone instead of MOH:"
+msgstr "ק×× ×¦×צ×× ××ק×× ××ס×קת ×××ª× ×:"
+
+#: page.queues.php:238
+msgid ""
+"Enabling this option make callers hear a ringing tone instead of Music on "
+"Hold.<br/>If this option is enabled, settings of the previous drop down are "
+"ignored."
+msgstr "×פע×ת ×פשר×ת ×× ××ר×ת ××תקשר×× ×ש×××¢ צ××× ×©× ×¦×צ×× ×¨××× ××ק×× ××ס×קת ×××ª× ×.<br />×× ×פשר×ת ×× ××פע×ת, ××××ר×ת ×©× ×ª××ת ×××××× ×ק×××ת ××× × ×שפ××¢×ת."
+
+#: page.queues.php:244
+msgid "max wait time:"
+msgstr "××× ×××ª× × ×קס××××:"
+
+#: page.queues.php:244
+msgid ""
+"The maximum number of seconds a caller can wait in a queue before being "
+"pulled out. (0 for unlimited)."
+msgstr "×××× ××קס×××× ××©× ××ת ש××שת×ש ×××× ×××ת×× ×ת×ר ××¤× × ×©××× ×××¦× ××©× ×¢× ××× ××ער×ת. (0 ×¢××ר ××× ×××××)"
+
+#: page.queues.php:251
+msgid "Unlimited"
+msgstr "××× ×××××"
+
+#: page.queues.php:260
+msgid "max callers:"
+msgstr "×קס×××× ×תקשר××:"
+
+#: page.queues.php:260
+msgid "Maximum number of people waiting in the queue (0 for unlimited)"
+msgstr "×ספר ×× ×©×× ×קס×××× ×©×××××× ×××ת×× ×ת×ר (0 ××× ×××××)"
+
+#: page.queues.php:273
+msgid "join empty:"
+msgstr "×צ×רף ×שר×ק:"
+
+#: page.queues.php:273
+msgid ""
+"If you wish to allow callers to join queues that currently have no agents, "
+"set this to yes"
+msgstr "×× ××ª× ×¨××¦× ××פשר ××תקשר×× ×××ת×× ×ת×ר ××ר×ת ש××× ××£ × ×¦×× ×©×ר×ת ××××, ×××ר ×פשר×ת ×× ×-××"
+
+#: page.queues.php:278 page.queues.php:292 page.queues.php:384
+#: page.queues.php:398 page.queues.php:426 page.queues.php:438
+msgid "Yes"
+msgstr "××"
+
+#: page.queues.php:278 page.queues.php:292 page.queues.php:373
+#: page.queues.php:384 page.queues.php:398 page.queues.php:427
+#: page.queues.php:439
+msgid "No"
+msgstr "××"
+
+#: page.queues.php:287
+msgid "leave when empty:"
+msgstr "×××¦× ××ת×ר ×שר×ק:"
+
+#: page.queues.php:287
+msgid ""
+"If you wish to remove callers from the queue if there are no agents present, "
+"set this to yes"
+msgstr "×× ×רצ×× × ×××צ×× ×ת ×× ××תקשר×× ××ת×ר ×× ××× ××£ × ×¦×× ×©×ר×ת ××××, ×××ר ×פשר×ת ×× ×-××"
+
+#: page.queues.php:302
+msgid "ring strategy:"
+msgstr "×ס×ר××××ת צ×צ××:"
+
+#: page.queues.php:304
+msgid "ringall"
+msgstr "צ××¦× ×××××"
+
+#: page.queues.php:304
+msgid "ring all available agents until one answers (default)"
+msgstr "צ××¦× ××× × ×¦××× ×ש×ר×ת ××××× ×× ×¢× ×©××× ××× ××¢× × (×ר×רת ×××××)"
+
+#: page.queues.php:305
+msgid "roundrobin"
+msgstr "ס×××××"
+
+#: page.queues.php:305
+msgid "take turns ringing each available agent"
+msgstr "×¢××ר ×צ××¨× ×¡×××××ת ××× ×× ×× ×¦×××× ××××× ××"
+
+#: page.queues.php:306
+msgid "leastrecent"
+msgstr "××× ×¤××ת ××ר××"
+
+#: page.queues.php:306
+msgid "ring agent which was least recently called by this queue"
+msgstr "צ××¦× ×× ×¦×× ×©×××× ×¦×צ×× ××¤×¢× ×××ר×× × ××× ××ק×× ×××× ××××"
+
+#: page.queues.php:307
+msgid "fewestcalls"
+msgstr "××× ××¢× ×©×××ת"
+
+#: page.queues.php:307
+msgid "ring the agent with fewest completed calls from this queue"
+msgstr "צ××¦× ×× ×¦×× ×©×ש××× ××× ××¢× ×©×××ת ×ת×ר ××"
+
+#: page.queues.php:308
+msgid "random"
+msgstr "×קר××"
+
+#: page.queues.php:308
+msgid "ring random agent"
+msgstr "צ××¦× ×× ×¦×× ×קר××"
+
+#: page.queues.php:309
+msgid "rrmemory"
+msgstr "ס××××× ×¢× ×××ר××"
+
+#: page.queues.php:309
+msgid "round robin with memory, remember where we left off last ring pass"
+msgstr "××× ×¡×××××, ××× ×¢× ×××ר×× - ×××ר ×××× ××פסק ××¤×¢× ×××ר×× × ×××ש×× ×ש×"
+
+#: page.queues.php:326
+msgid "agent timeout:"
+msgstr "××× ×קס×××× ×× ×¦××:"
+
+#: page.queues.php:326
+msgid ""
+"The number of seconds an agents phone can ring before we consider it a "
+"timeout."
+msgstr "×ספר ××©× ××ת ש×××פ×× ×©× × ×¦×× ×©×ר×ת ×צ××¦× ××¤× × ×©× ×××× ×©××× ××ר ×× ××¢× ×."
+
+#: page.queues.php:339
+msgid "retry:"
+msgstr "× ×¡××× ×××ר:"
+
+#: page.queues.php:339
+msgid "The number of seconds we wait before trying all the phones again"
+msgstr "×ספר ××©× ××ת ש×ש ×××ת×× ××¤× × ×©×× ×¡×× ×©×× ×ת ×× ×××פ×× ××"
+
+#: page.queues.php:352
+msgid "wrap-up-time:"
+msgstr "×××-×ש×××:"
+
+#: page.queues.php:352
+msgid ""
+"After a successful call, how many seconds to wait before sending a "
+"potentially free agent another call (default is 0, or no delay)"
+msgstr "×××¨× ×©××× ××צ××ת, ××× ×©× ××ת ×××ת×× ××¤× × ×©×©××××× × ×¦×× ×¤× ×× ××××¤× ×¤××× ×¦×××× ×× ×ש××× ×××× (×ר×רת ××××× ××× 0, ×× ××× ×××ª× ×)"
+
+#: page.queues.php:365
+msgid "call recording:"
+msgstr "×ק××ת ש×××ת:"
+
+#: page.queues.php:365
+msgid ""
+"Incoming calls to agents can be recorded. (saved to /var/spool/asterisk/"
+"monitor)"
+msgstr "ש×××ת × ×× ×¡×ת ×× ×¦×××× ×××××ת ××××ת ××ק×××ת. (× ×©×ר × /var/spool/asterisk/monitor)"
+
+#: page.queues.php:370
+msgid "wav49"
+msgstr ""
+
+#: page.queues.php:371
+msgid "wav"
+msgstr ""
+
+#: page.queues.php:372
+msgid "gsm"
+msgstr ""
+
+#: page.queues.php:379
+msgid "event when called:"
+msgstr "××ר××¢ ×ש×ש ש×××:"
+
+#: page.queues.php:379
+msgid ""
+"When this option is set to YES, the following manager events will be "
+"generated: AgentCalled, AgentDump, AgentConnect and AgentComplete."
+msgstr "×× ×פשר×ת ××ת ××××רת ×'××', ××ר××¢× ××× ×× ××××× ×××צר×: AgentCalled, AgentDump, AgentConnect ×-AgentComplete."
+
+#: page.queues.php:393
+msgid "member status off:"
+msgstr "ס×××ס ×שת×ש×× ××××:"
+
+#: page.queues.php:393
+msgid ""
+"When if this is option is set to NO, the following manager event will be "
+"generated: QueueMemberStatus"
+msgstr "×ש×פשר×ת ××ת ××××רת ×'××', ××ר××¢ ××× ×× ××× ×××צר: QueueMemberStatus"
+
+#: page.queues.php:406
+msgid "Caller Announcements"
+msgstr "××ר××ת ××תקשר"
+
+#: page.queues.php:408
+msgid "Frequency:"
+msgstr "ת××ר×ת:"
+
+#: page.queues.php:408
+msgid ""
+"How often to announce queue position, estimated holdtime, and/or voice menu "
+"to the caller (0 to Disable Announcements)."
+msgstr "××××× ×ª××ר×ת ×ש ×××ר×× ×¢× ×××ק×× ×ת×ר, ××× ×××ª× × ×ש×ער, ×/×× ×ª×¤×¨×× ×§××× ××תקשר (0 ××× ×××× ××ר××ת)"
+
+#: page.queues.php:421
+msgid "Announce Position:"
+msgstr "×××¨× ××ק××:"
+
+#: page.queues.php:421
+msgid "Announce position of caller in the queue?"
+msgstr "×××¨× ××תקשר ×ת ××ק××× ×ת×ר?"
+
+#: page.queues.php:433
+msgid "Announce Hold Time:"
+msgstr "×××¨× ××× ×××ª× ×:"
+
+#: page.queues.php:433
+msgid ""
+"Should we include estimated hold time in position announcements? Either "
+"yes, no, or only once; hold time will not be announced if <1 minute"
+msgstr "××× ×× × ×××ר×× ××××× ×ת ××× ××××ª× × ××ש×ער ×××ר××ת? ××פשר×××ת ×× ××, ××, ×× ×¤×¢× ××ת; ××× ××××ª× × ×× ××××¨× ×× ××× ×§×× ×××§× ××ת"
+
+#: page.queues.php:440
+msgid "Once"
+msgstr "×¤×¢× ××ת"
+
+#: page.queues.php:447
+msgid "Voice Menu:"
+msgstr "תפר×× ×§×××:"
+
+#: page.queues.php:447
+msgid ""
+"After announcing Position and/or Hold Time, you can optionally present an "
+"existing Digital Receptionist Voice Menu.<br><br>This voicemenu must only "
+"contain single-digit 'dialed options'."
+msgstr "×××¨× ×©××ר×××× ×ת ×××ק×× ×/×× ×ת ××× ××××ª× ×, ××ª× ×××× ××צ×× ×ª×¤×¨×× ××¢× × ×§××× ××ש×××.<br /><br />תפר×× ×§××× ×× ×××× ××××× ×פשר×××ת ×××× ×× ×ת ×¡×¤×¨× ××ת ××××."
+
+#: page.queues.php:462
+msgid "Menu ID "
+msgstr "×××× ×תפר××"
+
+#: page.queues.php:477 page.queues.php:495
+msgid "Join Announcement:"
+msgstr "××ר×ת ×צ×רפ×ת:"
+
+#: page.queues.php:477
+msgid ""
+"Announcement played to callers once prior to joining the queue.<br><br>To "
+"add additional recordings please use the \"System Recordings\" MENU to the "
+"left"
+msgstr "××ר×× ×©×ª×ש××¢ ××תקשר×× ××¤× × ××× ××¡× ×ת×ר.<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×× × ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ש××¦× ×©×××"
+
+#: page.queues.php:495
+msgid ""
+"Announcement played to callers once prior to joining the queue.<br><br>You "
+"must install and enable the \"Systems Recordings\" Module to edit this option"
+msgstr "××ר×× ×©×ª×ש××¢ ××תקשר×× ××¤× × ××× ××¡× ×ת×ר.<br /><br />××ª× ×××× ××תק×× ×××פע×× ×ת ×××××× \"×ק×××ת ×ער×ת\" ××× ×ער×× ×פשר×ת ××"
+
+#: page.queues.php:504
+msgid "Fail Over Destination"
+msgstr "××¢× ×©×ש ×××××©× ××××"
+
+#: page.queues.php:540
+msgid ""
+"Custom Goto contexts must contain the string \"custom\". ie: custom-app,s,1"
+msgstr "××§×©×¨× ×§×¤××¦× (Goto contexts) ××ת×××× ××ש×ת ×××××× ××××× ×ת ×××ר××ת \"custom\". ××××××: custom-app,s,1"
+
+#: page.queues.php:546
+msgid "Queue Number must not be blank"
+msgstr "×ספר ×ת×ר ××× × ×××× ××××ת ר×ק"
+
+#: page.queues.php:550
+msgid "Queue numbers with more than one digit cannot begin with 0"
+msgstr "××¡×¤×¨× ×ª×ר ×¢× ××תר ××¡×¤×¨× ××ת ××× × ×××××× ××ת××× ××פס"
+
+#: page.queues.php:555
+msgid "Queue name must not be blank"
+msgstr "×©× ×ת×ר ×× ×××× ××××ת ר×ק"
+
+#: page.queues.php:558
+msgid ""
+"Queue name cannot start with a number, and can only contain letters and "
+"numbers"
+msgstr "×©× ×ת×ר ×× ×××× ××ת××× ××ספר, ××××× ××××× ×¨×§ ××ת××ת ××ספר××"
Added: freepbx/modules-2.2/modules/freepbx-module-queues/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,26 @@
+<module>
+ <rawname>queues</rawname>
+ <name>Queues</name>
+ <version>2.2.8</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Creates a queue where calls are placed on hold and answered on a first-in, first-out basis. Many options are available, including ring strategy for agents, caller announcements, max wait times, etc.
+ </description>
+ <changelog>
+ *2.2.8* Fixed typo in 2.2.7
+ *2.2.7* Fixed eventmemberstatus #1635
+ *2.2.6* Add he_IL translation
+ *2.2.5* Added BLKVM DB tree to fix inability to transfer a received call to another user, and make NODEST stuff work overall
+ *2.2.4* Change _NODEST to __NODEST for some scenarios that require infinite inheritance
+ *2.2.3* Updated for freepbx 2.2.0rc2
+ *2.2.2* Disallow Queue 0 (#1487)
+ *2.2.1* Add NODEST to tell children NOT to go to destinations (like voicemail or other) - helps with followme in a queue
+ *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog>
+ <menuitems>
+ <queues>Queues</queues>
+ </menuitems>
+ <location>release/2.2/queues-2.2.7.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Queues</info>
+ <md5sum>1f9213f2e35bab3192132306356a0845</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-queues/page.queues.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-queues/page.queues.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-queues/page.queues.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,586 @@
+<?php /* $Id: page.queues.php 3692 2007-02-04 22:07:19Z naftali5 $ */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+//used for switch on config.php
+$dispnum = 'queues';
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+//the extension we are currently displaying
+isset($_REQUEST['extdisplay'])?$extdisplay=$_REQUEST['extdisplay']:$extdisplay='';
+isset($_REQUEST['account'])?$account = $_REQUEST['account']:$account='';
+isset($_REQUEST['name'])?$name = $_REQUEST['name']:$name='';
+isset($_REQUEST['password'])?$password = $_REQUEST['password']:$password='';
+isset($_REQUEST['agentannounce'])?$agentannounce = $_REQUEST['agentannounce']:$agentannounce='';
+isset($_REQUEST['prefix'])?$prefix = $_REQUEST['prefix']:$prefix='';
+isset($_REQUEST['joinannounce'])?$joinannounce = $_REQUEST['joinannounce']:$joinannounce='';
+$maxwait = isset($_REQUEST['maxwait'])?$_REQUEST['maxwait']:'';
+
+if (isset($_REQUEST['goto0']) && isset($_REQUEST[$_REQUEST['goto0']."0"])) {
+ $goto = $_REQUEST[$_REQUEST['goto0']."0"];
+} else {
+ $goto = '';
+}
+if (isset($_REQUEST["members"])) {
+ $members = explode("\n",$_REQUEST["members"]);
+
+ if (!$members) {
+ $members = null;
+ }
+
+ foreach (array_keys($members) as $key) {
+ //trim it
+ $members[$key] = trim($members[$key]);
+
+ // check if an agent (starts with a or A)
+
+ if (strtoupper(substr($members[$key],0,1)) == "A") {
+ // remove invalid chars
+ $members[$key] = "A".preg_replace("/[^0-9#\,*]/", "", $members[$key]);
+ $agent = 1;
+ } else {
+ // remove invalid chars
+ $members[$key] = preg_replace("/[^0-9#\,*]/", "", $members[$key]);
+ $agent = 0;
+ }
+
+ $penalty_pos = strrpos($members[$key], ",");
+ if ( $penalty_pos === false ) {
+ $penalty_val = 0;
+ } else {
+ $penalty_val = substr($members[$key], $penalty_pos+1); // get penalty
+ $members[$key] = substr($members[$key],0,$penalty_pos); // clean up ext
+ $members[$key] = preg_replace("/[^0-9#*]/", "", $members[$key]); //clean out other ,'s
+ $penalty_val = preg_replace("/[^0-9*]/", "", $penalty_val); // get rid of #'s if there
+ $penalty_val = ($penalty_val == "") ? 0 : $penalty_val;
+ }
+
+ // remove blanks // prefix with the channel
+ if (empty($members[$key]))
+ unset($members[$key]);
+ elseif ($agent) {
+ $members[$key] = "Agent/".ltrim($members[$key],"aA").",".$penalty_val;
+ } else {
+ $members[$key] = "Local/".$members[$key]."@from-internal/n,".$penalty_val;
+ }
+ }
+
+ // check for duplicates, and re-sequence
+ // $members = array_values(array_unique($members));
+}
+
+// do if we are submitting a form
+if(isset($_POST['action'])){
+ //check if the extension is within range for this user
+ if (isset($account) && !checkRange($account)){
+ echo "<script>javascript:alert('"._("Warning! Extension")." $account "._("is not allowed for your account.")."');</script>";
+ } else {
+
+ //if submitting form, update database
+ switch ($action) {
+ case "add":
+ queues_add($account,$name,$password,$prefix,$goto,$agentannounce,$members,$joinannounce,$maxwait);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ queues_del($account);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit": //just delete and re-add
+ queues_del($account);
+ queues_add($account,$name,$password,$prefix,$goto,$agentannounce,$members,$joinannounce,$maxwait);
+ needreload();
+ redirect_standard('extdisplay');
+ break;
+ }
+ }
+}
+
+//get unique queues
+$queues = queues_list();
+
+?>
+</div>
+
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($extdisplay=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Queue")?></a></li>
+<?php
+if (isset($queues)) {
+ foreach ($queues as $queue) {
+ echo "<li><a id=\"".($extdisplay==$queue[0] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&extdisplay=".urlencode($queue[0])."\">{$queue[0]}:{$queue[1]}</a></li>";
+ }
+}
+?>
+</ul>
+</div>
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>'._("Queue").' '.$account.' '._("deleted").'!</h3><br><br><br><br><br><br><br><br>';
+} else {
+ $member = array();
+ //get members in this queue
+ $thisQ = queues_get($extdisplay);
+ //create variables
+ extract($thisQ);
+
+ $delButton = "
+ <form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST>
+ <input type=\"hidden\" name=\"display\" value=\"{$dispnum}\">
+ <input type=\"hidden\" name=\"account\" value=\"{$extdisplay}\">
+ <input type=\"hidden\" name=\"action\" value=\"delete\">
+ <input type=submit value=\""._("Delete Queue")."\">
+ </form>";
+?>
+
+<?php if ($extdisplay != '') { ?>
+ <h2><?php echo _("Queue:")." ". $extdisplay; ?></h2>
+<?php } else { ?>
+ <h2><?php echo _("Add Queue"); ?></h2>
+<?php } ?>
+
+<?php if ($extdisplay){ ?>
+ <p><?php echo $delButton ?></p>
+<?php } ?>
+ <form autocomplete="off" name="editQ" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edit' : 'add') ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($extdisplay ? _("Edit Queue") : _("Add Queue")) ?><hr></h5></td></tr>
+ <tr>
+<?php if ($extdisplay){ ?>
+ <input type="hidden" name="account" value="<?php echo $extdisplay; ?>">
+<?php } else { ?>
+ <td><a href="#" class="info"><?php echo _("queue number:")?><span><?php echo _("Use this number to dial into the queue, or transfer callers to this number to put them into the queue.<br><br>Agents will dial this queue number plus * to log onto the queue, and this queue number plus ** to log out of the queue.<br><br>For example, if the queue number is 123:<br><br><b>123* = log in<br>123** = log out</b>")?></span></a></td>
+ <td><input type="text" name="account" value=""></td>
+<?php } ?>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("queue name:")?><span><?php echo _("Give this queue a brief name to help you identify it.")?></span></a></td>
+ <td><input type="text" name="name" value="<?php echo (isset($name) ? $name : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("queue password:")?><span><?php echo _("You can require agents to enter a password before they can log in to this queue.<br><br>This setting is optional.")?></span></a></td>
+ <td><input type="text" name="password" value="<?php echo (isset($password) ? $password : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("CID name prefix:")?><span><?php echo _("You can optionally prefix the Caller ID name of callers to the queue. ie: If you prefix with \"Sales:\", a call from John Doe would display as \"Sales:John Doe\" on the extensions that ring.")?></span></a></td>
+ <td><input size="4" type="text" name="prefix" value="<?php echo (isset($prefix) ? $prefix : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td valign="top"><a href="#" class="info"><?php echo _("static agents") ?>:<span><br><?php echo _("Static agents are extensions that are assumed to always be on the queue. Static agents do not need to 'log in' to the queue, and cannot 'log out' of the queue.<br><br>List extensions to ring, one per line.<br><br>You can include an extension on a remote system, or an external number (Outbound Routing must contain a valid route for external numbers).<br><br>You can also list agents defined in agents.conf by preceding the agent number with A, so agent 4002 would be listed as A4002.<br><br>In all cases, you can put a \",\" after the agent followed by a penalty value.") ?><br><br></span></a></td>
+ <td valign="top">
+ <textarea id="members" cols="15" rows="<?php $rows = count($member)+1; echo (($rows < 5) ? 5 : (($rows > 20) ? 20 : $rows) ); ?>" name="members"><?php foreach ($member as $mem) { $premem = ""; if (substr($mem,0,5) == "Agent") {$premem = "A";}; $mem = $premem.rtrim(ltrim(strstr($mem,"/"),"/"),"@from-internal");echo substr($mem,0,(strpos($mem,"@")!==false?strpos($mem,"@"):strpos($mem,","))).substr($mem,strrpos($mem, ","))."\n"; }?></textarea><br>
+ <input type="submit" style="font-size:10px;" value="<?php echo _("Clean & Remove duplicates") ?>" />
+ </td>
+ </tr>
+
+ <tr><td colspan="2"><br><h5><?php echo _("Queue Options")?><hr></h5></td></tr>
+<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Agent Announcement:")?><span><?php echo _("Announcement played to the Agent prior to bridging in the caller <br><br> Example: \"the Following call is from the Sales Queue\" or \"This call is from the Technical Support Queue\".<br><br>To add additional recordings please use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="agentannounce"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($agentannounce) ? $agentannounce : 'None');
+ echo '<option value="None">'._("None").'</option>';
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+
+<?php } else { ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Agent Announcement:")?><span><?php echo _("Announcement played to the Agent prior to bridging in the caller <br><br> Example: \"the Following call is from the Sales Queue\" or \"This call is from the Technical Support Queue\".<br><br>You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td>
+ <td>
+ <?php
+ $default = (isset($agentannounce) ? $agentannounce : '');
+ ?>
+ <input type="hidden" name="agentannounce" value="<?php echo $default; ?>"><?php echo ($default != '' ? $default : 'None'); ?>
+ </td>
+ </tr>
+<?php } ?>
+
+<?php if(function_exists('music_list')) { //only include if music module is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Hold Music Category:")?><span><?php echo _("Music (or Commercial) played to the caller while they wait in line for an available agent.<br><br> This music is defined in the \"On Hold Music\" Menu to the left.")?></span></a></td>
+ <td>
+ <select name="music"/>
+ <?php
+ $tresults = music_list("/var/lib/asterisk/mohmp3");
+ $default = (isset($music) ? $music : 'default');
+ if (isset($tresults)) {
+ foreach ($tresults as $tresult) {
+ $searchvalue="$tresult";
+ echo '<option value="'.$tresult.'" '.($searchvalue == $default ? 'SELECTED' : '').'>'.$tresult;
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Ringing tone instead of MOH:")?><span><?php echo _("Enabling this option make callers hear a ringing tone instead of Music on Hold.<br/>If this option is enabled, settings of the previous drop down are ignored.")?></span></a></td>
+ <td>
+ <input name="rtone" type="checkbox" value="1" <?php echo (isset($rtone) && $rtone == 1 ? 'checked' : ''); ?> />
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("max wait time:")?><span><?php echo _("The maximum number of seconds a caller can wait in a queue before being pulled out. (0 for unlimited).")?></span></a></td>
+ <td>
+ <select name="maxwait"/>
+ <?php
+ $default = (isset($maxwait) ? $maxwait : 0);
+ for ($i=0; $i <= 1200; $i+=30) {
+ if ($i == 0)
+ echo '<option value="">'._("Unlimited").'</option>';
+ else
+ echo '<option value="'.$i.'"'.($i == $maxwait ? ' SELECTED' : '').'>'.queues_timeString($i,true).'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("max callers:")?><span><?php echo _("Maximum number of people waiting in the queue (0 for unlimited)")?></span></a></td>
+ <td>
+ <select name="maxlen"/>
+ <?php
+ $default = (isset($maxlen) ? $maxlen : 0);
+ for ($i=0; $i <= 50; $i++) {
+ echo '<option value="'.$i.'" '.($i == $default ? 'SELECTED' : '').'>'.$i.'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("join empty:")?><span><?php echo _("If you wish to allow callers to join queues that currently have no agents, set this to yes")?></span></a></td>
+ <td>
+ <select name="joinempty"/>
+ <?php
+ $default = (isset($joinempty) ? $joinempty : 'yes');
+ $items = array('yes'=>_("Yes"),'no'=>_("No"));
+ foreach ($items as $item) {
+ echo '<option value="'.$item.'" '. ($default == $item ? 'SELECTED' : '').'>'.$item;
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("leave when empty:")?><span><?php echo _("If you wish to remove callers from the queue if there are no agents present, set this to yes")?></span></a></td>
+ <td>
+ <select name="leavewhenempty"/>
+ <?php
+ $default = (isset($leavewhenempty) ? $leavewhenempty : 'no');
+ $items = array('yes'=>_("Yes"),'no'=>_("No"));
+ foreach ($items as $item=>$val) {
+ echo '<option value="'.$item.'" '. ($default == $item ? 'SELECTED' : '').'>'.$val;
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <a href="#" class="info"><?php echo _("ring strategy:")?>
+ <span>
+ <b><?php echo _("ringall")?></b>: <?php echo _("ring all available agents until one answers (default)")?><br>
+ <b><?php echo _("roundrobin")?></b>: <?php echo _("take turns ringing each available agent")?><br>
+ <b><?php echo _("leastrecent")?></b>: <?php echo _("ring agent which was least recently called by this queue")?><br>
+ <b><?php echo _("fewestcalls")?></b>: <?php echo _("ring the agent with fewest completed calls from this queue")?><br>
+ <b><?php echo _("random")?></b>: <?php echo _("ring random agent")?><br>
+ <b><?php echo _("rrmemory")?></b>: <?php echo _("round robin with memory, remember where we left off last ring pass")?><br>
+ </span>
+ </a>
+ </td>
+ <td>
+ <select name="strategy"/>
+ <?php
+ $default = (isset($strategy) ? $strategy : 'ringall');
+ $items = array('ringall','roundrobin','leastrecent','fewestcalls','random','rrmemory');
+ foreach ($items as $item) {
+ echo '<option value="'.$item.'" '.($default == $item ? 'SELECTED' : '').'>'._($item);
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("agent timeout:")?><span><?php echo _("The number of seconds an agents phone can ring before we consider it a timeout.")?></span></a></td>
+ <td>
+ <select name="timeout"/>
+ <?php
+ $default = (isset($timeout) ? $timeout : 15);
+ for ($i=0; $i <= 60; $i++) {
+ echo '<option value="'.$i.'" '.($i == $default ? 'SELECTED' : '').'>'.queues_timeString($i,true).'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("retry:")?><span><?php echo _("The number of seconds we wait before trying all the phones again")?></span></a></td>
+ <td>
+ <select name="retry"/>
+ <?php
+ $default = (isset($retry) ? $retry : 5);
+ for ($i=0; $i <= 20; $i++) {
+ echo '<option value="'.$i.'" '.($i == $default ? 'SELECTED' : '').'>'.queues_timeString($i,true).'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("wrap-up-time:")?><span><?php echo _("After a successful call, how many seconds to wait before sending a potentially free agent another call (default is 0, or no delay)")?></span></a></td>
+ <td>
+ <select name="wrapuptime"/>
+ <?php
+ $default = (isset($wrapuptime) ? $wrapuptime : 0);
+ for ($i=0; $i <= 60; $i++) {
+ echo '<option value="'.$i.'" '.($i == $default ? 'SELECTED' : '').'>'.queues_timeString($i,true).'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("call recording:")?><span><?php echo _("Incoming calls to agents can be recorded. (saved to /var/spool/asterisk/monitor)")?></span></a></td>
+ <td>
+ <select name="monitor-format"/>
+ <?php
+ $default = (empty($thisQ['monitor-format']) ? "no" : $thisQ['monitor-format']);
+ echo '<option value="wav49" '.($default == "wav49" ? 'SELECTED' : '').'>'._("wav49").'</option>';
+ echo '<option value="wav" '.($default == "wav" ? 'SELECTED' : '').'>'._("wav").'</option>';
+ echo '<option value="gsm" '.($default == "gsm" ? 'SELECTED' : '').'>'._("gsm").'</option>';
+ echo '<option value="" '.($default == "no" ? 'SELECTED' : '').'>'._("No").'</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("event when called:")?><span><?php echo _("When this option is set to YES, the following manager events will be generated: AgentCalled, AgentDump, AgentConnect and AgentComplete.")?></span></a></td>
+ <td>
+ <select name="eventwhencalled"/>
+ <?php
+ $default = (isset($eventwhencalled) ? $eventwhencalled : 'no');
+ $items = array('yes'=>_("Yes"),'no'=>_("No"));
+ foreach ($items as $item=>$val) {
+ echo '<option value="'.$item.'" '. ($default == $item ? 'SELECTED' : '').'>'.$val;
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("member status:")?><span><?php echo _("When if this is option is set to YES, the following manager event will be generated: QueueMemberStatus")?></span></a></td>
+ <td>
+ <select name="eventmemberstatus"/>
+ <?php
+ $default = (isset($eventmemberstatus) ? $eventmemberstatus : 'no');
+ $items = array('yes'=>_("Yes"),'no'=>_("No"));
+ foreach ($items as $item=>$val) {
+ echo '<option value="'.$item.'" '. ($default == $item ? 'SELECTED' : '').'>'.$val;
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr><td colspan="2"><br><h5><?php echo _("Caller Announcements")?><hr></h5></td></tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Frequency:")?><span><?php echo _("How often to announce queue position, estimated holdtime, and/or voice menu to the caller (0 to Disable Announcements).")?></span></a></td>
+ <td>
+ <select name="announcefreq"/>
+ <?php
+ $default = (isset($thisQ['announce-frequency']) ? $thisQ['announce-frequency'] : 0);
+ for ($i=0; $i <= 1200; $i+=15) {
+ echo '<option value="'.$i.'" '.($i == $default ? 'SELECTED' : '').'>'.queues_timeString($i,true).'</option>';
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Announce Position:")?><span><?php echo _("Announce position of caller in the queue?")?></span></a></td>
+ <td>
+ <select name="announceposition"/>
+ <?php //setting to "no" will override sounds queue-youarenext, queue-thereare, queue-callswaitingÊ
+ $default = (isset($thisQ['announce-position']) ? $thisQ['announce-position'] : "no");
+ echo '<option value=yes '.($default == "yes" ? 'SELECTED' : '').'>'._("Yes").'</option>';
+ echo '<option value=no '.($default == "no" ? 'SELECTED' : '').'>'._("No").'</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Announce Hold Time:")?><span><?php echo _("Should we include estimated hold time in position announcements? Either yes, no, or only once; hold time will not be announced if <1 minute")?> </span></a></td>
+ <td>
+ <select name="announceholdtime">
+ <?php
+ $default = (isset($thisQ['announce-holdtime']) ? $thisQ['announce-holdtime'] : "no");
+ echo '<option value=yes '.($default == "yes" ? 'SELECTED' : '').'>'._("Yes").'</option>';
+ echo '<option value=no '.($default == "no" ? 'SELECTED' : '').'>'._("No").'</option>';
+ echo '<option value=once '.($default == "once" ? 'SELECTED' : '').'>'._("Once").'</option>';
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php if(function_exists('ivr_list')) { //only include if IVR module is enabled ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Voice Menu:")?><span> <?php echo _("After announcing Position and/or Hold Time, you can optionally present an existing Digital Receptionist Voice Menu.<br><br>This voicemenu must only contain single-digit 'dialed options'.")?> </span></a></td>
+ <td>
+ <select name="announcemenu">
+ <?php // setting this will override the sound file queue-thankyou, and set the context= option
+ $default = (isset($announcemenu) ? $announcemenu : "none");
+
+ echo '<option value=none '.($default == "none" ? 'SELECTED' : '').'>'._("None").'</option>';
+
+ //query for exisiting aa_N contexts
+ $unique_aas = ivr_list();
+
+ if (isset($unique_aas)) {
+ foreach ($unique_aas as $unique_aa) {
+ $menu_id = $unique_aa['ivr_id'];
+ $menu_name = $unique_aa['displayname'];
+ echo '<option value="'.$menu_id.'" '.(strpos($default,$menu_id) === false ? '' : 'SELECTED').'>'.($menu_name ? $menu_name : _("Menu ID ").$menu_id);
+ }
+ }
+
+ ?>
+ </select>
+ </td>
+ </tr>
+
+<?php } else {
+ echo "<input type=\"hidden\" name=\"announcemenu\" value=\"none\">";
+}
+
+if(function_exists('recordings_list')) { //only include if recordings is enabled ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Join Announcement:")?><span><?php echo _("Announcement played to callers once prior to joining the queue.<br><br>To add additional recordings please use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="joinannounce"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($joinannounce) ? $joinannounce : 'None');
+ echo '<option value="None">'._("None");
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'" '.($tresult[2] == $default ? 'SELECTED' : '').'>'.$tresult[1]."</option>\n";;
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } else { ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Join Announcement:")?><span><?php echo _("Announcement played to callers once prior to joining the queue.<br><br>You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td>
+ <td>
+ <?php
+ $default = (isset($joinannounce) ? $joinannounce : '');
+ ?>
+ <input type="hidden" name="joinannounce" value="<?php echo $default; ?>"><?php echo ($default != '' ? $default : 'None'); ?>
+ </td>
+ </tr>
+<?php } ?>
+ <tr><td colspan="2"><br><h5><?php echo _("Fail Over Destination")?><hr></h5></td></tr>
+
+ <?php
+ //get goto for this group - note priority 6
+ // ***FIXME*** If you change this to use it's own DB, fix IVR upgrades, it manually updates
+ // pri6 in extensions/ext-queues.
+ $goto = legacy_args_get($extdisplay,6,'ext-queues');
+ echo drawselects($goto,0);
+
+ ?>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="button" value="<?php echo _("Submit Changes")?>" onclick="checkQ(editQ);"></h6></td>
+ </tr>
+ </table>
+
+<script language="javascript">
+<!--
+
+function checkQ(theForm) {
+ $queuename = theForm.name.value;
+ var bad = "false";
+
+ var whichitem = 0;
+ while (whichitem < theForm.goto0.length) {
+ if (theForm.goto0[whichitem].checked) {
+ theForm.goto0.value=theForm.goto0[whichitem].value;
+ }
+ whichitem++;
+ }
+
+ var gotoType = theForm.elements[ "goto0" ].value;
+ if (gotoType == 'custom') {
+ var gotoVal = theForm.elements[ "custom0"].value;
+ if (gotoVal.indexOf('custom') == -1) {
+ bad = "true";
+ <?php echo "alert('"._("Custom Goto contexts must contain the string \"custom\". ie: custom-app,s,1")."')"?>;
+ }
+ }
+
+ $account = theForm.account.value;
+ if ($account == "") {
+ <?php echo "alert('"._("Queue Number must not be blank")."')"?>;
+ bad="true";
+ }
+ else if ($account == "0") {
+ <?php echo "alert('"._("Queue Number can not be 0")."')"?>;
+ bad="true";
+ }
+ else if (($account.indexOf('0') == 0) && ($account.length > 1)) {
+ <?php echo "alert('"._("Queue numbers with more than one digit cannot begin with 0")."')"?>;
+ bad="true";
+ }
+
+ if ($queuename == "") {
+ <?php echo "alert('"._("Queue name must not be blank")."')"?>;
+ bad="true";
+ } else if (!$queuename.match('^[a-zA-Z][a-zA-Z0-9]+$')) {
+ <?php echo "alert('"._("Queue name cannot start with a number, and can only contain letters and numbers")."')"?>;
+ bad="true";
+ }
+
+ if (bad == "false") {
+ theForm.submit();
+ }
+}
+
+//-->
+</script>
+
+ </form>
+<?php
+} //end if action == delGRP
+?>
+
+
+
+
+
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+freepbx-module-recordings (2.2-3.3.1-2) unstable; urgency=low
+
+ * Fix SQLite3 support. Fixes upstream
+ http://freepbx.org/trac/ticket/1794
+ * Added a patch which modifies the system recordings path to suit the
+ Debian FSH
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 18 Feb 2007 14:30:02 +0200
+
+freepbx-module-recordings (2.2-3.3.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:33 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-recordings
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-recordings
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Recordings
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:33 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/recordings/
+*.sql usr/share/freepbx/modules/recordings/
+*.sqlite usr/share/freepbx/modules/recordings/
+*.html usr/share/freepbx/modules/recordings/
+*.xml usr/share/freepbx/modules/recordings/
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+fix-sysrecordings-debian
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,48 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-sysrecordings-debian.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: The system recordings path is /usr/share on debian based systems
+
+ at DPATCH@
+diff -urNad freepbx-module-recordings~/page.recordings.php freepbx-module-recordings/page.recordings.php
+--- freepbx-module-recordings~/page.recordings.php 2007-01-22 06:28:04.000000000 +0200
++++ freepbx-module-recordings/page.recordings.php 2007-02-18 15:25:11.000000000 +0200
+@@ -47,8 +47,11 @@
+ recording_sysfiles();
+ break;
+ case "newsysrec":
+- $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+- $astsnd .= "/sounds/";
++ // debian uses another directory for this
++ //$astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
++ //$astsnd .= "/sounds/";
++ $astsnd = "/usr/share/asterisk/sounds/";
++
+ $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1);
+ if (recordings_add($sysrecs[$sysrec], $sysrecs[$sysrec])) {
+ $id = recordings_get_id($sysrecs[$sysrec]);
+@@ -310,8 +313,9 @@
+ }
+
+ function recording_sysfiles() {
+- $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+- $astsnd .= "/sounds/";
++// in debian, the sounds dir is in /usr/share/ and cannot be configured
++// $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
++ $astsnd = "/usr/share/asterisk/sounds/";
+ $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1);
+ ?>
+ <div class="content">
+@@ -337,8 +341,10 @@
+
+ function recordings_display_sndfile($item, $count, $max) {
+ // Note that when using this, it needs a <table> definition around it.
+- $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+- $astsnd .= "/sounds/";
++ // $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
++// in debian, the sounds dir is in /usr/share/ and cannot be configured
++ $astsnd = "/usr/share/asterisk/sounds/";
++
+ $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1);
+ print "<tr><td><select name='sysrec$count'>\n";
+ echo '<option value=""'.($item == '' ? ' SELECTED' : '')."></option>\n";
Property changes on: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/fix-sysrecordings-debian.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,73 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: Fix SQLite3 support. Fixes upstream http://freepbx.org/trac/ticket/1794
+
+ at DPATCH@
+diff -urNad freepbx-module-recordings~/functions.inc.php freepbx-module-recordings/functions.inc.php
+--- freepbx-module-recordings~/functions.inc.php 2007-01-21 07:59:11.000000000 +0200
++++ freepbx-module-recordings/functions.inc.php 2007-02-18 15:42:09.000000000 +0200
+@@ -114,7 +114,8 @@
+ } else {
+ $fname = $filename;
+ }
+- sql("INSERT INTO recordings values ('', '$displayname', '$fname', 'No long description available')");
++ sql("INSERT INTO recordings (displayname, filename, description) VALUES ( '$displayname', '$fname', 'No long description available')");
++
+ return true;
+
+ }
+diff -urNad freepbx-module-recordings~/install.php freepbx-module-recordings/install.php
+--- freepbx-module-recordings~/install.php 2006-11-09 06:00:57.000000000 +0200
++++ freepbx-module-recordings/install.php 2007-02-18 15:29:31.000000000 +0200
+@@ -5,6 +5,7 @@
+ global $db;
+ $recordings_astsnd_path = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+ $recordings_astsnd_path .= "/sounds/";
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
+
+
+ require_once($amp_conf['AMPWEBROOT'] . '/admin/modules/recordings/functions.inc.php');
+@@ -22,7 +23,12 @@
+ unset($fcc);
+
+ // Make sure table exists
+-$sql = "CREATE TABLE IF NOT EXISTS recordings ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, displayname VARCHAR(50) , filename BLOB, description VARCHAR(254));";
++$sql = "CREATE TABLE IF NOT EXISTS recordings (
++ id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ displayname VARCHAR(50) ,
++ filename BLOB,
++ description VARCHAR(254))
++;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+@@ -42,7 +48,7 @@
+ $sql = "SELECT * FROM recordings where displayname = '__invalid'";
+ $results = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+ if (!isset($results['filename'])) {
+- sql("INSERT INTO recordings values ('', '__invalid', 'install done', '')");
++ sql("INSERT INTO recordings (displayname, filename, description) VALUES ( '__invalid', 'install done', '');" );
+ $dh = opendir($recordings_directory);
+ while (false !== ($file = readdir($dh))) { // http://au3.php.net/readdir
+ if ($file[0] != "." && $file != "CVS" && $file != "svn" && !is_dir("$recordings_directory/$file")) {
+@@ -59,10 +65,14 @@
+
+ // Upgrade to recordings 3.0
+ // Change filename from VARCHAR(80) to BLOB
+-$sql = 'ALTER TABLE recordings CHANGE filename filename BLOB';
+-$result = $db->query($sql);
+-if(DB::IsError($result)) {
+- die($result->getDebugInfo());
++// no need to add this if we are on sqlite, since the initial tables will
++// include the correct columns already.
++if (($amp_conf["AMPDBENGINE"] != "sqlite") && ($amp_conf["AMPDBENGINE"] != "sqlite3"))
++{
++ $sql = 'ALTER TABLE recordings CHANGE filename filename BLOB';
++ $result = $db->query($sql);
++ if(DB::IsError($result)) {
++ die($result->getDebugInfo());
++ }
+ }
+-
+ ?>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install recordings || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall recordings || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall recordings || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-recordings/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,255 @@
+<?php
+
+// Source and Destination Dirctories for recording
+global $recordings_astsnd_path; // PHP5 needs extra convincing of a global
+$recordings_save_path = "/tmp/";
+$recordings_astsnd_path = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+$recordings_astsnd_path .= "/sounds/";
+
+function recordings_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+ global $recordings_save_path;
+
+ $modulename = "recordings";
+ $appcontext = "app-recordings";
+ $contextname = 'ext-recordings';
+
+ switch($engine) {
+ case "asterisk":
+ // FeatureCodes for save / check
+ $fcc = new featurecode($modulename, 'record_save');
+ $fc_save = $fcc->getCodeActive();
+ unset($fcc);
+
+ $fcc = new featurecode($modulename, 'record_check');
+ $fc_check = $fcc->getCodeActive();
+ unset($fcc);
+
+ if ($fc_save != '' || $fc_check != '') {
+ $ext->addInclude('from-internal-additional', 'app-recordings'); // Add the include from from-internal
+
+ if ($fc_save != '') {
+ $ext->add($appcontext, $fc_save, '', new ext_macro('user-callerid'));
+ $ext->add($appcontext, $fc_save, '', new ext_wait('2'));
+ $ext->add($appcontext, $fc_save, '', new ext_macro('systemrecording', 'dorecord'));
+ //$ext->add($appcontext, $fc_save, '', new ext_goto('1', 'dorecord'));
+ }
+
+ if ($fc_check != '') {
+ $ext->add($appcontext, $fc_check, '', new ext_macro('user-callerid'));
+ $ext->add($appcontext, $fc_check, '', new ext_wait('2'));
+ $ext->add($appcontext, $fc_check, '', new ext_macro('systemrecording', 'docheck'));
+ //$ext->add($appcontext, $fc_check, '', new ext_goto('1', 'docheck'));
+ }
+ }
+
+ /* Create a context for recordings as destinations */
+ $recordings = recordings_list();
+ if (is_array($recordings)) {
+ foreach ($recordings as $r) {
+ $ext->add($contextname, 'recording-'.$r[0], '', new ext_answer());
+ $ext->add($contextname, 'recording-'.$r[0], '', new ext_playback($r[2]));
+ $ext->add($contextname, 'recording-'.$r[0], '', new ext_hangup());
+ }
+ }
+ break;
+ }
+}
+
+function recordings_get_id($fn) {
+ global $db;
+
+ $sql = "SELECT id FROM recordings WHERE filename='$fn'";
+ $results = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+ if (isset($results['id'])) {
+ return $results['id'];
+ } else {
+ return null;
+ }
+}
+
+function recordings_get_file($id) {
+ $res = recordings_get($id);
+ return $res['filename'];
+}
+
+
+function recordings_list() {
+ global $db;
+
+ // I'm not clued on how 'Department's' work. There obviously should be
+ // somee checking in here for it.
+
+ $sql = "SELECT * FROM recordings where displayname <> '__invalid' ORDER BY displayname";
+ $results = $db->getAll($sql);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ return $results;
+}
+
+function recordings_get($id) {
+ global $db;
+ $sql = "SELECT * FROM recordings where id='$id'";
+ $results = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+ if(DB::IsError($results)) {
+ $results = null;
+ }
+ return $results;
+}
+
+function recordings_add($displayname, $filename) {
+ global $db;
+ global $recordings_astsnd_path;
+
+ // Check to make sure we can actually read the file if it has an extension (if it doesn't,
+ // it was put here by system recordings, so we know it's there.
+ if (preg_match("/\.(au|g723|g723sf|g726-\d\d|g729|gsm|h263|ilbc|ogg|pcm|[au]law|[au]l|mu|sln|raw|vox|WAV|wav|wav49)$/", $filename)) {
+ if (!is_readable($recordings_astsnd_path.$filename)) {
+ print "<p>Unable to add ".$recordings_astsnd_path.$filename." - Can not read file!</p>";
+ return false;
+ }
+ $fname = preg_replace("/\.(au|g723|g723sf|g726-\d\d|g729|gsm|h263|ilbc|ogg|pcm|[au]law|[au]l|mu|sln|raw|vox|WAV|wav|wav49)$/", "", $filename);
+
+ } else {
+ $fname = $filename;
+ }
+ sql("INSERT INTO recordings values ('', '$displayname', '$fname', 'No long description available')");
+ return true;
+
+}
+
+function recordings_update($id, $rname, $descr, $_REQUEST) {
+
+ // Update the descriptive fields
+ $results = sql("UPDATE recordings SET displayname = \"$rname\", description = \"$descr\" WHERE id = \"$id\"");
+
+ // Build the file list from _REQUEST
+ $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+ $astsnd .= "/sounds/";
+ $recordings = Array();
+
+ // Set the file names from the submitted page, sysrec[N]
+ foreach ($_REQUEST as $key => $val) {
+ $res = strpos($key, 'sysrec');
+ if ($res !== false) {
+ // strip out any relative paths, since this is coming from a URL
+ str_replace('..','',$val);
+
+ $recordings[substr($key,6)]=$val;
+ }
+ }
+
+ // Stick the filename in the database
+ recordings_set_file($id, implode('&', $recordings));
+
+ // In _REQUEST there are also various actions (possibly)
+ // up[N] - Move file id N up one place
+ // down[N] - Move fid N down one place
+ // del[N] - Delete fid N
+
+ foreach ($_REQUEST as $key => $val) {
+ $up = strpos($key, "up");
+ $down = strpos($key, "down");
+ $del = strpos($key, "del");
+ if ( $up !== false ) {
+ $up = substr($key, 2);
+ recordings_move_file_up($id, $up);
+ }
+ if ($del !== false ) {
+ $del = substr($key,3);
+ recordings_delete_file($id, $del);
+ }
+ if ($down !== false ) {
+ $down = substr($key,4);
+ recordings_move_file_down($id, $down);
+ }
+ }
+}
+
+function recordings_move_file_up($id, $src) {
+ $files = recordings_get_file($id);
+ if ($src === 0 || $src < 0) { return false; } // Should never happen, up shouldn't appear whten fid=0
+ $tmparr = explode('&', $files);
+ $tmp = $tmparr[$src-1];
+ $tmparr[$src-1] = $tmparr[$src];
+ $tmparr[$src] = $tmp;
+ recordings_set_file($id, implode('&', $tmparr));
+}
+function recordings_move_file_down($id, $src) {
+ $files = recordings_get_file($id);
+ $tmparr = explode('&', $files);
+ $tmp = $tmparr[$src+1];
+ $tmparr[$src+1] = $tmparr[$src];
+ $tmparr[$src] = $tmp;
+ recordings_set_file($id, implode('&', $tmparr));
+}
+function recordings_delete_file($id, $src) {
+ $files = recordings_get_file($id);
+ $tmparr = explode('&', $files);
+ $tmp = Array();
+ $counter = 0;
+ foreach ($tmparr as $file) {
+ if ($counter != $src) { $tmp[] = $file; }
+ $counter++;
+ }
+ recordings_set_file($id, implode('&', $tmp));
+}
+
+
+function recordings_del($id) {
+ $results = sql("DELETE FROM recordings WHERE id = \"$id\"");
+}
+
+function recordings_set_file($id, $filename) {
+ // Strip off any dangling &'s on the end:
+ $filename = rtrim($filename, '&');
+ $results = sql("UPDATE recordings SET filename = \"$filename\" WHERE id = \"$id\"");
+}
+
+
+
+function recordings_readdir($snddir) {
+ $files = recordings_getdir($snddir);
+ $ptr = 0;
+ foreach ($files as $fnam) {
+ $files[$ptr] = substr($fnam, strlen($snddir)+1);
+ $ptr++;
+ }
+ // Strip off every possible file extension
+ $flist = preg_replace("/\.(au|g723|g723sf|g726-\d\d|g729|gsm|h263|ilbc|ogg|pcm|[au]law|[au]l|mu|sln|raw|vox|WAV|wav|wav49)$/", "", $files);
+ sort($flist);
+ return array_unique($flist);
+}
+
+function recordings_getdir($snddir) {
+ $dir = opendir($snddir);
+ $files = Array();
+ while ($fn = readdir($dir)) {
+ if ($fn == '.' || $fn == '..') { continue; }
+ if (is_dir($snddir.'/'.$fn)) {
+ $files = array_merge(recordings_getdir($snddir.'/'.$fn), $files);
+ continue;
+ }
+ $files[] = $snddir.'/'.$fn;
+ }
+ return $files;
+}
+
+
+
+
+// returns a associative arrays with keys 'destination' and 'description'
+// it allows system recording to be chosen as destinations
+function recordings_destinations() {
+ $recordings = recordings_list();
+ if (is_array($recordings)) {
+ foreach ($recordings as $r) {
+ $extens[] = array('destination' => 'ext-recordings,recording-'.$r[0].',1', 'description' => $r[1]);
+ }
+ }
+
+ return $extens;
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES/recordings.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES/recordings.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES/recordings.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES/recordings.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/i18n/he_IL/LC_MESSAGES/recordings.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,142 @@
+# Hebrew version for Recordings FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.recordings.php:65
+msgid "Failed to create"
+msgstr "×ש××× ××צ×רת"
+
+#: page.recordings.php:76 page.recordings.php:107
+msgid "System Recording"
+msgstr "×ק×××ת ×ער×ת"
+
+#: page.recordings.php:76
+msgid "Saved"
+msgstr "× ×©×ר"
+
+#: page.recordings.php:95
+msgid "Unable to locate"
+msgstr "×× ×צ××× ××תר"
+
+#: page.recordings.php:95
+msgid "with a a valid suffix"
+msgstr "×¢× ×¡×××ת ×ª×§× ×ת"
+
+#: page.recordings.php:107
+msgid "Updated"
+msgstr "×¢××××"
+
+#: page.recordings.php:129 page.recordings.php:199 page.recordings.php:311
+msgid "System Recordings"
+msgstr "×ק×××ת ×ער×ת"
+
+#: page.recordings.php:130 page.recordings.php:253
+msgid "Add Recording"
+msgstr "××ספת ×ק×××"
+
+#: page.recordings.php:131
+msgid "Step 1: Record or upload"
+msgstr "ש×× 1: ×ק×× ×× ××¢××"
+
+#: page.recordings.php:133
+msgid "Using your phone,"
+msgstr "×××צע×ת ×××פ×× ×©××,"
+
+#: page.recordings.php:133 page.recordings.php:175
+msgid "dial"
+msgstr "××××"
+
+#: page.recordings.php:134
+msgid "Start speaking at the tone. Hangup when finished."
+msgstr "×ת×× ×××ר ×××¨× ×צ×××. × ×ª×§ ×שס×××ת."
+
+#: page.recordings.php:135
+msgid "and speak the message you wish to record."
+msgstr "××××ר ×ת ×××××¢× ×©×רצ×× × ××ק×××."
+
+#: page.recordings.php:140
+msgid ""
+"If you wish to make and verify recordings from your phone, please enter your "
+"extension number here:"
+msgstr "×× ×רצ×× × ××××× ×ק××× ×©× ×¢×©×ª× ××××פ×× ×©××, ×× × ××× ×¡ ×ת ×ספר ×ש×××× ×©×× ×××:"
+
+#: page.recordings.php:147
+msgid ".wav format"
+msgstr "פ×ר×× wav"
+
+#: page.recordings.php:147
+msgid "The .wav file _must_ be 16 bit PCM Encoded at a sample rate of 8000Hz"
+msgstr "ק×××¥ ×-wav _××××_ ××××ת ×ק××× ×פ×ר×× 16 ××× ××§×¦× ××××× ×©× 8000 ×רץ."
+
+#: page.recordings.php:165
+msgid "Successfully uploaded"
+msgstr "×××¢×× ××צ×××"
+
+#: page.recordings.php:174
+msgid "Step 2: Verify"
+msgstr "ש×× 2: ×××"
+
+#: page.recordings.php:175
+msgid "After recording or uploading,"
+msgstr "×××¨× ×ק××× ×× ××¢×××,"
+
+#: page.recordings.php:175
+msgid "to listen to your recording."
+msgstr "××× ×××××× ××ק××ת×."
+
+#: page.recordings.php:176
+msgid "If you wish to re-record your message, dial"
+msgstr "×× ×רצ×× × ××ק××× ×××ש ×ת ×××עת×, ××××"
+
+#: page.recordings.php:177
+msgid "Step 3: Name"
+msgstr "ש×× 3: ש×"
+
+#: page.recordings.php:179
+msgid "Step 2: Name"
+msgstr "ש×× 2: ש×"
+
+#: page.recordings.php:183
+msgid "Name this Recording"
+msgstr "×ª× ×©× ××ק××× ××"
+
+#: page.recordings.php:188
+msgid "Click \"SAVE\" when you are satisfied with your recording"
+msgstr "×××¥ ×¢× \"ש××ר\" ××שר ××ª× ×ר××¦× ××ק××ת×"
+
+#: page.recordings.php:200
+msgid "Edit Recording"
+msgstr "ער×× ×ק×××"
+
+#: page.recordings.php:254 page.recordings.php:312
+msgid "Built-in Recordings"
+msgstr "×ק×××ת ×××× ×ת"
+
+#: page.recordings.php:313
+msgid "Select System Recording:"
+msgstr "××ר ×ק××ת ×ער×ת:"
+
+#: page.recordings.php:349
+msgid "Move Up"
+msgstr "××× ×××¢××"
+
+#: page.recordings.php:354
+msgid "Move Down"
+msgstr "××× ××××"
+
+#: page.recordings.php:356
+msgid "Delete"
+msgstr "××ק"
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,68 @@
+<?php
+
+global $amp_conf;
+global $asterisk_conf;
+global $db;
+$recordings_astsnd_path = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+$recordings_astsnd_path .= "/sounds/";
+
+
+require_once($amp_conf['AMPWEBROOT'] . '/admin/modules/recordings/functions.inc.php');
+
+$fcc = new featurecode('recordings', 'record_save');
+$fcc->setDescription('Save Recording');
+$fcc->setDefault('*77');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('recordings', 'record_check');
+$fcc->setDescription('Check Recording');
+$fcc->setDefault('*99');
+$fcc->update();
+unset($fcc);
+
+// Make sure table exists
+$sql = "CREATE TABLE IF NOT EXISTS recordings ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, displayname VARCHAR(50) , filename BLOB, description VARCHAR(254));";
+$result = $db->query($sql);
+if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+}
+
+// load up any recordings that might be in the directory
+$recordings_directory = $recordings_astsnd_path."custom/";
+
+if (!file_exists($recordings_directory)) {
+ mkdir ($recordings_directory);
+}
+if (!is_writable($recordings_directory)) {
+ print "<h2>Error</h2><br />I can not access the directory $recordings_directory. ";
+ print "Please make sure that it exists, and is writable by the web server.";
+ die;
+}
+$sql = "SELECT * FROM recordings where displayname = '__invalid'";
+$results = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if (!isset($results['filename'])) {
+ sql("INSERT INTO recordings values ('', '__invalid', 'install done', '')");
+ $dh = opendir($recordings_directory);
+ while (false !== ($file = readdir($dh))) { // http://au3.php.net/readdir
+ if ($file[0] != "." && $file != "CVS" && $file != "svn" && !is_dir("$recordings_directory/$file")) {
+ // Ignore the suffix..
+ $fname = ereg_replace('.wav', '', $file);
+ $fname = ereg_replace('.gsm', '', $fname);
+ if (recordings_get_id("custom/$fname") == null)
+ recordings_add($fname, "custom/$file");
+ }
+ }
+}
+
+global $db;
+
+// Upgrade to recordings 3.0
+// Change filename from VARCHAR(80) to BLOB
+$sql = 'ALTER TABLE recordings CHANGE filename filename BLOB';
+$result = $db->query($sql);
+if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,22 @@
+<module>
+ <rawname>recordings</rawname>
+ <name>Recordings</name>
+ <version>3.3.1</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Creates and manages system recordings, used by many other modules (eg, IVR).</description>
+ <changelog>
+ *3.3.1* Fix error where *77/*79 wasn't working.
+ *3.3* Stop assuming that files being uploaded are .wav's, also highlight the correct format for files to be uploaded in.
+ *3.2.4* Add he_IL translation
+ *3.2.3* Fix for possible wrong recording being selected
+ *3.2.2* Fix for PHP5 not picking up ast recording path
+ *3.2.1* Resolved issue with wrong recording being selected when there's more than one encoding of file (eg, foo.wav and foo.gsm)
+ *3.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog>
+ <menuitems>
+ <recordings>System Recordings</recordings>
+ </menuitems>
+ <location>release/2.2/recordings-3.3.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-SysRec</info>
+ <md5sum>36b2f983adce45b00da66b3b345f0b90</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/page.recordings.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/page.recordings.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/page.recordings.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,363 @@
+<?php
+/* $Id: page.recordings.php 3606 2007-01-22 04:28:02Z qldrob $ */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//Re-written by Rob Thomas <xrobau at gmail.com> 20060318.
+//
+//This program 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.
+//
+//This program 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.
+
+$action = isset($_REQUEST['action'])?$_REQUEST['action']:'';
+$id = isset($_REQUEST['id'])?$_REQUEST['id']:'';
+$notes = isset($_REQUEST['notes'])?$_REQUEST['notes']:'';
+$rname = isset($_REQUEST['rname'])?$_REQUEST['rname']:'';
+$usersnum = isset($_REQUEST['usersnum'])?$_REQUEST['usersnum']:'';
+$sysrec = isset($_REQUEST['sysrec'])?$_REQUEST['sysrec']:'';
+$suffix = isset($_REQUEST['suffix'])?$_REQUEST['suffix']:'wav';
+if (empty($usersnum)) {
+ $dest = "unnumbered-";
+} else {
+ $dest = "{$usersnum}-";
+}
+
+if (empty($suffix)) { // Ensure that suffix is set to something reasonable
+ $suffix = "wav";
+}
+// get feature codes for diplay purposes
+$fcc = new featurecode('recordings', 'record_save');
+$fc_save = $fcc->getCodeActive();
+unset($fcc);
+$fcc = new featurecode('recordings', 'record_check');
+$fc_check = $fcc->getCodeActive();
+unset($fcc);
+$fc_save = ($fc_save != '' ? $fc_save : _('** MISSING FEATURE CODE **'));
+$fc_check = ($fc_check != '' ? $fc_check : _('** MISSING FEATURE CODE **'));
+
+switch ($action) {
+
+ case "system":
+ recording_sidebar(-1, null);
+ recording_sysfiles();
+ break;
+ case "newsysrec":
+ $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+ $astsnd .= "/sounds/";
+ $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1);
+ if (recordings_add($sysrecs[$sysrec], $sysrecs[$sysrec])) {
+ $id = recordings_get_id($sysrecs[$sysrec]);
+ } else {
+ $id = 0;
+ }
+ recording_sidebar($id, null);
+ recording_editpage($id, null);
+ needreload();
+ break;
+ case "recorded":
+ // Clean up the filename, take out any nasty characters
+ $filename = escapeshellcmd(strtr($rname, '/ ', '__'));
+ if (!file_exists($recordings_astsnd_path."custom")) {
+ if (!mkdir($recordings_astsnd_path."custom", 0775)) {
+ echo '<div class="content"><h5>'._("Failed to create").' '.$recordings_astsnd_path.'custom'.'</h5>';
+ }
+ } else {
+ // can't rename a file from one partition to another, must use mv or cp
+ // rename($recordings_save_path."{$dest}ivrrecording.wav",$recordings_astsnd_path."custom/{$filename}.wav");
+ exec("mv " . $recordings_save_path . "{$dest}ivrrecording.$suffix " . $recordings_astsnd_path."custom/{$filename}.$suffix");
+ $isok = recordings_add($rname, "custom/{$filename}.$suffix");
+
+ recording_sidebar(null, $usersnum);
+ recording_addpage($usersnum);
+ if ($isok)
+ echo '<div class="content"><h5>'._("System Recording").' "'.$rname.'" '._("Saved").'!</h5>';
+ }
+ break;
+
+ case "edit":
+ $arr = recordings_get($id);
+ $filename=$arr['filename'];
+ // Check all possibilities of uploaded file types.
+ $valid = Array("au","g723","g723sf","g729","gsm","h263","ilbc","ogg","pcm","alaw","ulaw","al","ul","mu","sln","raw","vox","WAV","wav","wav49");
+ $fileexists = false;
+ if (strpos($filename, '&') === false) {
+ foreach ($valid as $xtn) {
+ $checkfile = $recordings_astsnd_path.$filename.".".$xtn;
+ if (file_exists($checkfile)) {
+ $suffix = substr(strrchr($filename, "."), 1);
+ copy($checkfile, $recordings_save_path."{$dest}ivrrecording.".$suffix);
+ $fileexists = true;
+ }
+ }
+ if ($fileexists === false) {
+ echo '<div class="content"><h5>'._("Unable to locate").' '.$recordings_astsnd_path.$filename.' '._("with a a valid suffix").'</h5>';
+ }
+ }
+
+ recording_sidebar($id, $usersnum);
+ recording_editpage($id, $usersnum);
+ break;
+
+ case "edited":
+ recordings_update($id, $rname, $notes, $_REQUEST);
+ recording_sidebar($id, $usersnum);
+ recording_editpage($id, $usersnum);
+ echo '<div class="content"><h5>'._("System Recording").' "'.$rname.'" '._("Updated").'!</h5></div>';
+ needreload();
+ break;
+
+ case "delete";
+ recordings_del($id);
+ needreload();
+
+ default:
+ recording_sidebar($id, $usersnum);
+ recording_addpage($usersnum);
+ break;
+
+}
+
+function recording_addpage($usersnum) {
+ global $fc_save;
+ global $fc_check;
+ global $recordings_save_path;
+
+ ?>
+ <div class="content">
+ <h2><?php echo _("System Recordings")?></h2>
+ <h3><?php echo _("Add Recording") ?></h3>
+ <h5><?php echo _("Step 1: Record or upload")?></h5>
+ <p> <?php if (!empty($usersnum)) {
+ echo _("Using your phone,")."<a href=\"#\" class=\"info\">"._("dial")." ".$fc_save." <span>";
+ echo _("Start speaking at the tone. Hangup when finished.")."</span></a>";
+ echo _("and speak the message you wish to record.")."\n";
+ } else { ?>
+ <form name="xtnprompt" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <input type="hidden" name="display" value="recordings">
+ <?php
+ echo _("If you wish to make and verify recordings from your phone, please enter your extension number here:"); ?>
+ <input type="text" size="6" name="usersnum"> <input name="Submit" type="submit" value="<?php echo _("Go"); ?>">
+ </form>
+ <?php } ?>
+ </p>
+ <p>
+ <form enctype="multipart/form-data" name="upload" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST"/>
+ <?php echo _('Alternatively, upload a recording in')?> <?php echo _("any supported asterisk format.")?> <?php echo _("Note that if you're using .wav, (eg, recorded with Microsoft Recorder) the file <b>must</b> be PCM Encoded, 16 Bits, at 8000Hz")?></span></a>:<br>
+ <input type="hidden" name="display" value="recordings">
+ <input type="hidden" name="action" value="recordings_start">
+ <input type="hidden" name="usersnum" value="<?php echo $usersnum ?>">
+ <input type="file" name="ivrfile"/>
+ <input type="button" value="<?php echo _("Upload")?>" onclick="document.upload.submit(upload);alert('<?php echo addslashes(_("Please wait until the page reloads."))?>');"/>
+ </form>
+ <?php
+ if (isset($_FILES['ivrfile']['tmp_name']) && is_uploaded_file($_FILES['ivrfile']['tmp_name'])) {
+ if (empty($usersnum)) {
+ $dest = "unnumbered-";
+ } else {
+ $dest = "{$usersnum}-";
+ }
+ $suffix = substr(strrchr($_FILES['ivrfile']['name'], "."), 1);
+ $destfilename = $recordings_save_path.$dest."ivrrecording.".$suffix;
+ move_uploaded_file($_FILES['ivrfile']['tmp_name'], $destfilename);
+ system("chgrp asterisk ".$destfilename);
+ system("chmod g+rw ".$destfilename);
+ echo "<h6>"._("Successfully uploaded")." ".$_FILES['ivrfile']['name']."</h6>";
+ $rname = rtrim(basename($_FILES['ivrfile']['name'], $suffix), '.');
+ } ?>
+ </p>
+ <form name="prompt" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return rec_onsubmit();">
+ <input type="hidden" name="action" value="recorded">
+ <input type="hidden" name="display" value="recordings">
+ <input type="hidden" name="usersnum" value="<?php echo $usersnum ?>">
+ <?php
+ if (!empty($usersnum)) { ?>
+ <h5><?php echo _("Step 2: Verify")?></h5>
+ <p> <?php echo _("After recording or uploading,")." <em>"._("dial")." ".$fc_check."</em> "._("to listen to your recording.")?> </p>
+ <p> <?php echo _("If you wish to re-record your message, dial")." ".$fc_save; ?></p>
+ <h5><?php echo _("Step 3: Name")?> </h5> <?php
+ } else {
+ echo "<h5>"._("Step 2: Name")."</h5>";
+ } ?>
+ <table style="text-align:right;">
+ <tr valign="top">
+ <td valign="top"><?php echo _("Name this Recording")?>: </td>
+ <td style="text-align:left"><input type="text" name="rname" value="<?php echo $rname; ?>"></td>
+ </tr>
+ </table>
+
+ <h6><?php
+ echo _("Click \"SAVE\" when you are satisfied with your recording");
+ echo "<input type=\"hidden\" name=\"suffix\" value=\"$suffix\">\n"; ?>
+ <input name="Submit" type="submit" value="<?php echo _("Save")?>"></h6>
+ <?php recordings_form_jscript(); ?>
+ </form>
+ </div>
+<?php
+}
+
+function recording_editpage($id, $num) { ?>
+
+ <div class="content">
+ <h2><?php echo _("System Recordings")?></h2>
+ <h3><?php echo _("Edit Recording") ?></h3>
+ <?php
+ $this_recording = recordings_get($id);
+ if (!$this_recording) {
+ echo "<tr><td colspan=2><h2>Error reading Recording ID $id - Aborting</h2></td></tr></table>";
+ return;
+ }?>
+ <?php
+ echo "<a href=config.php?display=recordings&action=delete&usersnum=".urlencode($num);
+ echo "&id=$id>Remove Recording</a> <i style='font-size: x-small'>(Note, does not delete file from computer)</i>";
+ ?>
+ <form name="prompt" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return rec_onsubmit();">
+ <input type="hidden" name="action" value="edited">
+ <input type="hidden" name="display" value="recordings">
+ <input type="hidden" name="usersnum" value="<?php echo $num ?>">
+ <input type="hidden" name="id" value="<?php echo $id ?>">
+ <table>
+ <tr><td colspan=2><hr></td></tr>
+ <tr>
+ <td><a href="#" class="info">Change Name<span>This changes the short name, visible on the right, of this recording</span></a></td>
+ <td><input type="text" name="rname" value="<?php echo $this_recording['displayname'] ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info">Descriptive Name<span>This is displayed, as a hint, when selecting this recording in Queues, Digital Receptionist, etc</span></a></td>
+ <td> <textarea name="notes" rows="3" cols="40"><?php echo $this_recording['description'] ?></textarea></td>
+ </tr>
+ </table>
+ <hr />
+ Files:<br />
+ <table>
+ <?php
+ $rec = recordings_get($id);
+ $fn = $rec['filename'];
+ $files = explode('&', $fn);
+ $counter = 0;
+ $arraymax = count($files)-1;
+ foreach ($files as $item) {
+ recordings_display_sndfile($item, $counter, $arraymax);
+ $counter++;
+ }
+ recordings_display_sndfile('', $counter, $arraymax);
+ ?>
+ </table>
+ <input name="Submit" type="submit" value="<?php echo _("Save")?>"></h6>
+ <?php recordings_form_jscript(); ?>
+ </form>
+ </div>
+<?php
+}
+
+function recording_sidebar($id, $num) {
+?>
+ <div class="rnav"><ul>
+ <li><a id="<?php echo empty($id)?'current':'nul' ?>" href="config.php?display=recordings&usersnum=<?php echo urlencode($num) ?>"><?php echo _("Add Recording")?></a></li>
+ <li><a id="<?php echo ($id===-1)?'current':'nul' ?>" href="config.php?display=recordings&action=system"><?php echo _("Built-in Recordings")?></a></li>
+<?php
+ $wrapat = 18;
+ $tresults = recordings_list();
+ if (isset($tresults)){
+ foreach ($tresults as $tresult) {
+ echo "<li>";
+ echo "<a id=\"".($id==$tresult[0] ? 'current':'nul')."\" href=\"config.php?display=recordings&";
+ echo "action=edit&";
+ echo "usersnum=".urlencode($num)."&";
+// echo "filename=".urlencode($tresult[2])."&";
+ echo "id={$tresult[0]}\">";
+ $dispname = $tresult[1];
+ while (strlen($dispname) > (1+$wrapat)) {
+ $part = substr($dispname, 0, $wrapat);
+ echo htmlspecialchars($part);
+ $dispname = substr($dispname, $wrapat);
+ if ($dispname != '')
+ echo "<br>";
+ }
+ echo htmlspecialchars($dispname);
+ echo "</a>";
+ echo "</li>\n";
+ }
+ }
+ echo "</ul></div>\n";
+}
+
+function recordings_form_jscript() {
+?>
+ <script language="javascript">
+ <!--
+
+ var theForm = document.prompt;
+
+ function rec_onsubmit() {
+ var msgInvalidFilename = "<?php echo _("Please enter a valid Name for this System Recording"); ?>";
+
+ defaultEmptyOK = false;
+ if (!isFilename(theForm.rname.value))
+ return warnInvalid(theForm.rname, msgInvalidFilename);
+
+ return true;
+ }
+
+ //-->
+ </script>
+
+<?php
+}
+
+function recording_sysfiles() {
+ $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+ $astsnd .= "/sounds/";
+ $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1);
+?>
+ <div class="content">
+ <h2><?php echo _("System Recordings")?></h2>
+ <h3><?php echo _("Built-in Recordings") ?></h3>
+ <h5><?php echo _("Select System Recording:")?></h5>
+ <form name="xtnprompt" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
+ <input type="hidden" name="action" value="newsysrec">
+ <input type="hidden" name="display" value="recordings">
+ <select name="sysrec"/>
+<?php
+ foreach ($sysrecs as $srcount => $sr) {
+ // echo '<option value="'.$vmc.'"'.($vmc == $ivr_details['dircontext'] ? ' SELECTED' : '').'>'.$vmc."</option>\n";
+ echo "<option value=\"$srcount\">$sr</option>\n";
+ }
+ ?>
+ </select>
+ <input name="Submit" type="submit" value="<?php echo _("Go"); ?>">
+ <p />
+ </div>
+<?php
+}
+
+function recordings_display_sndfile($item, $count, $max) {
+ // Note that when using this, it needs a <table> definition around it.
+ $astsnd = isset($asterisk_conf['astvarlibdir'])?$asterisk_conf['astvarlibdir']:'/var/lib/asterisk';
+ $astsnd .= "/sounds/";
+ $sysrecs = recordings_readdir($astsnd, strlen($astsnd)+1);
+ print "<tr><td><select name='sysrec$count'>\n";
+ echo '<option value=""'.($item == '' ? ' SELECTED' : '')."></option>\n";
+ foreach ($sysrecs as $sr) {
+ echo '<option value="'.$sr.'"'.($sr == $item ? ' SELECTED' : '').">$sr</option>\n";
+ }
+ print "</select></td>\n";
+ if ($count==0) {
+ print "<td></td>\n";
+ } else {
+ echo '<td><input name="up'.$count.'" type="submit" value="'._("Move Up")."\"></td>\n";
+ }
+ if ($count > $max) {
+ print "<td></td>\n";
+ } else {
+ echo '<td><input name="down'.$count.'" type="submit" value="'._("Move Down")."\"></td>\n";
+ }
+ echo '<td><input name="del'.$count.'" type="submit" value="'._("Delete")."\"></td>\n";
+ print "</tr>\n";
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-recordings/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-recordings/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-recordings/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE IF EXISTS recordings;
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+freepbx-module-ringgroups (2.2-2.2.13-2) unstable; urgency=low
+
+ * Add SQLite3 support. Fixes upstream
+ http://freepbx.org/trac/ticket/1795
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 18 Feb 2007 17:08:56 +0200
+
+freepbx-module-ringgroups (2.2-2.2.13-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:31:39 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-ringgroups
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-ringgroups
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Ring Groups
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:31:39 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/ringgroups/
+*.sql usr/share/freepbx/modules/ringgroups/
+*.sqlite usr/share/freepbx/modules/ringgroups/
+*.html usr/share/freepbx/modules/ringgroups/
+*.xml usr/share/freepbx/modules/ringgroups/
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,12 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: Add SQLite3 support. Fixes upstream http://freepbx.org/trac/ticket/1795
+
+ at DPATCH@
+diff -urNad freepbx-module-ringgroups~/install.sql freepbx-module-ringgroups/install.sql
+--- freepbx-module-ringgroups~/install.sql 2006-11-05 08:35:31.000000000 +0200
++++ freepbx-module-ringgroups/install.sql 2007-02-18 17:08:08.000000000 +0200
+@@ -1 +1 @@
+-CREATE TABLE IF NOT EXISTS `ringgroups` ( `grpnum` BIGINT( 11 ) NOT NULL , `strategy` VARCHAR( 50 ) NOT NULL , `grptime` SMALLINT NOT NULL , `grppre` VARCHAR( 100 ) NULL , `grplist` VARCHAR( 255 ) NOT NULL , `annmsg` VARCHAR( 255 ) NULL , `postdest` VARCHAR( 255 ) NULL , `description` VARCHAR( 35 ) NOT NULL , `alertinfo` VARCHAR ( 50 ) NULL , remotealert VARCHAR ( 80 ), needsconf VARCHAR ( 10 ), toolate VARCHAR ( 80 ), PRIMARY KEY (`grpnum`) ) TYPE = MYISAM ;
++CREATE TABLE IF NOT EXISTS `ringgroups` ( `grpnum` BIGINT( 11 ) NOT NULL , `strategy` VARCHAR( 50 ) NOT NULL , `grptime` SMALLINT NOT NULL , `grppre` VARCHAR( 100 ) NULL , `grplist` VARCHAR( 255 ) NOT NULL , `annmsg` VARCHAR( 255 ) NULL , `postdest` VARCHAR( 255 ) NULL , `description` VARCHAR( 35 ) NOT NULL , `alertinfo` VARCHAR ( 50 ) NULL , remotealert VARCHAR ( 80 ), needsconf VARCHAR ( 10 ), toolate VARCHAR ( 80 ), PRIMARY KEY (`grpnum`) );
Property changes on: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install ringgroups || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall ringgroups || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall ringgroups || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-ringgroups/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,165 @@
+<?php /* $Id: functions.inc.php 3401 2006-12-21 03:10:09Z p_lindheimer $ */
+
+// The destinations this module provides
+// returns a associative arrays with keys 'destination' and 'description'
+function ringgroups_destinations() {
+ //get the list of ringgroups
+ $results = ringgroups_list();
+
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $thisgrp = ringgroups_get(ltrim($result['0']));
+ $extens[] = array('destination' => 'ext-group,'.ltrim($result['0']).',1', 'description' => $thisgrp['description'].' <'.ltrim($result['0']).'>');
+ }
+ }
+
+ if (isset($extens))
+ return $extens;
+ else
+ return null;
+}
+
+/* Generates dialplan for ringgroups
+ We call this with retrieve_conf
+*/
+function ringgroups_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+ switch($engine) {
+ case "asterisk":
+ $ext->addInclude('from-internal-additional','ext-group');
+ $ext->addInclude('from-internal-additional','grps');
+ $contextname = 'ext-group';
+ $ringlist = ringgroups_list();
+ if (is_array($ringlist)) {
+ foreach($ringlist as $item) {
+ $grpnum = ltrim($item['0']);
+ $grp = ringgroups_get($grpnum);
+
+ $strategy = $grp['strategy'];
+ $grptime = $grp['grptime'];
+ $grplist = $grp['grplist'];
+ $postdest = $grp['postdest'];
+ $grppre = (isset($grp['grppre'])?$grp['grppre']:'');
+ $annmsg = (isset($grp['annmsg'])?$grp['annmsg']:'');
+ $alertinfo = $grp['alertinfo'];
+ $needsconf = $grp['needsconf'];
+ $remotealert = $grp['remotealert'];
+ $toolate = $grp['toolate'];
+ $ringing = $grp['ringing'];
+
+ if($ringing == 'Ring' || empty($ringing) ) {
+ $dialopts = '${DIAL_OPTIONS}';
+ } else {
+ // We need the DIAL_OPTIONS variable
+ $sops = sql("SELECT value from globals where variable='DIAL_OPTIONS'", "getRow");
+ $dialopts = "m(${ringing})".str_replace('r', '', $sops[0]);
+ }
+
+
+ $ext->add($contextname, $grpnum, '', new ext_macro('user-callerid'));
+
+ // block voicemail until phone is answered at which point a macro should be called on the answering
+ // line to clear this flag so that subsequent transfers can occur, if already set by a the caller
+ // then don't change.
+ //
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${BLKVM_OVERRIDE}" = "foo"]', 'skipdb'));
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]', 'skipov'));
+
+ $ext->add($contextname, $grpnum, 'skipdb', new ext_setvar('__NODEST', ''));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('__BLKVM_OVERRIDE', 'BLKVM/${EXTEN}/${CHANNEL}'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('__BLKVM_BASE', '${EXTEN}'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('DB(${BLKVM_OVERRIDE})', 'TRUE'));
+
+ // Remember if NODEST was set later, but clear it in case the call is answered so that subsequent
+ // transfers work.
+ //
+ $ext->add($contextname, $grpnum, 'skipov', new ext_setvar('RRNODEST', '${NODEST}'));
+ $ext->add($contextname, $grpnum, 'skipvmblk', new ext_setvar('__NODEST', '${EXTEN}'));
+
+ // deal with group CID prefix
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${RGPREFIX}" = "foo"]', 'REPCID'));
+ $ext->add($contextname, $grpnum, '', new ext_noop('Current RGPREFIX is ${RGPREFIX}....stripping from Caller ID'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('CALLERID(name)', '${CALLERID(name):${LEN(${RGPREFIX})}}'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('RGPREFIX', ''));
+ $ext->add($contextname, $grpnum, 'REPCID', new ext_noop('CALLERID(name) is ${CALLERID(name)}'));
+ if ($grppre != '') {
+ $ext->add($contextname, $grpnum, '', new ext_setvar('RGPREFIX', $grppre));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('CALLERID(name)','${RGPREFIX}${CALLERID(name)}'));
+ }
+
+ // Set Alert_Info
+ if ($alertinfo != '') {
+ $ext->add($contextname, $grpnum, '', new ext_setvar('__ALERT_INFO', str_replace(';', '\;', $alertinfo)));
+ }
+
+ // recording stuff
+ $ext->add($contextname, $grpnum, '', new ext_setvar('RecordMethod','Group'));
+ $ext->add($contextname, $grpnum, '', new ext_macro('record-enable',$grplist.',${RecordMethod}'));
+
+ // group dial
+ $ext->add($contextname, $grpnum, '', new ext_setvar('RingGroupMethod',$strategy));
+ if ($annmsg != '') {
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${RRNODEST}" != "foo"]','DIALGRP'));
+ $ext->add($contextname, $grpnum, '', new ext_answer(''));
+ $ext->add($contextname, $grpnum, '', new ext_wait(1));
+ $ext->add($contextname, $grpnum, '', new ext_playback($annmsg));
+ }
+ if ($needsconf == "CHECKED") {
+ $len=strlen($grpnum)+4;
+ $ext->add("grps", "_RG-${grpnum}-.", '', new ext_macro('dial',$grptime.
+ ",M(confirm^${remotealert}^${toolate}^${grpnum})$dialopts".',${EXTEN:'.$len.'}'));
+ $ext->add($contextname, $grpnum, 'DIALGRP', new ext_macro('dial-confirm',"$grptime,$dialopts,$grplist,$grpnum"));
+ } else {
+ $ext->add($contextname, $grpnum, 'DIALGRP', new ext_macro('dial',$grptime.",$dialopts,".$grplist));
+ }
+ $ext->add($contextname, $grpnum, '', new ext_setvar('RingGroupMethod',''));
+
+
+ // Now if we were told to skip the destination, do so now. Otherwise reset NODEST and proceed to our destination.
+ //
+ $ext->add($contextname, $grpnum, '', new ext_gotoif('$["foo${RRNODEST}" != "foo"]', 'nodest'));
+ $ext->add($contextname, $grpnum, '', new ext_setvar('__NODEST', ''));
+
+ $ext->add($contextname, $grpnum, '', new ext_dbdel('${BLKVM_OVERRIDE}'));
+
+ // where next?
+ if ((isset($postdest) ? $postdest : '') != '') {
+ $ext->add($contextname, $grpnum, '', new ext_goto($postdest));
+ } else {
+ $ext->add($contextname, $grpnum, '', new ext_hangup(''));
+ }
+ $ext->add($contextname, $grpnum, 'nodest', new ext_noop('SKIPPING DEST, CALL CAME FROM Q/RG: ${RRNODEST}'));
+ }
+ }
+ break;
+ }
+}
+
+function ringgroups_add($grpnum,$strategy,$grptime,$grplist,$postdest,$desc,$grppre='',$annmsg='',$alertinfo,$needsconf,$remotealert,$toolate,$ringing) {
+ $sql = "INSERT INTO ringgroups (grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo, needsconf, remotealert, toolate, ringing) VALUES (".$grpnum.", '".str_replace("'", "''", $strategy)."', ".str_replace("'", "''", $grptime).", '".str_replace("'", "''", $grppre)."', '".str_replace("'", "''", $grplist)."', '".str_replace("'", "''", $annmsg)."', '".str_replace("'", "''", $postdest)."', '".str_replace("'", "''", $desc)."', '".str_replace("'", "''", $alertinfo)."', '$needsconf', '$remotealert', '$toolate', '$ringing')";
+ $results = sql($sql);
+}
+
+function ringgroups_del($grpnum) {
+ $results = sql("DELETE FROM ringgroups WHERE grpnum = $grpnum","query");
+}
+
+function ringgroups_list() {
+ $results = sql("SELECT grpnum, description FROM ringgroups ORDER BY grpnum","getAll",DB_FETCHMODE_ASSOC);
+ foreach ($results as $result) {
+ if (isset($result['grpnum']) && checkRange($result['grpnum'])) {
+ $grps[] = array($result['grpnum'], $result['description']);
+ }
+ }
+ if (isset($grps))
+ return $grps;
+ else
+ return null;
+}
+
+function ringgroups_get($grpnum) {
+ $results = sql("SELECT grpnum, strategy, grptime, grppre, grplist, annmsg, postdest, description, alertinfo, needsconf, remotealert, toolate, ringing FROM ringgroups WHERE grpnum = $grpnum","getRow",DB_FETCHMODE_ASSOC);
+ return $results;
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES/ringgroups.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES/ringgroups.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES/ringgroups.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES/ringgroups.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/i18n/he_IL/LC_MESSAGES/ringgroups.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,192 @@
+# Hebrew version for Ring Groups FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.ringgroups.php:64
+msgid "Warning! Extension"
+msgstr "×××ר×! ש××××"
+
+#: page.ringgroups.php:64
+msgid "is not allowed for your account"
+msgstr "××× × ××רש×ת ×¢××ר ×ש××× ×"
+
+#: page.ringgroups.php:91 page.ringgroups.php:151 page.ringgroups.php:158
+msgid "Add Ring Group"
+msgstr "××סף ק××צת צ×צ××"
+
+#: page.ringgroups.php:107 page.ringgroups.php:136
+msgid "Ring Group"
+msgstr "ק××צת צ×צ××"
+
+#: page.ringgroups.php:107
+msgid "deleted"
+msgstr "× ××ק×"
+
+#: page.ringgroups.php:133
+msgid "Delete Group"
+msgstr "××ק ק××צ×"
+
+#: page.ringgroups.php:158
+msgid "Edit Ring Group"
+msgstr "ער×× ×§××צת צ×צ××"
+
+#: page.ringgroups.php:166
+msgid "group number"
+msgstr "×ספר ק××צ×"
+
+#: page.ringgroups.php:166
+msgid "The number users will dial to ring extensions in this ring group"
+msgstr "××ספר ש×××ª× ×שת×ש×× ×××××× ××× ××××× ×ש××××ת ×ק××צת ×××× ××"
+
+#: page.ringgroups.php:171
+msgid "group description:"
+msgstr "ת×××ר ×ק××צ×"
+
+#: page.ringgroups.php:175
+msgid "ring strategy:"
+msgstr "×ס×ר××××ת ××××:"
+
+#: page.ringgroups.php:177
+msgid "ringall"
+msgstr "צ××¦× ×××××"
+
+#: page.ringgroups.php:177
+msgid "ring all available channels until one answers (default)"
+msgstr "צ××¦× ××× ×ער×צ×× ××××× ×× ×¢× ×©××ש×× ×¢×× × (×ר×רת ××××)"
+
+#: page.ringgroups.php:178
+msgid "hunt"
+msgstr "צ××"
+
+#: page.ringgroups.php:178
+msgid "take turns ringing each available extension"
+msgstr "צ××¦× ×ת×ר ××× ×©×××× ×××× ×"
+
+#: page.ringgroups.php:179
+msgid "memoryhunt"
+msgstr "צ×× ×¢× ×××ר××"
+
+#: page.ringgroups.php:179
+msgid ""
+"ring first extension in the list, then ring the 1st and 2nd extension, then "
+"ring 1st 2nd and 3rd extension in the list.... etc."
+msgstr "צ××¦× ×ש×××× ×ר×ש×× × ×רש×××, ×××ר ××× ×¦××¦× ×ר×ש×× × ×××©× ×××, ×××ר ××× ×ר×ש×× × ××©× ××× ××ש××ש×ת, ××× ××××."
+
+#: page.ringgroups.php:180
+msgid "*-prim"
+msgstr ""
+
+#: page.ringgroups.php:180
+msgid ""
+"these modes act as described above. However, if the primary extension (first "
+"in list) is occupied, the other extensions will not be rung. If the primary "
+"is freepbx DND, it won't be run. If the primary is freepbx CF unconditional, "
+"then all will be rung"
+msgstr "×צ××× ××× ×פע×× ××ת××ר ××¢××. ××, ×× ×ש×××× ×ר×ש×ת (×ר×ש×× × ×רש×××) תפ×ס×, ×ש××××ת ×××ר×ת ×× ×ª×¦×צ×× ×. ×× ×ש×××× ×ר×ש×ת × ×צ×ת ×××¦× × ×-××-××פר××¢ ××ר××××, ×× ×××× × ×¡××× ×צ×צ×. ×× ×ש×××× ×ר×ש×ת ××××רת ××ר×××× ×××¦× ×¢×§×× ×××¨× ××× ×ª× ×××, ×× ×ש××××ת תצ×צ×× ×"
+
+#: page.ringgroups.php:196
+msgid "extension list"
+msgstr "רש××ת ש××××ת"
+
+#: page.ringgroups.php:196
+msgid ""
+"List extensions to ring, one per line.<br><br>You can include an extension "
+"on a remote system, or an external number by suffixing a number with a pound "
+"(#). ex: 2448089# would dial 2448089 on the appropriate trunk (see "
+"Outbound Routing)."
+msgstr "רש××ת ש××××ת ש×ש ×צ××¦× ×××××, ××ת ××× ×©×ר×.<br /><br />××ª× ×××× ××××× ×©×××× ××ער×ת ×ר××קת, ×× ×ספר ××צ×× × ×¢× ××× ×ק××ת ××ספר ×ס××××ת (#). ××××××: #2448089 ××××× 2448089 ××¨× ××צ××× ××ת×××× (ר×× × ×ת×× ×××צ×)."
+
+#: page.ringgroups.php:208
+msgid "CID name prefix"
+msgstr "×ק××ת ×©× ××××× ×©×××ת"
+
+#: page.ringgroups.php:214
+msgid "ring time (max 60 sec)"
+msgstr "××× ×¦×צ×× (×קס 60 ×©× ××ת)"
+
+#: page.ringgroups.php:219 page.ringgroups.php:237
+msgid "announcement:"
+msgstr "××ר××:"
+
+#: page.ringgroups.php:219
+msgid ""
+"Message to be played to the caller before dialing this group.<br><br>To add "
+"additional recordings please use the \"System Recordings\" MENU to the left"
+msgstr "××××¢× ×©×ª×ש××¢ ××תקשר ××¤× × ×©××××××× ×ק×××¦× ××.<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×× × ×שת×ש <em>×תפר××</em>\"×ק×××ת ×ער×ת\" ×שר ××¦× ×©×××"
+
+#: page.ringgroups.php:225 page.ringgroups.php:283 page.ringgroups.php:300
+msgid "None"
+msgstr "×××"
+
+#: page.ringgroups.php:237
+msgid ""
+"Message to be played to the caller before dialing this group.<br><br>You "
+"must install and enable the \"Systems Recordings\" Module to edit this option"
+msgstr "××××¢× ×©×ª×ש××¢ ××תקשר ××¤× × ×©××××××× ×ק×××¦× ××.<br /><br />××ª× ×××× ××תק×× ×××פע×× ×ת ×××××× \"×ק×××ת ×ער×ת\" ××× ×ער×× ×פשר×ת ××"
+
+#: page.ringgroups.php:247
+msgid "Play Music On Hold?"
+msgstr "×ש××¢ ××ס××§× ××××ª× ×?"
+
+#: page.ringgroups.php:247
+msgid ""
+"If you select a Music on Hold class to play, instead of 'Ring', they will "
+"hear that instead of Ringing while they are waiting for someone to pick up. "
+"Note this DOES NOT WORK with call confirmation, due to limitations of "
+"Asterisk"
+msgstr "×× ×ª××ר ק×××ר××ת ××ס×קת ×××ª× × ×× ××, ××ק×× 'צ×צ×', ××תקשר ×ש××¢ ××ס××§× ×× ××ק×× ×¦××× ×©× ×¦×צ×× ×××× ×©×× ××ת×× ×× ×©××ש×× ×ר××. ש×× ×× ×©××ר ×× <em>×× ×¢×××</em> ×¢× ××ש×ר ש×××ת, ×××× ×××××ת ×©× ×ס×ר×סק"
+
+#: page.ringgroups.php:253
+msgid "Ring"
+msgstr "צ×צ×"
+
+#: page.ringgroups.php:266
+msgid "Alert Info"
+msgstr "××××¢ ×תר××"
+
+#: page.ringgroups.php:270
+msgid "Confirm Calls"
+msgstr "×שר ש×××ת"
+
+#: page.ringgroups.php:271
+msgid "System Recordings not installed. Option Disabled"
+msgstr "×ק×××ת ×ער×ת ××× × ×××ª×§× ×ת. ××פשר×ת ×××××ת"
+
+#: page.ringgroups.php:277
+msgid "Remote Announce:"
+msgstr "××ר×× ××ק×× ×ש×××:"
+
+#: page.ringgroups.php:277
+msgid ""
+"Message to be played to the person RECEIVING the call, if 'Confirm Calls' is "
+"enabled.<br><br>To add additional recordings use the \"System Recordings\" "
+"MENU to the left"
+msgstr "××××¢× ×©×ª×ש××¢ ×<em>×ק××</em> ×ש×××, ×× '×שר ש×××ת' ×ס×××.<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ×שר ××¦× ×©×××"
+
+#: page.ringgroups.php:294
+msgid "Too-Late Announce:"
+msgstr "××ר×ת ××××ר-×××:"
+
+#: page.ringgroups.php:294
+msgid ""
+"Message to be played to the person RECEIVING the call, if the call has "
+"already been accepted before they push 1.<br><br>To add additional "
+"recordings use the \"System Recordings\" MENU to the left"
+msgstr "××××¢× ×©×ש ××ש×××¢ ×××× <em>ש×ק××</em> ×ת ×ש×××, ×× ×ש××× ××ר ×תק××× ××¤× × ×©××× ×××¥ 1.<br /><br />××× ×××ס××£ ×ק×××ת × ×ספ×ת, ×שת×ש <em>×תפר××</em> \"×ק×××ת ×ער×ת\" ×שר ××¦× ×©×××"
+
+#: page.ringgroups.php:311
+msgid "Destination if no answer"
+msgstr "××¢× ×× ××£ ××× ×× ×¢×× ×"
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,70 @@
+<?php
+
+global $db;
+
+// Version 1.1 upgrade
+$sql = "SELECT description FROM ringgroups";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE ringgroups ADD description VARCHAR( 35 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+
+ // update existing groups
+ $sql = "UPDATE ringgroups SET description = CONCAT('Ring Group ', grpnum) WHERE description IS NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+
+ // make new field required
+ $sql = "ALTER TABLE `ringgroups` CHANGE `description` `description` VARCHAR( 35 ) NOT NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+}
+// Version 1.2 upgrade
+$sql = "SELECT alertinfo FROM ringgroups";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE ringgroups ADD alertinfo VARCHAR( 35 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) {
+ die($result->getDebugInfo());
+ }
+}
+
+// Version 2.0 upgrade. Yeah. 2.0 baby!
+$sql = "SELECT remotealert FROM ringgroups";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE ringgroups ADD remotealert VARCHAR( 80 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+
+ $sql = "ALTER TABLE ringgroups ADD needsconf VARCHAR( 10 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+
+ $sql = "ALTER TABLE ringgroups ADD toolate VARCHAR( 80 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+// Version 2.1 upgrade. Add support for ${DIALOPTS} override, playing MOH
+$sql = "SELECT ringing FROM ringgroups";
+$check = $db->getRow($sql, DB_FETCHMODE_ASSOC);
+if(DB::IsError($check)) {
+ // add new field
+ $sql = "ALTER TABLE ringgroups ADD ringing VARCHAR( 80 ) NULL ;";
+ $result = $db->query($sql);
+ if(DB::IsError($result)) { die($result->getDebugInfo()); }
+}
+
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+CREATE TABLE IF NOT EXISTS `ringgroups` ( `grpnum` BIGINT( 11 ) NOT NULL , `strategy` VARCHAR( 50 ) NOT NULL , `grptime` SMALLINT NOT NULL , `grppre` VARCHAR( 100 ) NULL , `grplist` VARCHAR( 255 ) NOT NULL , `annmsg` VARCHAR( 255 ) NULL , `postdest` VARCHAR( 255 ) NULL , `description` VARCHAR( 35 ) NOT NULL , `alertinfo` VARCHAR ( 50 ) NULL , remotealert VARCHAR ( 80 ), needsconf VARCHAR ( 10 ), toolate VARCHAR ( 80 ), PRIMARY KEY (`grpnum`) ) TYPE = MYISAM ;
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,31 @@
+<module>
+ <rawname>ringgroups</rawname>
+ <name>Ring Groups</name>
+ <version>2.2.13</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Creates a group of extensions that all ring together. Extensions can be rung all at once, or in various 'hunt' configurations. Additionally, external numbers are supported, and there is a call confirmation option where the callee has to confirm if they actually want to take the call before the caller is transferred.
+ </description>
+ <changelog>
+ *2.2.13* Add he_IL translation
+ *2.2.12* never allow group to include itself as nnn# and create infinite loop
+ *2.2.11* changed _ALERT_INFO to __ALERT_INFO ('_' -> '__') so it is infinitely inheritted into the dialplan
+ *2.2.10* Added BLKVM DB tree to fix inability to transfer a received call to another user, and make NODEST stuff work overall
+ *2.2.9* Modified NODEST stuff to improve some cases where it was still failing, and improve '#' transfer scenarios
+ *2.2.8* Allow ringall-prim as well as ringall for strategies with confirmation (#1408)
+ *2.2.7* Add tool tip for Group Description (#1459)
+ *2.2.6* Add NODEST so that destination (often vm) is not taken if called from queue or ringgroup and such is honored for childeren
+ *2.2.5* Modified flyover help - since moh works with confirmation now
+ *2.2.4* Added sound files for default confirmation messages
+ *2.2.3* Clarification on help message if you want to ring follow-me and other non-extension numbers
+ *2.2.2* Forgot to add default starting RG number as 600
+ *2.2.1* Cleanup of the UI, remove workaround of formatting bugs with previous UI
+ *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog>
+ <menuitems>
+ <ringgroups>Ring Groups</ringgroups>
+ </menuitems>
+ <location>release/2.2/ringgroups-2.2.12.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-RingGroups</info>
+ <md5sum>50ec5b51faf46e6391f0734a290a1299</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/page.ringgroups.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/page.ringgroups.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/page.ringgroups.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,390 @@
+<?php /* $Id: page.ringgroups.php 3423 2006-12-25 17:59:58Z p_lindheimer $ */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+$dispnum = 'ringgroups'; //used for switch on config.php
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+//the extension we are currently displaying
+isset($_REQUEST['extdisplay'])?$extdisplay=$_REQUEST['extdisplay']:$extdisplay='';
+isset($_REQUEST['account'])?$account = $_REQUEST['account']:$account='';
+isset($_REQUEST['grptime'])?$grptime = $_REQUEST['grptime']:$grptime='';
+isset($_REQUEST['grppre'])?$grppre = $_REQUEST['grppre']:$grppre='';
+isset($_REQUEST['strategy'])?$strategy = $_REQUEST['strategy']:$strategy='';
+isset($_REQUEST['annmsg'])?$annmsg = $_REQUEST['annmsg']:$annmsg='';
+isset($_REQUEST['description'])?$description = $_REQUEST['description']:$description='';
+isset($_REQUEST['alertinfo'])?$alertinfo = $_REQUEST['alertinfo']:$alertinfo='';
+isset($_REQUEST['needsconf'])?$needsconf = $_REQUEST['needsconf']:$needsconf='';
+isset($_REQUEST['remotealert'])?$remotealert = $_REQUEST['remotealert']:$remotealert='';
+isset($_REQUEST['toolate'])?$toolate = $_REQUEST['toolate']:$toolate='';
+isset($_REQUEST['ringing'])?$ringing = $_REQUEST['ringing']:$ringing='';
+
+if (isset($_REQUEST['goto0']) && isset($_REQUEST[$_REQUEST['goto0']."0"])) {
+ $goto = $_REQUEST[$_REQUEST['goto0']."0"];
+} else {
+ $goto = '';
+}
+
+
+if (isset($_REQUEST["grplist"])) {
+ $grplist = explode("\n",$_REQUEST["grplist"]);
+
+ if (!$grplist) {
+ $grplist = null;
+ }
+
+ foreach (array_keys($grplist) as $key) {
+ //trim it
+ $grplist[$key] = trim($grplist[$key]);
+
+ // remove invalid chars
+ $grplist[$key] = preg_replace("/[^0-9#*]/", "", $grplist[$key]);
+
+ if ($grplist[$key] == ltrim($extdisplay,'GRP-').'#')
+ $grplist[$key] = rtrim($grplist[$key],'#');
+
+ // remove blanks
+ if ($grplist[$key] == "") unset($grplist[$key]);
+ }
+
+ // check for duplicates, and re-sequence
+ $grplist = array_values(array_unique($grplist));
+}
+
+// do if we are submitting a form
+if(isset($_POST['action'])){
+ //check if the extension is within range for this user
+ if (isset($account) && !checkRange($account)){
+ echo "<script>javascript:alert('". _("Warning! Extension")." ".$account." "._("is not allowed for your account").".');</script>";
+ } else {
+ //add group
+ if ($action == 'addGRP') {
+ //ringgroups_add($account,implode("-",$grplist),$strategy,$grptime,$grppre,$goto);
+ ringgroups_add($account,$strategy,$grptime,implode("-",$grplist),$goto,$description,$grppre,$annmsg,$alertinfo,$needsconf,$remotealert,$toolate,$ringing);
+ needreload();
+ redirect_standard();
+ }
+
+ //del group
+ if ($action == 'delGRP') {
+ ringgroups_del($account);
+ needreload();
+ redirect_standard();
+ }
+
+ //edit group - just delete and then re-add the extension
+ if ($action == 'edtGRP') {
+ ringgroups_del($account);
+ ringgroups_add($account,$strategy,$grptime,implode("-",$grplist),$goto,$description,$grppre,$annmsg,$alertinfo,$needsconf,$remotealert,$toolate,$ringing);
+ needreload();
+ redirect_standard('extdisplay');
+ }
+ }
+}
+?>
+</div>
+
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($extdisplay=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Ring Group")?></a></li>
+<?php
+//get unique ring groups
+$gresults = ringgroups_list();
+
+if (isset($gresults)) {
+ foreach ($gresults as $gresult) {
+ echo "<li><a id=\"".($extdisplay=='GRP-'.$gresult[0] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&extdisplay=".urlencode("GRP-".$gresult[0])."\">".$gresult[1]." ({$gresult[0]})</a></li>";
+ }
+}
+?>
+</ul></div>
+
+<div class="content">
+<?php
+if ($action == 'delGRP') {
+ echo '<br><h3>'._("Ring Group").' '.$account.' '._("deleted").'!</h3><br><br><br><br><br><br><br><br>';
+} else {
+ if ($extdisplay) {
+ // We need to populate grplist with the existing extension list.
+ $thisgrp = ringgroups_get(ltrim($extdisplay,'GRP-'));
+ $grpliststr = $thisgrp['grplist'];
+ $grplist = explode("-", $grpliststr);
+ $strategy = $thisgrp['strategy'];
+ $grppre = $thisgrp['grppre'];
+ $grptime = $thisgrp['grptime'];
+ $goto = $thisgrp['postdest'];
+ $annmsg = $thisgrp['annmsg'];
+ $description = $thisgrp['description'];
+ $alertinfo = $thisgrp['alertinfo'];
+ $remotealert = $thisgrp['remotealert'];
+ $needsconf = $thisgrp['needsconf'];
+ $toolate = $thisgrp['toolate'];
+ $ringing = $thisgrp['ringing'];
+ unset($grpliststr);
+ unset($thisgrp);
+
+ $delButton = "
+ <form name=delete action=\"{$_SERVER['PHP_SELF']}\" method=POST>
+ <input type=\"hidden\" name=\"display\" value=\"{$dispnum}\">
+ <input type=\"hidden\" name=\"account\" value=\"".ltrim($extdisplay,'GRP-')."\">
+ <input type=\"hidden\" name=\"action\" value=\"delGRP\">
+ <input type=submit value=\""._("Delete Group")."\">
+ </form>";
+
+ echo "<h2>"._("Ring Group").": ".ltrim($extdisplay,'GRP-')."</h2>";
+ echo "<p>".$delButton."</p>";
+ } else {
+ $grplist = explode("-", '');;
+ $strategy = '';
+ $grppre = '';
+ $grptime = '';
+ $goto = '';
+ $annmsg = '';
+ $alertinfo = '';
+ $remotealert = '';
+ $needsconf = '';
+ $toolate = '';
+ $ringing = '';
+
+ echo "<h2>"._("Add Ring Group")."</h2>";
+ }
+ ?>
+ <form name="editGRP" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkGRP(editGRP);">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edtGRP' : 'addGRP'); ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($extdisplay ? _("Edit Ring Group") : _("Add Ring Group")) ?><hr></h5></td></tr>
+ <tr>
+<?php
+ if ($extdisplay) {
+
+?>
+ <input size="5" type="hidden" name="account" value="<?php echo ltrim($extdisplay,'GRP-'); ?>">
+<?php } else { ?>
+ <td><a href="#" class="info"><?php echo _("Ring-Group Number")?>:<span><?php echo _("The number users will dial to ring extensions in this ring group")?></span></a></td>
+ <td><input size="5" type="text" name="account" value="<?php if ($gresult[0]==0) { echo "600"; } else { echo $gresult[0] + 1; } ?>"></td>
+<?php } ?>
+ </tr>
+ <tr>
+ <td> <a href="#" class="info"><?php echo _("Group Description:")?>:<span><?php echo _("Provide a descriptive title for this Ring Group.")?></span></a></td>
+ <td><input size="20" maxlength="35" type="text" name="description" value="<?php echo htmlspecialchars($description); ?>"></td>
+ </tr>
+ <tr>
+ <td> <a href="#" class="info"><?php echo _("Ring strategy:")?>
+ <span>
+ <b><?php echo _("ringall")?></b>: <?php echo _("Ring all available channels until one answers (default)")?><br>
+ <b><?php echo _("hunt")?></b>: <?php echo _("Take turns ringing each available extension")?><br>
+ <b><?php echo _("memoryhunt")?></b>: <?php echo _("Ring first extension in the list, then ring the 1st and 2nd extension, then ring 1st 2nd and 3rd extension in the list.... etc.")?><br>
+ <b><?php echo _("*-prim")?></b>: <?php echo _("These modes act as described above. However, if the primary extension (first in list) is occupied, the other extensions will not be rung. If the primary is freePBX DND, it won't be rung. If the primary is freePBX CF unconditional, then all will be rung")?><br>
+ </span>
+ </a></td>
+ <td>
+ <select name="strategy"/>
+ <?php
+ $default = (isset($strategy) ? $strategy : 'ringall');
+ $items = array('ringall','ringall-prim','hunt','hunt-prim','memoryhunt','memoryhunt-prim');
+ foreach ($items as $item) {
+ echo '<option value="'.$item.'" '.($default == $item ? 'SELECTED' : '').'>'._($item);
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top"><a href="#" class="info"><?php echo _("Extension list")?>:<span><br><?php echo _("List extensions to ring, one per line.<br><br>You can include an extension on a remote system, or an external number by suffixing a number with a pound (#). ex: 2448089# would dial 2448089 on the appropriate trunk (see Outbound Routing)<br><br>Extensions will ring the actual extension. If you want them to be sent down channel local (to ring follow-me, other ringgroups, queues, etc. then put a pound (#) at the end. Be careful!")?><br><br></span></a></td>
+ <td valign="top">
+<?php
+ $rows = count($grplist)+1;
+ ($rows < 5) ? 5 : (($rows > 20) ? 20 : $rows);
+?>
+ <textarea id="grplist" cols="15" rows="<?php echo $rows ?>" name="grplist"><?php echo implode("\n",$grplist);?></textarea><br>
+
+ <input type="submit" style="font-size:10px;" value="<?php echo _("Clean & Remove duplicates")?>" />
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("CID name prefix")?>:<span><?php echo _('You can optionally prefix the Caller ID name when ringing extensions in this group. ie: If you prefix with "Sales:", a call from John Doe would display as "Sales:John Doe" on the extensions that ring.')?></span></a></td>
+ <td><input size="4" type="text" name="grppre" value="<?php echo $grppre ?>"></td>
+ </tr>
+
+
+ <tr>
+ <td><?php echo _("Ring time (max 60 sec)")?>:</td>
+ <td><input size="4" type="text" name="grptime" value="<?php echo $grptime?$grptime:20 ?>"></td>
+ </tr>
+<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Announcement:")?><span><?php echo _("Message to be played to the caller before dialing this group.<br><br>To add additional recordings please use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="annmsg"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($annmsg) ? $annmsg : '');
+ echo '<option value="">'._("None")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } else { ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Announcement:")?><span><?php echo _("Message to be played to the caller before dialing this group.<br><br>You must install and enable the \"Systems Recordings\" Module to edit this option")?></span></a></td>
+ <td>
+ <?php
+ $default = (isset($annmsg) ? $annmsg : '');
+ ?>
+ <input type="hidden" name="annmsg" value="<?php echo $default; ?>"><?php echo ($default != '' ? $default : 'None'); ?>
+ </td>
+ </tr>
+<?php } if (function_exists('music_list')) { ?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Play Music On Hold?")?><span><?php echo _("If you select a Music on Hold class to play, instead of 'Ring', they will hear that instead of Ringing while they are waiting for someone to pick up.")?></span></a></td>
+ <td>
+ <select name="ringing"/>
+ <?php
+ $tresults = music_list("/var/lib/asterisk/mohmp3");
+ $cur = (isset($ringing) ? $ringing : 'Ring');
+ echo '<option value="Ring">'._("Ring")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult.'"'.($tresult == $cur ? ' SELECTED' : '').'>'.$tresult."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } ?>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Alert Info")?><span><?php echo _('ALERT_INFO can be used for distinctive ring with SIP devices.')?></span></a>:</td>
+ <td><input type="text" name="alertinfo" size="10" value="<?php echo ($alertinfo)?$alertinfo:'' ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Confirm Calls")?><span><?php echo _('Enable this if you\'re calling external numbers that need confirmation - eg, a mobile phone may go to voicemail which will pick up the call. Enabling this requires the remote side push 1 on their phone before the call is put through. This feature only works with the ringall ring strategy')?></span></a>:</td>
+ <td> <?php if (!function_exists('recordings_list')) { echo _("System Recordings not installed. Option Disabled"); } else { ?>
+ <input type="checkbox" name="needsconf" value="CHECKED" <?php echo $needsconf ?> /></td>
+<?php } ?>
+ </tr>
+<?php if(function_exists('recordings_list')) { //only include if recordings is enabled?>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Remote Announce:")?><span><?php echo _("Message to be played to the person RECEIVING the call, if 'Confirm Calls' is enabled.<br><br>To add additional recordings use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="remotealert"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($remotealert) ? $remotealert : '');
+ echo '<option value="">'._("Default")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Too-Late Announce:")?><span><?php echo _("Message to be played to the person RECEIVING the call, if the call has already been accepted before they push 1.<br><br>To add additional recordings use the \"System Recordings\" MENU to the left")?></span></a></td>
+ <td>
+ <select name="toolate"/>
+ <?php
+ $tresults = recordings_list();
+ $default = (isset($toolate) ? $toolate : '');
+ echo '<option value="">'._("Default")."</option>";
+ if (isset($tresults[0])) {
+ foreach ($tresults as $tresult) {
+ echo '<option value="'.$tresult[2].'"'.($tresult[2] == $default ? ' SELECTED' : '').'>'.$tresult[1]."</option>\n";
+ }
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+<?php } ?>
+ <tr><td colspan="2"><br><h5><?php echo _("Destination if no answer")?>:<hr></h5></td></tr>
+
+<?php
+//draw goto selects
+echo drawselects($goto,0);
+?>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+
+ </tr>
+ </table>
+ </form>
+<?php
+ } //end if action == delGRP
+
+
+?>
+<script language="javascript">
+<!--
+
+function checkGRP(theForm) {
+ var msgInvalidGrpNum = "<?php echo _('Invalid Group Number specified'); ?>";
+ var msgInvalidGrpNumStartWithZero = "<?php echo _('Group numbers with more than one digit cannot begin with 0'); ?>";
+ var msgInvalidExtList = "<?php echo _('Please enter an extension list.'); ?>";
+ var msgInvalidGrpPrefix = "<?php echo _('Invalid Caller ID prefix.'); ?>";
+ var msgInvalidTime = "<?php echo _('Invalid time specified'); ?>";
+ var msgInvalidGrpTimeRange = "<?php echo _('Time must be between 1 and 60 seconds'); ?>";
+ var msgInvalidDescription = "<?php echo _('Please enter a valid Group Description'); ?>";
+ var msgInvalidRingStrategy = "<?php echo _('You must choose ringall or ringall-prim ring strategy when using Confirm Calls'); ?>";
+
+ // set up the Destination stuff
+ setDestinations(theForm, 1);
+
+ // form validation
+ defaultEmptyOK = false;
+ if (!isInteger(theForm.account.value)) {
+ return warnInvalid(theForm.account, msgInvalidGrpNum);
+ } else if (theForm.account.value.indexOf('0') == 0 && theForm.account.value.length > 1) {
+ return warnInvalid(theForm.account, msgInvalidGrpNumStartWithZero);
+ }
+
+ defaultEmptyOK = false;
+ if (!isAlphanumeric(theForm.description.value))
+ return warnInvalid(theForm.description, msgInvalidDescription);
+
+ if (isEmpty(theForm.grplist.value))
+ return warnInvalid(theForm.grplist, msgInvalidExtList);
+
+ defaultEmptyOK = true;
+ if (!isCallerID(theForm.grppre.value))
+ return warnInvalid(theForm.grppre, msgInvalidGrpPrefix);
+
+ defaultEmptyOK = false;
+ if (!isInteger(theForm.grptime.value)) {
+ return warnInvalid(theForm.grptime, msgInvalidTime);
+ } else {
+ var grptimeVal = theForm.grptime.value;
+ if (grptimeVal < 1 || grptimeVal > 60)
+ return warnInvalid(theForm.grptime, msgInvalidGrpTimeRange);
+ }
+
+ if (theForm.needsconf.checked && theForm.strategy.value.substring(0,7) != "ringall") {
+ return warnInvalid(theForm.needsconf, msgInvalidRingStrategy);
+ }
+
+ if (!validateDestinations(theForm, 1, true))
+ return false;
+
+ return true;
+}
+//-->
+</script>
+
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/sounds/incoming-call-1-accept-2-decline.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-ringgroups/sounds/incoming-call-1-accept-2-decline.sln
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/sounds/incoming-call-no-longer-avail.sln
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-ringgroups/sounds/incoming-call-no-longer-avail.sln
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-ringgroups/uninstall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-ringgroups/uninstall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-ringgroups/uninstall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+
+DROP TABLE IF EXISTS ringgroups;
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-speeddial (2.2-1.0.2-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:30 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-speeddial
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-speeddial
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Speed dial functions
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:30 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/speeddial/
+*.sql usr/share/freepbx/modules/speeddial/
+*.sqlite usr/share/freepbx/modules/speeddial/
+*.html usr/share/freepbx/modules/speeddial/
+*.xml usr/share/freepbx/modules/speeddial/
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install speeddial || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall speeddial || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall speeddial || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-speeddial/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,129 @@
+<?php
+ /* $Id:$ */
+
+// returns a associative arrays with keys 'destination' and 'description'
+function speeddial_destinations() {
+ // return an associative array with destination and description
+ $extens[] = array('destination' => 'app-pbdirectory,pbdirectory,1', 'description' => 'Phonebook Directory');
+ return $extens;
+}
+
+function speeddial_get_config($engine) {
+ $modulename = 'speeddial';
+
+ // This generates the dialplan
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ $fcc = new featurecode('speeddial', 'callspeeddial');
+ $callcode = $fcc->getCodeActive();
+ unset($fcc);
+
+ $fcc = new featurecode('speeddial', 'setspeeddial');
+ $setcode = $fcc->getCodeActive();
+ unset($fcc);
+
+ if (!empty($code)) {
+ $ext->add('app-pbdirectory', $code, '', new ext_answer(''));
+ $ext->add('app-pbdirectory', $code, '', new ext_wait(1));
+ $ext->add('app-pbdirectory', $code, '', new ext_goto(1,'pbdirectory'));
+ }
+
+ // [macro-speeddial-clean]
+ // clean the 0's off of the variable named passed in ARG1
+ $ext->add('macro-speeddial-clean', 's', '', new ext_noop('Cleaing (stripping leading 0s from ${${ARG1}}) in var ${ARG1}'));
+ // while ( substr($$arg1,0,1) = '0') {
+ $ext->add('macro-speeddial-clean', 's', 'start', new ext_gotoif('$[${${ARG1}:0:1}=0]','strip','clean'));
+ // $$arg1 = substr($$arg1,1);
+ $ext->add('macro-speeddial-clean', 's', 'strip', new ext_set('${ARG1}','${${ARG1}:1}'));
+ // }
+ $ext->add('macro-speeddial-clean', 's', '', new ext_goto('start'));
+ $ext->add('macro-speeddial-clean', 's', 'clean', new ext_noop('${ARG1} cleaned to ${${ARG1}}'));
+
+
+ // [macro-speeddial-lookup]
+ // arg1 is speed dial location, arg2 (optional) is user caller ID
+ $ext->add('macro-speeddial-lookup', 's', '', new ext_gotoif('$["${ARG2}"=""]]','lookupsys'));
+ $ext->add('macro-speeddial-lookup', 's', '', new ext_set('SPEEDDIALNUMBER',''));
+ $ext->add('macro-speeddial-lookup', 's', 'lookupuser', new ext_dbget('SPEEDDIALNUMBER','AMPUSER/${ARG2}/speeddials/${ARG1}'));
+ $ext->add('macro-speeddial-lookup', 's', '', new ext_gotoif('$["${SPEEDDIALNUMBER}"=""]','lookupsys'));
+ $ext->add('macro-speeddial-lookup', 's', '', new ext_noop('Found speeddial ${ARG1} for user ${ARG2}: ${SPEEDDIALNUMBER}'));
+ $ext->add('macro-speeddial-lookup', 's', '', new ext_goto('end'));
+ $ext->add('macro-speeddial-lookup', 's', 'lookupsys', new ext_dbget('SPEEDDIALNUMBER','sysspeeddials/${ARG1}'), 'lookupuser',101);
+ $ext->add('macro-speeddial-lookup', 's', '', new ext_gotoif('$["${SPEEDDIALNUMBER}"=""]','failed'));
+ $ext->add('macro-speeddial-lookup', 's', '', new ext_noop('Found system speeddial ${ARG1}: ${SPEEDDIALNUMBER}'));
+ $ext->add('macro-speeddial-lookup', 's', '', new ext_goto('end'));
+ $ext->add('macro-speeddial-lookup', 's', 'failed', new ext_noop('No system or user speeddial found'), 'lookupsys',101);
+ $ext->add('macro-speeddial-lookup', 's', 'end', new ext_noop('End of Speeddial-lookup'));
+
+ if (!empty($callcode)) {
+ $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_macro('user-callerid',''));
+ $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_set('SPEEDDIALLOCATION','${EXTEN:'.(strlen($callcode)).'}'));
+ $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_macro('speeddial-clean','SPEEDDIALLOCATION'));
+ $ext->add('app-speeddial', '_'.$callcode.'.', 'lookup', new ext_macro('speeddial-lookup','${SPEEDDIALLOCATION},${CALLERID(num)}'));
+ $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_gotoif('$["${SPEEDDIALNUMBER}"=""]','failed'));
+ $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_dial('Local/${SPEEDDIALNUMBER}@from-internal/n','',''));
+
+ $ext->add('app-speeddial', '_'.$callcode.'.', 'failed', new ext_playback('speed-dial-empty'), 'lookup',101);
+ $ext->add('app-speeddial', '_'.$callcode.'.', '', new ext_congestion(''));
+
+ }
+
+ if (!empty($setcode)) {
+ $ext->add('app-speeddial', $setcode, '', new ext_goto(1, 's', 'app-speeddial-set'));
+ }
+
+
+
+ $ext->add('app-speeddial-set', 's', '', new ext_macro('user-callerid',''));
+ // "enter speed dial location number"
+ $ext->add('app-speeddial-set', 's', 'setloc', new ext_read('newlocation','speed-enterlocation'));
+ $ext->add('app-speeddial-set', 's', '', new ext_macro('speeddial-clean','newlocation'));
+ $ext->add('app-speeddial-set', 's', 'lookup', new ext_macro('speeddial-lookup','${newlocation},${CALLERID(num)}'));
+ $ext->add('app-speeddial-set', 's', 'lookup', new ext_gotoif('$["${SPEEDDIALNUMBER}"!=""]', 'conflicts'));
+
+ // "enter phone number"
+ $ext->add('app-speeddial-set', 's', 'setnum', new ext_read('newnum','speed-enternumber'));
+
+
+ $ext->add('app-speeddial-set', 's', 'success', new ext_dbput('AMPUSER/${CALLERID(num)}/speeddials/${newlocation}','${newnum}'));
+ // "speed dial location "
+ $ext->add('app-speeddial-set', 's', '', new ext_playback('speed-dial'));
+ $ext->add('app-speeddial-set', 's', '', new ext_saynumber('${newlocation}'));
+ // "is set to "
+ $ext->add('app-speeddial-set', 's', '', new ext_playback('is-set-to'));
+ $ext->add('app-speeddial-set', 's', '', new ext_saydigits('${newnum}'));
+ $ext->add('app-speeddial-set', 's', '', new ext_hangup(''));
+
+
+ // conflicts menu
+ // "speed dial location"
+ $ext->add('app-speeddial-set', 's', 'conflicts', new ext_playback('speed-dial'));
+ $ext->add('app-speeddial-set', 's', '', new ext_saynumber('${newlocation}'));
+ // "is already set."
+ $ext->add('app-speeddial-set', 's', '', new ext_playback('is-in-use'));
+ // "Press 1 to hear current phone number, 2 to pick a new location, 3 to set a new phone number"
+ $ext->add('app-speeddial-set', 's', '', new ext_background('press-1&to-listen-to-it&press-2&to-enter-a-diff&location&press-3&to-change&telephone-number'));
+
+ // "speed dial location"
+ $ext->add('app-speeddial-set', '1', '', new ext_playback('speed-dial'));
+ $ext->add('app-speeddial-set', '1', '', new ext_saynumber('${newlocation}'));
+ // "is set to "
+ $ext->add('app-speeddial-set', '1', '', new ext_playback('is-set-to'));
+ $ext->add('app-speeddial-set', '1', '', new ext_saydigits('${SPEEDDIALNUMBER}'));
+ $ext->add('app-speeddial-set', '1', '', new ext_goto('conflicts','s'));
+
+ $ext->add('app-speeddial-set', '2', '', new ext_goto('setloc','s'));
+
+ $ext->add('app-speeddial-set', '3', '', new ext_goto('setnum','s'));
+
+ $ext->add('app-speeddial-set', 't', '', new ext_congestion(''));
+
+
+ $ext->addInclude('from-internal-additional', 'app-speeddial');
+
+ break;
+ }
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,16 @@
+<?php
+
+// Enable phonebook directory as a feature code
+$fcc = new featurecode('speeddial', 'callspeeddial');
+$fcc->setDescription('Speeddial prefix');
+$fcc->setDefault('*0');
+$fcc->update();
+unset($fcc);
+
+$fcc = new featurecode('speeddial', 'setspeeddial');
+$fcc->setDescription('Set user speed dial');
+$fcc->setDefault('*75');
+$fcc->update();
+unset($fcc);
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,13 @@
+<module>
+ <rawname>speeddial</rawname>
+ <name>Speed dial functions</name>
+ <version>1.0.2</version>
+ <type>module</type>
+ <category>Basic</category>
+ <depends>
+ <module>phonebook</module>
+ </depends>
+ <location>release/2.2/speeddial-1.0.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>9a71b19ed9298b349ef3fb772738accc</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/speed-enterlocation.gsm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/speed-enterlocation.gsm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/speed-enterlocation.gsm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,24 @@
+ÒYTÙP at 9#É,PÀ;6Ü G·#¬à8ÛÇ$×%]x`6ÜmÈãÔ@6ÜIèÀ¶Üê¹{Â6ÛÇ'Øç\VLQéLÜ×"PJjFÝôqÇؤÐÍwÒa¦ ¨Mb@6^¤æÚï»GÖ¢¹Q'HS>¨Ò¥ÛÊQ¤õ*½£QfÉqxô%:À0õ¥ëFV¼ìÔ]~ã`ù;z(@þè¡)#×hÓãPÖÞ=/Ôé-w4UÇ+éäZFU«¶2!Õ,èì%ÖÛ=«iYeK&8ÞYΨÊ8êʪ䮸Ów]ÔÊÆ;§¸5ÄÄQ&MZ¢YÚ³¦SÂ¥#%HÃÔ_êÃEI±-á´/D{cl"w'*¶(¦¦H2ÕWG²U¹$:ãc8âx£Ú[E0wجÁÝÔ¥W$ÙÖ/òsCÅ]}8e«CÇÛ
Ç#qb4`ƧÑSlºêÓZêmÂÌ ]\Ùm8+ÝÙBªC
+k|-9ÒÝßkc:¤r9ÓBÕX\âi¢]FÞ¢WµKÒbr\Ã5¬ørW/CÊägbå%`áòRæÓ`]úÎä)5J
fiâ¨Uz-kDJ«(¥ãqmHzÖ¡;¢Öã¥m\:&æ$KI÷d°ãmS°ÂÇMVØìV¢¢qBßÈ¡ºÒf.åßIfÄÃÉcÛ¸ÿØë[JR£æÜl2Yf£Nì-ÔÂ5Í5Z¶¢EURªÖ D&Õé¤äÒpÛå"{ÑQct4¶bäåË-DöÓ£^¤Í½§úÈv[bw(©Sn:ĸ©§%)[GÄ´Ó'\H¨G¦ÍTj!£²WªÕ²HÖf½uÒEÔãUàLH/Mx²ªËØ쩱kÚó¢#k(ë$PTÔ¥V'å3+QCÁyðÆé¤ýS%sÛõÓe]Ü
¥~£§cÈuk!ØD,e¢û"«ÆxÒ¢\îWAçy¹ÄÑøÜmÇ®ÁªÙÚ²ÄD¾¹ÜÐìËéZ°¢²Å+X*RZj°Á¾ËbÛY!=¯&Ñ*ÓåbY!%ª© ¥[v¦v$µ`þf³ £[@\ªèËÐê¼qZ·@Ök°Ì̶ Ó$¦Á·J>ÛÞá9K
ZÙ,jbÃÉ/Ö2S¶ßÑ âªá#ñ4ë~EÖþÙëIÂã¾å7"î"Yðf³ÞvI_á#zkkY($ô´×bWª[HH]
+µ*½ª/ùZ¦¼ PêdZÛ½£Öcó bÇ»b³æ¾Å+¯2»hÈ-èàa$h¦LªÕ¡º ¿ÇmU¸%`äv¯ÐÆAäùû[VÒÅ$¢6Õ"ªØcc¹<èåc!¦±y©ÕÄÕ,u¸ÂÅxl.GTÓáG¦ReÂDáÉf=ÚÇ×cy äeBÉ«²ÓßUëÄeÁA<õÔ÷Ë£dFÞªeCª8ëÉB×K¨8eÔMçËB-ké¦&dÁoÁûºÊ¦Å)käA$Ù&òÓT®aÖ!O,JÐî!%]ñG-à@°a騳ޡ=IUÔMWCm@ë&«%#s@¦³d×åÃ7e{+k¤9%N2Õ tßm¨Q$Gi(8º»ig(ÁNÕk&¹càÕáW}Hç[¶$ÓŨ¾ºãkW<ÍÕedaÕ(t¢DÕ&å:V8ím%âõLÖÚÇ!"·ãÜƺå +ÕhC°Ök[ÝH45:ºìp¦< .vÚÇK%u¦Õëk¦à®nÉ%Ý') :ÜåhGmÃ9ì
¿èÔÚÓÕìsªse2?KçhVãM×ÒÄÛZWIsfÁTXæÕíLnäÅ7 u¬vÄR6é.n9#ëòzÙ;ÕlL!ëC¸¹(ÍëBÉ¢¨År$W/tÄ9"0Õl;¥JébYŸäëC6ßÓws#)
E5¬sCUc¦´àÔè3áo"¶wão"3[ÞÃG"©@ÎàÂçâUÕkâá¢ñ2Q¤räV£Höõn»+nÂo¢ln)Ô)pº´æìÚÂF£T5²îâGEi¶Ø{¹ÊãÓè¦ma·
+±N¥ÜáD½¡¢P¤ÔÁUcîTXÕkåâÐQ5qY%ÄÀ³ÎÇ#Ð@ú¢j»º æãr8êÒåa©ä Zk
+î@+i5$° I²FÓÔ %$É\ÒßhÙØ°ÀFän),¾ HÛ7$dHãm¤ãÊ 6ÜIÓ\ᬠ6Û9ê@G#m¶Ûz Fä8äð 7cr;ÔqáRbÀI#HãØ9¶ä¾@Hã7#@8Üu¹#ÔqÙ[t at 8Ûm¶Ü¾ 9$ÊäTà6ÛÈã|`6ÛFÛÓZj"~ 6ܸÝÀ HärG$Ð ;%¹Þ 6ÛqÉÔaYY I$qÈã8ÛÈã 7QÆÛZ 6Ûm¶ÛÙ+ÎP at FäY´YÀ[õ¾É\[àÙ#Gy¼-¢lجSsG«g_BÉ7î½{ò´±+dà 3¶¤Ù®ÖÃ\Ü£ßC$òÛ¤äHCì²â Ã4ÎØñ'K¶°ÆKsâÁUO:ä£_ìkì#c_jÙ²´ÖÔâµ*}µKzâu`i@^ÃÀ
+ÝxÃXÚV.ÙØfKZÁD¿3sÍj¦Êþf£VAme®Å »Ó,·×çbÍÖ Âd×]ª@&¤ÚW#æ@82® 8[qÔÛÖÞBÛz at 6ÛI$À 8ì®8£À@W\=_ÀhÛ²iøÕ_<3ÖS£¸Ün;DX÷*8
ëIdDYm7®XåÖÚ%+{M¥jÖc{lx£
§«¹ ªà
ú£}g$ºÀÖ':»%E£Ò@£»d¼®×½×¬XÓWíÔ½#§còÜbAZöÖ¿Ö¼¨[¿Bù,RTdÔ_é£Á#xìÛsB0ûöHbQ¬ô³Á"ë=-F-ÓÖoíÛpôÁ¢Mc·§¡xhNéÁbŬ¡¡ÓVê¿¢9yΫ¿Ã rºD¿âTüÀ)s.sÕ?9ܽê£Ì6wP)Êîãªaøà¿£»}¬Ómò¿#k=¤Ác"xyYÄ$ëdÐC$ÙãÐêîZÞ" ÒNé¢æ ÅÛ.mQæ Á¬Ýî ³´2mYЮä¦!¥ ³$méa¥@©.
YbW@íj8ó§ µÐ±Ü%a«@´z++Y Ö6ǯ ÉmIY@ÉlEcвÌéR] çd4·`«46¡[ ÛKzKZ_`ôZ¨ÐsÅ%¾ÂÙ¾¥+b ¹ÞËȪbÉe NbɹÖf#éÅ⡶»¬T n;-ëáa¥G$\JYcD¾Ócn6Wl5dd+cS-Ùl.'ÑTªÉ{V sW zçR¦Ô&m¡KWk-T}¤WúÛHܳýÞ¥lÓµÌ*¡ÔÔè\ÝÄ[ Ñíöu\¬8 3·]
+øbmW+¹H¯M*ÕiLÊ_ øuY*ÁkY#Ù6h¾È×q|Ï-W¶¶ÝÔê|CbëTzY¿iʬNî`©4n'ÂèùRÕ-c(:«z¥¿,´År·$^«×
+¹\g*Ê£.ÕkåegÆʤÄc%¿GRÛÀ«0´+$ÈÊ6XYÕ,s]BÌÈÕ`L³ÆçaqÑBÏG>yXab¢|Z+,Õ,{ábÉDбåÓ j±PÍhªIr4d¦Yéú¢Ö'kâÍ&1üXýÉ*ÖâåjÏI[) ëÑ'EeæÖeCfDhÆlû»Ï(Æ<fÃ9f¥Ê`!èçÌÅ{QOÖCKÎÄ/yÔÒÓð¯"Ðç%ÕIUÑFVä.
+UÕ¢C"e'J䲧PÓe÷#ÇRn´¸Ù%Ó)T«ÕdjCf§Ótl£á5}õZҦƲ+U×%fáJ5Ôé:Zh¤]r'Ãw¾3xé¶
r7\rÅX«0©ÅÓ+Zb¾ãåÚ¦X¥ÿyâpVc©:â¢ÜrÔ.:!Ñ_",òo»4äâ÷ªªê£¸â8Ü¢«ÑÖ8ÓoI¡rá¼ÚêÕ!¸}ìÀùnr,pÁ°ß«c4ÒðBkîáØãQ·xcAdïrVÑê¡R{ªÕ+äÂÈcY-ÒmZ#táIL|H\¡¾}9&âÂ&Òr>ÝxÀÅ%EbÒnBXãu!gN¬Ôy!1Ò\¦x¡,ÛiA,äÁ]R©SÒ/;Qjv¡6%VW+àóZM),àï
+gDËs`¸£¦Û*Ò,r¤ì »\m¦TxÀÙ[íæ³vÀ
+G+ÀÕ#É5Òën ·[Î×%~Û
+mHìvÀ¸ÜgÒ 2m·áÒë¢R XµrÛàVëi´Û¼6ÛV)%Ü 8ÜrHìÓs Î K$®F¤jà9[n7cR at 8ãmÇ 7$¹ÒbjÀ6Ûm¹]´ 8ÛFÛÌ G#ÈÜ 7G#ÔWj®Hä·$Ì HÜrVä @8ä·[@6ãq¶ÛÕZKP 9,YVíU *R[~Àe\RG¡¸ÜyOcÒ¡Ûé[ǶÚ*ýÚTËÆÒ}Ø[©htöãY¦YÜ
+EdÓÜS«YèciÃÚW¨|º¨*UpHä¶×T51ÕÄa«¬÷s-KWÏ9º
¾WµÛnfãUðɳ
+ÙÕÜÍQU27:Å"§guHë§ÐÆ*æê§PD/VHlֽ᧦¼Sæ³¼tSp6î7£Q8¡^DìÕ¼Æê¢Ò6]¹$¥
+êïk¥!"¹¥,rÒr¹NÓç²SJVbOäújt²¥EÌ°¦i iÏÓm¤¬É\àhÍO¨q|@¥-¨Åq;
2fªÅzíVÔÒXdVÃǤø"¸cÖíiy
+´!ÇEp_ÚÜ&Ru³Ó#ÂLØ!JÚqÚÒ!+ÃcÖ ^v6»T ´ÚG%ÚªÚZYã¶Ò¿äUK
+m_ÕIL_o(Ó}6Ûjd¥QPwÁ$9#0¼ą̂6A/üä+ª|=×XRêc¾FCV*õ¯+©bÉ}WNÆdi¹¼S-·µÖLîQk\"ͧ'+iGâQm¨äM>ÞnM>Ö\KòRSb/dç¥Zi®çrûá¬\*±Öu&jÂÓ\êBUísV×Më4Ð1jÜu¨ÔÛ
õLÔ¯I!ãÍÙHvôÐÎÉ;%Ñ*¶òãkÔY-Ñ*-q¹!ÓJN6ÕÓ%Ó"ê qÓFjti¿ÕwqÄH§%H]¼HC
+êôÕÒÝb×N³ÖVîD(1d®IRצ;Xb{+kODÄ×DêÑì¤Ü×=òÅ×EÙ$d,ä;:êÕ¥ÉزØF¶ÈjÖV=vÓÅÒì«:æË0/Ì~ÑGÏ~!^HrT8½Ù`1cÑ´Ûj9ì
ìÛoJ+u¸åPìîÚÛ-ÓPWÍ5ù¤EéÎ7õ°W.®¢×È°
+sÈÛñÍM®±Õ½_M1;x-8mÙ8]-MHdÜsÝëgmÇSqêË8Wn £äʶ³WÛM¹]g§ÜqÝm!^ëÎB¡¬¤ñ)àU¾8´È
+ä\Ü2zÔáÏi7¤Ò@æÛ«(¦§ËiRÝS±pmq%ÛkªÌáP0ý4,åزQf¸Èþ-z(1ìï¶ä¶¨ÄØBעȨ÷ãáDâ~KáãÈ[Ì+9mvBnÑ´QÖ[Z^v¬¶Sû±q³W¾ÝÆÚ¯ë|GIסi[ªVôÈî]Í8«d_pH£mv«ÁÉóÇ°ØgÒÎK"Èc¡ãµHªeJÀÆìË+)h¼×gpÓBÌíHÛi¨þàLZm4Ïh}+d(Ðé8~ÌÝÓ!RrÒÜ$Ö
+Ô5æ#*¼. at xÚ&í¾ÌnèÒi{:Ñd¬iÒÞZ,Ùà¡éh±:àÁ¥#îÕ!sÁ5¤«4ûÑ&µq">Æãr¡3<¶Óæ(ÍAM,r jÆÂÑ)´5é «¬Æèéí@êZfår¡:Ùi¶É{ ©5ºÛÑg¤5}AhiK%~ÁâiÖ|¡%µ\ãz'f#µÑh¤5ÒzÀ÷5-U@«³'j@ĦN! ؼ:RÑç¹Ò ØÚAëkÜáyXÚA4×K«[Z àÛ}¨AÒ%t¹ ئk¸ÛÞá5$4@¹Ü²FÀ¨ôq$Ñg
uÒ¬ ¿ÜѲÖë8Mèò¹¹î Ʋl´Ñ¥e>Ò¢ÀgÚÎF«[eG^ êä;$¦àT£IS5Ñ"zæÀÉ^µÄðàÈâȦΠGPmGDÀìË´\Òáb²Zë ]ÆéÖÀØ´m4ÝhÍVsÀTÔ²HªÖaá[Ð`IqXܨÀÇ$´r 'dI$V 9$I$ØßyØRP 6ÛmÆãT 6ÜrHÜT at 8äÈäR 7r6ÜѦ¼)¾`I#HãW at FÛq¶äPÀ6Óy¹µQ@´±K$Ðï¤ÒY ädn7YAXkmÈå±`Ì$i[ Û©r&fЮÔqÚT ·¬J¶Ç® Ôn&XÒVÀèäjHàÀß\jTÚÐêÄ-ÚR É\±8ÚÄÀ¬º$ã\À¦µrÉÙdHMKi$Ó[åÚÎÀ·X %ov¡mki$Û¹¡¦í¾ÜgâÉÚbïÕ \gÓSçÈä`P¦¶3ÎãwM¡¥ÎOU,,=Õ_Tï_0$ßn;UNªWjÇ,S*ÃæG£§K.í7£Ôáe²K§+:ÆÜSh8 åæߢê¨@íé-쫧B=L®Ô }.DH¢éejçç©×bâê#ãÖØêv²`Õ!]j ÓxëV"ÜIì&¬µÉ
+¥j9«HâO» Õ"d®¾ÉßÀl}%Þ·,{ªÃ+¶Å852ÅãÒâöÆBo
(Æû
9eªÁ;·[졹cÒ)3!xÁFLÕl~À¹7"5\Ø¡fáYº¦X¡ -#Ò+u[{a!#¶Fyay+.v«e@¨î.ea:LÒ3¬%mb ¡XËÖØËa@ˤF7ca@§Ü©]Ñóæ4@´Ýf5/¾ Á"Á^à¼ËJbÜàÖòN¨òÒ-Ü®+êÀÇ%yÆ«Îá{#iÛc` ¤£ ÆS8ÜÒg¼ar@8ÖR¹UÞ $ämÇ%Þ Fër´ä^ÀK#9kÒâ¼å 9dn9d¾ Dã¶ã G6 Eq¹"Ø/×LëÌFä9ÚPïI5[V¨ô³=Û´Åã3x7×m¾ÒÖ¤ÓN W"ÅÇRì$Ä!±YÓ~¸þÓPÔçT°ïvIIln¤¨Üy·èÆ©¥D|rÄfø}Ô¤LÓwÍÈë/
Æ´xåäØ;¬¥%JÕi] yHW£ /µé¨Vz¤yhõÕÖw6yÕg{ U J=&y,Ä#vK{ ÷-µ¢ä¹(9àBÍ&Öbf»I¢dZ+B}Hê6ZzIܳ(e,}iHÐy\íÕ¡]C¿:}Ôax5J&¥¿üÔm§Ã(HúëÕ\_ëz7PÅGq6éÇMng(5P±¾ÝÓßdã
+è!¬©EÒFÄ潬HƦÈäK.ÔlBªYÈäEÎÅ+Ô#</r#æ£K2G'ÙécÒÌÙkÏ|ÈÂXÛTØîâ«*¶U\ÂìfÙ(kºÁ¸ÐðÝ*!ORÑÖAÃdæRãº[<¶+×ç{ÒR¡×$MV¼Ö¡TæÉ!ÂÐq4^ã'-M5ØikJ])öiÉ#l¨)dI%V¢¸³ Ú=+¹ØhJè@"u¨ÙÞ ¹-uøÞÐ O$¶knÈ@X\רËÈ U¶Ú¸ìÐÀÉ#i&»è¶ÛmÏRö/Í×ìÓ|"¡oØMÄCëlаî"Ë>³µ°öë×èJ
+rçGzC &ì§RÎé=j&æHÝ%I×c2ÞSç/LAG:¢©¸
G=j§Ö5_-ÊʶZõaÕ #æTÜÈBz¹Õß&>>
¶cØÊÊ»rÌÑ(Eä2ÔLâFgª¡l^Õ[*HúÒÈtq^¦H×9YÓâe]¤¨Ý]XÏHļ¶ÎÈ/^ÍÆ\Mq-Ó¢mUF»LÓg3G*Ó%¨%:ÇaÕHÏæ ÓáUUÓÕf£¨!ç%(<E÷kM$Ùd©b×xÓdLÝËÙ#îK*ÙÎÙä¶ðz¹ÉÙHµHãcyÚÙÒæ\ÙË&A9¹Ë'¸¦Z¼4Ðãf'cÆÏÒéM£Ü¶F½%q8R¦]q4Q#¯$´ÄÒªLeK£eÚ䶤Ä+ܵ6UCaÛFW!Ù<§AÒ[© ª¥#ãîHä±!¨%¾ºê[!²X±ù»BÃ;Ò/bYÙ^¢IT³3À¡ºÝR$ðÀû+®£ÄÁ¸4¯8äÒïaÝSÐá1[bólo@ÜtV ½ìuØÒp¦¶ÛÒkj!Òà ÉÙ únRäs ¦ß·*t Ö¢ª®ÒâJ# ·Ø èá'ÖÊV«x ¢â4³ Z¢³Ñh®a~²£¶¹#rZN¤fÀ7L͸âîÀÖUnÆäѤjat EbÔÐ meé¹,îÀ#:Ï] CѶÑf»é¢~À9{W7*àJÒlZêÀ<åjZÕ
&kE"Ñ(¬m¡ÀHÝq EiXàIi·59j±ÉÑfaÀ6»\´ÀDä4 G*ÆäàJÍjWÑ£)! Z2xB§ãtÀUF:ìv*ÕÑaµ%#à@G#I)dÀE"µK 79#à9[r7[Ò ¬¥+è (Ü[`6ÛÆäd 7$¶ÛØ 9mÇ$Ö©TæT I#I7
ÎRGP ¦»kÒ ÒÜq¹×hT.Bì@)k2ãÈà¹[qçÀÀ·\²]exÀÇ¢&£Öè[îIdÀ*mE´«Ô (e3¾ %2uêÔ@EÖ[Ö`{eQz'q9#ì@HÜÉ,|@I,É,\ 6ìq¶ä
\ No newline at end of file
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/speed-enternumber.gsm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/speed-enternumber.gsm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/speed-enternumber.gsm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,18 @@
+ÒYTÙP at 9#É,PÀ;6Ü G·#¬à8ÛÇ$×%]x`6ÜmÈãÔ@6ÜIèÀ¶Üê¹{Â6ÛÇ'Øç\VLQéLÜ×"PJjFÝôqÇؤÐÍwÒa¦ ¨Mb@6^¤æÚï»GÖ¢¹Q'HS>¨Ò¥ÛÊQ¤õ*½£QfÉqxô%:À0õ¥ëFV¼ìÔ]~ã`ù;z(@þè¡)#×hÓãPÖÞ=/Ôé-w4UÇ+éäZFU«¶2!Õ,èì%ÖÛ=«iYeK&8ÞYΨÊ8êʪ䮸Ów]ÔÊÆ;§¸5ÄÄQ&MZ¢YÚ³¦SÂ¥#%HÃÔ_êÃEI±-á´/D{cl"w'*¶(¦¦H2ÕWG²U¹$:ãc8âx£Ú[E0wجÁÝÔ¥W$ÙÖ/òsCÅ]}8e«CÇÛ
Ç#qb4`ƧÑSlºêÓZêmÂÌ ]\Ùm8+ÝÙBªC
+k|-9ÒÝßkc:¤r9ÓBÕX\âi¢]FÞ¢WµKÒbr\Ã5¬ørW/CÊägbå%`áòRæÓ`]úÎä)5J
fiâ¨Uz-kDJ«(¥ãqmHzÖ¡;¢Öã¥m\:&æ$KI÷d°ãmS°ÂÇMVØìV¢¢qBßÈ¡ºÒf.åßIfÄÃÉcÛ¸ÿØë[JR£æÜl2Yf£Nì-ÔÂ5Í5Z¶¢EURªÖ D&Õé¤äÒpÛå"{ÑQct4¶bäåË-DöÓ£^¤Í½§úÈv[bw(©Sn:ĸ©§%)[GÄ´Ó'\H¨G¦ÍTj!£²WªÕ²HÖf½uÒEÔãUàLH/Mx²ªËØ쩱kÚó¢#k(ë$PTÔ¥V'å3+QCÁyðÆé¤ýS%sÛõÓe]Ü
¥~£§cÈuk!ØD,e¢û"«ÆxÒ¢\îWAçy¹ÄÑøÜmÇ®ÁªÙÚ²ÄD¾¹ÜÐìËéZ°¢²Å+X*RZj°Á¾ËbÛY!=¯&Ñ*ÓåbY!%ª© ¥[v¦v$µ`þf³ £[@\ªèËÐê¼qZ·@Ök°Ì̶ Ó$¦Á·J>ÛÞá9K
ZÙ,jbÃÉ/Ö2S¶ßÑ âªá#ñ4ë~EÖþÙëIÂã¾å7"î"Yðf³ÞvI_á#zkkY($ô´×bWª[HH]
+µ*½ª/ùZ¦¼ PêdZÛ½£Öcó bÇ»b³æ¾Å+¯2»hÈ-èàa$h¦LªÕ¡º ¿ÇmU¸%`äv¯ÐÆAäùû[VÒÅ$¢6Õ"ªØcc¹<èåc!¦±y©ÕÄÕ,u¸ÂÅxl.GTÓáG¦ReÂDáÉf=ÚÇ×cy äeBÉ«²ÓßUëÄeÁA<õÔ÷Ë£dFÞªeCª8ëÉB×K¨8eÔMçËB-ké¦&dÁoÁûºÊ¦Å)käA$Ù&òÓT®aÖ!O,JÐî!%]ñG-à@°a騳ޡ=IUÔMWCm@ë&«%#s@¦³d×åÃ7e{+k¤9%N2Õ tßm¨Q$Gi(8º»ig(ÁNÕk&¹càÕáW}Hç[¶$ÓŨ¾ºãkW<ÍÕedaÕ(t¢DÕ&å:V8ím%âõLÖÚÇ!"·ãÜƺå +ÕhC°Ök[ÝH45:ºìp¦< .vÚÇK%u¦Õëk¦à®nÉ%Ý') :ÜåhGmÃ9ì
¿èÔÚÓÕìsªse2?KçhVãM×ÒÄÛZWIsfÁTXæÕíLnäÅ7 u¬vÄR6é.n9#ëòzÙ;ÕlL!ëC¸¹(ÍëBÉ¢¨År$W/tÄ9"0Õl;¥JébYŸäëC6ßÓws#)
E5¬sCUc¦´àÔè3áo"¶wão"3[ÞÃG"©@ÎàÂçâUÕkâá¢ñ2Q¤räV£Höõn»+nÂo¢ln)Ô)pº´æìÚÂF£T5²îâGEi¶Ø{¹ÊãÓè¦ma·
+±N¥ÜáD½¡¢P¤ÔÁUcîTXÕkåâÐQ5qY%ÄÀ³ÎÇ#Ð@ú¢j»º æãr8êÒåa©ä Zk
+î@+i5$° I²FÓÔ %$É\ÒßhÙØ°ÀFän),¾ HÛ7$dHãm¤ãÊ 6ÜIÓ\ᬠ6Û9ê@G#m¶Ûz Fä8äð 7cr;ÔqáRbÀI#HãØ9¶ä¾@Hã7#@8Üu¹#ÔqÙ[t at 8Ûm¶Ü¾ 9$ÊäTà6ÛÈã|`6ÛFÛÓZj"~ 6ܸÝÀ HärG$Ð ;%¹Þ 6ÛqÉÔaYY I$qÈã8ÛÈã 7QÆÛZ 6Ûm¶ÛؤjP at I$HäSFÛm¸ãÀ6ÛmÄÛT IÈäÖZP G$É#a HÜr7G#m¸ÜÎà9mÈ£ÙîëçÉ.KvXúY&ÒǤ2E$#¦ðpõ#×!Bç ävãºÍMãèû±Úû^èÕ¶ÆOI%®0¬Õ¥uCUpO@½gRÏÔÙ×í°ÆÍë$O¶;+"Ôê¥.£ËêÈÉ+á\ªÑ
+.'TÑ+'G+ÔlËÍE+×(É\Ë,ÈܸèÆ«Ú¤À:*&0H«Óè¼ÑÔz®ØË.{HÈUò붻]Éz©YPN;dÒp£ÍãvÇ*ζ¤ìãÎ>jêWAë<²êÂJ¹âÀ´Ô`eNl´ËdaKyx
+æÔ¢xâõ$i%¯q Ë
pÓ\lʳӵR«jÅÝb#»Ü¢Æ¤¹À<×DêòCÙÔ-ciÊkÆ-v¨EÕÉÈÜbÉZi&¢õ¹¶-iÇ¢E"Ô¬Jêi£æhrÉ$̤<«F
L©âáäVP6æ¢×bLÍäBÄÌs>ªÁ¥ôÊüÔAejºFnä¡É0øסDjÂ%°YçA¾¶)'l~áX zëV¼Â«ÎÝ×!KYR¢Zí16x¡hb¡Ö:QPáIÅ Ùn]Û¤ÂÉ"q%K\¾IæSÇ2Ü}2}ÆK+_Ó-ÝÒ°ãjʱÝ*Ip<ÕÌ(íèë|î#ÒÆÆÔ.*M©,!\
Mgdh8ìKÚâ[«g0ÊTÜÔoj
+,6+n9#î
+ä®W,JìVYá+µ)²¨Ôðb¶ hó$²2:åHÖí®´:¥<»«µQ)»-!Ô.Y²Éçm!P©÷%1Yð¨õ%¡Q£%WµÚÓg
+£çÙ+qµåQ(¬ä6;£éIÈ-UD¶æ« hÒetjgHy44T¸C«X¿XȾ#.ýZZÃ]ÁoÐðËÛ®¢BV)&²:bÇQk²áX4ü
+[a[$hvâÐò»¡c^ÁK5£E·!D¤ÔÙ] «¯Xá]A,¤NI\Ðñ¬á»!DY;½AGÎXôº¡;d)U2½ Úó$ÝÕ¢ZcJ¿å9¶ÄWÊ)\gP[ÍKb]ͧӱ¹Ö|bC]
+Öêû_ÊæÚXÓa«ÔJÜ-al¹TÉÔÕß´aÓ·\a¨¡öìaJ¶2ÈëaÕ[B©,Õ%» aeW¸`/×ÁjÇ#·ÁFGÃ+ÁHç)+ÔcÂÃHÁf]\XÚbôòcÐDË4qÔdÛe¶FÒ'bªgBªémÈÂB¬\rÊkd2ÅÑgA¹luA"Ò&ÚéÌÁöÝÖLgA¦½f·diA(Ï'Ò&Ó1ÎÁ¶HÏAEI+ÏW2%+i ÌãçÑhΪÐÀùuv$$ÓAqQÇjÁ#©K4ÔàË)ìÑh´á+në¬ÖTRm ÌÚ®EUÜ¡6rFë|à·$¶LÑkªåªÞ v>êfÀbÙ#¶ g-¢î@»lyÙÕcM¤wä7$OfW(*c[SlÕSÄÀh.Õ-Ö%&W
+eI(©Èèå=ÊÇ×o2;Ê£Ìeëì×)àÏÅ@y9+ii8AêÔäkG+
k#ÃÜËËhÖg%¢ ÖżíRÉÛGÈÐÕHäÝç$âu`yF^t®$Õ&>qE°ò±ªÛãdÅagQ©àã½}ÊËå$¥ÅmÖªZs%dâ:ÛäÄÈÉ´çÅNr&ÔwBªïH±Ö©"ê*ï$7¤Z¢GFËÉÛydV¦c^xåGßng×m*]ò¦¬¥±Éé{G` íº¥r¥.Â~ÄÔåÝÂÕ¨^!ð§ÆÓ·TzÂ:îo°%öã²I3{BTK©U×/b áÇVÖèbkS(¾}bÔAÈøuUG\ÖjZ*¢®W,~¡ËÉè
+'PÂ
+ãÒï,¡£s£×l
ìt!M¹Ù `%A¯ð!.ܵx ûSuÜ\×+IÚÖÀJ+^ê «q'î@%¥·Q**K<ÖçÙÈÀM\î´\ì NäÆ® *ÃF` "Úm¸ãÓÝZ! 6ä¹$¤ G®G,ê 9dG\ºàHãÈãÓØZaÖ@HãrHÚØHÛm¸Ût Y#m·P HãÉÓXb¬@8Ûr8ã~àGmÇ#À HÛ6äÒ G+·#ÔbYº`6ÜmÇ#Øà7$Éè IÇ$Ê 9®VãÒjÔÐl 6Û¹X 'Æã@FÛÇ¢@I$uÈäÒXQÜj IHã~àFãÇÔÀGÈÛ¸ 6Û·ØßyØRP 6ÛmÆãT 6ÜrHÜT at 8äÈäR 7r6ÜѦ¼)¾`I#HãW at FÛq¶äPÀ6Óy¹µQ@´±K$Ðï¤ÒY ädn7YAXkmÈå±`Ì$i[ Û©r&fЮÔqÚT ·¬J¶Ç® Ôn&XÒVÀèäjHàÀß\jTÚÐêÄ-ÚR É\±8ÚÄÀ¬º$ã\À¦µrÉÙdHMKi$Ó[åÚÎÀ·X %ov¡mki$Û¹¡¦í¾ÜgâÉÚbïÕ \gÓSçÈä`P¦¶3ÎãwM¡¥ÎOU,,=Õ_Tï_0$ßn;UNªWjÇ,S*ÃæG£§K.í7£Ôáe²K§+:ÆÜSh8 åæߢê¨@íé-쫧B=L®Ô }.DH¢éejçç©×bâê#ãÖØêv²`Õ!]j ÓxëV"ÜIì&¬µÉ
+¥j9«HâO» Õ"d®¾ÉßÀl}%Þ·,{ªÃ+¶Å852ÅãÒâöÆBo
(Æû
9eªÁ;·[졹cÒ)3!xÁFLÕl~À¹7"5\Ø¡fáYº¦X¡ -#Ò+u[{a!#¶Fyay+.v«e@¨î.ea:LÒ3¬%mb ¡XËÖØËa@ˤF7ca@§Ü©]Ñóæ4@´Ýf5/¾ Á"Á^à¼ËJbÜàÖòN¨òÒ-Ü®+êÀÇ%yÆ«Îá{#iÛc` ¤£ ÆS8ÜÒg¼ar@8ÖR¹UÞ $ämÇ%Þ Fër´ä^ÀK#9kÒâ¼å 9dn9d¾ Dã¶ã G6 Eq¹"Ø/×LëÌFä9ÚPïI5[V¨ô³=Û´Åã3x7×m¾ÒÖ¤ÓN W"ÅÇRì$Ä!±YÓ~¸þÓPÔçT°ïvIIln¤¨Üy·èÆ©¥D|rÄfø}Ô¤LÓwÍÈë/
Æ´xåäØ;¬¥%JÕi] yHW£ /µé¨Vz¤yhõÕÖw6yÕg{ U J=&y,Ä#vK{ ÷-µ¢ä¹(9àBÍ&Öbf»I¢dZ+B}Hê6ZzIܳ(e,}iHÐy\íÕ¡]C¿:}Ôax5J&¥¿üÔm§Ã(HúëÕ\_ëz7PÅGq6éÇMng(5P±¾ÝÓßdã
+è!¬©EÒFÄ潬HƦÈäK.ÔlBªYÈäEÎÅ+Ô#</r#æ£K2G'ÙécÒÌÙkÏ|ÈÂXÛTØîâ«*¶U\ÂìfÙ(kºÁ¸ÐðÝ*!ORÑÖAÃdæRãº[<¶+×ç{ÒR¡×$MV¼Ö¡TæÉ!ÂÐq4^ã'-M5ØikJ])öiÉ#l¨)dI%V¢¸³ Ú=+¹ØhJè@"u¨ÙÞ ¹-uøÞÐ O$¶knÈ@X\רËÈ U¶Ú¸ìÐÀÉ#i&»è¶ÛmÏRö/Í×ìÓ|"¡oØMÄCëlаî"Ë>³µ°öë×èJ
+rçGzC &ì§RÎé=j&æHÝ%I×c2ÞSç/LAG:¢©¸
G=j§Ö5_-ÊʶZõaÕ #æTÜÈBz¹Õß&>>
¶cØÊÊ»rÌÑ(Eä2ÔLâFgª¡l^Õ[*HúÒÈtq^¦H×9YÓâe]¤¨Ý]XÏHļ¶ÎÈ/^ÍÆ\Mq-Ó¢mUF»LÓg3G*Ó%¨%:ÇaÕHÏæ ÓáUUÓÕf£¨!ç%(<E÷kM$Ùd©b×xÓdLÝËÙ#îK*ÙÎÙä¶ðz¹ÉÙHµHãcyÚÙÒæ\ÙË&A9¹Ë'¸¦Z¼4Ðãf'cÆÏÒéM£Ü¶F½%q8R¦]q4Q#¯$´ÄÒªLeK£eÚ䶤Ä+ܵ6UCaÛFW!Ù<§AÒ[© ª¥#ãîHä±!¨%¾ºê[!²X±ù»BÃ;Ò/bYÙ^¢IT³3À¡ºÝR$ðÀû+®£ÄÁ¸4¯8äÒïaÝSÐá1[bólo@ÜtV ½ìuØÒp¦¶ÛÒkj!Òà ÉÙ únRäs ¦ß·*t Ö¢ª®ÒâJ# ·Ø èá'ÖÊV«x ¢â4³ Z¢³Ñh®a~²£¶¹#rZN¤fÀ7L͸âîÀÖUnÆäѤjat EbÔÐ meé¹,îÀ#:Ï] CѶÑf»é¢~À9{W7*àJÒlZêÀ<åjZÕ
&kE"Ñ(¬m¡ÀHÝq EiXàIi·59j±ÉÑfaÀ6»\´ÀDä4 G*ÆäàJÍjWÑ£)! Z2xB§ãtÀUF:ìv*ÕÑaµ%#à@G#I)dÀE"µK 79#à9[r7[Ò ¬¥+è (Ü[`6ÛÆäd 7$¶ÛØ 9mÇ$Ö©TæT I#I7
ÎRGP ¦»kÒ ÒÜq¹×hT.Bì@)k2ãÈà¹[qçÀÀ·\²]exÀÇ¢&£Öè[îIdÀ*mE´«Ô (e3¾ %2uêÔ@EÖ[Ö`{eQz'q9#ì@HÜÉ,|@I,É,\ 6ìq¶ä
\ No newline at end of file
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/to-change.gsm
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/to-change.gsm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/to-enter-a-diff.gsm
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-speeddial/sounds/to-enter-a-diff.gsm
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,11 @@
+freepbx-module-timeconditions (2.2-2.4.1-2) unstable; urgency=low
+
+ * added sqlite3 support, closes upstream #1774
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 14:07:52 +0200
+
+freepbx-module-timeconditions (2.2-2.4.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:32:25 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-timeconditions
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-timeconditions
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Time Conditions
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:32:25 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/timeconditions/
+*.sql usr/share/freepbx/modules/timeconditions/
+*.sqlite usr/share/freepbx/modules/timeconditions/
+*.html usr/share/freepbx/modules/timeconditions/
+*.xml usr/share/freepbx/modules/timeconditions/
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/00list
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/00list 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/00list 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+sqlite3-support
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/sqlite3-support.dpatch
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/sqlite3-support.dpatch 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/sqlite3-support.dpatch 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,43 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## sqlite3-support.dpatch by Diego Iastrubni <diego.iastrubni at xorcom.com>
+##
+## DP: SQLite3 support. See http://www.freepbx.org/trac/ticket/1774
+
+ at DPATCH@
+diff -urNad freepbx-module-timeconditions~/install.php freepbx-module-timeconditions/install.php
+--- freepbx-module-timeconditions~/install.php 1970-01-01 02:00:00.000000000 +0200
++++ freepbx-module-timeconditions/install.php 2007-02-14 14:03:57.000000000 +0200
+@@ -0,0 +1,22 @@
++<?php
++
++global $db;
++global $amp_conf;
++
++$autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT";
++
++$sql = "CREATE TABLE IF NOT EXISTS timeconditions (
++ timeconditions_id INTEGER NOT NULL PRIMARY KEY $autoincrement,
++ displayname VARCHAR( 50 ) ,
++ time VARCHAR( 100 ) ,
++ truegoto VARCHAR( 50 ) ,
++ falsegoto VARCHAR( 50 ),
++ deptname VARCHAR( 50 )
++)";
++
++$check = $db->query($sql);
++ if(DB::IsError($check)) {
++ die("Can not create `timeconditions` table\n");
++}
++
++?>
+diff -urNad freepbx-module-timeconditions~/install.sql freepbx-module-timeconditions/install.sql
+--- freepbx-module-timeconditions~/install.sql 2006-05-31 13:16:44.000000000 +0300
++++ freepbx-module-timeconditions/install.sql 1970-01-01 02:00:00.000000000 +0200
+@@ -1 +0,0 @@
+-CREATE TABLE IF NOT EXISTS timeconditions ( timeconditions_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , displayname VARCHAR( 50 ) , time VARCHAR( 100 ) , truegoto VARCHAR( 50 ) , falsegoto VARCHAR( 50 ), deptname VARCHAR( 50 ));
+diff -urNad freepbx-module-timeconditions~/unistall.sql freepbx-module-timeconditions/unistall.sql
+--- freepbx-module-timeconditions~/unistall.sql 2006-05-31 13:16:44.000000000 +0300
++++ freepbx-module-timeconditions/unistall.sql 2007-02-14 14:04:13.000000000 +0200
+@@ -1 +1 @@
+-DROP TABLE timeconditions;
++DROP TABLE IF EXISTS timeconditions;
Property changes on: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/patches/sqlite3-support.dpatch
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install timeconditions || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall timeconditions || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall timeconditions || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-timeconditions/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,176 @@
+<?php /* $Id */
+
+// returns a associative arrays with keys 'destination' and 'description'
+function timeconditions_destinations() {
+ //get the list of meetmes
+ $results = timeconditions_list();
+
+ // return an associative array with destination and description
+ if (isset($results)) {
+ foreach($results as $result){
+ $extens[] = array('destination' => 'timeconditions,'.$result['timeconditions_id'].',1', 'description' => $result['displayname']);
+ }
+ return $extens;
+ } else {
+ return null;
+ }
+}
+
+
+/* Generates dialplan for conferences
+ We call this with retrieve_conf
+*/
+function timeconditions_get_config($engine) {
+ global $ext; // is this the best way to pass this?
+ global $conferences_conf;
+ switch($engine) {
+ case "asterisk":
+ $timelist = timeconditions_list();
+ if(is_array($timelist)) {
+ foreach($timelist as $item) {
+ $thisitem = timeconditions_get(ltrim($item['timeconditions_id']));
+ // add dialplan
+ $ext->add('timeconditions', $item['timeconditions_id'], '', new ext_gotoiftime($item['time'],$item['truegoto']));
+ $ext->add('timeconditions', $item['timeconditions_id'], '', new ext_goto($item['falsegoto']));
+ }
+ }
+ break;
+ }
+}
+
+//get the existing meetme extensions
+function timeconditions_list() {
+ $results = sql("SELECT * FROM timeconditions","getAll",DB_FETCHMODE_ASSOC);
+ if(is_array($results)){
+ foreach($results as $result){
+ // check to see if we have a dept match for the current AMP User.
+ if (checkDept($result['deptname'])){
+ // return this item's dialplan destination, and the description
+ $allowed[] = $result;
+ }
+ }
+ }
+ if (isset($allowed)) {
+ return $allowed;
+ } else {
+ return null;
+ }
+}
+
+function timeconditions_get($id){
+ //get all the variables for the meetme
+ $results = sql("SELECT * FROM timeconditions WHERE timeconditions_id = '$id'","getRow",DB_FETCHMODE_ASSOC);
+ return $results;
+}
+
+function timeconditions_del($id){
+ $results = sql("DELETE FROM timeconditions WHERE timeconditions_id = \"$id\"","query");
+}
+
+function timeconditions_get_time( $hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish) {
+
+ //----- Time Hour Interval proccess ----
+ if ($minute_start == '-') {
+ $time_minute_start = "*";
+ } else {
+ $time_minute_start = sprintf("%02d",$minute_start);
+ }
+ if ($minute_finish == '-') {
+ $time_minute_finish = "*";
+ } else {
+ $time_minute_finish = sprintf("%02d",$minute_finish);
+ }
+ if ($hour_start == '-') {
+ $time_hour_start = '*';
+ } else {
+ $time_hour_start = sprintf("%02d",$hour_start) . ':' . $time_minute_start;
+ }
+ if ($hour_finish == '-') {
+ $time_hour_finish = '*';
+ } else {
+ $time_hour_finish = sprintf("%02d",$hour_finish) . ':' . $time_minute_finish;
+ }
+ if ($time_hour_start == $time_hour_finish) {
+ $time_hour = $time_hour_start;
+ } else {
+ $time_hour = $time_hour_start . '-' . $time_hour_finish;
+ }
+ //----- Time Week Day Interval proccess -----
+ if ($wday_start == '-') {
+ $time_wday_start = '*';
+ } else {
+ $time_wday_start = $wday_start;
+ }
+ if ($wday_finish == '-') {
+ $time_wday_finish = '*';
+ } else {
+ $time_wday_finish = $wday_finish;
+ }
+ if ($time_wday_start == $time_wday_finish) {
+ $time_wday = $time_wday_start;
+ } else {
+ $time_wday = $time_wday_start . '-' . $time_wday_finish;
+ }
+ //----- Time Month Day Interval proccess -----
+ if ($mday_start == '-') {
+ $time_mday_start = '*';
+ } else {
+ $time_mday_start = $mday_start;
+ }
+ if ($mday_finish == '-') {
+ $time_mday_finish = '*';
+ } else {
+ $time_mday_finish = $mday_finish;
+ }
+ if ($time_mday_start == $time_mday_finish) {
+ $time_mday = $time_mday_start;
+ } else {
+ $time_mday = $time_mday_start . '-' . $time_mday_finish;
+ }
+ //----- Time Month Interval proccess -----
+ if ($month_start == '-') {
+ $time_month_start = '*';
+ } else {
+ $time_month_start = $month_start;
+ }
+ if ($month_finish == '-') {
+ $time_month_finish = '*';
+ } else {
+ $time_month_finish = $month_finish;
+ }
+ if ($time_month_start == $time_month_finish) {
+ $time_month = $time_month_start;
+ } else {
+ $time_month = $time_month_start . '-' . $time_month_finish;
+ }
+ $time = $time_hour . '|' . $time_wday . '|' . $time_mday . '|' . $time_month;
+ return $time;
+}
+
+function timeconditions_add($post){
+ if(!timeconditions_chk($post))
+ return false;
+ extract($post);
+
+ $time = timeconditions_get_time( $hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish);
+
+ if(empty($displayname)) $displayname = "unnamed";
+ $results = sql("INSERT INTO timeconditions (displayname,time,truegoto,falsegoto,deptname) values (\"$displayname\",\"$time\",\"${$goto0.'0'}\",\"${$goto1.'1'}\",\"$deptname\")");
+}
+
+function timeconditions_edit($id,$post){
+ if(!timeconditions_chk($post))
+ return false;
+ extract($post);
+
+ $time = timeconditions_get_time( $hour_start, $minute_start, $hour_finish, $minute_finish, $wday_start, $wday_finish, $mday_start, $mday_finish, $month_start, $month_finish);
+
+ if(empty($displayname)) $displayname = "unnamed";
+ $results = sql("UPDATE timeconditions SET displayname = \"$displayname\", time = \"$time\", truegoto = \"${$goto0.'0'}\", falsegoto = \"${$goto1.'1'}\", deptname = \"$deptname\" WHERE timeconditions_id = \"$id\"");
+}
+
+// ensures post vars is valid
+function timeconditions_chk($post){
+ return true;
+}
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES/timeconditions.mo
===================================================================
(Binary files differ)
Property changes on: freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES/timeconditions.mo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES/timeconditions.po
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES/timeconditions.po 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/i18n/he_IL/LC_MESSAGES/timeconditions.po 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,181 @@
+# Hebrew version for Time Conditions FreePBX Module.
+# Copyright (C) 2006
+# This file is distributed under the same license as the PACKAGE package.
+# Shimi <shimi at shimi.net>, 2006.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: FreePBX 2.2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-17 17:20+0300\n"
+"PO-Revision-Date: 2006-10-17 17:30+0300\n"
+"Last-Translator: Shimi <shimi at shimi.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: page.timeconditions.php:46 page.timeconditions.php:121
+#: page.timeconditions.php:130
+msgid "Add Time Condition"
+msgstr "××ספת ×ª× ×× ×××"
+
+#: page.timeconditions.php:57
+msgid "Server time:"
+msgstr "×©×¢× ×שרת:"
+
+#: page.timeconditions.php:111
+msgid "Time Condition"
+msgstr "×ª× ×× ×××"
+
+#: page.timeconditions.php:111
+msgid "deleted"
+msgstr "× ××ק"
+
+#: page.timeconditions.php:121
+msgid "Time Condition:"
+msgstr "×ª× ×× ×××:"
+
+#: page.timeconditions.php:123
+msgid "Delete Time Condition"
+msgstr "××ק ×ª× ×× ×××"
+
+#: page.timeconditions.php:130
+msgid "Edit Time Condition"
+msgstr "ער×× ×ª× ×× ×××"
+
+#: page.timeconditions.php:137
+msgid "Time Condition name:"
+msgstr "×©× ×ª× ×× ××××:"
+
+#: page.timeconditions.php:137
+msgid "Give this Time Condition a brief name to help you identify it."
+msgstr "×ª× ××ª× ×× ××× ×× ×©× ×§×¦×¨ ש××¢××ר ×× ××××ת ××ת×."
+
+#: page.timeconditions.php:141
+msgid "Time to match:"
+msgstr "××× ×©×ש ××ת×××:"
+
+#: page.timeconditions.php:141
+msgid ""
+"time range|days of week|days of month|months<br><br>you can use an * as a "
+"wildcard.<br><br>ex: <b>9:00-17:00|mon-fri|*|*</b>"
+msgstr ""
+"time range|days of week|days of month|months<br><br>××ª× ×××× ××שת×ש × * ××× ××××× ××× "
+"×××.<br><br>×××××: <b>9:00-17:00|mon-fri|*|*</b>"
+
+#: page.timeconditions.php:152
+msgid "Time to start:"
+msgstr "××× ××ת×××:"
+
+#: page.timeconditions.php:195
+msgid "Time to finish:"
+msgstr "××× ×ס×××:"
+
+#: page.timeconditions.php:234
+msgid "Week Day Start:"
+msgstr "××× ×ת××× ×ש×××¢:"
+
+#: page.timeconditions.php:244 page.timeconditions.php:283
+msgid "Monday"
+msgstr "×©× ×"
+
+#: page.timeconditions.php:248 page.timeconditions.php:287
+msgid "Tuesday"
+msgstr "ש××ש×"
+
+#: page.timeconditions.php:252 page.timeconditions.php:291
+msgid "Wednesday"
+msgstr "ר×××¢×"
+
+#: page.timeconditions.php:256 page.timeconditions.php:295
+msgid "Thursday"
+msgstr "×××ש×"
+
+#: page.timeconditions.php:260 page.timeconditions.php:299
+msgid "Friday"
+msgstr "ש×ש×"
+
+#: page.timeconditions.php:264 page.timeconditions.php:303
+msgid "Saturday"
+msgstr "ש×ת"
+
+#: page.timeconditions.php:268 page.timeconditions.php:307
+msgid "Sunday"
+msgstr "ר×ש××"
+
+#: page.timeconditions.php:273
+msgid "Week Day finish:"
+msgstr "××× ×ש×××¢ ×ס×××:"
+
+#: page.timeconditions.php:312
+msgid "Month Day start:"
+msgstr "××× ××××ש ××ת×××:"
+
+#: page.timeconditions.php:337
+msgid "Month Day finish:"
+msgstr "××× ××××ש ×ס×××:"
+
+#: page.timeconditions.php:354
+msgid "Month start:"
+msgstr "×××ש ××ת×××:"
+
+#: page.timeconditions.php:372 page.timeconditions.php:430
+msgid "January"
+msgstr "×× ××ר"
+
+#: page.timeconditions.php:376 page.timeconditions.php:434
+msgid "February"
+msgstr "פ×ר××ר"
+
+#: page.timeconditions.php:380 page.timeconditions.php:438
+msgid "March"
+msgstr "×רץ"
+
+#: page.timeconditions.php:384 page.timeconditions.php:442
+msgid "April"
+msgstr "×פר××"
+
+#: page.timeconditions.php:388 page.timeconditions.php:446
+msgid "May"
+msgstr "×××"
+
+#: page.timeconditions.php:392 page.timeconditions.php:450
+msgid "June"
+msgstr "××× ×"
+
+#: page.timeconditions.php:396 page.timeconditions.php:454
+msgid "July"
+msgstr "××××"
+
+#: page.timeconditions.php:400 page.timeconditions.php:458
+msgid "August"
+msgstr "××××ס×"
+
+#: page.timeconditions.php:404 page.timeconditions.php:462
+msgid "September"
+msgstr "ספ×××ר"
+
+#: page.timeconditions.php:408 page.timeconditions.php:466
+msgid "October"
+msgstr "××ק×××ר"
+
+#: page.timeconditions.php:411 page.timeconditions.php:470
+msgid "November"
+msgstr "× ××××ר"
+
+#: page.timeconditions.php:415 page.timeconditions.php:474
+msgid "December"
+msgstr "×צ××ר"
+
+#: page.timeconditions.php:421
+msgid "Month finish:"
+msgstr "×××ש ס×××:"
+
+#: page.timeconditions.php:480
+msgid "Destination if time matches"
+msgstr "××¢× ×× ×××× ×ת×××"
+
+#: page.timeconditions.php:490
+msgid "Destination if time does not match"
+msgstr "××¢× ×× ×××× ××× × ×ת×××"
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/install.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/install.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/install.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+CREATE TABLE IF NOT EXISTS timeconditions ( timeconditions_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , displayname VARCHAR( 50 ) , time VARCHAR( 100 ) , truegoto VARCHAR( 50 ) , falsegoto VARCHAR( 50 ), deptname VARCHAR( 50 ));
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,21 @@
+<module>
+ <rawname>timeconditions</rawname>
+ <name>Time Conditions</name>
+ <version>2.4.1</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Creates a condition where calls will to one of two destinations (eg, an extension, IVR, ring group..) based on the time and/or date. This can be used for example to ring a receptionist during the day, or go directly to an IVR at night.
+ </description>
+ <changelog>
+ *2.4.1* Add he_IL translation
+ *2.4* Upgrading module version to assist with trixbox upgrades, that have 2.3.1 already, so this needs to be higher. No other changes.
+ *2.3* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <menuitems>
+ <timeconditions>Time Conditions</timeconditions>
+ </menuitems>
+ <location>release/2.2/timeconditions-2.4.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-TimeCond</info>
+ <md5sum>2154f8593c37358b4824f8d6831b7390</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/page.timeconditions.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/page.timeconditions.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/page.timeconditions.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,553 @@
+<?php /* $Id */
+//Copyright (C) 2004 Coalescent Systems Inc. (info at coalescentsystems.ca)
+//
+//This program 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.
+//
+//This program 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.
+
+
+isset($_REQUEST['action'])?$action = $_REQUEST['action']:$action='';
+//the item we are currently displaying
+isset($_REQUEST['itemid'])?$itemid=mysql_real_escape_string($_REQUEST['itemid']):$itemid='';
+
+$dispnum = "timeconditions"; //used for switch on config.php
+
+//if submitting form, update database
+switch ($action) {
+ case "add":
+ timeconditions_add($_POST);
+ needreload();
+ redirect_standard();
+ break;
+ case "delete":
+ timeconditions_del($itemid);
+ needreload();
+ redirect_standard();
+ break;
+ case "edit": //just delete and re-add
+ timeconditions_edit($itemid,$_POST);
+ needreload();
+ redirect_standard('itemid');
+ break;
+}
+
+
+//get list of time conditions
+$timeconditions = timeconditions_list();
+?>
+
+</div> <!-- end content div so we can display rnav properly-->
+
+<!-- right side menu -->
+<div class="rnav"><ul>
+ <li><a id="<?php echo ($itemid=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Time Condition")?></a></li>
+<?php
+if (isset($timeconditions)) {
+ foreach ($timeconditions as $timecond) {
+ echo "<li><a id=\"".($itemid==$timecond['timeconditions_id'] ? 'current':'')."\" href=\"config.php?display=".urlencode($dispnum)."&itemid=".urlencode($timecond['timeconditions_id'])."\">{$timecond['displayname']}</a></li>";
+ }
+}
+?>
+</ul></div>
+
+<div class="rnav" style="margin:15px 10px; padding: 5px; background: #e0e0ff; border: #2E78A7 solid 1px;">
+ <?php echo _("Server time:")?> <span id="idTime">00:00:00</span>
+</div>
+
+<script>
+var hour = <?php $l = localtime(); echo $l[2]?>;
+var min = <?php $l = localtime(); echo $l[1]?>;
+var sec = <?php $l = localtime(); echo $l[0]?>;
+
+// happily stollen from http://www.aspfaq.com/show.asp?id=2300
+function PadDigits(n, totalDigits)
+{
+ n = n.toString();
+ var pd = '';
+ if (totalDigits > n.length)
+ {
+ for (i=0; i < (totalDigits-n.length); i++)
+ {
+ pd += '0';
+ }
+ }
+ return pd + n.toString();
+}
+
+function updateTime()
+{
+ sec++;
+ if (sec==60)
+ {
+ min++;
+ sec = 0;
+ }
+
+ if (min==60)
+ {
+ hour++;
+ min = 0;
+ }
+
+ if (hour==24)
+ {
+ hour = 0;
+ }
+
+ document.getElementById("idTime").innerHTML = PadDigits(hour,2)+":"+PadDigits(min,2)+":"+PadDigits(sec,2);
+ setTimeout('updateTime()',1000);
+}
+
+updateTime();
+</script>
+
+
+<div class="content">
+<?php
+if ($action == 'delete') {
+ echo '<br><h3>'._("Time Condition").' '.$itemid.' '._("deleted").'!</h3>';
+} else {
+ if ($itemid){
+ //get details for this time condition
+ $thisItem = timeconditions_get($itemid);
+ }
+
+ $delURL = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'].'&action=delete';
+?>
+
+ <h2><?php echo ($itemid ? _("Time Condition:")." ". $itemid : _("Add Time Condition")); ?></h2>
+<?php if ($itemid){ ?>
+ <p><a href="<?php echo $delURL ?>"><?php echo _("Delete Time Condition")?> <?php echo $itemid; ?></a></p>
+<?php } ?>
+ <form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();">
+ <input type="hidden" name="display" value="<?php echo $dispnum?>">
+ <input type="hidden" name="action" value="<?php echo ($itemid ? 'edit' : 'add') ?>">
+ <input type="hidden" name="deptname" value="<?php echo $_SESSION["AMP_user"]->_deptname ?>">
+ <table>
+ <tr><td colspan="2"><h5><?php echo ($itemid ? _("Edit Time Condition") : _("Add Time Condition")) ?><hr></h5></td></tr>
+
+<?php if ($itemid){ ?>
+ <input type="hidden" name="account" value="<?php echo $itemid; ?>">
+<?php }?>
+
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Time Condition name:")?><span><?php echo _("Give this Time Condition a brief name to help you identify it.")?></span></a></td>
+ <td><input type="text" name="displayname" value="<?php echo (isset($thisItem['displayname']) ? $thisItem['displayname'] : ''); ?>"></td>
+ </tr>
+ <tr>
+ <td><a href="#" class="info"><?php echo _("Time to match:")?><span><?php echo _("time range|days of week|days of month|months<br><br>you can use an * as a wildcard.<br><br>ex: <b>9:00-17:00|mon-fri|*|*</b>")?></span></a></td>
+ <?php
+ // ----- Load Time Pattern Variables -----
+ if (isset($thisItem)) {
+ list($time_hour, $time_wday, $time_mday, $time_month) = explode( '|', $thisItem['time'] );
+ } else {
+ list($time_hour, $time_wday, $time_mday, $time_month) = Array('*','-','-','-');
+ }
+
+ ?>
+ <tr>
+ <td><?php echo _("Time to start:")?></td>
+ <td>
+ <?php
+ // Hour could be *, hh:mm, hh:mm-hhmm
+ if ( $time_hour === '*' ) {
+ $hour_start = $hour_finish = '-';
+ $minute_start = $minute_finish = '-';
+ } else {
+ list($hour_start_string, $hour_finish_string) = explode('-', $time_hour);
+ list($hour_start, $minute_start) = explode( ':', $hour_start_string);
+ list($hour_finish, $minute_finish) = explode( ':', $hour_finish_string);
+ if ( !$hour_finish ) $hour_finish = $hour_start;
+ if ( !$minute_finish ) $minute_finish = $minute_start;
+ }
+ ?>
+ <select name="hour_start"/>
+ <?php
+ $default = '';
+ if ( $hour_start === '-' ) $default = ' selected';
+ echo "<option value=\"-\" $default>-";
+ for ($i = 0 ; $i < 24 ; $i++) {
+ $default = "";
+ if ( sprintf("%02d", $i) === $hour_start ) $default = ' selected';
+ echo "<option value=\"$i\" $default> ".sprintf("%02d", $i);
+ }
+ ?>
+ </select>
+ <nbsp>:<nbsp>
+ <select name="minute_start"/>
+ <?php
+ $default = '';
+ if ( $minute_start === '-' ) $default = ' selected';
+ echo "<option value=\"-\" $default>-";
+ for ($i = 0 ; $i < 60 ; $i++) {
+ $default = "";
+ if ( sprintf("%02d", $i) === $minute_start ) $default = ' selected';
+ echo "<option value=\"$i\" $default> ".sprintf("%02d", $i);
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><?php echo _("Time to finish:")?></td>
+ <td>
+ <select name="hour_finish"/>
+ <?php
+ $default = '';
+ if ( $hour_finish === '-' ) $default = ' selected';
+ echo "<option value=\"-\" $default>-";
+ for ($i = 0 ; $i < 24 ; $i++) {
+ $default = "";
+ if ( sprintf("%02d", $i) === $hour_finish) $default = ' selected';
+ echo "<option value=\"$i\" $default> ".sprintf("%02d", $i);
+ }
+ ?>
+ </select>
+ <nbsp>:<nbsp>
+ <select name="minute_finish"/>
+ <?php
+ $default = '';
+ if ( $minute_finish === '-' ) $default = ' selected';
+ echo "<option value=\"-\" $default>-";
+ for ($i = 0 ; $i < 60 ; $i++) {
+ $default = '';
+ if ( sprintf("%02d", $i) === $minute_finish ) $default = ' selected';
+ echo "<option value=\"$i\" $default> ".sprintf("%02d", $i);
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <?php
+ // WDay could be *, day, day1-day2
+ if ( $time_wday != '*' ) {
+ list($wday_start, $wday_finish) = explode('-', $time_wday);
+ if ( !$wday_finish) $wday_finish = $wday_start;
+ } else {
+ $wday_start = $wday_finish = '-';
+ }
+ ?>
+ <td><?php echo _("Week Day Start:")?></td>
+ <td>
+ <select name="wday_start"/>
+ <?php
+ if ( $wday_start == '-' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"-\" $default>-";
+
+ if ( $wday_start == 'mon' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"mon\" $default>" . _("Monday");
+
+ if ( $wday_start == 'tue' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"tue\" $default>" . _("Tuesday");
+
+ if ( $wday_start == 'wed' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"wed\" $default>" . _("Wednesday");
+
+ if ( $wday_start == 'thu' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"thu\" $default>" . _("Thursday");
+
+ if ( $wday_start == 'fri' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"fri\" $default>" . _("Friday");
+
+ if ( $wday_start == 'sat' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"sat\" $default>" . _("Saturday");
+
+ if ( $wday_start == 'sun' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"sun\" $default>" . _("Sunday");
+ ?>
+ </td>
+ </tr>
+ <tr>
+ <td><?php echo _("Week Day finish:")?></td>
+ <td>
+ <select name="wday_finish"/>
+ <?php
+ if ( $wday_finish == '-' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"-\" $default>-";
+
+ if ( $wday_finish == 'mon' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"mon\" $default>" . _("Monday");
+
+ if ( $wday_finish == 'tue' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"tue\" $default>" . _("Tuesday");
+
+ if ( $wday_finish == 'wed' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"wed\" $default>" . _("Wednesday");
+
+ if ( $wday_finish == 'thu' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"thu\" $default>" . _("Thursday");
+
+ if ( $wday_finish == 'fri' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"fri\" $default>" . _("Friday");
+
+ if ( $wday_finish == 'sat' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"sat\" $default>" . _("Saturday");
+
+ if ( $wday_finish == 'sun' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"sun\" $default>" . _("Sunday");
+ ?>
+ </td>
+ </tr>
+ <tr>
+ <td><?php echo _("Month Day start:")?></td>
+ <?php
+ // MDay could be *, day, day1-day2
+ if ( $time_mday != '*' ) {
+ list($mday_start, $mday_finish) = explode('-', $time_mday);
+ if ( !$mday_finish) $mday_finish = $mday_start;
+ } else {
+ $mday_start = $mday_finish = '-';
+ }
+ ?>
+ <td>
+ <select name="mday_start"/>
+ <?php
+ $default = '';
+ if ( $mday_start == '-' ) $default = ' selected';
+ echo "<option value=\"-\" $default>-";
+ for ($i = 1 ; $i < 32 ; $i++) {
+ $default = '';
+ if ( $i == $mday_start ) $default = ' selected';
+ echo "<option value=\"$i\" $default> $i";
+ }
+ ?>
+ </select>
+ </td>
+ <tr>
+ <td><?php echo _("Month Day finish:")?></td>
+ <td>
+ <select name="mday_finish"/>
+ <?php
+ $default = '';
+ if ( $mday_finish == '-' ) $default = ' selected';
+ echo "<option value=\"-\" $default>-";
+ for ($i = 1 ; $i < 32 ; $i++) {
+ $default = '';
+ if ( $i == $mday_finish ) $default = ' selected';
+ echo "<option value=\"$i\" $default> $i";
+ }
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><?php echo _("Month start:")?></td>
+ <?php
+ // Month could be *, month, month1-month2
+ if ( $time_month != '*' ) {
+ list($month_start, $month_finish) = explode('-', $time_month);
+ if ( !$month_finish) $month_finish = $month_start;
+ } else {
+ $month_start = $month_finish = '-';
+ }
+ ?>
+ <td>
+ <select name="month_start"/>
+ <?php
+ if ( $month_start == '-' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"-\" $default>-";
+ if ( $month_start == 'jan' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"jan\" $default>" . _("January");
+
+ if ( $month_start == 'feb' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"feb\" $default>" . _("February");
+
+ if ( $month_start == 'mar' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"mar\" $default>" . _("March");
+
+ if ( $month_start == 'apr' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"apr\" $default>" . _("April");
+
+ if ( $month_start == 'may' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"may\" $default>" . _("May");
+
+ if ( $month_start == 'jun' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"jun\" $default>" . _("June");
+
+ if ( $month_start == 'jul' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"jul\" $default>" . _("July");
+
+ if ( $month_start == 'aug' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"aug\" $default>" . _("August");
+
+ if ( $month_start == 'sep' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"sep\" $default>" . _("September");
+
+ if ( $month_start == 'oct' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"oct\" $default>" . _("October");
+ if ( $month_start == 'nov' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"nov\" $default>" . _("November");
+
+ if ( $month_start == 'dec' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"dec\" $default>" . _("December");
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><?php echo _("Month finish:")?></td>
+ <td>
+ <select name="month_finish"/>
+ <?php
+ if ( $month_finish == '-' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"-\" $default>-";
+ if ( $month_finish == 'jan' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"jan\" $default>" . _("January");
+
+ if ( $month_finish == 'feb' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"feb\" $default>" . _("February");
+
+ if ( $month_finish == 'mar' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"mar\" $default>" . _("March");
+
+ if ( $month_finish == 'apr' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"apr\" $default>" . _("April");
+
+ if ( $month_finish == 'may' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"may\" $default>" . _("May");
+
+ if ( $month_finish == 'jun' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"jun\" $default>" . _("June");
+
+ if ( $month_finish == 'jul' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"jul\" $default>" . _("July");
+
+ if ( $month_finish == 'aug' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"aug\" $default>" . _("August");
+
+ if ( $month_finish == 'sep' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"sep\" $default>" . _("September");
+
+ if ( $month_finish == 'oct' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"oct\" $default>" . _("October");
+
+ if ( $month_finish == 'nov' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"nov\" $default>" . _("November");
+
+ if ( $month_finish == 'dec' ) { $default = ' selected'; }
+ else {$default = '';}
+ echo "<option value=\"dec\" $default>" . _("December");
+ ?>
+ </select>
+ </td>
+ </tr>
+ </tr>
+ <tr><td colspan="2"><br><h5><?php echo _("Destination if time matches")?>:<hr></h5></td></tr>
+<?php
+//draw goto selects
+if (isset($thisItem)) {
+ echo drawselects($thisItem['truegoto'],0);
+} else {
+ echo drawselects(null, 0);
+}
+?>
+
+ <tr><td colspan="2"><br><h5><?php echo _("Destination if time does not match")?>:<hr></h5></td></tr>
+
+<?php
+//draw goto selects
+if (isset($thisItem)) {
+ echo drawselects($thisItem['falsegoto'],1);
+} else {
+ echo drawselects(null, 1);
+}
+?>
+
+ <tr>
+ <td colspan="2"><br><h6><input name="Submit" type="submit" value="<?php echo _("Submit Changes")?>"></h6></td>
+ </tr>
+ </table>
+<script language="javascript">
+<!--
+
+var theForm = document.edit;
+theForm.displayname.focus();
+
+function edit_onsubmit() {
+ var msgInvalidTimeCondName = "<?php echo _('Please enter a valid Time Conditions Name'); ?>";
+ var msgInvalidTimeMatch = "<?php echo _('Please enter the Time to Match, or set all to - to match all times.'); ?>";
+ var msgInvalidDay = "<?php echo _('Please select BOTH or NO days, not just one.'); ?>";
+ var msgInvalidMday = "<?php echo _('Please select BOTH or NO days of the month, not just one.'); ?>";
+ var msgInvalidMth = "<?php echo _('Please select BOTH or NO months, not just one.'); ?>";
+
+
+ defaultEmptyOK = false;
+ if (!isAlphanumeric(theForm.displayname.value))
+ return warnInvalid(theForm.displayname, msgInvalidTimeCondName);
+
+ // Check to see that they're either all '-' or all numbers.
+ if ((theForm.hour_start.value == "-" || theForm.hour_finish.value == "-" || theForm.minute_start.value == "-" || theForm.minute_finish.value == "-") && (theForm.hour_start.value != "-" || theForm.hour_finish.value != "-" || theForm.minute_start.value != "-" || theForm.minute_finish.value != "-"))
+ return warnInvalid(theForm.displayname, msgInvalidTimeMatch);
+
+ if ((theForm.wday_start.value == "-" || theForm.wday_finish.value == "-") && (theForm.wday_start.value != "-" ||theForm.wday_finish.value != "-" ))
+ return warnInvalid(theForm.displayname, msgInvalidDay);
+
+ if ((theForm.mday_start.value == "-" || theForm.mday_finish.value == "-") && (theForm.mday_start.value != "-" || theForm.mday_finish.value != "-" ))
+ return warnInvalid(theForm.displayname, msgInvalidMday);
+
+ if ((theForm.month_start.value == "-" || theForm.month_finish.value == "-") && (theForm.month_start.value != "-" || theForm.month_finish.value != "-" ))
+ return warnInvalid(theForm.displayname, msgInvalidMth);
+
+ if (!validateDestinations(edit,2,true))
+ return false;
+
+ return true;
+}
+
+
+//-->
+</script>
+
+
+ </form>
+<?php
+} //end if action == delete
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-timeconditions/unistall.sql
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-timeconditions/unistall.sql 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-timeconditions/unistall.sql 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+DROP TABLE timeconditions;
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+freepbx-module-voicemail (2.2-1.6.1-1) unstable; urgency=low
+
+ * First release.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 14 Feb 2007 10:33:16 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,14 @@
+Source: freepbx-module-voicemail
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Standards-Version: 3.7.2
+
+Package: freepbx-module-voicemail
+Architecture: all
+Depends: freepbx-admin
+Description: FreePBX module: Voicemail
+ This is a freepbx-module, see information on
+ Wed, 14 Feb 2007 10:33:16 +0200
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+This freepbx module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
+
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,5 @@
+*.php usr/share/freepbx/modules/voicemail/
+*.sql usr/share/freepbx/modules/voicemail/
+*.sqlite usr/share/freepbx/modules/voicemail/
+*.html usr/share/freepbx/modules/voicemail/
+*.xml usr/share/freepbx/modules/voicemail/
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,40 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ /usr/share/asterisk/bin/module_admin install voicemail || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,49 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall voicemail || echo "Continuing anyway"
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall voicemail || echo "Continuing anyway"
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-voicemail/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/functions.inc.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/functions.inc.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/functions.inc.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,332 @@
+<?php
+
+function voicemail_get_config($engine) {
+ $modulename = 'voicemail';
+
+ // This generates the dialplan
+ global $ext;
+ switch($engine) {
+ case "asterisk":
+ if (is_array($featurelist = featurecodes_getModuleFeatures($modulename))) {
+ foreach($featurelist as $item) {
+ $featurename = $item['featurename'];
+ $fname = $modulename.'_'.$featurename;
+ if (function_exists($fname)) {
+ $fcc = new featurecode($modulename, $featurename);
+ $fc = $fcc->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 voicemail_myvoicemail($c) {
+ global $ext;
+
+ $id = "app-vmmain"; // 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_macro('user-callerid')); // $cmd,n,Macro(user-callerid)
+ $ext->add($id, $c, '', new ext_macro('get-vmcontext','${CALLERID(num)}'));
+ $ext->add($id, $c, '', new ext_vmmain('${CALLERID(num)}@${VMCONTEXT}')); // n,VoiceMailMain(${VMCONTEXT})
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+function voicemail_dialvoicemail($c) {
+ global $ext;
+
+ $id = "app-dialvm"; // 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_vmmain('')); // n,VoiceMailMain(${VMCONTEXT})
+ $ext->add($id, $c, '', new ext_macro('hangupcall'));
+
+ // Note that with this one, it has paramters. So we have to add '_' to the start and '.' to the end
+ // of $c
+ $c = "_$c.";
+ $ext->add($id, $c, '', new ext_answer('')); // $cmd,1,Answer
+ $ext->add($id, $c, '', new ext_wait('1')); // $cmd,n,Wait(1)
+ // How long is the command? We need to strip that off the front
+ $clen = strlen($c)-2;
+ $ext->add($id, $c, '', new ext_macro('get-vmcontext','${EXTEN:'.$clen.'}'));
+ $ext->add($id, $c, '', new ext_vmmain('${EXTEN:'.$clen.'}@${VMCONTEXT}')); // n,VoiceMailMain(${VMCONTEXT})
+ $ext->add($id, $c, '', new ext_macro('hangupcall')); // $cmd,n,Macro(user-callerid)
+}
+
+function voicemail_configpageinit($pagename) {
+ global $currentcomponent;
+
+ $action = isset($_REQUEST['action'])?$_REQUEST['action']:null;
+ $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;
+ $extension = isset($_REQUEST['extension'])?$_REQUEST['extension']:null;
+ $tech_hardware = isset($_REQUEST['tech_hardware'])?$_REQUEST['tech_hardware']:null;
+
+
+ // We only want to hook 'users' or 'extensions' pages.
+ if ($pagename != 'users' && $pagename != 'extensions')
+ return true;
+ // On a 'new' user, 'tech_hardware' is set, and there's no extension. Hook into the page.
+ if ($tech_hardware != null ) {
+ voicemail_applyhooks();
+ } elseif ($action=="add") {
+ // We don't need to display anything on an 'add', but we do need to handle returned data.
+ // ** WARNING **
+ // Mailbox must be processed before adding / deleting users, therefore $sortorder = 1
+ $currentcomponent->addprocessfunc('voicemail_configprocess', 1);
+ // JS function needed for checking voicemail = Enabled
+ $js = 'return (theForm.vm.value == "enabled");';
+ } elseif ($extdisplay != '' || $pagename == 'users') {
+ // We're now viewing an extension, so we need to display _and_ process.
+ voicemail_applyhooks();
+ $currentcomponent->addprocessfunc('voicemail_configprocess', 1);
+ $js = 'return (theForm.vm.value == "enabled");';
+ $currentcomponent->addjsfunc('isVoiceMailEnabled(notused)',$js);
+ }
+}
+
+function voicemail_applyhooks() {
+ global $currentcomponent;
+
+ // Setup two option lists we need
+ // Enable / Disable list
+ $currentcomponent->addoptlistitem('vmena', 'enabled', 'Enabled');
+ $currentcomponent->addoptlistitem('vmena', 'disabled', 'Disabled');
+ $currentcomponent->setoptlistopts('vmena', 'sort', false);
+ // Yes / No Radio button list
+ $currentcomponent->addoptlistitem('vmyn', 'yes', 'yes');
+ $currentcomponent->addoptlistitem('vmyn', 'no', 'no');
+ $currentcomponent->setoptlistopts('vmyn', 'sort', false);
+
+ // Add the 'proces' function
+ $currentcomponent->addguifunc('voicemail_configpageload');
+}
+
+
+function voicemail_configpageload() {
+ global $currentcomponent;
+
+ // Init vars from $_REQUEST[]
+ $action = isset($_REQUEST['action'])?$_REQUEST['action']:null;
+ $ext = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;
+ $extn = isset($_REQUEST['extension'])?$_REQUEST['extension']:null;
+ $display = isset($_REQUEST['display'])?$_REQUEST['display']:null;
+
+ if ($ext==='') {
+ $extdisplay = $extn;
+ } else {
+ $extdisplay = $ext;
+ }
+ if ($action != 'del') {
+ $vmbox = voicemail_mailbox_get($extdisplay);
+ if ( $vmbox == null ) {
+ $vm = false;
+ $incontext = 'default';
+ $vmpwd = null;
+ $name = null;
+ $email = null;
+ $pager = null;
+ $vmoptions = null;
+ } else {
+ $incontext = isset($vmbox['vmcontext'])?$vmbox['vmcontext']:'default';
+ $vmpwd = $vmbox['pwd'];
+ $name = $vmbox['name'];
+ $email = $vmbox['email'];
+ $pager = $vmbox['pager'];
+ $vmoptions = $vmbox['options'];
+ $vm = true;
+ }
+
+ //loop through all options
+ $options="";
+ if ( isset($vmoptions) && is_array($vmoptions) ) {
+ $alloptions = array_keys($vmoptions);
+ if (isset($alloptions)) {
+ foreach ($alloptions as $option) {
+ if ( ($option!="attach") && ($option!="envelope") && ($option!="saycid") && ($option!="delete") && ($option!='') )
+ $options .= $option.'='.$vmoptions[$option].'|';
+ }
+ $options = rtrim($options,'|');
+ // remove the = sign if there are no options set
+ $options = rtrim($options,'=');
+
+ }
+ extract($vmoptions, EXTR_PREFIX_ALL, "vmops");
+ } else {
+ $vmops_attach = 'no';
+ $vmops_saycid = 'no';
+ $vmops_envelope = 'no';
+ $vmops_delete = 'no';
+ }
+
+ //AMP Users can only add to their department's context
+ $vmcontext = isset($_SESSION["AMP_user"]->_deptname)?$_SESSION["AMP_user"]->_deptname:null;
+
+ if (empty($vmcontext))
+ $vmcontext = (isset($_REQUEST['vmcontext']) ? $_REQUEST['vmcontext'] : $incontext);
+ if (empty($vmcontext))
+ $vmcontext = 'default';
+
+ if ( $vm==true ) {
+ $vmselect = "enabled";
+ } else {
+ $vmselect = "disabled";
+ }
+
+ $fc_vm = featurecodes_getFeatureCode('voicemail', 'dialvoicemail');
+
+ $msgInvalidVmPwd = 'Please enter a valid Voicemail Password, using digits only';
+ $msgInvalidEmail = 'Please enter a valid Email Address';
+ $msgInvalidPager = 'Please enter a valid Pager Email Address';
+ $msgInvalidVMContext = 'VM Context cannot be blank';
+
+ $section = 'Voicemail & Directory';
+ $currentcomponent->addguielem($section, new gui_selectbox('vm', $currentcomponent->getoptlist('vmena'), $vmselect, 'Status', '', false));
+ $currentcomponent->addguielem($section, new gui_textbox('vmpwd', $vmpwd, 'voicemail password', "This is the password used to access the voicemail system.<br><br>This password can only contain numbers.<br><br>A user can change the password you enter here after logging into the voicemail system ($fc_vm) with a phone.", "frm_${display}_isVoiceMailEnabled() && !isInteger()", $msgInvalidVmPwd, false));
+ $currentcomponent->addguielem($section, new gui_textbox('email', $email, 'email address', "The email address that voicemails are sent to.", "frm_${display}_isVoiceMailEnabled() && !isEmail()", $msgInvalidEmail, true));
+ $currentcomponent->addguielem($section, new gui_textbox('pager', $pager, 'pager email address', "Pager/mobile email address that short voicemail notifcations are sent to.", "frm_${display}_isVoiceMailEnabled() && !isEmail()", $msgInvalidEmail, true));
+ $currentcomponent->addguielem($section, new gui_radio('attach', $currentcomponent->getoptlist('vmyn'), $vmops_attach, 'email attachment', "Option to attach voicemails to email."));
+ $currentcomponent->addguielem($section, new gui_radio('saycid', $currentcomponent->getoptlist('vmyn'), $vmops_saycid, 'Play CID', "Read back caller's telephone number prior to playing the incoming message, and just after announcing the date and time the message was left."));
+ $currentcomponent->addguielem($section, new gui_radio('envelope', $currentcomponent->getoptlist('vmyn'), $vmops_envelope, 'Play Envelope', "Envelope controls whether or not the voicemail system will play the message envelope (date/time) before playing the voicemail message. This settng does not affect the operation of the envelope option in the advanced voicemail menu."));
+ $currentcomponent->addguielem($section, new gui_radio('delete', $currentcomponent->getoptlist('vmyn'), $vmops_delete, 'Delete Vmail', "If set to \"yes\" the message will be deleted from the voicemailbox (after having been emailed). Provides functionality that allows a user to receive their voicemail via email alone, rather than having the voicemail able to be retrieved from the Webinterface or the Extension handset. CAUTION: MUST HAVE attach voicemail to email SET TO YES OTHERWISE YOUR MESSAGES WILL BE LOST FOREVER."));
+ $currentcomponent->addguielem($section, new gui_textbox('options', $options, 'vm options', 'Separate options with pipe ( | )<br><br>ie: review=yes|maxmessage=60'));
+ $currentcomponent->addguielem($section, new gui_textbox('vmcontext', $vmcontext, 'vm context', '', "frm_${display}_isVoiceMailEnabled() && isEmpty()", $msgInvalidVMContext, false));
+ }
+}
+
+function voicemail_configprocess() {
+ //create vars from the request
+ extract($_REQUEST);
+ $action = isset($_REQUEST['action'])?$_REQUEST['action']:null;
+ $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;
+
+ //if submitting form, update database
+ switch ($action) {
+ case "add":
+ voicemail_mailbox_add($extdisplay, $_REQUEST);
+ needreload();
+ break;
+ case "del":
+ voicemail_mailbox_del($extdisplay);
+ needreload();
+ break;
+ case "edit":
+ voicemail_mailbox_del($extdisplay);
+ if ( $vm != 'disabled' )
+ voicemail_mailbox_add($extdisplay, $_REQUEST);
+ needreload();
+ break;
+ }
+}
+
+function voicemail_mailbox_get($mbox) {
+ $uservm = voicemail_getVoicemail();
+ $vmcontexts = array_keys($uservm);
+
+ foreach ($vmcontexts as $vmcontext) {
+ if(isset($uservm[$vmcontext][$mbox])){
+ $vmbox['vmcontext'] = $vmcontext;
+ $vmbox['pwd'] = $uservm[$vmcontext][$mbox]['pwd'];
+ $vmbox['name'] = $uservm[$vmcontext][$mbox]['name'];
+ $vmbox['email'] = $uservm[$vmcontext][$mbox]['email'];
+ $vmbox['pager'] = $uservm[$vmcontext][$mbox]['pager'];
+ $vmbox['options'] = $uservm[$vmcontext][$mbox]['options'];
+ return $vmbox;
+ }
+ }
+
+ return null;
+}
+
+function voicemail_mailbox_del($mbox) {
+ $uservm = voicemail_getVoicemail();
+ $vmcontexts = array_keys($uservm);
+
+ foreach ($vmcontexts as $vmcontext) {
+ if(isset($uservm[$vmcontext][$mbox])){
+ unset($uservm[$vmcontext][$mbox]);
+ voicemail_saveVoicemail($uservm);
+ return true;
+ }
+ }
+
+ return false;
+}
+
+function voicemail_mailbox_add($mbox, $mboxoptsarray) {
+ //check if VM box already exists
+ if ( voicemail_mailbox_get($mbox) != null ) {
+ trigger_error("Voicemail mailbox '$mbox' already exists, call to voicemail_maibox_add failed");
+ die();
+ }
+
+ $uservm = voicemail_getVoicemail();
+ extract($mboxoptsarray);
+
+ if ($vm != 'disabled')
+ {
+ // need to check if there are any options entered in the text field
+ if ($options!=''){
+ $options = explode("|",$options);
+ foreach($options as $option) {
+ $vmoption = explode("=",$option);
+ $vmoptions[$vmoption[0]] = $vmoption[1];
+ }
+ }
+ $vmoption = explode("=",$attach);
+ $vmoptions[$vmoption[0]] = $vmoption[1];
+ $vmoption = explode("=",$saycid);
+ $vmoptions[$vmoption[0]] = $vmoption[1];
+ $vmoption = explode("=",$envelope);
+ $vmoptions[$vmoption[0]] = $vmoption[1];
+ $vmoption = explode("=",$delete);
+ $vmoptions[$vmoption[0]] = $vmoption[1];
+
+ $uservm[$vmcontext][$extension] = array(
+ 'mailbox' => $extension,
+ 'pwd' => $vmpwd,
+ 'name' => $name,
+ 'email' => $email,
+ 'pager' => $pager,
+ 'options' => $vmoptions
+ );
+ // Update $_REQUEST with 'devinfo_mailbox, so MWI works.
+ if (empty($_REQUEST['devinfo_mailbox'])) {
+ $_REQUEST['devinfo_mailbox']="$extension@$vmcontext";
+ }
+ }
+ voicemail_saveVoicemail($uservm);
+}
+
+function voicemail_saveVoicemail($vmconf) {
+ // just in case someone tries to be sneaky and not call getVoicemail() first..
+ if ($vmconf == null) die('Error: Trying to write null voicemail file! I refuse to contiune!');
+
+ // yes, this is hardcoded.. is this a bad thing?
+ write_voicemailconf("/etc/asterisk/voicemail.conf", $vmconf, $section);
+}
+
+function voicemail_getVoicemail() {
+ $vmconf = null;
+ $section = null;
+
+ // yes, this is hardcoded.. is this a bad thing?
+ parse_voicemailconf("/etc/asterisk/voicemail.conf", $vmconf, $section);
+
+ return $vmconf;
+}
+
+?>
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/install.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/install.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/install.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,38 @@
+<?php
+global $astman;
+global $amp_conf;
+
+// Register FeatureCode - Activate
+$fcc = new featurecode('voicemail', 'myvoicemail');
+$fcc->setDescription('My Voicemail');
+$fcc->setDefault('*97');
+$fcc->update();
+unset($fcc);
+
+// Register FeatureCode - Deactivate
+$fcc = new featurecode('voicemail', 'dialvoicemail');
+$fcc->setDescription('Dial Voicemail');
+$fcc->setDefault('*98');
+$fcc->update();
+unset($fcc);
+
+//1.6.1
+$modinfo = module_getinfo('voicemail');
+if (is_array($modinfo)) {
+ $ver = $modinfo['voicemail']['dbversion'];
+ if (version_compare($ver,'1.6.1','lt')) { //we have to fix existing users with wrong values for vm ticket #1697
+ checkAstMan();
+ if ($astman) {
+ $sql = "select * from users where voicemail='disabled' or voicemail='';";
+ $users = sql($sql,"getAll",DB_FETCHMODE_ASSOC);
+ foreach($users as $user) {
+ $astman->database_put("AMPUSER",$user['extension']."/voicemail","\"novm\"");
+ }
+ } else {
+ echo _("Cannot connect to Asterisk Manager with ").$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"];
+ }
+ sql("update users set voicemail='novm' where voicemail='disabled' or voicemail='';");
+ }
+}
+
+?>
\ No newline at end of file
Added: freepbx/modules-2.2/modules/freepbx-module-voicemail/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-voicemail/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-voicemail/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,22 @@
+<module>
+ <rawname>voicemail</rawname>
+ <name>Voicemail</name>
+ <version>1.6.1</version>
+ <changelog>
+ *1.6.1* Bump version to fix existing extensions with disabled voicemail #1697
+ *1.6* Re-Fix 1.5.2, bump version for 2.2rc2 release.
+ *1.5.3* Fix for vm Javascript sanity checks only working in DevAndUser mode.
+ *1.5.2* Fix vm not appearing in DeviceAndUser mode
+ *1.5.1* Fix for MWI not working
+ *1.5* Fix issue with vm options not being saved on creation of extension
+ *1.4.2* Change category to Basic
+ *1.4.1* Fixed radio button defaults to 'no' from false so they work
+ *1.4* First release for 2.2. Fix inability to create voicemail box
+ </changelog>
+ <description>This module allows you to configure Voicemail for a user or extension</description>
+ <type>setup</type>
+ <category>Basic</category>
+ <location>release/2.2/voicemail-1.6.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>f5dac5c572e6772b38f3bf9b13146fc0</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/LICENSE
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/LICENSE 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/LICENSE 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,341 @@
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program 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.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/Makefile
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/Makefile 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/Makefile 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,90 @@
+MODULE_NAME=zapauto
+MODULES_DIR=/var/www/html/admin/modules/
+BIN_DIR=/var/lib/asterisk/bin
+SHARE_FILES=detect_zap fix_ast_db zap2amp zap.template
+DESTDIR=
+
+SUDOERS=/etc/sudoers
+LINE=asterisk ALL=NOPASSWD:$(BIN_DIR)/detect_zap
+LINE2=asterisk ALL=NOPASSWD:/etc/init.d/asterisk
+
+
+############
+
+.PHONY: install uninstall forceuninstall remove_share_files
+
+all:
+ @echo "freepbx-module-zapauto installer"
+ @echo " "
+ @echo "usage: make install - install the module"
+ @echo " make uninstall - remove the module"
+ @echo " "
+ @echo "The uninstall target will not remove the PHP files used"
+ @echo "by the web interface. You should remove the module from"
+ @echo "freepbx gui manually."
+ @echo " "
+ @echo " "
+ @echo "For more information, please contact support at xorcom.com"
+ @echo " "
+ @echo " "
+
+installfiles:
+ mkdir -p $(DESTDIR)/$(BIN_DIR)
+ mkdir -p $(DESTDIR)/$(MODULES_DIR)$(MODULE_NAME)
+
+# install support files
+ for i in $(SHARE_FILES); do cp -a share/$$i $(DESTDIR)/$(BIN_DIR); done
+
+# install the main module
+ for j in php sql sqlite html xml; do \
+ for i in *.$$j; do if [ -f $$i ]; then cp -a $$i $(DESTDIR)/$(MODULES_DIR)$(MODULE_NAME); fi done; \
+ done
+
+patchfiles:
+# patch the installed files
+ sed -i -e 's|/usr/share/freepbx-common|/var/lib/asterisk/bin|g' $(DESTDIR)/$(BIN_DIR)/detect_zap
+ sed -i -e 's|/usr/share/asterisk/bin|/var/lib/asterisk/bin|g' $(DESTDIR)/$(BIN_DIR)/detect_zap
+ sed -i -e 's|/usr/share/freepbx-common|/var/lib/asterisk/bin|g' $(DESTDIR)/$(BIN_DIR)/zap2amp
+ sed -i -e 's|/usr/share/asterisk/bin|/var/lib/asterisk/bin|g' $(DESTDIR)/$(BIN_DIR)/zap2amp
+ sed -i -e 's|/usr/share/freepbx|/var/www/html|g' $(DESTDIR)/$(BIN_DIR)/fix_ast_db
+ sed -i -e 's|/usr/share/freepbx-common|/var/lib/asterisk/bin|g' $(DESTDIR)/$(MODULES_DIR)/$(MODULE_NAME)/*.php
+
+install: installfiles patchfiles
+# setup sudo
+ yum install sudo
+ if ! fgrep -q "$(LINE)" $(SUDOERS); then echo "$(LINE)" >> $(SUDOERS); fi
+ if ! fgrep -q "$(LINE2)" $(SUDOERS); then echo "$(LINE2)" >> $(SUDOERS); fi
+
+
+
+uninstall: remove_share_files
+ echo "Please remove the module from freePBX gui"
+
+forceuninstall: remove_share_files
+ rm -fr $(DESTDIR)/$(MODULES_DIR)/$(MODULE_NAME)
+
+REVISION=$(shell svnversion -c . | cut -d: -f2)
+FILENAME=freepbx-module-zapauto-r$(REVISION).tar.gz
+#TMPDIR=$(shell mktemp -d -p /tmp/ freepbx-module-zapauto-XXXXXX)
+TMPDIR=/tmp/freepbx-module/
+
+dist:
+ rm -fr $(TMPDIR)
+ mkdir -p $(TMPDIR)
+ svn export . $(TMPDIR)/freepbx-module-zapauto-r$(REVISION)/
+ sed -i 's/^Release:.*/Release: $(REVISION)/' $(TMPDIR)/freepbx-module-zapauto-r$(REVISION)/freepbx-module-zapauto.spec
+ tar -czf $(FILENAME) -C $(TMPDIR)/ .
+ rm -fr $(TMPDIR)
+
+####################################################3
+$(DESTDIR)/$(MODULES_DIR)/$(MODULE_NAME):
+ mkdir -p $(DESTDIR)/$(MODULES_DIR)/$(MODULE_NAME)
+
+remove_share_files:
+ # clean up sudo
+ fgrep -v "$(LINE)" /etc/sudoers > /etc/sudoers.tmp && cp /etc/sudoers.tmp /etc/sudoers && rm /etc/sudoers.tmp
+ fgrep -v "$(LINE2)" /etc/sudoers > /etc/sudoers.tmp && cp /etc/sudoers.tmp /etc/sudoers && rm /etc/sudoers.tmp
+
+ # remove support scripts
+ #mv /usr/local/sbin/genzaptelconf.trixbox /usr/local/sbin/genzaptelconf
+ for i in $(SHARE_FILES); do rm -f $(DESTDIR)/$(BIN_DIR)/$$i; done
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/README
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/README 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/README 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,60 @@
+Zaptel auto detection module for freepbx
+----------------------------------------
+
+This module is capable of detecting most Zaptel hardware by a single click
+on the WEB interface. The code has a WEB interface, as well as a console only script.
+
+
+You need to install sudo on the machine, as have the following lines in /etc/sudoers :
+
+Debian/Ubuntu:
+ asterisk ALL=NOPASSWD:/usr/share/freepbx-common/detect_zap
+
+Trixbox/Centos/Fedora:
+ asterisk ALL=NOPASSWD:/var/lib/asterisk/bin/detect_zap
+
+These lines are set up by the post install of the RPM/DEB packages,
+so usually you don't need to deal with this. In rare cases
+in which the lines are missing, please add them manually using the "visudo"
+command.
+
+Note that you also need Zaptel 1.2.8 or above, or Zaptel from Xorcom
+above r1789 (we have this code in also in Zaptel 1.2.6). This is because a special
+version of genzaptelconf is needed on /usr/sbin in order for this hardware detection
+to work.
+
+Note that the official RPMs for Trixbox/Centos/Fedora do not contain genzaptelconf
+and that the version of genzaptelconf found in Trixbox (/usr/local/sbin/genzaptelconf)
+is not suitable for this utility.
+
+This version is only for freepbx-2.2.x, and not all other versions.
+
+How it works
+------------
+The hardware detection is splited into 4 logical levels
+
+1) genzaptelconf will generate /etc/zaptel.conf and also make /etc/asterisk/zapata_auto.conf (zapata-channels
+ on Trixbox/Centos/Fedora) with FXO channels only. This stage stops asterisk, generates the FXO definitions
+ as well as the /etc/zaptel.conf needed to properly configure the devices using ztcfg.
+
+2) zap2amp will generate the settings for FXS channels (based on what is found on /etc/zapata.conf) from a
+ template (/var/lib/asterisk/bin/zap.template) and upload then into the sql tables, so you can see the FXS
+ stations as normal extensions on FreePBX (you can put them into ring groups, have them as the default
+ station in incomming calls, etc).
+
+3.a) The retrieve scripts are called. Asterisk configuration are created.
+3.b) Asterisk is restarted with the new Zaptel configuration.
+
+The reason for these stages, is because on zapata HW removal, the configuration will
+be so messed up that asterisk will fail to load and freePBX will be completely
+non functional. This situation is fixed with Asterisk 1.4 (in which case asterisk will load
+without zap channels).
+
+4) fix_ast_db will connect to the Asterisk manager, and create the apropiate astdb entries for
+ dialparties. It will also create the links in the voicemail needed by freePBX to properly work.
+
+If you have any question about the functionality of this package, or bug reports
+please contact support at xorcom.com .
+
+- diego
+
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/changelog
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/changelog 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/changelog 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,74 @@
+freepbx-module-zapauto (2.2-0.6.1-1) unstable; urgency=low
+
+ * New release
+ * Less vebose configuration
+ * Default of the echo canceller is now "yes" instead of "8"
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Tue, 20 Feb 2007 17:28:32 +0200
+
+freepbx-module-zapauto (2.2-0.6.0-1) unstable; urgency=low
+
+ * New version
+ * Targetting version 2.2.X of freePBX
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 7 Feb 2007 17:01:46 +0200
+
+freepbx-module-zapauto (2.1-0.5.7-2) unstable; urgency=low
+
+ * Don't fail detect_zap if beep is not installed.
+
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com> Tue, 19 Dec 2006 20:50:56 +0200
+
+freepbx-module-zapauto (2.1-0.5.7-1) unstable; urgency=low
+
+ * Update the documentation: this module supports freePBX 2.1.X only
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 10 Dec 2006 12:00:00 +0200
+
+freepbx-module-zapauto (2.1-0.5.6-1) unstable; urgency=low
+
+ * New version
+ * Code cleanups
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 22 Nov 2006 12:00:00 +0200
+
+freepbx-module-zapauto (2.1-0.5.4-1) unstable; urgency=low
+
+ * added php5-cgi as an optional dependency (instead of php4-cgi). Now php5
+ and php4 are supported.
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 29 Oct 2006 18:00:00 +0200
+
+freepbx-module-zapauto (2.1-0.5.4-1) unstable; urgency=low
+
+ * New release
+ * /etc/zaptel and /etc/asterisk/zapata*.conf are a+r after detection
+ * 2 beeps will be issued when a new HW has been properly discovered
+ * Recommends "beep" for the audio announce of new HW
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 8 Oct 2006 12:22:14 +0200
+
+freepbx-module-zapauto (2.1-0.5.2-5) unstable; urgency=low
+
+ * Fix module location
+ * /etc/zaptel.conf is made a+r
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Wed, 4 Oct 2006 18:43:00 +0200
+
+freepbx-module-zapauto (2.1-0.5.2-3) unstable; urgency=low
+
+ * Added proper dependencies
+
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Mon, 11 Sep 2006 16:52:48 +0300
+
+freepbx-module-zapauto (2.1-0.5.2-2) unstable; urgency=low
+ * Auto detection shuold work now
+ * ASTDB fixed outsourced to another script, autodetection time speedups
+ * All configuration creation scripts are been run now as "asterisk" user
+ * zap2amp is now more verbose about SQL errors
+ * Page code has been refactored, and should be more readable
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Sun, 09 Jul 2006 14:00:00 +0300
+
+freepbx-module-zapauto (2.1-0.5.1-1) unstable; urgency=low
+ * First release.
+ -- Diego Iastrubni <diego.iastrubni at xorcom.com> Mon, 03 Jul 2006 13:56:45 +0300
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/compat
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/compat 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/compat 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+4
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/control
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/control 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/control 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,15 @@
+Source: freepbx-module-zapauto
+Section: comm
+Priority: optional
+Maintainer: Diego Iastrubni <diego.iastrubni at xorcom.com>
+Uploaders: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Build-Depends: debhelper (>= 4.0.0), dpatch
+Depends: freepbx-admin (>=2.2.0)
+Recommends: beep
+Standards-Version: 3.7.2
+
+Package: freepbx-module-zapauto
+Architecture: all
+Depends: freepbx-admin, sudo, php5-cli | php4-cli
+Description: FreePBX module: Zaptel AutoConfiguration
+ This is a freepbx-module for autoconfiguration of Zaptel hardware
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/copyright
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/copyright 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/copyright 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,4 @@
+This module is licensed under the terms of the GPL.
+
+On Debian GNU/Linux systems, the complete text of the GNU General
+Public License may be found in `/usr/share/common-licenses/GPL'.
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/dirs
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/dirs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/dirs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,2 @@
+usr/share/freepbx-common/
+usr/share/freepbx/modules/
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/install
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/install 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/install 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,6 @@
+*.php usr/share/freepbx/modules/zapauto/
+*.sql usr/share/freepbx/modules/zapauto/
+*.sqlite usr/share/freepbx/modules/zapauto/
+*.html usr/share/freepbx/modules/zapauto/
+*.xml usr/share/freepbx/modules/zapauto/
+share/* usr/share/freepbx-common/
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/postinst
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/postinst 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/postinst 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,53 @@
+#! /bin/sh
+# postinst script for amportal-common
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+ configure)
+ # ugly setup on sudoers, needed for zaptel autodetection
+ SUDOERS=/etc/sudoers
+ LINE="www-data ALL=NOPASSWD:/usr/share/freepbx-common/detect_zap"
+ LINE2="www-data ALL=NOPASSWD:/etc/init.d/asterisk"
+
+ if ! fgrep -q "$LINE" /etc/sudoers ; then
+ echo "$LINE" >> $SUDOERS
+ fi
+
+ if ! fgrep -q "$LINE2" /etc/sudoers ; then
+ echo "$LINE2" >> $SUDOERS
+ fi
+
+ /usr/share/asterisk/bin/module_admin install zapauto || echo "Continuing anyway"
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # dummy
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/prerm
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/prerm 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/prerm 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,59 @@
+#! /bin/bash
+# prerm script for ${package_name}
+#
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+if [ "$DPKG_DEBUG" = "developer" ]; then
+ set -x
+fi
+
+case "$1" in
+ purge)
+ /usr/share/asterisk/bin/module_admin uninstall zapauto || echo "Continuing anyway"
+
+ LINE="www-data ALL=NOPASSWD:/usr/share/freepbx-common/detect_zap"
+ LINE2="www-data ALL=NOPASSWD:/etc/init.d/asterisk"
+ fgrep -v "$LINE" /etc/sudoers > /etc/sudoers.tmp && cp /etc/sudoers.tmp /etc/sudoers && rm /etc/sudoers.tmp
+ fgrep -v "$LINE2" /etc/sudoers > /etc/sudoers.tmp && cp /etc/sudoers.tmp /etc/sudoers && rm /etc/sudoers.tmp
+ ;;
+
+ remove)
+ /usr/share/asterisk/bin/module_admin uninstall zapauto || echo "Continuing anyway"
+
+ LINE="www-data ALL=NOPASSWD:/usr/share/freepbx-common/detect_zap"
+ LINE2="www-data ALL=NOPASSWD:/etc/init.d/asterisk"
+ fgrep -v "$LINE" /etc/sudoers > /etc/sudoers.tmp && cp /etc/sudoers.tmp /etc/sudoers && rm /etc/sudoers.tmp
+ fgrep -v "$LINE2" /etc/sudoers > /etc/sudoers.tmp && cp /etc/sudoers.tmp /etc/sudoers && rm /etc/sudoers.tmp
+ ;;
+
+ upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+# dummy
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/rules
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/rules 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/rules 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,88 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+# export DH_VERBOSE=1
+
+-include /usr/share/dpatch/dpatch.make
+
+MODULE_NAME=$(shell basename $(PWD))
+DESTDIR=/tmp/debuild-svn/$(MODULE_NAME)
+DEBVERSION=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
+UPVERSION=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/-~dfsg$$//')
+FILENAME=$(MODULE_NAME)_$(UPVERSION).tgz
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp: patch-stamp
+ dh_testdir
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp patch-stamp
+ dh_testdir
+ touch build-stamp
+
+clean: clean-unpatched unpatch
+clean-unpatched:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+ dh_install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+ dh_installman
+ dh_link
+ dh_compress
+ dh_fixperms
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+# a hack, not really a solution
+get-orig-source:
+ rm -fr $(DESTDIR)
+ mkdir -p $(DESTDIR)
+ svn export . $(DESTDIR) --force
+ tar -czf $(FILENAME) -C $(DESTDIR) .
+ rm -fr $(DESTDIR)
+ mv $(FILENAME) ../tarballs
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure patch
+
\ No newline at end of file
Property changes on: freepbx/modules-2.2/modules/freepbx-module-zapauto/debian/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/freepbx-module-zapauto.spec
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/freepbx-module-zapauto.spec 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/freepbx-module-zapauto.spec 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,81 @@
+Summary: FreePBX module - Zaptel AutoConfiguration
+Name: freepbx-module-zapauto
+Version: 0.6.1
+Release: 1
+License: GPL
+Group: Applications/System
+URL: http://www.freepbx.org/
+Source: freepbx-module-zapauto-r%{release}.tar.gz
+Packager: Diego Iastrubni <diego.iastrubni at xorcom.com>
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildArch: noarch
+Requires: asterisk, sudo
+
+# TODO:
+# when freepbx will be packaged into RPMS, this will be used
+#Requires: asterisk, sudo, freepbx-common
+
+%description
+This is a freepbx-module for autoconfiguration of Zaptel hardware.
+
+%prep
+%setup -n freepbx-module-zapauto-r%{release}
+
+%install
+[ "%{buildroot}" != '/' ] && rm -rf %{buildroot}
+pwd
+make DESTDIR=%{buildroot} installfiles
+make DESTDIR=%{buildroot} patchfiles
+
+%post
+SUDOERS=/etc/sudoers
+LINE="asterisk ALL=NOPASSWD:/var/lib/asterisk/bin/detect_zap"
+if ! fgrep -q "$LINE" /etc/sudoers; then echo "$LINE" >> $SUDOERS; fi
+
+#LINE2="asterisk ALL=NOPASSWD:/etc/init.d/asterisk"
+#if ! fgrep -q "$LINE2" /etc/sudoers; then echo "$LINE2" >> $SUDOERS; fi
+
+%preun
+# this should be run only on removals, not on upgrades
+# see http://www.rpm.org/hintskinks/buildtree/mdk-rpm/#UPGRADE
+if [ $1 = 0 ]; then
+ SUDOERS=/etc/sudoers
+ LINE="asterisk ALL=NOPASSWD:/var/lib/asterisk/bin/detect_zap"
+ fgrep -v "$LINE" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp
+
+# LINE2="asterisk ALL=NOPASSWD:/etc/init.d/asterisk"
+# fgrep -v "$LINE2" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp
+fi
+
+%files
+%defattr(-,root,root)
+%doc LICENSE
+%doc README
+/var/www/html/admin/modules/zapauto/
+/var/lib/asterisk/bin/detect_zap
+/var/lib/asterisk/bin/fix_ast_db
+/var/lib/asterisk/bin/zap2amp
+/var/lib/asterisk/bin/zap.template
+
+%changelog
+* Tue Feb 20 2007 Diego Iastrubni <diego.iastrubni at xorcom.com> - 0.6.1-1
+- New release
+- Less vebose configuration
+- Default of the echo canceller is now "yes" instead of "8"
+
+* Thu Nov 22 2006 Diego Iastrubni <diego.iastrubni at xorcom.com> - 0.6.0-1
+- New release
+- Targetting version 2.2 of freePBX
+
+* Thu Nov 22 2006 Diego Iastrubni <diego.iastrubni at xorcom.com> - 0.5.5-1
+- New release
+- Code + spec cleanups
+
+* Thu Oct 8 2006 Diego Iastrubni <diego.iastrubni at xorcom.com>
+- New release
+- zaptel.conf and zapata-*.conf are set a+r on detection
+- When new hardware is discovered, you will hear 2 beeps (if the application "beep" is installed)
+
+* Thu Aug 13 2006 Diego Iastrubni <diego.iastrubni at xorcom.com>
+- First release
+
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/module.xml
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/module.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/module.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,13 @@
+<module>
+ <rawname>zapauto</rawname>
+ <name>Zaptel configuration</name>
+ <version>0.6.1</version>
+ <type>setup</type>
+ <category>System Admin</category>
+ <menuitems>
+ <zapauto>Zaptel configuration</zapauto>
+ </menuitems>
+ <location>release/zapauto-0.6.1.tgz</location>
+ <info>http://xorcom.com</info>
+ <md5sum>XXXXXXXXXXXXXXX</md5sum>
+</module>
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/page.zapauto.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/page.zapauto.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/page.zapauto.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,44 @@
+<?php
+/*
+ * Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
+ * Copyright (C) 2005,2006 Xorcom
+ *
+ * All rights reserved.
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * New page, for autodetection of ZAPTEL configuration.
+ * depends on genzaptelconf, and special SUDO setup.
+ *
+ */
+?>
+
+</div>
+
+<div class="content">
+ <?php
+ $detect = $_REQUEST['detect'];
+
+ // to make this page more readable, the logic has been splited into 2 pages:
+ // one asks for confirmation
+ // the other does the logic
+ if (strtolower($detect) != "yes") {
+ include "zap_auto_ask.php";
+ }
+ else {
+ include "zap_auto_detect.php";
+ }
+ ?>
+</div>
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/share/detect_zap
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/share/detect_zap 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/share/detect_zap 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+# Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
+# Copyright (C) 2005,2006 Xorcom
+#
+# All rights reserved.
+#
+# This program 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.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# a small script, which uses genzaptelconf to search for new drivers
+# edit /etc/modules as needed, calling zap2amp to generate AMP configuration
+# and eventually restart asterisk to make it aware of the new HW
+
+
+make_sound_zaptel(){
+ if [ ! -x /usr/bin/beep ]; then
+ return 0
+ fi
+
+# no zaptel channels found - no zaptel HW
+# if ! cat /etc/zaptel.conf | grep -v '^#' | grep -q 'fx.*=[0-9]*'; then
+# exit
+# fi
+
+ if cat /proc/zaptel/* 2> /dev/null | grep -q '/[0-9]/[0-9]/[0-9]' ; then
+ # old ts-1
+ # /usr/bin/beep -f 10000
+
+ # new ts-1
+ beep -f 5000 -l 100 -d 10 -r 2
+ fi
+}
+
+# nullify a file
+blank_file(){
+ if [ -f $1 ]; then
+ rm -f $1
+ touch $1
+ fi
+}
+
+
+set -e
+
+AST_USER=asterisk
+AST_GROUP=asterisk
+AST_SHELL=/bin/sh
+
+# find new HW, asterisk will be running after it, as zap2amp
+# needs asterisk running. will also rewrite /etc/modules
+echo ' * Searching for new zapata hardware'
+
+blank_file /etc/asterisk/zapata-channels.conf
+blank_file /etc/asterisk/zapata-auto.conf
+blank_file /etc/asterisk/zapata_additional.conf
+touch /etc/asterisk/zapata_additional.conf
+
+/usr/sbin/genzaptelconf -d -s -M -F
+/etc/init.d/zaptel restart
+/etc/init.d/asterisk restart
+
+echo ' * Generating amportal configuration'
+chown asterisk. /etc/asterisk/zapata*
+chmod g+rw /etc/asterisk/zapata*
+su $AST_USER -s $AST_SHELL -c /usr/share/freepbx-common/zap2amp
+su $AST_USER -s $AST_SHELL -c /usr/share/asterisk/bin/retrieve_conf
+su $AST_USER -s $AST_SHELL -c /usr/share/freepbx-common/fix_ast_db
+
+echo ' * Reloading zaptel configuration'
+/etc/init.d/asterisk restart
+make_sound_zaptel
+
+if [ -x /etc/init.d/op-panel ]; then
+ echo ' * Reloading Flash Operator Panel'
+ /etc/init.d/op-panel restart
+fi
+
+echo "DONE"
Property changes on: freepbx/modules-2.2/modules/freepbx-module-zapauto/share/detect_zap
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/share/fix_ast_db
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/share/fix_ast_db 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/share/fix_ast_db 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,54 @@
+#!/usr/bin/php -q
+<?php
+
+// Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
+// Copyright (C) 2006, Xorcom
+//
+// All rights reserved.
+//
+// This program 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.
+//
+// This program 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 this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+// this script is used for fixing the asterisk-databse,
+// and putting the needed values by freepbx/dialparties.agi.
+//
+// it should be run after genzaptelconf, and after zap2amp.
+//
+// the functionality of this script was done previously in zap2amp
+// but it was moved out, in favour of using the functions defined
+// by freepbx itself
+//
+// the assumption is that asterisk is running, and there is a user defined
+// in amportal.conf
+
+ini_set( "include_path", "/usr/share/freepbx/:" . ini_get("include_path") );
+
+require_once( 'common/php-asmanager.php' );
+require_once( 'functions.inc.php' );
+require_once( '/usr/share/freepbx/modules/core/functions.inc.php' );
+
+$amp_conf = parse_amportal_conf("/etc/amportal.conf");
+$astman = new AGI_AsteriskManager();
+if (! $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) {
+ unset( $astman );
+}
+
+require_once( 'common/db_connect.php' );
+require_once( 'common/php-asmanager.php' );
+
+core_users2astdb();
+core_devices2astdb();
+
+?>
Property changes on: freepbx/modules-2.2/modules/freepbx-module-zapauto/share/fix_ast_db
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap.template
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap.template 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap.template 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,39 @@
+# ZAPTEL template
+#
+# lines starting with "#" will be not saved to the SQL
+# all spaces will be converted to single space
+# SQL values are separated by one or more tab
+#
+# THIS IS A TEMPLATE WILL NOT BE WRITTEN DIRECTLY INTO
+# ZAPATA_ADDITIONAL. The values here will be written to
+# the zap SQL table, and when retriebe_zap_from_mysql.perl
+# will be called zapata_additional.conf will be written.
+
+# The following parameters will be replaced for each zap channel
+# __EXTENSION__ - the extension number of this channel
+# __CONTEXT__ - the context to be used (should be "from-internal")
+# __GROUP__ - the group (for dial(Zap/g<num>) and similar)
+# __CHANNEL__ - the channel found
+# __NAME__ - the name part of caller-ID name given to this channel
+# __SIGNALLING__ - the signalling methoed used for this channel (depends on context on BRI channels)
+
+account __EXTENSION__
+accountcode 0
+busycount 7
+busydetect no
+callerid __NAME__ <__EXTENSION__>
+callprogress no
+channel __CHANNEL__
+context __CONTEXT__
+echocancelwhenbridged no
+echocancel yes
+echotraining yes
+mailbox __EXTENSION__
+record_in Adhoc
+record_out Adhoc
+signalling __SIGNALLING__
+
+# todo...
+group __GROUP__
+immediate __IMMEDIATE__
+
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap2amp
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap2amp 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap2amp 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,399 @@
+#! /usr/bin/perl -w
+
+# Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
+# Copyright (C) 2005, Xorcom
+#
+# All rights reserved.
+#
+# This program 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.
+#
+# This program 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 this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+
+# read /etc/zaptel.conf and for each FXS channel found
+# generate AMP configuration, by writing directly to
+# mysql, and writing to asterisk DB
+#
+# the basis of the configurtaion will be taken from a template
+# which will be applied to each FXS channel found
+
+use strict;
+use DBI;
+
+my @zapinfo;
+my @zap_template;
+my $zaptel_conf = "/etc/zaptel.conf";
+my $zap_template_name = "/usr/share/freepbx-common/zap.template";
+my $amportal_conf = "/etc/amportal.conf";
+my $ampconf;
+
+# database connection, lazy code
+my $dbh;
+my $sql_statement;
+my $result;
+
+# start counting zap-extentions from 400, just like in good old Rapid...
+# may be modified from amportal.conf
+my $extension_num = 401;
+# the following two are used to follow hints from genzaptelconf in zaptel.conf
+# that require context-awareness.
+my $termtype = '';
+my $astbanktype = '';
+
+
+my $debug = 0;
+
+
+#####################
+# functions
+
+# sub print_db_errors
+# -------------------
+#
+# in case of a dbi error, this sub will print all needed information to the user
+#
+sub print_db_errors
+{
+ print "dbh->selectall_arrayref($sql_statement) failed!\n";
+ print "DBI::err=[$DBI::err]\n";
+ print "DBI::errstr=[$DBI::errstr]\n";
+}
+
+# sub clear_zaptel_from_sql
+# -------------------------
+# read the available zap channels on mysql, and then
+# delete them and the corresponding extension
+sub clear_zaptel_from_sql
+{
+ $sql_statement = "SELECT id FROM `zap` WHERE keyword = 'account'";
+ $result = $dbh->selectall_arrayref($sql_statement);
+ unless ($result)
+ {
+ print_db_errors();
+ die("Could not connect to database");
+ }
+
+ foreach my $row ( @{ $result } )
+ {
+ my $id = @{ $row }[0];
+ if ($debug==1) { print "Deleting ZAPATA channel $id\n"; }
+
+ $sql_statement = "DELETE FROM `extensions` WHERE `extension` = '$id'";
+ unless ($dbh->do( $sql_statement ) )
+ {
+ print_db_errors();
+ exit(-1);
+ }
+
+ if ($debug==1) { printf( "$sql_statement\n" ); }
+
+ $sql_statement = "DELETE FROM `zap` WHERE `id` = '$id'";
+ unless ($dbh->do( $sql_statement ) )
+ {
+ print_db_errors();
+ exit(-1);
+ }
+
+ $sql_statement = "DELETE FROM `users` WHERE `extension` = '$id'";
+ if ($debug==1) { printf( "$sql_statement\n" ); }
+ $dbh->do( $sql_statement );
+ unless ($dbh->do( $sql_statement ) )
+ {
+ print_db_errors();
+ exit(-1);
+ }
+
+ $sql_statement = "DELETE FROM `devices` WHERE `id` = '$id' and `tech` = 'zap'";
+ if ($debug==1) { printf( "$sql_statement\n" ); }
+ $dbh->do( $sql_statement );
+ unless ($dbh->do( $sql_statement ) )
+ {
+ print_db_errors();
+ exit(-1);
+ }
+ }
+}
+
+# sub reg_channel
+# ---------------
+# stores values into tables "zap", "extensions", "users" and "devices"
+# TODO:
+# split this huge function into 5 functions, one for each database. and last
+# for astdb.
+# if possible move the function up (currently needs the $dbh connection
+sub reg_channel($$)
+{
+ my ($channel, $data) = @_;
+ my $extension = $extension_num;
+
+ $sql_statement = "SELECT * FROM `devices` where dial='ZAP/$channel'";
+ $result = @{ $dbh->selectall_arrayref($sql_statement) };
+
+ if ( $result != 0 )
+ {
+ # channel already registered
+ return;
+ }
+
+ my $name = "ZAP channel $channel";
+ $data->{EXTENSION} = $extension;
+ $data->{CHANNEL} = $channel;
+ $data->{GROUP} = 5;
+ $data->{IMMEDIATE} = 'no';
+ $data->{CONTEXT} = 'from-internal';
+ if ($astbanktype ne '' ){
+ $data->{CONTEXT} = $astbanktype;
+ if ($astbanktype eq 'input') {
+ $data->{IMMEDIATE} = 'yes';
+ }
+ }
+ $data->{NAME} = $name;
+
+ my @extra_lines = ();
+ if (exists $data->{SWITCHTYPE}) {
+ push @extra_lines,("switchtype\t__SWITCHTYPE__");
+ }
+
+ # sql table - zap
+ foreach my $line (@extra_lines, at zap_template)
+ {
+ $_ = $line;
+ chomp;
+ next if /^#/;
+ next unless /\S/;
+
+ s/__([A-Z]*)__/$data->{$1}/g;
+
+ # the keyword is the first word before the TAB,
+ # the data, is everything
+ my ($sql_keyword, $sql_data) = split(/\s+/, $_, 2);
+ if ($sql_keyword && $sql_data)
+ {
+ $sql_statement = "INSERT INTO zap VALUES ('$extension_num','$sql_keyword','$sql_data',0)";
+ if ($debug==1) { printf( "$sql_statement\n" ); }
+ unless ($dbh->do( $sql_statement ) )
+ {
+ print_db_errors();
+ exit(-1);
+ }
+ }
+ }
+
+ # sql table - extensions
+ my $context = "ext-local";
+ my $priority = "1";
+ my $application = "Macro";
+ my $args = "exten-vm\\,novm\\,$extension_num";
+ my $descr = "NULL";
+ my $flags = "0";
+
+ $sql_statement = "INSERT INTO extensions VALUES ('$context','$extension','$priority','$application','$args',$descr,'$flags')\n";
+ if ($debug==1) { printf( "$sql_statement\n" ); }
+ unless ($dbh->do( $sql_statement ) )
+ {
+ print_db_errors();
+ exit(-1);
+ }
+
+
+# CREATE TABLE `users` (
+# `extension` varchar(20) NOT NULL default '',
+# `password` varchar(20) default NULL,
+# `name` varchar(50) default NULL,
+# `voicemail` varchar(50) default NULL,
+# `ringtimer` int(3) default NULL,
+# `noanswer` varchar(100) default NULL,
+# `recording` varchar(50) default NULL,
+# `outboundcid` varchar(50) default NULL,
+# `directdid` varchar(50) default NULL,
+# `didalert` varchar(50) default NULL,
+# `faxexten` varchar(20) default NULL,
+# `faxemail` varchar(50) default NULL,
+# `answer` tinyint(1) default NULL,
+# `wait` int(2) default NULL,
+# `privacyman` tinyint(1) default NULL
+# ) ;
+
+ # sql table - users
+ $extension = $extension_num;
+ my $password = ""; # no password is set for zaptel devices
+ my $voicemail = ""; # give mo voicemail by default
+ my $ringtimer = "0";
+ my $noanswer = "";
+ my $recording = "out=Adhoc|in=Adhoc" ;
+ my $outboundcid = "";
+ my $directdid = "";
+ my $didalert = "";
+ my $faxexten = "";
+ my $faxemail = "";
+ my $answer = "";
+ my $wait = "";
+ my $privacyman = "";
+
+ $sql_statement = "INSERT INTO users VALUES ( '$extension', '$password', '$name', '$voicemail', '$ringtimer', '$noanswer', '$recording', '$outboundcid', '$directdid', '$didalert', '$faxexten', '$faxemail', '$answer', '$wait', '$privacyman' )\n";
+
+ if ($debug==1) { printf( "$sql_statement\n" ); }
+ unless ($dbh->do( $sql_statement ) )
+ {
+ print_db_errors();
+ exit(-1);
+ }
+ if ($debug==1) { printf ( "Extension: $name - $extension_num \n" ); }
+
+ # sql table - devices
+ my $dial = "ZAP/$channel";
+ $sql_statement = "INSERT INTO devices VALUES ('$extension_num','zap','$dial','fixed', '$extension_num','$name','')";
+ if ($debug==1) { printf( "$sql_statement\n" ); }
+ unless ($dbh->do( $sql_statement ) )
+ {
+ print_db_errors();
+ exit(-1);
+ }
+
+ $extension_num++;
+} #sub reg_channel end
+
+
+sub parse_amportal_conf
+{
+ my $filename = $_[0];
+ my %ampconf;
+
+ open(AMPCONF, $filename) || die "Cannot open $filename";
+
+ while (<AMPCONF>)
+ {
+ if ($_ =~ /^\s*([a-zA-Z0-9_]+)\s*=\s*(.*)\s*([;#].*)?/)
+ {
+ $ampconf{$1} = $2;
+ }
+ }
+ close(AMPCONF);
+
+ return \%ampconf;
+}
+
+#####################
+# main
+
+# fist parse amportal.conf to get the correct information
+# about the username and password for mysql
+$ampconf = parse_amportal_conf( "/etc/amportal.conf" );
+
+my $database = "asterisk";
+my $hostname = $$ampconf{"AMPDBHOST"};
+my $username = $$ampconf{"AMPDBUSER"};
+my $password = $$ampconf{"AMPDBPASS"};
+my $db_engine = "mysql";
+if (exists($ampconf->{"AMPDBENGINE"})) {
+ $db_engine = $ampconf->{"AMPDBENGINE"};
+}
+
+# connect to the DB
+if ( $db_engine eq "mysql" ) {
+ $dbh = DBI->connect("dbi:mysql:dbname=$database;host=$hostname", "$username", "$password");
+}
+elsif ( $db_engine eq "pgsql" ) {
+ $dbh = DBI->connect("dbi:pgsql:dbname=$database;host=$hostname", "$username", "$password");
+}
+elsif ( $db_engine eq "sqlite" ) {
+ if (!exists($ampconf->{"AMPDBFILE"})) {
+ print "No AMPDBFILE set in /etc/amportal.conf\n";
+ exit;
+ }
+
+ my $db_file = $ampconf->{"AMPDBFILE"};
+ $dbh = DBI->connect("dbi:SQLite2:dbname=$db_file","","");
+}
+elsif ( $db_engine eq "sqlite3" ) {
+ if (!exists($ampconf->{"AMPDBFILE"})) {
+ print "No AMPDBFILE set in /etc/amportal.conf\n";
+ exit;
+ }
+
+ my $db_file = $ampconf->{"AMPDBFILE"};
+ $dbh = DBI->connect("dbi:SQLite:dbname=$db_file","","");
+}
+
+# try and get the first ZAP number configured in amportal.conf
+# if none found, we still have the good old default
+if ( ! $$ampconf{"ZAP_FIRST_CHANNEL"} eq "" )
+{
+ $extension_num = $$ampconf{"ZAP_FIRST_CHANNEL"};
+}
+
+# read the zaptel.conf file, and latter on parse it
+open( PROC_ENTRY, $zaptel_conf ) or die( "Cannot read $zaptel_conf, aborting." );
+ at zapinfo = <PROC_ENTRY>;
+close( PROC_ENTRY );
+
+# read the template in advance
+open( ZAP_TEMPLATE, $zap_template_name ) or die( "Cannot read $zap_template_name, aborting." );
+ at zap_template = <ZAP_TEMPLATE>;
+close( ZAP_TEMPLATE );
+
+# delete the old information found in the database
+clear_zaptel_from_sql();
+
+# for each zaptel channel found in $zaptel_conf, if it provides FXO signalling,
+# then it's an FXS. Apply the template to that line, and generate
+# SQL statements for adding the zap channel and then the new extension.
+foreach my $line (@zapinfo)
+{
+ if ( $line =~ /\s*fxo([kl]s)\s*=\s*(\d*)/ )
+ {
+ reg_channel($2,{SIGNALLING=>"fxo_$1"});
+ $astbanktype = '';
+ }
+ elsif ( $line =~ /^# termtype: ([a-z]*)/)
+ {
+ $termtype = $1;
+ }
+ elsif ( $line =~ /^# astbanktype: ([a-z]*)/)
+ {
+ $astbanktype = $1;
+ }
+ elsif ( ($line =~ /\s*bchan\s*=\s*([0-9]*)(-([0-9]*|))/) &&
+ ($termtype eq 'te') )
+ {
+ my $chan = $1;
+ my $chan_last = $chan;
+ $termtype = '';
+
+ if (defined $3)
+ {
+ $chan_last = $3;
+ }
+
+ for my $i ($chan .. $chan_last)
+ {
+ reg_channel($i,{
+ SIGNALLING=>'bri_cpe',
+ SWITCHTYPE=>'euroisdn'
+ });
+ }
+ }
+} # end - foreach my $line (@zapinfo)
+
+# need reload:
+# - this will ensure that the user at least reloads asterisk,
+# he will usually need to restart asterisk,
+# - on TS1 it will force the user to save the configuration
+$sql_statement = "UPDATE admin SET value = 'true' WHERE variable = 'need_reload'";
+unless ($dbh->do( $sql_statement ) )
+{
+ print_db_errors();
+ exit(-1);
+}
+
+if ($debug==1) { print( "Done\n" ); }
Property changes on: freepbx/modules-2.2/modules/freepbx-module-zapauto/share/zap2amp
___________________________________________________________________
Name: svn:executable
+ *
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/zap_auto_ask.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/zap_auto_ask.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/zap_auto_ask.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,79 @@
+<?php
+/*
+ * Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
+ * Copyright (C) 2005,2006 Xorcom
+ *
+ * All rights reserved.
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * New page, for autodetection of ZAPTEL configuration.
+ * depends on genzaptelconf, and special SUDO setup.
+ *
+ */
+?>
+
+<h2>
+ <?php echo _("ZAPTEL auto-configuration"); ?>
+</h2>
+
+<p>
+ <table cellpadding="15">
+ <tr >
+ <td valign="top"><b>Warning</b></td>
+
+ <td style="border: #FF2020 1px dotted; background-color: #FFEAEA;">
+ <ol>
+ <li>
+ <?php echo _("This action will shut down and restart your PBX, and any existing calls will be lost."); ?>
+ </li>
+
+ <li>
+<?php
+echo _("ZAPTEL auto-configuration will assign consecutive extention numbers starting with
+400 to each ZAPTEL extention it detects.
+If those numbers are already in use by non ZAPTEL
+extension auto-configuration will fail to work properly.");
+?>
+ </li>
+
+ <li>
+<?php
+echo _("Depending on your HW configuration, this process might take several minutes
+in which the system seems unresponsive."
+);
+?>
+ </li>
+ </ol>
+ </td>
+ </tr>
+ </table>
+</p>
+
+<p>
+ <br>
+
+
+ <?php echo _("Click here to run ZAPTEL auto detection and configuration."); ?>
+ <form action="" name="form_detect" method="post">
+ <input type="hidden" name="detect" value="yes">
+ <input name="Submit" type="submit" value="Run ZAPTEL detection">
+ </form>
+
+ <br>
+ <br>
+ <br>
+ <br>
+</p>
Added: freepbx/modules-2.2/modules/freepbx-module-zapauto/zap_auto_detect.php
===================================================================
--- freepbx/modules-2.2/modules/freepbx-module-zapauto/zap_auto_detect.php 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules/freepbx-module-zapauto/zap_auto_detect.php 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,62 @@
+<?php
+/*
+ * Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
+ * Copyright (C) 2005,2006 Xorcom
+ *
+ * All rights reserved.
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * New page, for autodetection of ZAPTEL configuration.
+ * depends on genzaptelconf, and special SUDO setup.
+ *
+ */
+?>
+
+<?php
+// small detection, to prevent malicious users from running this file
+// directly and messing up the system
+$detect = $_REQUEST['detect'];
+if (strtolower($detect) != "yes") {
+ return;
+}
+?>
+
+
+<h2>Performing HW detection and configuration</h2>
+<style>
+ .clsWorkingCode{ border: #BB0A0A 1px solid; background-color: #ffc0c0; }
+ .clsDoneCode { border: green 1px solid; background-color: #a0FFa0; }
+ .clsHidden { display: none; border: 0px solid; }
+</style>
+
+<span id="idWaitMessage" class="clsWorkingCode">
+ <?php echo _("Please wait, this might take up to several minutes."); ?>
+</span>
+
+<code>
+ <pre id="idScriptOutout" class="clsWorkingCode">
+<?php
+ // the autodetection is done by a set of bash/perl/php scripts
+ // we just call them using sudo, as they need root permissions
+ system("sudo /usr/share/freepbx-common/detect_zap");
+?>
+ </pre>
+</code>
+
+<script>
+ document.getElementById("idWaitMessage").className = "clsHidden";
+ document.getElementById("idScriptOutout").className = "clsDoneCode";
+</script>
Added: freepbx/modules-2.2/modules-2.2.xml
===================================================================
--- freepbx/modules-2.2/modules-2.2.xml 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/modules-2.2/modules-2.2.xml 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1,819 @@
+<xml><module>
+ <rawname>ringgroups</rawname>
+ <name>Ring Groups</name>
+ <version>2.2.13</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Creates a group of extensions that all ring together. Extensions can be rung all at once, or in various 'hunt' configurations. Additionally, external numbers are supported, and there is a call confirmation option where the callee has to confirm if they actually want to take the call before the caller is transferred.
+ </description>
+ <changelog>
+ *2.2.13* Add he_IL translation
+ *2.2.12* never allow group to include itself as nnn# and create infinite loop
+ *2.2.11* changed _ALERT_INFO to __ALERT_INFO ('_' -> '__') so it is infinitely inheritted into the dialplan
+ *2.2.10* Added BLKVM DB tree to fix inability to transfer a received call to another user, and make NODEST stuff work overall
+ *2.2.9* Modified NODEST stuff to improve some cases where it was still failing, and improve '#' transfer scenarios
+ *2.2.8* Allow ringall-prim as well as ringall for strategies with confirmation (#1408)
+ *2.2.7* Add tool tip for Group Description (#1459)
+ *2.2.6* Add NODEST so that destination (often vm) is not taken if called from queue or ringgroup and such is honored for childeren
+ *2.2.5* Modified flyover help - since moh works with confirmation now
+ *2.2.4* Added sound files for default confirmation messages
+ *2.2.3* Clarification on help message if you want to ring follow-me and other non-extension numbers
+ *2.2.2* Forgot to add default starting RG number as 600
+ *2.2.1* Cleanup of the UI, remove workaround of formatting bugs with previous UI
+ *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog>
+ <menuitems>
+ <ringgroups>Ring Groups</ringgroups>
+ </menuitems>
+ <location>release/2.2/ringgroups-2.2.13.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-RingGroups</info>
+ <md5sum>237a46a51715e147f6581cee9ff0181f</md5sum>
+</module>
+<module>
+ <rawname>javassh</rawname>
+ <name>Java SSH</name>
+ <version>1.0.1</version>
+ <type>tool</type>
+ <category>System Administration</category>
+ <description>Provides a Java applet to access the system shell using SSH</description>
+ <menuitems>
+ <javassh>Java SSH</javassh>
+ </menuitems>
+ <location>release//2.2/javassh-1.0.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-JavaSSH</info>
+ <md5sum>812e11f48bc260aedce20ceb54d18169</md5sum>
+</module>
+<module>
+ <rawname>zoip</rawname>
+ <name>Zork</name>
+ <version>0.2.0</version>
+ <description>Zoip is a new way of playing Zork - It uses Text-to-Speech and Speech Recognition to play the classic infocom game, Zork. It appears as a destination. If you wish to play this without needing to go through an IVR, the easy way is to create a Ring Group with an invalid extension in it, and a destination of Zoip. </description>
+ <attention>
+ This is a 7 Megabyte download. It may not be able to download via this interface properly. In addition, Sphinx2 and Festival are required.
+
+ Please see http://aussievoip.com.au/wiki/freePBX-ZoIP before installing this module.
+ </attention>
+ <type>module</type>
+ <category>Games</category>
+ <description></description>
+ <location>release/2.2/zoip-0.2.0.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-ZoIP</info>
+ <md5sum>a0318ecc7376f33c54abf9c3efd96958</md5sum>
+</module>
+<module>
+ <rawname>donotdisturb</rawname>
+ <name>Do-Not-Disturb (DND)</name>
+ <version>1.0.1</version>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <location>release//2.2/donotdisturb-1.0.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>5c1128b0a2c38b0d8aaff289fa5cb1d4</md5sum>
+</module>
+<module>
+ <rawname>irc</rawname>
+ <name>Online Support</name>
+ <version>1.1.1</version>
+ <type>tool</type>
+ <category>Support</category>
+ <description>This module lets you connect to the IRC network where developers and other users chat. You can chat to the developers live, if you have problems</description>
+ <changelog>
+ *1.1.1* Add he_IL translation
+ *1.1* First release for 2.2, changed the window so it pops-out of the normal web page
+ </changelog>
+ <menuitems>
+ <irc>Online Support</irc>
+ </menuitems>
+ <location>release/2.2/irc-1.1.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-IRC</info>
+ <md5sum>64143ea353cc26da431319df0019890d</md5sum>
+</module>
+<module>
+ <rawname>blacklist</rawname>
+ <name>Blacklist</name>
+ <version>1.1.1</version>
+ <type>setup</type>
+ <category>CID & Number Management</category>
+ <menuitems>
+ <blacklist>Blacklist</blacklist>
+ </menuitems>
+ <changelog>
+ *1.1.1* Add he_IL translation
+ *1.1* First 2.2 release. Fix minor warnings.
+ </changelog>
+ <location>release/2.2/blacklist-1.1.1.tgz</location>
+ <info>http://freepbx.org/wiki/AsteriskBlacklist</info>
+ <md5sum>cfe46100e687174564fb8fd3c3437c6d</md5sum>
+</module>
+<module>
+ <rawname>announcement</rawname>
+ <name>Announcements</name>
+ <version>0.7.0</version>
+ <changelog>
+ *0.7.0* more fixes to deal with sqlite and fix mysql5 (includes renaming of repeat to repeat_msg)
+ *0.6.1* Modified the install.sql to work on sqlite3
+ *0.6* added an option to choose a single digit that can be used to have the msg repeated
+ *0.5* chaned to jump to ivr's return context
+ *0.4* Added Don't Answer option to not answer the channel (and playback early media if supported)
+ *0.3* Added support to return to calling IVR
+ *0.2* First Module Intro
+ </changelog>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Plays back one of the system recordings (optionally allowing the user to skip it) and then goes to another destination.
+ </description>
+ <menuitems>
+ <announcement>Announcements</announcement>
+ </menuitems>
+ <location>release/2.2/announcement-0.7.0.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Announcement</info>
+ <md5sum>1991ecf118b229206a4e48886ba452f5</md5sum>
+</module>
+<module>
+ <rawname>backup</rawname>
+ <name>Backup & Restore</name>
+ <version>2.1.1</version>
+ <type>tool</type>
+ <category>System Administration</category>
+ <menuitems>
+ <backup>Backup & Restore</backup>
+ </menuitems>
+ <depends>
+ <module>core</module>
+ </depends>
+ <changelog>
+ *2.1.1* Remove core_users2astdb and core_devices2astdb, it isn't needed and corrupts resotred ampuser info
+ *2.1* Actually, really, restore ASTDB now. Finally. Also add redirect_standard to avoid problems with TRBoE.
+ *2.0.4* Add he_IL translation
+ *2.0.3* don't have BLKVM and FM astdb trees, which shouldn't be left around anyhow
+ *2.0.2* fixed restore ALL to get it to actually work
+ *2.0.1* supplied defaults and fixed bug is weekdays schedule_functions.php - #1279
+ *2.0* Now backs up and restores astdb, which was causing problems with phone configurations.
+ *1.2* Potential fix for restore issues, clean up some warnings
+ </changelog>
+ <location>release/2.2/backup-2.1.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-BackupRestore</info>
+ <md5sum>c0ab5c34ee81480275e356501a181eb3</md5sum>
+</module>
+<module>
+ <rawname>timeconditions</rawname>
+ <name>Time Conditions</name>
+ <version>2.4.1</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Creates a condition where calls will to one of two destinations (eg, an extension, IVR, ring group..) based on the time and/or date. This can be used for example to ring a receptionist during the day, or go directly to an IVR at night.
+ </description>
+ <changelog>
+ *2.4.1* Add he_IL translation
+ *2.4* Upgrading module version to assist with trixbox upgrades, that have 2.3.1 already, so this needs to be higher. No other changes.
+ *2.3* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <menuitems>
+ <timeconditions>Time Conditions</timeconditions>
+ </menuitems>
+ <location>release/2.2/timeconditions-2.4.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-TimeCond</info>
+ <md5sum>fbeb09433490d0fac61d5b91954f1e6a</md5sum>
+</module>
+<module>
+ <rawname>callback</rawname>
+ <name>Callback</name>
+ <version>1.3.1</version>
+ <type>setup</type>
+ <category>Remote Access</category>
+ <menuitems>
+ <callback>Callback</callback>
+ </menuitems>
+ <changelog>
+ *1.3.1* Add he_IL translation
+ *1.3* Fixed UI errors for new 2.2 look.
+ *1.2* First 2.2 release
+ </changelog>
+ <info>http://aussievoip.com.au/wiki/freePBX-Callback</info>
+ <location>release/2.2/callback-1.3.1.tgz</location>
+ <md5sum>8352483b25456e54fd01201b731c44e7</md5sum>
+</module>
+<module>
+ <rawname>printextensions</rawname>
+ <name>Print Extensions</name>
+ <version>1.3.1</version>
+ <type>tool</type>
+ <category>Third Party Addon</category>
+ <description>Creates a printable list of names and extension numbers</description>
+ <menuitems>
+ <printextensions>Print Extensions</printextensions>
+ </menuitems>
+ <changelog>
+ *1.3.1* Add he_IL translation
+ </changelog>
+ <location>release/2.2/printextensions-1.3.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-PrintExtensions</info>
+ <md5sum>4e0734e0a3402bc3641ad2ccb8ac2294</md5sum>
+</module>
+<module>
+ <rawname>miscapps</rawname>
+ <name>Misc Applications</name>
+ <version>0.2</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>
+ Adds the ability to create feature codes that can go to any freePBX destination (such as an IVR or queue)
+ </description>
+ <changelog>
+ *0.2* Fix bug with adding new apps
+ </changelog>
+ <menuitems>
+ <miscapps>Misc Applications</miscapps>
+ </menuitems>
+ <location>release/2.2/miscapps-0.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-MiscApplications</info>
+ <md5sum>da5484024e5e3d31002f0989a46eae5c</md5sum>
+</module>
+<module>
+ <rawname>asterisk-cli</rawname>
+ <name>Asterisk CLI</name>
+ <version>1.0</version>
+ <type>tool</type>
+ <category>System Administration</category>
+ <menuitems>
+ <cli>Asterisk CLI</cli>
+ </menuitems>
+ <depends>
+ <engine>asterisk</engine>
+ </depends>
+ <location>release/2.2/asterisk-cli-1.0.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-CLI</info>
+ <md5sum>af3c22f41599762122e075ac734b1612</md5sum>
+ <changelog>
+*1.0* Fixed security issue, first release in 2.2
+*0.001* Original Release
+ </changelog>
+</module>
+<module>
+ <rawname>paging</rawname>
+ <name>Paging and Intercom</name>
+ <version>1.6.3</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <changelog>
+ *1.6.3* Add he_IL translation
+ *1.6.2* Fix callerid bug
+ *1.6.1* Fix install bug
+ *1.6* Busy devices are no longer paged, flag added to allow overriding this behaviour.
+ *1.5.2* Pages now start with a "beep" sound. Fixed help text.
+ *1.5.1* Fixed bug with saving paging group
+ *1.5* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <description>Allows creation of paging groups to make announcements using the speaker built into most SIP phones.
+
+ Also creates an Intercom feature code that can be used as a prefix to talk directly to one person, as well as optional feature codes to block/allow intercom calls.</description>
+ <menuitems>
+ <paging>Paging and Intercom</paging>
+ </menuitems>
+ <location>release/2.2/paging-1.6.3.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Paging</info>
+ <md5sum>f462391eebadee451e07ab28e3f87677</md5sum>
+</module>
+<module>
+ <rawname>dictate</rawname>
+ <name>Dictation</name>
+ <version>1.1.1</version>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <changelog>
+ *1.1.1* Fix for Dictation not appearing on User page when in Device and User mode.
+ *1.1* Fix changes not sticking when creating an extension, replace Rob-sounds with Allison-sounds.
+ *1.0.1* Replaced 'invalid extension' with 'feature not available on this line' when disabled
+ *1.0.0* Original Release
+ </changelog>
+ <description>This uses the app_dictate module of Asterisk to let users record dictate into their phones. When complete, the dictations can be emailed to an email address specified in the extension page.</description>
+ <location>release/2.2/dictate-1.1.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Dictation</info>
+ <md5sum>1f5c3ba0182098ccf2cfc8127ece3545</md5sum>
+</module>
+<module>
+ <rawname>conferences</rawname>
+ <name>Conferences</name>
+ <version>1.2</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Allow creation of conference rooms (meet-me) where multiple people can talk together.</description>
+ <changelog>
+ *1.2* Fixed raising asterisk error on empty dialstatus #1708
+ *1.1.2* Add he_IL translation
+ *1.1.1* Updated for 2.2.0RC1
+ *1.1* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <menuitems>
+ <conferences>Conferences</conferences>
+ </menuitems>
+ <location>release/2.2/conferences-1.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Conf</info>
+ <md5sum>fd9a9926fd7f27ef8ae9cadf036f4afe</md5sum>
+</module>
+<module>
+ <rawname>pbdirectory</rawname>
+ <name>Phonebook Directory</name>
+ <version>0.3</version>
+ <type>tool</type>
+ <category>CID & Number Management</category>
+ <location>release/2.2/pbdirectory-0.3.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <description>Provides a dial-by-name directory for phonebook entries</description>
+ <requirements>
+ <version>2.2</version>
+ <module>phonebook</module>
+ <module>speeddial</module>
+ </requirements>
+ <md5sum>6fdf53feade9b816c86197628e3a2d65</md5sum>
+ <changelog>
+ </changelog>
+</module>
+<module>
+ <rawname>manager</rawname>
+ <name>Asterisk API</name>
+ <version>1.2</version>
+ <type>tool</type>
+ <category>System Administration</category>
+ <menuitems>
+ <manager>Asterisk API</manager>
+ </menuitems>
+ <changelog>
+ *1.2* Fix UI issues, and 'Array' message.
+ *1.1* First 2.2 release. Added he_IL support, fixed some warnings.
+ </changelog>
+ <location>release/2.2/manager-1.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-ManagerAPI</info>
+ <md5sum>b0197805e6b63146c0b005da69637341</md5sum>
+</module>
+<module>
+ <rawname>callforward</rawname>
+ <name>Call Forward</name>
+ <version>1.1</version>
+ <changelog>*1.1* First release for 2.2
+ </changelog>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <location>release/2.2/callforward-1.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>de8184265af71ab71d6a14d56080cde7</md5sum>
+</module>
+<module>
+ <rawname>callwaiting</rawname>
+ <name>Call Waiting</name>
+ <version>1.1.1</version>
+ <changelog>
+ *1.1.1* Fixed typo Provdes to Provides*
+ *1.1* First release for 2.2
+ </changelog>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <description>Provides an option to turn on/off call waiting</description>
+ <location>release/2.2/callwaiting-1.1.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>364a316b45afb3bd26a63d0baa1720ce</md5sum>
+</module>
+<module>
+ <rawname>findmefollow</rawname>
+ <name>Follow Me</name>
+ <version>2.4.9</version>
+ <changelog>
+ *2.4.9* Add he_IL translation
+ *2.4.8* never allow extension to include itself as nnn# and create infinite loop
+ *2.4.7* Changed to not set alertinfo value if already set from before hitting followme
+ *2.4.6* Added BLKVM DB tree to fix inability to transfer a received call to another user, and make NODEST stuff work overall
+ *2.4.5* Modified NODEST stuff to improve some cases where it was still failing, and improve '#' transfer scenarios
+ *2.4.4* Add NODEST so that destination (often vm) is not taken if called from queue or ringgroup
+ *2.4.3* Sanity check for prefing that if not set or there, it won't ring the extension forever (should not happen)
+ *2.4.2* Modified flyover help - since moh works with confirmation now
+ *2.4.1* Added sound files for default confirmation messages
+ 2.4: First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ 2.3.1: removed checkastman
+ 2.3: First release for 2.2, fixed minor display issues
+ 2.2.5: fixed so extension number is put into empty lists
+ 2.2.4: moved require_once() in functions.php, was breaking other stuff
+ 2.2.3: full path in require_once to keep retrieve_conf from dieing
+ 2.2.2: bug fix = should be ==
+ 2.2.1: Use astdb for some settings
+ 2.2.0: Add Pre-Ring
+ 2.1.5: Fix bug #1142
+ 2.1.4: Code cleanup
+ </changelog>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Much like a ring group, but works on individual extensions. When someone calls the extension, it can be setup to ring for a number of seconds before trying to ring other extensions and/or external numbers, or to ring all at once, or in other various 'hunt' configurations. Most commonly used to ring someone's cell phone if they don't answer their extension.
+ </description>
+ <menuitems>
+ <findmefollow>Follow Me</findmefollow>
+ </menuitems>
+ <location>release/2.2/findmefollow-2.4.9.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-FollowMe</info>
+ <md5sum>631de942afd4ba33f36630322d8bf625</md5sum>
+</module>
+<module>
+ <rawname>miscdests</rawname>
+ <name>Misc Destinations</name>
+ <version>1.3.3</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>Allows creating destinations that dial any local number (extensions, feature codes, outside phone numbers) that can be used by other modules (eg, IVR, time conditions) as a call destination.</description>
+ <changelog>
+ *1.3.3* Minor formatting changes
+ *1.3.2* Add he_IL translation
+ *1.3.1* Updated help text
+ *1.3* First release for FreePBX 2.2 - Fixed GUI issues
+ </changelog>
+ <menuitems>
+ <miscdests>Misc Destinations</miscdests>
+ </menuitems>
+ <location>release/2.2/miscdests-1.3.3.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-MiscDests</info>
+ <md5sum>1e79d5c3e9490ccabbcbdcd95cc8ce19</md5sum>
+</module>
+<module>
+ <rawname>gabcast</rawname>
+ <name>Gabcast</name>
+ <version>1.2.3</version>
+ <type>tool</type>
+ <category>Third Party Addon</category>
+ <menuitems>
+ <gabcast>Gabcast</gabcast>
+ </menuitems>
+ <changelog>
+ *1.2.3* Add he_IL translation
+ *1.2.2* Fix issue where you were unable to add a channel
+ </changelog>
+ <location>release/2.2/gabcast-1.2.3.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-gabcast</info>
+ <md5sum>c78065ece959a05276d3ecda7a4503ca</md5sum>
+</module>
+<module>
+ <rawname>phpinfo</rawname>
+ <name>PHP Info</name>
+ <version>1.0</version>
+ <type>tool</type>
+ <category>System Administration</category>
+ <menuitems>
+ <phpinfo>PHP Info</phpinfo>
+ </menuitems>
+ <location>release//2.2/phpinfo-1.0.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-phpinfo</info>
+ <md5sum>1b71e570164168090fe3f04464a549c4</md5sum>
+</module>
+<module>
+ <rawname>cidlookup</rawname>
+ <name>Caller ID Lookup</name>
+ <version>1.1.1</version>
+ <description>Allows Caller ID Lookup of incoming calls against different sources (MySQL, HTTP, ENUM, Phonebook Module)</description>
+ <type>setup</type>
+ <category>CID & Number Management</category>
+ <menuitems>
+ <cidlookup>Caller Name Lookup Sources</cidlookup>
+ </menuitems>
+ <depends>
+ <engine>asterisk 1.2</engine>
+ </depends>
+ <location>release/2.2/cidlookup-1.1.1.tgz</location>
+ <md5sum>0f1d11eae4c12f04db9ea3bd32dc7aa5</md5sum>
+ <info>http://freepbx.org/wiki/CallerIDLookup</info>
+ <changelog>
+ *1.1.1* Add he_IL translation
+ *1.1* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ *1.0.4* Updated module.xml format
+ *1.0.3* Fixes from #999
+ *1.0.1* Added possibility to cache in astDB
+ Added lookup from cache before querying external source
+ *1.0.0* First release
+ </changelog>
+</module>
+<module>
+ <rawname>featurecodeadmin</rawname>
+ <name>Feature Code Admin</name>
+ <version>1.0.4</version>
+ <type>setup</type>
+ <category>Basic</category>
+ <menuitems>
+ <featurecodeadmin>Feature Codes</featurecodeadmin>
+ </menuitems>
+ <changelog>
+ *1.0.4* Add support for duplicate feature codes
+ *1.0.3* Add he_IL translation
+ *1.0.2* Fix minor font/display issues
+ </changelog>
+ <location>release/2.2/featurecodeadmin-1.0.4.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-FeatureCodeAdmin</info>
+ <md5sum>2ab47d6adcb43a7a2f5a6719ed97541a</md5sum>
+</module>
+<module>
+ <rawname>music</rawname>
+ <name>Music on Hold</name>
+ <version>1.5</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Uploading and management of sound files (wav, mp3) to be used for on-hold music.</description>
+ <changelog>
+ *1.5* Fixed upload bug, #1646 could not upload files
+ *1.4.2* List wav files
+ *1.4.1* Add redirect_standard() call to avoid #1616
+ *1.4* Fix an issue of a new install not having a working MOH until they visit the page.
+ *1.3.2* Add he_IL translation
+ *1.3.1* Changed name to Music on Hold (from On Hold Music)
+ *1.3* Bumped version to assist upgraders from the 2.1 tree. No other changes.
+ *1.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <menuitems>
+ <music>Music on Hold</music>
+ </menuitems>
+ <location>release/2.2/music-1.5.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-OHM</info>
+ <md5sum>9783dba30f352aad98b11c0d996a4a79</md5sum>
+</module>
+<module>
+ <rawname>phonebook</rawname>
+ <name>Phonebook</name>
+ <version>1.1.5</version>
+ <description>Provides a phonebook for freePBX, it can be used as base for Caller ID Lookup and Speed Dial</description>
+ <type>tool</type>
+ <category>CID & Number Management</category>
+ <menuitems>
+ <phonebook>Asterisk Phonebook</phonebook>
+ </menuitems>
+ <location>release/2.2/phonebook-1.1.5.tgz</location>
+ <md5sum>b78ffc82cf878b039a609e3b4a16455b</md5sum>
+ <info>http://freepbx.org/wiki/AsteriskPhonebook</info>
+ <changelog>
+ *1.1.5* Fixed a Warning when phonebook was empty
+ *1.1.4* Automatically generate Speed Dial Code if not supplied by user
+ Sort Phonebook alphabetically
+ Reuse Asterisk Manager connection
+ *1.1.3* Fixed copyright information for fgetcsvfromline()
+ Updated module.xml format
+ *1.1.2* freePBX 2.1.2 Released
+ *1.1.1* Apply #1105 - Fix up module naming conventions
+ *1.1.0* Added Speed dial field for phonebook entries (used by speeddial module)
+ Changed phonebook_list() return value
+ Numbers can no more contain '+' sign because of speeddial
+ *1.0.4* Added 'Export to CSV' function
+ Fixed some documentation errors
+ *1.0.3* Added 'Import from CSV' function
+ Added js confirmation to Delete link
+ Added possibility to empty phonebook
+ *1.0.2* Fixed bug in inserting names with spaces
+ Fixed a little bug in editing the a number associated with a name
+ Suppressed warnings when the phonebook was empty
+ *1.0.1* First Release
+ </changelog>
+</module>
+<module>
+ <rawname>pinsets</rawname>
+ <name>PIN Sets</name>
+ <version>1.1</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Allow creation of lists of PINs (numbers for passwords) that can be used by other modules (eg, trunks).</description>
+ <changelog>
+ *1.1* Add naftali5's fix for pinsets being lost when routes are moved.
+ *1.0.12* Add he_IL translation
+ *1.0.11* Stop potential error where a random pinset is appearing when creating a new trunk
+ </changelog>
+ <menuitems>
+ <pinsets>PIN Sets</pinsets>
+ </menuitems>
+ <info>http://aussievoip.com.au/wiki/freePBX-PinSets</info>
+ <location>release/2.2/pinsets-1.1.tgz</location>
+ <md5sum>66e94db6058003d7b7f1d6dcdbbaaf2b</md5sum>
+</module>
+<module>
+ <rawname>infoservices</rawname>
+ <name>Info Services</name>
+ <version>1.3.3</version>
+ <type>setup</type>
+ <category>Provides a Feature Code</category>
+ <description>Provides a number of applications accessable by feature codes: company directory, call trace (last call information), echo test, speaking clock, and speak current extension number.</description>
+ <changelog>
+ 1.3.3: Fixed SpeakExtension - replaced depricated ${CALLERID} variable
+ 1.3.2: Fixed SpeakExtension - add macro-user-callerid
+ 1.3.1: Improved accuracy of speaking clock
+ </changelog>
+ <location>release/2.2/infoservices-1.3.3.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>d485ea27a601ce3ec4dd764229873194</md5sum>
+</module>
+<module>
+ <rawname>queues</rawname>
+ <name>Queues</name>
+ <version>2.2.8</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Creates a queue where calls are placed on hold and answered on a first-in, first-out basis. Many options are available, including ring strategy for agents, caller announcements, max wait times, etc.
+ </description>
+ <changelog>
+ *2.2.8* Fixed typo in 2.2.7
+ *2.2.7* Fixed eventmemberstatus #1635
+ *2.2.6* Add he_IL translation
+ *2.2.5* Added BLKVM DB tree to fix inability to transfer a received call to another user, and make NODEST stuff work overall
+ *2.2.4* Change _NODEST to __NODEST for some scenarios that require infinite inheritance
+ *2.2.3* Updated for freepbx 2.2.0rc2
+ *2.2.2* Disallow Queue 0 (#1487)
+ *2.2.1* Add NODEST to tell children NOT to go to destinations (like voicemail or other) - helps with followme in a queue
+ *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog>
+ <menuitems>
+ <queues>Queues</queues>
+ </menuitems>
+ <location>release/2.2/queues-2.2.8.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Queues</info>
+ <md5sum>84a404faa78e8e13b7155359c686a57a</md5sum>
+</module>
+<module>
+ <rawname>inventorydb</rawname>
+ <name>Inventory</name>
+ <version>1.0.3</version>
+ <type>tool</type>
+ <category>Third Party Addon</category>
+ <menuitems>
+ <inventorydb>Inventory</inventorydb>
+ </menuitems>
+ <changelog>
+ *1.0.3* Add he_IL translation
+ </changelog>
+ <location>release/2.2/inventorydb-1.0.3.tgz</location>
+ <md5sum>a575ae7e9ee4c2c52b46c91ea834b875</md5sum>
+ <info>http://freepbx.org/wiki/inventorydb</info>
+</module>
+
+<module>
+ <rawname>voicemail</rawname>
+ <name>Voicemail</name>
+ <version>1.6.1</version>
+ <changelog>
+ *1.6.1* Bump version to fix existing extensions with disabled voicemail #1697
+ *1.6* Re-Fix 1.5.2, bump version for 2.2rc2 release.
+ *1.5.3* Fix for vm Javascript sanity checks only working in DevAndUser mode.
+ *1.5.2* Fix vm not appearing in DeviceAndUser mode
+ *1.5.1* Fix for MWI not working
+ *1.5* Fix issue with vm options not being saved on creation of extension
+ *1.4.2* Change category to Basic
+ *1.4.1* Fixed radio button defaults to 'no' from false so they work
+ *1.4* First release for 2.2. Fix inability to create voicemail box
+ </changelog>
+ <description>This module allows you to configure Voicemail for a user or extension</description>
+ <type>setup</type>
+ <category>Basic</category>
+ <location>release/2.2/voicemail-1.6.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>68cd0c181f06fc2fef13392663321172</md5sum>
+</module>
+<module>
+ <rawname>ivr</rawname>
+ <name>IVR</name>
+ <version>2.5.10</version>
+ <type>setup</type>
+ <category>Inbound Call Control</category>
+ <description>
+ Creates Digital Receptionist (aka Auto-Attendant, aka Interactive Voice Response) menus. These can be used to send callers to different locations (eg, "Press 1 for sales") and/or allow direct-dialing of extension numbers.
+ </description>
+ <changelog>
+ *2.5.10* Fix bug where pressing enter in a field would delete the IVR
+ *2.5.9* some tweaks because of strange inheritance behavior, so need to reset IVR variables upon returns for some looping conditions
+ *2.5.8* insert a return extension so that annoucements and ivrs returning don't trample back over the top
+ *2.5.7* extended schema and added ability to have ivr options to return to calling parent ivrs if appropriate, otherwise specified destination
+ *2.5.6* Added: Set(IVR_CONTEXT=${CONTEXT}) to facilitate simple returns to calling context (e.g. from an announcement or custom app)
+ *2.5.5* Fix bug #1651 and apply patch #1664, allow voicemail as destination if ivr is entered from a queue breakout option
+ *2.5.4* Fix bug #1417
+ *2.5.3* Add he_IL translation
+ *2.5.2* Updated for freepbx 2.2.0rc2
+ *2.5.1* Changed name to IVR (from Digital Receptionist)
+ *2.5* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <menuitems>
+ <ivr>IVR</ivr>
+ </menuitems>
+ <location>release/2.2/ivr-2.5.10.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-IVR</info>
+ <md5sum>e1c1da78c7aa36a75b128fb4c42381bc</md5sum>
+</module>
+<module>
+ <rawname>customerdb</rawname>
+ <name>Customer DB</name>
+ <version>1.2.3</version>
+ <type>tool</type>
+ <category>Third Party Addon</category>
+ <menuitems>
+ <customerdb>Customer DB</customerdb>
+ </menuitems>
+ <changelog>
+ *1.2.3* Add he_IL translation
+ </changelog>
+ <location>release/2.2/customerdb-1.2.3.tgz</location>
+ <md5sum>cf1fec9f1f20b688c6938d2595836710</md5sum>
+ <info>http://freepbx.org/wiki/CustomerDB</info>
+</module>
+
+<module>
+ <rawname>logfiles</rawname>
+ <name>Asterisk Logfiles</name>
+ <version>1.0.1</version>
+ <type>tool</type>
+ <category>Support</category>
+ <menuitems>
+ <logfiles>Asterisk Logfiles</logfiles>
+ </menuitems>
+ <location>release//2.2/logfiles-1.0.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-LogFiles</info>
+ <md5sum>92063ba5483e2f53acc7e32a2ff4cf94</md5sum>
+</module>
+<module>
+ <rawname>speeddial</rawname>
+ <name>Speed dial functions</name>
+ <version>1.0.2</version>
+ <type>module</type>
+ <category>CID & Number Management</category>
+ <depends>
+ <module>phonebook</module>
+ </depends>
+ <location>release/2.2/speeddial-1.0.2.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-Features</info>
+ <md5sum>5a11d1460ac6587e636308a1e8c83974</md5sum>
+</module>
+<module>
+ <rawname>parking</rawname>
+ <name>Parking Lot</name>
+ <version>2.1</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Manages parking lot extensions and other options.
+
+ Parking is a way of putting calls "on hold", and then picking them up from any extension.</description>
+ <menuitems>
+ <parking>Parking Lot</parking>
+ </menuitems>
+ <changelog>
+ *2.1* Remove settings on uninstall bug #1597
+ *2.0.2* Add he_IL translation
+ </changelog>
+ <location>release/2.2/parking-2.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-ParkingLot</info>
+ <md5sum>1c2ca325423c117580381a5ec4773d19</md5sum>
+</module>
+<module>
+ <rawname>phpagiconf</rawname>
+ <name>PHPAGI Config</name>
+ <version>1.1</version>
+ <type>tool</type>
+ <category>Config</category>
+ <menuitems>
+ <phpagiconf>PHPAGI Config</phpagiconf>
+ </menuitems>
+ <depends>
+ <module>manager ge1.0.4</module>
+ </depends>
+ <changelog>*1.1* Removed old dependancy checking code, first 2.2 release</changelog>
+ <location>release/2.2/phpagiconf-1.1.tgz</location>
+ <md5sum>1dd626321578d58698ed033e7e3a688f</md5sum>
+ <info>http://freepbx.org/wiki/phpagiconf</info>
+</module>
+<module>
+ <rawname>recordings</rawname>
+ <name>Recordings</name>
+ <version>3.3.1</version>
+ <type>setup</type>
+ <category>Internal Options & Configuration</category>
+ <description>Creates and manages system recordings, used by many other modules (eg, IVR).</description>
+ <changelog>
+ *3.3.1* Fix error where *77/*79 wasn't working.
+ *3.3* Stop assuming that files being uploaded are .wav's, also highlight the correct format for files to be uploaded in.
+ *3.2.4* Add he_IL translation
+ *3.2.3* Fix for possible wrong recording being selected
+ *3.2.2* Fix for PHP5 not picking up ast recording path
+ *3.2.1* Resolved issue with wrong recording being selected when there's more than one encoding of file (eg, foo.wav and foo.gsm)
+ *3.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog>
+ <menuitems>
+ <recordings>System Recordings</recordings>
+ </menuitems>
+ <location>release/2.2/recordings-3.3.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-SysRec</info>
+ <md5sum>1e4be3c27fde689bf898997d64ad9533</md5sum>
+</module>
+<module>
+ <rawname>disa</rawname>
+ <name>DISA</name>
+ <version>2.2.1</version>
+ <type>setup</type>
+ <category>Remote Access</category>
+ <menuitems>
+ <disa>DISA</disa>
+ </menuitems>
+ <description>DISA Allows you 'Direct Inward System Access'. This gives you the ability to have an option on an IVR that gives you a dial tone, and you're able to dial out from the freePBX machine as if you were connected to a standard extension. It appears as a Destination.</description>
+ <changelog>
+ *2.2.1* Add he_IL translation
+ *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI
+ </changelog>
+ <location>release/2.2/disa-2.2.1.tgz</location>
+ <info>http://aussievoip.com.au/wiki/freePBX-DISA</info>
+ <md5sum>82981330404c9787acb4e194df9212ee</md5sum>
+</module>
+</xml>
Added: freepbx/tarballs
===================================================================
--- freepbx/tarballs 2007-03-01 10:39:31 UTC (rev 3183)
+++ freepbx/tarballs 2007-03-01 10:51:04 UTC (rev 3184)
@@ -0,0 +1 @@
+link ../tarballs/
\ No newline at end of file
Property changes on: freepbx/tarballs
___________________________________________________________________
Name: svn:special
+ *
More information about the Pkg-voip-commits
mailing list