From 820f820cb25a85643462e1ece0334823b6c9f457 Mon Sep 17 00:00:00 2001 From: lazedo Date: Tue, 27 May 2014 14:02:26 +0100 Subject: [PATCH] kazoo-sync --- debian/kazoo-configs-freeswitch.postinst | 9 ++++++++- freeswitch/chatplan/.placeholder | 1 + freeswitch/dialplan/.placeholder | 1 + freeswitch/directory/.placeholder | 1 + freeswitch/freeswitch.xml | 6 ++++++ freeswitch/scripts/kazoo-sync.sh | 21 +++++++++++++++++++++ 6 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 freeswitch/chatplan/.placeholder create mode 100644 freeswitch/dialplan/.placeholder create mode 100644 freeswitch/directory/.placeholder create mode 100644 freeswitch/scripts/kazoo-sync.sh diff --git a/debian/kazoo-configs-freeswitch.postinst b/debian/kazoo-configs-freeswitch.postinst index 10b2428..d8de31a 100644 --- a/debian/kazoo-configs-freeswitch.postinst +++ b/debian/kazoo-configs-freeswitch.postinst @@ -15,7 +15,14 @@ case "$1" in freeswitch fi for x in \ - /etc/kazoo/freeswitch; + /etc/kazoo/freeswitch \ + /etc/kazoo/freeswitch/autoload_configs \ + /etc/kazoo/freeswitch/certs \ + /etc/kazoo/freeswitch/chatplan \ + /etc/kazoo/freeswitch/dialplan \ + /etc/kazoo/freeswitch/directory \ + /etc/kazoo/freeswitch/scripts \ + /etc/kazoo/freeswitch/sip_profiles; do mkdir -p $x chown -R freeswitch:freeswitch $x diff --git a/freeswitch/chatplan/.placeholder b/freeswitch/chatplan/.placeholder new file mode 100644 index 0000000..9a8681b --- /dev/null +++ b/freeswitch/chatplan/.placeholder @@ -0,0 +1 @@ +just a placeholder \ No newline at end of file diff --git a/freeswitch/dialplan/.placeholder b/freeswitch/dialplan/.placeholder new file mode 100644 index 0000000..9a8681b --- /dev/null +++ b/freeswitch/dialplan/.placeholder @@ -0,0 +1 @@ +just a placeholder \ No newline at end of file diff --git a/freeswitch/directory/.placeholder b/freeswitch/directory/.placeholder new file mode 100644 index 0000000..9a8681b --- /dev/null +++ b/freeswitch/directory/.placeholder @@ -0,0 +1 @@ +just a placeholder \ No newline at end of file diff --git a/freeswitch/freeswitch.xml b/freeswitch/freeswitch.xml index 31350f2..7e9b851 100644 --- a/freeswitch/freeswitch.xml +++ b/freeswitch/freeswitch.xml @@ -43,9 +43,15 @@
+ +
+ +
+
+
diff --git a/freeswitch/scripts/kazoo-sync.sh b/freeswitch/scripts/kazoo-sync.sh new file mode 100644 index 0000000..22fa596 --- /dev/null +++ b/freeswitch/scripts/kazoo-sync.sh @@ -0,0 +1,21 @@ +#!/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