summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-06-12 14:22:44 +0200
committerPeter Kozak <spag@golwen.net>2013-06-12 14:22:44 +0200
commit5a85c623f2526e9ab9c9bfa307370c2f3e302967 (patch)
tree883145685a012fd5616f304f1b3fa77aaaa66fc5
parenta14b1df01fa143c172857fb67c9bed3ac4262116 (diff)
gateway default settings added
-rw-r--r--db/migrate/20130612120200_add_gateway_defaults.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20130612120200_add_gateway_defaults.rb b/db/migrate/20130612120200_add_gateway_defaults.rb
new file mode 100644
index 0000000..eddba9d
--- /dev/null
+++ b/db/migrate/20130612120200_add_gateway_defaults.rb
@@ -0,0 +1,15 @@
+class AddGatewayDefaults < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'domain', :value => '192.168.1.1', :class_type => 'String')
+ GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'auth_source', :value => 'sip_received_ip', :class_type => 'String')
+ GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'auth_pattern', :value => '^192.168.1.1$', :class_type => 'String')
+ GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'from', :value => '"{caller_id_name}" <sip:{caller_id_number}@{domain}>', :class_type => 'String')
+ GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'from_clir', :value => '"Anonymous" <sip:anonymous@{domain}>', :class_type => 'String')
+ GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'asserted_identity', :value => '"{caller_id_name}" <sip:{caller_id_number}@{domain}>', :class_type => 'String')
+ GsParameter.create(:entity => 'sip_gateways', :section => 'settings', :name => 'asserted_identity_clir', :value => '"Anonymous" <sip:{caller_id_number}@{domain}>', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:entity => 'sip_gateways', :section => 'settings').destroy_all
+ end
+end