From 65ad4f4f029c4c072fbc3a79a7677b1010cd5afd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:34:41 +0100 Subject: Added public/assets to .gitignore. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index bf1d09a..873c732 100644 --- a/.gitignore +++ b/.gitignore @@ -73,6 +73,8 @@ ERD.png tmp/sass-cache tmp/cache +public/assets + # directory created by "bundle install --path ." (not needed anyway): /ruby -- cgit v1.2.3 From 5d244ddcef6eeb2b33dfb8dcc5295b3b915498df Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:52:32 +0100 Subject: Updated AMOOMA GmbH contact info. --- app/models/tenant.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/models/tenant.rb b/app/models/tenant.rb index 6f98603..dda94d8 100644 --- a/app/models/tenant.rb +++ b/app/models/tenant.rb @@ -223,15 +223,17 @@ class Tenant < ActiveRecord::Base amooma = general_phone_book.phone_book_entries.create( :organization => 'AMOOMA GmbH', :is_organization => true, - :description => "Hersteller von Gemeinschaft. Rufen Sie uns an, falls Sie kommerziellen Support oder Consulting für Gemeinschaft benötigen.", - :homepage_organization => 'http://www.amooma.de', + :description => "Hersteller von Gemeinschaft. Kommerziellen Support und Consulting für Gemeinschaft.", + :homepage_organization => 'http://amooma.de', :twitter_account => 'amooma_de', :facebook_account => 'https://www.facebook.com/AMOOMA.GmbH', ) - amooma.phone_numbers.create( - :name => 'Office', - :number => '+492622706480' - ) + # This is the new 2013 phone number. + # + # amooma.phone_numbers.create( + # :name => 'Office', + # :number => '+4926228998900' + # ) amooma.addresses.create( :street => 'Bachstr. 124', :zip_code => '56566', -- cgit v1.2.3 From fa2a514f87c9b7e35ca10eb1aad3cf6b4c6fc0a1 Mon Sep 17 00:00:00 2001 From: Peter Kozak Date: Mon, 17 Dec 2012 19:13:12 +0100 Subject: phone book search --- app/controllers/config_snom_controller.rb | 38 +++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/app/controllers/config_snom_controller.rb b/app/controllers/config_snom_controller.rb index 40f0c4e..74a117d 100644 --- a/app/controllers/config_snom_controller.rb +++ b/app/controllers/config_snom_controller.rb @@ -2,17 +2,17 @@ class ConfigSnomController < ApplicationController MAX_SIP_ACCOUNTS_COUNT = 11 MAX_SOFTKEYS_COUNT = 12 + (42 * 3) - 1 MAX_DIRECTORY_ENTRIES = 20 - KEYPAD_TO_CHAR = { - '0' => [' ','-','.',',','0'], - '1' => [' ','-','.',',','1'], - '2' => ['a','b','c','2'], - '3' => ['d','e','f','3'], - '4' => ['g','h','i','4'], - '5' => ['j','k','l','5'], - '6' => ['m','n','o','6'], - '7' => ['p','q','r','s','7'], - '8' => ['t','u','v','8'], - '9' => ['w','x','y','z','9'], + KEY_REGEXP = { + '0' => "[ -.,_0]+", + '1' => "[ -.,_1]+", + '2' => "[abc2]", + '3' => "[def3]", + '4' => "[ghi4]", + '5' => "[jkl5]", + '6' => "[mno6]", + '7' => "[pqrs7]", + '8' => "[tuv8]", + '9' => "[wxyz9]", } skip_authorization_check @@ -727,6 +727,14 @@ AAAA' :softkeys => [], } + key_regexp = '' + if !@dialpad_keys.blank? + @dialpad_keys.to_s.each_char do |dialpad_key| + key_regexp.concat(KEY_REGEXP[dialpad_key].to_s) + end + key_regexp = '^' + key_regexp + end + phone_books = Array.new() phone_books = phone_books + @sip_account.sip_accountable.try(:phone_books).all if @sip_account.sip_accountable.class == User @@ -738,7 +746,13 @@ AAAA' phone_book_ids << phone_book.id end - PhoneBookEntry.where(:phone_book_id => phone_book_ids).order(:last_name).order(:first_name).limit(MAX_DIRECTORY_ENTRIES).each do |phone_book_entry| + if key_regexp.blank? + phone_book_entries = PhoneBookEntry.where(:phone_book_id => phone_book_ids).order(:last_name).order(:first_name).limit(MAX_DIRECTORY_ENTRIES) + else + phone_book_entries = PhoneBookEntry.where(:phone_book_id => phone_book_ids).order(:last_name).order(:first_name).where('last_name REGEXP ? OR first_name REGEXP ? OR organization REGEXP ?', key_regexp, key_regexp, key_regexp).limit(MAX_DIRECTORY_ENTRIES) + end + + phone_book_entries.each do |phone_book_entry| if phone_book_entry.phone_numbers.count > 1 @phone_xml_object[:entries] << { :text => phone_book_entry.to_s, :number => phone_book_entry.phone_numbers.first } end -- cgit v1.2.3 From fb3171defa40938b8bd85e0234ca58a1f032e0c3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 18 Dec 2012 10:43:16 +0100 Subject: Updated the README.md --- README.md | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a97ad3b..76bbae9 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,29 @@ GS5 === +Gemeinschaft 5 by the [AMOOMA GmbH](http://amooma.de) in Germany. It is a FreeSWITCH and Ruby on Rails based PBX. This Github repository is our development environment. -Gemeinschaft 5 by the [AMOOMA GmbH](http://amooma.de) in Germany. It is a FreeSWITCH and Ruby on Rails based PBX. +Bug reports +=========== +Please open a new issue to report a bug. Please don't forget to include the URL in case you report a view related problem. + +Feature requests +================ +Please open a new issue and mark it as a feature request. + +Roadmap +======= +We don't have a public roadmap. But we do track the future work with issues. So have a look at [https://github.com/amooma/GS5/issues](https://github.com/amooma/GS5/issues) for future features. License ======= -We use this repository to develop and we'd like to invite everybody to add new features or find bugs. There for the repository is not a private one. But the code in this repository is not GPL! Please go to [http://amooma.de/gemeinschaft/gs5](http://amooma.de/gemeinschaft/gs5) for a copy of this software with an other license. +We use this public repository to develop. Do not use this code on a production system! Do not give away this code to your clients! This code is strictly for development purposes and GS5 is not a GPL project. + +DO NOT USE CODE FROM THE CONTENT OF THIS REPOSITORY FOR A PRODUCTION SYSTEM! -DO NOT USE CODE FROM THIS REPO FOR A PRODUCTION SYSTEM! +You can download a free and stable version of GS5 for your production system at [http://amooma.de/gemeinschaft/gs5](http://amooma.de/gemeinschaft/gs5). Development How-to ================== -There is a master and a develop branch in this repository. If you are familiar with [http://nvie.com/posts/a-successful-git-branching-model/](http://nvie.com/posts/a-successful-git-branching-model/) you are good to go. Please send a pull request and an e-mail to stefan.wintermeyer@amooma.de with some info about your code. Regular developer get access to the repository and a closed developer mailinglist. +There is a master and a develop branch in this repository. If you are familiar with [http://nvie.com/posts/a-successful-git-branching-model/](http://nvie.com/posts/a-successful-git-branching-model/) you are good to go. Please send a pull request and an e-mail to stefan.wintermeyer@amooma.de with some info about your code. Regular developer get access to the repository, a closed developer mailinglist and hardware in case they need it. -We only accept code which was written 100% by you and were you grant us the rights for this code. \ No newline at end of file +We only accept code which was written 100% by you and were you grant us the rights for the code. \ No newline at end of file -- cgit v1.2.3 From c137c2cfcbbed99162927aecb12bd09842000c53 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 18 Dec 2012 11:11:44 +0100 Subject: Fixed typo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 76bbae9..d0a758d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ GS5 === -Gemeinschaft 5 by the [AMOOMA GmbH](http://amooma.de) in Germany. It is a FreeSWITCH and Ruby on Rails based PBX. This Github repository is our development environment. +Gemeinschaft 5 by [AMOOMA GmbH](http://amooma.de) in Germany. It is a FreeSWITCH and Ruby on Rails based PBX. This Github repository is our development environment. Bug reports =========== -- cgit v1.2.3 From 76a2cbbeab405f466f0fd53d7da2bf7a2f98e6a3 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 18 Dec 2012 11:18:00 +0100 Subject: Updated .gitignore --- .gitignore | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 873c732..65a18ad 100644 --- a/.gitignore +++ b/.gitignore @@ -31,9 +31,7 @@ tmp/ nbproject Thumbs.db - # Extra -.sass-cache .livereload # Dreamweaver added files @@ -60,20 +58,17 @@ tmp/**/* # Ignore fixtures. We use factory_girl. /test/fixtures/*.yml -ERD.pdf -ERD.png - /vendor/cache /vendor/bundle .settings/* /.idea # ignore Sass cache: -/.sass-cache -tmp/sass-cache -tmp/cache +.sass-cache +/tmp/sass-cache +/tmp/cache -public/assets +/public/assets # directory created by "bundle install --path ." (not needed anyway): /ruby @@ -84,7 +79,7 @@ public/assets /tmp # Images -public/uploads +/public/uploads # Freeswitch -misc/freeswitch/conf/freeswitch.serial -misc/freeswitch/scripts/ini/gateway_gateway1.ini +/misc/freeswitch/conf/freeswitch.serial +/misc/freeswitch/scripts/ini/gateway_gateway1.ini -- cgit v1.2.3