diff --git a/bigcouch/local.ini b/bigcouch/local.ini deleted file mode 100644 index f9301c2..0000000 --- a/bigcouch/local.ini +++ /dev/null @@ -1,26 +0,0 @@ -[admins] - -[chttpd] -secret = 53e20840c5b911e28b8b0800200c9a66 -require_valid_user = false -port = 5984 -bind_address = 0.0.0.0 - -[httpd] -secret = 53e20840c5b911e28b8b0800200c9a66 -require_valid_user = false -port = 5986 -bind_address = 0.0.0.0 - -[couchdb] -database_dir = /srv/db -view_index_dir = /srv/view_index - -[cluster] -q=3 -r=2 -w=2 -n=3 - -[log] -file = /var/log/bigcouch/bigcouch.log diff --git a/bigcouch/vm.args b/bigcouch/vm.args deleted file mode 100644 index cd93511..0000000 --- a/bigcouch/vm.args +++ /dev/null @@ -1,30 +0,0 @@ -# Each node in the system must have a unique name. A name can be short -# (specified using -sname) or it can by fully qualified (-name). There can be -# no communication between nodes running with the -sname flag and those running -# with the -name flag. --name bigcouch - -# All nodes must share the same magic cookie for distributed Erlang to work. -# Comment out this line if you synchronized the cookies by other means (using -# the ~/.erlang.cookie file, for example). --setcookie change_me - -# Tell SASL not to log progress reports --sasl errlog_type error - -# Use kernel poll functionality if supported by emulator -+K true - -# Start a pool of asynchronous IO threads -+A 25 - -# Set the max port value to be the same as limits.d/bigcouch.limits -# +Q 65536 --env ERL_MAX_PORTS 65536 - --kernel inet_dist_listen_min 11500 inet_dist_listen_max 11999 - -# Comment this line out to enable the interactive Erlang shell on startup -+Bd -noinput -detached - --couch_ini /opt/bigcouch/etc/default.ini /etc/kazoo/bigcouch/local.ini diff --git a/freeswitch/autoload_configs/conference.conf.xml b/freeswitch/autoload_configs/conference.conf.xml deleted file mode 100644 index fe336aa..0000000 --- a/freeswitch/autoload_configs/conference.conf.xml +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/conference_layouts.conf.xml b/freeswitch/autoload_configs/conference_layouts.conf.xml deleted file mode 100644 index 3620f64..0000000 --- a/freeswitch/autoload_configs/conference_layouts.conf.xml +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1x1 - 2x1 - 2x2 - 3x3 - 4x4 - 5x5 - 6x6 - 8x8 - - - 1up_top_left+5 - 1up_top_left+7 - 1up_top_left+9 - - - 3up+4 - 3up+9 - - - - diff --git a/freeswitch/autoload_configs/console.conf.xml b/freeswitch/autoload_configs/console.conf.xml deleted file mode 100644 index 287f4fa..0000000 --- a/freeswitch/autoload_configs/console.conf.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/freeswitch/autoload_configs/event_socket.conf.xml b/freeswitch/autoload_configs/event_socket.conf.xml deleted file mode 100644 index 0994506..0000000 --- a/freeswitch/autoload_configs/event_socket.conf.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/freeswitch/autoload_configs/http_cache.conf.xml b/freeswitch/autoload_configs/http_cache.conf.xml deleted file mode 100644 index 966281e..0000000 --- a/freeswitch/autoload_configs/http_cache.conf.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/freeswitch/autoload_configs/kazoo.conf.xml b/freeswitch/autoload_configs/kazoo.conf.xml deleted file mode 100644 index 8045164..0000000 --- a/freeswitch/autoload_configs/kazoo.conf.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/local_stream.conf.xml b/freeswitch/autoload_configs/local_stream.conf.xml deleted file mode 100644 index 75dfb94..0000000 --- a/freeswitch/autoload_configs/local_stream.conf.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/logfile.conf.xml b/freeswitch/autoload_configs/logfile.conf.xml deleted file mode 100644 index e1fc602..0000000 --- a/freeswitch/autoload_configs/logfile.conf.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/modules.conf.xml b/freeswitch/autoload_configs/modules.conf.xml deleted file mode 100644 index ec0312b..0000000 --- a/freeswitch/autoload_configs/modules.conf.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/opus.conf.xml b/freeswitch/autoload_configs/opus.conf.xml deleted file mode 100644 index 98a6b7f..0000000 --- a/freeswitch/autoload_configs/opus.conf.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/post_load_modules.conf.xml b/freeswitch/autoload_configs/post_load_modules.conf.xml deleted file mode 100644 index 186e454..0000000 --- a/freeswitch/autoload_configs/post_load_modules.conf.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/freeswitch/autoload_configs/shout.conf.xml b/freeswitch/autoload_configs/shout.conf.xml deleted file mode 100644 index a90bebf..0000000 --- a/freeswitch/autoload_configs/shout.conf.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/freeswitch/autoload_configs/sofia.conf.xml b/freeswitch/autoload_configs/sofia.conf.xml deleted file mode 100644 index b1339fd..0000000 --- a/freeswitch/autoload_configs/sofia.conf.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/spandsp.conf.xml b/freeswitch/autoload_configs/spandsp.conf.xml deleted file mode 100644 index 849d662..0000000 --- a/freeswitch/autoload_configs/spandsp.conf.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/switch.conf.xml b/freeswitch/autoload_configs/switch.conf.xml deleted file mode 100644 index ed7710c..0000000 --- a/freeswitch/autoload_configs/switch.conf.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/autoload_configs/syslog.conf.xml b/freeswitch/autoload_configs/syslog.conf.xml deleted file mode 100644 index eb090d3..0000000 --- a/freeswitch/autoload_configs/syslog.conf.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/freeswitch/autoload_configs/timezones.conf.xml b/freeswitch/autoload_configs/timezones.conf.xml deleted file mode 100644 index 85c805f..0000000 --- a/freeswitch/autoload_configs/timezones.conf.xml +++ /dev/null @@ -1,551 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/certs/.placeholder b/freeswitch/certs/.placeholder deleted file mode 100644 index 9a8681b..0000000 --- a/freeswitch/certs/.placeholder +++ /dev/null @@ -1 +0,0 @@ -just a placeholder \ No newline at end of file diff --git a/freeswitch/chatplan/.placeholder b/freeswitch/chatplan/.placeholder deleted file mode 100644 index 9a8681b..0000000 --- a/freeswitch/chatplan/.placeholder +++ /dev/null @@ -1 +0,0 @@ -just a placeholder \ No newline at end of file diff --git a/freeswitch/dialplan/.placeholder b/freeswitch/dialplan/.placeholder deleted file mode 100644 index 9a8681b..0000000 --- a/freeswitch/dialplan/.placeholder +++ /dev/null @@ -1 +0,0 @@ -just a placeholder \ No newline at end of file diff --git a/freeswitch/directory/.placeholder b/freeswitch/directory/.placeholder deleted file mode 100644 index 9a8681b..0000000 --- a/freeswitch/directory/.placeholder +++ /dev/null @@ -1 +0,0 @@ -just a placeholder \ No newline at end of file diff --git a/freeswitch/freeswitch.xml b/freeswitch/freeswitch.xml deleted file mode 100644 index b3e6f00..0000000 --- a/freeswitch/freeswitch.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - - - -
- -
diff --git a/freeswitch/lang/de/de.xml b/freeswitch/lang/de/de.xml deleted file mode 100644 index a7dbab0..0000000 --- a/freeswitch/lang/de/de.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - diff --git a/freeswitch/lang/de/demo/demo.xml b/freeswitch/lang/de/demo/demo.xml deleted file mode 100644 index fa77948..0000000 --- a/freeswitch/lang/de/demo/demo.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/de/vm/sounds.xml b/freeswitch/lang/de/vm/sounds.xml deleted file mode 100644 index 657e611..0000000 --- a/freeswitch/lang/de/vm/sounds.xml +++ /dev/null @@ -1,413 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/de/vm/tts.xml b/freeswitch/lang/de/vm/tts.xml deleted file mode 100644 index f91cae1..0000000 --- a/freeswitch/lang/de/vm/tts.xml +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/demo/demo-ivr.xml b/freeswitch/lang/en/demo/demo-ivr.xml deleted file mode 100644 index 98f155a..0000000 --- a/freeswitch/lang/en/demo/demo-ivr.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/demo/demo.xml b/freeswitch/lang/en/demo/demo.xml deleted file mode 100644 index bcfe6a8..0000000 --- a/freeswitch/lang/en/demo/demo.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/demo/funnies.xml b/freeswitch/lang/en/demo/funnies.xml deleted file mode 100644 index e901c5a..0000000 --- a/freeswitch/lang/en/demo/funnies.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/freeswitch/lang/en/demo/new-demo-ivr.xml b/freeswitch/lang/en/demo/new-demo-ivr.xml deleted file mode 100644 index 619d992..0000000 --- a/freeswitch/lang/en/demo/new-demo-ivr.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/dir/sounds.xml b/freeswitch/lang/en/dir/sounds.xml deleted file mode 100644 index b715a7f..0000000 --- a/freeswitch/lang/en/dir/sounds.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/dir/tts.xml b/freeswitch/lang/en/dir/tts.xml deleted file mode 100644 index d5f112d..0000000 --- a/freeswitch/lang/en/dir/tts.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/en.xml b/freeswitch/lang/en/en.xml deleted file mode 100644 index 3d27bce..0000000 --- a/freeswitch/lang/en/en.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/ivr/sounds.xml b/freeswitch/lang/en/ivr/sounds.xml deleted file mode 100644 index 0c4f0b9..0000000 --- a/freeswitch/lang/en/ivr/sounds.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/vm/sounds.xml b/freeswitch/lang/en/vm/sounds.xml deleted file mode 100644 index fdef472..0000000 --- a/freeswitch/lang/en/vm/sounds.xml +++ /dev/null @@ -1,441 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/vm/tts.xml b/freeswitch/lang/en/vm/tts.xml deleted file mode 100644 index 2de4b37..0000000 --- a/freeswitch/lang/en/vm/tts.xml +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/en/vm/voicemail_ivr.xml b/freeswitch/lang/en/vm/voicemail_ivr.xml deleted file mode 100644 index 1c48299..0000000 --- a/freeswitch/lang/en/vm/voicemail_ivr.xml +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/demo/demo-es-ES.xml b/freeswitch/lang/es/demo/demo-es-ES.xml deleted file mode 100644 index 4c6919d..0000000 --- a/freeswitch/lang/es/demo/demo-es-ES.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/demo/demo-es-MX.xml b/freeswitch/lang/es/demo/demo-es-MX.xml deleted file mode 100644 index 4c6919d..0000000 --- a/freeswitch/lang/es/demo/demo-es-MX.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/demo/demo-ivr-es-ES.xml b/freeswitch/lang/es/demo/demo-ivr-es-ES.xml deleted file mode 100644 index ec7d7bc..0000000 --- a/freeswitch/lang/es/demo/demo-ivr-es-ES.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/demo/demo-ivr-es-MX.xml b/freeswitch/lang/es/demo/demo-ivr-es-MX.xml deleted file mode 100644 index ec7d7bc..0000000 --- a/freeswitch/lang/es/demo/demo-ivr-es-MX.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/dir/sounds-es-ES.xml b/freeswitch/lang/es/dir/sounds-es-ES.xml deleted file mode 100644 index 2bdc149..0000000 --- a/freeswitch/lang/es/dir/sounds-es-ES.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/dir/sounds-es-MX.xml b/freeswitch/lang/es/dir/sounds-es-MX.xml deleted file mode 100644 index 2bdc149..0000000 --- a/freeswitch/lang/es/dir/sounds-es-MX.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/dir/tts-es-ES.xml b/freeswitch/lang/es/dir/tts-es-ES.xml deleted file mode 100644 index fbdeca7..0000000 --- a/freeswitch/lang/es/dir/tts-es-ES.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/dir/tts-es-MX.xml b/freeswitch/lang/es/dir/tts-es-MX.xml deleted file mode 100644 index ddf15d0..0000000 --- a/freeswitch/lang/es/dir/tts-es-MX.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/es_ES.xml b/freeswitch/lang/es/es_ES.xml deleted file mode 100644 index f8de685..0000000 --- a/freeswitch/lang/es/es_ES.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/freeswitch/lang/es/es_MX.xml b/freeswitch/lang/es/es_MX.xml deleted file mode 100644 index 936abcf..0000000 --- a/freeswitch/lang/es/es_MX.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/freeswitch/lang/es/vm/sounds-es-ES.xml b/freeswitch/lang/es/vm/sounds-es-ES.xml deleted file mode 100644 index dcc9d9f..0000000 --- a/freeswitch/lang/es/vm/sounds-es-ES.xml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/vm/sounds-es-MX.xml b/freeswitch/lang/es/vm/sounds-es-MX.xml deleted file mode 100644 index 1f22c43..0000000 --- a/freeswitch/lang/es/vm/sounds-es-MX.xml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/vm/tts-es-ES.xml b/freeswitch/lang/es/vm/tts-es-ES.xml deleted file mode 100644 index 6dab48c..0000000 --- a/freeswitch/lang/es/vm/tts-es-ES.xml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/es/vm/tts-es-MX.xml b/freeswitch/lang/es/vm/tts-es-MX.xml deleted file mode 100644 index ce5722e..0000000 --- a/freeswitch/lang/es/vm/tts-es-MX.xml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/fr/demo/demo.xml b/freeswitch/lang/fr/demo/demo.xml deleted file mode 100644 index 0d0de59..0000000 --- a/freeswitch/lang/fr/demo/demo.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/fr/dir/sounds.xml b/freeswitch/lang/fr/dir/sounds.xml deleted file mode 100644 index a0dcb2c..0000000 --- a/freeswitch/lang/fr/dir/sounds.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/fr/dir/tts.xml b/freeswitch/lang/fr/dir/tts.xml deleted file mode 100644 index 7d3e5e3..0000000 --- a/freeswitch/lang/fr/dir/tts.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/fr/fr.xml b/freeswitch/lang/fr/fr.xml deleted file mode 100644 index 124ca02..0000000 --- a/freeswitch/lang/fr/fr.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - diff --git a/freeswitch/lang/fr/vm/sounds.xml b/freeswitch/lang/fr/vm/sounds.xml deleted file mode 100644 index 9cd209e..0000000 --- a/freeswitch/lang/fr/vm/sounds.xml +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/he/demo/demo-ivr.xml b/freeswitch/lang/he/demo/demo-ivr.xml deleted file mode 100644 index df8d24b..0000000 --- a/freeswitch/lang/he/demo/demo-ivr.xml +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/he/demo/demo.xml b/freeswitch/lang/he/demo/demo.xml deleted file mode 100644 index bcfe6a8..0000000 --- a/freeswitch/lang/he/demo/demo.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/he/dir/sounds.xml b/freeswitch/lang/he/dir/sounds.xml deleted file mode 100644 index 5fd13ff..0000000 --- a/freeswitch/lang/he/dir/sounds.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/he/he.xml b/freeswitch/lang/he/he.xml deleted file mode 100644 index 7cca73c..0000000 --- a/freeswitch/lang/he/he.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - diff --git a/freeswitch/lang/he/vm/sounds.xml b/freeswitch/lang/he/vm/sounds.xml deleted file mode 100644 index 917c84b..0000000 --- a/freeswitch/lang/he/vm/sounds.xml +++ /dev/null @@ -1,417 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/demo/demo-ivr-pt-BR.xml b/freeswitch/lang/pt/demo/demo-ivr-pt-BR.xml deleted file mode 100644 index ec7d7bc..0000000 --- a/freeswitch/lang/pt/demo/demo-ivr-pt-BR.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/demo/demo-ivr-pt-PT.xml b/freeswitch/lang/pt/demo/demo-ivr-pt-PT.xml deleted file mode 100644 index ec7d7bc..0000000 --- a/freeswitch/lang/pt/demo/demo-ivr-pt-PT.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/demo/demo-pt-BR.xml b/freeswitch/lang/pt/demo/demo-pt-BR.xml deleted file mode 100644 index 846561a..0000000 --- a/freeswitch/lang/pt/demo/demo-pt-BR.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/demo/demo-pt-PT.xml b/freeswitch/lang/pt/demo/demo-pt-PT.xml deleted file mode 100644 index 34464f7..0000000 --- a/freeswitch/lang/pt/demo/demo-pt-PT.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/dir/sounds-pt-BR.xml b/freeswitch/lang/pt/dir/sounds-pt-BR.xml deleted file mode 100644 index 2bdc149..0000000 --- a/freeswitch/lang/pt/dir/sounds-pt-BR.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/dir/sounds-pt-PT.xml b/freeswitch/lang/pt/dir/sounds-pt-PT.xml deleted file mode 100644 index 2bdc149..0000000 --- a/freeswitch/lang/pt/dir/sounds-pt-PT.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/dir/tts-pt-BR.xml b/freeswitch/lang/pt/dir/tts-pt-BR.xml deleted file mode 100644 index 71b79c6..0000000 --- a/freeswitch/lang/pt/dir/tts-pt-BR.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/dir/tts-pt-PT.xml b/freeswitch/lang/pt/dir/tts-pt-PT.xml deleted file mode 100644 index 4f03c5a..0000000 --- a/freeswitch/lang/pt/dir/tts-pt-PT.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/pt_BR.xml b/freeswitch/lang/pt/pt_BR.xml deleted file mode 100644 index 690ee69..0000000 --- a/freeswitch/lang/pt/pt_BR.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/freeswitch/lang/pt/pt_PT.xml b/freeswitch/lang/pt/pt_PT.xml deleted file mode 100644 index c30b361..0000000 --- a/freeswitch/lang/pt/pt_PT.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/freeswitch/lang/pt/vm/sounds-pt-BR.xml b/freeswitch/lang/pt/vm/sounds-pt-BR.xml deleted file mode 100644 index 1ab472a..0000000 --- a/freeswitch/lang/pt/vm/sounds-pt-BR.xml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/vm/sounds-pt-PT.xml b/freeswitch/lang/pt/vm/sounds-pt-PT.xml deleted file mode 100644 index 587d3fe..0000000 --- a/freeswitch/lang/pt/vm/sounds-pt-PT.xml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/vm/tts-pt-BR.xml b/freeswitch/lang/pt/vm/tts-pt-BR.xml deleted file mode 100644 index 4f77045..0000000 --- a/freeswitch/lang/pt/vm/tts-pt-BR.xml +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/pt/vm/tts-pt-PT.xml b/freeswitch/lang/pt/vm/tts-pt-PT.xml deleted file mode 100644 index c3dfc3a..0000000 --- a/freeswitch/lang/pt/vm/tts-pt-PT.xml +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/ru/demo/demo-ivr.xml b/freeswitch/lang/ru/demo/demo-ivr.xml deleted file mode 100644 index 7de0d7f..0000000 --- a/freeswitch/lang/ru/demo/demo-ivr.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/ru/demo/demo.xml b/freeswitch/lang/ru/demo/demo.xml deleted file mode 100644 index 10c9dbc..0000000 --- a/freeswitch/lang/ru/demo/demo.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/ru/dir/sounds.xml b/freeswitch/lang/ru/dir/sounds.xml deleted file mode 100644 index a0dcb2c..0000000 --- a/freeswitch/lang/ru/dir/sounds.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/ru/dir/tts.xml b/freeswitch/lang/ru/dir/tts.xml deleted file mode 100644 index f0aafa2..0000000 --- a/freeswitch/lang/ru/dir/tts.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/ru/ru.xml b/freeswitch/lang/ru/ru.xml deleted file mode 100644 index 5f52e76..0000000 --- a/freeswitch/lang/ru/ru.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - diff --git a/freeswitch/lang/ru/vm/sounds.xml b/freeswitch/lang/ru/vm/sounds.xml deleted file mode 100644 index 2ee9e6e..0000000 --- a/freeswitch/lang/ru/vm/sounds.xml +++ /dev/null @@ -1,374 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/lang/ru/vm/tts.xml b/freeswitch/lang/ru/vm/tts.xml deleted file mode 100644 index 2de4b37..0000000 --- a/freeswitch/lang/ru/vm/tts.xml +++ /dev/null @@ -1,249 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/freeswitch/mime.types b/freeswitch/mime.types deleted file mode 100644 index 34d5fc9..0000000 --- a/freeswitch/mime.types +++ /dev/null @@ -1,983 +0,0 @@ -# This is a comment. I love comments. - -# This file controls what Internet media types are sent to the client for -# given file extension(s). Sending the correct media type to the client -# is important so they know how to handle the content of the file. -# Extra types can either be added here or by using an AddType directive -# in your config files. For more information about Internet media types, -# please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type -# registry is at . - -# MIME type Extensions -application/activemessage -application/andrew-inset ez -application/applefile -application/atom+xml atom -application/atomcat+xml atomcat -application/atomicmail -application/atomsvc+xml atomsvc -application/auth-policy+xml -application/batch-smtp -application/beep+xml -application/cals-1840 -application/ccxml+xml ccxml -application/cellml+xml -application/cnrp+xml -application/commonground -application/conference-info+xml -application/cpl+xml -application/csta+xml -application/cstadata+xml -application/cybercash -application/davmount+xml davmount -application/dca-rft -application/dec-dx -application/dialog-info+xml -application/dicom -application/dns -application/dvcs -application/ecmascript ecma -application/edi-consent -application/edi-x12 -application/edifact -application/epp+xml -application/eshop -application/fastinfoset -application/fastsoap -application/fits -application/font-tdpfr pfr -application/h224 -application/http -application/hyperstudio stk -application/iges -application/im-iscomposing+xml -application/index -application/index.cmd -application/index.obj -application/index.response -application/index.vnd -application/iotp -application/ipp -application/isup -application/javascript js -application/json json -application/kpml-request+xml -application/kpml-response+xml -application/mac-binhex40 hqx -application/mac-compactpro cpt -application/macwriteii -application/marc mrc -application/mathematica ma nb mb -application/mathml+xml mathml -application/mbms-associated-procedure-description+xml -application/mbms-deregister+xml -application/mbms-envelope+xml -application/mbms-msk+xml -application/mbms-msk-response+xml -application/mbms-protection-description+xml -application/mbms-reception-report+xml -application/mbms-register+xml -application/mbms-register-response+xml -application/mbms-user-service-description+xml -application/mbox mbox -application/mediaservercontrol+xml mscml -application/mikey -application/mp4 mp4s -application/mpeg4-generic -application/mpeg4-iod -application/mpeg4-iod-xmt -application/msword doc dot -application/mxf mxf -application/nasdata -application/news-message-id -application/news-transmission -application/nss -application/ocsp-request -application/ocsp-response -application/octet-stream bin dms lha lzh class so iso dmg dist distz pkg bpk dump elc -application/oda oda -application/oebps-package+xml -application/ogg ogg -application/parityfec -application/pdf pdf -application/pgp-encrypted pgp -application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -application/pidf+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -application/poc-settings+xml -application/postscript ai eps ps -application/prs.alvestrand.titrax-sheet -application/prs.cww cww -application/prs.nprend -application/prs.plucker -application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -application/remote-printing -application/resource-lists+xml rl -application/riscos -application/rlmi+xml -application/rls-services+xml rs -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -application/rtx -application/samlassertion+xml -application/samlmetadata+xml -application/sbml+xml sbml -application/sdp sdp -application/set-payment -application/set-payment-initiation setpay -application/set-registration -application/set-registration-initiation setreg -application/sgml -application/sgml-open-catalog -application/shf+xml shf -application/sieve -application/simple-filter+xml -application/simple-message-summary -application/simplesymbolcontainer -application/slate -application/smil -application/smil+xml smi smil -application/soap+fastinfoset -application/soap+xml -application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/ssml+xml ssml -application/timestamp-query -application/timestamp-reply -application/tve-trigger -application/vemmi -application/vividence.scriptfile -application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -application/vnd.3gpp.sms -application/vnd.3gpp2.bcmcsinfo+xml -application/vnd.3gpp2.sms -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -application/vnd.aether.imp -application/vnd.amiga.ami ami -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.audiograph aep -application/vnd.autopackage -application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -application/vnd.bmi bmi -application/vnd.businessobjects rep -application/vnd.cab-jscript -application/vnd.canon-cpdl -application/vnd.canon-lips -application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.commerce-battelle -application/vnd.commonspace csp cst -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -application/vnd.cups-pdf -application/vnd.cups-postscript -application/vnd.cups-ppd ppd -application/vnd.cups-raster -application/vnd.cups-raw -application/vnd.curl curl -application/vnd.cybank -application/vnd.data-vision.rdz rdz -application/vnd.denovo.fcselayout-link fe_launch -application/vnd.dna dna -application/vnd.dolby.mlp mlp -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.dvb.esgcontainer -application/vnd.dvb.ipdcesgaccess -application/vnd.dxr -application/vnd.ecdis-update -application/vnd.ecowin.chart mag -application/vnd.ecowin.filerequest -application/vnd.ecowin.fileupdate -application/vnd.ecowin.series -application/vnd.ecowin.seriesrequest -application/vnd.ecowin.seriesupdate -application/vnd.enliven nml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -application/vnd.fdf fdf -application/vnd.ffsns -application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -application/vnd.framemaker fm frame maker -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -application/vnd.fujixerox.art-ex -application/vnd.fujixerox.art4 -application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -application/vnd.httphone -application/vnd.hzn-3d-crossword x3d -application/vnd.ibm.afplinedata -application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -application/vnd.informedcontrol.rms+xml -application/vnd.intercon.formnet xpw xpx -application/vnd.intertrust.digibox -application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.jam jam -application/vnd.japannet-directory-service -application/vnd.japannet-jpnstore-wakeup -application/vnd.japannet-payment-wakeup -application/vnd.japannet-registration -application/vnd.japannet-registration-wakeup -application/vnd.japannet-setstore-wakeup -application/vnd.japannet-verification -application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -application/vnd.marlin.drm.actiontoken+xml -application/vnd.marlin.drm.conftoken+xml -application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -application/vnd.minisoft-hp3000-save -application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -application/vnd.motorola.flexsuite -application/vnd.motorola.flexsuite.adsi -application/vnd.motorola.flexsuite.fis -application/vnd.motorola.flexsuite.gotap -application/vnd.motorola.flexsuite.kmr -application/vnd.motorola.flexsuite.ttc -application/vnd.motorola.flexsuite.wem -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -application/vnd.ms-asf asf -application/vnd.ms-cab-compressed cab -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-project mpp mpt -application/vnd.ms-tnef -application/vnd.ms-wmdrm.lic-chlg-req -application/vnd.ms-wmdrm.lic-resp -application/vnd.ms-wmdrm.meter-chlg-req -application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -application/vnd.msign -application/vnd.music-niff -application/vnd.musician mus -application/vnd.ncd.control -application/vnd.nervana -application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -application/vnd.nokia.catalogs -application/vnd.nokia.conml+wbxml -application/vnd.nokia.conml+xml -application/vnd.nokia.isds-radio-presets -application/vnd.nokia.iptv.config+xml -application/vnd.nokia.landmark+wbxml -application/vnd.nokia.landmark+xml -application/vnd.nokia.landmarkcollection+xml -application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -application/vnd.nokia.ncd -application/vnd.nokia.pcd+wbxml -application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template otf -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master otm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -application/vnd.obn -application/vnd.olpc-sugar xo -application/vnd.oma-scws-config -application/vnd.oma-scws-http-request -application/vnd.oma-scws-http-response -application/vnd.oma.bcast.associated-procedure-parameter+xml -application/vnd.oma.bcast.drm-trigger+xml -application/vnd.oma.bcast.imd+xml -application/vnd.oma.bcast.notification+xml -application/vnd.oma.bcast.sgboot -application/vnd.oma.bcast.sgdd+xml -application/vnd.oma.bcast.sgdu -application/vnd.oma.bcast.simple-symbol-container -application/vnd.oma.bcast.smartcard-trigger+xml -application/vnd.oma.bcast.sprov+xml -application/vnd.oma.dd2+xml dd2 -application/vnd.oma.drm.risd+xml -application/vnd.oma.group-usage-list+xml -application/vnd.oma.poc.groups+xml -application/vnd.oma.xcap-directory+xml -application/vnd.omads-email+xml -application/vnd.omads-file+xml -application/vnd.omads-folder+xml -application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -application/vnd.osa.netdeploy -application/vnd.osgi.dp dp -application/vnd.otps.ct-kip+xml -application/vnd.palm prc pdb pqa oprc -application/vnd.paos.xml -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -application/vnd.powerbuilder6-s -application/vnd.powerbuilder7 -application/vnd.powerbuilder7-s -application/vnd.powerbuilder75 -application/vnd.powerbuilder75-s -application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -application/vnd.pwg-multiplexed -application/vnd.pwg-xhtml-print+xml -application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -application/vnd.rapid -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml -application/vnd.renlearn.rlprint -application/vnd.rn-realmedia rm -application/vnd.ruckus.download -application/vnd.s3sms -application/vnd.scribus -application/vnd.sealed.3df -application/vnd.sealed.csf -application/vnd.sealed.doc -application/vnd.sealed.eml -application/vnd.sealed.mht -application/vnd.sealed.net -application/vnd.sealed.ppt -application/vnd.sealed.tiff -application/vnd.sealed.xls -application/vnd.sealedmedia.softseal.html -application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -application/vnd.sss-cod -application/vnd.sss-dtf -application/vnd.sss-ntf -application/vnd.street-stream -application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -application/vnd.swiftview-ics -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -application/vnd.truedoc -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -application/vnd.uplanet.alert -application/vnd.uplanet.alert-wbxml -application/vnd.uplanet.bearer-choice -application/vnd.uplanet.bearer-choice-wbxml -application/vnd.uplanet.cacheop -application/vnd.uplanet.cacheop-wbxml -application/vnd.uplanet.channel -application/vnd.uplanet.channel-wbxml -application/vnd.uplanet.list -application/vnd.uplanet.list-wbxml -application/vnd.uplanet.listcmd -application/vnd.uplanet.listcmd-wbxml -application/vnd.uplanet.signal -application/vnd.vcx vcx -application/vnd.vd-study -application/vnd.vectorworks -application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -application/vnd.vividence.scriptfile -application/vnd.vsf vsf -application/vnd.wap.sic -application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -application/vnd.wfa.wsc -application/vnd.wordperfect wpd -application/vnd.wqd wqd -application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -application/vnd.wv.csp+wbxml -application/vnd.wv.csp+xml -application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -application/vnd.xmpie.cpkg -application/vnd.xmpie.dpkg -application/vnd.xmpie.plan -application/vnd.xmpie.ppkg -application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -application/vnd.yellowriver-custom-menu cmp -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -application/watcherinfo+xml -application/whoispp-query -application/whoispp-response -application/winhlp hlp -application/wita -application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-ace-compressed ace -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cdlink vcd -application/x-chat chat -application/x-chess-pgn pgn -application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-director dcr dir dxr fgd -application/x-dvi dvi -application/x-futuresplash spl -application/x-gtar gtar -application/x-gzip -application/x-hdf hdf -application/x-latex latex -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-stuffit sit -application/x-stuffitx sitx -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-texinfo texinfo texi -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x400-bp -application/xcap-att+xml -application/xcap-caps+xml -application/xcap-el+xml -application/xcap-error+xml -application/xcap-ns+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -application/xml xml xsl -application/xml-dtd dtd -application/xml-external-parsed-entity -application/xmpp+xml -application/xop+xml xop -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/zip zip -audio/32kadpcm -audio/3gpp -audio/3gpp2 -audio/ac3 -audio/amr -audio/amr-wb -audio/amr-wb+ -audio/asc -audio/basic au snd -audio/bv16 -audio/bv32 -audio/clearmode -audio/cn -audio/dat12 -audio/dls -audio/dsr-es201108 -audio/dsr-es202050 -audio/dsr-es202211 -audio/dsr-es202212 -audio/dvi4 -audio/eac3 -audio/evrc -audio/evrc-qcp -audio/evrc0 -audio/evrc1 -audio/evrcb -audio/evrcb0 -audio/evrcb1 -audio/g722 -audio/g7221 -audio/g723 -audio/g726-16 -audio/g726-24 -audio/g726-32 -audio/g726-40 -audio/g728 -audio/g729 -audio/g7291 -audio/g729d -audio/g729e -audio/gsm -audio/gsm-efr -audio/ilbc -audio/l16 -audio/l20 -audio/l24 -audio/l8 -audio/lpc -audio/midi mid midi kar rmi -audio/mobile-xmf -audio/mp4 mp4a -audio/mp4a-latm -audio/mpa -audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -audio/mpeg4-generic -audio/parityfec -audio/pcma -audio/pcmu -audio/prs.sid -audio/qcelp -audio/red -audio/rtp-enc-aescm128 -audio/rtp-midi -audio/rtx -audio/smv -audio/smv0 -audio/smv-qcp -audio/sp-midi -audio/t140c -audio/t38 -audio/telephone-event -audio/tone -audio/vdvi -audio/vmr-wb -audio/vnd.3gpp.iufp -audio/vnd.4sb -audio/vnd.audiokoz -audio/vnd.celp -audio/vnd.cisco.nse -audio/vnd.cmles.radio-events -audio/vnd.cns.anp1 -audio/vnd.cns.inf1 -audio/vnd.digital-winds eol -audio/vnd.dlna.adts -audio/vnd.dolby.mlp -audio/vnd.everad.plj -audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.nokia.mobile-xmf -audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -audio/vnd.octel.sbc -audio/vnd.qcelp -audio/vnd.rhetorex.32kadpcm -audio/vnd.sealedmedia.softseal.mpeg -audio/vnd.vmx.cvsd -audio/wav wav -audio/x-aiff aif aiff aifc -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -audio/x-wav wav -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -chemical/x-pdb pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -image/fits -image/g3fax g3 -image/gif gif -image/ief ief -image/jp2 -image/jpeg jpeg jpg jpe -image/jpm -image/jpx -image/naplps -image/png png -image/prs.btif btif -image/prs.pti -image/svg+xml svg svgz -image/t38 -image/tiff tiff tif -image/tiff-fx -image/vnd.adobe.photoshop psd -image/vnd.cns.inf2 -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -image/vnd.globalgraphics.pgb -image/vnd.microsoft.icon ico -image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.net-fpx npx -image/vnd.sealed.png -image/vnd.sealedmedia.softseal.gif -image/vnd.sealedmedia.softseal.jpg -image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/x-cmu-raster ras -image/x-cmx cmx -image/x-icon -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -message/cpim -message/delivery-status -message/disposition-notification -message/external-body -message/http -message/news -message/partial -message/rfc822 eml mime -message/s-http -message/sip -message/sipfrag -message/tracking-status -model/iges igs iges -model/mesh msh mesh silo -model/vnd.dwf dwf -model/vnd.flatland.3dml -model/vnd.gdl gdl -model/vnd.gs.gdl -model/vnd.gtw gtw -model/vnd.moml+xml -model/vnd.mts mts -model/vnd.parasolid.transmit.binary -model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -multipart/alternative -multipart/appledouble -multipart/byteranges -multipart/digest -multipart/encrypted -multipart/form-data -multipart/header-set -multipart/mixed -multipart/parallel -multipart/related -multipart/report -multipart/signed -multipart/voice-message -text/calendar ics ifb -text/css css -text/csv csv -text/directory -text/dns -text/enriched -text/html html htm -text/parityfec -text/plain txt text conf def list log in -text/prs.fallenstein.rst -text/prs.lines.tag dsc -text/red -text/rfc822-headers -text/richtext rtx -text/rtf -text/rtp-enc-aescm128 -text/rtx -text/sgml sgml sgm -text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/uri-list uri uris urls -text/vnd.abc -text/vnd.curl -text/vnd.dmclientscript -text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -text/vnd.iptc.newsml -text/vnd.iptc.nitf -text/vnd.latex-z -text/vnd.motorola.reflex -text/vnd.ms-mediapackage -text/vnd.net2phone.commcenter.command -text/vnd.sun.j2me.app-descriptor jad -text/vnd.trolltech.linguist -text/vnd.wap.si -text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-pascal p pas -text/x-java-source java -text/x-setext etx -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -text/xml -text/xml-external-parsed-entity -video/3gpp 3gp -video/3gpp-tt -video/3gpp2 3g2 -video/bmpeg -video/bt656 -video/celb -video/dv -video/h261 h261 -video/h263 h263 -video/h263-1998 -video/h263-2000 -video/h264 h264 -video/jpeg jpgv -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -video/mp1s -video/mp2p -video/mp2t -video/mp4 mp4 mp4v mpg4 -video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -video/mpeg4-generic -video/mpv -video/nv -video/parityfec -video/pointer -video/quicktime qt mov -video/raw -video/rtp-enc-aescm128 -video/rtx -video/smpte292m -video/vc1 -video/vnd.dlna.mpeg-tts -video/vnd.fvt fvt -video/vnd.hns.video -video/vnd.motorola.video -video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.nokia.interleaved-multimedia -video/vnd.nokia.videovoip -video/vnd.objectvideo -video/vnd.sealed.mpeg1 -video/vnd.sealed.mpeg4 -video/vnd.sealed.swf -video/vnd.sealedmedia.softseal.mov -video/vnd.vivo viv -video/x-fli fli -video/x-ms-asf asf asx -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -x-conference/x-cooltalk ice diff --git a/freeswitch/scripts/kazoo-sync.sh b/freeswitch/scripts/kazoo-sync.sh deleted file mode 100644 index 22fa596..0000000 --- a/freeswitch/scripts/kazoo-sync.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -#### KAZOO - FREESWITCH OFFLINE -## -## run this command in a whapps server on a kazoo cluster to obtain the synchronization key -## -## sup whapps_config get crossbar.freeswitch offline_configuration_key `sup wh_util rand_hex_binary 32 | sed s/[\<\"\>]*//g` | sed s/[\<\"\>]*//g -## -## to change the key use the following command -## -## sup whapps_config set crossbar.freeswitch offline_configuration_key `sup wh_util rand_hex_binary 32 | sed s/[\<\"\>]*//g` -## -## -## -#### - -KEY=86d4f72ba888dba211fa2d17dcb558f0c8483e1ca5a048757b7d0e9204a3c24e - -curl --insecure https://your-kazoo-api-fqdn:8443/v2/freeswitch?key=${KEY} -o update.zip -sudo unzip -o -d /etc/kazoo/freeswitch update.zip -fs_cli --execute reloadxml diff --git a/freeswitch/sip_profiles/sipinterface_1.xml b/freeswitch/sip_profiles/sipinterface_1.xml deleted file mode 100644 index 53508fe..0000000 --- a/freeswitch/sip_profiles/sipinterface_1.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> - - - - - - - - - - - - - - - - - - - - diff --git a/haproxy/haproxy.cfg b/haproxy/haproxy.cfg deleted file mode 100644 index b77ea44..0000000 --- a/haproxy/haproxy.cfg +++ /dev/null @@ -1,40 +0,0 @@ -global - log /dev/log local0 info - maxconn 4096 - user haproxy - group daemon - stats socket /var/run/haproxy/haproxy.sock mode 777 - -defaults - log global - mode http - option httplog - option dontlognull - option log-health-checks - option redispatch - option httpchk GET / - option allbackups - option http-server-close - maxconn 2000 - retries 3 - timeout connect 6000ms - timeout client 12000ms - timeout server 12000ms - -listen bigcouch-data 127.0.0.1:15984 - balance roundrobin - server db1.zone1.mydomain.com 127.0.0.1:5984 check - server db2.zone1.mydomain.com 127.0.0.2:5984 check - server db3.zone2.mydomain.com 127.0.0.3:5984 check backup - server db4.zone2.mydomain.com 127.0.0.4:5984 check backup - -listen bigcouch-mgr 127.0.0.1:15986 - balance roundrobin - server db1.zone1.mydomain.com 127.0.0.1:5986 check - server db2.zone1.mydomain.com 127.0.0.2:5986 check - server db3.zone2.mydomain.com 127.0.0.3:5986 check backup - server db4.zone2.mydomain.com 127.0.0.4:5986 check backup - -listen haproxy-stats 127.0.0.1:22002 - mode http - stats uri / diff --git a/kamailio/accounting-role.cfg b/kamailio/accounting-role.cfg deleted file mode 100644 index 7c58cb5..0000000 --- a/kamailio/accounting-role.cfg +++ /dev/null @@ -1,22 +0,0 @@ -####### Flags ####### -flags - FLAG_ACC: 8, - FLAG_ACCMISSED: 9, - FLAG_ACCFAILED: 10; - -######## Accounting module ######## -loadmodule "acc.so" - -######## Accounting params ######## -modparam("acc", "early_media", 0) -modparam("acc", "report_ack", 0) -modparam("acc", "report_cancels", 1) -modparam("acc", "detect_direction", 0) -modparam("acc", "log_flag", 7) -modparam("acc", "log_level", 2) -modparam("acc", "log_missed_flag", 8) -modparam("acc", "failed_transaction_flag", 9) -modparam("acc", "log_extra", - "src_user=$fU;src_domain=$fd;src_ip=$si;" - "dst_ouser=$tU;dst_user=$rU;dst_domain=$rd") -modparam("acc", "log_facility", "LOG_LOCAL6") diff --git a/kamailio/acl-role.cfg b/kamailio/acl-role.cfg deleted file mode 100644 index 664298d..0000000 --- a/kamailio/acl-role.cfg +++ /dev/null @@ -1,267 +0,0 @@ -######## DoS prevention module ######## -# Default "order" is "deny,allow". -# So if there is no data from DB request will be permitted by default. -# -modparam("htable", "htable", "acl=>initval=-1;autoexpire=7200") - -#!trydef ACL_MESSAGE_DENY "Rejected by ACL" -#!trydef ACL_CODE_DENY "603" -#!trydef ACL_ORDER_ALLOW_DENY "allow,deny" -#!trydef ACL_IP_ADDR_ANY "0.0.0.0/0" - -#!trydef IP_REGEX "[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}\.[0-9]{1,3}" - -## Route for ACL functionality -route[ACL_CHECK] { - - # If packet came from platform or from 4 class MERA, do not check it - if (isflagset(FLAG_INTERNALLY_SOURCED) || isflagset(FLAG_TRUSTED_SOURCE) ) { - xlog("L_DEBUG", "$ci|ACL|Trusted source IP($si) ignoring\n"); - return; - } - - - if (isflagset(FLAG_IS_REPLY)) { - $var(sip-packet) = $rs; - } else { - $var(sip-packet) = $rm; - } - - # FIX for BYE method with IP instead of REALM in From, take REALM from To header - if ($fd =~ IP_REGEX) { - xlog("L_WARNING","$ci|ACL-realm|Fix for $var(sip-packet) with IP in from URI: use to-domain\n"); - $var(realm) = $td; - } else { - $var(realm) = $fd; - } - - $var(acl-realm-request) = "false"; - $var(acl-device-request) = "false"; - - $var(realm-decision) = $sht(acl=>$var(realm)/$si); - - if ($var(realm-decision) == -1) { # we do not have cached decision - $var(acl-realm-request) = "true"; - } else if ($var(realm-decision) == 1 ){ # We have cached decision, let's use it - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(realm)\n"); - } else { - if (!isflagset(FLAG_IS_REPLY)) { - sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY); - } - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is rejected by ACL for $var(realm)\n"); - exit; - } - - if (not_empty("$fU")) { - if ($fd =~ IP_REGEX) { - xlog("L_WARNING","$ci|ACL-device|Fix for $var(sip-packet) with IP in from URI: use to-domain\n"); - $var(device) = $fU + "@" + $td; - } else { - $var(device) = $fU + "@" + $fd; - } - $var(device-decision) = $sht(acl=>$var(device)/$si); - - if ($var(device-decision) == -1) { # we do not have cached decision - $var(acl-device-request) = "true"; - } else if ($var(device-decision) == 1 ){ # We have cached decision, let's use it - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(device)\n"); - } else { - if (!isflagset(FLAG_IS_REPLY)) { - sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY); - } - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is rejected by ACL for $var(device)\n"); - exit; - } - } - - - if ($var(acl-realm-request) == "true" || $var(acl-device-request) == "true") { - if (not_empty("$fU")) - $var(query) = "{'Event-Category': 'acl', 'Event-Name': 'query', 'Entity': '" + $var(device) + "', 'With-Realm': " + $var(acl-realm-request) + "}"; - else - $var(query) = "{'Event-Category': 'acl', 'Event-Name': 'query', 'Entity': '" + $var(realm) + "'}"; - xlog("L_DBG", "$ci|ACL log|Query: $var(query)\n"); - sl_send_reply("100", "Attempting K query"); - if (kazoo_query("frontier", "sbc_config", $var(query), "$var(acl-response)")) { - xlog("L_DBG", "$ci|ACL log|Response: $var(acl-response)\n"); - - kazoo_json($var(acl-response), "Realm.Order", "$var(acl-realm-order)"); - kazoo_json($var(acl-response), "Realm.CIDR", "$var(acl-realm-cidr)"); - kazoo_json($var(acl-response), "Device.Order", "$var(acl-device-order)"); - kazoo_json($var(acl-response), "Device.CIDR", "$var(acl-device-cidr)"); - kazoo_json($var(acl-response), "Device.User-Agent", "$var(acl-device-ua)"); - - } else { - xlog("L_ERROR","$ci|ACL log|DB is unreachable\n"); - $sht(acl=>$var(device)/$si) = 1; - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(device)\n"); - return; - } - - route(ACL_CHECK_REALM); - if (not_empty("$fU")) { - route(ACL_CHECK_DEVICE); - } - } - -} - -# Check ORDER setting for REALM -route[ACL_CHECK_REALM] { - if (not_empty("$var(acl-realm-order)")) { - if ($var(acl-realm-order) == ACL_ORDER_ALLOW_DENY) { - route(ACL_CHECK_REALM_ALLOW); - } else { - route(ACL_CHECK_REALM_DENY); - } - } else { - xlog("L_INFO","$ci|ACL-realm|undefined Order in response for $var(realm)\n"); - $sht(acl=>$var(realm)/$si) = 1; - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(realm)\n"); - } -} - -route[ACL_CHECK_REALM_ALLOW] { - if (not_empty("$var(acl-realm-cidr)")) { - $var(i) = 0; - kazoo_json($var(acl-response), "Realm.CIDR[$var(i)]", "$var(record)");; - while(not_empty("$var(record)")) { - xlog("L_INFO", "$ci|ACL-realm|checking if $si is in $var(record)\n"); - if (($var(record) == ACL_IP_ADDR_ANY) || is_in_subnet("$si", $var(record))) { - $sht(acl=>$var(realm)/$si) = 1; - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(realm)\n"); - return; - } - $var(i) = $var(i) + 1; - kazoo_json($var(acl-response), "Realm.CIDR[$var(i)]", "$var(record)");; - } - } else { - xlog("L_INFO", "$ci|ACL-realm|undefined CIDR in response for $var(realm)\n"); - } - # Remember in CACHE and DENY - $sht(acl=>$var(realm)/$si) = 0; - if (!isflagset(FLAG_IS_REPLY)) { - sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY); - } - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is rejected by ACL for $var(realm)\n"); - exit; -} - -route[ACL_CHECK_REALM_DENY] { - $var(size) = $(kzR{kz.json,Realm.CIDR.length}); - if (not_empty("$var(acl-realm-cidr)")) { - $var(i) = 0; - kazoo_json($var(acl-response), "Realm.CIDR[$var(i)]", "$var(record)");; - while(not_empty("$var(record)")) { - xlog("L_INFO", "$ci|ACL-realm|checking if $si is in $var(record)\n"); - if (($var(record) == ACL_IP_ADDR_ANY) || is_in_subnet("$si", $var(record))) { - $sht(acl=>$var(realm)/$si) = 0; - if (!isflagset(FLAG_IS_REPLY)) { - sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY); - } - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is rejected by ACL for $var(realm)\n"); - exit; - } - $var(i) = $var(i) + 1; - kazoo_json($var(acl-response), "Realm.CIDR[$var(i)]", "$var(record)");; - } - } else { - xlog("L_INFO", "$ci|ACL-realm|undefined CIDR in response for $var(realm)\n"); - } - # Remember in CACHE and ALLOW - $sht(acl=>$var(realm)/$si) = 1; - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(realm)\n"); - return; -} - -# Check ORDER setting for DEVICE -route[ACL_CHECK_DEVICE] { - if (not_empty("$var(acl-device-order)")) { - if ($var(acl-device-order) == ACL_ORDER_ALLOW_DENY) { - route(ACL_CHECK_DEVICE_ALLOW); - } else { - route(ACL_CHECK_DEVICE_DENY); - } - } else { - xlog("L_INFO","$ci|ACL-device|undefined Order in response for $var(device)\n"); - $sht(acl=>$var(device)/$si) = 1; - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(device)\n"); - } -} - -route[ACL_CHECK_DEVICE_ALLOW] { - if (!not_empty("$var(acl-device-ua)") || (not_empty("$var(acl-device-ua)") && $ua =~ $var(acl-device-ua))) { - if (not_empty("$var(acl-device-cidr)")) { - $var(i) = 0; - kazoo_json($var(acl-response), "Device.CIDR[$var(i)]", "$var(record)");; - while(not_empty("$var(record)")) { - xlog("L_INFO", "$ci|ACL-realm|checking if $si is in $var(record)\n"); - if (($var(record) == ACL_IP_ADDR_ANY) || is_in_subnet("$si", $var(record))) { - $sht(acl=>$var(device)/$si) = 1; - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(device)\n"); - return; - } - $var(i) = $var(i) + 1; - kazoo_json($var(acl-response), "Device.CIDR[$var(i)]", "$var(record)");; - } - } else { - xlog("L_INFO", "$ci|ACL-realm|undefined CIDR in response for $var(device)\n"); - } - } - # Remember in CACHE and DENY - $sht(acl=>$var(device)/$si) = 0; - if (!isflagset(FLAG_IS_REPLY)) { - sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY); - } - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is rejected by ACL for $var(device)\n"); - exit; -} - -route[ACL_CHECK_DEVICE_DENY] { - if (not_empty("$var(acl-device-ua)") && !($ua =~ $var(acl-device-ua))) { - $sht(acl=>$var(device)/$si) = 0; - if (!isflagset(FLAG_IS_REPLY)) { - sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY); - } - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is rejected by ACL for $var(device)\n"); - exit; - } - - if (not_empty("$var(acl-device-cidr)")) { - $var(i) = 0; - kazoo_json($var(acl-response), "Device.CIDR[$var(i)]", "$var(record)");; - while(not_empty("$var(record)")) { - xlog("L_INFO", "$ci|ACL-device|checking if $si is in $var(record)\n"); - if (($var(record) == ACL_IP_ADDR_ANY) || is_in_subnet("$si", $var(record))) { - $sht(acl=>$var(device)/$si) = 0; - if (!isflagset(FLAG_IS_REPLY)) { - sl_send_reply(ACL_CODE_DENY, ACL_MESSAGE_DENY); - } - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is rejected by ACL for $var(device)\n"); - exit; - } - $var(i) = $var(i) + 1; - kazoo_json($var(acl-response), "Device.CIDR[$var(i)]", "$var(record)");; - } - } else { - xlog("L_INFO", "$ci|ACL-device|undefined CIDR in response for $var(device)\n"); - } - # Remember in CACHE and ALLOW - $sht(acl=>$var(device)/$si) = 1; - xlog("L_INFO", "$ci|ACL|$var(sip-packet) from $si is permitted by ACL for $var(device)\n"); - return; -} - -event_route[kazoo:consumer-event-acl-acl-flush] -{ - if( $(kzE{kz.json,Device}) != "" ) { - $var(device_regexp) = $(kzE{kz.json,Device}) + "@" + $(kzE{kz.json,Realm}) + "/.*" ; - xlog("L_INFO","|ACL-Flush| Flush ACL for Device. Regexp: $var(device_regexp)\n"); - sht_rm_name_re("acl=>$var(device_regexp)"); - } else { - $var(realm_regexp) = "^" + $(kzE{kz.json,Realm}) + "/.*" ; - xlog("L_INFO","|ACL-Flush| Flush ACL for Realm. Regexp: $var(realm_regexp)\n"); - sht_rm_name_re("acl=>$var(realm_regexp)"); - } - -} diff --git a/kamailio/antiflood-role.cfg b/kamailio/antiflood-role.cfg deleted file mode 100644 index 342a555..0000000 --- a/kamailio/antiflood-role.cfg +++ /dev/null @@ -1,90 +0,0 @@ - -#!trydef ANTIFLOOD_RATE_WINDOW 2 -#!trydef ANTIFLOOD_RATE_DENSITY 50 -#!trydef ANTIFLOOD_RATE_EXPIRE 4 -#!trydef ANTIFLOOD_FAILED_AUTH_WINDOW 300 -#!trydef ANTIFLOOD_FAILED_AUTH_DENSITY 4 - -######## Flood Prevention Hash Tables ######## -modparam("htable", "htable", "antiflood=>size=16;autoexpire=ANTIFLOOD_CACHE_PERIOD;initval=0") - -######## Flood Prevention Module ######## -loadmodule "pike.so" -modparam("pike", "sampling_time_unit", ANTIFLOOD_RATE_WINDOW) -modparam("pike", "reqs_density_per_unit", ANTIFLOOD_RATE_DENSITY) -modparam("pike", "remove_latency", ANTIFLOOD_RATE_EXPIRE) - - -route[ANTIFLOOD_RATE_LIMIT] -{ - if (has_totag() - || isflagset(FLAG_TRUSTED_SOURCE) - || isflagset(FLAG_INTERNALLY_SOURCED)) { - return; - } - - # use pike to control the rates - if (!pike_check_req()) { - xlog("L_WARN", "$ci|end|dropping request from $fu due to rate of requests with source $si:$sp\n"); - drop(); - exit; - } -} - -route[ANITFLOOD_AUTH_LIMIT] -{ - if (has_totag() - || isflagset(FLAG_TRUSTED_SOURCE) - || isflagset(FLAG_INTERNALLY_SOURCED)) { - return(1); - } - - if ($Au != $null && - $sht(antiflood=>$Au::$si::count) >= ANTIFLOOD_FAILED_AUTH_DENSITY - ) { - xlog("L_NOTICE", "$ci|end|request at authorization failure limit for $Au $si:$sp\n"); - $shtex(antiflood=>$Au::$si::count) = ANTIFLOOD_FAILED_AUTH_WINDOW; - $sht(antiflood=>$Au::$si::last) = $Ts; - append_to_reply("Retry-After: 3600\r\n"); - send_reply("500", "Retry Later"); - exit; - } -} - -route[ANTIFLOOD_SUCCESSFUL_AUTH] -{ - sht_rm_name_re("antiflood=>$(Au{re.subst,/\\./\\\\./g})::$(si{re.subst,/\\./\\\\./g})::.*"); -} - -route[ANTIFLOOD_RESET_AUTH] -{ - $var(user) = $(kzE{kz.json,Username}) + "@" + $(kzE{kz.json,Realm}); - sht_rm_name_re("antiflood=>$(var(user){re.subst,/\\./\\\\./g})::.*"); -} - -route[ANITFLOOD_FAILED_AUTH] -{ - if (isflagset(FLAG_TRUSTED_SOURCE)) { - return; - } - - $var(count) = $shtinc(antiflood=>$Au::$si::count); - $sht(antiflood=>$Au::$si::last) = $Ts; - - xlog("L_INFO", "$ci|log|$var(count) errounous authorization response for $Au $si:$sp\n"); - - if ($var(count) >= ANTIFLOOD_FAILED_AUTH_DENSITY) { - $var(exp) = $Ts - ANTIFLOOD_FAILED_AUTH_WINDOW; - if($sht(antiflood=>$Au::$si::last) > $var(exp)){ - xlog("L_NOTICE", "$ci|end|request at authorization failure limit for $Au $si:$sp\n"); - append_to_reply("Retry-After: 3600\r\n"); - send_reply("500", "Retry Later"); - exit; - } - } -} - -event_route[htable:expired:antiflood] -{ - xlog("L_NOTICE", "antiflood expired record $shtrecord(key) => $shtrecord(value)\n"); -} diff --git a/kamailio/certs/.placeholder b/kamailio/certs/.placeholder deleted file mode 100644 index 9581629..0000000 --- a/kamailio/certs/.placeholder +++ /dev/null @@ -1 +0,0 @@ -ensure certs directory gets created \ No newline at end of file diff --git a/kamailio/default.cfg b/kamailio/default.cfg deleted file mode 100644 index f1b3234..0000000 --- a/kamailio/default.cfg +++ /dev/null @@ -1,881 +0,0 @@ -## NOTE: DO NOT CHANGE THIS FILE, EDIT local.cfg ## - -####### Flags ####### -flags - FLAG_INTERNALLY_SOURCED: 1, - FLAG_ASSOCIATE_SERVER: 2, - FLAG_SKIP_NAT_CORRECTION: 3, - FLAG_ASSOCIATE_USER: 4, - FLAG_TRUSTED_SOURCE: 5, - FLAG_SESSION_PROGRESS: 6, - FLAG_IS_REPLY: 7; - -####### Global Parameters ######### -fork = yes -children = 25 -server_signature = no -server_header = "Server: Kazoo" -user_agent_header = "User-Agent: Kazoo" -shm_force_alloc = yes -mlock_pages = yes -phone2tel = 1 -max_while_loops = MAX_WHILE_LOOPS - -pv_buffer_size=65536 -mem_join=1 - -####### Logging Parameters ######### -debug = KAZOO_LOG_LEVEL -memdbg = 10 -memlog = L_INFO -corelog = L_ERR -mem_summary = 12 -log_stderror = no -log_facility = LOG_LOCAL0 -log_name="kamailio" - -####### Alias Parameters ######### -auto_aliases = yes - -####### Binding Parameters ######### -tos = IPTOS_LOWDELAY - -####### TCP Parameters ######### -tcp_children = 25 -disable_tcp = no -tcp_max_connections = 4096 -tcp_connection_lifetime = 3605 -tcp_accept_aliases = no -tcp_async = yes -tcp_connect_timeout = 10 -tcp_conn_wq_max = 65536 -tcp_crlf_ping = yes -tcp_delayed_ack = yes -tcp_fd_cache = yes -tcp_keepalive = yes -tcp_keepcnt = 3 -tcp_keepidle = 30 -tcp_keepintvl = 10 -tcp_linger2 = 30 -tcp_rd_buf_size = 80000 -tcp_send_timeout = 10 -tcp_wq_blk_size = 2100 -tcp_wq_max = 10485760 - -####### UDP Parameters ######### -udp4_raw = 0 -#udp4_raw_mtu = 800 -# # pmtu_discovery = no -#udp_mtu = 800 -# #udp_mtu_try_proto = TCP - -####### DNS Parameters ######### -dns = no -rev_dns = no -dns_try_ipv6 = no -use_dns_cache = on -dns_cache_del_nonexp = yes -dns_cache_flags = 1 -dns_cache_gc_interval = 120 -dns_cache_init = 0 -dns_cache_mem = 1000 -dns_cache_negative_ttl = 60 -dns_try_naptr = no -use_dns_failover = off -dns_srv_lb = off - -####### SCTP Parameters ######### -disable_sctp = yes - -######## Kamailio outbound module ######## -loadmodule "outbound.so" - -######## Kamailio stun module ######## -loadmodule "stun.so" - -######## Kamailio path module ######## -loadmodule "path.so" - -######## Kamailio ipops module ######## -loadmodule "ipops.so" - -######## Kamailio control connector module ######## -loadmodule "ctl.so" -modparam("ctl", "binrpc_buffer_size", 4096) -loadmodule "cfg_rpc.so" -loadmodule "cfgutils.so" -loadmodule "corex.so" - -######## Kamailio uuid module ######## -loadmodule "uuid.so" - -######## Kamailio core extensions module ######## -loadmodule "kex.so" - -######## Transaction (stateful) module ######## -loadmodule "tm.so" -loadmodule "tmx.so" -modparam("tm", "auto_inv_100", 1) -modparam("tm", "auto_inv_100_reason", "Attempting to connect your call") -modparam("tm", "cancel_b_method", 2) -modparam("tm", "ruri_matching", 0) -modparam("tm", "failure_reply_mode", 3) -# modparam("tm", "fr_timer", 30000) -# modparam("tm", "fr_inv_timer", 120000) - -######## Stateless replier module ######## -loadmodule "sl.so" - -######## Record-Route and Route module ######## -loadmodule "rr.so" -modparam("rr", "enable_full_lr", 1) -modparam("rr", "enable_double_rr", 1) - -######## Max-Forward processor module ######## -loadmodule "maxfwd.so" -modparam("maxfwd", "max_limit", 50) - -######## SIP utilities [requires sl] ######## -loadmodule "siputils.so" - -######## SIP message formatting sanity checks [requires sl] ######## -loadmodule "sanity.so" -modparam("sanity", "default_checks", 1511) -modparam("sanity", "uri_checks", 7) -modparam("sanity", "autodrop", 0) - -######## Text operations module ######## -loadmodule "textops.so" -loadmodule "textopsx.so" - -######## Generic Hash Table container in shared memory ######## -loadmodule "htable.so" -modparam("htable", "htable", "associations=>size=16;autoexpire=7200") -modparam("htable", "htable", "redirects=>size=16;autoexpire=5") - -######## Pseudo-Variables module ######## -loadmodule "pv.so" - -######## Advanced logger module ######## -loadmodule "xlog.so" - -######## UAC ######## -loadmodule "uac.so" - -######## AVP's ######## -loadmodule "avp.so" -loadmodule "avpops.so" - -######## UAC Redirection module ######## -loadmodule "uac_redirect.so" - -####### SQL OPS module ########## -loadmodule "sqlops.so" -modparam("sqlops","sqlcon", "cb=>KAZOO_DB_URL") -modparam("sqlops","sqlcon", "exec=>KAZOO_DB_URL") - -####### DATABASE module ########## -loadmodule "db_kazoo.so" - -####### Kazoo Integration module ########## -loadmodule "kazoo.so" -modparam("kazoo", "amqp_primary_zone", "MY_AMQP_ZONE") -modparam("kazoo", "amqp_query_timeout_avp", "$avp(kz_timeout)") -modparam("kazoo", "node_hostname", "MY_HOSTNAME") -modparam("kazoo", "amqp_heartbeats", MY_AMQP_HEARTBEATS) -modparam("kazoo", "amqp_max_channels", MY_AMQP_MAX_CHANNELS) -modparam("kazoo", "amqp_consumer_processes", MY_AMQP_CONSUMER_PROCESSES) -modparam("kazoo", "amqp_consumer_workers", MY_AMQP_CONSUMER_WORKERS) -## amqp connections -modparam("kazoo", "amqp_connection", "MY_AMQP_URL") -#!ifdef MY_AMQP_SECONDARY_URL -modparam("kazoo", "amqp_connection", "MY_AMQP_SECONDARY_URL") -#!endif -#!ifdef MY_AMQP_TERTIARY_URL -modparam("kazoo", "amqp_connection", "MY_AMQP_TERTIARY_URL") -#!endif - -###### kazoo bindings ###### -include_file "kazoo-bindings.cfg" - -####### Role Configurations ########## -#!ifdef DISPATCHER_ROLE -include_file "dispatcher-role.cfg" -#!endif -#!ifdef REGISTRAR_ROLE -include_file "registrar-role.cfg" -#!endif -#!ifdef PRESENCE_ROLE -include_file "presence-role.cfg" -#!endif -#!ifdef MESSAGE_ROLE -include_file "message-role.cfg" -#!endif -#!ifdef NAT_TRAVERSAL_ROLE -include_file "nat-traversal-role.cfg" -#!endif -#!ifdef WEBSOCKETS_ROLE -include_file "websockets-role.cfg" -#!endif -#!ifdef TLS_ROLE -include_file "tls-role.cfg" -#!endif -#!ifdef ACCOUNTING_ROLE -include_file "accounting-role.cfg" -#!endif -#!ifdef ANTIFLOOD_ROLE -include_file "antiflood-role.cfg" -#!endif -#!ifdef TRAFFIC_FILTER_ROLE -include_file "traffic-filter-role.cfg" -#!endif -#!ifdef ACL_ROLE -include_file "acl-role.cfg" -#!endif -#!ifdef RATE_LIMITER_ROLE -include_file "rate-limiter-role.cfg" -#!endif -#!ifdef PUSHER_ROLE -include_file "pusher-role.cfg" -#!endif -#!ifdef RESPONDER_ROLE -include_file "responder-role.cfg" -#!endif -#!ifdef NODES_ROLE -include_file "nodes-role.cfg" -#!endif - - -####### Permissions module ########## -loadmodule "permissions.so" -modparam("permissions", "db_url", "KAZOO_DB_URL") -modparam("permissions", "db_mode", 1) - - -####### DEBUG ###### -loadmodule "debugger.so" -modparam("debugger", "mod_hash_size", 5) -modparam("debugger", "mod_level_mode", 1) - -####### Routing Logic ######## -route -{ - route(SANITY_CHECK); - - route(CHECK_RETRANS); - - # log the basic info regarding this call - xlog("L_INFO", "$ci|start|received $pr request $rm $ou\n"); - xlog("L_INFO", "$ci|log|source $si:$sp -> $Ri:$Rp\n"); - xlog("L_INFO", "$ci|log|from $fu\n"); - xlog("L_INFO", "$ci|log|to $tu\n"); - - route(CLASSIFY_SOURCE); - - #!ifdef ANTIFLOOD_ROLE - route(ANTIFLOOD_RATE_LIMIT); - route(ANITFLOOD_AUTH_LIMIT); - #!endif - - #!ifdef TRAFFIC_FILTER_ROLE - route(FILTER_REQUEST); - #!endif - - #!ifdef ACL_ROLE - route(ACL_CHECK); - #!endif - - #!ifdef RATE_LIMITER_ROLE - route(DOS_PREVENTION); - #!endif - - #!ifdef WEBSOCKETS_ROLE - route(HANDLE_WEBSOCKETS); - #!endif - - route(HANDLE_OPTIONS); - - route(HANDLE_NOTIFY); - - #!ifdef AUTHORIZATION_ROLE - route(AUTHORIZATION_CHECK); - #!endif - - route(HANDLE_MESSAGE); - - #!ifdef PRESENCE_ROLE - route(HANDLE_SUBSCRIBE); - route(HANDLE_PUBLISH); - #!endif - - #!ifdef REGISTRAR_ROLE - route(HANDLE_REGISTER); - #!endif - - route(HANDLE_IN_DIALOG_REQUESTS); - - route(PREPARE_INITIAL_REQUESTS); - - #!ifdef PUSHER_ROLE - route(PUSHER_ROUTE); - #!endif - - if (isflagset(FLAG_INTERNALLY_SOURCED)) { - #!ifdef RESPONDER_ROLE - route(HANDLE_RESPOND); - #!endif - route(INTERNAL_TO_EXTERNAL_RELAY); - exit(); - } - - #!ifdef DISPATCHER_ROLE - route(DISPATCHER_FIND_ROUTES); - #!endif - - route(EXTERNAL_TO_INTERNAL_RELAY); -} - -route[CHECK_RETRANS] -{ - # handle retransmissions - if (!is_method("ACK")) { - if(t_precheck_trans()) { - t_check_trans(); - exit; - } - t_check_trans(); - } -} - -route[SANITY_CHECK] -{ - if (!sanity_check()) { - xlog("L_WARN", "$ci|end|message from $si:$sp is insane\n"); - exit; - } - - if (!mf_process_maxfwd_header("10")) { - xlog("L_WARN", "$ci|end|too much hops, not enough barley from $si:$sp\n"); - send_reply("483", "Too Many Hops"); - exit; - } - - if ($ua == "friendly-scanner" || - $ua == "sundayddr" || - $ua =~ "sipcli" ) { - xlog("L_WARN", "$ci|end|dropping message with user-agent $ua from $si:$sp\n"); - exit; - } -} - -route[CLASSIFY_SOURCE] -{ - #!ifdef DISPATCHER_ROLE - route(DISPATCHER_CLASSIFY_SOURCE); - #!endif - - if (isflagset(FLAG_INTERNALLY_SOURCED) || allow_source_address(TRUSTED_ADR_GROUP) || is_myself($si)) { - xlog("L_INFO", "$ci|log|request from trusted IP\n"); - setflag(FLAG_TRUSTED_SOURCE); - } -} - -route[HANDLE_OPTIONS] -{ - if (is_method("OPTIONS")) { - if (isflagset(FLAG_INTERNALLY_SOURCED)) { - route(INTERNAL_TO_EXTERNAL_RELAY); - } else { - #!ifdef TRAFFIC_FILTER_ROLE - if (!isflagset(FLAG_TRUSTED_SOURCE)) { - route(FILTER_REQUEST_DOMAIN); - } - #!endif - - #!ifdef NAT_TRAVERSAL_ROLE - route(NAT_TEST_AND_CORRECT); - #!endif - - sl_send_reply("200", "Rawr!!"); - } - exit; - } -} - -route[HANDLE_NOTIFY] -{ - if (is_method("NOTIFY")) { - if (isflagset(FLAG_INTERNALLY_SOURCED)) { - if (loose_route()) { - xlog("L_INFO", "$ci|log|Able to loose-route. Cool beans!\n"); - } - - #!ifdef REGISTRAR_ROLE - if (registered("location")) { - lookup("location"); - xlog("L_INFO", "$ci|log|routing to $ruid\n"); - } - #!endif - - route(INTERNAL_TO_EXTERNAL_RELAY); - } else { - #!ifdef TRAFFIC_FILTER_ROLE - if (!isflagset(FLAG_TRUSTED_SOURCE)) { - route(FILTER_REQUEST_DOMAIN); - } - #!endif - - #!ifdef WEBSOCKETS_ROLE - route(NAT_WEBSOCKETS_CORRECT); - #!endif - - #!ifdef NAT_TRAVERSAL_ROLE - route(NAT_TEST_AND_CORRECT); - #!endif - - if($hdr(Event) == "keep-alive") { - xlog("L_INFO", "$ci|stop|replying to keep alive\n"); - sl_send_reply("405", "Stay Alive / Method Not Allowed"); - } else { - xlog("L_INFO", "$ci|stop|consuming event $hdr(Event)\n"); - sl_send_reply("200", "Rawr!!"); - } - } - exit; - } -} - -route[HANDLE_MESSAGE] -{ - #!ifdef MESSAGE_ROLE - if (is_method("MESSAGE")) { - xlog("L_INFO", "$ci|MESSAGE from $fu to $tu\n"); - if (isflagset(FLAG_INTERNALLY_SOURCED) || src_ip == myself) { - xlog("L_INFO", "$ci| routing MESSAGE to external from $fu to $tu\n"); - if (registered("location")) { - lookup("location"); - xlog("L_INFO", "$ci|log|routing to $ruid\n"); - } - route(INTERNAL_TO_EXTERNAL_RELAY); - #!ifdef TRAFFIC_FILTER_ROLE - } else if (!isflagset(FLAG_TRUSTED_SOURCE) - && $rd =~ "[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}\.[0-9]{1,3}") { - xlog("L_WARN", "$ci|end|dropping MESSAGE request with IP domain\n"); - #!endif - } else { - xlog("L_WARN", "$ci|end|MESSAGE $(hdr(Content-Type))\n"); - if( $hdr(Content-Type) == "application/im-iscomposing+xml" ) { - xlog("L_WARN", "$ci|end|dropping MESSAGE application/im-iscomposing+xml\n"); - sl_send_reply("200", "OK"); - } else { - route(DISPATCHER_FIND_ROUTES); - route(EXTERNAL_TO_INTERNAL_RELAY); - } - } - exit(); - } - #!else - if (is_method("MESSAGE")) { - if (isflagset(FLAG_INTERNALLY_SOURCED)) { - route(INTERNAL_TO_EXTERNAL_RELAY); - } else { - sl_send_reply("202", "delivered to /dev/null"); - exit(); - } - } - #!endif -} - - -route[HANDLE_IN_DIALOG_REQUESTS] -{ - if (has_totag()) { - if (is_method("INVITE")) { - setflag(FLAG_SESSION_PROGRESS); - record_route(); - } - if (loose_route()) { - - #!ifdef ACCOUNTING_ROLE - if (is_method("BYE")) { - setflag(FLAG_ACC); - setflag(FLAG_ACCFAILED); - } - #!endif - - #!ifdef NAT_TRAVERSAL_ROLE - if(!isdsturiset()) { - handle_ruri_alias(); - } - #!endif - - xlog("L_INFO", "$ci|log|loose_route in-dialog message\n"); - # Called on in-dialog requests - # If the request in an Invite for on hold from external to internal, - # associate the contact with the media server - # if Invite for on hold, we need to associate the contact URI with the next hop - if (is_method("INVITE") && !isflagset(FLAG_INTERNALLY_SOURCED) && is_audio_on_hold()) { - setflag(FLAG_ASSOCIATE_USER); - } - route(RELAY); - } else if (isflagset(FLAG_INTERNALLY_SOURCED)) { - xlog("L_INFO", "$ci|log|relay internally sourced in-dialog message without loose_route\n"); - route(RELAY); - } else if (t_check_trans()) { - xlog("L_INFO", "$ci|log|allow message for a known transaction\n"); - route(RELAY); - } else { - xlog("L_INFO", "$ci|log|message had a to-tag but can't be loose routed\n"); - sl_send_reply("481", "Call Leg/Transaction Does Not Exist"); - } - exit(); - } -} - -route[PREPARE_INITIAL_REQUESTS] -{ - if (is_method("CANCEL")) { - if (t_check_trans()) { - route(RELAY); - } else { - sl_send_reply("481", "Call leg/transaction does not exist"); - } - exit(); - } else if (is_method("ACK")) { - if (t_check_trans()) { - route(RELAY); - } - exit(); - } - - if (is_method("UPDATE")) { - xlog("L_WARN", "$ci|end|update outside dialog not allowed\n"); - send_reply("403", "Dialog does not exist"); - break; - } - - if (is_method("BYE|PRACK")) { - xlog("L_WARN", "$ci|end|originating subsequent requests outside dialog not allowed\n"); - send_reply("403", "Dialog does not exist"); - break; - } - - if (loose_route()) { - #!ifdef REGISTRAR_ROLE - $xavp(regcfg=>match_received) = $su; - if(registered("location", "$rz:$Au", 2) == 1) { - xlog("L_INFO", "$ci|log|allowing initial route-set for $Au\n"); - } else { - #!endif - xlog("L_WARN", "$ci|end|dropping initial request with route-set\n"); - sl_send_reply("403", "No pre-loaded routes"); - exit(); - #!ifdef REGISTRAR_ROLE - } - #!endif - } - - record_route(); -} - -route[RELAY] -{ - if (isflagset(FLAG_INTERNALLY_SOURCED)) { - route(INTERNAL_TO_EXTERNAL_RELAY); - } else { - route(EXTERNAL_TO_INTERNAL_RELAY); - } - - exit(); -} - -route[INTERNAL_TO_EXTERNAL_RELAY] -{ - #!ifdef ACCOUNTING_ROLE - if (is_method("INVITE")) { - setflag(FLAG_ACC); - setflag(FLAG_ACCFAILED); - } - #!endif - - #!ifdef REGISTRAR_ROLE - if ($hdr(X-KAZOO-AOR) != $null) { - xlog("L_INFO", "$ci|log|using AOR $hdr(X-KAZOO-AOR)\n"); - if (reg_fetch_contacts("location", "$hdr(X-KAZOO-AOR)", "callee")) { - $du = $(ulc(callee=>received)); - $fs = $(ulc(callee=>socket)); - xlog("L_INFO", "$ci|log|routing $hdr(X-KAZOO-AOR) to $du via $fs\n"); - } else { - xlog("L_INFO", "$ci|end|user is not registered\n"); - sl_send_reply("404", "Not registered"); - exit; - } - } - #!endif - - remove_hf_re("^X-.*"); - - if( $avp(kazoo_aor) != $null) - { - $du = $avp(kazoo_du); - xlog("L_INFO", "$ci|end|routing to $ruid : AOR : $avp(kazoo_aor)\n"); - } - - - t_on_reply("EXTERNAL_REPLY"); - - t_set_fr(0, 10000); - - t_relay(); -} - -route[EXTERNAL_TO_INTERNAL_RELAY] -{ - #!ifdef ACCOUNTING_ROLE - if (is_method("INVITE") && is_present_hf("Proxy-Authorization")) { - setflag(FLAG_ACC); - setflag(FLAG_ACCFAILED); - } - #!endif - - #!ifdef NAT_TRAVERSAL_ROLE - if (!isflagset(FLAG_INTERNALLY_SOURCED)) { - route(NAT_TEST_AND_CORRECT); - } - #!endif - - #!ifdef FAST_PICKUP_ROLE - route(FAST_PICKUP_REFER); - #!endif - - remove_hf_re("^X-.*"); - append_hf("X-AUTH-IP: $si\r\n"); - append_hf("X-AUTH-PORT: $sp\r\n"); - - #!ifdef REGISTRAR_ROLE - route(ADD_AUTHORIZATION_HEADERS); - #!endif - - t_on_reply("INTERNAL_REPLY"); - t_on_failure("INTERNAL_FAULT"); - - t_set_fr(0, 1000); - - t_relay(); -} - -onreply_route[EXTERNAL_REPLY] -{ - xlog("L_INFO", "$ci|log|external reply $T_reply_code\n"); - - #!ifdef WEBSOCKETS_ROLE - route(NAT_WEBSOCKETS_CORRECT); - #!endif - - #!ifdef NAT_TRAVERSAL_ROLE - route(NAT_TEST_AND_CORRECT); - #!endif - - #!ifdef ACL_ROLE - setflag(FLAG_IS_REPLY); - route(ACL_CHECK); - #!endif - - #!ifdef RATE_LIMITER_ROLE - setflag(FLAG_IS_REPLY); - route(DOS_PREVENTION); - #!endif - - #!ifdef MESSAGE_ROLE - if (is_method("MESSAGE")) { - route(MESSAGE_REPLY); - } - #!endif -} - -onreply_route[INTERNAL_REPLY] -{ - # this route handles replies that are comming from our media server - xlog("L_INFO", "$ci|start|received internal reply $T_reply_code $rr\n"); - xlog("L_INFO", "$ci|log|source $si:$sp\n"); - - #!ifdef WEBSOCKETS_ROLE - route(NAT_WEBSOCKETS_CORRECT); - #!endif - - #!ifdef ACL_ROLE - setflag(FLAG_IS_REPLY); - route(ACL_CHECK); - #!endif - - #!ifdef RATE_LIMITER_ROLE - setflag(FLAG_IS_REPLY); - route(DOS_PREVENTION); - #!endif - - #!ifdef FAST_PICKUP_ROLE - route(FAST_PICKUP_REPLY); - #!endif - - if (is_method("INVITE") && - !isflagset(FLAG_SESSION_PROGRESS) && - t_check_status("(180)|(183)|(200)") - ) { - if ($avp(AVP_REDIRECT_KEY) != $null && - $sht(redirects=>$avp(AVP_REDIRECT_KEY)) != $null - ) { - xlog("L_INFO", "$ci|log|removing redirect mapping $avp(AVP_REDIRECT_KEY)\n"); - $sht(redirects=>$avp(AVP_REDIRECT_KEY)) = $null; - } - xlog("L_INFO", "$ci|log|call setup, now ignoring abnormal termination\n"); - setflag(FLAG_SESSION_PROGRESS); - } - - if ($rs < 300) { - xlog("L_INFO", "$ci|pass|$T_req($si):$T_req($sp)\n"); - } - - $var(reply_reason) = $rr; -} - -failure_route[INTERNAL_FAULT] -{ - # this branch handles failures (>=300) to our media servers, - # which we can sometimes overcome by routing to another server - - # if the failure cause was due to the transaction being - # cancelled then we are complete - if (t_is_canceled()) { - xlog("L_INFO", "$ci|log|transaction was cancelled\n"); - exit; - } - - # Handle redirects - if (t_check_status("302")) { - $var(redirect) = @from.uri.user + "@" + @from.uri.host + "->" - + $T_rpl($(ct{tobody.user})) + "@" + $T_rpl($(ct{tobody.host})); - if($T_rpl($hdr(X-Redirect-Server)) != $null) { - $sht(redirects=>$var(redirect)) = $T_rpl($hdr(X-Redirect-Server)); - xlog("L_INFO", "$ci|log|stored redirect mapping $var(redirect) to $T_rpl($hdr(X-Redirect-Server))\n"); - } - route(INTERNAL_REDIRECT); - } else if (!t_check_status("407") && - $avp(AVP_REDIRECT_KEY) != $null && - $sht(redirects=>$avp(AVP_REDIRECT_KEY)) != $null - ) { - xlog("L_INFO", "$ci|log|removing redirect mapping $avp(AVP_REDIRECT_KEY)\n"); - $sht(redirects=>$avp(AVP_REDIRECT_KEY)) = $null; - } - - remove_hf_re("^X-.*"); - - # change 6xx to 4xx - if (t_check_status("6[0-9][0-9]") && !t_check_status("600|603|604|606")) { - $var(new_code) = "4" + $(T_reply_code{s.substr,1,0}); - xlog("L_INFO", "$ci|log|sending 6XX reply as $var(new_code) $var(reply_reason)\n"); - t_reply("$(var(new_code){s.int})", "$var(reply_reason)"); - - # if the failure case was something that we should recover - # from then try to find a new media server - } else if ($var(reply_reason) =~ "call barred") { - xlog("L_INFO", "$ci|log|failure route ignoring call barred\n"); - } else if (isflagset(FLAG_SESSION_PROGRESS)) { - xlog("L_INFO", "$ci|log|failure route ignoring failure after session progress\n"); - } else if (t_check_status("403") && $var(reply_reason)=="Forbidden") { - xlog("L_WARNING", "$ci|log|failure route ignoring. Failed auth from IP $si\n"); - } else if (t_check_status("(401)|(407)|(486)|(403)")) { - xlog("L_INFO", "$ci|log|failure route ignoring auth reply $T_reply_code $var(reply_reason)\n"); - } else if (t_check_status("402")) { - xlog("L_INFO", "$ci|log|failure route overriding reply code 402 with 486\n"); - send_reply("486", "Insufficient Funds"); - } else if (t_check_status("(4[0-9][0-9])|(5[0-9][0-9])")) { - xlog("L_INFO", "$ci|start|received failure reply $T_reply_code $rr\n"); - - #!ifdef DISPATCHER_ROLE - route(DISPATCHER_NEXT_ROUTE); - #!endif - - send_reply("486", "Unable to Comply"); - } else { - xlog("L_INFO", "$ci|log|failure route ignoring reply $T_reply_code $rr\n"); - } - xlog("L_INFO", "$ci|pass|$si:$sp\n"); -} - - -route[INTERNAL_REDIRECT] -{ - $var(ds_group) = 1; - $var(contact_uri) = $(ct{tobody.user}) + "@" + $(ct{tobody.host}); - $var(redirect) = @from.uri.user + "@" + @from.uri.host + "->" - + @ruri.user + "@" + @ruri.host; - if ($sht(redirects=>$var(redirect)) != $null) { - $var(prefered_route) = $sht(redirects=>$var(redirect)); - xlog("L_INFO", "$ci|log|found redirect for $var(redirect) : $var(prefered_route)\n"); - $du = $var(prefered_route); - $avp(AVP_REDIRECT_KEY) = $var(redirect); - t_on_reply("INTERNAL_REPLY"); - t_on_failure("INTERNAL_FAULT"); - t_set_fr(0, 1000); - t_relay(); - exit(); - } -} - -onsend_route { - if (isflagset(FLAG_ASSOCIATE_USER)) { - $var(contact_uri) = $(ct{tobody.user}) + "@" + $(ct{tobody.host}); - xlog("L_INFO", "$ci|log|associate user $var(contact_uri) with media server sip:$sndto(ip):$sndto(port)\n"); - $sht(associations=>$var(contact_uri))= "sip:" + $sndto(ip) + ":" + $sndto(port); - } - - xlog("L_INFO", "$ci|pass|$sndfrom(ip):$sndfrom(port) -> $sndto(ip):$sndto(port)\n"); -} - -#!ifdef REGISTRAR_ROLE -route[ADD_AUTHORIZATION_HEADERS] -{ - if (!is_method("INVITE|MESSAGE|REFER")) { - return; - } - - $xavp(regcfg=>match_received) = $su; - if (registered("location","$fu", 2, 1) == 1) { - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Account-ID}{s.len}) > 0) - append_hf("X-ecallmgr_Account-ID: $(xavp(ulattrs=>custom_channel_vars){kz.json,Account-ID})\r\n"); - - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Authorizing-Type}{s.len}) > 0) - append_hf("X-ecallmgr_Authorizing-Type: $(xavp(ulattrs=>custom_channel_vars){kz.json,Authorizing-Type})\r\n"); - - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Authorizing-ID}{s.len}) > 0) - append_hf("X-ecallmgr_Authorizing-ID: $(xavp(ulattrs=>custom_channel_vars){kz.json,Authorizing-ID})\r\n"); - - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Username}{s.len}) > 0) - append_hf("X-ecallmgr_Username: $(xavp(ulattrs=>custom_channel_vars){kz.json,Username})\r\n"); - - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Realm}{s.len}) > 0) - append_hf("X-ecallmgr_Realm: $(xavp(ulattrs=>custom_channel_vars){kz.json,Realm})\r\n"); - - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Account-Realm}{s.len}) > 0) - append_hf("X-ecallmgr_Account-Realm: $(xavp(ulattrs=>custom_channel_vars){kz.json,Account-Realm})\r\n"); - - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Account-Name}{s.len}) > 0) - append_hf("X-ecallmgr_Account-Name: $(xavp(ulattrs=>custom_channel_vars){kz.json,Account-Name})\r\n"); - - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Presence-ID}{s.len}) > 0) - append_hf("X-ecallmgr_Presence-ID: $(xavp(ulattrs=>custom_channel_vars){kz.json,Presence-ID})\r\n"); - - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Owner-ID}{s.len}) > 0) - append_hf("X-ecallmgr_Owner-ID: $(xavp(ulattrs=>custom_channel_vars){kz.json,Owner-ID})\r\n"); - } -} -#!endif - -#!ifdef PRESENCE_NOTIFY_INIT -event_route[tm:local-request] -{ - route(PRESENCE_LOCAL_NOTIFY); -} -#!endif - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/defs.cfg b/kamailio/defs.cfg deleted file mode 100644 index f483953..0000000 --- a/kamailio/defs.cfg +++ /dev/null @@ -1,66 +0,0 @@ -## NOTE: DO NOT CHANGE THIS FILE, EDIT local.cfg ## - - -####### defs ######## - -#!ifndef KAZOO_LOG_LEVEL -#!define KAZOO_LOG_LEVEL L_INFO -#!endif - -#!ifndef KAZOO_DATA_DIR -#!substdef "!KAZOO_DATA_DIR!/etc/kazoo/kamailio/db!g" -#!endif - -#!ifndef KAZOO_DB_URL -#!substdef "!KAZOO_DB_URL!kazoo:///KAZOO_DATA_DIR/kazoo.db!g" -#!endif - -#!ifndef MAX_WHILE_LOOPS -#!substdef "!MAX_WHILE_LOOPS!500!g" -#!endif - -#!ifndef OPENBTS_AUTH_SECRET -#!substdef "!OPENBTS_AUTH_SECRET!b3a54fa8317c7d9cb1d89d8970947b30eda273124d97fc3a079ccc98ecc2569b!g" -#!endif - -#!ifndef KZ_USE_DISPATCHER_LIST -#!trydef KZ_USE_DISPATCHER_TABLE -#!endif - -#!ifndef ANTIFLOOD_CACHE_PERIOD -#!substdef "!ANTIFLOOD_CACHE_PERIOD!600!g" -#!endif - -#!ifndef MY_AMQP_MAX_CHANNELS -#!define MY_AMQP_MAX_CHANNELS 25 -#!endif - -#!ifndef MY_AMQP_CONSUMER_PROCESSES -#!define MY_AMQP_CONSUMER_PROCESSES 4 -#!endif - -#!ifndef MY_AMQP_CONSUMER_WORKERS -#!define MY_AMQP_CONSUMER_WORKERS 16 -#!endif - -#!ifndef MY_AMQP_HEARTBEATS -#!define MY_AMQP_HEARTBEATS 5 -#!endif - -#!ifndef BLF_USE_SINGLE_DIALOG -#!define BLF_USE_SINGLE_DIALOG 1 -#!endif - -#!ifndef MY_AMQP_ZONE -#!substdef "!MY_AMQP_ZONE!local!g" -#!endif - -#!ifndef DISPATCHER_ADD_SERVERS -#!define DISPATCHER_ADD_SERVERS 1 -#!endif - -#!ifndef PRESENCE_RESET_BLF_DEFER_UPDATE -#!define PRESENCE_RESET_BLF_DEFER_UPDATE 0 -#!endif - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/dispatcher-role.cfg b/kamailio/dispatcher-role.cfg deleted file mode 100644 index 49faa01..0000000 --- a/kamailio/dispatcher-role.cfg +++ /dev/null @@ -1,233 +0,0 @@ -######## Generic Hash Table container in shared memory ######## -modparam("htable", "htable", "failover=>size=16;autoexpire=120") - -kazoo.dispatcher_auto_add = DISPATCHER_ADD_SERVERS descr "adds media servers reported by ecallmgr" - -####### Dispatcher module ######## -loadmodule "dispatcher.so" -modparam("dispatcher", "db_url", "KAZOO_DB_URL") -modparam("dispatcher", "flags", 2) -modparam("dispatcher", "use_default", 0) -modparam("dispatcher", "force_dst", 1) -modparam("dispatcher", "dst_avp", "$avp(ds_dst)") -modparam("dispatcher", "attrs_avp", "$avp(ds_attrs)") -modparam("dispatcher", "grp_avp", "$avp(ds_grp)") -modparam("dispatcher", "cnt_avp", "$avp(ds_cnt)") -modparam("dispatcher", "hash_pvar", "$avp(ds_grp)") -modparam("dispatcher", "setid_pvname", "$var(setid)") -modparam("dispatcher", "ds_ping_method", "OPTIONS") -modparam("dispatcher", "ds_ping_interval", 10) -modparam("dispatcher", "ds_probing_threshold", 3) -modparam("dispatcher", "ds_probing_mode", 1) -modparam("dispatcher", "ds_ping_reply_codes", "501,403,404,400,200") -modparam("dispatcher", "ds_ping_from", "sip:sipcheck@MY_HOSTNAME") - - -## Dispatcher Groups: -## 1 - Primary media servers -## 2 - Backup media servers -## 3 - Alternate media server IPs (used only for classification) -## 10 - Presence servers (if not locally handled) -## 20 - Registrar servers (if not locally handled) - -####### Dispatcher Logic ######## -route[DISPATCHER_CLASSIFY_SOURCE] -{ - if (is_myself("$ou")) { - xlog("L_INFO", "$ci|log|original R-URI ($ou) is this proxy, treating as external sources\n"); - } else if ( - ds_is_from_list(1, 3) || - ds_is_from_list(2, 3) || - ds_is_from_list(3, 3) || - ds_is_from_list(10, 3) || - ds_is_from_list(20, 3) - ) { - xlog("L_INFO", "$ci|log|originated from internal sources\n"); - - setflag(FLAG_INTERNALLY_SOURCED); - } else { - xlog("L_INFO", "$ci|log|originated from external sources\n"); - } -} - -# Take the routes from dispatcher - hash over callid -# If prefered route defined, reorder the destionations -route[DISPATCHER_FIND_ROUTES] -{ - if ($sht(failover=>$ci::current) != $null) { - $du = $sht(failover=>$ci::current); - return; - } - - $var(ds_group) = 1; - - #!ifndef PRESENCE_ROLE - if (is_method("SUBSCRIBE")) { - $var(ds_group) = 10; - } - #!endif - - #!ifndef REGISTRAR_ROLE - if (is_method("REGISTER")) { - $var(ds_group) = 20; - } - #!endif - - #!ifdef FAST_PICKUP_ROLE - route(FAST_PICKUP_ATTEMPT); - #!endif - - if (!ds_select_dst("$var(ds_group)", "0") || $(avp(ds_dst)[0]) == $null) { - # if we selected from group 1, try again in group 2 - if ($var(ds_group) == 1) { - if (!ds_select_dst("2", "0")) { - xlog("L_WARN", "$ci|end|no servers avaliable in group 1 or 2\n"); - sl_send_reply("480", "All servers busy"); - exit; - } - } else { - xlog("L_INFO", "$ci|end|no servers avaliable in group $var(ds_group)\n"); - sl_send_reply("480", "All servers busy"); - exit; - } - } - - $var(contact_uri) = $(ct{tobody.user}) + "@" + $(ct{tobody.host}); - $var(redirect) = @from.uri.user + "@" + @from.uri.host + "->" - + @ruri.user + "@" + @ruri.host; - if ($sht(redirects=>$var(redirect)) != $null) { - $var(prefered_route) = $sht(redirects=>$var(redirect)); - xlog("L_INFO", "$ci|log|found redirect for $var(redirect)\n"); - if (route(DISPATCHER_REORDER_ROUTES)) { - $avp(AVP_REDIRECT_KEY) = $var(redirect); - } - } else if ($sht(associations=>$var(contact_uri)) != $null) { - $var(prefered_route) = $sht(associations=>$var(contact_uri)); - xlog("L_INFO", "$ci|log|found association for contact uri $var(contact_uri)\n"); - if (!route(DISPATCHER_REORDER_ROUTES)) { - $sht(associations=>$var(association)) = $null; - } - } -} - -route[DISPATCHER_REORDER_ROUTES] -{ - $var(i) = 0; - $var(found) = 0; - while($(avp(ds_dst)[$var(i)]) != $null) { - if($(avp(ds_dst)[$var(i)]) != $var(prefered_route)) { - $avp(tmp_ds_dst) = $(avp(ds_dst)[$var(i)]); - } else { - $var(found) = 1; - } - - $var(i) = $var(i) + 1; - } - - if (!$var(found) && $var(ds_group) == 1 && ds_select_dst("2", "0")) { - $var(i) = 0; - while($(avp(ds_dst)[$var(i)]) != $null) { - if($(avp(ds_dst)[$var(i)]) == $var(prefered_route)) { - xlog("L_INFO", "$ci|log|found associated media server in backup list\n"); - $var(found) = 1; - break; - } - $var(i) = $var(i) + 1; - } - } - - if ($var(found)) { - xlog("L_INFO", "$ci|log|re-ordering the dispatcher list to maintain association with $var(prefered_route)\n"); - - $(avp(ds_dst)[*]) = $null; - - $var(i) = 0; - while($(avp(tmp_ds_dst)[$var(i)]) != $null) { - $avp(ds_dst) = $(avp(tmp_ds_dst)[$var(i)]); - - $var(i) = $var(i) + 1; - } - $avp(ds_dst) = $var(prefered_route); - $du = $var(prefered_route); - - $(avp(tmp_ds_dst)[*]) = $null; - } else { - xlog("L_INFO", "$ci|log|associated media server $var(prefered_route) is inactive, moving to $rd\n"); - return -1; - } - - return 1; -} - -route[DISPATCHER_NEXT_ROUTE] -{ - $var(failover_count) = $sht(failover=>$ci::counts); - - if ($sht(failover=>$ci::counts) == $null) { - $var(i) = 0; - while($(avp(ds_dst)[$var(i)]) != $null) { - $sht(failover=>$ci[$var(i)]) = $(avp(ds_dst)[$var(i)]); - $var(i) = $var(i) + 1; - if ($var(i) >= 3) { - break; - } - } - $sht(failover=>$ci::counts) = $var(i); - $var(failover_count) = $var(i); - } - - # try to find a new media server to send the call to - if ($var(failover_count) > 1) { - $var(failover_count) = $var(failover_count) - 1; - - $du = $sht(failover=>$ci[$var(failover_count)]); - $sht(failover=>$ci::counts) = $var(failover_count); - $sht(failover=>$ci::current) = $du; - - xlog("L_INFO", "$ci|log|remaining failed retry attempts: $var(failover_count)\n"); - xlog("L_INFO", "$ci|log|routing call to next media server $du\n"); - - setflag(FLAG_SKIP_NAT_CORRECTION); - - # reset the final reply timer - $avp(final_reply_timer) = 3; - - t_on_reply("INTERNAL_REPLY"); - - t_on_failure("INTERNAL_FAULT"); - - # relay the request to the new media server - route(EXTERNAL_TO_INTERNAL_RELAY); - - exit(); - } -} - -event_route[dispatcher:dst-down] -{ - xlog("L_ERR", "Destination down: $ru\n"); -} - -event_route[dispatcher:dst-up] -{ - xlog("L_WARNING", "Destination up: $ru\n"); -} - - -route[DISPATCHER_CHECK_MEDIA_SERVER] -{ - if(@cfg_get.kazoo.dispatcher_auto_add == 1) { - $var(SetId) = 1; - if($var(Zone) != "MY_AMQP_ZONE") { - $var(SetId) = 2; - } - sql_query("exec", "insert into dispatcher (setid, destination) select $var(SetId), \"$var(MediaUrl)\" where not exists(select * from dispatcher where destination = \"$var(MediaUrl)\")"); - if($sqlrows(exec) > 0) { - xlog("L_WARNING", "reloading dispatcher table\n"); - ds_reload(); - } - } -} - - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/fast-pickup-role.cfg b/kamailio/fast-pickup-role.cfg deleted file mode 100644 index 560c5eb..0000000 --- a/kamailio/fast-pickup-role.cfg +++ /dev/null @@ -1,161 +0,0 @@ -######## FAST PICKUP ROLE ######## -modparam("htable", "htable", "park=>size=16;autoexpire=600") -modparam("htable", "htable", "fp=>size=8"); - -route[FAST_PICKUP_START] -{ - $sht(fp=>count) = 0; -} - -route[FAST_PICKUP_LOAD] -{ - sht_reset("fp"); -#!ifndef KZ_USE_DISPATCHER_LIST - xlog("L_INFO", "$ci|log|fast|initializing fastpick hash table from dispatcher\n"); - if (sql_xquery("exec", "select destination from dispatcher", "ra") == 1) { - while($xavp(ra) != $null) { - $var(host) = $(xavp(ra=>destination){uri.host}); - $var(port) = $(xavp(ra=>destination){uri.port}); - $var(destination) = $xavp(ra=>destination); - $var(i) = 0; - if(!is_ip("$var(host)")) { - if(dns_query("$var(host)", "xyz")) { - $var(destination) = $_s(sip:$dns(xyz=>addr[$var(i)]):$var(port)); - } - } - xlog("L_INFO", "$ci|log|fast|adding key $(var(destination){s.md5}) for $var(destination)\n"); - $sht(fp=>$(var(destination){s.md5})) = $var(destination); - pv_unset("$xavp(ra)"); - } - } -#!else - xlog("L_INFO", "$ci|log|fast|cannot initialize hash table from dispatcher. check KZ_USE_DISPATCHER_LIST option in local.cfg\n"); -#!endif -} - -route[FAST_PICKUP_ATTEMPT] -{ - if (!is_method("INVITE")) { - return; - } - - $var(replaced_call_id) = "none"; - - if($hdr(Replaces)!= $null) { - $var(replaced_call_id) = $(hdr(Replaces){s.select,0,;}); - } - - if($var(replaced_call_id) =~ "kfp+") { - if($shtinc(fp=>count) == 1) { - route(FAST_PICKUP_LOAD); - } - remove_hf_re("^Replaces"); - $var(PickupOptions) = $(var(replaced_call_id){re.subst,/^kfp\+(.{2})([^@]*)@(.*)/\1/}{s.decode.hexa}); - $var(md5) = $(var(replaced_call_id){re.subst,/^kfp\+(.{2})([^@]*)@(.*)/\2/}); - $var(replaced_call_id) = $(var(replaced_call_id){re.subst,/^kfp\+(.{2})([^@]*)@(.*)/\3/}); - if( $sht(fp=>$var(md5)) != $null) { - route(FAST_PICKUP_OPTION); - $du = $sht(fp=>$var(md5)); - append_hf("Replaces: $var(replaced_call_id)$var(Pickup)\r\n"); - xlog("L_INFO", "$ci|log|fast|found shortcut for call-id $var(replaced_call_id) , redirecting ($(ru{uri.user})) to $du\n"); - route(EXTERNAL_TO_INTERNAL_RELAY); - exit(); - } else { - $var(replaced_call_id) = "none"; - xlog("L_INFO", "$ci|log|fast|shortcut $var(md5) invalid in this server, using standard routing\n"); - } - } - - if($var(replaced_call_id) != "none") { - xlog("L_INFO", "$ci|log|request has replaces call-id $var(replaced_call_id)\n"); - $var(amqp_payload_request) = '{"Event-Category" : "call_event" , "Event-Name" : "channel_status_req", "Call-ID" : "' + $var(replaced_call_id) + '", "Active-Only" : true }'; - $var(amqp_routing_key) = "call.status_req." + $(var(replaced_call_id){kz.encode}); - sl_send_reply("100", "locating your call"); - xlog("L_INFO", "$ci|log|querying cluster for the location of call-id $var(replaced_call_id)\n"); - if(kazoo_query("callevt", $var(amqp_routing_key), $var(amqp_payload_request))) { - $du = $(kzR{kz.json,Switch-URL}); - if($du != $null) { - if($(ru{uri.user}) =~ "\*") { - remove_hf_re("^Replaces"); - append_hf("Replaces: $var(replaced_call_id);a-leg=true\r\n"); - } - xlog("L_INFO", "$ci|log|call-id $var(replaced_call_id) found redirecting call ($(ru{uri.user})) to $du\n"); - route(EXTERNAL_TO_INTERNAL_RELAY); - exit(); - } else { - xlog("L_WARN", "$ci|log|call-id $var(replaced_call_id) not found in cluster, proceeding with normal dispatch\n"); - remove_hf_re("^Replaces"); - } - } else { - remove_hf_re("^Replaces"); - } - } - - ##### CALL-PARK #### - if($(ru{uri.user}) =~ "\*" && $sht(park=>$(ru{uri.user})@$(ru{uri.domain})) != $null) { - $du = $sht(park=>$(ru{uri.user})@$(ruri{uri.domain})); - xlog("L_INFO", "$ci|log|redirecting park request to $du\n"); - if ($hdr(Proxy-Authorization) != $null) { - xlog("L_INFO", "$ci|log|removed park redirect\n"); - $sht(park=>$(ru{uri.user})@$(ruri{uri.domain})) = $null; - } - route(EXTERNAL_TO_INTERNAL_RELAY); - exit(); - } -} - -route[FAST_PICKUP_REFER] -{ - if(!is_method("REFER")) { - return; - } - - $avp(refer_to) = $hdr(Refer-To); - $avp(referred_by) = $hdr(Referred-By); - $avp(refer_to_uri) = $rt; -} - -route[FAST_PICKUP_REPLY] { - if (!is_method("REFER") || !t_check_status("(200)|(202)") ) { - return; - } - - $var(contact) = "sip:" + $(ct{tobody.uri}{uri.host}) + ":" + $(ct{tobody.uri}{uri.port}); - xlog("L_INFO", "$ci|log|caching park info $(avp(refer_to_uri){uri.user})@$(avp(refer_to_uri){uri.domain}) = $var(contact)\n"); - - $sht(park=>$(avp(refer_to_uri){uri.user})@$(avp(refer_to_uri){uri.domain})) = $var(contact); -} - -route[FAST_PICKUP_OPTION] -{ - $var(Pickup) = ""; - switch($var(PickupOptions)) - { - case 1: - $var(Pickup) = ";a-leg=true"; - break; - case 2: - $var(Pickup) = ";early-only=true"; - break; - default: - break; - } -} - -route[FAST_PICKUP_INIT] -{ - $var(AppName) = $(kzE{kz.json,App-Name}); - if($var(AppName) == "park") { - $var(Pickup) = 1; #";a-leg=true"; - } else { - $var(Pickup) = 2; #";early-only=true"; - } - $var(Option) = $(var(Pickup){s.encode.hexa}); - $var(Cookie) = $(kzE{kz.json,Switch-URI}{s.md5}); - $var(call_id) = $(kzE{kz.json,Call-ID}); - $var(JObj) = $(kzE{re.subst,/"Call-ID"\s*\:\s*"([^\s"]*)"/"Call-ID" : "kfp+$var(Option)$var(Cookie)@\1"/}); - xlog("L_DEBUG", "$ci|init|fast|created shortcut kfp+$var(Option)$var(Cookie)@ for call-id $var(call_id)\n"); -} - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab - diff --git a/kamailio/kamailio.cfg b/kamailio/kamailio.cfg deleted file mode 100644 index 2749fbf..0000000 --- a/kamailio/kamailio.cfg +++ /dev/null @@ -1,35 +0,0 @@ -## NOTE: DO NOT CHANGE THIS FILE, EDIT local.cfg ## - -#### Preprocessor Directives ######### -#!define L_ALERT -5 -#!define L_BUG -4 -#!define L_CRIT2 -3 -#!define L_CRIT -2 -#!define L_ERR -1 -#!define L_WARN 0 -#!define L_NOTICE 1 -#!define L_INFO 2 -#!define L_DBG 3 - -#!define AVP_RECV_PARAM "recv_param" -#!define AVP_LOG_LEVEL "log_level" -#!define AVP_ROUTE_CNT "route_cnt" -#!define AVP_ASSOCIATED_SERVER "associated_server" -#!define AVP_ASSOCIATE_CONTACT "associate_contact" -#!define AVP_REDIRECT_KEY "redirect_key" - -#!define FLB_NATB 1 -#!define FLB_NATSIPPING 2 -#!define FLB_UAC_REDIRECT 3 -#!define TRUSTED_ADR_GROUP 1 - -####### Local Configuration ######## -include_file "local.cfg" - -####### defaults not configured in local ######## -include_file "defs.cfg" - -####### Default Configuration ###### -include_file "default.cfg" - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/kazoo-bindings.cfg b/kamailio/kazoo-bindings.cfg deleted file mode 100644 index 304ef47..0000000 --- a/kamailio/kazoo-bindings.cfg +++ /dev/null @@ -1,62 +0,0 @@ -######## kazoo bindings ######## -### use this simple form of binding a listener -### kazoo_subscribe("dialoginfo", "direct", "BLF-QUEUE-MY_HOSTNAME", "BLF-MY_HOSTNAME"); -### -### or unleash the power of rabbit to kazoo-blf -### -### 'no_ack' : 1 => needs ack, -### 'wait_for_consumer_ack' -### : 1 => when it receives, it processses on the AMQP Worker ad after that it confirms -### : 0 => when it receives, it acks then processes in the AMQP Worker -### only works if no_ack : 0 -### -### Rabbit Policy for ha-mode -### pattern : ^BLF -### definition : ha-mode: all -### -### - -event_route[kazoo:mod-init] -{ - - #!ifdef PRESENCE_ROLE - route(PRESENCE_BINDINGS); - #!endif - - #!ifdef MESSAGE_ROLE - route(MESSAGE_BINDINGS); - #!endif - - #!ifdef REGISTRAR_ROLE - route(REGISTRAR_BINDINGS); - #!endif - - #!ifdef NODES_ROLE - route(NODES_BINDINGS); - #!endif - - #!ifdef ACL_ROLE - $var(payload) = "{ 'exchange' : 'frontier_acl' , 'type' : 'topic', 'queue' : 'FRONTIERACL-FLUSH-MY_HOSTNAME', 'routing' : 'flush', 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }"; - kazoo_subscribe("$var(payload)"); - #!endif - - #!import_file "kazoo-custom-bindings.cfg" - -} - -event_route[kazoo:consumer-event] -{ - xlog("L_INFO","unhandled AMQP event, payload: $kzE\n"); -} - -event_route[kazoo:consumer-event-connection-open] -{ - xlog("L_INFO","connection to $(kzE{kz.json,host}) opened\n"); -} - -event_route[kazoo:consumer-event-connection-closed] -{ - xlog("L_INFO","connection to $(kzE{kz.json,host}) closed\n"); -} - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/kazoodb.sql b/kamailio/kazoodb.sql deleted file mode 100644 index 3fa6705..0000000 --- a/kamailio/kazoodb.sql +++ /dev/null @@ -1,883 +0,0 @@ -PRAGMA foreign_keys=OFF; -PRAGMA wal=on; -BEGIN TRANSACTION; -CREATE TABLE version ( - table_name VARCHAR(32) NOT NULL, - table_version INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT version_table_name_idx UNIQUE (table_name) -); -INSERT INTO version VALUES('version',1); -INSERT INTO version VALUES('acc',5); -INSERT INTO version VALUES('acc_cdrs',2); -INSERT INTO version VALUES('missed_calls',4); -INSERT INTO version VALUES('lcr_gw',3); -INSERT INTO version VALUES('lcr_rule_target',1); -INSERT INTO version VALUES('lcr_rule',2); -INSERT INTO version VALUES('domain',2); -INSERT INTO version VALUES('domain_attrs',1); -INSERT INTO version VALUES('grp',2); -INSERT INTO version VALUES('re_grp',1); -INSERT INTO version VALUES('trusted',6); -INSERT INTO version VALUES('address',6); -INSERT INTO version VALUES('aliases',8); -INSERT INTO version VALUES('location',8); -INSERT INTO version VALUES('location_attrs',1); -INSERT INTO version VALUES('silo',8); -INSERT INTO version VALUES('dbaliases',1); -INSERT INTO version VALUES('uri',1); -INSERT INTO version VALUES('speed_dial',2); -INSERT INTO version VALUES('usr_preferences',2); -INSERT INTO version VALUES('subscriber',7); -INSERT INTO version VALUES('pdt',1); -INSERT INTO version VALUES('dialog',7); -INSERT INTO version VALUES('dialog_vars',1); -INSERT INTO version VALUES('dispatcher',4); -INSERT INTO version VALUES('dialplan',2); -INSERT INTO version VALUES('topos_d',1); -INSERT INTO version VALUES('topos_t',1); -INSERT INTO version VALUES('presentity',4); -INSERT INTO version VALUES('active_watchers',12); -INSERT INTO version VALUES('watchers',3); -INSERT INTO version VALUES('xcap',4); -INSERT INTO version VALUES('pua',7); -INSERT INTO version VALUES('rls_presentity',1); -INSERT INTO version VALUES('rls_watchers',3); -INSERT INTO version VALUES('imc_rooms',1); -INSERT INTO version VALUES('imc_members',1); -INSERT INTO version VALUES('cpl',1); -INSERT INTO version VALUES('sip_trace',4); -INSERT INTO version VALUES('domainpolicy',2); -INSERT INTO version VALUES('carrierroute',3); -INSERT INTO version VALUES('carrierfailureroute',2); -INSERT INTO version VALUES('carrier_name',1); -INSERT INTO version VALUES('domain_name',1); -INSERT INTO version VALUES('userblacklist',1); -INSERT INTO version VALUES('globalblacklist',1); -INSERT INTO version VALUES('htable',2); -INSERT INTO version VALUES('purplemap',1); -INSERT INTO version VALUES('uacreg',3); -INSERT INTO version VALUES('pl_pipes',1); -INSERT INTO version VALUES('mtree',1); -INSERT INTO version VALUES('mtrees',2); -INSERT INTO version VALUES('sca_subscriptions',2); -INSERT INTO version VALUES('mohqcalls',1); -INSERT INTO version VALUES('mohqueues',1); -INSERT INTO version VALUES('rtpproxy',1); -INSERT INTO version VALUES('uid_credentials',7); -INSERT INTO version VALUES('uid_user_attrs',3); -INSERT INTO version VALUES('uid_domain',2); -INSERT INTO version VALUES('uid_domain_attrs',1); -INSERT INTO version VALUES('uid_global_attrs',1); -INSERT INTO version VALUES('uid_uri',3); -INSERT INTO version VALUES('uid_uri_attrs',2); -CREATE TABLE acc ( - id INTEGER PRIMARY KEY NOT NULL, - method VARCHAR(16) DEFAULT '' NOT NULL, - from_tag VARCHAR(64) DEFAULT '' NOT NULL, - to_tag VARCHAR(64) DEFAULT '' NOT NULL, - callid VARCHAR(255) DEFAULT '' NOT NULL, - sip_code VARCHAR(3) DEFAULT '' NOT NULL, - sip_reason VARCHAR(128) DEFAULT '' NOT NULL, - time TIMESTAMP WITHOUT TIME ZONE NOT NULL -); -CREATE TABLE acc_cdrs ( - id INTEGER PRIMARY KEY NOT NULL, - start_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:00' NOT NULL, - end_time TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:00' NOT NULL, - duration REAL DEFAULT 0 NOT NULL -); -CREATE TABLE missed_calls ( - id INTEGER PRIMARY KEY NOT NULL, - method VARCHAR(16) DEFAULT '' NOT NULL, - from_tag VARCHAR(64) DEFAULT '' NOT NULL, - to_tag VARCHAR(64) DEFAULT '' NOT NULL, - callid VARCHAR(255) DEFAULT '' NOT NULL, - sip_code VARCHAR(3) DEFAULT '' NOT NULL, - sip_reason VARCHAR(128) DEFAULT '' NOT NULL, - time TIMESTAMP WITHOUT TIME ZONE NOT NULL -); -CREATE TABLE lcr_gw ( - id INTEGER PRIMARY KEY NOT NULL, - lcr_id SMALLINT NOT NULL, - gw_name VARCHAR(128), - ip_addr VARCHAR(50), - hostname VARCHAR(64), - port SMALLINT, - params VARCHAR(64), - uri_scheme SMALLINT, - transport SMALLINT, - strip SMALLINT, - prefix VARCHAR(16) DEFAULT NULL, - tag VARCHAR(64) DEFAULT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - defunct INTEGER DEFAULT NULL -); -CREATE TABLE lcr_rule_target ( - id INTEGER PRIMARY KEY NOT NULL, - lcr_id SMALLINT NOT NULL, - rule_id INTEGER NOT NULL, - gw_id INTEGER NOT NULL, - priority SMALLINT NOT NULL, - weight INTEGER DEFAULT 1 NOT NULL, - CONSTRAINT lcr_rule_target_rule_id_gw_id_idx UNIQUE (rule_id, gw_id) -); -CREATE TABLE lcr_rule ( - id INTEGER PRIMARY KEY NOT NULL, - lcr_id SMALLINT NOT NULL, - prefix VARCHAR(16) DEFAULT NULL, - from_uri VARCHAR(64) DEFAULT NULL, - request_uri VARCHAR(64) DEFAULT NULL, - stopper INTEGER DEFAULT 0 NOT NULL, - enabled INTEGER DEFAULT 1 NOT NULL, - CONSTRAINT lcr_rule_lcr_id_prefix_from_uri_idx UNIQUE (lcr_id, prefix, from_uri) -); -CREATE TABLE domain ( - id INTEGER PRIMARY KEY NOT NULL, - domain VARCHAR(64) NOT NULL COLLATE NOCASE, - did VARCHAR(64) DEFAULT NULL COLLATE NOCASE, - last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, - CONSTRAINT domain_domain_idx UNIQUE (domain) -); -CREATE TABLE domain_attrs ( - id INTEGER PRIMARY KEY NOT NULL, - did VARCHAR(64) NOT NULL COLLATE NOCASE, - name VARCHAR(32) NOT NULL COLLATE NOCASE, - type INTEGER NOT NULL, - value VARCHAR(255) NOT NULL COLLATE NOCASE, - last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, - CONSTRAINT domain_attrs_domain_attrs_idx UNIQUE (did, name, value) -); -CREATE TABLE grp ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL COLLATE NOCASE, - domain VARCHAR(64) DEFAULT '' NOT NULL COLLATE NOCASE, - grp VARCHAR(64) DEFAULT '' NOT NULL COLLATE NOCASE, - last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, - CONSTRAINT grp_account_group_idx UNIQUE (username, domain, grp) -); -CREATE TABLE re_grp ( - id INTEGER PRIMARY KEY NOT NULL, - reg_exp VARCHAR(128) DEFAULT '' NOT NULL, - group_id INTEGER DEFAULT 0 NOT NULL -); -CREATE TABLE trusted ( - id INTEGER PRIMARY KEY NOT NULL, - src_ip VARCHAR(50) NOT NULL, - proto VARCHAR(4) NOT NULL, - from_pattern VARCHAR(64) DEFAULT NULL, - ruri_pattern VARCHAR(64) DEFAULT NULL, - tag VARCHAR(64), - priority INTEGER DEFAULT 0 NOT NULL -); -CREATE TABLE address ( - id INTEGER PRIMARY KEY NOT NULL, - grp INTEGER DEFAULT 1 NOT NULL, - ip_addr VARCHAR(50) NOT NULL, - mask INTEGER DEFAULT 32 NOT NULL, - port SMALLINT DEFAULT 0 NOT NULL, - tag VARCHAR(64) -); -CREATE TABLE aliases ( - id INTEGER PRIMARY KEY NOT NULL, - ruid VARCHAR(64) DEFAULT '' NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL, - domain VARCHAR(64) DEFAULT NULL, - contact VARCHAR(255) DEFAULT '' NOT NULL, - received VARCHAR(128) DEFAULT NULL, - path VARCHAR(512) DEFAULT NULL, - expires TIMESTAMP WITHOUT TIME ZONE DEFAULT '2030-05-28 21:32:15' NOT NULL, - q REAL DEFAULT 1.0 NOT NULL, - callid VARCHAR(255) DEFAULT 'Default-Call-ID' NOT NULL, - cseq INTEGER DEFAULT 1 NOT NULL, - last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - cflags INTEGER DEFAULT 0 NOT NULL, - user_agent VARCHAR(255) DEFAULT '' NOT NULL, - socket VARCHAR(64) DEFAULT NULL, - methods INTEGER DEFAULT NULL, - instance VARCHAR(255) DEFAULT NULL, - reg_id INTEGER DEFAULT 0 NOT NULL, - server_id INTEGER DEFAULT 0 NOT NULL, - connection_id INTEGER DEFAULT 0 NOT NULL, - keepalive INTEGER DEFAULT 0 NOT NULL, - partition INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT aliases_ruid_idx UNIQUE (ruid) -); -CREATE TABLE location ( - id INTEGER PRIMARY KEY NOT NULL, - ruid VARCHAR(64) DEFAULT '' NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL COLLATE NOCASE, - domain VARCHAR(64) DEFAULT NULL COLLATE NOCASE, - contact VARCHAR(255) DEFAULT '' NOT NULL, - received VARCHAR(128) DEFAULT NULL, - path VARCHAR(512) DEFAULT NULL, - expires TIMESTAMP WITHOUT TIME ZONE DEFAULT '2030-05-28 21:32:15' NOT NULL, - q REAL DEFAULT 1.0 NOT NULL, - callid VARCHAR(255) DEFAULT 'Default-Call-ID' NOT NULL, - cseq INTEGER DEFAULT 1 NOT NULL, - last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - cflags INTEGER DEFAULT 0 NOT NULL, - user_agent VARCHAR(255) DEFAULT '' NOT NULL COLLATE NOCASE, - socket VARCHAR(64) DEFAULT NULL, - methods INTEGER DEFAULT NULL, - instance VARCHAR(255) DEFAULT NULL, - reg_id INTEGER DEFAULT 0 NOT NULL, - server_id INTEGER DEFAULT 0 NOT NULL, - connection_id INTEGER DEFAULT 0 NOT NULL, - keepalive INTEGER DEFAULT 0 NOT NULL, - partition INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT location_ruid_idx UNIQUE (ruid) -); -CREATE TABLE location_attrs ( - id INTEGER PRIMARY KEY NOT NULL, - ruid VARCHAR(64) DEFAULT '' NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL COLLATE NOCASE, - domain VARCHAR(64) DEFAULT NULL COLLATE NOCASE, - aname VARCHAR(64) DEFAULT '' NOT NULL COLLATE NOCASE, - atype INTEGER DEFAULT 0 NOT NULL COLLATE NOCASE, - avalue VARCHAR(255) DEFAULT '' NOT NULL COLLATE NOCASE, - last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL -); -CREATE TABLE silo ( - id INTEGER PRIMARY KEY NOT NULL, - src_addr VARCHAR(128) DEFAULT '' NOT NULL, - dst_addr VARCHAR(128) DEFAULT '' NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL, - domain VARCHAR(64) DEFAULT '' NOT NULL, - inc_time INTEGER DEFAULT 0 NOT NULL, - exp_time INTEGER DEFAULT 0 NOT NULL, - snd_time INTEGER DEFAULT 0 NOT NULL, - ctype VARCHAR(32) DEFAULT 'text/plain' NOT NULL, - body BLOB, - extra_hdrs TEXT, - callid VARCHAR(128) DEFAULT '' NOT NULL, - status INTEGER DEFAULT 0 NOT NULL -); -CREATE TABLE dbaliases ( - id INTEGER PRIMARY KEY NOT NULL, - alias_username VARCHAR(64) DEFAULT '' NOT NULL, - alias_domain VARCHAR(64) DEFAULT '' NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL, - domain VARCHAR(64) DEFAULT '' NOT NULL -); -CREATE TABLE uri ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL, - domain VARCHAR(64) DEFAULT '' NOT NULL, - uri_user VARCHAR(64) DEFAULT '' NOT NULL, - last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, - CONSTRAINT uri_account_idx UNIQUE (username, domain, uri_user) -); -CREATE TABLE speed_dial ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL, - domain VARCHAR(64) DEFAULT '' NOT NULL, - sd_username VARCHAR(64) DEFAULT '' NOT NULL, - sd_domain VARCHAR(64) DEFAULT '' NOT NULL, - new_uri VARCHAR(128) DEFAULT '' NOT NULL, - fname VARCHAR(64) DEFAULT '' NOT NULL, - lname VARCHAR(64) DEFAULT '' NOT NULL, - description VARCHAR(64) DEFAULT '' NOT NULL, - CONSTRAINT speed_dial_speed_dial_idx UNIQUE (username, domain, sd_domain, sd_username) -); -CREATE TABLE usr_preferences ( - id INTEGER PRIMARY KEY NOT NULL, - uuid VARCHAR(64) DEFAULT '' NOT NULL, - username VARCHAR(128) DEFAULT 0 NOT NULL, - domain VARCHAR(64) DEFAULT '' NOT NULL, - attribute VARCHAR(32) DEFAULT '' NOT NULL, - type INTEGER DEFAULT 0 NOT NULL, - value VARCHAR(128) DEFAULT '' NOT NULL, - last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL -); -CREATE TABLE subscriber ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL, - domain VARCHAR(64) DEFAULT '' NOT NULL, - password VARCHAR(64) DEFAULT '' NOT NULL, - ha1 VARCHAR(128) DEFAULT '' NOT NULL, - ha1b VARCHAR(128) DEFAULT '' NOT NULL, - email_address VARCHAR(128) DEFAULT NULL, - rpid VARCHAR(128) DEFAULT NULL, - CONSTRAINT subscriber_account_idx UNIQUE (username, domain) -); -CREATE TABLE pdt ( - id INTEGER PRIMARY KEY NOT NULL, - sdomain VARCHAR(128) NOT NULL, - prefix VARCHAR(32) NOT NULL, - domain VARCHAR(128) DEFAULT '' NOT NULL, - CONSTRAINT pdt_sdomain_prefix_idx UNIQUE (sdomain, prefix) -); -CREATE TABLE dialog ( - id INTEGER PRIMARY KEY NOT NULL, - hash_entry INTEGER NOT NULL, - hash_id INTEGER NOT NULL, - callid VARCHAR(255) NOT NULL, - from_uri VARCHAR(128) NOT NULL, - from_tag VARCHAR(64) NOT NULL, - to_uri VARCHAR(128) NOT NULL, - to_tag VARCHAR(64) NOT NULL, - caller_cseq VARCHAR(20) NOT NULL, - callee_cseq VARCHAR(20) NOT NULL, - caller_route_set VARCHAR(512), - callee_route_set VARCHAR(512), - caller_contact VARCHAR(128) NOT NULL, - callee_contact VARCHAR(128) NOT NULL, - caller_sock VARCHAR(64) NOT NULL, - callee_sock VARCHAR(64) NOT NULL, - state INTEGER NOT NULL, - start_time INTEGER NOT NULL, - timeout INTEGER DEFAULT 0 NOT NULL, - sflags INTEGER DEFAULT 0 NOT NULL, - iflags INTEGER DEFAULT 0 NOT NULL, - toroute_name VARCHAR(32), - req_uri VARCHAR(128) NOT NULL, - xdata VARCHAR(512) -); -CREATE TABLE dialog_vars ( - id INTEGER PRIMARY KEY NOT NULL, - hash_entry INTEGER NOT NULL, - hash_id INTEGER NOT NULL, - dialog_key VARCHAR(128) NOT NULL, - dialog_value VARCHAR(512) NOT NULL -); -CREATE TABLE dispatcher ( - id INTEGER PRIMARY KEY NOT NULL, - setid INTEGER DEFAULT 0 NOT NULL, - destination VARCHAR(192) DEFAULT '' NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - priority INTEGER DEFAULT 0 NOT NULL, - attrs VARCHAR(128) DEFAULT '' NOT NULL, - description VARCHAR(64) DEFAULT '' NOT NULL -); -CREATE TABLE dialplan ( - id INTEGER PRIMARY KEY NOT NULL, - dpid INTEGER NOT NULL, - pr INTEGER NOT NULL, - match_op INTEGER NOT NULL, - match_exp VARCHAR(64) NOT NULL, - match_len INTEGER NOT NULL, - subst_exp VARCHAR(64) NOT NULL, - repl_exp VARCHAR(256) NOT NULL, - attrs VARCHAR(64) NOT NULL -); -CREATE TABLE topos_d ( - id INTEGER PRIMARY KEY NOT NULL, - rectime TIMESTAMP WITHOUT TIME ZONE NOT NULL, - s_method VARCHAR(64) DEFAULT '' NOT NULL, - s_cseq VARCHAR(64) DEFAULT '' NOT NULL, - a_callid VARCHAR(255) DEFAULT '' NOT NULL, - a_uuid VARCHAR(255) DEFAULT '' NOT NULL, - b_uuid VARCHAR(255) DEFAULT '' NOT NULL, - a_contact VARCHAR(128) DEFAULT '' NOT NULL, - b_contact VARCHAR(128) DEFAULT '' NOT NULL, - as_contact VARCHAR(128) DEFAULT '' NOT NULL, - bs_contact VARCHAR(128) DEFAULT '' NOT NULL, - a_tag VARCHAR(255) DEFAULT '' NOT NULL, - b_tag VARCHAR(255) DEFAULT '' NOT NULL, - a_rr TEXT, - b_rr TEXT, - s_rr TEXT, - iflags INTEGER DEFAULT 0 NOT NULL, - a_uri VARCHAR(128) DEFAULT '' NOT NULL, - b_uri VARCHAR(128) DEFAULT '' NOT NULL, - r_uri VARCHAR(128) DEFAULT '' NOT NULL, - a_srcaddr VARCHAR(128) DEFAULT '' NOT NULL, - b_srcaddr VARCHAR(128) DEFAULT '' NOT NULL, - a_socket VARCHAR(128) DEFAULT '' NOT NULL, - b_socket VARCHAR(128) DEFAULT '' NOT NULL -); -CREATE TABLE topos_t ( - id INTEGER PRIMARY KEY NOT NULL, - rectime TIMESTAMP WITHOUT TIME ZONE NOT NULL, - s_method VARCHAR(64) DEFAULT '' NOT NULL, - s_cseq VARCHAR(64) DEFAULT '' NOT NULL, - a_callid VARCHAR(255) DEFAULT '' NOT NULL, - a_uuid VARCHAR(255) DEFAULT '' NOT NULL, - b_uuid VARCHAR(255) DEFAULT '' NOT NULL, - direction INTEGER DEFAULT 0 NOT NULL, - x_via TEXT, - x_vbranch VARCHAR(255) DEFAULT '' NOT NULL, - x_rr TEXT, - y_rr TEXT, - s_rr TEXT, - x_uri VARCHAR(128) DEFAULT '' NOT NULL, - a_contact VARCHAR(128) DEFAULT '' NOT NULL, - b_contact VARCHAR(128) DEFAULT '' NOT NULL, - as_contact VARCHAR(128) DEFAULT '' NOT NULL, - bs_contact VARCHAR(128) DEFAULT '' NOT NULL, - x_tag VARCHAR(255) DEFAULT '' NOT NULL, - a_tag VARCHAR(255) DEFAULT '' NOT NULL, - b_tag VARCHAR(255) DEFAULT '' NOT NULL, - a_srcaddr VARCHAR(128) DEFAULT '' NOT NULL, - b_srcaddr VARCHAR(128) DEFAULT '' NOT NULL, - a_socket VARCHAR(128) DEFAULT '' NOT NULL, - b_socket VARCHAR(128) DEFAULT '' NOT NULL -); -CREATE TABLE presentity ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) NOT NULL COLLATE NOCASE, - domain VARCHAR(64) NOT NULL COLLATE NOCASE, - event VARCHAR(64) NOT NULL, - etag VARCHAR(64) NOT NULL, - expires INTEGER NOT NULL, - received_time INTEGER NOT NULL, - body BLOB NOT NULL, - sender VARCHAR(128) NOT NULL, - priority INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT presentity_presentity_idx UNIQUE (username, domain, event, etag) -); -CREATE TABLE active_watchers ( - id INTEGER PRIMARY KEY NOT NULL, - presentity_uri VARCHAR(128) NOT NULL COLLATE NOCASE, - watcher_username VARCHAR(64) NOT NULL COLLATE NOCASE, - watcher_domain VARCHAR(64) NOT NULL COLLATE NOCASE, - to_user VARCHAR(64) NOT NULL COLLATE NOCASE, - to_domain VARCHAR(64) NOT NULL COLLATE NOCASE, - event VARCHAR(64) DEFAULT 'presence' NOT NULL, - event_id VARCHAR(64), - to_tag VARCHAR(64) NOT NULL, - from_tag VARCHAR(64) NOT NULL, - callid VARCHAR(255) NOT NULL, - local_cseq INTEGER NOT NULL, - remote_cseq INTEGER NOT NULL, - contact VARCHAR(128) NOT NULL, - record_route TEXT, - expires INTEGER NOT NULL, - status INTEGER DEFAULT 2 NOT NULL, - reason VARCHAR(64), - version INTEGER DEFAULT 0 NOT NULL, - socket_info VARCHAR(64) NOT NULL, - local_contact VARCHAR(128) NOT NULL, - from_user VARCHAR(64) NOT NULL, - from_domain VARCHAR(64) NOT NULL, - updated INTEGER NOT NULL, - updated_winfo INTEGER NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - user_agent VARCHAR(255) DEFAULT '' NOT NULL, - CONSTRAINT active_watchers_active_watchers_idx UNIQUE (callid, to_tag, from_tag) -); -CREATE TABLE watchers ( - id INTEGER PRIMARY KEY NOT NULL, - presentity_uri VARCHAR(128) NOT NULL COLLATE NOCASE, - watcher_username VARCHAR(64) NOT NULL COLLATE NOCASE, - watcher_domain VARCHAR(64) NOT NULL COLLATE NOCASE, - event VARCHAR(64) DEFAULT 'presence' NOT NULL, - status INTEGER NOT NULL, - reason VARCHAR(64), - inserted_time INTEGER NOT NULL, - CONSTRAINT watchers_watcher_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event) -); -CREATE TABLE xcap ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) NOT NULL COLLATE NOCASE, - domain VARCHAR(64) NOT NULL COLLATE NOCASE, - doc BLOB NOT NULL, - doc_type INTEGER NOT NULL, - etag VARCHAR(64) NOT NULL, - source INTEGER NOT NULL, - doc_uri VARCHAR(255) NOT NULL, - port INTEGER NOT NULL, - CONSTRAINT xcap_doc_uri_idx UNIQUE (doc_uri) -); -CREATE TABLE pua ( - id INTEGER PRIMARY KEY NOT NULL, - pres_uri VARCHAR(128) NOT NULL, - pres_id VARCHAR(255) NOT NULL, - event INTEGER NOT NULL, - expires INTEGER NOT NULL, - desired_expires INTEGER NOT NULL, - flag INTEGER NOT NULL, - etag VARCHAR(64) NOT NULL, - tuple_id VARCHAR(64), - watcher_uri VARCHAR(128) NOT NULL, - call_id VARCHAR(255) NOT NULL, - to_tag VARCHAR(64) NOT NULL, - from_tag VARCHAR(64) NOT NULL, - cseq INTEGER NOT NULL, - record_route TEXT, - contact VARCHAR(128) NOT NULL, - remote_contact VARCHAR(128) NOT NULL, - version INTEGER NOT NULL, - extra_headers TEXT NOT NULL, - CONSTRAINT pua_pua_idx UNIQUE (etag, tuple_id, call_id, from_tag) -); -CREATE TABLE rls_presentity ( - id INTEGER PRIMARY KEY NOT NULL, - rlsubs_did VARCHAR(255) NOT NULL, - resource_uri VARCHAR(128) NOT NULL, - content_type VARCHAR(255) NOT NULL, - presence_state BLOB NOT NULL, - expires INTEGER NOT NULL, - updated INTEGER NOT NULL, - auth_state INTEGER NOT NULL, - reason VARCHAR(64) NOT NULL, - CONSTRAINT rls_presentity_rls_presentity_idx UNIQUE (rlsubs_did, resource_uri) -); -CREATE TABLE rls_watchers ( - id INTEGER PRIMARY KEY NOT NULL, - presentity_uri VARCHAR(128) NOT NULL, - to_user VARCHAR(64) NOT NULL, - to_domain VARCHAR(64) NOT NULL, - watcher_username VARCHAR(64) NOT NULL, - watcher_domain VARCHAR(64) NOT NULL, - event VARCHAR(64) DEFAULT 'presence' NOT NULL, - event_id VARCHAR(64), - to_tag VARCHAR(64) NOT NULL, - from_tag VARCHAR(64) NOT NULL, - callid VARCHAR(255) NOT NULL, - local_cseq INTEGER NOT NULL, - remote_cseq INTEGER NOT NULL, - contact VARCHAR(128) NOT NULL, - record_route TEXT, - expires INTEGER NOT NULL, - status INTEGER DEFAULT 2 NOT NULL, - reason VARCHAR(64) NOT NULL, - version INTEGER DEFAULT 0 NOT NULL, - socket_info VARCHAR(64) NOT NULL, - local_contact VARCHAR(128) NOT NULL, - from_user VARCHAR(64) NOT NULL, - from_domain VARCHAR(64) NOT NULL, - updated INTEGER NOT NULL, - CONSTRAINT rls_watchers_rls_watcher_idx UNIQUE (callid, to_tag, from_tag) -); -CREATE TABLE imc_rooms ( - id INTEGER PRIMARY KEY NOT NULL, - name VARCHAR(64) NOT NULL, - domain VARCHAR(64) NOT NULL, - flag INTEGER NOT NULL, - CONSTRAINT imc_rooms_name_domain_idx UNIQUE (name, domain) -); -CREATE TABLE imc_members ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) NOT NULL, - domain VARCHAR(64) NOT NULL, - room VARCHAR(64) NOT NULL, - flag INTEGER NOT NULL, - CONSTRAINT imc_members_account_room_idx UNIQUE (username, domain, room) -); -CREATE TABLE cpl ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) NOT NULL, - domain VARCHAR(64) DEFAULT '' NOT NULL, - cpl_xml TEXT, - cpl_bin TEXT, - CONSTRAINT cpl_account_idx UNIQUE (username, domain) -); -CREATE TABLE sip_trace ( - id INTEGER PRIMARY KEY NOT NULL, - time_stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, - time_us INTEGER DEFAULT 0 NOT NULL, - callid VARCHAR(255) DEFAULT '' NOT NULL, - traced_user VARCHAR(128) DEFAULT '' NOT NULL, - msg TEXT NOT NULL, - method VARCHAR(50) DEFAULT '' NOT NULL, - status VARCHAR(128) DEFAULT '' NOT NULL, - fromip VARCHAR(50) DEFAULT '' NOT NULL, - toip VARCHAR(50) DEFAULT '' NOT NULL, - fromtag VARCHAR(64) DEFAULT '' NOT NULL, - totag VARCHAR(64) DEFAULT '' NOT NULL, - direction VARCHAR(4) DEFAULT '' NOT NULL -); -CREATE TABLE domainpolicy ( - id INTEGER PRIMARY KEY NOT NULL, - rule VARCHAR(255) NOT NULL, - type VARCHAR(255) NOT NULL, - att VARCHAR(255), - val VARCHAR(128), - description VARCHAR(255) NOT NULL, - CONSTRAINT domainpolicy_rav_idx UNIQUE (rule, att, val) -); -CREATE TABLE carrierroute ( - id INTEGER PRIMARY KEY NOT NULL, - carrier INTEGER DEFAULT 0 NOT NULL, - domain INTEGER DEFAULT 0 NOT NULL, - scan_prefix VARCHAR(64) DEFAULT '' NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - mask INTEGER DEFAULT 0 NOT NULL, - prob REAL DEFAULT 0 NOT NULL, - strip INTEGER DEFAULT 0 NOT NULL, - rewrite_host VARCHAR(128) DEFAULT '' NOT NULL, - rewrite_prefix VARCHAR(64) DEFAULT '' NOT NULL, - rewrite_suffix VARCHAR(64) DEFAULT '' NOT NULL, - description VARCHAR(255) DEFAULT NULL -); -CREATE TABLE carrierfailureroute ( - id INTEGER PRIMARY KEY NOT NULL, - carrier INTEGER DEFAULT 0 NOT NULL, - domain INTEGER DEFAULT 0 NOT NULL, - scan_prefix VARCHAR(64) DEFAULT '' NOT NULL, - host_name VARCHAR(128) DEFAULT '' NOT NULL, - reply_code VARCHAR(3) DEFAULT '' NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - mask INTEGER DEFAULT 0 NOT NULL, - next_domain INTEGER DEFAULT 0 NOT NULL, - description VARCHAR(255) DEFAULT NULL -); -CREATE TABLE carrier_name ( - id INTEGER PRIMARY KEY NOT NULL, - carrier VARCHAR(64) DEFAULT NULL -); -CREATE TABLE domain_name ( - id INTEGER PRIMARY KEY NOT NULL, - domain VARCHAR(64) DEFAULT NULL -); -CREATE TABLE userblacklist ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) DEFAULT '' NOT NULL, - domain VARCHAR(64) DEFAULT '' NOT NULL, - prefix VARCHAR(64) DEFAULT '' NOT NULL, - whitelist SMALLINT DEFAULT 0 NOT NULL -); -CREATE TABLE globalblacklist ( - id INTEGER PRIMARY KEY NOT NULL, - prefix VARCHAR(64) DEFAULT '' NOT NULL, - whitelist SMALLINT DEFAULT 0 NOT NULL, - description VARCHAR(255) DEFAULT NULL -); -CREATE TABLE htable ( - id INTEGER PRIMARY KEY NOT NULL, - key_name VARCHAR(64) DEFAULT '' NOT NULL, - key_type INTEGER DEFAULT 0 NOT NULL, - value_type INTEGER DEFAULT 0 NOT NULL, - key_value VARCHAR(128) DEFAULT '' NOT NULL, - expires INTEGER DEFAULT 0 NOT NULL -); -CREATE TABLE purplemap ( - id INTEGER PRIMARY KEY NOT NULL, - sip_user VARCHAR(128) NOT NULL, - ext_user VARCHAR(128) NOT NULL, - ext_prot VARCHAR(16) NOT NULL, - ext_pass VARCHAR(64) -); -CREATE TABLE uacreg ( - id INTEGER PRIMARY KEY NOT NULL, - l_uuid VARCHAR(64) DEFAULT '' NOT NULL, - l_username VARCHAR(64) DEFAULT '' NOT NULL, - l_domain VARCHAR(64) DEFAULT '' NOT NULL, - r_username VARCHAR(64) DEFAULT '' NOT NULL, - r_domain VARCHAR(64) DEFAULT '' NOT NULL, - realm VARCHAR(64) DEFAULT '' NOT NULL, - auth_username VARCHAR(64) DEFAULT '' NOT NULL, - auth_password VARCHAR(64) DEFAULT '' NOT NULL, - auth_ha1 VARCHAR(128) DEFAULT '' NOT NULL, - auth_proxy VARCHAR(128) DEFAULT '' NOT NULL, - expires INTEGER DEFAULT 0 NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - reg_delay INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT uacreg_l_uuid_idx UNIQUE (l_uuid) -); -CREATE TABLE pl_pipes ( - id INTEGER PRIMARY KEY NOT NULL, - pipeid VARCHAR(64) DEFAULT '' NOT NULL, - algorithm VARCHAR(32) DEFAULT '' NOT NULL, - plimit INTEGER DEFAULT 0 NOT NULL -); -CREATE TABLE mtree ( - id INTEGER PRIMARY KEY NOT NULL, - tprefix VARCHAR(32) DEFAULT '' NOT NULL, - tvalue VARCHAR(128) DEFAULT '' NOT NULL, - CONSTRAINT mtree_tprefix_idx UNIQUE (tprefix) -); -CREATE TABLE mtrees ( - id INTEGER PRIMARY KEY NOT NULL, - tname VARCHAR(128) DEFAULT '' NOT NULL, - tprefix VARCHAR(32) DEFAULT '' NOT NULL, - tvalue VARCHAR(128) DEFAULT '' NOT NULL, - CONSTRAINT mtrees_tname_tprefix_tvalue_idx UNIQUE (tname, tprefix, tvalue) -); -CREATE TABLE sca_subscriptions ( - id INTEGER PRIMARY KEY NOT NULL, - subscriber VARCHAR(255) NOT NULL, - aor VARCHAR(255) NOT NULL, - event INTEGER DEFAULT 0 NOT NULL, - expires INTEGER DEFAULT 0 NOT NULL, - state INTEGER DEFAULT 0 NOT NULL, - app_idx INTEGER DEFAULT 0 NOT NULL, - call_id VARCHAR(255) NOT NULL, - from_tag VARCHAR(64) NOT NULL, - to_tag VARCHAR(64) NOT NULL, - record_route TEXT, - notify_cseq INTEGER NOT NULL, - subscribe_cseq INTEGER NOT NULL, - server_id INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT sca_subscriptions_sca_subscriptions_idx UNIQUE (subscriber, call_id, from_tag, to_tag) -); -CREATE TABLE mohqcalls ( - id INTEGER PRIMARY KEY NOT NULL, - mohq_id INTEGER NOT NULL, - call_id VARCHAR(100) NOT NULL, - call_status INTEGER NOT NULL, - call_from VARCHAR(100) NOT NULL, - call_contact VARCHAR(100), - call_time TIMESTAMP WITHOUT TIME ZONE NOT NULL, - CONSTRAINT mohqcalls_mohqcalls_idx UNIQUE (call_id) -); -CREATE TABLE mohqueues ( - id INTEGER PRIMARY KEY NOT NULL, - name VARCHAR(25) NOT NULL, - uri VARCHAR(100) NOT NULL, - mohdir VARCHAR(100), - mohfile VARCHAR(100) NOT NULL, - debug INTEGER NOT NULL, - CONSTRAINT mohqueues_mohqueue_uri_idx UNIQUE (uri), - CONSTRAINT mohqueues_mohqueue_name_idx UNIQUE (name) -); -CREATE TABLE rtpproxy ( - id INTEGER PRIMARY KEY NOT NULL, - setid VARCHAR(32) DEFAULT 00 NOT NULL, - url VARCHAR(64) DEFAULT '' NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - weight INTEGER DEFAULT 1 NOT NULL, - description VARCHAR(64) DEFAULT '' NOT NULL -); -CREATE TABLE uid_credentials ( - id INTEGER PRIMARY KEY NOT NULL, - auth_username VARCHAR(64) NOT NULL, - did VARCHAR(64) DEFAULT '_default' NOT NULL, - realm VARCHAR(64) NOT NULL, - password VARCHAR(28) DEFAULT '' NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - ha1 VARCHAR(32) NOT NULL, - ha1b VARCHAR(32) DEFAULT '' NOT NULL, - uid VARCHAR(64) NOT NULL -); -CREATE TABLE uid_user_attrs ( - id INTEGER PRIMARY KEY NOT NULL, - uid VARCHAR(64) NOT NULL, - name VARCHAR(32) NOT NULL, - value VARCHAR(128), - type INTEGER DEFAULT 0 NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT uid_user_attrs_userattrs_idx UNIQUE (uid, name, value) -); -CREATE TABLE uid_domain ( - id INTEGER PRIMARY KEY NOT NULL, - did VARCHAR(64) NOT NULL, - domain VARCHAR(64) NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT uid_domain_domain_idx UNIQUE (domain) -); -CREATE TABLE uid_domain_attrs ( - id INTEGER PRIMARY KEY NOT NULL, - did VARCHAR(64), - name VARCHAR(32) NOT NULL, - type INTEGER DEFAULT 0 NOT NULL, - value VARCHAR(128), - flags INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT uid_domain_attrs_domain_attr_idx UNIQUE (did, name, value) -); -CREATE TABLE uid_global_attrs ( - id INTEGER PRIMARY KEY NOT NULL, - name VARCHAR(32) NOT NULL, - type INTEGER DEFAULT 0 NOT NULL, - value VARCHAR(128), - flags INTEGER DEFAULT 0 NOT NULL, - CONSTRAINT uid_global_attrs_global_attrs_idx UNIQUE (name, value) -); -CREATE TABLE uid_uri ( - id INTEGER PRIMARY KEY NOT NULL, - uid VARCHAR(64) NOT NULL, - did VARCHAR(64) NOT NULL, - username VARCHAR(64) NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - scheme VARCHAR(8) DEFAULT 'sip' NOT NULL -); -CREATE TABLE uid_uri_attrs ( - id INTEGER PRIMARY KEY NOT NULL, - username VARCHAR(64) NOT NULL, - did VARCHAR(64) NOT NULL, - name VARCHAR(32) NOT NULL, - value VARCHAR(128), - type INTEGER DEFAULT 0 NOT NULL, - flags INTEGER DEFAULT 0 NOT NULL, - scheme VARCHAR(8) DEFAULT 'sip' NOT NULL, - CONSTRAINT uid_uri_attrs_uriattrs_idx UNIQUE (username, did, name, value, scheme) -); -CREATE TABLE active_watchers_log ( - id INTEGER PRIMARY KEY NOT NULL, - presentity_uri VARCHAR(128) NOT NULL COLLATE NOCASE, - watcher_username VARCHAR(64) NOT NULL COLLATE NOCASE, - watcher_domain VARCHAR(64) NOT NULL COLLATE NOCASE, - to_user VARCHAR(64) NOT NULL COLLATE NOCASE, - to_domain VARCHAR(64) NOT NULL COLLATE NOCASE, - event VARCHAR(64) DEFAULT 'presence' NOT NULL, - callid VARCHAR(255) NOT NULL, - time INTEGER NOT NULL, - result INTEGER NOT NULL, - sent_msg BLOB NOT NULL, - received_msg BLOB NOT NULL, - user_agent VARCHAR(255) DEFAULT '' NOT NULL COLLATE NOCASE, - CONSTRAINT active_watchers_active_watchers_log_idx UNIQUE (presentity_uri, watcher_username, watcher_domain, event) - -); -CREATE TABLE event_list ( event varchar(25) PRIMARY KEY NOT NULL); -INSERT INTO event_list VALUES('dialog'); -INSERT INTO event_list VALUES('presence'); -INSERT INTO event_list VALUES('message-summary'); -CREATE INDEX acc_callid_idx ON acc (callid); -CREATE INDEX acc_cdrs_start_time_idx ON acc_cdrs (start_time); -CREATE INDEX missed_calls_callid_idx ON missed_calls (callid); -CREATE INDEX lcr_gw_lcr_id_idx ON lcr_gw (lcr_id); -CREATE INDEX lcr_rule_target_lcr_id_idx ON lcr_rule_target (lcr_id); -CREATE INDEX re_grp_group_idx ON re_grp (group_id); -CREATE INDEX trusted_peer_idx ON trusted (src_ip); -CREATE INDEX aliases_account_contact_idx ON aliases (username, domain, contact); -CREATE INDEX aliases_expires_idx ON aliases (expires); -CREATE INDEX location_account_contact_idx ON location (username, domain, contact); -CREATE INDEX location_expires_idx ON location (expires); -CREATE INDEX location_connection_idx ON location (server_id, connection_id); -CREATE INDEX location_attrs_account_record_idx ON location_attrs (username, domain, ruid); -CREATE INDEX location_attrs_last_modified_idx ON location_attrs (last_modified); -CREATE INDEX silo_account_idx ON silo (username, domain); -CREATE INDEX dbaliases_alias_user_idx ON dbaliases (alias_username); -CREATE INDEX dbaliases_alias_idx ON dbaliases (alias_username, alias_domain); -CREATE INDEX dbaliases_target_idx ON dbaliases (username, domain); -CREATE INDEX usr_preferences_ua_idx ON usr_preferences (uuid, attribute); -CREATE INDEX usr_preferences_uda_idx ON usr_preferences (username, domain, attribute); -CREATE INDEX subscriber_username_idx ON subscriber (username); -CREATE INDEX dialog_hash_idx ON dialog (hash_entry, hash_id); -CREATE INDEX dialog_vars_hash_idx ON dialog_vars (hash_entry, hash_id); -CREATE INDEX topos_d_rectime_idx ON topos_d (rectime); -CREATE INDEX topos_d_a_callid_idx ON topos_d (a_callid); -CREATE INDEX topos_t_rectime_idx ON topos_t (rectime); -CREATE INDEX topos_t_a_callid_idx ON topos_t (a_callid); -CREATE INDEX presentity_presentity_expires ON presentity (expires); -CREATE INDEX presentity_account_idx ON presentity (username, domain, event); -CREATE INDEX presentity_sender ON presentity (sender, username, domain, event); -CREATE INDEX active_watchers_active_watchers_expires ON active_watchers (expires); -CREATE INDEX active_watchers_active_watchers_pres ON active_watchers (presentity_uri, event); -CREATE INDEX active_watchers_updated_idx ON active_watchers (updated); -CREATE INDEX active_watchers_updated_winfo_idx ON active_watchers (updated_winfo, presentity_uri); -CREATE INDEX xcap_account_doc_type_idx ON xcap (username, domain, doc_type); -CREATE INDEX xcap_account_doc_type_uri_idx ON xcap (username, domain, doc_type, doc_uri); -CREATE INDEX xcap_account_doc_uri_idx ON xcap (username, domain, doc_uri); -CREATE INDEX pua_expires_idx ON pua (expires); -CREATE INDEX pua_dialog1_idx ON pua (pres_id, pres_uri); -CREATE INDEX pua_dialog2_idx ON pua (call_id, from_tag); -CREATE INDEX pua_record_idx ON pua (pres_id); -CREATE INDEX rls_presentity_rlsubs_idx ON rls_presentity (rlsubs_did); -CREATE INDEX rls_presentity_updated_idx ON rls_presentity (updated); -CREATE INDEX rls_presentity_expires_idx ON rls_presentity (expires); -CREATE INDEX rls_watchers_rls_watchers_update ON rls_watchers (watcher_username, watcher_domain, event); -CREATE INDEX rls_watchers_rls_watchers_expires ON rls_watchers (expires); -CREATE INDEX rls_watchers_updated_idx ON rls_watchers (updated); -CREATE INDEX sip_trace_traced_user_idx ON sip_trace (traced_user); -CREATE INDEX sip_trace_date_idx ON sip_trace (time_stamp); -CREATE INDEX sip_trace_fromip_idx ON sip_trace (fromip); -CREATE INDEX sip_trace_callid_idx ON sip_trace (callid); -CREATE INDEX domainpolicy_rule_idx ON domainpolicy (rule); -CREATE INDEX userblacklist_userblacklist_idx ON userblacklist (username, domain, prefix); -CREATE INDEX globalblacklist_globalblacklist_idx ON globalblacklist (prefix); -CREATE INDEX sca_subscriptions_sca_expires_idx ON sca_subscriptions (server_id, expires); -CREATE INDEX sca_subscriptions_sca_subscribers_idx ON sca_subscriptions (subscriber, event); -CREATE INDEX uid_credentials_cred_idx ON uid_credentials (auth_username, did); -CREATE INDEX uid_credentials_uid ON uid_credentials (uid); -CREATE INDEX uid_credentials_did_idx ON uid_credentials (did); -CREATE INDEX uid_credentials_realm_idx ON uid_credentials (realm); -CREATE INDEX uid_domain_did_idx ON uid_domain (did); -CREATE INDEX uid_domain_attrs_domain_did ON uid_domain_attrs (did, flags); -CREATE INDEX uid_uri_uri_idx1 ON uid_uri (username, did, scheme); -CREATE INDEX uid_uri_uri_uid ON uid_uri (uid); -COMMIT; diff --git a/kamailio/local.cfg b/kamailio/local.cfg deleted file mode 100644 index 6dc3113..0000000 --- a/kamailio/local.cfg +++ /dev/null @@ -1,118 +0,0 @@ -################################################################################ -## ROLES -################################################################################ -## Enabled Roles -#!trydef DISPATCHER_ROLE -#!trydef NAT_TRAVERSAL_ROLE -#!trydef REGISTRAR_ROLE -#!trydef PRESENCE_ROLE -#!trydef RESPONDER_ROLE -#!trydef NODES_ROLE -#!trydef FAST_PICKUP_ROLE -#!trydef PRESENCE_QUERY_ROLE - -## Disabled Roles - remove all but the last '#' to enable -# # #!trydef TRAFFIC_FILTER_ROLE -# # #!trydef WEBSOCKETS_ROLE -# # #!trydef TLS_ROLE -# # #!trydef ANTIFLOOD_ROLE -# # #!trydef RATE_LIMITER_ROLE -# # #!trydef ACL_ROLE -# # #!trydef MESSAGE_ROLE -# # #!trydef PUSHER_ROLE -# # #!trydef REGISTRAR_SYNC_ROLE -# # #!trydef PRESENCE_NOTIFY_SYNC_ROLE - -################################################################################ -## SERVER INFORMATION -################################################################################ -## CHANGE "kamailio.2600hz.com" TO YOUR SERVERS HOSTNAME -#!substdef "!MY_HOSTNAME!kamailio.2600hz.com!g" - -## CHANGE "127.0.0.1" TO YOUR SERVERS IP ADDRESS -## Usually your public IP. If you need -## to listen on addtional ports or IPs -## add them in "BINDINGS" at the bottom. -#!substdef "!MY_IP_ADDRESS!127.0.0.1!g" - -## CHANGE "kazoo://guest:guest@127.0.0.1:5672" TO THE AMQP URL -## This should be the primary RabbitMQ server -## in the zone that this server will service. -#!substdef "!MY_AMQP_URL!kazoo://guest:guest@127.0.0.1:5672!g" - -## This parameter is only required if you are using websockets -## This value must be present in the HTTP -## Origin header on a new websocket request -## or it will be rejected. If you remove -## it completely the validation will be disabled. -#!substdef "!MY_WEBSOCKET_DOMAIN!2600hz.com!g" - -################################################################################ -## DISPATCHER FORMAT INFORMATION -################################################################################ -## dispatcher list changed the default storage type from list to table -## this will allow the management of dispatched servers in the DB -## -## if you're using dbtext and can't start kamailio because of dispatcher -## check the format of /etc/kazoo/kamailio/dbtext/dispatcher -## -## # setid(integer) destination(sip uri) flags (integer, optional) -## 1 sip:192.168.16.131:11000 0 -## should converted to -## id(int,auto) setid(int) destination(string) flags(int) priority(int) attrs(string) description(string) -## 1:1:sip\:192.168.16.131\:11000:0:1: : (there is a space at end) -## -## uncommenting this param will allow to continue using dispatcher list -# # #!trydef KZ_USE_DISPATCHER_LIST - -################################################################################ -## UDP PARAMETERS -################################################################################ -## This parameter is OPTIONAL -## If large UDP packets are dropped by the -## interface try uncommenting this option. -## However, you MUST match this to your -## network adapter! If they do not match, -## all UDP packets over this limit WILL FAIL! -## E.g.: Add MTU=1472 to the /etc/sysconfig/network-scripts/XXX -# udp4_raw_mtu = 1472 - -################################################################################ -## BINDINGS -################################################################################ -## This parameter is OPTIONAL. -## It will try to locate outbound interface -## on multihomed host. By default forward -## requests use the incoming socket disregarding -## the destination location. When enabled Kamailio -## will select a socket that can reach the -## destination. This reduces performance. -mhomed=0 - -## YOU SHOULD NOT HAVE TO CHANGE THESE! -## By setting MY_IP_ADDRESS above these will resolve -## to the proper bindings. These are here -## for those with complex layouts who know -## what they are doing :) -#!substdef "!UDP_SIP!udp:MY_IP_ADDRESS:5060!g" -#!substdef "!TCP_SIP!tcp:MY_IP_ADDRESS:5060!g" -#!substdef "!TLS_SIP!tls:MY_IP_ADDRESS:5061!g" -#!substdef "!UDP_ALG_SIP!udp:MY_IP_ADDRESS:7000!g" -#!substdef "!TCP_ALG_SIP!tcp:MY_IP_ADDRESS:7000!g" -#!substdef "!TLS_ALG_SIP!tls:MY_IP_ADDRESS:7001!g" -#!substdef "!TCP_WS!tcp:MY_IP_ADDRESS:5064!g" -#!substdef "!UDP_WS_SIP!udp:MY_IP_ADDRESS:5064!g" -#!substdef "!TLS_WSS!tls:MY_IP_ADDRESS:5065!g" -#!substdef "!UDP_WSS_SIP!udp:MY_IP_ADDRESS:5065!g" - -## YOU SHOULD NOT HAVE TO CHANGE THESE! -## This will bind the default SIP listeners -## as determined above. The tls-role and -## websocket-role will use the appropriate -## definitions if enabled. These are here -## for those with complex layouts who know -## what they are doing :) -listen=UDP_SIP -listen=TCP_SIP -listen=UDP_ALG_SIP -listen=TCP_ALG_SIP diff --git a/kamailio/message-role.cfg b/kamailio/message-role.cfg deleted file mode 100644 index 8a8b9a1..0000000 --- a/kamailio/message-role.cfg +++ /dev/null @@ -1,61 +0,0 @@ -modparam("htable", "htable", "msg=>size=32;autoexpire=60;") - - -event_route[kazoo:consumer-event-message-route] -{ - $var(uri_username) = ""; - kazoo_json($kzE, "Endpoints[0].To-Username", "$var(uri_username)"); - $var(x) = $(kzE{kz.json,Endpoints[0].To-Username}); - xlog("L_INFO", "received message route for $(kzE{kz.json,Endpoints[0].To-DID})\n"); - if( $var(uri_username) != "" ) { - $var(from_uri) = "sip:" + $(kzE{kz.json,Caller-ID-Number}) + "@" + $(kzE{kz.json,Endpoints[0].To-Realm}); - $var(to_uri) = "sip:" + $(kzE{kz.json,Endpoints[0].To-Username}) + "@" + $(kzE{kz.json,Endpoints[0].To-Realm}); - } else { - $var(from_uri) = "sip:" + $(kzE{kz.json,Caller-ID-Number}) + $(kzE{kz.json,Endpoints[0].To-Realm}); - $var(to_uri) = $(kzE{kz.json,Endpoints[0].Route}); - } - $sht(msg=>$(kzE{kz.json,Call-ID})) = $kzE; - $uac_req(method)="MESSAGE"; - $uac_req(body)= $(kzE{kz.json,Body}); - $uac_req(hdrs)="X-KAZOO-AOR: " + $var(to_uri)+ "\r\nContent-Type: text/plain\r\n"; - $uac_req(turi) = $var(to_uri); - $uac_req(ruri) = $var(to_uri); - $uac_req(furi) = $var(from_uri); - $uac_req(ouri) = "sip:MY_IP_ADDRESS:5060"; - $uac_req(callid) = $(kzE{kz.json,Call-ID}); - xlog("L_INFO", "sending message from $var(from_uri) to $var(to_uri) \n"); - uac_req_send(); -} - -route[MESSAGE_REPLY] -{ - if( $(sht(msg=>$ci)) == $null) { - exit(); - } - - if($T_reply_code != 200 && $T_reply_code != 202) { - $var(Result) = "Failure"; - } else { - $var(Result) = "Success"; - } - - $var(Payload) = '{ "Event-Category" : "message", "Event-Name" : "delivery", "Call-ID" : "$(sht(msg=>$ci){kz.json,Call-ID})", "Message-ID" : "$(sht(msg=>$ci){kz.json,Message-ID})" , "Delivery-Result-Code" : "sip:$T_reply_code", "Msg-ID" : "$(sht(msg=>$ci){kz.json,Msg-ID})" , "Status" : "$var(Result)"}'; - - $var(RoutingKey) = $(sht(msg=>$ci){kz.json,Server-ID}); - $var(exchange) = "targeted"; - if($var(RoutingKey) == "") { - $var(exchange) = "sms"; - $var(RoutingKey) = "message.delivery." + $(sht(msg=>$ci){kz.json,Call-ID}{kz.encode}); - } - xlog("L_INFO", "sending delivery message for $ci\n"); - kazoo_publish($var(exchange), $var(RoutingKey), $var(Payload)); -} - -route[MESSAGE_BINDINGS] -{ - $var(key) = "kamailio@MY_HOSTNAME"; - $var(payload) = '{ "exchange" : "sms" , "type" : "topic", "queue" : "MSG-QUEUE-MY_HOSTNAME", "routing" : "message.route.' + $(var(key){kz.encode}) + '.*", "no_ack" : 0, "wait_for_consumer_ack" : 1 }'; - kazoo_subscribe("$var(payload)"); -} - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/nat-traversal-role.cfg b/kamailio/nat-traversal-role.cfg deleted file mode 100644 index c7274d0..0000000 --- a/kamailio/nat-traversal-role.cfg +++ /dev/null @@ -1,45 +0,0 @@ -######## NAT Traversal module - signaling functions ######## -#!ifndef NATHELPER_LOADED -loadmodule "nathelper.so" -#!endif -modparam("nathelper", "received_avp", "$avp(AVP_RECV_PARAM)") -modparam("nathelper", "sipping_from", "sip:sipcheck@MY_HOSTNAME") - -####### NAT Traversal Logic ######## -route[NAT_TEST_AND_CORRECT] -{ - if (is_present_hf("Record-Route")) { - $var(i) = 0; - $var(rr_count) = $rr_count; - while($var(i) < $var(rr_count)) { - $var(rr_base) = $(hdr(Record-Route)[$var(i)]); - $var(rr_idx) = 0; - $var(rr) = $(var(rr_base){s.select,$var(rr_idx),,}); - while($var(rr) != $null && $var(rr) != "") { - $var(i) = $var(i) + 1; - if (!is_myself("$(var(rr){nameaddr.uri})")) { - setflag(FLAG_SKIP_NAT_CORRECTION); - } - $var(rr_idx) = $var(rr_idx) + 1; - $var(rr) = $(var(rr_base){s.select,$var(rr_idx),,}); - } - } - } else if ($Rp == "5080") { - setflag(FLAG_SKIP_NAT_CORRECTION); - } - - if (isflagset(FLAG_SKIP_NAT_CORRECTION)) { - return(); - } - - if (nat_uac_test("3")) { - force_rport(); - fix_nated_contact(); - } - - if (has_body("application/sdp") && nat_uac_test("8")) { - fix_nated_sdp("10"); - } -} - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/nodes-role.cfg b/kamailio/nodes-role.cfg deleted file mode 100644 index cb84b6b..0000000 --- a/kamailio/nodes-role.cfg +++ /dev/null @@ -1,162 +0,0 @@ -######## Nodes role - pushes info to kazoo ######## - -#!ifndef NODES_EXPIRE -#!define NODES_EXPIRE 10 -#!endif - -#!ifndef NODES_FUDGE_FACTOR -#!define NODES_FUDGE_FACTOR 3 -#!endif - -modparam("htable", "htable", "nodes=>size=8;initval=0;autoexpire=180"); -modparam("htable", "htable", "media=>size=8;initval=0;autoexpire=180"); - -####### TIMER module ########## -#!ifndef TIMER_LOADED -loadmodule "timer.so" -#!trydef TIMER_LOADED -#!endif -modparam("timer", "declare_timer", "NODES_ADVERTISE_TIMER=NODES_ADVERTISE_ROUTE,5000,slow,enable"); -modparam("timer", "declare_timer", "NODE_TRACK_TIMER=NODE_TRACK_ROUTE,500,fast,enable"); -modparam("timer", "declare_timer", "NODE_HEARTBEAT_TIMER=NODE_HEARTBEAT_ROUTE,500,fast,enable"); - - -####### MQUEUE module ########## -#!ifndef MQUEUE_LOADED -loadmodule "mqueue.so" -#!trydef MQUEUE_LOADED -#!endif -modparam("mqueue","mqueue", "name=node_track") -modparam("mqueue","mqueue", "name=node_heartbeat") - - -####### NODES Logic ######## -route[NODES_ADVERTISE_ROUTE] -{ - $var(Payload) = '{"Event-Category" : "nodes", "Event-Name" : "advertise", "Expires" : 5000, "Used-Memory" : $(stat(real_used_size){s.int}), "Registrations" : $(stat(registered_users){s.int}), "WhApps" : {"kamailio" : {"Startup" : $Tb }} }'; - kazoo_publish("nodes", "", $var(Payload)); -} - - -event_route[kazoo:consumer-event-nodes-advertise] -{ - if($shtinc(nodes=>$(kzE{kz.json,Node})::count) == 1) { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|nodes|hearbeat from new node $(kzE{kz.json,Node})\n"); - } - mq_add("node_heartbeat", "$(kzE{kz.json,Node})", "$kzE"); -} - -event_route[htable:expired:nodes] -{ - if($shtrecord(key) =~ "::count$$") { - if($shtrecord(value) == 0) { - xlog("L_INFO", "htable|nodes|node $(shtrecord(key){s.rm,::count}) is still unreachable\n"); - } - mq_add("node_track", "$shtrecord(key)", ""); - return; - } - - xlog("L_INFO", "htable|nodes|hearbeat expired for node $shtrecord(key)\n"); -} - -route[NODE_TRACK_ROUTE] -{ - $var(runloop) = 1; - while(mq_fetch("node_track") == 1 && $var(runloop) < MAX_WHILE_LOOPS) { - $var(Key) = $mqk(node_track); - $sht(nodes=>$var(Key)) = 0; - $var(runloop) = $var(runloop) + 1; - } -} - - -route[NODE_HEARTBEAT_ROUTE] -{ - $var(runloop) = 1; - while(mq_fetch("node_heartbeat") == 1 && $var(runloop) < MAX_WHILE_LOOPS) { - $var(Node) = $mqk(node_heartbeat); - $var(Payload) = $mqv(node_heartbeat); - - route(CHECK_MEDIA_SERVERS); - - $sht(nodes=>$var(Node)) = $var(Payload); - $shtex(nodes=>$var(Node)) = ($(var(Payload){kz.json,Expires}{s.int}) / 1000) + NODES_FUDGE_FACTOR; - $var(runloop) = $var(runloop) + 1; - } -} - -route[CHECK_MEDIA_SERVERS] -{ - if($(var(Payload){kz.json,Media-Servers}) == "") { - return; - } - - $var(Media) = $(var(Payload){kz.json,Media-Servers}); - $var(Zone) = $(var(Payload){kz.json,AMQP-Broker-Zone}); - - $var(Dot) = "."; - $var(Perc) = "%"; - avp_delete("$avp(MediaKeys)"); - if(kazoo_json_keys($var(Payload), "Media-Servers", "$avp(MediaKeys)") == 1) { - $var(Count) = $cnt($avp(MediaKeys)); - $var(Idx) = 0; - while( $var(Idx) < $var(Count) ) { - $var(MediaKey) = $(avp(MediaKeys)[$var(Idx)]{s.replace,$var(Dot),$var(Perc)}); - $var(MediaUrl1) = $(var(Payload){kz.json,Media-Servers.$var(MediaKey).Interface.URL}); - if($var(MediaUrl1) != "") { - $var(MediaUrl) = $(var(MediaUrl1){re.subst,/^sip:(.*)@(.*)/sip:\2/}); - if($shtinc(media=>$var(MediaUrl)::count) == 1) { - $sht(media=>$var(MediaUrl)::zone) = $var(Zone); - $shtex(media=>$var(MediaUrl)::zone) = 0; - route(MEDIA_SERVER_UP); - }; - $shtex(media=>$var(MediaUrl)::count) = ($(var(Payload){kz.json,Expires}{s.int}) / 1000) + NODES_FUDGE_FACTOR; - } - $var(Idx) = $var(Idx) + 1; - } - }; -} - - -event_route[htable:expired:media] -{ - $var(MediaUrl) = $(shtrecord(key){re.subst,/(.*)::(.*)/\1/}); - $var(Zone) = $sht(media=>$var(MediaUrl)::zone); - route(MEDIA_SERVER_DOWN); -} - -route[MEDIA_SERVER_UP] -{ - xlog("L_INFO", "nodes|media|$var(Node) reported new media server $var(MediaUrl) in zone $var(Zone)\n"); - -#!ifdef DISPATCHER_ROLE - route(DISPATCHER_CHECK_MEDIA_SERVER); -#!endif - -#!ifdef FAST_PICKUP_ROLE - route(FAST_PICKUP_START); -#!endif - -} - -route[MEDIA_SERVER_DOWN] -{ - xlog("L_INFO", "htable|media|hearbeat expired for media server $var(MediaUrl) in zone $var(Zone)\n"); - -#!ifdef PRESENCE_ROLE - route(RESET_PUBLISHER); -#!endif - -} - -#!ifndef NODES_CUSTOM_BINDINGS -route[NODES_BINDINGS] -{ - $var(payload) = "{ 'exchange' : 'nodes' , 'type' : 'fanout', 'queue' : 'nodes-MY_HOSTNAME', 'exclusive' : 0, 'federate' : 1}"; - kazoo_subscribe("$var(payload)"); -} -#!endif - - - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/presence-reset.cfg b/kamailio/presence-reset.cfg deleted file mode 100644 index 3ecc20e..0000000 --- a/kamailio/presence-reset.cfg +++ /dev/null @@ -1,134 +0,0 @@ - -kazoo.presence_reset_blf_defer_update = PRESENCE_RESET_BLF_DEFER_UPDATE descr "defers blf reset" - - -##### PRESENCE RESET ROUTINES - -route[PRESENCE_RESET_ROUTE] -{ - $var(runloop) = 1; - while(mq_fetch("blf_reset") == 1 && $var(runloop) < MAX_WHILE_LOOPS) { - $var(Key) = $mqk(blf_reset); - $sht(nodes=>$var(Key)) = 0; - $var(runloop) = $var(runloop) + 1; - } -} - -route[PRESENCE_RESET_BINDINGS] -{ - #!import_file "presence-reset-custom-bindings.cfg" - - #!ifndef PRESENCE_RESET_CUSTOM_BINDINGS - $var(payload) = "{ 'exchange' : 'presence' , 'queue' : 'presence-reset-MY_HOSTNAME', 'exclusive' : 0 ,'type' : 'topic', 'routing' : 'presence.reset.*.*', 'federate' : 1 }"; - kazoo_subscribe("$var(payload)"); - #!endif - -} - -route[RESET_PUBLISHER] -{ - xlog("L_INFO", "$var(Msg-ID)|reset|received presence reset for publisher $var(MediaUrl))\n"); - if(@cfg_get.kazoo.presence_reset_blf_defer_update == 0) { - $var(Query) = $_s(update active_watchers set expires = $TS where id in (select b.id from presentity a inner join active_watchers b on a.username = b.to_user and a.domain = b.to_domain and a.event = b.event where a.sender = "$var(MediaUrl)")); - sql_query("exec", "$var(Query)"); - } - $var(Query) = $_s(delete from presentity where sender = "$var(MediaUrl)"); - sql_query("exec", "$var(Query)"); - $var(presentities) = $sqlrows(exec); - xlog("L_INFO", "$var(Msg-ID)|reset|removed $var(presentities) presentities from publisher $var(MediaUrl)\n"); -} - -route[RESET_ALL] -{ - sql_query("exec", "delete from presentity"); - $var(presentities) = $sqlrows(exec); - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|removed $var(presentities) presentities\n"); -} - -route[RESET_ZONE] -{ - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|received presence reset for this zone (MY_AMQP_ZONE)\n"); - route(RESET_ALL); -} - - -route[RESET_SERVER] -{ - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|received presence reset for this server (MY_HOSTNAME)\n"); - route(RESET_ALL); -} - -route[RESET_ACCOUNT] -{ - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|received presence reset for realm $(kzE{kz.json,Realm})\n"); - sql_query("exec", 'delete from presentity where domain="$(kzE{kz.json,Realm})" '); - $var(presentities) = $sqlrows(exec); - sql_query("exec", 'update active_watchers set expires = $TS where watcher_domain="$(kzE{kz.json,Realm})" '); - $var(watchers) = $sqlrows(exec); - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|removed $var(presentities) presentities and expired $var(watchers) subscribers for realm $(kzE{kz.json,Realm})\n"); -} - -route[RESET_WILDCARD] -{ - if($(kzE{kz.json,Realm}) == "*" && $(kzE{kz.json,Username}) == "*") { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|received presence reset for cluster\n"); - route(RESET_ALL); - } else { - if($(kzE{kz.json,Realm}) == "*") { - if($(kzE{kz.json,Username}) == "MY_AMQP_ZONE") { - route(RESET_ZONE); - } else { - if($(kzE{kz.json,Username}) == "MY_HOSTNAME") { - route(RESET_SERVER); - } else { - if($(kzE{kz.json,Username}) =~ "sip:") { - $var(Msg-ID) = $(kzE{kz.json,Msg-ID}); - $var(MediaUrl) = $(kzE{kz.json,Username}); - route(RESET_PUBLISHER); - } else { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|received presence wildcard reset for $(kzE{kz.json,Username}). 'MY_AMQP_ZONE/MY_HOSTNAME' doesn't care\n"); - } - } - } - } else { - route(RESET_ACCOUNT); - } - } - -} - - -event_route[kazoo:consumer-event-presence-reset] -{ - if($(kzE{kz.json,Username}) == "*" || $(kzE{kz.json,Realm}) == "*") { - route(RESET_WILDCARD); - exit(); - } - - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|received presence reset for $(kzE{kz.json,Username})@$(kzE{kz.json,Realm})\n"); - $var(presentity) = "sip:" + $(kzE{kz.json,Username}) + "@" + $(kzE{kz.json,Realm}); - route(COUNT_SUBSCRIBERS); - sql_query("exec", 'delete from presentity where domain="$(kzE{kz.json,Realm})" and username = "$(kzE{kz.json,Username})"'); - - if($xavp(watchers=>message-summary) > 0) { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|notifying $xavp(watchers=>message-summary) message-summary subscribers of $var(presentity)\n"); - pres_refresh_watchers("$var(presentity)", "message-summary", 1); - } else { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|skip message-summary subscriber notification for $var(presentity)\n"); - } - - if($xavp(watchers=>presence) > 0) { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|notifying $xavp(watchers=>presence) presence subscribers of $var(presentity)\n"); - pres_refresh_watchers("$var(presentity)", "presence", 1); - } else { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|skip presence subscriber notification for $var(presentity)\n"); - } - - if($xavp(watchers=>dialog) > 0) { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|notifying $xavp(watchers=>dialog) dialog subscribers of $var(presentity)\n"); - pres_refresh_watchers("$var(presentity)", "dialog", 1); - } else { - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|reset|skip dialog subscriber notification for $var(presentity)\n"); - } - -} diff --git a/kamailio/presence-role.cfg b/kamailio/presence-role.cfg deleted file mode 100644 index 94483ce..0000000 --- a/kamailio/presence-role.cfg +++ /dev/null @@ -1,304 +0,0 @@ -######## Presence server module ######## -#!trydef PRESENCE_MIN_EXPIRES 300 -#!trydef PRESENCE_MIN_EXPIRES_ACTION 1 -#!trydef PRESENCE_MAX_EXPIRES 3600 - -modparam("htable", "htable", "p=>size=32;autoexpire=3600;") -modparam("htable", "htable", "first=>size=32;autoexpire=3600;initval =0;updateexpire=1") - -loadmodule "presence.so" -loadmodule "presence_dialoginfo.so" -loadmodule "presence_mwi.so" -loadmodule "presence_xml.so" - -modparam("presence_dialoginfo", "force_dummy_dialog", 1) -modparam("presence_dialoginfo", "force_single_dialog", BLF_USE_SINGLE_DIALOG) - -modparam("presence_xml", "force_dummy_presence", 1) -modparam("presence_xml", "force_active", 1) -modparam("presence_xml", "disable_winfo", 1) -modparam("presence_xml", "disable_bla", 1) - -modparam("presence", "subs_db_mode", 3) -modparam("presence", "expires_offset", 0) -modparam("presence", "send_fast_notify", 1) -modparam("presence", "clean_period", 30) -modparam("presence", "db_update_period", 10) -modparam("presence", "publ_cache", 0) -modparam("presence", "min_expires_action", PRESENCE_MIN_EXPIRES_ACTION) -modparam("presence", "min_expires", PRESENCE_MIN_EXPIRES) -modparam("presence", "max_expires", PRESENCE_MAX_EXPIRES) -modparam("presence", "sip_uri_match", 1) -modparam("presence", "waitn_time", 1) -modparam("presence", "notifier_processes", 0) -modparam("presence", "db_url", "KAZOO_DB_URL") -modparam("presence", "xavp_cfg", "pres") -modparam("presence", "local_log_level", 6) -modparam("presence", "startup_mode", 0) -modparam("presence", "force_delete", 1) -modparam("presence", "timeout_rm_subs", 0) -modparam("presence", "cseq_offset", 1) - -modparam("kazoo", "db_url", "KAZOO_DB_URL") -modparam("kazoo", "pua_mode", 1) - -#!ifdef NAT_TRAVERSAL_ROLE -#!ifndef NAT_TRAVERSAL_LOADED -#!trydef NAT_TRAVERSAL_LOADED -loadmodule "nat_traversal.so" -#!endif -modparam("nat_traversal", "keepalive_method", "OPTIONS") -modparam("nat_traversal", "keepalive_from", "sip:sipcheck@MY_HOSTNAME") -modparam("nat_traversal", "keepalive_state_file", "KAZOO_DATA_DIR/keep_alive_state") -modparam("nat_traversal", "keepalive_interval", 45) -#!endif - - -#!ifdef FAST_PICKUP_ROLE -#!include_file "fast-pickup-role.cfg" -#!endif -#!ifdef PRESENCE_QUERY_ROLE -#!include_file "presence_query-role.cfg" -#!endif -#!ifdef PRESENCE_NOTIFY_SYNC_ROLE -#!include_file "presence_notify_sync-role.cfg" -#!endif - -####### Presence Logic ######## - -#!ifdef NAT_TRAVERSAL_ROLE -route[PRESENCE_NAT] -{ - if (client_nat_test("3")) { - fix_contact(); - } - - nat_keepalive(); - force_rport(); - -} -#!endif - -route[HANDLE_SUBSCRIBE] -{ - if (!is_method("SUBSCRIBE")) { - return; - } - - #!ifdef NAT_TRAVERSAL_ROLE - route(PRESENCE_NAT); - #!endif - - if(has_totag()) { - route(HANDLE_RESUBSCRIBE); - } else { - route(HANDLE_NEW_SUBSCRIBE); - } - - exit; -} - -route[HANDLE_RESUBSCRIBE] -{ - loose_route(); - if(handle_subscribe()) { - if($subs(remote_cseq) < 5) { - $sht(first=>$subs(callid)) = $null; - $sht(first=>$subs(from_user)::$subs(pres_uri)::$subs(from_domain)::$subs(event)) = $null; - } - route(SUBSCRIBE_AMQP); - }; -} - - -route[HANDLE_NEW_SUBSCRIBE] -{ - if ($hdr(Event) == "dialog" - || $hdr(Event) == "presence" - || $hdr(Event) == "message-summary") { - - - if ($tU == $null) { - xlog("L_INFO", "$ci|stop|ignoring subscribe with empty TO username from a $ua\n"); - send_reply(400, "Missing TO username"); - return; - } - - if ($fU == $null) { - xlog("L_INFO", "$ci|stop|ignoring subscribe with empty FROM username from a $ua\n"); - send_reply(400, "Missing FROM username"); - return; - } - - if($shtinc(first=>$ci) > 1) { - sql_query("exec", 'delete from active_watchers where callid = "$ci"'); - xlog("L_INFO", "$ci|subscribe|resetting $hdr(Event) subscription from $fU to $tU in realm $fd : $sqlrows(exec)\n"); - } else { - $var(presentity_uri) = $ru; - if($(var(presentity_uri){uri.user}) == "") { - $var(presentity_uri) = $tu; - } - if($shtinc(first=>$fU::$var(presentity_uri)::$fd::$hdr(Event)) > 1) { - sql_query("exec", 'delete from active_watchers where watcher_username="$fU" and presentity_uri="$var(presentity_uri)" and to_user="$tU" and watcher_domain="$fd" and event="$hdr(Event)"'); - xlog("L_INFO", "$ci|subscribe|resetting $hdr(Event) subscription from $fU to $var(presentity_uri) in realm $fd : $sqlrows(exec)\n"); - } - } - - if (handle_subscribe()) { - route(SUBSCRIBE_AMQP); - xlog("L_INFO","$ci|end|new $hdr(Event) subscription from $fU to $tU in realm $fd : $sht(first=>$ci) : $sht(first=>$fU::$tU::$fd::$hdr(Event))\n"); - } else { - xlog("L_INFO", "$ci|stop|error $T_reply_code for new $hdr(Event) subscription from $fU to $tU in realm $fd\n"); - } - } else { - xlog("L_INFO", "$ci|stop|unsupported subscription package $hdr(Event) from $fU to $tU in realm $fd\n"); - send_reply(489, "Bad Event"); - } -} - -route[SUBSCRIBE_AMQP] -{ - $var(rk) = "subscribe." + $(subs(to_domain){kz.encode}) + "." + $(subs(to_user){kz.encode}); - $var(amqp_payload_request) = $_s({"Event-Category" : "presence", "Event-Name" : "subscription", "Event-Package" : "$hdr(event)", "Expires" : $subs(expires), "Queue" : "BLF-MY_HOSTNAME", "Server-ID" : "BLF-MY_HOSTNAME" , "Contact" : "$(ct{s.escape.common}{s.replace,\','}{s.replace,$$,})", "Call-ID" : "$ci", "From" : "$fu", "User" : "$subs(uri)", "User-Agent" : "$(ua{s.escape.common}{s.replace,\','}{s.replace,$$,})" }); - kazoo_publish("omnipresence", "$var(rk)", $var(amqp_payload_request)); -} - -route[HANDLE_PUBLISH] -{ - if (is_method("PUBLISH")) { - if (!t_newtran()) { - sl_reply_error(); - exit; - } - if($hdr(Sender)!= $null) - handle_publish("$hdr(Sender)"); - else - handle_publish(); - t_release(); - exit; - } -} - -route[COUNT_PRESENTITIES] -{ - $var(Query) = $_s(select event, (select count(*) from presentity b where username = "$(kzE{kz.json,From}{uri.user})" and domain = "$(kzE{kz.json,From}{uri.domain})" and b.event = a.event) count from event_list a); - $var(p) = "uri="+$(kzE{kz.json,From}); - if (sql_xquery("cb", "$var(Query)", "subs") == 1) - { - while($xavp(subs) != $null) { - $var(p) = $var(p) + ";" + $xavp(subs=>event) + "=" + $xavp(subs=>count); - pv_unset("$xavp(subs)"); - } - } - xavp_params_explode($var(p), "watchers"); -} - -route[COUNT_SUBSCRIBERS] -{ - $var(Query) = $_s(select event, (select count(*) from active_watchers b where presentity_uri = "$(kzE{kz.json,From})" and b.event = a.event) count from event_list a); - $var(p) = "uri="+$(kzE{kz.json,From}); - if (sql_xquery("cb", "$var(Query)", "subs") == 1) - { - while($xavp(subs) != $null) { - $var(p) = $var(p) + ";" + $xavp(subs=>event) + "=" + $xavp(subs=>count); - pv_unset("$xavp(subs)"); - } - } - xavp_params_explode($var(p), "watchers"); -} - - -event_route[kazoo:consumer-event-presence-dialog-update] -{ - $var(Now) = $TS; - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|received $(kzE{kz.json,Event-Package}) update for $(kzE{kz.json,From}) state $(kzE{kz.json,State}) from $(kzE{kz.json,Switch-URI}) at $(kzE{kz.json,AMQP-Received})/$var(Now)\n"); - $var(JObj) = $kzE; - #!ifdef FAST_PICKUP_ROLE - route(FAST_PICKUP_INIT); - #!endif - - if($(kzE{kz.json,State}) == "terminated") { - route(COUNT_PRESENTITIES); - } else { - route(COUNT_SUBSCRIBERS); - } - - if($xavp(watchers=>dialog) > 0) { - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|publishing $(kzE{kz.json,From}) dialog update for $xavp(watchers=>dialog) watchers\n"); - kazoo_pua_publish_dialoginfo($var(JObj)); - pres_refresh_watchers("$(kzE{kz.json,From})", "dialog", 1); - } else { - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|skip dialog update for $(kzE{kz.json,From})\n"); - } - - - if($xavp(watchers=>presence) > 0) { - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|publishing $(kzE{kz.json,From}) presence update for $xavp(watchers=>presence) watchers\n"); - kazoo_pua_publish_presence($kzE); - pres_refresh_watchers("$(kzE{kz.json,From})", "presence", 1); - } else { - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|skip presence update for $(kzE{kz.json,From})\n"); - } - - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|finished processing $(kzE{kz.json,Event-Package}) update for $(kzE{kz.json,From}) state $(kzE{kz.json,State}) from $(kzE{kz.json,Switch-URI}) at $(kzE{kz.json,AMQP-Received})/$var(Now)/$TS\n"); - -} - -event_route[kazoo:consumer-event-presence-mwi-update] -{ - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|received message-summary update for $(kzE{kz.json,From})\n"); - route(COUNT_SUBSCRIBERS); - if($xavp(watchers=>message-summary) > 0) { - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|publishing $(kzE{kz.json,From}) message-summary update for $xavp(watchers=>message-summary) watchers\n"); - kazoo_pua_publish_mwi($kzE); - pres_refresh_watchers("$(kzE{kz.json,From})", "message-summary", 1); - } else { - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|skip message-summary update for $(kzE{kz.json,From})\n"); - } -} - -event_route[kazoo:consumer-event-presence-update] -{ - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|received presence update for $(kzE{kz.json,From})\n"); - route(COUNT_SUBSCRIBERS); - if($xavp(watchers=>presence) > 0) { - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|publishing $(kzE{kz.json,From}) presence update for $xavp(watchers=>presence) watchers\n"); - kazoo_pua_publish_presence($kzE); - pres_refresh_watchers("$(kzE{kz.json,From})", "presence", 1); - } else { - xlog("L_INFO", "$(kzE{kz.json,Call-ID})|log|skip presence update for $(kzE{kz.json,From})\n"); - } - -} - -#!include_file "presence-reset.cfg" - -route[PRESENCE_BINDINGS] -{ - #!import_file "presence-custom-bindings.cfg" - - #!ifndef PRESENCE_CUSTOM_BINDINGS - $var(payload) = "{ 'exchange' : 'presence' , 'queue' : 'presence-dialog-MY_HOSTNAME', 'exclusive' : 0 ,'type' : 'topic', 'routing' : 'dialog.*.*', 'federate' : 1 }"; - kazoo_subscribe("$var(payload)"); - - $var(payload) = "{ 'exchange' : 'presence' , 'queue' : 'presence-presence-MY_HOSTNAME', 'exclusive' : 0 ,'type' : 'topic', 'routing' : 'update.*.*', 'federate' : 1 }"; - kazoo_subscribe("$var(payload)"); - - $var(payload) = "{ 'exchange' : 'presence' , 'queue' : 'presence-mwi-MY_HOSTNAME', 'exclusive' : 0 ,'type' : 'topic', 'routing' : 'mwi_updates.*', 'federate' : 1 }"; - kazoo_subscribe("$var(payload)"); - #!endif - - route(PRESENCE_RESET_BINDINGS); - - #!ifdef PRESENCE_QUERY_ROLE - route(PRESENCE_QUERY_BINDINGS); - #!endif - - #!ifdef FAST_PICKUP_ROLE - route(FAST_PICKUP_START); - #!endif - -} - - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/presence_notify_sync-role.cfg b/kamailio/presence_notify_sync-role.cfg deleted file mode 100644 index 51c33f6..0000000 --- a/kamailio/presence_notify_sync-role.cfg +++ /dev/null @@ -1,118 +0,0 @@ -kazoo.presence_notify = 1 descr "enable/disable sending notify callback to omnipresence" -kazoo.presence_notify_timeout = 3000 descr "timeout in ms waiting for notify reply" -kazoo.presence_notify_log_body = 0 descr "logs the body sent in the notification" -kazoo.presence_notify_log_resp_body = 0 descr "logs the body received from notification" -kazoo.presence_notify_log_to_table = 1 descr "logs notify/reply to active_watchers_log table" -kazoo.presence_notify_log_to_amqp = 0 descr "logs notify/reply to amqp" -kazoo.presence_notify_record_route = 0 descr "add record route header to notify msg sent" -kazoo.presence_notify_log_init_body = 0 descr "logs the body before its sent" -kazoo.presence_notify_force_send_socket = 0 descr "forces the send socket to the contact" - -######## Generic Hash Table container in shared memory ######## -modparam("htable", "htable", "notify=>size=16;autoexpire=3600;updateexpire=1;initval=0") - -#!trydef PRESENCE_NOTIFY_INIT -#!trydef MAX_NOTIFY_ERROR 5 - -route[PRESENCE_LOCAL_NOTIFY] -{ - if($rm != "NOTIFY") { - return; - } - t_set_fr(@cfg_get.kazoo.presence_notify_timeout, @cfg_get.kazoo.presence_notify_timeout); - xlog("L_INFO", "$ci|log|init preparing $subs(event) notify to $subs(watcher_username)@$subs(watcher_domain) on behalf of $subs(pres_uri) : $du\n"); - if(@cfg_get.kazoo.presence_notify_log_init_body == 1) { - xlog("L_INFO", "$ci|log|init|body $(mb{s.escape.common}{s.replace,\','}{s.replace,$$,})\n"); - } - if(@cfg_get.kazoo.presence_notify_force_send_socket == 1) { - $fs = $_s($(pr{s.tolower}):$(hdr(Contact){nameaddr.uri}{uri.host}):$(hdr(Contact){nameaddr.uri}{uri.port})); - xlog("L_INFO", "$ci|log|init|forcing socket to $fs, $(pr{s.tolower}):$(hdr(Contact){nameaddr.uri}{uri.host}):$(hdr(Contact){nameaddr.uri}{uri.port}) , $ct\n"); - } - if(@cfg_get.kazoo.presence_notify_record_route == 1) { - record_route(); - } -} - -####### MQUEUE module ########## -#!ifndef MQUEUE_LOADED -loadmodule "mqueue.so" -#!trydef MQUEUE_LOADED -#!endif -modparam("mqueue","mqueue", "name=presence_last_notity") - -#!ifndef TIMER_LOADED -loadmodule "timer.so" -#!trydef TIMER_LOADED -#!endif -modparam("timer", "declare_timer", "PRESENCE_LOG_TIMER=PRESENCE_LOG_TIMER_ROUTE,500,fast,enable"); - - -event_route[presence:notify-reply] -{ - if(@cfg_get.kazoo.presence_notify != 1) - return; - - $xavp(pres=>delete_subscription) = 0; - - if($notify_reply($rs) == 200) { - $sht(notify=>$ci) = $null; - xlog("L_INFO", "$ci|end|notified $subs(watcher_username)@$subs(watcher_domain) on behalf of $subs(pres_uri)\n"); - } else if($notify_reply($rs) == 481 && $subs(reason) == "timeout") { - xlog("L_INFO","$ci|end|sent subscription $hdr(Subscription-State)\n"); - } else { - xlog("L_ERROR", "$ci|error|received $notify_reply($rs) when notifying $subs(watcher_username)@$subs(watcher_domain) on behalf of $subs(pres_uri)\n"); - if($rP != "UDP") { - $xavp(pres=>delete_subscription) = 1; - xlog("L_ERROR", "$ci|error|removing $rP watcher $subs(watcher_username)@$subs(watcher_domain) for $subs(pres_uri)\n"); - } else { - $var(shtinc) = $shtinc(notify=>$ci::count); - if($var(shtinc) > MAX_NOTIFY_ERROR) { - $xavp(pres=>delete_subscription) = 1; - xlog("L_ERROR", "$ci|error|removing $rP watcher $subs(watcher_username)@$subs(watcher_domain) for $subs(pres_uri)\n"); - } - } - } - if(@cfg_get.kazoo.presence_notify_log_body == 1) - xlog("L_INFO", "$ci|log|sent|body $(mb{s.escape.common}{s.replace,\','}{s.replace,$$,})\n"); - if(@cfg_get.kazoo.presence_notify_log_resp_body == 1) - xlog("L_INFO", "$ci|log|resp|body $(notify_reply($mb){s.escape.common}{s.replace,\','}{s.replace,$$,})\n"); - - if(@cfg_get.kazoo.presence_notify_log_to_amqp == 1) { - route(PRESENCE_NOTIFY_AMQP); - } - - if(@cfg_get.kazoo.presence_notify_log_to_table == 1) { - $var(Query) = $_s(REPLACE INTO active_watchers_log (presentity_uri, watcher_username, watcher_domain, event, callid, to_user, to_domain, user_agent, time, result, sent_msg, received_msg) VALUES ("$subs(uri)", "$subs(watcher_username)", "$subs(watcher_domain)", "$subs(event)","$subs(callid)","$subs(to_user)","$subs(to_domain)", '$(subs(user_agent){s.escape.common}{s.replace,\',''}{s.replace,$$,})', $TS, $notify_reply($rs), '$(mb{s.escape.common}{s.replace,\',''}{s.replace,$$,})', '$(notify_reply($mb){s.escape.common}{s.replace,\',''}{s.replace,$$,})')); - mq_add("presence_last_notity", "$subs(callid)", "$var(Query)"); - } -} - - -route[PRESENCE_LOG_TIMER_ROUTE] -{ - $var(runloop) = 1; - while(mq_fetch("presence_last_notity") == 1 && $var(runloop) < MAX_WHILE_LOOPS) { - $var(ci) = $mqk(presence_last_notity); - xlog("L_DEBUG", "Query : $mqv(presence_last_notity)"); - $var(sqlres) = sql_query("cb", "$mqv(presence_last_notity)"); - xlog("L_DEBUG", "Query result : $var(sqlres)"); - if($var(sqlres) < 0) { - xlog("L_ERROR", "$var(ci)|log|error updating active_watchers_log\n"); - } else { - $var(nrows) = $sqlrows(cb); - xlog("L_DEBUG", "$var(ci)|log|end UPDATED $var(nrows)\n"); - if($var(nrows) == 0) { - xlog("L_ERROR", "$var(ci)|log|error no rows affected when updating active_watchers_log\n"); - } - } - $var(runloop) = $var(runloop) + 1; - } -} - -route[PRESENCE_NOTIFY_AMQP] -{ - $var(amqp_payload_request) = $_s({"Event-Category" : "presence", "Event-Name" : "notify", "Event-Package" : "$subs(event)", "Timestamp" : $TS, "Call-ID" : "$subs(callid)", "From" : "$fu", "To" : "$subs(to_user)@$subs(to_domain)", "Sent" : "$(TS{s.ftime,%Y-%m-%d %H:%M:%S})", "Body" : "Hostname : MY_HOSTNAME\r\nTimestamp : $(TS{s.ftime,%Y-%m-%d %H:%M:%S})\r\n$(mb{s.escape.common}{s.replace,\','}{s.replace,$$,})\r\nResponse\r\n$(notify_reply($mb){s.escape.common}{s.replace,\','}{s.replace,$$,})","Remote-CSeq" : $subs(remote_cseq), "Local-CSeq" : $subs(local_cseq), "Sequence" : $cs, "Version" : $subs(version), "Reply" : $notify_reply($rs) }); - $var(rk) = "notify." + $(subs(to_domain){kz.encode}) + "." + $(subs(to_user){kz.encode}); - kazoo_publish("omnipresence", "$var(rk)", $var(amqp_payload_request)); - xlog("L_INFO", "$ci|log|sent notify callback for event $subs(event) : $tu\n"); -} diff --git a/kamailio/presence_query-role.cfg b/kamailio/presence_query-role.cfg deleted file mode 100644 index b9ae5f1..0000000 --- a/kamailio/presence_query-role.cfg +++ /dev/null @@ -1,112 +0,0 @@ -######## Presence query server module ######## - -route[PRESENCE_SEARCH_SUMMARY] -{ - xlog("L_INFO", "processing presence summary query for $(kzE{kz.json,Realm})\n"); - $var(Queue) = $(kzE{kz.json,Server-ID}); - $var(Event) = $(kzE{kz.json,Event-Package}); - $var(Domain) = $(kzE{kz.json,Realm}); - $var(Username) = $(kzE{kz.json,Username}); - $var(Now) = $TS; - $var(Items) = ""; - $var(Query) = $_s(select * from active_watchers where watcher_domain = "$var(Domain)"); - if($var(Event) != "") { - $var(Query) = $var(Query) + $_s( and event = "$var(Event)"); - } - if($var(Username) != "") { - $var(Query) = $var(Query) + $_s( and watcher_username = "$var(Username)"); - } - $var(Query) = $var(Query) + " order by presentity_uri, event, watcher_username, callid"; - xlog("L_DEBUG", "$ci| QUERY $var(Query)\n"); - - if (sql_xquery("cb", "$var(Query)", "ra") == 1) - { - $var(Subs) = ""; - $var(Sep1) = ""; - while($xavp(ra) != $null) { - $var(Username) = $(xavp(ra=>presentity_uri){s.tolower}); - $var(Sep2)=""; - $var(Evt)=""; - while($xavp(ra) != $null && $var(Username) == $(xavp(ra=>presentity_uri){s.tolower}) ) - { - $var(Event) = $xavp(ra=>event); - $var(Sep3)=""; - $var(Sub)=""; - $var(Count) = 0; - while($xavp(ra) != $null && $var(Username) == $(xavp(ra=>presentity_uri){s.tolower}) && $var(Event) == $xavp(ra=>event)) - { - $var(Count) = $var(Count) + 1; - pv_unset("$xavp(ra)"); - } - $var(Evt) = $var(Evt) + $var(Sep2) + $_s("$var(Event)" : $var(Count)); - $var(Sep2)=", "; - } - $var(Subs) = $var(Subs) + $var(Sep1) + $_s("$(var(Username){uri.user})") + " : { " + $var(Evt) + " }"; - $var(Sep1)=", "; - } - } - xlog("L_DEBUG", "$ci| RESULT \"Subscriptions\" : { $var(Subs) }\n"); - - $var(amqp_payload_request) = '{"Event-Category" : "presence", "Event-Name" : "search_resp", "Msg-ID" : "$(kzE{kz.json,Msg-ID})", "Subscriptions" : { $var(Subs) } }'; - kazoo_publish("targeted", "$var(Queue)", $var(amqp_payload_request)); - -} - -route[PRESENCE_SEARCH_DETAIL] -{ - xlog("L_INFO", "processing presence query detail for $(kzE{kz.json,Username}) in realm $(kzE{kz.json,Realm})\n"); - $var(Queue) = $(kzE{kz.json,Server-ID}); - $var(Event) = $(kzE{kz.json,Event-Package}); - $var(Domain) = $(kzE{kz.json,Realm}); - $var(Username) = $(kzE{kz.json,Username}); - $var(presentity_uri) = "sip:" + $var(Username) + "@" + $var(Domain); - $var(Now) = $TS; - $var(Items) = ""; - $var(Query) = $_s(select * from active_watchers_log where presentity_uri = "$var(presentity_uri)"); - if($var(Event) != "") { - $var(Query) = $var(Query) + $_s( and event = "$var(Event)"); - } - $var(Query) = $var(Query) + " order by event, watcher_username, callid"; - xlog("L_DEBUG", "$ci| STATUS QUERY $var(Query)\n"); - - if (sql_xquery("cb", "$var(Query)", "ra") == 1) { - while($xavp(ra) != $null) { - $var(Event) = $xavp(ra=>event); - while($xavp(ra) != $null && $var(Event) == $xavp(ra=>event)) { - $var(Sub) = $_s("$var(Username)" : {"$xavp(ra=>event)" : { "$xavp(ra=>watcher_username)" : {"kamailio@MY_HOSTNAME" : {"$xavp(ra=>callid)" : {"time" : $xavp(ra=>time), "result" : $xavp(ra=>result), "sent" : "$(xavp(ra=>sent_msg){s.escape.common}{s.replace,\','}{s.replace,$$,})", "received" : "$(xavp(ra=>received_msg){s.escape.common}{s.replace,\','}{s.replace,$$,})", "user_agent" : "$(xavp(ra=>user_agent){s.escape.common}{s.replace,\','}{s.replace,$$,})"}}}}}); - xlog("L_DEBUG", "$ci| RESULT \"Subscriptions\" : { $var(Sub) }\n"); - $var(amqp_payload_request) = '{"Event-Category" : "presence", "Event-Name" : "search_partial_resp", "Msg-ID" : "$(kzE{kz.json,Msg-ID})", "Subscriptions" : { $var(Sub) } }'; - kazoo_publish("targeted", "$var(Queue)", $var(amqp_payload_request)); - pv_unset("$xavp(ra)"); - } - } - } - - $var(amqp_payload_request) = '{"Event-Category" : "presence", "Event-Name" : "search_resp", "Msg-ID" : "$(kzE{kz.json,Msg-ID})" }'; - kazoo_publish("targeted", "$var(Queue)", $var(amqp_payload_request)); - -} - - - -event_route[kazoo:consumer-event-presence-search-req] -{ - switch($(kzE{kz.json,Search-Type})) { - case "summary": - route(PRESENCE_SEARCH_SUMMARY); - break; - case "detail": - route(PRESENCE_SEARCH_DETAIL); - break; - default: - xlog("L_INFO", "$ci|search type '$(kzE{kz.json,Search-Type})' not handled\n"); - } -} - -route[PRESENCE_QUERY_BINDINGS] -{ - $var(payload) = "{ 'exchange' : 'presence' , 'type' : 'topic', 'queue' : 'presence-search-MY_HOSTNAME', 'exclusive' : 0, 'routing' : 'presence.search_req.*', 'federate' : 1 }"; - kazoo_subscribe("$var(payload)"); -} - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/pusher-role.cfg b/kamailio/pusher-role.cfg deleted file mode 100644 index 6640352..0000000 --- a/kamailio/pusher-role.cfg +++ /dev/null @@ -1,53 +0,0 @@ -## PUSHER ROLE - -####### SQL OPS module ########## -#!ifndef TSILO_LOADED -loadmodule "tsilo.so" -#!trydef TSILO_LOADED -#!endif - -route[PUSHER_ROUTE] -{ - if ( (!is_method("INVITE")) || (!isflagset(FLAG_INTERNALLY_SOURCED)) || $hdr(X-KAZOO-PUSHER-Token-ID) == $null) - return; - - if(registered("location")) { - return; - } - - xlog("L_INFO", "$ci| pusher received request to wakeup $tu\n"); - sl_send_reply(180, "waking the dead guy"); - if (t_newtran()) { - route(SEND_PUSH_NOTIFICATION); - t_on_reply("EXTERNAL_REPLY"); - t_set_fr(0, 10000); - remove_hf_re("^X-.*"); - t_save_lumps(); - ts_store(); - t_release(); - } else { - sl_send_reply(500, "error creating transaction for waking the dead guy"); - } - exit; -} - -route[SEND_PUSH_NOTIFICATION] -{ - $var(TokenID) = $hdr(X-KAZOO-PUSHER-Token-ID); - $var(TokenType) = $hdr(X-KAZOO-PUSHER-Token-Type); - $var(TokenApp) = $hdr(X-KAZOO-PUSHER-Token-App); - $var(rp) = $hdr(Remote-Party-ID); - $var(from) = $(var(rp){tobody.user}) + " - " + $(var(rp){tobody.display}{s.escape.common}); - $var(Payload) = '{ "Event-Category" : "notification", "Event-Name" : "push_req", "Call-ID" : "$ci", "Token-ID" : "$var(TokenID)", "Token-Type" : "$var(TokenType)", "Token-App" : "$var(TokenApp)", "Alert-Body" : "$var(from)" }'; - $var(RoutingKey) = "notification.push." + $var(TokenType) + "." + $var(TokenID); - $var(exchange) = "pushes"; - kazoo_publish($var(exchange), $var(RoutingKey), $var(Payload)); -} - -route[PUSHER_ON_REGISTRATION] -{ - if($(xavp(ulattrs=>custom_channel_vars){kz.json,Pusher-Application}{s.len}) > 0 && $var(Status) == "Registered") { - xlog("L_INFO", "$ci| pusher ON_REGISTRATION - $(xavp(ulattrs=>custom_channel_vars){kz.json,Pusher-Application})\n"); - ts_append("location", "$tu"); - } -} diff --git a/kamailio/rate-limiter-role.cfg b/kamailio/rate-limiter-role.cfg deleted file mode 100644 index 7ef4426..0000000 --- a/kamailio/rate-limiter-role.cfg +++ /dev/null @@ -1,254 +0,0 @@ -######## DoS prevention module ######## -modparam("htable", "timer_interval", 10) -modparam("htable", "htable", "rps=>size=8;initval=0;autoexpire=60") -modparam("htable", "htable", "rpm=>size=8;initval=0;autoexpire=180") -modparam("htable", "htable", "tps=>size=8;initval=0;autoexpire=60") -modparam("htable", "htable", "tpm=>size=8;initval=0;autoexpire=180") -modparam("htable", "htable", "rate_limits=>initval=-1;autoexpire=60") # initval = -1 means that record is expired and we need an update from DB - -#!trydef RATE_LIMIT_MESSAGE "Over rate Limit" -#!trydef RATE_LIMIT_CODE "603" - -#!trydef IP_REGEX "[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}\.[0-9]{1,3}" - -route[DOS_PREVENTION] { - - # If packet came from platform or from 4 class MERA, do not check it - if (isflagset(FLAG_INTERNALLY_SOURCED) || isflagset(FLAG_TRUSTED_SOURCE) ) { - xlog("L_DEBUG", "$ci |RL| Trusted source IP($si) ignoring\n"); - return; - } - - # Initially we do not want to get data - $var(with-realm-request) = "false"; - $var(with-realm-total) = "false"; - $var(with-device-request) = "false"; - $var(with-device-total) = "false"; - $var(method-key) = "Method"; - $var(method-value) = "\"TOTAL\""; - - # SIP methods INVITE and REGISTER have personal counters - if ((is_method("INVITE") || is_method("REGISTER")) && (!isflagset(FLAG_IS_REPLY))) { - $var(lrpm_realm) = $fd+"/"+$rm+"/min"; - $var(lrps_realm) = $fd+"/"+$rm+"/sec"; - - $var(lrpm_device) = $fU+"@"+$fd+"/"+$rm+"/min"; - $var(lrps_device) = $fU+"@"+$fd+"/"+$rm+"/sec"; - $var(method-value) = "\"" + $rm + "\""; - } - - # For BYE method we use REALM from To SIP header - if ($fd =~ IP_REGEX) { - xlog("L_WARNING","$ci|RL-realm log| Fixup for $rm method with IP in from URI: use to-domain\n"); - $var(ltpm_realm) = $td+"/TOTAL/min"; - $var(ltps_realm) = $td+"/TOTAL/sec"; - $var(ltpm_device) = $fU+"@"+$td+"/TOTAL/min"; - $var(ltps_device) = $fU+"@"+$td+"/TOTAL/sec"; - $var(entity) = $td; - } else { - $var(ltpm_realm) = $fd+"/TOTAL/min"; - $var(ltps_realm) = $fd+"/TOTAL/sec"; - $var(ltpm_device) = $fU+"@"+$fd+"/TOTAL/min"; - $var(ltps_device) = $fU+"@"+$fd+"/TOTAL/sec"; - $var(entity) = $fd; - } - - # REALM check - if ((is_method("INVITE") || is_method("REGISTER")) && (!isflagset(FLAG_IS_REPLY))) { - if ($sht(rate_limits=>$var(lrpm_realm)) == -1 - || $sht(rate_limits=>$var(lrps_realm)) == -1) { - xlog("L_INFO", "$ci|RL-realm log| Can't find HASHed rate for $var(entity) with $rm method\n"); - $var(with-realm-request) = "true"; - } - } - - if ($sht(rate_limits=>$var(ltpm_realm)) == -1 - || $sht(rate_limits=>$var(ltps_realm)) == -1) { - xlog("L_INFO", "$ci|RL-realm log| Can't find HASHed rate for $var(entity) with $rm method\n"); - $var(with-realm-total) = "true"; - } - - if (not_empty("$fU")) { - if ($fd =~ IP_REGEX) { - xlog("L_WARNING","$ci|RL-realm log| Fixup for $rm method with IP in from URI: use to-domain\n"); - $var(entity) = $fU+"@"+$td; - } else { - $var(entity) = $fU+"@"+$fd; - } - - #DEVICE check - if ((is_method("INVITE") || is_method("REGISTER")) && (!isflagset(FLAG_IS_REPLY))) { - if ($sht(rate_limits=>$var(lrpm_device)) == -1 - || $sht(rate_limits=>$var(lrps_device)) == -1) { - xlog("L_INFO", "$ci|RL-device log| Can't find HASHed rate for $var(entity) with $rm method\n"); - $var(with-device-request) = "true"; - } - } - - if ($sht(rate_limits=>$var(ltpm_device)) == -1 || $sht(rate_limits=>$var(ltps_device)) == -1) { - xlog("L_INFO", "$ci|RL-device log| Can't find HASHed rate for $var(entity) with $rm method\n"); - $var(with-device-total) = "true"; - } - } - - if ((is_method("INVITE") || is_method("REGISTER")) - && (($var(with-device-request) == "true" && $var(with-device-total) == "true") - || ($var(with-realm-request) == "true" && $var(with-realm-total) == "true"))) { - $var(method-key) = "Method-List"; - $var(method-value) = "[\"" + $rm + "\", \"TOTAL\"]"; - } - - if ( $var(with-device-request) == "true" - || $var(with-device-total) == "true" - || $var(with-realm-request) == "true" - || $var(with-realm-total) == "true" ) { - - avp_printf("$avp(s:query-request)", "{\"Entity\" : \"$var(entity)\", \"$var(method-key)\" : $var(method-value), \"Event-Category\" : \"rate_limit\", \"Event-Name\" : \"query\", \"With-Realm\" : $var(with-realm-request)}"); - xlog("L_INFO", "$ci|RL log| Query: $avp(s:query-request)\n"); - sl_send_reply("100", "Attempting K query"); - if (kazoo_query("frontier", "sbc_config", $avp(s:query-request), "$var(amqp_result)")) { - xlog("L_INFO", "$ci|RL log| Response: $var(amqp_result)\n"); - - kazoo_json($var(amqp_result), "Realm.Minute." + $rm, "$var(realm-min)"); - kazoo_json($var(amqp_result), "Realm.Second." + $rm, "$var(realm-sec)"); - kazoo_json($var(amqp_result), "Realm.Minute.TOTAL", "$var(realm-min-total)"); - kazoo_json($var(amqp_result), "Realm.Second.TOTAL", "$var(realm-sec-total)"); - kazoo_json($var(amqp_result), "Device.Minute." + $rm, "$var(device-min)"); - kazoo_json($var(amqp_result), "Device.Second." + $rm, "$var(device-sec)"); - kazoo_json($var(amqp_result), "Device.Minute.TOTAL", "$var(device-min-total)"); - kazoo_json($var(amqp_result), "Device.Second.TOTAL", "$var(device-sec-total)"); - - if ( not_empty("$var(realm-min)") ) { - $sht(rate_limits=>$var(lrpm_realm)) = $(var(realm-min){s.int}); - xlog("L_INFO", "$ci|RL-realm log| $rm DB=>HASH for $var(lrpm_realm)=$sht(rate_limits=>$var(lrpm_realm))\n"); - } - if ( not_empty("$var(realm-sec)") ) { - $sht(rate_limits=>$var(lrps_realm)) = $(var(realm-sec){s.int}); - xlog("L_INFO", "$ci|RL-realm log| $rm DB=>HASH for $var(lrps_realm)=$sht(rate_limits=>$var(lrps_realm))\n"); - } - if ( not_empty("$var(realm-min-total)") ) { - $sht(rate_limits=>$var(ltpm_realm)) = $(var(realm-min-total){s.int}); - xlog("L_INFO", "$ci|RL-realm log| $rm DB=>HASH for $var(ltpm_realm)=$sht(rate_limits=>$var(ltpm_realm))\n"); - } - if ( not_empty("$var(realm-sec-total)") ) { - $sht(rate_limits=>$var(ltps_realm)) = $(var(realm-sec-total){s.int}); - xlog("L_INFO", "$ci|RL-realm log| $rm DB=>HASH for $var(ltps_realm)=$sht(rate_limits=>$var(ltps_realm))\n"); - } - if ( not_empty("$var(device-min)") ) { - $sht(rate_limits=>$var(lrpm_device)) = $(var(device-min){s.int}); - xlog("L_INFO", "$ci|RL-device log| $rm DB=>HASH for $var(lrpm_device)=$sht(rate_limits=>$var(lrpm_device))\n"); - } - if ( not_empty("$var(device-sec)") ) { - $sht(rate_limits=>$var(lrps_device)) = $(var(device-sec){s.int}); - xlog("L_INFO", "$ci|RL-device log| $rm DB=>HASH for $var(lrps_device)=$sht(rate_limits=>$var(lrps_device))\n"); - } - if ( not_empty("$var(device-min-total)") ) { - $sht(rate_limits=>$var(ltpm_device)) = $(var(device-min-total){s.int}); - xlog("L_INFO", "$ci|RL-device log| $rm DB=>HASH for $var(ltpm_device)=$sht(rate_limits=>$var(ltpm_device))\n"); - } - if ( not_empty("$var(device-sec-total)") ) { - $sht(rate_limits=>$var(ltps_device)) = $(var(device-sec-total){s.int}); - xlog("L_INFO", "$ci|RL-device log| $rm DB=>HASH for $var(ltps_device)=$sht(rate_limits=>$var(ltps_device))\n"); - } - } else { - xlog("L_ERROR", "$ci|RL log| $rm DB unreachable for entity: $var(entity)\n"); - return; - } - } - - if ($fd =~ IP_REGEX) { - xlog("L_WARNING","$ci|RL-device log| Fixup for $rm method with IP in from URI: use to-domain\n"); - $var(entity) = $td; - } else { - $var(entity) = $fd; - } - $var(entity-type) = "realm"; - if ((is_method("INVITE") || is_method("REGISTER")) && (!isflagset(FLAG_IS_REPLY))) { - $var(lrpm) = $sht(rate_limits=>$var(lrpm_realm)); - $var(lrps) = $sht(rate_limits=>$var(lrps_realm)); - } - $var(ltpm) = $sht(rate_limits=>$var(ltpm_realm)); - $var(ltps) = $sht(rate_limits=>$var(ltps_realm)); - - - route(DO_DOS_PREVENTION); - if ( not_empty("$fU") ) { - if ($fd =~ IP_REGEX) { - $var(entity) = $fU+"@"+$td; - xlog("L_WARNING","$ci|RL-device log| Fixup for $rm method with IP in from URI: use to-domain\n"); - } else { - $var(entity) = $fU+"@"+$fd; - } - $var(entity-type) = "device"; - if ((is_method("INVITE") || is_method("REGISTER")) && (!isflagset(FLAG_IS_REPLY))) { - $var(lrpm) = $sht(rate_limits=>$var(lrpm_device)); - $var(lrps) = $sht(rate_limits=>$var(lrps_device)); - } - $var(ltpm) = $sht(rate_limits=>$var(ltpm_device)); - $var(ltps) = $sht(rate_limits=>$var(ltps_device)); - route(DO_DOS_PREVENTION); - } -} - -# This route do counting and decide either to ACCEPT or DECLINE packet -route[DO_DOS_PREVENTION] { - # Personal counters for INVITE and REGISTER - if ((is_method("INVITE") || is_method("REGISTER"))) { - $var(rpm) = $var(entity)+":"+$rm+":min:"+$timef(%Y/%m/%d_%H_%M_00); - $var(rps) = $var(entity)+":"+$rm+":sec:"+$timef(%Y/%m/%d_%H_%M_%S); - } - # Commmon counters for ALL packet including INVITE and REGISTER - $var(tpm) = $var(entity)+":TOTAL:min:"+$timef(%Y/%m/%d_%H_%M_00); - $var(tps) = $var(entity)+":TOTAL:sec:"+$timef(%Y/%m/%d_%H_%M_%S); - - # Personal debug for INVITE and REGISTER - if ((is_method("INVITE") || is_method("REGISTER"))) { - xlog("L_INFO", "$ci|RL-$var(entity-type) log| L/C for $var(rpm) = $var(lrpm)/$sht(rpm=>$var(rpm))\n"); - xlog("L_INFO", "$ci|RL-$var(entity-type) log| L/C for $var(rps) = $var(lrps)/$sht(rps=>$var(rps))\n"); - } - # Commmon debug for ALL packet including INVITE and REGISTER - xlog("L_INFO", "$ci|RL-$var(entity-type) log| L/C for $var(tpm) = $var(ltpm)/$sht(tpm=>$var(tpm))\n"); - xlog("L_INFO", "$ci|RL-$var(entity-type) log| L/C for $var(tps) = $var(ltps)/$sht(tps=>$var(tps))\n"); - - # Personal increment just for INVITE and REGISTER - if ((is_method("INVITE") || is_method("REGISTER")) && (!isflagset(FLAG_IS_REPLY))) { - $sht(rpm=>$var(rpm)) = $shtinc(rpm=>$var(rpm)); - $sht(rps=>$var(rps)) = $shtinc(rps=>$var(rps)); - } - # Commmon increment for ALL packet including INVITE and REGISTER - $sht(tpm=>$var(tpm)) = $shtinc(tpm=>$var(tpm)); - $sht(tps=>$var(tps)) = $shtinc(tps=>$var(tps)); - - # Personal checks for INVITE and REGISTER - if ((is_method("INVITE") || is_method("REGISTER")) && (!isflagset(FLAG_IS_REPLY))) { - if ($sht(rps=>$var(rps)) > $var(lrps)) { - sl_send_reply(RATE_LIMIT_CODE, RATE_LIMIT_MESSAGE); - xlog("L_INFO", "$ci|RL-$var(entity-type) log| Out of $rm $var(rps) rate limits: $sht(rps=>$var(rps)) > $var(lrps))\n"); - exit; - } - if ($sht(rpm=>$var(rpm)) > $var(lrpm)) { - sl_send_reply(RATE_LIMIT_CODE, RATE_LIMIT_MESSAGE); - xlog("L_INFO", "$ci|RL-$var(entity-type) log| Out of $rm $var(rpm) rate limits: $sht(rpm=>$var(rpm)) > $var(lrpm))\n"); - exit; - } - } - # Commmon checks for ALL packet including INVITE and REGISTER - if ($sht(tps=>$var(tps)) > $var(ltps)) { - if (isflagset(FLAG_IS_REPLY)) { - xlog("L_INFO", "$ci|RL-$var(entity-type) log| Out of TOTAL($rm::$rs $rr) $var(tps) rate limits: $sht(tps=>$var(tps)) > $var(ltps))\n"); - } else { - sl_send_reply(RATE_LIMIT_CODE, RATE_LIMIT_MESSAGE); - xlog("L_INFO", "$ci|RL-$var(entity-type) log| Out of TOTAL($rm) $var(tps) rate limits: $sht(tps=>$var(tps)) > $var(ltps))\n"); - } - exit; - } - if ($sht(tpm=>$var(tpm)) > $var(ltpm)) { - if (isflagset(FLAG_IS_REPLY)) { - xlog("L_INFO", "$ci|RL-$var(entity-type) log| Out of TOTAL($rm::$rs $rr) $var(tpm) rate limits: $sht(tpm=>$var(tpm)) > $var(ltpm))\n"); - } else { - sl_send_reply(RATE_LIMIT_CODE, RATE_LIMIT_MESSAGE); - xlog("L_INFO", "$ci|RL-$var(entity-type) log| Out of TOTAL($rm) $var(tpm) rate limits: $sht(tpm=>$var(tpm)) > $var(ltpm))\n"); - } - exit; - } -} diff --git a/kamailio/registrar-role.cfg b/kamailio/registrar-role.cfg deleted file mode 100644 index 1d05d32..0000000 --- a/kamailio/registrar-role.cfg +++ /dev/null @@ -1,343 +0,0 @@ -#!trydef REGISTRAR_NAT_PING_INTERVAL 30 -#!trydef REGISTRAR_NAT_PING_WORKERS 5 -#!trydef REGISTRAR_MIN_EXPIRES 300 -#!trydef REGISTRAR_MAX_EXPIRES 3600 - -######## Generic Hash Table container in shared memory ######## -modparam("htable", "htable", "auth_cache=>size=16;autoexpire=7200;") - -####### Authentication Interface module ########## -loadmodule "auth.so" - -#!ifdef OPENBTS_AUTH_ROLE -loadmodule "auth_openbts.so" -modparam("auth", "qop", "") -modparam("auth", "secret", "OPENBTS_AUTH_SECRET") -modparam("auth_openbts", "challenge_attr", "$avp(digest_challenge)") -#!endif - -####### User Location Implementation module ########## -loadmodule "usrloc.so" -modparam("usrloc", "db_update_as_insert", 0) -modparam("usrloc", "use_domain", 1) -modparam("usrloc", "nat_bflag", FLB_NATB) -modparam("usrloc", "db_url", "KAZOO_DB_URL") -modparam("usrloc", "db_mode", 1) -modparam("usrloc", "handle_lost_tcp", 1) -modparam("usrloc", "xavp_contact", "ulattrs") -modparam("usrloc", "db_check_update", 1) -modparam("usrloc", "timer_interval", 30) -modparam("usrloc", "timer_procs", 1) -modparam("usrloc", "db_timer_clean", 1) - - -######## NAT Traversal module - signaling functions ######## -#!ifdef NAT_TRAVERSAL_ROLE -#!trydef NATHELPER_LOADED -loadmodule "nathelper.so" -modparam("nathelper", "natping_interval", REGISTRAR_NAT_PING_INTERVAL) -modparam("nathelper", "ping_nated_only", 0) -modparam("nathelper", "natping_processes", REGISTRAR_NAT_PING_WORKERS) -modparam("nathelper", "sipping_bflag", FLB_NATSIPPING) -#!endif - -####### SIP Registrar implementation module ########## -loadmodule "registrar.so" -modparam("registrar", "received_avp", "$avp(AVP_RECV_PARAM)") -modparam("registrar", "min_expires", REGISTRAR_MIN_EXPIRES) -modparam("registrar", "max_expires", REGISTRAR_MAX_EXPIRES) -modparam("registrar", "xavp_cfg", "regcfg") -modparam("registrar", "gruu_enabled", 1) -modparam("registrar", "outbound_mode", 1) -modparam("registrar", "regid_mode", 1) -modparam("registrar", "path_mode", 1) -modparam("registrar", "use_path", 1) -modparam("registrar", "received_param", "") -modparam("registrar", "xavp_rcd", "ulrcd") - -####### Registrar Logic ######## -route[HANDLE_REGISTER] -{ - if (is_method("REGISTER")) { - - #!ifdef NAT_TRAVERSAL_ROLE - if (nat_uac_test("3")) { - xlog("L_INFO", "$ci|log|correcting NATed contact in registration\n"); - force_rport(); - } - fix_nated_register(); - - ## KAZOO-1846: Cisco SPA8000 freaks out on options pings - if (!($ua =~ "Linksys/SPA8000" - || $ua =~ "OpenBTS" - || $ua =~ "SIPp" - || (af==INET6) - )) { - setbflag(FLB_NATB); - setbflag(FLB_NATSIPPING); - } - #!endif - - route(ATTEMPT_AUTHORIZATION); - - } -} - -route[AUTHORIZATION_CHECK] -{ - if (!is_method("MESSAGE|NOTIFY|SUBSCRIBE|PUBLISH")) - return; - - if(has_totag()) - return; - - if (isflagset(FLAG_INTERNALLY_SOURCED)) - return; - - if (isflagset(FLAG_TRUSTED_SOURCE)) - return; - - $xavp(regcfg=>match_received) = $su; - if(!(registered("location", "$fu", 2, 1) == 1 && $(xavp(ulattrs=>custom_channel_vars){s.len}) > 1)) { - xlog("L_INFO", "$ci|log|not authorized $fu from $si:$sp\n"); - send_reply("503", "Not Registered"); - exit; -# route(ATTEMPT_AUTHORIZATION); - } -} - -route[ATTEMPT_AUTHORIZATION] -{ - - $var(nonce) = $(uuid(g){s.rm,-}); - #!ifdef OPENBTS_AUTH_ROLE - if($ua =~ "OpenBTS" && $sht(auth_cache=>$Au::nonce) != $null ) { - $var(nonce) = $sht(auth_cache=>$Au::nonce); - } - #!endif - - $xavp(regcfg=>match_received) = $su; - if($sht(auth_cache=>$Au) != $null && registered("location", "$rz:$Au", 2, 1) == 1 && $(xavp(ulattrs=>custom_channel_vars){s.len}) > 1) { - $var(password) = $sht(auth_cache=>$Au); - route(SAVE_LOCATION); - } - - if( is_present_hf("Authorization")) { - route(KAZOO_AUTHORIZATION); - } - - #!ifdef OPENBTS_AUTH_ROLE - if($ua =~ "OpenBTS") { - openbts_auth_challenge("$fd", "$var(nonce)"); - } else { - #!endif - auth_challenge("$fd", "0"); - #!ifdef OPENBTS_AUTH_ROLE - } - #!endif - xlog("L_INFO", "$ci|end|issued auth challenge to new registration for $fu $si:$sp\n"); - exit; -} - - -route[KAZOO_AUTHORIZATION] -{ - $var(nonce) = $adn; - $var(amqp_payload_request) = $_s({"Event-Category" : "directory" , "Event-Name" : "authn_req", "Method" : "REGISTER", "Auth-Nonce" : "$adn", "Auth-Realm" : "$fd", "Auth-User" : "$fU", "From" : "$fu", "To" : "$tu", "Orig-IP" : "$si", "Orig-Port" : "$sp", "User-Agent" : "$(ua{s.escape.common}{s.replace,\','}{s.replace,$$,})", "Contact" : "$(ct{s.escape.common}{s.replace,\','}{s.replace,$$,})", "Call-ID" : "$ci" }); - $var(amqp_routing_key) = "authn.req." + $(fd{kz.encode}); - $avp(kz_timeout) = 2500; - if (!t_newtran()) { - sl_reply_error(); - exit(); - } - if(kazoo_async_query("callmgr", $var(amqp_routing_key), $var(amqp_payload_request), "KAZOO_AUTHORIZATION_OK", "KAZOO_AUTHORIZATION_ERROR") != 1) { - xlog("L_INFO", "$ci|log|failed to send Kazoo query for authentication credentials for $Au $si:$sp\n"); - append_to_reply("Retry-After: 60\r\n"); - send_reply("503", "Retry Later"); - exit; - } -} - -route[KAZOO_AUTHORIZATION_OK] -{ - $var(password) = $(kzR{kz.json,Auth-Password}); - $var(nonce) = $adn; - #!ifdef OPENBTS_AUTH_ROLE - if( $(kzR{kz.json,Auth-Nonce}) != "" && $var(nonce) != $(kzR{kz.json,Auth-Nonce})) { - xlog("L_INFO", "$ci|log|nonce replace $var(nonce) with $(kzR{kz.json,Auth-Nonce})\n"); - $var(nonce) = $(kzR{kz.json,Auth-Nonce}); - $sht(auth_cache=>$Au::nonce) = $var(nonce); - } - #!endif - if( $(kzR{kz.json,Event-Name}) == "authn_err" ) { - auth_challenge("$fd", "0"); - xlog("L_INFO", "$ci|end|issued auth challenge to registration attempt for $Au $si:$sp\n"); - exit; - } else { - $xavp(ulattrs=>custom_channel_vars) = $(kzR{kz.json,Custom-Channel-Vars}); - xlog("L_INFO", "$ci|log|authenticating $Au via Kazoo query response\n"); - route(CHECK_AUTHORIZATION); - } -} - -route[KAZOO_AUTHORIZATION_ERROR] -{ - xlog("L_INFO", "$ci|log|failed to query Kazoo for authentication credentials for $Au $si:$sp\n"); - append_to_reply("Retry-After: 60\r\n"); - send_reply("503", "Retry Later"); - exit; -} - -route[CHECK_AUTHORIZATION] -{ - - if($ua =~ "OpenBTS") { - xlog("L_INFO", "$ci|end|OPENBTS attempt for $Au $si:$sp\n"); - } else { - - if($var(password) == $null || $var(password) == "") { - auth_challenge("$fd", "0"); - xlog("L_INFO", "$ci|end|issued auth challenge to registration attempt for $Au $si:$sp\n"); - exit; - } - - if (!pv_auth_check("$fd", "$var(password)", "0", "0")) { - #!ifdef ANTIFLOOD_ROLE - route(ANITFLOOD_FAILED_AUTH); - #!endif - - auth_challenge("$fd", "0"); - xlog("L_WARNING", "$ci|end|issued auth challenge to failed registration attempt for $Au from IP $si:$sp\n"); - exit; - } - - } - - - - - - #!ifdef ANTIFLOOD_ROLE - route(ANTIFLOOD_SUCCESSFUL_AUTH); - #!endif - - # user authenticated - remove auth header - consume_credentials(); - - route(SAVE_LOCATION); -} - - -route[SAVE_LOCATION] -{ - - if ($sht(auth_cache=>$Au) == $null) { - xlog("L_INFO", "$ci|log|caching sip credentials for $Au\n"); - }; - $sht(auth_cache=>$Au) = $var(password); - #!ifdef OPENBTS_AUTH_ROLE - if($ua =~ "OpenBTS") { - $sht(auth_cache=>$Au::nonce) = $var(nonce); - } - #!endif - - $var(save_result) = save("location", "0x04"); - if($var(save_result) == -1) { - auth_challenge("$fd", "0"); - xlog("L_INFO", "$ci|end|issued auth challenge after failed attempt to save contact for $Au $si:$sp\n"); - exit; - } else { - if($var(save_result) == 1) { - $var(new_reg) = "true"; - } else { - $var(new_reg) = "false"; - } - } - - if(@contact.expires) { - $var(expires) = @contact.expires; - } else { - if(is_present_hf("Expires")) { - $var(expires) = $hdr(Expires); - } else { - $var(expires) = REGISTRAR_MIN_EXPIRES; - } - } - - if($var(expires) == 0) { - xlog("L_INFO", "$ci|end|unregister request from $Au $si:$sp\n"); - $var(Status) = "Unregistered"; - } else { - $var(Status) = "Registered"; - if($var(expires) < REGISTRAR_MIN_EXPIRES) { - $var(expires) = REGISTRAR_MIN_EXPIRES; - } else if($var(expires) > REGISTRAR_MAX_EXPIRES) { - $var(expires) = REGISTRAR_MAX_EXPIRES; - } - } - - $var(ip) = $Ri; - if(af==INET6) { - $var(ip) = "[" + $Ri + "]"; - } - - $var(amqp_payload_request) = $_s({"Event-Category" : "directory", "Event-Name" : "reg_success", "Status" : "$var(Status)", "Event-Timestamp" : $TS, "Expires" : $(var(expires){s.int}), "First-Registration" : $var(new_reg), "Contact" : "$(ct{s.escape.common}{s.replace,\','}{s.replace,$$,})", "Call-ID" : "$ci", "Realm" : "$fd", "Username" : "$fU", "From-User" : "$fU", "From-Host" : "$fd", "To-User" : "$tU", "To-Host" : "$td", "User-Agent" : "$(ua{s.escape.common}{s.replace,\','}{s.replace,$$,})" , "Custom-Channel-Vars" : $xavp(ulattrs=>custom_channel_vars), "Proxy-Path" : "sip:$var(ip)", "Proxy-IP" : "$var(ip)", "Proxy-Port" : "$Rp", "RUID" : "$xavp(ulrcd=>ruid)", "Source-IP": "$si", "Source-Port": "$sp" }); - $var(amqp_routing_key) = "registration.success." + $(fd{kz.encode}) + "." + $(fU{kz.encode}); - kazoo_publish("registrar", $var(amqp_routing_key), $var(amqp_payload_request)); - - xlog("L_INFO", "$ci|end|successful $(var(Status){s.tolower}) with contact $xavp(ulrcd=>ruid) : $ct\n"); - - #!ifdef PUSHER_ROLE - route(PUSHER_ON_REGISTRATION); - #!endif - - exit; -} - -## kazoo event route , {"directory", "reg_flush") => reg-flush by kamailio limitations -## when a Event-Category or Event-Name has a underscore (_) we need to declare it with a dash (-) -event_route[kazoo:consumer-event-directory-reg-flush] -{ - $var(user) = $(kzE{kz.json,Username}) + "@" + $(kzE{kz.json,Realm}); - xlog("L_INFO", "$(kzE{kz.json,Msg-ID})|log|received directory flush for $var(user)\n"); - if ($sht(auth_cache=>$var(user)) != $null) { - $sht(auth_cache=>$var(user)) = $null; - } - - if(reg_fetch_contacts("location", "sip:$var(user)", "caller")) { - $var(i) = 0; - while($var(i) < $(ulc(caller=>count))) { - unregister("location", "sip:$(ulc(caller=>aor))", "$(ulc(caller=>ruid)[$var(i)])"); - $var(i) = $var(i) + 1; - } - reg_free_contacts("caller"); - } - - - #!ifdef ANTIFLOOD_ROLE - route(ANTIFLOOD_RESET_AUTH); - #!endif -} - -route[REGISTRAR_BINDINGS] -{ - #!import_file "registrar-custom-bindings.cfg" - - #!ifndef REGISTRAR_CUSTOM_BINDINGS - - $var(payload) = "{ 'exchange' : 'registrar' , 'type' : 'topic', 'queue' : 'registrar-flush-MY_HOSTNAME', 'routing' : 'registration.flush.*', 'federate' : 1, 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }"; - kazoo_subscribe("$var(payload)"); - - #!endif - - #!ifdef REGISTRAR_SYNC_ROLE - route(REGISTRAR_SYNC_BINDINGS); - #!endif - -} - -#!ifdef REGISTRAR_SYNC_ROLE -#!include_file "registrar-sync-role.cfg" -#!endif - -# vim: tabstop=4 softtabstop=4 shiftwidth=4 expandtab diff --git a/kamailio/registrar-sync-role.cfg b/kamailio/registrar-sync-role.cfg deleted file mode 100644 index 5cbe647..0000000 --- a/kamailio/registrar-sync-role.cfg +++ /dev/null @@ -1,31 +0,0 @@ -######## Presence sync server module ######## - -event_route[kazoo:consumer-event-directory-reg-sync] -{ - $var(Server) = $(kzE{kz.json,Server-ID}); - xlog("L_INFO", "received registrar sync from $var(Server) : $kzE\n"); - - if (sql_xquery("cb", "select * from location", "ra") == 1) - { - while($xavp(ra) != $null) { - $var(runloop) = 1; - while($xavp(ra) != $null && $var(runloop) < MAX_WHILE_LOOPS ) { - if(registered("location", "sip:$xavp(ra=>username)@$xavp(ra=>domain)", 0, 1)) { - xlog("L_INFO", "[id, username, domain] = [$xavp(ra=>id), $xavp(ra=>username), $xavp(ra=>domain)]\n"); - $var(Expires) = $xavp(ra=>expires) - $TS; - $var(amqp_payload_request) = '{"Event-Category" : "directory", "Event-Name" : "reg_success", "Status" : "Success", "Event-Timestamp" : $TS, "Expires" : $(var(Expires){s.int}), "First-Registration" : false, "Contact" : "$(xavp(ra=>contact){s.escape.common})", "Call-ID" : "$xavp(ra=>callid)", "Realm" : "$xavp(ra=>domain)", "Username" : "$xavp(ra=>username)", "From-User" : "$xavp(ra=>username)", "From-Host" : "$xavp(ra=>domain)", "To-User" : "$xavp(ra=>username)", "To-Host" : "$xavp(ra=>domain)", "User-Agent" : "$(xavp(ra=>user_agent){s.escape.common})" , "Custom-Channel-Vars" : $xavp(ulattrs=>custom_channel_vars), "Proxy-Path" : "sip:$(xavp(ra=>socket){s.substr,4,0})" }'; - kazoo_publish("targeted", "$var(Server)", $var(amqp_payload_request)); - } - pv_unset("$xavp(ra)"); - $var(runloop) = $var(runloop) + 1; - } - } - } - -} - -route[REGISTRAR_SYNC_BINDINGS] -{ - $var(payload) = "{ 'exchange' : 'registrar' , 'type' : 'topic', 'queue' : 'registra-sync-MY_HOSTNAME', 'routing' : 'registration.sync', 'no_ack' : 1, 'wait_for_consumer_ack' : 0 }"; - kazoo_subscribe("$var(payload)"); -} diff --git a/kamailio/responder-role.cfg b/kamailio/responder-role.cfg deleted file mode 100644 index 15885af..0000000 --- a/kamailio/responder-role.cfg +++ /dev/null @@ -1,12 +0,0 @@ -####### Responder Logic ######## -route[HANDLE_RESPOND] -{ - $var(header) = $hdr(X-KAZOO-Respond-With); - if (not_empty("$var(header)")) { - $var(code) = $(var(header){s.substr,0,3}{s.int}); - $var(msg) = $(var(header){s.substr,4,0}); - xlog("L_INFO", "$ci|end|Responding with [$var(code)/$var(msg)]\n"); - sl_send_reply("$var(code)", "$var(msg)"); - exit(); - } -} diff --git a/kamailio/tls-role.cfg b/kamailio/tls-role.cfg deleted file mode 100644 index b1ea5ba..0000000 --- a/kamailio/tls-role.cfg +++ /dev/null @@ -1,9 +0,0 @@ -enable_tls = yes - -listen=TLS_SIP -listen=TLS_ALG_SIP - -####### TLS Parameters ######### -loadmodule "tls.so" -modparam("tls", "config", "/etc/kazoo/kamailio/tls.cfg") -modparam("tls", "low_mem_threshold1", 0) diff --git a/kamailio/tls.cfg b/kamailio/tls.cfg deleted file mode 100644 index 2112f4e..0000000 --- a/kamailio/tls.cfg +++ /dev/null @@ -1,52 +0,0 @@ -# -# $Id$ -# -# Example Kamailio TLS Configuration File -# - -# This is the default server domain, settings -# in this domain will be used for all incoming -# connections that do not match any other server -# domain in this configuration file. -# -# We do not enable anything else than TLSv1 -# over the public internet. Clients do not have -# to present client certificates by default. -# -[server:default] -method = SSLv23 -verify_certificate = no -require_certificate = no -#crl = /etc/kazoo/kamailio/certs/crl.pem -certificate = /etc/kazoo/kamailio/certs/cert.pem -private_key = /etc/kazoo/kamailio/certs/key.pem -#ca_list = /etc/kazoo/kamailio/certs/ca.pem - -# This is the default client domain, settings -# in this domain will be used for all outgoing -# TLS connections that do not match any other -# client domain in this configuration file. -# We require that servers present valid certificate. -# -[client:default] -verify_certificate = no -require_certificate = no - -# This is an example server domain for TLS connections -# received from the loopback interface. We allow -# the use of SSLv2 and SSLv3 protocols here, we do -# not require that clients present client certificates -# but if they present it it must be valid. We also use -# a special certificate and CA list for loopback -# interface. -# -#[server:127.0.0.1:5061] -#method = SSLv23 -#verify_certificate = yes -#require_certificate = no -#private_key = /etc/kazoo/kamailio/certs/local_key.pem -#certificate = /etc/kazoo/kamailio/certs/local_cert.pem -#verify_depth = 3 -#ca_list = /etc/kazoo/kamailio/certs/local_ca.pem -#crl = /etc/kazoo/kamailio/certs/local_crl.pem - diff --git a/kamailio/traffic-filter-role.cfg b/kamailio/traffic-filter-role.cfg deleted file mode 100644 index 825902a..0000000 --- a/kamailio/traffic-filter-role.cfg +++ /dev/null @@ -1,57 +0,0 @@ -route[FILTER_REQUEST] -{ - # allow request from internal network or from whitelist - if (isflagset(FLAG_TRUSTED_SOURCE)) { - return; - } - - # drop requests with no To domain or IP To domain (friendly-scanner) - if (is_method("REGISTER|SUBSCRIBE")) { - route(FILTER_TO_DOMAIN); - route(FILTER_FROM_DOMAIN); - } - - # drop Invite with IP auth realm - if (is_method("INVITE")) { - route(FILTER_REQUEST_DOMAIN); - route(FILTER_AUTHORIZATION_DOMAIN); - } -} - -route[FILTER_REQUEST_DOMAIN] -{ - if ($rd =~ "[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}\.[0-9]{1,3}") { - xlog("L_WARN", "$ci|end|dropping $rm request with IP domain\n"); - drop(); - exit(); - } -} - -route[FILTER_AUTHORIZATION_DOMAIN] -{ - if (is_present_hf("Proxy-Authorization") && - $ar =~ "[0-9]{1,3}\.[0-9]{1,3}.[0-9]{1,3}\.[0-9]{1,3}" ) { - xlog("L_WARN", "$ci|end|dropping request with IP domain in Proxy-Authorization header\n"); - drop(); - exit; - } -} - -route[FILTER_TO_DOMAIN] -{ - if ($fd =~ "([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})") { - xlog("L_WARN", "$ci|end|dropping request with IP domain in From header\n"); - drop(); - exit; - } -} - -route[FILTER_FROM_DOMAIN] -{ - if ($td =~ "([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})") { - xlog("L_WARN", "$ci|end|dropping request with IP domain in To header\n"); - drop(); - exit; - } -} - diff --git a/kamailio/websockets-role.cfg b/kamailio/websockets-role.cfg deleted file mode 100644 index 0f6ee8a..0000000 --- a/kamailio/websockets-role.cfg +++ /dev/null @@ -1,126 +0,0 @@ -tcp_accept_no_cl=yes - -listen=TCP_WS -listen=UDP_WS_SIP -#!ifdef TLS_ROLE -listen=TLS_WSS -listen=UDP_WSS_SIP -#!endif - -######## NAT Traversal module - signaling functions ######## -#!ifndef NATHELPER_LOADED -#!trydef NATHELPER_LOADED -loadmodule "nathelper.so" -#!endif - -######## Generic Hash Table container in shared memory ######## -modparam("htable", "htable", "websockets=>size=16;autoexpire=7200;initval=0") - -######## Basic HTTP request handling ######## -loadmodule "xhttp.so" - -######## Websocket module ######## -loadmodule "websocket.so" -modparam("websocket", "keepalive_mechanism", 0) -modparam("websocket", "keepalive_timeout", 30) -modparam("websocket", "keepalive_processes", 1) -modparam("websocket", "keepalive_interval", 1) -modparam("websocket", "ping_application_data", "Kazoo encourages you to keep alive") -modparam("websocket", "sub_protocols", 1) - -####### Websocket Logic ######## -route[HANDLE_WEBSOCKETS] -{ - # Do NAT traversal stuff for requests from a WebSocket - # connection - even if it is not behind a NAT! - # This won't be needed in the future if Kamailio and the - # WebSocket client support Outbound and Path. - if (nat_uac_test(64)) { - xlog("L_INFO", "$ci|log|this is a websocket request\n"); - force_rport(); - if (is_method("REGISTER")) { - fix_nated_register(); - } else { - if (!add_contact_alias()) { - xlog("L_INFO", "$ci|stop|error aliasing contact <$ct>\n"); - sl_send_reply("400", "Bad Request"); - exit; - } - } - } -} - -route[NAT_WEBSOCKETS_CORRECT] -{ - # Do NAT traversal stuff for replies to a WebSocket connection - # - even if it is not behind a NAT! - # This won't be needed in the future if Kamailio and the - # WebSocket client support Outbound and Path. - if (nat_uac_test(64)) { - xlog("L_INFO", "$ci|log|this is a websocket request\n"); - add_contact_alias(); - } -} - -event_route[xhttp:request] -{ - set_reply_close(); - set_reply_no_connect(); - - if (!($rm =~ "GET")) { - xlog("L_INFO", "websocket|log|rejecting HTTP request $rm from $si:$sp\n"); - xhttp_reply("405", "Method Not Allowed", "", ""); - exit; - } - - if (!($hdr(Connection) =~ "Upgrade")) { - xlog("L_INFO", "websocket|log|rejecting HTTP connection $hdr(Connection) request from $si:$sp\n"); - xhttp_reply("400", "Bad Request", "", ""); - exit; - } - - if (!($hdr(Upgrade) =~ "websocket")) { - xlog("L_INFO", "websocket|log|rejecting HTTP upgrade $hdr(Upgrade) request from $si:$sp\n"); - xhttp_reply("400", "Bad Request", "", ""); - exit; - } - - if (!($hdr(Sec-WebSocket-Protocol) =~ "sip")) { - xlog("L_INFO", "websocket|log|rejecting request for websocket protocol $hdr(Sec-WebSocket-Protocol) from $si:$sp\n"); - xhttp_reply("400", "Bad Request", "", ""); - exit; - } - - #!ifdef MY_WEBSOCKET_DOMAIN - if (!($hdr(Origin) =~ "MY_WEBSOCKET_DOMAIN")) { - xlog("L_INFO", "websocket|log|rejecting HTTP request with unknown origin $hdr(Origin) from $si:$sp\n"); - xhttp_reply("400", "Bad Request", "", ""); - exit; - } - #!endif - - if($sht(websockets=>$si::count) > 50) { - xlog("L_WARN", "websocket|log|$si:$sp is at the maximum allowable sockets per IP, rejecting request for another websocket\n"); - xhttp_reply("403", "Forbidden", "", ""); - exit; - } - - if (ws_handle_handshake()) { - $var(shtinc) = $shtinc(websockets=>$si::count); - xlog("L_INFO", "websocket|log|opened websocket $var(count) of 50 for $si:$sp\n"); - exit; - } - - xlog("L_INFO", "websocket|log|unhandled HTTP request $rm from $si:$sp\n"); - xhttp_reply("404", "Not Found", "", ""); -} - -event_route[websocket:closed] { - $var(shtdec) = $shtdec(websockets=>$si::count); - if ($sht(websockets=>$si::count) < 1) { - xlog("L_INFO", "websocket|log|$si:$sp closed last websocket to that IP\n"); - sht_rm_name_re("websockets=>$(si{re.subst,/\\./\\\\./g})::.*"); - } else { - xlog("L_INFO", "websocket|log|closed websocket from $si:$sp, $var(count) remaining from that IP\n"); - } -} diff --git a/rabbitmq/enabled_plugins b/rabbitmq/enabled_plugins deleted file mode 100644 index 2e4cef3..0000000 --- a/rabbitmq/enabled_plugins +++ /dev/null @@ -1 +0,0 @@ -[rabbitmq_management, rabbitmq_consistent_hash_exchange]. diff --git a/rabbitmq/rabbitmq-env.conf b/rabbitmq/rabbitmq-env.conf deleted file mode 100644 index dc852d5..0000000 --- a/rabbitmq/rabbitmq-env.conf +++ /dev/null @@ -1,6 +0,0 @@ -NODENAME=kazoo-rabbit -NODE_IP_ADDRESS=0.0.0.0 -NODE_PORT=5672 -LOG_BASE=/var/log/rabbitmq -MNESIA_BASE=/var/lib/rabbitmq/mnesia -ERL_MAX_PORTS=65536 diff --git a/rabbitmq/rabbitmq.config b/rabbitmq/rabbitmq.config deleted file mode 100644 index 7756402..0000000 --- a/rabbitmq/rabbitmq.config +++ /dev/null @@ -1,8 +0,0 @@ -[ -{rabbit, [{disk_free_limit, 5242880} - ,{vm_memory_high_watermark, 0.8} - ,{loopback_users, []} - ]}, -{rabbitmq_management, [{rates_mode, none}]}, -{rabbitmq_management_agent, [{rates_mode, none}]} -]. diff --git a/system/init.d/kazoo-bigcouch.redhat b/system/init.d/kazoo-bigcouch.redhat deleted file mode 100755 index 933601a..0000000 --- a/system/init.d/kazoo-bigcouch.redhat +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# -# BigCouch -# -# chkconfig: 345 13 87 -# description: BigCouch is a dynamo-style distributed database based on Apache CouchDB. -# processname: bigcouch -# pidfile: /var/run/bigcouch/kazoo-bigcouch.pid -# - -RETVAL=0 -LOCK_FILE=${LOCK_FILE:-/var/lock/subsys/kazoo-bigcouch} - -. /etc/init.d/functions - -start() { - echo -n $"Starting BigCouch: " - /usr/sbin/kazoo-bigcouch prepare >/dev/null 2>&1 - daemon "/usr/sbin/kazoo-bigcouch background >/dev/null" - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - touch ${LOCK_FILE} - success $"OK" - echo - else - failure $"Bigcouch is already running or failed to start!" - echo - fi -} - -stop() { - echo -n $"Stopping BigCouch: " - /usr/sbin/kazoo-bigcouch stop >/dev/null 2>&1 - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - rm -f ${LOCK_FILE} ${pidfile} - success $"OK" - echo - else - failure $"Bigcouch is still running!" - echo - fi -} - -status() { - /usr/sbin/kazoo-bigcouch status - RETVAL=$? -} - -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status - ;; - restart|reload) - restart - ;; - condrestart) - [ ! -e ${LOCK_FILE} ] && restart - ;; - *) - echo $"Usage: $0 (start|stop|restart|status)" - RETVAL=1 -esac - -exit ${RETVAL} diff --git a/system/init.d/kazoo-freeswitch.redhat b/system/init.d/kazoo-freeswitch.redhat deleted file mode 100755 index dc76f96..0000000 --- a/system/init.d/kazoo-freeswitch.redhat +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -# -# /etc/rc.d/init.d/freeswitch -# -# The FreeSWITCH Open Source Voice Platform -# -# chkconfig: 345 89 14 -# description: Starts and stops the freeswitch server daemon -# processname: freeswitch -# config: /etc/kazoo/freeswitch/freeswitch.xml -# pidfile: /var/run/freeswitch/kazoo-freeswitch.pid -# - -RETVAL=0 -LOCK_FILE=/var/lock/subsys/kazoo-freeswitch - -. /etc/init.d/functions - -start() { - echo -n "Starting FreeSWITCH: " - /usr/sbin/kazoo-freeswitch prepare >/dev/null 2>&1 - daemon "/usr/sbin/kazoo-freeswitch background >/dev/null" - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - touch ${LOCK_FILE} - success $"OK" - echo - else - failure $"FreeSWITCH is already running or failed to start!" - echo - fi -} - -stop() { - echo -n "Shutting down FreeSWITCH: " - /usr/sbin/kazoo-freeswitch stop >/dev/null 2>&1 - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - rm -f ${LOCK_FILE} ${pidfile} - success $"OK" - echo - else - failure $"FreeSWITCH is still running!" - echo - fi -} - -status() { - /usr/sbin/kazoo-freeswitch status - RETVAL=$? -} - -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status - ;; - restart|reload) - restart - ;; - condrestart) - [ ! -e ${LOCK_FILE} ] && restart - ;; - *) - echo $"Usage: $0 (start|stop|restart|status)" - RETVAL=1 -esac - -exit ${RETVAL} diff --git a/system/init.d/kazoo-haproxy.redhat b/system/init.d/kazoo-haproxy.redhat deleted file mode 100755 index 0123996..0000000 --- a/system/init.d/kazoo-haproxy.redhat +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh -# -# haproxy -# -# chkconfig: - 85 15 -# description: HAProxy is a free, very fast and reliable solution \ -# offering high availability, load balancing, and \ -# proxying for TCP and HTTP-based applications -# processname: haproxy -# config: /etc/kazoo/haproxy/haproxy.cfg -# pidfile: /var/run/haproxy/kazoo-haproxy.pid - -RETVAL=0 -LOCK_FILE=/var/lock/subsys/kazoo-haproxy - -. /etc/rc.d/init.d/functions - -start() { - echo -n $"Starting HAProxy: " - /usr/sbin/kazoo-haproxy prepare >/dev/null 2>&1 - daemon "/usr/sbin/kazoo-haproxy background >/dev/null" - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - touch ${LOCK_FILE} - success $"OK" - echo - else - failure $"HAProxy is already running or failed to start!" - echo - fi -} - -stop() { - echo -n $"Stopping HAProxy: " - /usr/sbin/kazoo-haproxy stop >/dev/null 2>&1 - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - rm -f ${LOCK_FILE} ${pidfile} - success $"OK" - echo - else - failure $"HAProxy is still running!" - echo - fi -} - -status() { - /usr/sbin/kazoo-haproxy status - RETVAL=$? -} - -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status - ;; - check) - /usr/sbin/kazoo-haproxy check - ;; - restart|reload) - restart - ;; - condrestart) - [ ! -e ${LOCK_FILE} ] && restart - ;; - *) - echo $"Usage: $0 (start|stop|restart|status|check)" - RETVAL=1 -esac - -exit ${RETVAL} diff --git a/system/init.d/kazoo-kamailio.redhat b/system/init.d/kazoo-kamailio.redhat deleted file mode 100755 index c01e7f1..0000000 --- a/system/init.d/kazoo-kamailio.redhat +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -# -# Startup script for Kamailio -# -# chkconfig: 345 85 15 -# description: Kamailio is a fast, reliable and flexible SIP Server. -# processname: kamailio -# pidfile: /var/run/kamailio/kazoo-kamailio.pid -# config: /etc/kazoo/kamailio/kamailio.cfg -# - -RETVAL=0 -LOCK_FILE=/var/lock/subsys/kazoo-kamailio - -. /etc/rc.d/init.d/functions - -start() { - echo -n $"Starting Kamailio: " - /usr/sbin/kazoo-kamailio prepare >/dev/null 2>&1 - daemon "/usr/sbin/kazoo-kamailio background >/dev/null" - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - touch ${LOCK_FILE} - success $"OK" - echo - else - failure $"Kamailio is already running or failed to start!" - echo - fi -} - -stop() { - echo -n $"Stopping Kamailio: " - /usr/sbin/kazoo-kamailio stop >/dev/null 2>&1 - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - rm -f ${LOCK_FILE} ${pidfile} - success $"OK" - echo - else - failure $"Kamailio is still running!" - echo - fi -} - -status() { - /usr/sbin/kazoo-kamailio status - RETVAL=$? -} - -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status - ;; - check) - /usr/sbin/kazoo-kamailio check - ;; - restart|reload) - restart - ;; - condrestart) - [ ! -e ${LOCK_FILE} ] && restart - ;; - *) - echo $"Usage: $0 (start|stop|restart|status|check)" - RETVAL=1 -esac - -exit ${RETVAL} diff --git a/system/init.d/kazoo-rabbitmq.redhat b/system/init.d/kazoo-rabbitmq.redhat deleted file mode 100755 index 0eddc5a..0000000 --- a/system/init.d/kazoo-rabbitmq.redhat +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh -# -# rabbitmq-server RabbitMQ broker -# -# chkconfig: - 80 05 -# description: Enable AMQP service provided by RabbitMQ -# -# Provides: rabbitmq-server -# Required-Start: $remote_fs $network -# Required-Stop: $remote_fs $network -# Description: RabbitMQ broker -# Short-Description: Enable AMQP service provided by RabbitMQ broker - -RETVAL=0 -LOCK_FILE=${LOCK_FILE:-/var/lock/subsys/kazoo-rabbitmq} - -. /etc/init.d/functions - -start() { - echo -n $"Starting RabbitMQ: " - /usr/sbin/kazoo-rabbitmq prepare >/dev/null 2>&1 - daemon "/usr/sbin/kazoo-rabbitmq background >/dev/null" - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - touch ${LOCK_FILE} - success $"OK" - echo - else - failure $"RabbitMQ is already running or failed to start!" - echo - fi -} - -stop() { - echo -n $"Stopping RabbitMQ: " - /usr/sbin/kazoo-rabbitmq stop >/dev/null 2>&1 - RETVAL=$? - if [ ${RETVAL} -eq 0 ]; then - rm -f ${LOCK_FILE} ${pidfile} - success $"OK" - echo - else - failure $"RabbitMQ is still running!" - echo - fi -} - -status() { - /usr/sbin/kazoo-rabbitmq status - RETVAL=$? -} - -restart() { - stop - start -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status - ;; - restart|reload) - restart - ;; - condrestart) - [ ! -e ${LOCK_FILE} ] && restart - ;; - *) - echo $"Usage: $0 (start|stop|restart|status)" - RETVAL=1 -esac - -exit ${RETVAL} diff --git a/system/logrotate.d/bigcouch.conf b/system/logrotate.d/bigcouch.conf deleted file mode 100644 index 25527df..0000000 --- a/system/logrotate.d/bigcouch.conf +++ /dev/null @@ -1,15 +0,0 @@ -/var/log/bigcouch/bigcouch.log { - daily - missingok - notifempty - rotate 31 - maxage 5 - copytruncate - compress - delaycompress - sharedscripts - postrotate - /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true - /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true - endscript -} diff --git a/system/logrotate.d/freeswitch.conf b/system/logrotate.d/freeswitch.conf deleted file mode 100644 index 69d1010..0000000 --- a/system/logrotate.d/freeswitch.conf +++ /dev/null @@ -1,11 +0,0 @@ -/var/log/freeswitch/*.log { - daily - rotate 31 - nocreate - compress - delaycompress - sharedscripts - postrotate - /bin/kill -HUP `cat /var/run/freeswitch/freeswitch.pid 2> /dev/null` 2> /dev/null || true - endscript -} diff --git a/system/logrotate.d/haproxy.conf b/system/logrotate.d/haproxy.conf deleted file mode 100644 index 9f40020..0000000 --- a/system/logrotate.d/haproxy.conf +++ /dev/null @@ -1,12 +0,0 @@ -/var/log/haproxy/haproxy.log { - daily - rotate 31 - missingok - notifempty - compress - sharedscripts - postrotate - /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true - /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true - endscript -} diff --git a/system/logrotate.d/kamailio.conf b/system/logrotate.d/kamailio.conf deleted file mode 100644 index 20a5f3c..0000000 --- a/system/logrotate.d/kamailio.conf +++ /dev/null @@ -1,17 +0,0 @@ -/var/log/kamailio/kamailio.log { - daily - size 500M - nodateext - missingok - notifempty - rotate 31 - maxage 5 - create - compress - delaycompress - sharedscripts - postrotate - /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true - /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true - endscript -} diff --git a/system/logrotate.d/rabbitmq.conf b/system/logrotate.d/rabbitmq.conf deleted file mode 100644 index e1f1acc..0000000 --- a/system/logrotate.d/rabbitmq.conf +++ /dev/null @@ -1,12 +0,0 @@ -/var/log/rabbitmq/*.log { - daily - missingok - rotate 31 - compress - delaycompress - notifempty - sharedscripts - postrotate - /usr/sbin/rabbitmqctl rotate_logs .`date +%Y%m%d` > /dev/null - endscript -} diff --git a/system/rsyslog.d/1-default-config-override.conf b/system/rsyslog.d/1-default-config-override.conf deleted file mode 100644 index 17a2439..0000000 --- a/system/rsyslog.d/1-default-config-override.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Provides UDP syslog reception -$ModLoad imudp -$UDPServerRun 514 diff --git a/system/rsyslog.d/10-kamailio.conf b/system/rsyslog.d/10-kamailio.conf deleted file mode 100644 index 30e991b..0000000 --- a/system/rsyslog.d/10-kamailio.conf +++ /dev/null @@ -1,2 +0,0 @@ -if $programname == 'kamailio' then /var/log/kamailio/kamailio.log -& ~ diff --git a/system/rsyslog.d/20-haproxy.conf b/system/rsyslog.d/20-haproxy.conf deleted file mode 100644 index 3753283..0000000 --- a/system/rsyslog.d/20-haproxy.conf +++ /dev/null @@ -1,2 +0,0 @@ -if $programname == 'haproxy' then /var/log/haproxy/haproxy.log -& ~ diff --git a/system/rsyslog.d/5-rate-limits.conf b/system/rsyslog.d/5-rate-limits.conf deleted file mode 100644 index ef7421f..0000000 --- a/system/rsyslog.d/5-rate-limits.conf +++ /dev/null @@ -1,2 +0,0 @@ -$SystemLogRateLimitInterval 0 -$SystemLogRateLimitBurst 0 diff --git a/system/sbin/kazoo-bigcouch b/system/sbin/kazoo-bigcouch deleted file mode 100755 index ba21f12..0000000 --- a/system/sbin/kazoo-bigcouch +++ /dev/null @@ -1,120 +0,0 @@ -#!/bin/bash - -if [ -f /etc/default/bigcouch ]; then - . /etc/default/bigcouch -fi - -if [ -f /etc/sysconfig/bigcouch ]; then - . /etc/sysconfig/bigcouch -fi - -RETVAL=1 -USER=${BIGCOUCH_USER:-bigcouch} -BIN_FILE=${BIGCOUCH_BIN:-/opt/bigcouch/bin/bigcouch} -PID_FILE=${BIGCOUCH_PID:-/var/run/bigcouch/kazoo-bigcouch.pid} -export HOME=${BIGCOUCH_HOME:-/srv} - -# Detect core count -CORES=`grep -E "^processor" /proc/cpuinfo |wc -l` -if [ "${CORES}" = "1" ]; then - BEAM=beam -else - BEAM=beam.smp -fi - -prepare() { - mkdir -p ${HOME} - chown -R ${USER} ${HOME} - mkdir -p /var/log/bigcouch - chown -R ${USER} /var/log/bigcouch - mkdir -p /var/run/bigcouch - chown -R ${USER} /var/run/bigcouch - if [ -e ${PID_FILE} ]; then - rm -rf ${PID_FILE} - fi - RETVAL=$? -} - -start() { - cd ${HOME} - - set -- ${BIN_FILE} "$@" - if [ "$(whoami)" == "${USER}" ]; then - exec "$@" - else - runuser -s /bin/bash ${USER} -c "$*" - fi - RETVAL=$? - - if [ ${RETVAL} -ne 0 ]; then - echo "Failed to start BigCouch!" - RETVAL=1 - fi -} - -stop() { - for i in `pidof ${BEAM}`; do - if cat /proc/$i/cmdline | grep -Eq "name[^\-]+bigcouch"; then - kill $i - RETVAL=$? - fi - done -} - -restart() { - stop - start -} - -status() { - for i in `pidof ${BEAM}`; do - if cat /proc/$i/cmdline | grep -Eq "name[^\-]+bigcouch"; then - echo "BigCouch (pid $i) is running..." - if which curl &>/dev/null; then - curl localhost:5984/_membership - fi - RETVAL=0 - fi - done - if [ ${RETVAL} -eq 1 ]; then - echo "BigCouch is not running!" - fi -} - -pid() { - for i in `pidof ${BEAM}`; do - if cat /proc/$i/cmdline | grep -Eq "name[^\-]+bigcouch"; then - echo $i - RETVAL=0 - fi - done - if [ ${RETVAL} -eq 1 ]; then - echo "BigCouch is not running!" - fi -} - -case "$1" in - prepare) - prepare - ;; - background) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - status) - status - ;; - pid) - pid - ;; - *) - echo $"Usage: $0 (prepare|background|stop|restart|status|pid)" -esac - -exit ${RETVAL} - diff --git a/system/sbin/kazoo-freeswitch b/system/sbin/kazoo-freeswitch deleted file mode 100755 index 6294047..0000000 --- a/system/sbin/kazoo-freeswitch +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/bash - -if [ -f /etc/default/freeswitch ]; then - . /etc/default/freeswitch -fi - -if [ -f /etc/sysconfig/freeswitch ]; then - . /etc/sysconfig/freeswitch -fi - -RETVAL=1 -USER=${FS_USER:-freeswitch} -BIN_FILE=${FS_BIN:-/usr/bin/freeswitch} -PID_FILE=${FS_PID:-/var/run/freeswitch/freeswitch.pid} -CFG_FILE=${FS_CONFIG:-/etc/kazoo/freeswitch} -export HOME=${FS_HOME:-/var/lib/kazoo-freeswitch} - -if [ -z "${FREESWITCH_ARGS}" ]; then - FREESWITCH_ARGS="-nonat -conf ${CFG_FILE} -run /var/run/freeswitch -db /var/lib/kazoo-freeswitch/db -log /var/log/freeswitch -cache /var/lib/kazoo-freeswitch/cache -sounds /usr/share/kazoo-freeswitch/sounds -storage /var/lib/kazoo-freeswitch/storage" -fi - -prepare() { - mkdir -p /var/log/freeswitch - chown -R ${USER} /var/log/freeswitch - mkdir -p /var/lib/kazoo-freeswitch/{db,cache,storage} - chown -R ${USER} /var/lib/kazoo-freeswitch - mkdir -p /usr/share/kazoo-freeswitch/sounds - chown -R ${USER} /usr/share/kazoo-freeswitch/sounds - mkdir -p /var/run/freeswitch - chown -R ${USER} /var/run/freeswitch - if [ -e ${PID_FILE} ]; then - rm -rf ${PID_FILE} - fi - RETVAL=$? -} - -start() { - cd ${HOME} - - if fs_cli -x 'status' > /dev/null 2>&1; then - echo "FreeSWITCH is already running!" - return - fi - - /usr/bin/epmd -daemon - - set -- ${BIN_FILE} ${FREESWITCH_ARGS} ${FREESWITCH_PARAMS} "$@" - if [ "$(whoami)" == "${USER}" ]; then - exec "$@" - else - runuser -s /bin/bash ${USER} -c "$*" - fi - RETVAL=$? - - if [ ${RETVAL} -ne 0 ]; then - echo "Failed to start FreeSWITCH!" - RETVAL=1 - fi -} - -stop() { - cd ${HOME} - ${BIN_FILE} -stop > /dev/null 2>&1 - killall freeswitch - RETVAL=$? -} - -status() { - fs_cli -x 'status' && fs_cli -x 'erlang status' - RETVAL=$? -} - -restart() { - stop - start -} - -pause() { - fs_cli -x 'fsctl pause' -} - -resume() { - fs_cli -x 'fsctl resume' -} - -case "$1" in - prepare) - prepare - ;; - background) - shift - start "-ncwait" $@ - ;; - start) - shift - start $@ - ;; - stop) - stop - ;; - status) - status - ;; - restart) - restart - ;; - pause) - pause - ;; - resume) - resume - ;; - *) - echo "Usage: freeswitch {prepare|start|background|stop|restart|status|pause|resume}" - ;; -esac - -exit ${RETVAL} diff --git a/system/sbin/kazoo-haproxy b/system/sbin/kazoo-haproxy deleted file mode 100755 index 41826ed..0000000 --- a/system/sbin/kazoo-haproxy +++ /dev/null @@ -1,192 +0,0 @@ -#!/bin/sh - -if [ -f /etc/default/haproxy ]; then - . /etc/default/haproxy -fi - -if [ -f /etc/sysconfig/haproxy ]; then - . /etc/sysconfig/haproxy -fi - -RETVAL=1 -USER=${HAPROXY_USER:-root} -BIN_FILE=${HAPROXY_BIN:-/usr/sbin/haproxy} -PID_FILE=${HAPROXY_PID:-/var/run/haproxy/kazoo-haproxy.pid} -CFG_FILE=${HAPROXY_CONFIG:-/etc/kazoo/haproxy/haproxy.cfg} -SOCKET=${HAPROXY_SOCKET:-/var/run/haproxy/haproxy.sock} -export HOME=${HAPROXY_HOME:-/var/lib/haproxy} - -check_socket() { - if [ -S "$SOCKET" ]; then - return - fi - SOCKET=/tmp/haproxy.sock -} - -prepare() { - mkdir -p /var/log/haproxy - chown -R ${USER} /var/log/haproxy - mkdir -p /var/run/haproxy - chown -R ${USER} /var/run/haproxy - if [ -e ${PID_FILE} ]; then - rm -rf ${PID_FILE} - fi - RETVAL=$? -} - -start() { - cd ${HOME} - - check_config - if [ ${RETVAL} -ne 0 ]; then - return - fi - - if echo "show stat" | nc -U $SOCKET > /dev/null 2>&1; then - echo "HAProxy is already running!" - return - fi - - set -- ${BIN_FILE} -f ${CFG_FILE} -p ${PID_FILE} ${OPTIONS} "$@" - if [ "$(whoami)" == "${USER}" ]; then - exec "$@" - else - runuser -s /bin/bash ${USER} -c "$*" - fi - RETVAL=$? - - if [ ${RETVAL} -ne 0 ]; then - echo "Failed to start HAProxy!" - RETVAL=1 - fi -} - -stop() { - kill $(cat ${PID_FILE}) - RETVAL=$? -} - -restart() { - check_config - if [ ${RETVAL} -ne 0 ]; then - return - fi - - stop - start -} - -status() { - local STATS="pxname svname qcur qmax scur smax slim stot bin bout dreq dresp ereq econ eresp wretr wredis status weight act bck chkfail chdown lastchg downtime qlimit pid iid sid throttle lbtot tracked type rate rate_lim rate_max check_status check_code check_duration hrsp_1xx hrsp_2xx hrsp_3xx hrsp_4xx hrsp_5xx hrsp_other hanafail req_rate req_rate_max req_tot cli_abrt srv_abrt" - local TABLE_HEADER="Host|25 Backend|15 Status Active Rate 1xx 2xx 3xx 4xx 5xx Ping" - local TABLE_VARS="svname|25 pxname|15 status scur req_rate hrsp_1xx hrsp_2xx hrsp_3xx hrsp_4xx hrsp_5xx check_duration" - if ! echo "show stat" | nc -U $SOCKET > /dev/null 2>&1; then - echo "Unable to connect to HAProxy, ensure it is running!" - return - fi - echo -n "|" - for HEADER in $TABLE_HEADER; do - if [[ "${HEADER}" =~ "|" ]]; then - NAME="${HEADER%%|*}" - SIZE=${HEADER#*|} - else - NAME="${HEADER%%|*}" - SIZE=6 - fi - printf "%-${SIZE}s |" $NAME - done - echo - echo "show stat" | nc -U $SOCKET \ - | while IFS=',' read ${STATS}; do - if [ -z "$svname" ]; then - continue - fi - if [ "$svname" == 'svname' ]; then - continue - fi - if [ "$svname" == 'BACKEND' ]; then - continue - fi - if [ "$svname" == 'FRONTEND' ]; then - continue - fi - echo -n "|" - for VAR in $TABLE_VARS; do - if [[ "${VAR}" =~ "|" ]]; then - NAME="${VAR%%|*}" - SIZE=${VAR#*|} - else - NAME="${VAR%%|*}" - SIZE=6 - fi - eval VALUE=\$$NAME - if [ "${VAR}" == 'check_duration' ]; then - VALUE="${VALUE}ms" - fi - printf "%-${SIZE}s |" ${VALUE:-0} - done - echo - done - RETVAL=0 -} - -reload() { - check_config - if [ ${RETVAL} -ne 0 ]; then - return - fi - - ${BIN_FILE} -f ${CFG_FILE} -p ${PID_FILE} ${OPTIONS} -sf $(cat ${PID_FILE}) $@ - RETVAL=$? -} - -check_config() { - /usr/sbin/haproxy -c -V -f ${CFG_FILE} ${OPTIONS} - RETVAL=$? - - if [ ${RETVAL} -ne 0 ]; then - echo "ERROR: Invalid/incorrect configuration file!" - fi -} - -pid() { - cat ${PID_FILE} - RETVAL=$? -} - -check_socket -case "$1" in - prepare) - prepare - ;; - background) - shift - start "-D $@" - ;; - start) - shift - start "$@" - ;; - stop) - stop - ;; - restart) - restart - ;; - status) - status - ;; - reload) - reload - ;; - check) - check_config - ;; - pid) - pid - ;; - *) - echo $"Usage: $0 {prepare|start|background|stop|restart|status|reload|check|pid}" -esac - -exit ${RETVAL} diff --git a/system/sbin/kazoo-kamailio b/system/sbin/kazoo-kamailio deleted file mode 100755 index cd098b3..0000000 --- a/system/sbin/kazoo-kamailio +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/bash - -if [ -f /etc/default/kamailio ]; then - . /etc/default/kamailio -fi - -if [ -f /etc/sysconfig/kamailio ]; then - . /etc/sysconfig/kamailio -fi - -RETVAL=1 -USER=${KAMAILIO_USER:-kamailio} -GROUP=${KAMAILIO_GROUP:-kamailio} -BIN_FILE=${KAMAILIO_BIN:-/usr/sbin/kamailio} -PID_FILE=${KAMAILIO_PID:-/var/run/kamailio/kazoo-kamailio.pid} -CFG_FILE=${KAMAILIO_CONFIG:-/etc/kazoo/kamailio/kamailio.cfg} -export HOME=${KAMAILIO_HOME:-/var/run/kamailio} - -SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`)) -PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`)) -[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64 -[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=8 - -if test "$DUMP_CORE" = "yes" ; then - ulimit -c unlimited -fi - -prepare() { - mkdir -p /var/run/kamailio - chown -R ${USER} /var/run/kamailio - if [ -e ${PID_FILE} ]; then - rm -rf ${PID_FILE} - fi - if [ ! -f /etc/kazoo/kamailio/db/kazoo.db ]; then - KazooDB -init /etc/kazoo/kamailio/kazoodb.sql - fi - chown -R ${USER} /etc/kazoo/kamailio/db - RETVAL=$? -} - -start() { - cd ${HOME} - - check_config - check_fork - - if [ "$(whoami)" == "${USER}" ]; then - set -- ${BIN_FILE} -f ${CFG_FILE} -m ${SHM_MEMORY} -M ${PKG_MEMORY} ${EXTRA_OPTIONS} "$@" - exec "$@" - else - set -- ${BIN_FILE} -f ${CFG_FILE} -m ${SHM_MEMORY} -M ${PKG_MEMORY} -u ${USER} -g ${GROUP} ${EXTRA_OPTIONS} "$@" - runuser -s /bin/bash ${USER} -c "$*" - fi - RETVAL=$? - - if [ ${RETVAL} -ne 0 ]; then - echo "Failed to start Kamailio!" - RETVAL=1 - fi -} - -stop() { - killall ${BIN_FILE} - RETVAL=$? -} - -restart() { - stop - start -} - -reset-restart() { - cd /etc/kazoo/kamailio/dbtext/ - stop - - head -n1 active_watchers > active_watchers.tmp - mv -f active_watchers.tmp active_watchers - - head -n1 watchers > watchers.tmp - mv -f watchers.tmp watchers - - head -n1 presentity > presentity.tmp - mv -f presentity.tmp presentity - - chown kamailio:daemon * - - start -} - -status() { - kamcmd dispatcher.list - RETVAL=$? -} - -# Do not start kamailio if fork=no is set in the config file -# otherwise the boot process will just stop -check_fork () -{ - if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFG_FILE; then - echo "WARNING: fork=no specified in config file" - exit 1 - fi -} - -check_config () -{ - local ERRORS=$($BIN_FILE -c -f ${CFG_FILE} 2>&1 > /dev/null) - RETVAL=$? - - if [ ${RETVAL} -ne 0 ]; then - echo "ERROR: Invalid configuration file ${CFG_FILE}!" - echo -e "\n${ERRORS}\n" - else - echo "No errors found in ${CFG_FILE}" - fi -} - -case "$1" in - prepare) - prepare - ;; - background) - shift - start $@ - ;; - start) - shift - start -DD $@ - ;; - stop) - stop - ;; - restart) - restart - ;; - reset-restart) - reset-restart - ;; - status) - status - ;; - check) - check_config - ;; - *) - echo $"Usage: $0 {prepare|start|background|stop|restart|reset-restart|status|check|pid}" -esac - -exit ${RETVAL} diff --git a/system/sbin/kazoo-rabbitmq b/system/sbin/kazoo-rabbitmq deleted file mode 100755 index 2bba6d0..0000000 --- a/system/sbin/kazoo-rabbitmq +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/bash -e - -if [ -f /etc/default/rabbitmq ]; then - . /etc/default/rabbitmq -fi - -RETVAL=1 -USER=${RABBITMQ_USER-rabbitmq} -BIN_FILE=${RABBITMQ_BIN:-/usr/lib/rabbitmq/bin/rabbitmq-server} -PID_FILE=${RABBITMQ_PID:-/var/run/rabbitmq/kazoo-rabbitmq.pid} -CFG_FILE=${RABBITMQ_ENV:-/etc/kazoo/rabbitmq/rabbitmq-env.conf} - -while read LINE; do - export RABBITMQ_$LINE -done < ${CFG_FILE} - -if [ -f /etc/sysconfig/rabbitmq ]; then - . /etc/sysconfig/rabbitmq -fi - -export HOME=${RABBITMQ_HOME-/var/lib/rabbitmq} -export RABBITMQ_CONFIG_FILE=/etc/kazoo/rabbitmq/rabbitmq -export RABBITMQ_ENABLED_PLUGINS_FILE=/etc/kazoo/rabbitmq/enabled_plugins -export RABBITMQ_NODENAME=kazoo-rabbitmq - -prepare() { - rm -rf /var/lib/rabbitmq/mnesia/kazoo-rabbit* - mkdir -p ${HOME} - chown -R ${USER} ${HOME} - mkdir -p /var/log/rabbitmq - chown -R ${USER} /var/log/rabbitmq - mkdir -p /var/run/rabbitmq - chown -R ${USER} /var/run/rabbitmq - if [ -e ${PID_FILE} ]; then - rm -rf ${PID_FILE} - fi - RETVAL=$? -} - -start() { - cd ${HOME} - - if /usr/lib/rabbitmq/bin/rabbitmqctl status > /dev/null 2>&1; then - echo "RabbitMQ is already running!" - return - fi - - set -- ${BIN_FILE} "$@" - if [ "$(whoami)" == "${USER}" ]; then - exec "$@" - else - runuser -s /bin/bash ${USER} -c "$*" - fi - RETVAL=$? - - if [ ${RETVAL} -ne 0 ]; then - echo "Failed to start RabbitMQ!" - RETVAL=1 - fi -} - -case "$1" in - prepare) - prepare - ;; - background) - shift - start "-detached" $@ - ;; - start) - shift - start "$@" - ;; - *) - exec /usr/lib/rabbitmq/bin/rabbitmqctl $@ - RETVAL=$? - ;; -esac - -exit ${RETVAL} diff --git a/system/security/limits.d/bigcouch.limits.conf b/system/security/limits.d/bigcouch.limits.conf deleted file mode 100644 index ea4d0c9..0000000 --- a/system/security/limits.d/bigcouch.limits.conf +++ /dev/null @@ -1,17 +0,0 @@ -bigcouch soft core unlimited -bigcouch soft data unlimited -bigcouch soft fsize unlimited -bigcouch soft memlock unlimited -bigcouch soft nofile 999999 -bigcouch soft rss unlimited -bigcouch hard stack 240 -bigcouch soft cpu unlimited -bigcouch soft nproc unlimited -bigcouch soft as unlimited -bigcouch soft priority -11 -bigcouch soft locks unlimited -bigcouch soft sigpending unlimited -bigcouch soft msgqueue unlimited -bigcouch soft nice -11 -bigcouch soft nofile 65536 -bigcouch hard nofile 65536 diff --git a/system/security/limits.d/freeswitch.limits.conf b/system/security/limits.d/freeswitch.limits.conf deleted file mode 100644 index 5b5095c..0000000 --- a/system/security/limits.d/freeswitch.limits.conf +++ /dev/null @@ -1,15 +0,0 @@ -freeswitch soft core unlimited -freeswitch soft data unlimited -freeswitch soft fsize unlimited -freeswitch soft memlock unlimited -freeswitch soft nofile 999999 -freeswitch soft rss unlimited -freeswitch hard stack 240 -freeswitch soft cpu unlimited -freeswitch soft nproc unlimited -freeswitch soft as unlimited -freeswitch soft priority -11 -freeswitch soft locks unlimited -freeswitch soft sigpending unlimited -freeswitch soft msgqueue unlimited -freeswitch soft nice -11 diff --git a/system/security/limits.d/haproxy.limits.conf b/system/security/limits.d/haproxy.limits.conf deleted file mode 100644 index 898095a..0000000 --- a/system/security/limits.d/haproxy.limits.conf +++ /dev/null @@ -1,17 +0,0 @@ -haproxy soft core unlimited -haproxy soft data unlimited -haproxy soft fsize unlimited -haproxy soft memlock unlimited -haproxy soft nofile 999999 -haproxy soft rss unlimited -haproxy hard stack 240 -haproxy soft cpu unlimited -haproxy soft nproc unlimited -haproxy soft as unlimited -haproxy soft priority -11 -haproxy soft locks unlimited -haproxy soft sigpending unlimited -haproxy soft msgqueue unlimited -haproxy soft nice -11 -haproxy soft nofile 65536 -haproxy hard nofile 65536 diff --git a/system/security/limits.d/kamailio.limits.conf b/system/security/limits.d/kamailio.limits.conf deleted file mode 100644 index 93f4664..0000000 --- a/system/security/limits.d/kamailio.limits.conf +++ /dev/null @@ -1,17 +0,0 @@ -kamailio soft core unlimited -kamailio soft data unlimited -kamailio soft fsize unlimited -kamailio soft memlock unlimited -kamailio soft nofile 999999 -kamailio soft rss unlimited -kamailio hard stack 240 -kamailio soft cpu unlimited -kamailio soft nproc unlimited -kamailio soft as unlimited -kamailio soft priority -11 -kamailio soft locks unlimited -kamailio soft sigpending unlimited -kamailio soft msgqueue unlimited -kamailio soft nice -11 -kamailio soft nofile 65536 -kamailio hard nofile 65536 diff --git a/system/security/limits.d/rabbitmq.limits.conf b/system/security/limits.d/rabbitmq.limits.conf deleted file mode 100644 index 50ee717..0000000 --- a/system/security/limits.d/rabbitmq.limits.conf +++ /dev/null @@ -1,17 +0,0 @@ -rabbitmq soft core unlimited -rabbitmq soft data unlimited -rabbitmq soft fsize unlimited -rabbitmq soft memlock unlimited -rabbitmq soft nofile 999999 -rabbitmq soft rss unlimited -rabbitmq hard stack 240 -rabbitmq soft cpu unlimited -rabbitmq soft nproc unlimited -rabbitmq soft as unlimited -rabbitmq soft priority -11 -rabbitmq soft locks unlimited -rabbitmq soft sigpending unlimited -rabbitmq soft msgqueue unlimited -rabbitmq soft nice -11 -rabbitmq soft nofile 65536 -rabbitmq hard nofile 65536 diff --git a/system/systemd/kazoo-bigcouch.service b/system/systemd/kazoo-bigcouch.service deleted file mode 100644 index b75b5dc..0000000 --- a/system/systemd/kazoo-bigcouch.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=BigCouch DB Configured for Kazoo -After=syslog.target network.target - -[Service] -Type=forking -User=bigcouch -Group=daemon -PermissionsStartOnly=true -LimitNOFILE=65536 -LimitCORE=infinity -ExecStartPre=/usr/sbin/kazoo-bigcouch prepare -ExecStart=/usr/sbin/kazoo-bigcouch background -ExecStop=/usr/sbin/kazoo-bigcouch stop -Restart=on-abort - -[Install] -WantedBy=multi-user.target diff --git a/system/systemd/kazoo-freeswitch-logrotate.service b/system/systemd/kazoo-freeswitch-logrotate.service deleted file mode 100644 index c561dc4..0000000 --- a/system/systemd/kazoo-freeswitch-logrotate.service +++ /dev/null @@ -1,6 +0,0 @@ -[Unit] -Description=Run logrotate for freeswitch - -[Service] -Type=oneshot -ExecStart=/usr/sbin/logrotate --force /etc/logrotate.d/freeswitch.conf diff --git a/system/systemd/kazoo-freeswitch-logrotate.timer b/system/systemd/kazoo-freeswitch-logrotate.timer deleted file mode 100644 index 6492690..0000000 --- a/system/systemd/kazoo-freeswitch-logrotate.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Rotate the kazoo-freeswitch logs every 15 minutes - -[Timer] -OnCalendar=*:0/15 -Unit=kazoo-freeswitch-logrotate.service - -[Install] -WantedBy=timers.target diff --git a/system/systemd/kazoo-freeswitch.service b/system/systemd/kazoo-freeswitch.service deleted file mode 100644 index ec33140..0000000 --- a/system/systemd/kazoo-freeswitch.service +++ /dev/null @@ -1,21 +0,0 @@ -[Unit] -Description=FreeSWITCH Configured for Kazoo -After=syslog.target network-online.target - -[Service] -User=freeswitch -Group=daemon -PermissionsStartOnly=true -LimitNOFILE=65536 -LimitCORE=infinity -# RuntimeDirectory is not yet supported in CentOS 7. A workaround is to use /etc/tmpfiles.d/freeswitch.conf -# RuntimeDirectory=/run/freeswitch -# RuntimeDirectoryMode=0750 -ExecStartPre=/usr/sbin/kazoo-freeswitch prepare -ExecStart=/usr/sbin/kazoo-freeswitch start -nc -nf -ExecReload=/usr/bin/kill -HUP $MAINPID -Restart=on-abort -PIDFile=/var/run/freeswitch/freeswitch.pid - -[Install] -WantedBy=multi-user.target diff --git a/system/systemd/kazoo-haproxy.service b/system/systemd/kazoo-haproxy.service deleted file mode 100644 index 8e80911..0000000 --- a/system/systemd/kazoo-haproxy.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=HAProxy Load Balancer Configured for Kazoo -After=syslog.target network.target - -[Service] -User=root -Group=daemon -PermissionsStartOnly=true -LimitNOFILE=65536 -PIDFile=/var/run/haproxy/kazoo-haproxy.pid -Environment=HAPROXY_BIN=/usr/sbin/haproxy-systemd-wrapper -ExecStartPre=/usr/sbin/kazoo-haproxy prepare -ExecStart=/usr/sbin/kazoo-haproxy start -ExecReload=/bin/kill -USR2 $MAINPID -ExecStop=/usr/sbin/kazoo-haproxy stop -Restart=on-abort - -[Install] -WantedBy=multi-user.target diff --git a/system/systemd/kazoo-kamailio.service b/system/systemd/kazoo-kamailio.service deleted file mode 100644 index 8a73edb..0000000 --- a/system/systemd/kazoo-kamailio.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Kamailio (OpenSER) - the Open Source SIP Server Configured for Kazoo -After=syslog.target network-online.target - -[Service] -User=kamailio -Group=daemon -PermissionsStartOnly=true -LimitNOFILE=65536 -LimitCORE=infinity -ExecStartPre=/usr/sbin/kazoo-kamailio prepare -ExecStart=/usr/sbin/kazoo-kamailio start -ExecStop=/usr/sbin/kazoo-kamailio stop -Restart=on-abort - -[Install] -WantedBy=multi-user.target diff --git a/system/systemd/kazoo-rabbitmq.service b/system/systemd/kazoo-rabbitmq.service deleted file mode 100644 index bbf66fa..0000000 --- a/system/systemd/kazoo-rabbitmq.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=RabbitMQ Broker Configured for Kazoo -After=syslog.target network-online.target - -[Service] -Type=notify -User=rabbitmq -Group=daemon -PermissionsStartOnly=true -LimitNOFILE=65536 -LimitCORE=infinity -ExecStartPre=/usr/sbin/kazoo-rabbitmq prepare -ExecStart=/usr/sbin/kazoo-rabbitmq start -ExecStop=/usr/sbin/kazoo-rabbitmq stop -Restart=on-abort - -[Install] -WantedBy=multi-user.target