From e27b0a4a7ee9af2eae9da1a48e59ec88f8e7e1f9 Mon Sep 17 00:00:00 2001
From: Chris Rienzo <chris.rienzo@grasshopper.com>
Date: Mon, 9 Dec 2013 19:35:59 -0500
Subject: [PATCH] build: updated mod_rayo config, fixed RPM packaging in
 master, added mod_rayo and mod_ssml

Conflicts:

	freeswitch.spec
---
 .../autoload_configs/distributor.conf.xml     | 10 ----
 conf/rayo/autoload_configs/hash.conf.xml      |  6 ---
 conf/rayo/autoload_configs/lua.conf.xml       | 30 ------------
 conf/rayo/autoload_configs/memcache.conf.xml  |  6 ---
 conf/rayo/autoload_configs/modules.conf.xml   |  7 +--
 freeswitch.spec                               | 48 ++++++++++++++++++-
 6 files changed, 48 insertions(+), 59 deletions(-)
 delete mode 100644 conf/rayo/autoload_configs/distributor.conf.xml
 delete mode 100644 conf/rayo/autoload_configs/hash.conf.xml
 delete mode 100644 conf/rayo/autoload_configs/lua.conf.xml
 delete mode 100644 conf/rayo/autoload_configs/memcache.conf.xml

diff --git a/conf/rayo/autoload_configs/distributor.conf.xml b/conf/rayo/autoload_configs/distributor.conf.xml
deleted file mode 100644
index a03b1ee810..0000000000
--- a/conf/rayo/autoload_configs/distributor.conf.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<configuration name="distributor.conf" description="Distributor Configuration">
-  <lists>
-    <!-- every 10 calls to test you will get foo1 once and foo2 9 times...yes NINE TIMES! -->
-    <!-- this is not the same as 100 with 10 and 90 that would do foo1 10 times in a row then foo2 90 times in a row -->
-    <list name="test" total-weight="10">
-      <node name="foo1" weight="1"/>
-      <node name="foo2" weight="9"/>
-    </list>
-  </lists>
-</configuration>
diff --git a/conf/rayo/autoload_configs/hash.conf.xml b/conf/rayo/autoload_configs/hash.conf.xml
deleted file mode 100644
index 95b7928775..0000000000
--- a/conf/rayo/autoload_configs/hash.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<configuration name="hash.conf" description="Hash Configuration">
-  <remotes>
-	<!-- List of hosts from where to pull usage data -->
-	<!-- <remote name="Test1" host="10.0.0.10" port="8021" password="ClueCon" interval="1000" /> -->
-  </remotes>
-</configuration>
diff --git a/conf/rayo/autoload_configs/lua.conf.xml b/conf/rayo/autoload_configs/lua.conf.xml
deleted file mode 100644
index 1eb594f0b5..0000000000
--- a/conf/rayo/autoload_configs/lua.conf.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<configuration name="lua.conf" description="LUA Configuration">
-  <settings>
-
-    <!-- 
-    Specify local directories that will be searched for LUA modules
-    These entries will be pre-pended to the LUA_CPATH environment variable
-    -->
-    <!-- <param name="module-directory" value="/usr/lib/lua/5.1/?.so"/> -->
-    <!-- <param name="module-directory" value="/usr/local/lib/lua/5.1/?.so"/> -->
-
-    <!-- 
-    Specify local directories that will be searched for LUA scripts
-    These entries will be pre-pended to the LUA_PATH environment variable
-    -->
-    <!-- <param name="script-directory" value="/usr/local/lua/?.lua"/> -->
-    <!-- <param name="script-directory" value="$${base_dir}/scripts/?.lua"/> -->
-
-    <!--<param name="xml-handler-script" value="/dp.lua"/>-->
-    <!--<param name="xml-handler-bindings" value="dialplan"/>-->
-
-    <!--
-	The following options identifies a lua script that is launched
-	at startup and may live forever in the background.
-	You can define multiple lines, one for each script you 
-	need to run.
-    -->
-    <!--<param name="startup-script" value="startup_script_1.lua"/>-->
-    <!--<param name="startup-script" value="startup_script_2.lua"/>-->
-  </settings>
-</configuration>
diff --git a/conf/rayo/autoload_configs/memcache.conf.xml b/conf/rayo/autoload_configs/memcache.conf.xml
deleted file mode 100644
index dc0173f986..0000000000
--- a/conf/rayo/autoload_configs/memcache.conf.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<configuration name="memcache.conf" description="memcache Configuration">
-  <settings>
-    <!-- comma sep list of servers: eg:  localhost,otherhost:port,anotherone -->
-    <param name="memcache-servers" value="localhost"/>
-  </settings>
-</configuration>
diff --git a/conf/rayo/autoload_configs/modules.conf.xml b/conf/rayo/autoload_configs/modules.conf.xml
index 604bc4e12c..e0d81b34fa 100644
--- a/conf/rayo/autoload_configs/modules.conf.xml
+++ b/conf/rayo/autoload_configs/modules.conf.xml
@@ -18,8 +18,6 @@
     <load module="mod_conference"/>
     <load module="mod_dptools"/>
     <load module="mod_expr"/>
-    <load module="mod_hash"/>
-    <!--<load module="mod_distributor"/>-->
     <load module="mod_esf"/>
     <load module="mod_fsv"/>
     <load module="mod_http_cache"/>
@@ -33,6 +31,8 @@
     <load module="mod_speex"/>
     <load module="mod_opus"/>
     <load module="mod_ilbc"/>
+    <load module="mod_h26x"/>
+    <load module="mod_vp8"/>
 
     <!-- File Format Interfaces -->
     <load module="mod_sndfile"/>
@@ -45,9 +45,6 @@
     <load module="mod_tone_stream"/>
     <load module="mod_ssml"/>
 
-    <!-- Languages -->
-    <load module="mod_lua"/>
-
     <!-- ASR /TTS -->
     <load module="mod_flite"/>
     <load module="mod_pocketsphinx"/>
diff --git a/freeswitch.spec b/freeswitch.spec
index bef6ad5c70..71f74975d3 100644
--- a/freeswitch.spec
+++ b/freeswitch.spec
@@ -22,6 +22,7 @@
 #                 Marc Olivier Chouinard
 #                 Raymond Chandler
 #                 Ken Rice <krice@freeswitch.org>
+#                 Chris Rienzo <crienzo@grasshopper.com>
 #
 # Maintainer(s): Ken Rice <krice@freeswitch.org>
 #
@@ -33,6 +34,8 @@
 %define build_py26_esl 0
 %define build_timerfd 0
 %define build_mod_esl 0
+%define build_mod_rayo 1
+%define build_mod_ssml 1
 
 %{?with_sang_tc:%define build_sng_tc 1 }
 %{?with_sang_isdn:%define build_sng_isdn 1 }
@@ -969,6 +972,17 @@ Requires:	%{name} = %{version}-%{release}
 %description event-json-cdr
 JSON CDR Logger for FreeSWITCH.
 
+%if %{build_mod_rayo}
+%package event-rayo
+Summary:        Rayo (XMPP 3PCC) server for the FreeSWITCH open source telephony platform
+Group:          System/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description event-rayo
+Rayo 3PCC for FreeSWITCH.  http://rayo.org   http://xmpp.org/extensions/xep-0327.html
+Rayo is an XMPP protocol extension for third-party control of telephone calls.
+%endif
+
 %package event-snmp
 Summary:	SNMP stats reporter for the FreeSWITCH open source telephony platform
 Group:		System/Libraries
@@ -1032,6 +1046,16 @@ Requires:	%{name} = %{version}-%{release}
 Mod Shout is a FreeSWITCH module to allow you to stream audio from MP3s or a i
 shoutcast stream.
 
+%if %{build_mod_ssml}
+%package format-ssml
+Summary:        Adds Speech Synthesis Markup Language (SSML) parser format for the FreeSWITCH open source telephony platform
+Group:          System/Libraries
+Requires:       %{name} = %{version}-%{release}
+
+%description format-ssml
+mod_ssml is a FreeSWITCH module that renders SSML into audio.  This module requires a text-to-speech module for speech synthesis.
+%endif
+
 %package format-tone-stream
 Summary:	Implements TGML Tone Generation for the FreeSWITCH open source telephony platform
 Group:		System/Libraries
@@ -1368,6 +1392,9 @@ EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_pg_csv
 			event_handlers/mod_cdr_mongodb event_handlers/mod_erlang_event event_handlers/mod_event_multicast \
 			event_handlers/mod_event_socket event_handlers/mod_json_cdr \
 			event_handlers/mod_snmp"
+%if %{build_mod_rayo}
+EVENT_HANDLERS_MODULES+=" event_handlers/mod_rayo"
+%endif
 
 #### BUILD ISSUES NET RESOLVED FOR RELEASE event_handlers/mod_event_zmq 
 ######################################################################################################################
@@ -1377,6 +1404,9 @@ EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_pg_csv
 ######################################################################################################################
 FORMATS_MODULES="formats/mod_local_stream formats/mod_native_file formats/mod_portaudio_stream \
                  formats/mod_shell_stream formats/mod_shout formats/mod_sndfile formats/mod_tone_stream"
+%if %{build_mod_ssml}
+FORMATS_MODULES+=" formats/mod_ssml"
+%endif
 
 ######################################################################################################################
 #
@@ -1696,8 +1726,7 @@ fi
 %{LIBDIR}/*.a
 %{LIBDIR}/*.la
 %{PKGCONFIGDIR}/*
-%{MODINSTDIR}/*.a
-%{MODINSTDIR}/*.la
+%{MODINSTDIR}/*.*a
 %{INCLUDEDIR}/*.h
 
 
@@ -2177,6 +2206,12 @@ fi
 %defattr(-, freeswitch, daemon)
 %{MODINSTDIR}/mod_json_cdr.so*
 
+%if %{build_mod_rayo}
+%files event-rayo 
+%defattr(-, freeswitch, daemon)
+%{MODINSTDIR}/mod_rayo.so*
+%endif
+
 %files event-snmp
 %defattr(-, freeswitch, daemon)
 %{MODINSTDIR}/mod_snmp.so*
@@ -2207,6 +2242,12 @@ fi
 %defattr(-, freeswitch, daemon)
 %{MODINSTDIR}/mod_shout.so*
 
+%if %{build_mod_ssml}
+%files format-ssml
+%defattr(-, freeswitch, daemon)
+%{MODINSTDIR}/mod_ssml.so*
+%endif
+
 %files format-tone-stream
 %defattr(-, freeswitch, daemon)
 %{MODINSTDIR}/mod_tone_stream.so*
@@ -2373,6 +2414,9 @@ fi
 #
 ######################################################################################################################
 %changelog
+* Mon Dec 09 2013 - crienzo@grasshopper.com
+- Add mod_ssml, mod_rayo
+- Fix build on master
 * Thu Sep 19 2012 - krice@freeswitch.org
 - Add support for Spanish and Portugese say language modules
 * Thu Jan 26 2012 - krice@freeswitch.org