]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_rayo, mod_ssml, iksemel] Remove from tree 2684/head
authorAndrey Volk <andywolk@gmail.com>
Tue, 31 Dec 2024 10:43:48 +0000 (13:43 +0300)
committerAndrey Volk <andywolk@gmail.com>
Tue, 31 Dec 2024 10:43:48 +0000 (13:43 +0300)
211 files changed:
.gitignore
Freeswitch.2017.sln
LICENSE
Makefile.am
acinclude.m4
bootstrap.sh
build/modules.conf.in
build/modules.conf.most
ci.sh
conf/rayo/autoload_configs/acl.conf.xml [deleted file]
conf/rayo/autoload_configs/cdr_csv.conf.xml [deleted file]
conf/rayo/autoload_configs/conference.conf.xml [deleted file]
conf/rayo/autoload_configs/console.conf.xml [deleted file]
conf/rayo/autoload_configs/event_socket.conf.xml [deleted file]
conf/rayo/autoload_configs/http_cache.conf.xml [deleted file]
conf/rayo/autoload_configs/local_stream.conf.xml [deleted file]
conf/rayo/autoload_configs/logfile.conf.xml [deleted file]
conf/rayo/autoload_configs/modules.conf.xml [deleted file]
conf/rayo/autoload_configs/pocketsphinx.conf.xml [deleted file]
conf/rayo/autoload_configs/post_load_modules.conf.xml [deleted file]
conf/rayo/autoload_configs/pre_load_modules.conf.xml [deleted file]
conf/rayo/autoload_configs/presence_map.conf.xml [deleted file]
conf/rayo/autoload_configs/rayo.conf.xml [deleted file]
conf/rayo/autoload_configs/shout.conf.xml [deleted file]
conf/rayo/autoload_configs/sofia.conf.xml [deleted file]
conf/rayo/autoload_configs/spandsp.conf.xml [deleted file]
conf/rayo/autoload_configs/ssml.conf.xml [deleted file]
conf/rayo/autoload_configs/switch.conf.xml [deleted file]
conf/rayo/autoload_configs/timezones.conf.xml [deleted file]
conf/rayo/cacert.pem [deleted file]
conf/rayo/dialplan/public.xml [deleted file]
conf/rayo/directory/default.xml [deleted file]
conf/rayo/directory/default/usera.xml [deleted file]
conf/rayo/directory/default/userb.xml [deleted file]
conf/rayo/directory/default/userc.xml [deleted file]
conf/rayo/directory/default/userd.xml [deleted file]
conf/rayo/freeswitch.xml [deleted file]
conf/rayo/lang/de/de.xml [deleted file]
conf/rayo/lang/de/demo/demo.xml [deleted file]
conf/rayo/lang/de/vm/sounds.xml [deleted file]
conf/rayo/lang/de/vm/tts.xml [deleted file]
conf/rayo/lang/en/demo/demo-ivr.xml [deleted file]
conf/rayo/lang/en/demo/demo.xml [deleted file]
conf/rayo/lang/en/demo/funnies.xml [deleted file]
conf/rayo/lang/en/demo/new-demo-ivr.xml [deleted file]
conf/rayo/lang/en/dir/sounds.xml [deleted file]
conf/rayo/lang/en/dir/tts.xml [deleted file]
conf/rayo/lang/en/en.xml [deleted file]
conf/rayo/lang/en/ivr/sounds.xml [deleted file]
conf/rayo/lang/en/vm/sounds.xml [deleted file]
conf/rayo/lang/en/vm/tts.xml [deleted file]
conf/rayo/lang/en/vm/voicemail_ivr.xml [deleted file]
conf/rayo/lang/es/demo/demo-es-ES.xml [deleted file]
conf/rayo/lang/es/demo/demo-es-MX.xml [deleted file]
conf/rayo/lang/es/demo/demo-ivr-es-ES.xml [deleted file]
conf/rayo/lang/es/demo/demo-ivr-es-MX.xml [deleted file]
conf/rayo/lang/es/dir/sounds-es-ES.xml [deleted file]
conf/rayo/lang/es/dir/sounds-es-MX.xml [deleted file]
conf/rayo/lang/es/dir/tts-es-ES.xml [deleted file]
conf/rayo/lang/es/dir/tts-es-MX.xml [deleted file]
conf/rayo/lang/es/es_ES.xml [deleted file]
conf/rayo/lang/es/es_MX.xml [deleted file]
conf/rayo/lang/es/vm/sounds-es-ES.xml [deleted file]
conf/rayo/lang/es/vm/sounds-es-MX.xml [deleted file]
conf/rayo/lang/es/vm/tts-es-ES.xml [deleted file]
conf/rayo/lang/es/vm/tts-es-MX.xml [deleted file]
conf/rayo/lang/fr/demo/demo.xml [deleted file]
conf/rayo/lang/fr/dir/sounds.xml [deleted file]
conf/rayo/lang/fr/dir/tts.xml [deleted file]
conf/rayo/lang/fr/fr.xml [deleted file]
conf/rayo/lang/fr/vm/sounds.xml [deleted file]
conf/rayo/lang/he/demo/demo-ivr.xml [deleted file]
conf/rayo/lang/he/demo/demo.xml [deleted file]
conf/rayo/lang/he/dir/sounds.xml [deleted file]
conf/rayo/lang/he/he.xml [deleted file]
conf/rayo/lang/he/vm/sounds.xml [deleted file]
conf/rayo/lang/pt/demo/demo-ivr-pt-BR.xml [deleted file]
conf/rayo/lang/pt/demo/demo-ivr-pt-PT.xml [deleted file]
conf/rayo/lang/pt/demo/demo-pt-BR.xml [deleted file]
conf/rayo/lang/pt/demo/demo-pt-PT.xml [deleted file]
conf/rayo/lang/pt/dir/sounds-pt-BR.xml [deleted file]
conf/rayo/lang/pt/dir/sounds-pt-PT.xml [deleted file]
conf/rayo/lang/pt/dir/tts-pt-BR.xml [deleted file]
conf/rayo/lang/pt/dir/tts-pt-PT.xml [deleted file]
conf/rayo/lang/pt/pt_BR.xml [deleted file]
conf/rayo/lang/pt/pt_PT.xml [deleted file]
conf/rayo/lang/pt/vm/sounds-pt-BR.xml [deleted file]
conf/rayo/lang/pt/vm/sounds-pt-PT.xml [deleted file]
conf/rayo/lang/pt/vm/tts-pt-BR.xml [deleted file]
conf/rayo/lang/pt/vm/tts-pt-PT.xml [deleted file]
conf/rayo/lang/ru/demo/demo-ivr.xml [deleted file]
conf/rayo/lang/ru/demo/demo.xml [deleted file]
conf/rayo/lang/ru/dir/sounds.xml [deleted file]
conf/rayo/lang/ru/dir/tts.xml [deleted file]
conf/rayo/lang/ru/ru.xml [deleted file]
conf/rayo/lang/ru/vm/sounds.xml [deleted file]
conf/rayo/lang/ru/vm/tts.xml [deleted file]
conf/rayo/lang/sv/sv.xml [deleted file]
conf/rayo/lang/sv/vm/sounds.xml [deleted file]
conf/rayo/mime.types [deleted file]
conf/rayo/sip_profiles/external.xml [deleted file]
conf/rayo/sip_profiles/external/example.xml [deleted file]
conf/rayo/vars.xml [deleted file]
configure.ac
debian/control-modules
debian/copyright
debian/rules
docs/Doxygen.conf
freeswitch-config-rayo.spec [deleted file]
freeswitch.spec
libs/.gitignore
libs/iksemel/.update [deleted file]
libs/iksemel/AUTHORS [deleted file]
libs/iksemel/COPYING [deleted file]
libs/iksemel/ChangeLog [deleted file]
libs/iksemel/HACKING [deleted file]
libs/iksemel/INSTALL [deleted file]
libs/iksemel/Makefile.am [deleted file]
libs/iksemel/NEWS [deleted file]
libs/iksemel/README [deleted file]
libs/iksemel/TODO [deleted file]
libs/iksemel/acinclude.m4 [deleted file]
libs/iksemel/acsite.m4 [deleted file]
libs/iksemel/build/libgnutls.m4 [deleted file]
libs/iksemel/configure.ac [deleted file]
libs/iksemel/configure.gnu [deleted file]
libs/iksemel/doc/Makefile.am [deleted file]
libs/iksemel/doc/iksemel.texi [deleted file]
libs/iksemel/iksemel.pc.in [deleted file]
libs/iksemel/include/Makefile.am [deleted file]
libs/iksemel/include/common.h [deleted file]
libs/iksemel/include/finetune.h [deleted file]
libs/iksemel/include/iksemel.h [deleted file]
libs/iksemel/include/stamp-h.in [deleted file]
libs/iksemel/ltmain.sh [deleted file]
libs/iksemel/openssl.m4 [deleted file]
libs/iksemel/src/Makefile.am [deleted file]
libs/iksemel/src/base64.c [deleted file]
libs/iksemel/src/dom.c [deleted file]
libs/iksemel/src/filter.c [deleted file]
libs/iksemel/src/iks.c [deleted file]
libs/iksemel/src/ikstack.c [deleted file]
libs/iksemel/src/io-posix.c [deleted file]
libs/iksemel/src/jabber.c [deleted file]
libs/iksemel/src/md5.c [deleted file]
libs/iksemel/src/sax.c [deleted file]
libs/iksemel/src/sha.c [deleted file]
libs/iksemel/src/stream.c [deleted file]
libs/iksemel/src/utility.c [deleted file]
libs/iksemel/test/Makefile.am [deleted file]
libs/iksemel/test/tst-dom.c [deleted file]
libs/iksemel/test/tst-filter.c [deleted file]
libs/iksemel/test/tst-iks.c [deleted file]
libs/iksemel/test/tst-ikstack.c [deleted file]
libs/iksemel/test/tst-jid.c [deleted file]
libs/iksemel/test/tst-md5.c [deleted file]
libs/iksemel/test/tst-sax.c [deleted file]
libs/iksemel/test/tst-sha.c [deleted file]
libs/iksemel/tools/Makefile.am [deleted file]
libs/iksemel/tools/hash.c [deleted file]
libs/iksemel/tools/ikslint.c [deleted file]
libs/iksemel/tools/iksperf.c [deleted file]
libs/iksemel/tools/iksroster.c [deleted file]
libs/iksemel/tools/perf.c [deleted file]
libs/iksemel/tools/perf.h [deleted file]
libs/win32/iksemel/cleancount [deleted file]
libs/win32/iksemel/config.h [deleted file]
libs/win32/iksemel/iksemel.2017.vcxproj [deleted file]
scripts/ci/common.sh
scripts/ci/config-rayo.sh [deleted file]
scripts/ci/src_tarball.sh
src/mod/.gitignore
src/mod/Makefile.am
src/mod/applications/mod_conference/test/conf/freeswitch.xml
src/mod/event_handlers/mod_rayo/Makefile.am [deleted file]
src/mod/event_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml [deleted file]
src/mod/event_handlers/mod_rayo/gateway/README [deleted file]
src/mod/event_handlers/mod_rayo/gateway/mod_rayo_gateway.erl [deleted file]
src/mod/event_handlers/mod_rayo/iks_helpers.c [deleted file]
src/mod/event_handlers/mod_rayo/iks_helpers.h [deleted file]
src/mod/event_handlers/mod_rayo/mod_rayo.c [deleted file]
src/mod/event_handlers/mod_rayo/mod_rayo.h [deleted file]
src/mod/event_handlers/mod_rayo/nlsml.c [deleted file]
src/mod/event_handlers/mod_rayo/nlsml.h [deleted file]
src/mod/event_handlers/mod_rayo/rayo_components.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_components.h [deleted file]
src/mod/event_handlers/mod_rayo/rayo_cpa_component.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_cpa_component.h [deleted file]
src/mod/event_handlers/mod_rayo/rayo_cpa_detector.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_cpa_detector.h [deleted file]
src/mod/event_handlers/mod_rayo/rayo_elements.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_elements.h [deleted file]
src/mod/event_handlers/mod_rayo/rayo_exec_component.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_fax_components.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_input_component.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_output_component.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_prompt_component.c [deleted file]
src/mod/event_handlers/mod_rayo/rayo_record_component.c [deleted file]
src/mod/event_handlers/mod_rayo/sasl.c [deleted file]
src/mod/event_handlers/mod_rayo/sasl.h [deleted file]
src/mod/event_handlers/mod_rayo/srgs.c [deleted file]
src/mod/event_handlers/mod_rayo/srgs.h [deleted file]
src/mod/event_handlers/mod_rayo/test/test_iks.c [deleted file]
src/mod/event_handlers/mod_rayo/test/test_nlsml.c [deleted file]
src/mod/event_handlers/mod_rayo/test/test_srgs.c [deleted file]
src/mod/event_handlers/mod_rayo/xmpp_errors.def [deleted file]
src/mod/event_handlers/mod_rayo/xmpp_streams.c [deleted file]
src/mod/event_handlers/mod_rayo/xmpp_streams.h [deleted file]
src/mod/formats/mod_ssml/Makefile.am [deleted file]
src/mod/formats/mod_ssml/conf/autoload_configs/ssml.conf.xml [deleted file]
src/mod/formats/mod_ssml/mod_ssml.c [deleted file]

index 135473c8dfe760eec2ebf06f2b07ac982a958127..7859b4db2aad015c07a3959065fa35ac4c7856ef 100644 (file)
@@ -255,9 +255,6 @@ libs/sofia-sip*
 
 src/mod/applications/mod_test/test/test_asr
 src/mod/applications/mod_test/test/test_tts
-src/mod/event_handlers/mod_rayo/test/test_iks
-src/mod/event_handlers/mod_rayo/test/test_nlsml
-src/mod/event_handlers/mod_rayo/test/test_srgs
 src/mod/applications/mod_http_cache/test/Makefile
 src/mod/applications/mod_http_cache/test/Makefile.in
 src/mod/applications/mod_http_cache/test/test-suite.log
@@ -266,7 +263,6 @@ src/mod/applications/mod_http_cache/test/test_aws.log
 src/mod/applications/mod_http_cache/test/test_aws.trs
 src/mod/formats/mod_sndfile/test/test_sndfile
 src/mod/formats/mod_sndfile/test/test_sndfile_conf
-src/mod/formats/mod_ssml/test/test_tts_format
 src/mod/*/*/test/*.log
 src/mod/*/*/test/*.trs
 src/mod/*/*/test/[0-9]*/*
index 7952b114781682860a23b37e8612f3049bd73802..c27b1ee6fe131d4ed9cf6f945d46425c0da4e64b 100644 (file)
@@ -218,8 +218,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsqlite", "libs\win32\sql
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libapr", "libs\win32\apr\libapr.2017.vcxproj", "{F6C55D93-B927-4483-BB69-15AEF3DD2DFF}"\r
 EndProject\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iksemel", "libs\win32\iksemel\iksemel.2017.vcxproj", "{E727E8F6-935D-46FE-8B0E-37834748A0E3}"\r
-EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_sofia", "src\mod\endpoints\mod_sofia\mod_sofia.2017.vcxproj", "{0DF3ABD0-DDC0-4265-B778-07C66780979B}"\r
 EndProject\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pthread", "libs\win32\pthread\pthread.2017.vcxproj", "{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4}"\r
@@ -832,17 +830,6 @@ Global
                {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Release|Win32.Build.0 = Release|Win32\r
                {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Release|x64.ActiveCfg = Release|x64\r
                {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}.Release|x64.Build.0 = Release|x64\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.All|Win32.ActiveCfg = Release|x64\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.All|x64.ActiveCfg = Release|x64\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.All|x64.Build.0 = Release|x64\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.Debug|Win32.Build.0 = Debug|Win32\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.Debug|x64.ActiveCfg = Debug|x64\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.Debug|x64.Build.0 = Debug|x64\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.Release|Win32.ActiveCfg = Release|Win32\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.Release|Win32.Build.0 = Release|Win32\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.Release|x64.ActiveCfg = Release|x64\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3}.Release|x64.Build.0 = Release|x64\r
                {0DF3ABD0-DDC0-4265-B778-07C66780979B}.All|Win32.ActiveCfg = Release|x64\r
                {0DF3ABD0-DDC0-4265-B778-07C66780979B}.All|x64.ActiveCfg = Release|x64\r
                {0DF3ABD0-DDC0-4265-B778-07C66780979B}.All|x64.Build.0 = Release|x64\r
@@ -2603,7 +2590,6 @@ Global
                {EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
                {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
                {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
-               {E727E8F6-935D-46FE-8B0E-37834748A0E3} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
                {0DF3ABD0-DDC0-4265-B778-07C66780979B} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}\r
                {DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}\r
                {FEA1EEF7-876F-48DE-88BF-C0E3E606D758} = {F881ADA2-2F1A-4046-9FEB-191D9422D781}\r
diff --git a/LICENSE b/LICENSE
index e36ad2a73c804d35260a06b187de24842f62a836..d37d77ce5679ebd332758ed6beb7a145945aeba1 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1202,10 +1202,6 @@ Files: src/include/switch_cpp.h
 Copyright: 2007 Yossi Neiman <freeswitch@cartissolutions.com>
 License: MPL-1.1  (well, maybe -- it refers to a COPYING file, so probably docs/COPYING, in which case MPL-1.1)
 
-Files: libs/iksemel/*
-Copyright: 2000-2007 Gurer Ozen <madcat@e-kolay.net>
-License: LGPL-2.1
-
 Files: libs/apr*/*
 Copyright: 2000-2005 The Apache Software Foundation or its licensors
  1991-1992, RSA Data Security, Inc.
@@ -1519,7 +1515,6 @@ License: MPL-1.1
 
 Files: src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/*
  src/mod/languages/mod_lua/lua-mode.el
- libs/iksemel/ltmain.sh
 Copyright: 1995-2007 Free Software Foundation, Inc.
 License: GPL-2+
 
index fdd339a68bf70ffcd213f4bfc46812d5917feb63..09574caa6c60b23606a3b98c6832a656b48d3dc7 100644 (file)
@@ -668,9 +668,6 @@ nodepends: .nodepends
 yesdepends:
        rm .nodepends
 
-iksemel-dep:
-       make -C src/mod/formats/mod_ssml deps
-
 core: $(switch_builddir)/modules.conf src/include/switch_version.h $(CORE_LIBS) 
        $(MAKE) $(AM_MAKEFLAGS) libfreeswitch.la
 
@@ -744,13 +741,6 @@ srtp-reconf:
        cd libs/srtp && sh ./config.status --recheck
        cd libs/srtp && sh ./config.status
 
-
-iks-reconf:
-       cd libs/iksemel && $(MAKE) clean
-       cd libs/iksemel && autoreconf -fi
-       cd libs/iksemel && sh ./configure.gnu $(MY_DEFAULT_ARGS)
-       $(MAKE) mod_ssml-clean
-
 cluecon:
        @clear
        @echo Thank you for updating. This is going to take a while so relax.
index 26630f64ef1559940df6bfab492455099c2a551e..96f48285e2e748c94033dd294b69b68d7d566048 100644 (file)
@@ -13,4 +13,3 @@ m4_include([build/config/sac-pkg-config.m4])
 m4_include([build/config/sac-openssl.m4])
 m4_include([build/config/sched_setaffinity.m4])
 m4_include([libs/apr/build/apr_common.m4])
-m4_include([libs/iksemel/build/libgnutls.m4])
index afa73687f5840b2285b352c2ba68bf0fd58de852..4251c8edb9f10f25e0fb1c0df781067851183382 100755 (executable)
@@ -10,7 +10,7 @@ BGJOB=false
 VERBOSE=false
 BASEDIR=`pwd`;
 LIBDIR=${BASEDIR}/libs;
-SUBDIRS="apr iksemel srtp fs";
+SUBDIRS="apr srtp fs";
 
 while getopts 'jhd:v' o; do 
   case "$o" in
index 8453e290b70b9ac838bbf2ec6f2e7a01fc5a4c58..445ee5ade13da80abf8d80511f2f9155a0b9412d 100644 (file)
@@ -110,7 +110,6 @@ event_handlers/mod_event_socket
 #event_handlers/mod_json_cdr
 #event_handlers/mod_radius_cdr
 #event_handlers/mod_odbc_cdr
-#event_handlers/mod_rayo
 #event_handlers/mod_smpp
 #event_handlers/mod_snmp
 #event_handlers/mod_event_zmq
@@ -122,7 +121,6 @@ formats/mod_png
 #formats/mod_shell_stream
 #formats/mod_shout
 formats/mod_sndfile
-#formats/mod_ssml
 formats/mod_tone_stream
 #formats/mod_vlc
 #formats/mod_opusfile
index 62595a4891dbc1debb2f52d859d4628bf2b54532..a8ee0d179a09c6d6636486ed6de32b89d9cfdd9c 100644 (file)
@@ -106,7 +106,6 @@ event_handlers/mod_format_cdr
 event_handlers/mod_json_cdr
 #event_handlers/mod_radius_cdr
 event_handlers/mod_odbc_cdr
-event_handlers/mod_rayo
 event_handlers/mod_snmp
 #event_handlers/mod_event_zmq
 formats/mod_imagick
@@ -117,7 +116,6 @@ formats/mod_portaudio_stream
 formats/mod_shell_stream
 formats/mod_shout
 formats/mod_sndfile
-formats/mod_ssml
 formats/mod_tone_stream
 formats/mod_vlc
 languages/mod_basic
diff --git a/ci.sh b/ci.sh
index c8d9e848cce97cd3bb6466a47951381b7eb35b75..e2ebe67ea1b829d58786d54adf71602277ac11f0 100755 (executable)
--- a/ci.sh
+++ b/ci.sh
@@ -67,7 +67,6 @@ configure_freeswitch()
                        echo 'codecs/mod_openh264' >> modules.conf
                        sed -i \
                                -e '/applications\/mod_http_cache/s/^#//g' \
-                               -e '/event_handlers\/mod_rayo/s/^#//g' \
                                -e '/formats\/mod_opusfile/s/^#//g' \
                                -e '/languages\/mod_lua/s/^#//g' \
                                modules.conf
diff --git a/conf/rayo/autoload_configs/acl.conf.xml b/conf/rayo/autoload_configs/acl.conf.xml
deleted file mode 100644 (file)
index b62f1e7..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<configuration name="acl.conf" description="Network Lists">
-  <network-lists>
-    <!--
-        These ACL's are automatically created on startup.
-
-        rfc1918.auto  - RFC1918 Space
-        nat.auto      - RFC1918 Excluding your local lan.
-        localnet.auto - ACL for your local lan.
-        loopback.auto - ACL for your local lan.
-    -->
-
-    <list name="lan" default="allow">
-      <node type="deny" cidr="192.168.42.0/24"/>
-      <node type="allow" cidr="192.168.42.42/32"/>
-    </list>
-
-    <!--
-       This will traverse the directory adding all users
-       with the cidr= tag to this ACL, when this ACL matches
-       the users variables and params apply as if they
-       digest authenticated.
-    -->
-    <list name="domains" default="deny">
-      <!-- domain= is special it scans the domain from the directory to build the ACL -->
-      <node type="allow" domain="$${domain}"/>
-      <!-- use cidr= if you wish to allow ip ranges to this domains acl. -->
-      <!-- <node type="allow" cidr="192.168.0.0/24"/> -->
-    </list>
-
-    <list name="rayo-clients" default="deny">
-      <node type="allow" cidr="192.168.0.39/32"/>
-      <node type="allow" cidr="192.168.0.59/32"/>
-    </list>
-
-    <list name="rayo-servers" default="deny">
-      <node type="allow" cidr="192.168.0.39/32"/>
-    </list>
-
-  </network-lists>
-</configuration>
-
diff --git a/conf/rayo/autoload_configs/cdr_csv.conf.xml b/conf/rayo/autoload_configs/cdr_csv.conf.xml
deleted file mode 100644 (file)
index 8d796c6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<configuration name="cdr_csv.conf" description="CDR CSV Format">
-  <settings>
-    <!-- 'cdr-csv' will always be appended to log-base -->
-    <!--<param name="log-base" value="/var/log"/>-->
-    <param name="default-template" value="example"/>
-    <!-- This is like the info app but after the call is hung up -->
-    <!--<param name="debug" value="true"/>-->
-    <param name="rotate-on-hup" value="true"/>
-    <!-- may be a b or ab -->
-    <param name="legs" value="a"/>
-       <!-- Only log in Master.csv -->
-       <!-- <param name="master-file-only" value="true"/> -->
-  </settings>
-  <templates>
-    <template name="sql">INSERT INTO cdr VALUES ("${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}", "${accountcode}");</template>
-    <template name="example">"${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}","${accountcode}","${read_codec}","${write_codec}"</template>
-    <template name="snom">"${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}", "${accountcode}","${read_codec}","${write_codec}","${sip_user_agent}","${call_clientcode}","${sip_rtp_rxstat}","${sip_rtp_txstat}","${sofia_record_file}"</template>
-    <template name="linksys">"${caller_id_name}","${caller_id_number}","${destination_number}","${context}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${uuid}","${bleg_uuid}","${accountcode}","${read_codec}","${write_codec}","${sip_user_agent}","${sip_p_rtp_stat}"</template>
-    <template name="asterisk">"${accountcode}","${caller_id_number}","${destination_number}","${context}","${caller_id}","${channel_name}","${bridge_channel}","${last_app}","${last_arg}","${start_stamp}","${answer_stamp}","${end_stamp}","${duration}","${billsec}","${hangup_cause}","${amaflags}","${uuid}","${userfield}"</template>
-    <template name="opencdrrate">"${uuid}","${signal_bond}","${direction}","${ani}","${destination_number}","${answer_stamp}","${end_stamp}","${billsec}","${accountcode}","${userfield}","${network_addr}","${regex('${original_caller_id_name}'|^.)}","${sip_gateway_name}"</template>
-  </templates>
-</configuration>
-
diff --git a/conf/rayo/autoload_configs/conference.conf.xml b/conf/rayo/autoload_configs/conference.conf.xml
deleted file mode 100644 (file)
index 0641df7..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-<!-- http://wiki.freeswitch.org/wiki/Mod_conference --> 
-<!-- None of these paths are real if you want any of these options you need to really set them up -->
-<configuration name="conference.conf" description="Audio Conference">
-  <!-- Advertise certain presence on startup . -->
-  <advertise>
-    <room name="3001@$${domain}" status="FreeSWITCH"/>
-  </advertise>
-
-  <!-- These are the default keys that map when you do not specify a caller control group -->  
-  <!-- Note: none and default are reserved names for group names.  Disabled if dist-dtmf member flag is set. -->       
-  <caller-controls>
-    <group name="default">
-      <control action="mute" digits="0"/>
-      <control action="deaf mute" digits="*"/>
-      <control action="energy up" digits="9"/>
-      <control action="energy equ" digits="8"/>
-      <control action="energy dn" digits="7"/>
-      <control action="vol talk up" digits="3"/>
-      <control action="vol talk zero" digits="2"/>
-      <control action="vol talk dn" digits="1"/>
-      <control action="vol listen up" digits="6"/>
-      <control action="vol listen zero" digits="5"/>
-      <control action="vol listen dn" digits="4"/>
-      <control action="hangup" digits="#"/>
-    </group>
-  </caller-controls>
-
-  <!-- Profiles are collections of settings you can reference by name. -->
-  <profiles>
-    <!--If no profile is specified it will default to "default"-->
-    <profile name="default">
-      <!-- Directory to drop CDR's 
-          'auto' means $PREFIX/logs/conference_cdr/<confernece_uuid>.cdr.xml
-          a non-absolute path means $PREFIX/logs/<value>/<confernece_uuid>.cdr.xml
-          absolute path means <value>/<confernece_uuid>.cdr.xml
-      -->
-      <!-- <param name="cdr-log-dir" value="auto"/> -->
-      
-      <!-- Domain (for presence) -->
-      <param name="domain" value="$${domain}"/>
-      <!-- Sample Rate-->
-      <param name="rate" value="8000"/>
-      <!-- Number of milliseconds per frame -->
-      <param name="interval" value="20"/>
-      <!-- Energy level required for audio to be sent to the other users -->
-      <param name="energy-level" value="300"/>
-
-      <!--Can be | delim of waste|mute|deaf|dist-dtmf waste will always transmit data to each channel
-          even during silence.  dist-dtmf propagates dtmfs to all other members, but channel controls
-         via dtmf will be disabled. -->
-      <!--<param name="member-flags" value="waste"/>-->
-
-      <!-- Name of the caller control group to use for this profile -->
-      <!-- <param name="caller-controls" value="some name"/> -->
-      <!-- Name of the caller control group to use for the moderator in this profile -->
-      <!-- <param name="moderator-controls" value="some name"/> -->
-      <!-- TTS Engine to use -->
-      <!--<param name="tts-engine" value="cepstral"/>-->
-      <!-- TTS Voice to use -->
-      <!--<param name="tts-voice" value="david"/>-->
-
-      <!-- If TTS is enabled all audio-file params beginning with -->
-      <!-- 'say:' will be considered text to say with TTS -->
-      <!-- Override the default path here, after which you use relative paths in the other sound params -->
-      <!-- Note: The default path is the conference's first caller's sound_prefix -->
-      <!--<param name="sound-prefix" value="$${sound_prefix}"/>-->
-      <!-- File to play to acknowledge success -->
-      <!--<param name="ack-sound" value="beep.wav"/>-->
-      <!-- File to play to acknowledge failure -->
-      <!--<param name="nack-sound" value="beeperr.wav"/>-->
-      <!-- File to play to acknowledge muted -->
-      <param name="muted-sound" value="conference/conf-muted.wav"/>
-      <!-- File to play to acknowledge unmuted -->
-      <param name="unmuted-sound" value="conference/conf-unmuted.wav"/>
-      <!-- File to play if you are alone in the conference -->
-      <param name="alone-sound" value="conference/conf-alone.wav"/>
-      <!-- File to play endlessly (nobody will ever be able to talk) -->
-      <!--<param name="perpetual-sound" value="perpetual.wav"/>-->
-      <!-- File to play when you're alone (music on hold)-->
-      <param name="moh-sound" value="$${hold_music}"/>
-      <!-- File to play when you join the conference -->
-      <param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
-      <!-- File to play when you leave the conference -->
-      <param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
-      <!-- File to play when you ae ejected from the conference -->
-      <param name="kicked-sound" value="conference/conf-kicked.wav"/>
-      <!-- File to play when the conference is locked -->
-      <param name="locked-sound" value="conference/conf-locked.wav"/>
-      <!-- File to play when the conference is locked during the call-->
-      <param name="is-locked-sound" value="conference/conf-is-locked.wav"/>
-      <!-- File to play when the conference is unlocked during the call-->
-      <param name="is-unlocked-sound" value="conference/conf-is-unlocked.wav"/>
-      <!-- File to play to prompt for a pin -->
-      <param name="pin-sound" value="conference/conf-pin.wav"/>
-      <!-- File to play to when the pin is invalid -->
-      <param name="bad-pin-sound" value="conference/conf-bad-pin.wav"/>
-      <!-- Conference pin -->
-      <!--<param name="pin" value="12345"/>-->
-      <!--<param name="moderator-pin" value="54321"/>-->
-      <!-- Max number of times the user can be prompted for PIN -->
-      <!--<param name="pin-retries" value="3"/>-->
-      <!-- Default Caller ID Name for outbound calls -->
-      <param name="caller-id-name" value="$${outbound_caller_name}"/>
-      <!-- Default Caller ID Number for outbound calls -->
-      <param name="caller-id-number" value="$${outbound_caller_id}"/>
-      <!-- Suppress start and stop talking events -->
-      <!-- <param name="suppress-events" value="start-talking,stop-talking"/> -->
-      <!-- enable comfort noise generation -->
-      <param name="comfort-noise" value="true"/>
-      <!-- Uncomment auto-record to toggle recording every conference call. -->
-      <!-- Another valid value is   shout://user:pass@server.com/live.mp3   -->
-      <!--
-      <param name="auto-record" value="$${recordings_dir}/${conference_name}_${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
-      -->
-
-      <!-- IVR digit machine timeouts -->
-      <!-- How much to wait between DTMF digits to match caller-controls -->
-      <!-- <param name="ivr-dtmf-timeout" value="500"/> -->
-      <!-- How much to wait for the first DTMF, 0 forever -->
-      <!-- <param name="ivr-input-timeout" value="0" /> -->
-      <!-- Delay before a conference is asked to be terminated -->
-      <!-- <param name="endconf-grace-time" value="120" /> -->
-      <!-- Can be | delim of wait-mod|audio-always|video-bridge|video-floor-only
-           wait_mod will wait until the moderator in,
-           audio-always will always mix audio from all members regardless they are talking or not -->
-      <!-- <param name="conference-flags" value="audio-always"/> -->
-    </profile>
-
-    <profile name="wideband">
-      <param name="domain" value="$${domain}"/>
-      <param name="rate" value="16000"/>
-      <param name="interval" value="20"/>
-      <param name="energy-level" value="300"/>
-      <!--<param name="sound-prefix" value="$${sound_prefix}"/>-->
-      <param name="muted-sound" value="conference/conf-muted.wav"/>
-      <param name="unmuted-sound" value="conference/conf-unmuted.wav"/>
-      <param name="alone-sound" value="conference/conf-alone.wav"/>
-      <param name="moh-sound" value="$${hold_music}"/>
-      <param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
-      <param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
-      <param name="kicked-sound" value="conference/conf-kicked.wav"/>
-      <param name="locked-sound" value="conference/conf-locked.wav"/>
-      <param name="is-locked-sound" value="conference/conf-is-locked.wav"/>
-      <param name="is-unlocked-sound" value="conference/conf-is-unlocked.wav"/>
-      <param name="pin-sound" value="conference/conf-pin.wav"/>
-      <param name="bad-pin-sound" value="conference/conf-bad-pin.wav"/>
-      <param name="caller-id-name" value="$${outbound_caller_name}"/>
-      <param name="caller-id-number" value="$${outbound_caller_id}"/>
-      <param name="comfort-noise" value="true"/>
-      <!--<param name="tts-engine" value="flite"/>-->
-      <!--<param name="tts-voice" value="kal16"/>-->
-    </profile>
-
-    <profile name="ultrawideband">
-      <param name="domain" value="$${domain}"/>
-      <param name="rate" value="32000"/>
-      <param name="interval" value="20"/>
-      <param name="energy-level" value="300"/>
-      <!--<param name="sound-prefix" value="$${sound_prefix}"/>-->
-      <param name="muted-sound" value="conference/conf-muted.wav"/>
-      <param name="unmuted-sound" value="conference/conf-unmuted.wav"/>
-      <param name="alone-sound" value="conference/conf-alone.wav"/>
-      <param name="moh-sound" value="$${hold_music}"/>
-      <param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
-      <param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
-      <param name="kicked-sound" value="conference/conf-kicked.wav"/>
-      <param name="locked-sound" value="conference/conf-locked.wav"/>
-      <param name="is-locked-sound" value="conference/conf-is-locked.wav"/>
-      <param name="is-unlocked-sound" value="conference/conf-is-unlocked.wav"/>
-      <param name="pin-sound" value="conference/conf-pin.wav"/>
-      <param name="bad-pin-sound" value="conference/conf-bad-pin.wav"/>
-      <param name="caller-id-name" value="$${outbound_caller_name}"/>
-      <param name="caller-id-number" value="$${outbound_caller_id}"/>
-      <param name="comfort-noise" value="true"/>
-      <!--<param name="tts-engine" value="flite"/>-->
-      <!--<param name="tts-voice" value="kal16"/>-->
-    </profile>
-
-    <profile name="cdquality">
-      <param name="domain" value="$${domain}"/>
-      <param name="rate" value="48000"/>
-      <param name="interval" value="10"/>
-      <param name="energy-level" value="300"/>
-      <!--<param name="sound-prefix" value="$${sound_prefix}"/>-->
-      <param name="muted-sound" value="conference/conf-muted.wav"/>
-      <param name="unmuted-sound" value="conference/conf-unmuted.wav"/>
-      <param name="alone-sound" value="conference/conf-alone.wav"/>
-      <param name="moh-sound" value="$${hold_music}"/>
-      <param name="enter-sound" value="tone_stream://%(200,0,500,600,700)"/>
-      <param name="exit-sound" value="tone_stream://%(500,0,300,200,100,50,25)"/>
-      <param name="kicked-sound" value="conference/conf-kicked.wav"/>
-      <param name="locked-sound" value="conference/conf-locked.wav"/>
-      <param name="is-locked-sound" value="conference/conf-is-locked.wav"/>
-      <param name="is-unlocked-sound" value="conference/conf-is-unlocked.wav"/>
-      <param name="pin-sound" value="conference/conf-pin.wav"/>
-      <param name="bad-pin-sound" value="conference/conf-bad-pin.wav"/>
-      <param name="caller-id-name" value="$${outbound_caller_name}"/>
-      <param name="caller-id-number" value="$${outbound_caller_id}"/>
-      <param name="comfort-noise" value="true"/>
-    </profile>
-
-    <profile name="sla">
-      <param name="domain" value="$${domain}"/>
-      <param name="rate" value="16000"/>
-      <param name="interval" value="20"/>
-      <param name="caller-controls" value="none"/>
-      <param name="energy-level" value="200"/>
-      <param name="moh-sound" value="silence"/>
-      <param name="comfort-noise" value="true"/>
-      <param name="min-required-recording-participants" value="1"/>
-    </profile>
-
-  </profiles>
-</configuration>
diff --git a/conf/rayo/autoload_configs/console.conf.xml b/conf/rayo/autoload_configs/console.conf.xml
deleted file mode 100644 (file)
index 44a7e6c..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<configuration name="console.conf" description="Console Logger">
-  <!-- pick a file name, a function name or 'all' -->
-  <!-- map as many as you need for specific debugging -->
-  <mappings>
-    <!-- 
-      name can be a file name, function name or 'all' 
-      value is one or more of debug,info,notice,warning,err,crit,alert,all
-      See examples below
-
-
-      The following map is the default, which is all debug levels enabled:
-      <map name="all" value="debug,info,notice,warning,err,crit,alert"/>
-
-
-      Example: the following turns on debugging for error and critical levels only
-      <map name="all" value="err,crit"/>
-
-      NOTE: using map name="all" will override any other settings!  If you 
-            want a more specific set of console messages then you will need
-            to specify which files and/or functions you want to have debug
-            messages.  One option is to turn on just the more critical 
-            messages with map name="all", then specify the other types of 
-            console messages you want to see for various files and functions.
-
-      Example: turn on ERROR, CRIT, ALERT for all modules, then specify other
-               levels for various modules and functions
-
-        <map name="all" value="err,crit,alert"/>
-        <map name="switch_loadable_module_process" value="all"/>
-        <map name="mod_local_stream.c" value="warning,debug"/>
-        <map name="mod_sndfile.c" value="warning,info,debug"/>
-     -->
-    <map name="all" value="console,debug,info,notice,warning,err,crit,alert"/>
-    
-    <!--
-      You can use or modify this sample set of mappings.  It turns on higher
-      level messages for all modules and then specifies extra lower level
-      messages for Freetdm, Sofia, and switch core messages.
-      
-    <map name="all"                         value="warning,err,crit,alert"/>
-    <map name="zap_analog.c"                value="all"/>
-    <map name="zap_io.c"                    value="all"/>
-    <map name="zap_isdn.c"                  value="all"/>
-    <map name="zap_zt.c"                    value="all"/>
-    <map name="mod_freetdm"                 value="all"/>
-    <map name="sofia.c"                     value="notice"/>
-    <map name="switch_core_state_machine.c" value="all"/>      
-    
-    -->
-  </mappings>
-  <settings>
-    <!-- comment or set to false for no color logging -->
-    <param name="colorize" value="true"/>
-    <param name="loglevel" value="$${console_loglevel}"/>
-  </settings>
-</configuration>
diff --git a/conf/rayo/autoload_configs/event_socket.conf.xml b/conf/rayo/autoload_configs/event_socket.conf.xml
deleted file mode 100644 (file)
index 5ea2e09..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<configuration name="event_socket.conf" description="Socket Client">
-  <settings>
-    <param name="nat-map" value="false"/>
-    <param name="listen-ip" value="127.0.0.1"/>
-    <param name="listen-port" value="8021"/>
-    <param name="password" value="ClueCon"/>
-    <!--<param name="apply-inbound-acl" value="lan"/>-->
-  </settings>
-</configuration>
diff --git a/conf/rayo/autoload_configs/http_cache.conf.xml b/conf/rayo/autoload_configs/http_cache.conf.xml
deleted file mode 100644 (file)
index 5d70ec6..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<configuration name="http_cache.conf" description="HTTP GET cache">
-  <settings>
-    <!-- set to true if you want to enable http:// and https:// formats.  Do not use if mod_httapi is also loaded -->
-    <param name="enable-file-formats" value="true"/>
-    <param name="max-urls" value="10000"/>
-    <param name="location" value="$${base_dir}/http_cache"/>
-    <param name="default-max-age" value="86400"/>
-    <param name="prefetch-thread-count" value="8"/>
-    <param name="prefetch-queue-size" value="100"/>
-    <!-- absolute path to CA bundle file -->
-    <param name="ssl-cacert" value="$${base_dir}/conf/cacert.pem"/>
-    <!-- verify certificates -->
-    <param name="ssl-verifypeer" value="true"/>
-    <!-- verify host name matches certificate -->
-    <param name="ssl-verifyhost" value="true"/>
-    <!-- default is 300 seconds, override here -->
-    <!--param name="connect-timeout" value="300"/-->
-    <!-- default is 300 seconds, override here -->
-    <!--param name="download-timeout" value="300"/-->
-  </settings>
-</configuration>
diff --git a/conf/rayo/autoload_configs/local_stream.conf.xml b/conf/rayo/autoload_configs/local_stream.conf.xml
deleted file mode 100644 (file)
index 94a5665..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<configuration name="local_stream.conf" description="stream files from local dir">
-  <!-- fallback to default if requested moh class isn't found -->
-  <directory name="default" path="$${sounds_dir}/music/8000">
-    <param name="rate" value="8000"/>
-    <param name="shuffle" value="true"/>
-    <param name="channels" value="1"/>
-    <param name="interval" value="20"/>
-    <param name="timer-name" value="soft"/>
-    <!-- list of short files to break in with every so often -->
-    <!--<param name="chime-list" value="file1.wav,file2.wav"/>-->
-    <!-- frequency of break-in (seconds)-->
-    <!--<param name="chime-freq" value="30"/>-->
-    <!-- limit to how many seconds the file will play -->
-    <!--<param name="chime-max" value="500"/>-->
-  </directory>
-
-  <directory name="moh/8000" path="$${sounds_dir}/music/8000">
-    <param name="rate" value="8000"/>
-    <param name="shuffle" value="true"/>
-    <param name="channels" value="1"/>
-    <param name="interval" value="20"/>
-    <param name="timer-name" value="soft"/>
-  </directory>
-
-  <directory name="moh/16000" path="$${sounds_dir}/music/16000">
-    <param name="rate" value="16000"/>
-    <param name="shuffle" value="true"/>
-    <param name="channels" value="1"/>
-    <param name="interval" value="20"/>
-    <param name="timer-name" value="soft"/>
-  </directory>
-
-  <directory name="moh/32000" path="$${sounds_dir}/music/32000">
-    <param name="rate" value="32000"/>
-    <param name="shuffle" value="true"/>
-    <param name="channels" value="1"/>
-    <param name="interval" value="20"/>
-    <param name="timer-name" value="soft"/>
-  </directory>
-  <!--
-  <directory name="moh/48000" path="$${sounds_dir}/music/48000">
-    <param name="rate" value="48000"/>
-    <param name="shuffle" value="true"/>
-    <param name="channels" value="1"/>
-    <param name="interval" value="10"/>
-    <param name="timer-name" value="soft"/>
-  </directory>
-  -->
-</configuration>
diff --git a/conf/rayo/autoload_configs/logfile.conf.xml b/conf/rayo/autoload_configs/logfile.conf.xml
deleted file mode 100644 (file)
index 38a1d39..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<configuration name="logfile.conf" description="File Logging">
-  <settings>
-   <!-- true to auto rotate on HUP, false to open/close -->
-   <param name="rotate-on-hup" value="true"/>
-  </settings>
-  <profiles>
-    <profile name="default">
-      <settings>
-        <!-- File to log to -->
-       <!--<param name="logfile" value="/var/log/freeswitch.log"/>-->
-        <!-- At this length in bytes rotate the log file (0 for never) -->
-        <param name="rollover" value="10485760"/>
-               <!-- Maximum number of log files to keep before wrapping -->
-               <!-- If this parameter is enabled, the log filenames will not include a date stamp -->
-               <!-- <param name="maximum-rotate" value="32"/> -->
-        <!-- Uncomment to prefix all log lines by the session's uuid  -->
-        <param name="uuid" value="true" />
-      </settings>
-      <mappings>
-       <!-- 
-            name can be a file name, function name or 'all' 
-            value is one or more of debug,info,notice,warning,err,crit,alert,all
-            Please see comments in console.conf.xml for more information
-       -->
-       <map name="all" value="debug,info,notice,warning,err,crit,alert"/>
-      </mappings>
-    </profile>
-  </profiles>
-</configuration>
diff --git a/conf/rayo/autoload_configs/modules.conf.xml b/conf/rayo/autoload_configs/modules.conf.xml
deleted file mode 100644 (file)
index ee44e06..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<configuration name="modules.conf" description="Modules">
-  <modules>
-    <!-- Loggers -->
-    <load module="mod_console"/>
-    <load module="mod_logfile"/>
-
-    <!-- Event Handlers -->
-    <load module="mod_cdr_csv"/>
-    <load module="mod_event_socket"/>
-    <load module="mod_rayo"/>
-
-    <!-- Endpoints -->
-    <load module="mod_sofia"/>
-    <load module="mod_loopback"/>
-
-    <!-- Applications -->
-    <!--load module="mod_signalwire"-->
-    <load module="mod_commands"/>
-    <load module="mod_conference"/>
-    <load module="mod_dptools"/>
-    <load module="mod_expr"/>
-    <load module="mod_esf"/>
-    <load module="mod_fsv"/>
-    <load module="mod_http_cache"/>
-
-    <!-- Dialplan Interfaces -->
-    <load module="mod_dialplan_xml"/>
-
-    <!-- Codec Interfaces -->
-    <load module="mod_spandsp"/>
-    <load module="mod_opus"/>
-    <load module="mod_ilbc"/>
-    <load module="mod_h26x"/>
-
-    <!-- File Format Interfaces -->
-    <load module="mod_sndfile"/>
-    <load module="mod_native_file"/>
-    <load module="mod_shell_stream"/>
-    <!--For icecast/mp3 streams/files-->
-    <load module="mod_shout"/>
-    <!--For local streams (play all the files in a directory)-->
-    <load module="mod_local_stream"/>
-    <load module="mod_tone_stream"/>
-    <load module="mod_ssml"/>
-
-    <!-- ASR /TTS -->
-    <load module="mod_flite"/>
-    <load module="mod_pocketsphinx"/>
-    <!-- <load module="mod_tts_commandline"/> -->
-
-    <!-- Say -->
-    <!--load module="mod_say_de"/-->
-    <!--load module="mod_say_es"/-->
-    <!--load module="mod_say_fr"/-->
-    <!--load module="mod_say_hr"/-->
-    <!--load module="mod_say_it"/-->
-    <!--load module="mod_say_nl"/-->
-    <!--load module="mod_say_ru"/-->
-    <!--load module="mod_say_zh"/-->
-    <load module="mod_say_en"/>
-    <!--load module="mod_say_fa"/-->
-    <!--load module="mod_say_he"/-->
-    <!--load module="mod_say_hu"/-->
-    <!--load module="mod_say_ja"/-->
-    <!--load module="mod_say_pt"/-->
-    <!--load module="mod_say_th"/-->
-    <!--load module="mod_say_sv"/-->
-
-  </modules>
-</configuration>
diff --git a/conf/rayo/autoload_configs/pocketsphinx.conf.xml b/conf/rayo/autoload_configs/pocketsphinx.conf.xml
deleted file mode 100644 (file)
index 3bf7d5e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<configuration name="pocketsphinx.conf" description="PocketSphinx ASR Configuration">
-  <settings>
-    <param name="threshold" value="400"/>
-    <param name="silence-hits" value="25"/>
-    <param name="listen-hits" value="1"/>
-    <param name="auto-reload" value="true"/>
-    <!--<param name="language-weight" value="1"/>-->
-    <!--<param name="narrowband-model" value="communicator"/>-->
-    <!--<param name="wideband-model" value="wsj1"/>-->
-    <!--<param name="dictionary" value="default.dic"/>-->
-  </settings>
-</configuration>
diff --git a/conf/rayo/autoload_configs/post_load_modules.conf.xml b/conf/rayo/autoload_configs/post_load_modules.conf.xml
deleted file mode 100644 (file)
index 8f4e132..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<configuration name="post_load_modules.conf" description="Modules">
-  <modules>
-  </modules>
-</configuration>
diff --git a/conf/rayo/autoload_configs/pre_load_modules.conf.xml b/conf/rayo/autoload_configs/pre_load_modules.conf.xml
deleted file mode 100644 (file)
index 620a6c1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration name="pre_load_modules.conf" description="Modules">\r
-  <modules>\r
-    <!-- Databases -->\r
-    <!-- <load module="mod_mariadb"/> -->\r
-    <load module="mod_pgsql"/>\r
-  </modules>\r
-</configuration>\r
diff --git a/conf/rayo/autoload_configs/presence_map.conf.xml b/conf/rayo/autoload_configs/presence_map.conf.xml
deleted file mode 100644 (file)
index 8a9d1dd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<configuration name="presence_map.conf" description="PRESENCE MAP">
-  <domains>
-    <domain name="$${domain}">
-      <exten regex="3\d+" proto="conf"/>
-    </domain>
-  </domains>
-</configuration>
diff --git a/conf/rayo/autoload_configs/rayo.conf.xml b/conf/rayo/autoload_configs/rayo.conf.xml
deleted file mode 100644 (file)
index 9f525c5..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-<configuration name="rayo.conf" description="Rayo server config">
-
-       <!-- rayo params -->
-       <settings>
-               <!-- ends idle calls : unbridged calls that have not been controlled by client in some time -->
-               <param name="max-idle-sec" value="300"/>
-               <!-- conference profile to use for mixers- sla = shared line appearance / conference /w no audio -->
-               <param name="mixer-conf-profile" value="sla"/>
-               <!-- if true, to attribute in offer uses URI instead of name/number -->
-               <param name="offer-uri" value="true"/>
-               <!-- how offers are distributed to clients (all, first, random). -->
-               <param name="offer-algorithm" value="all"/>
-               <!-- If offer is not answered after timeout, next client is offered (based on algorithm picked).
-                    If no other clients are available, the call is rejected.  Set to 0 to disable -->
-               <param name="offer-timeout-ms" value="5000"/>
-               <!-- if true, channel variables are added to rayo client offer -->
-               <param name="add-variables-to-offer" value="false"/>
-                <!-- if true, channel variables are added to offer, ringing, answered, and end events sent to rayo clients -->
-               <param name="add-variables-to-events" value="false"/>
-       </settings>
-
-       <!-- record component params -->
-       <record>
-               <param name="record-file-prefix" value="$${recordings_dir}/"/>
-       </record>
-
-       <!-- input component params -->
-       <input>
-               <param name="default-recognizer" value="pocketsphinx"/>
-       </input>
-
-       <!-- send/receivefax component params -->
-       <fax>
-               <!-- where to store incoming faxes -->
-               <param name="receivefax-file-prefix" value="/tmp/"/>
-       </fax>
-
-       <!-- Call progress analysis configuration -->
-       <!-- Define CPA detectors.  These are sources for Rayo CPA signal events -->
-       <!-- Detectors must fire an event that can be translated by mod_rayo into a CPA signal event -->
-       <cpa>
-               <!-- map DTMF events to CPA -->
-               <detector name="core_dtmf_event">
-                       <event class="DTMF" value-header="DTMF-Digit" duration-header="DTMF-Duration">
-                               <signal-type value="dtmf"/>
-                       </event>
-               </detector>
-
-               <!-- map mod_spandsp fax detector to the Rayo CPA events. Fires DETECTED_FAX_* event once and quits. -->
-               <detector name="mod_spandsp_fax_ced">
-                       <start application="spandsp_start_fax_detect" data="event 'Event-Name=CUSTOM,Event-Subclass=DETECTED_FAX_CED' 500 ced"/>
-                       <stop application="spandsp_stop_fax_detect" data=""/>
-                       <event class="CUSTOM" subclass="DETECTED_FAX_CED">
-                               <signal-type value="fax-ced"/>
-                       </event>
-               </detector>
-
-               <detector name="mod_spandsp_fax_cng">
-                       <start application="spandsp_start_fax_detect" data="event 'Event-Name=CUSTOM,Event-Subclass=DETECTED_FAX_CNG' 500"/>
-                       <stop application="spandsp_stop_fax_detect" data=""/>
-                       <event class="CUSTOM" subclass="DETECTED_FAX_CNG">
-                               <signal-type value="fax-cng"/>
-                       </event>
-               </detector>
-
-               <!-- map mod_spandsp call progress tone detector to Rayo CPA signal events.  Fires DETECTED_TONE events until stopped. -->
-               <detector name="mod_spandsp_tone">
-                       <start application="spandsp_start_tone_detect" data="1"/>
-                       <stop application="spandsp_stop_tone_detect" data=""/>
-                       <!-- map tone events to Rayo CPA signal type -->
-                       <event class="DETECTED_TONE" type-header="Detected-Tone">
-                               <signal-type header-value="SIT" value="sit"/>
-                               <signal-type header-value="BUSY_TONE" value="busy"/>
-                               <signal-type header-value="REORDER_TONE" value="congestion"/>
-                               <signal-type header-value="RING_TONE" value="ring"/>
-                       </event>
-               </detector>
-
-               <!-- map mod_avmd detector to Rayo CPA beep event.  Fires avmd::beep event once. -->
-               <detector name="mod_avmd">
-                       <start application="avmd" data=""/>
-                       <stop application="avmd" data="stop"/>
-                       <event class="CUSTOM" subclass="avmd::beep">
-                               <signal-type value="beep"/>
-                       </event>
-               </detector>
-
-               <!-- Alternative beep detector using mod_vmd.  Fires vmd::beep events until stopped. -->
-               <!--detector name="mod_vmd">
-                       <start application="vmd" data=""/>
-                       <stop application="vmd" data="stop"/>
-                       <event class="CUSTOM" subclass="vmd::beep">
-                               <signal-type value="beep"/>
-                       </event>
-               </detector-->
-       </cpa>
-
-       <!-- XMPP server domain -->
-       <domain name="$${rayo_domain_name}" shared-secret="ClueCon">
-       <!-- use this instead if you want secure XMPP client to server connections.  Put .crt and .key file in freeswitch/certs -->
-       <!--domain name="$${rayo_domain_name}" shared-secret="ClueCon" cert="$${base_dir}/certs/$${rayo_domain_name}.crt" key="$${base_dir}/certs/$${rayo_domain_name}.key"-->
-
-               <!-- Listeners for new Rayo client connections -->
-               <!--listen type="c2s" port="5222" address="$${local_ip_v4}" acl="rayo-clients"/-->
-               <listen type="c2s" port="5222" address="$${rayo_ip}" acl=""/>
-
-               <!-- Listeners for new server connections -->
-               <!--listen type="s2s" port="5269" address="$${local_ip_v4}" acl="rayo-servers"/-->
-
-               <!-- servers to connect to -->
-               <!--connect port="5269" address="node.example.com" domain="example.com"/-->
-
-               <!-- Authorized users -->
-               <users>
-                       <user name="usera" password="1"/>
-               </users>
-       </domain>
-
-       <!-- URI mapping to endpoint / gateway -->
-       <dial-gateways>
-               <dial-gateway uriprefix="default" dialprefix="sofia/gateway/outbound/" strip="0"/>
-               <dial-gateway uriprefix="sip:" dialprefix="sofia/external/" strip="0"/>
-               <dial-gateway uriprefix="tel:" dialprefix="sofia/gateway/outbound/" strip="4"/>
-               <!-- pass through user and sofia unaltered -->
-               <dial-gateway uriprefix="user/" dialprefix="" strip=""/>
-               <dial-gateway uriprefix="sofia/" dialprefix="" strip=""/>
-               <dial-gateway uriprefix="loopback/" dialprefix="" strip=""/>
-       </dial-gateways>
-
-       <!-- IQ request aliases.  Used mainly for testing purposes or for controlling a rayo call via the console -->
-       <aliases>
-               <alias name="detect" target="call" args="1"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:$1:1"/></input>]]></alias>
-               <alias name="detect-once" target="call" args="1"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:$1:1?terminate=true"/></input>]]></alias>
-               <alias name="detect-tones" target="call"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:busy:1"/><grammar url="urn:xmpp:rayo:cpa:congestion:1"/><grammar url="urn:xmpp:rayo:cpa:sit:1"/></input>]]></alias>
-               <alias name="ping" target="external"><![CDATA[<iq type="get"><ping xmlns="urn:xmpp:ping"/></iq>]]></alias>
-               <alias name="dial" target="server" args="2"><![CDATA[<dial xmlns="urn:xmpp:rayo:1" from="$1" to="$2"/>]]></alias>
-               <alias name="answer" target="call"><![CDATA[<answer xmlns="urn:xmpp:rayo:1"/>]]></alias>
-               <alias name="hangup" target="call"><![CDATA[<hangup xmlns="urn:xmpp:rayo:1"/>]]></alias>
-               <alias name="join" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" call-uri="xmpp:$1"/>]]></alias>
-               <alias name="join_mixer_duplex" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="duplex"/>]]></alias>
-               <alias name="join_mixer_send" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="send"/>]]></alias>
-               <alias name="join_mixer_recv" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="recv"/>]]></alias>
-               <alias name="unjoin_mixer" target="call" args="1"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1" mixer-name="$1"/>]]></alias>
-               <alias name="unjoin" target="call"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1"/>]]></alias>
-               <alias name="unjoin_call" target="call" args="1"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1" call-uri="xmpp:$1"/>]]></alias>
-               <alias name="stop" target="component"><![CDATA[<stop xmlns="urn:xmpp:rayo:ext:1"/>]]></alias>
-               <alias name="output_bad" target="call"><![CDATA[<output xmlns="urn:xmpp:rayo:output:1" repeat-time="100"></output>]]></alias>
-               <alias name="pause" target="output"><![CDATA[<pause xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="resume" target="output"><![CDATA[<resume xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="speed-up" target="output"><![CDATA[<speed-up xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="speed-down" target="output"><![CDATA[<speed-down xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="volume-up" target="output"><![CDATA[<volume-up xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="volume-down" target="output"><![CDATA[<volume-down xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="receivefax" target="call"><![CDATA[<receivefax xmlns="urn:xmpp:rayo:fax:1"/>]]></alias>
-               <alias name="sendfax" target="call" args="1"><![CDATA[<sendfax xmlns="urn:xmpp:rayo:fax:1"><document xmlns="urn:xmpp:rayo:fax:1" url="$1"/></sendfax>]]></alias>
-               <alias name="record" target="call"><![CDATA[<record xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
-               <alias name="record_pause" target="record"><![CDATA[<pause xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
-               <alias name="record_resume" target="record"><![CDATA[<resume xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
-               <alias name="prompt_barge" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="5">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_no_barge" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="false">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="5">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_long" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_multi_digit" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_terminator" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_input_bad" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_output_bad" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-time="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="input" target="call">
-                       <![CDATA[
-                               <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                       <grammar content-type="application/srgs+xml">
-                                               <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
-                                       </grammar>
-                               </input>
-                       ]]>
-               </alias>
-
-               <alias name="input_voice_yesno_pocketsphinx" target="call">
-                       <![CDATA[
-                               <input xmlns="urn:xmpp:rayo:input:1" mode="voice" recognizer="pocketsphinx" max-silence="5000" initial-timeout="5000">
-                                       <grammar content-type="application/srgs+xml>
-                                       <![CDATA[
-                                               <grammar xmlns="http://www.w3.org/2001/06/grammar"
-                                                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                                                       xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
-                                                       xml:lang="en-US" version="1.0">
-                                                               <rule id="yesno"><one-of><item>yes</item><item>no</item></one-of></rule></grammar>
-                                       ]]]]><![CDATA[>
-                                       </grammar>
-                               </input>
-                       ]]>
-               </alias>
-
-               <alias name="input_voice_yesno_default" target="call">
-                       <![CDATA[
-                               <input xmlns="urn:xmpp:rayo:input:1" mode="voice" max-silence="5000" initial-timeout="5000">
-                                       <grammar content-type="application/srgs+xml>
-                                       <![CDATA[
-                                               <grammar xmlns="http://www.w3.org/2001/06/grammar"
-                                                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                                                       xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
-                                                       xml:lang="en-US" version="1.0">
-                                                               <rule id="yesno"><one-of><item>yes</item><item>no</item></one-of></rule></grammar>
-                                       ]]]]><![CDATA[>
-                                       </grammar>
-                               </input>
-                       ]]>
-               </alias>
-
-       </aliases>
-
-</configuration>
diff --git a/conf/rayo/autoload_configs/shout.conf.xml b/conf/rayo/autoload_configs/shout.conf.xml
deleted file mode 100644 (file)
index c3d1334..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<configuration name="shout.conf" description="mod shout config">
-  <settings>
-    <!-- Don't change these unless you are insane -->
-    <!--<param name="decoder" value="i586"/>-->
-    <!--<param name="volume" value=".1"/>-->
-    <!-- mod_shout sets output amplitude scale to 8192 by default - preserve mpg123 default of 32768 -->
-    <param name="outscale" value="32768"/>
-  </settings>
-</configuration>
diff --git a/conf/rayo/autoload_configs/sofia.conf.xml b/conf/rayo/autoload_configs/sofia.conf.xml
deleted file mode 100644 (file)
index a5e8614..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<configuration name="sofia.conf" description="sofia Endpoint">
-
-  <global_settings>
-    <param name="log-level" value="0"/>
-    <!-- <param name="auto-restart" value="false"/> -->
-    <param name="debug-presence" value="0"/>
-    <!-- <param name="capture-server" value="udp:homer.domain.com:5060"/> -->
-  </global_settings>
-
-  <!--
-      The rabbit hole goes deep.  This includes all the
-      profiles in the sip_profiles directory that is up
-      one level from this directory.
-  -->
-  <profiles>
-    <X-PRE-PROCESS cmd="include" data="../sip_profiles/*.xml"/>
-  </profiles>
-
-</configuration>
diff --git a/conf/rayo/autoload_configs/spandsp.conf.xml b/conf/rayo/autoload_configs/spandsp.conf.xml
deleted file mode 100644 (file)
index f9556d3..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<configuration name="spandsp.conf" description="SpanDSP config">
-    <modem-settings>
-<!--
-    total-modems set to N will create that many soft-modems.  
-    If you use them with Hylafax you need the following for each one numbered 0..N:
-
-    1) A line like this in /etc/inittab:
-
-      f0:2345:respawn:/usr/lib/fax/faxgetty /dev/FS0
-
-    2) copy conf/config.FS0 to /var/spool/hylafax/etc (or wherver the appropriate dir is on your system)
-
-    Subsequent modem configs would increment the 0 to 1 and so on.
-
--->
-      <param name="total-modems" value="0"/>
-
-      <!-- Default context and dialplan to use on inbound calls from the modems -->
-      <param name="context" value="default"/>
-      <param name="dialplan" value="XML"/>
-
-      <!-- Extra tracing for debugging -->
-      <param name="verbose" value="false"/>
-    </modem-settings>
-
-    <fax-settings>
-       <param name="use-ecm"           value="true"/>
-       <param name="verbose"           value="false"/>
-       <param name="disable-v17"       value="false"/>
-       <param name="ident"             value="SpanDSP Fax Ident"/>
-       <param name="header"            value="SpanDSP Fax Header"/>
-
-       <param name="spool-dir"         value="/tmp"/>
-       <param name="file-prefix"       value="faxrx"/>
-    </fax-settings>
-
-    <descriptors>
-
-     <!-- These tones are defined in Annex to ITU Operational Bulletin No. 781 - 1.II.2003 -->
-     <!-- Various Tones Used in National Networks (According to ITU-T Recommendation E.180)(03/1998) -->
-
-     <!-- North America -->
-     <descriptor name="1">
-       <tone name="CED_TONE">
-         <element freq1="2100" freq2="0" min="700" max="0"/>
-       </tone>
-       <tone name="SIT">
-         <element freq1="950" freq2="0" min="256" max="400"/>
-         <element freq1="1400" freq2="0" min="256" max="400"/>
-         <element freq1="1800" freq2="0" min="256" max="400"/>
-       </tone>
-       <tone name="RING_TONE" description="North America ring">
-         <element freq1="440" freq2="480" min="1200" max="0"/>
-       </tone>
-       <tone name="REORDER_TONE">
-         <element freq1="480" freq2="620" min="224" max="316"/>
-         <element freq1="0" freq2="0" min="168" max="352"/>
-         <element freq1="480" freq2="620" min="224" max="316"/>
-       </tone>
-       <tone name="BUSY_TONE">
-         <element freq1="480" freq2="620" min="464" max="536"/>
-         <element freq1="0" freq2="0" min="464" max="572"/>
-         <element freq1="480" freq2="620" min="464" max="536"/>
-       </tone>
-     </descriptor>
-
-     <!-- United Kingdom -->
-     <descriptor name="44">
-       <tone name="CED_TONE">
-         <element freq1="2100" freq2="0" min="500" max="0"/>
-       </tone>
-       <tone name="SIT">
-         <element freq1="950" freq2="0" min="256" max="400"/>
-         <element freq1="1400" freq2="0" min="256" max="400"/>
-         <element freq1="1800" freq2="0" min="256" max="400"/>
-       </tone>
-       <tone name="REORDER_TONE">
-         <element freq1="400" freq2="0" min="368" max="416"/>
-         <element freq1="0" freq2="0" min="336" max="368"/>
-         <element freq1="400" freq2="0" min="256" max="288"/>
-         <element freq1="0" freq2="0" min="512" max="544"/>
-       </tone>
-       <tone name="BUSY_TONE">
-         <element freq1="400" freq2="0" min="352" max="384"/>
-         <element freq1="0" freq2="0" min="352" max="384"/>
-         <element freq1="400" freq2="0" min="352" max="384"/>
-         <element freq1="0" freq2="0" min="352" max="384"/>
-       </tone>
-     </descriptor>
-
-     <!-- Germany -->
-     <descriptor name="49">
-       <tone name="CED_TONE">
-         <element freq1="2100" freq2="0" min="500" max="0"/>
-       </tone>
-       <tone name="SIT">
-         <element freq1="900" freq2="0" min="256" max="400"/>
-         <element freq1="1400" freq2="0" min="256" max="400"/>
-         <element freq1="1800" freq2="0" min="256" max="400"/>
-       </tone>
-       <tone name="REORDER_TONE">
-         <element freq1="425" freq2="0" min="224" max="272"/>
-         <element freq1="0" freq2="0" min="224" max="272"/>
-       </tone>
-       <tone name="BUSY_TONE">
-         <element freq1="425" freq2="0" min="464" max="516"/>
-         <element freq1="0" freq2="0" min="464" max="516"/>
-       </tone>
-     </descriptor>
-   </descriptors>
-
-</configuration>
-
diff --git a/conf/rayo/autoload_configs/ssml.conf.xml b/conf/rayo/autoload_configs/ssml.conf.xml
deleted file mode 100644 (file)
index d4e27bf..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<configuration name="ssml.conf" description="SSML parser config">
-
-       <!-- voices in order of preference -->
-       <tts-voices>
-               <voice name="slt" language="en-US" gender="female" prefix="tts://flite|slt|"/>
-               <voice name="kal" language="en-US" gender="male" prefix="tts://flite|kal|"/>
-               <voice name="rms" language="en-US" gender="male" prefix="tts://flite|rms|"/>
-               <voice name="awb" language="en-US" gender="male" prefix="tts://flite|awb|"/>
-       </tts-voices>
-
-       <!-- maps ISO language to say module -->
-       <language-map>
-               <language iso="en-US" say-module="en" language="en"/>
-       </language-map>
-
-       <!-- say voices in order of preference -->
-       <say-voices>
-               <voice name="callie" language="en-US" gender="female" prefix="$${sound_prefix}/"/>
-       </say-voices>
-
-       <!-- map interpret-as to say macros -->
-       <macros>
-               <macro name="ordinal" type="number" method="counted"/>
-               <macro name="cardinal" type="number" method="pronounced"/>
-               <macro name="characters" type="name_spelled" method="pronounced"/>
-               <macro name="telephone" type="telephone_number" method="pronounced"/>
-       </macros>
-
-</configuration>
diff --git a/conf/rayo/autoload_configs/switch.conf.xml b/conf/rayo/autoload_configs/switch.conf.xml
deleted file mode 100644 (file)
index 02aa434..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-<configuration name="switch.conf" description="Core Configuration">
-
-  <cli-keybindings>
-    <key name="1" value="help"/>
-    <key name="2" value="status"/>
-    <key name="3" value="show channels"/>
-    <key name="4" value="show calls"/>
-    <key name="5" value="sofia status"/>
-    <key name="6" value="reloadxml"/>
-    <key name="7" value="console loglevel 0"/>
-    <key name="8" value="console loglevel 7"/>
-    <key name="9" value="sofia status profile internal"/>
-    <key name="10" value="sofia profile internal siptrace on"/>
-    <key name="11" value="sofia profile internal siptrace off"/>
-    <key name="12" value="version"/>
-  </cli-keybindings> 
-  
-  <default-ptimes>
-    <!-- Set this to override the 20ms assumption of various codecs in the sdp with no ptime defined -->
-    <!-- <codec name="G729" ptime="40"/> -->
-  </default-ptimes>
-  
-  <settings>
-    <!-- Colorize the Console -->
-    <param name="colorize-console" value="true"/>
-
-    <!--Include full timestamps in dialplan logs -->
-    <param name="dialplan-timestamps" value="false"/>
-
-    <!-- Run the timer at 20ms by default and drop down as needed unless you set 1m-timer=true which was previous default -->
-    <!-- <param name="1ms-timer" value="true"/> -->
-
-    <!--
-       Set the Switch Name for HA environments.
-       When setting the switch name, it will override the system hostname for all DB and CURL requests
-       allowing cluster environments such as RHCS to have identical FreeSWITCH configurations but run
-       as different hostnames.
-    -->
-    <!-- <param name="switchname" value="freeswitch"/> -->
-
-    <!-- Maximum number of simultaneous DB handles open -->
-    <param name="max-db-handles" value="50"/>
-    <!-- Maximum number of seconds to wait for a new DB handle before failing -->
-    <param name="db-handle-timeout" value="10"/>
-
-    <!-- Minimum idle CPU before refusing calls -->
-    <!-- <param name="min-idle-cpu" value="25"/> -->
-
-    <!--
-       Max number of sessions to allow at any given time.
-       
-       NOTICE: If you're driving 28 T1's in a single box you should set this to 644*2 or 1288
-       this will ensure you're able to use the entire DS3 without a problem.  Otherwise you'll
-       be 144 channels short of always filling that DS3 up which can translate into waste.
-    -->
-    <param name="max-sessions" value="1000"/>
-    <!--Most channels to create per second -->
-    <param name="sessions-per-second" value="30"/>
-    <!-- Default Global Log Level - value is one of debug,info,notice,warning,err,crit,alert -->
-    <param name="loglevel" value="debug"/>
-
-    <!-- Set the core DEBUG level (0-10) -->
-    <!-- <param name="debug-level" value="10"/> -->
-
-    <!-- SQL Buffer length within rage of 32k to 10m -->
-    <!-- <param name="sql-buffer-len" value="1m"/> -->
-    <!-- Maximum SQL Buffer length must be greater than sql-buffer-len -->
-    <!-- <param name="max-sql-buffer-len" value="2m"/> -->
-
-    <!-- 
-        The min-dtmf-duration specifies the minimum DTMF duration to use on 
-        outgoing events. Events shorter than this will be increased in duration
-        to match min_dtmf_duration. You cannot configure a dtmf duration on a 
-        profile that is less than this setting. You may increase this value,
-        but cannot set it lower than 400. This value cannot exceed 
-        max-dtmf-duration. -->
-    <!-- <param name="min-dtmf-duration" value="400"/> -->
-
-    <!-- 
-        The max-dtmf-duration caps the playout of a DTMF event at the specified
-        duration. Events exceeding this duration will be truncated to this
-        duration. You cannot configure a duration on a profile that exceeds
-        this setting. This setting can be lowered, but cannot exceed 192000. 
-        This setting cannot be set lower than min_dtmf_duration. -->
-    <!-- <param name="max-dtmf-duration" value="192000"/> -->
-
-    <!-- 
-        The default_dtmf_duration specifies the DTMF duration to use on
-        originated DTMF events or on events that are received without a
-        duration specified. This value can be increased or lowered. This
-        value is lower-bounded by min_dtmf_duration and upper-bounded by
-        max-dtmf-duration\. -->
-    <!-- <param name="default-dtmf-duration" value="2000"/> -->
-
-    <!--
-       If you want to send out voicemail notifications via Windows you'll need to change the mailer-app
-       variable to the setting below:
-       
-       <param name="mailer-app" value="msmtp"/>
-       
-       Do not change mailer-app-args.
-       You will also need to download a sendmail clone for Windows (msmtp). This version works without issue:
-       http://msmtp.sourceforge.net/index.html. Download and copy the .exe to %winddir%\system32.
-       You'll need to create a small config file for smtp credentials (host name, authentication, tls, etc.) in
-       %USERPROFILE%\Application Data\ called "msmtprc.txt". Below is a sample copy of this file:
-       
-       ###################################
-       # The SMTP server of the provider.
-       account provider
-       host smtp.myisp.com
-       from john@myisp.com
-       auth login
-       user johndoe
-       password mypassword
-       
-       # Set a default account
-       account default : provider
-       ###################################
-       
-    -->    
-
-    <param name="mailer-app" value="sendmail"/>
-    <param name="mailer-app-args" value="-t"/>
-    <param name="dump-cores" value="yes"/>
-
-    <!-- Enable verbose channel events to include every detail about a channel on every event  -->
-    <!-- <param name="verbose-channel-events" value="no"/> -->
-
-    <!-- Enable clock nanosleep -->
-    <!-- <param name="enable-clock-nanosleep" value="true"/> -->
-
-    <!-- Enable monotonic timing -->
-    <!-- <param name="enable-monotonic-timing" value="true"/> -->
-
-    <!-- NEEDS DOCUMENTATION -->
-    <!-- <param name="enable-softtimer-timerfd" value="true"/> -->
-    <!-- <param name="enable-cond-yield" value="true"/> -->
-    <!-- <param name="enable-timer-matrix" value="true"/> -->
-    <!-- <param name="threaded-system-exec" value="true"/> -->
-    <!-- <param name="tipping-point" value="0"/> -->
-    <!-- <param name="timer-affinity" value="disabled"/> -->
-    <!-- NEEDS DOCUMENTATION -->
-
-    <!-- RTP port range -->
-    <!-- <param name="rtp-start-port" value="16384"/> -->
-    <!-- <param name="rtp-end-port" value="32768"/> -->
-
-    <!--
-        Native PostgreSQL support was removed from the FreeSWITCH Core!
-        =================================
-        NOTICE: You MUST enable mod_pgsql        
-        =================================
-        According to https://www.postgresql.org/docs/9.6/libpq-connect.html#LIBPQ-CONNSTRING
-        There are two accepted formats for connection strings supported by the libpq library: 
-        * For plain keyword = value strings use pgsql://
-          pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='' options='-c client_min_messages=NOTICE' application_name='freeswitch'
-        * For RFC 3986 URIs use postgresql:// or postgres://
-          postgresql://
-          postgresql://localhost
-          postgresql://localhost:5433
-          postgresql://localhost/mydb
-          postgresql://user@localhost
-          postgresql://user:secret@localhost
-          postgresql://other@localhost/otherdb?connect_timeout=10&application_name=myapp
-          postgresql:///mydb?host=localhost&port=5433
-    -->
-    <!-- <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='' options='-c client_min_messages=NOTICE' application_name='freeswitch'" /> -->
-    <!-- <param name="core-db-dsn" value="postgresql://freeswitch:@127.0.0.1/freeswitch?options=-c%20client_min_messages%3DNOTICE&application_name=freeswitch" /> -->
-    <!-- <param name="core-db-dsn" value="mariadb://Server=localhost;Database=freeswitch;Uid=freeswitch;Pwd=pass;" /> -->
-    <!-- <param name="core-db-dsn" value="dsn:username:password" /> -->
-    <!-- 
-        Allow to specify the sqlite db at a different location (In this example, move it to ramdrive for
-        better performance on most linux distro (note, you loose the data if you reboot))
-    -->
-    <!-- <param name="core-db-name" value="/dev/shm/core.db" /> -->
-
-    <!-- The system will create all the db schemas automatically, set this to false to avoid this behaviour -->
-    <!-- <param name="auto-create-schemas" value="true"/> -->
-    <!-- <param name="auto-clear-sql" value="true"/> -->
-    <!-- <param name="enable-early-hangup" value="true"/> -->
-
-    <!-- <param name="core-dbtype" value="MSSQL"/> -->
-
-    <!-- Allow multiple registrations to the same account in the central registration table -->
-    <!-- <param name="multiple-registrations" value="true"/> -->
-
-  </settings>
-
-</configuration>
-
diff --git a/conf/rayo/autoload_configs/timezones.conf.xml b/conf/rayo/autoload_configs/timezones.conf.xml
deleted file mode 100644 (file)
index 9ddded7..0000000
+++ /dev/null
@@ -1,661 +0,0 @@
-<configuration name="timezones.conf" description="Timezones">
-    <timezones>
-        <zone name="Africa/Abidjan" value="GMT0" />
-        <zone name="Africa/Accra" value="GMT0" />
-        <zone name="Africa/Addis_Ababa" value="EAT-3" />
-        <zone name="Africa/Algiers" value="CET-1" />
-        <zone name="Africa/Asmara" value="EAT-3" />
-        <zone name="Africa/Asmera" value="EAT-3" />
-        <zone name="Africa/Bamako" value="GMT0" />
-        <zone name="Africa/Bangui" value="WAT-1" />
-        <zone name="Africa/Banjul" value="GMT0" />
-        <zone name="Africa/Bissau" value="GMT0" />
-        <zone name="Africa/Blantyre" value="CAT-2" />
-        <zone name="Africa/Brazzaville" value="WAT-1" />
-        <zone name="Africa/Bujumbura" value="CAT-2" />
-        <zone name="Africa/Cairo" value="EET-2EEST,M4.5.5/0,M10.5.4/24" />
-        <zone name="Africa/Casablanca" value="STD-1" />
-        <zone name="Africa/Ceuta" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Africa/Conakry" value="GMT0" />
-        <zone name="Africa/Dakar" value="GMT0" />
-        <zone name="Africa/Dar_es_Salaam" value="EAT-3" />
-        <zone name="Africa/Djibouti" value="EAT-3" />
-        <zone name="Africa/Douala" value="WAT-1" />
-        <zone name="Africa/El_Aaiun" value="STD-1" />
-        <zone name="Africa/Freetown" value="GMT0" />
-        <zone name="Africa/Gaborone" value="CAT-2" />
-        <zone name="Africa/Harare" value="CAT-2" />
-        <zone name="Africa/Johannesburg" value="SAST-2" />
-        <zone name="Africa/Juba" value="CAT-2" />
-        <zone name="Africa/Kampala" value="EAT-3" />
-        <zone name="Africa/Khartoum" value="CAT-2" />
-        <zone name="Africa/Kigali" value="CAT-2" />
-        <zone name="Africa/Kinshasa" value="WAT-1" />
-        <zone name="Africa/Lagos" value="WAT-1" />
-        <zone name="Africa/Libreville" value="WAT-1" />
-        <zone name="Africa/Lome" value="GMT0" />
-        <zone name="Africa/Luanda" value="WAT-1" />
-        <zone name="Africa/Lubumbashi" value="CAT-2" />
-        <zone name="Africa/Lusaka" value="CAT-2" />
-        <zone name="Africa/Malabo" value="WAT-1" />
-        <zone name="Africa/Maputo" value="CAT-2" />
-        <zone name="Africa/Maseru" value="SAST-2" />
-        <zone name="Africa/Mbabane" value="SAST-2" />
-        <zone name="Africa/Mogadishu" value="EAT-3" />
-        <zone name="Africa/Monrovia" value="GMT0" />
-        <zone name="Africa/Nairobi" value="EAT-3" />
-        <zone name="Africa/Ndjamena" value="WAT-1" />
-        <zone name="Africa/Niamey" value="WAT-1" />
-        <zone name="Africa/Nouakchott" value="GMT0" />
-        <zone name="Africa/Ouagadougou" value="GMT0" />
-        <zone name="Africa/Porto-Novo" value="WAT-1" />
-        <zone name="Africa/Sao_Tome" value="GMT0" />
-        <zone name="Africa/Timbuktu" value="GMT0" />
-        <zone name="Africa/Tripoli" value="EET-2" />
-        <zone name="Africa/Tunis" value="CET-1" />
-        <zone name="Africa/Windhoek" value="CAT-2" />
-
-        <zone name="America/Adak" value="HST10HDT,M3.2.0,M11.1.0" />
-        <zone name="America/Anchorage" value="AKST9AKDT,M3.2.0,M11.1.0" />
-        <zone name="America/Anguilla" value="AST4" />
-        <zone name="America/Antigua" value="AST4" />
-        <zone name="America/Araguaina" value="STD3" />
-        <zone name="America/Argentina/Buenos_Aires" value="STD3" />
-        <zone name="America/Argentina/Catamarca" value="STD3" />
-        <zone name="America/Argentina/ComodRivadavia" value="STD3" />
-        <zone name="America/Argentina/Cordoba" value="STD3" />
-        <zone name="America/Argentina/Jujuy" value="STD3" />
-        <zone name="America/Argentina/La_Rioja" value="STD3" />
-        <zone name="America/Argentina/Mendoza" value="STD3" />
-        <zone name="America/Argentina/Rio_Gallegos" value="STD3" />
-        <zone name="America/Argentina/Salta" value="STD3" />
-        <zone name="America/Argentina/San_Juan" value="STD3" />
-        <zone name="America/Argentina/San_Luis" value="STD3" />
-        <zone name="America/Argentina/Tucuman" value="STD3" />
-        <zone name="America/Argentina/Ushuaia" value="STD3" />
-        <zone name="America/Aruba" value="AST4" />
-        <zone name="America/Asuncion" value="STD4DST,M10.1.0/0,M3.4.0/0" />
-        <zone name="America/Atikokan" value="EST5" />
-        <zone name="America/Atka" value="HST10HDT,M3.2.0,M11.1.0" />
-        <zone name="America/Bahia" value="STD3" />
-        <zone name="America/Bahia_Banderas" value="CST6" />
-        <zone name="America/Barbados" value="AST4" />
-        <zone name="America/Belem" value="STD3" />
-        <zone name="America/Belize" value="CST6" />
-        <zone name="America/Blanc-Sablon" value="AST4" />
-        <zone name="America/Boa_Vista" value="STD4" />
-        <zone name="America/Bogota" value="STD5" />
-        <zone name="America/Boise" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="America/Buenos_Aires" value="STD3" />
-        <zone name="America/Cambridge_Bay" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="America/Campo_Grande" value="STD4" />
-        <zone name="America/Cancun" value="EST5" />
-        <zone name="America/Caracas" value="STD4" />
-        <zone name="America/Catamarca" value="STD3" />
-        <zone name="America/Cayenne" value="STD3" />
-        <zone name="America/Cayman" value="EST5" />
-        <zone name="America/Chicago" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Chihuahua" value="CST6" />
-        <zone name="America/Ciudad_Juarez" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="America/Coral_Harbour" value="EST5" />
-        <zone name="America/Cordoba" value="STD3" />
-        <zone name="America/Costa_Rica" value="CST6" />
-        <zone name="America/Creston" value="MST7" />
-        <zone name="America/Cuiaba" value="STD4" />
-        <zone name="America/Curacao" value="AST4" />
-        <zone name="America/Danmarkshavn" value="GMT0" />
-        <zone name="America/Dawson" value="MST7" />
-        <zone name="America/Dawson_Creek" value="MST7" />
-        <zone name="America/Denver" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="America/Detroit" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Dominica" value="AST4" />
-        <zone name="America/Edmonton" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="America/Eirunepe" value="STD5" />
-        <zone name="America/El_Salvador" value="CST6" />
-        <zone name="America/Ensenada" value="PST8PDT,M3.2.0,M11.1.0" />
-        <zone name="America/Fort_Nelson" value="MST7" />
-        <zone name="America/Fort_Wayne" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Fortaleza" value="STD3" />
-        <zone name="America/Glace_Bay" value="AST4ADT,M3.2.0,M11.1.0" />
-        <zone name="America/Godthab" value="STD2DST,M3.5.0/-1,M10.5.0/0" />
-        <zone name="America/Goose_Bay" value="AST4ADT,M3.2.0,M11.1.0" />
-        <zone name="America/Grand_Turk" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Grenada" value="AST4" />
-        <zone name="America/Guadeloupe" value="AST4" />
-        <zone name="America/Guatemala" value="CST6" />
-        <zone name="America/Guayaquil" value="STD5" />
-        <zone name="America/Guyana" value="STD4" />
-        <zone name="America/Halifax" value="AST4ADT,M3.2.0,M11.1.0" />
-        <zone name="America/Havana" value="CST5CDT,M3.2.0/0,M11.1.0/1" />
-        <zone name="America/Hermosillo" value="MST7" />
-        <zone name="America/Indiana/Indianapolis" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Indiana/Knox" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Indiana/Marengo" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Indiana/Petersburg" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Indiana/Tell_City" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Indiana/Vevay" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Indiana/Vincennes" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Indiana/Winamac" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Indianapolis" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Inuvik" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="America/Iqaluit" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Jamaica" value="EST5" />
-        <zone name="America/Jujuy" value="STD3" />
-        <zone name="America/Juneau" value="AKST9AKDT,M3.2.0,M11.1.0" />
-        <zone name="America/Kentucky/Louisville" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Kentucky/Monticello" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Knox_IN" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Kralendijk" value="AST4" />
-        <zone name="America/La_Paz" value="STD4" />
-        <zone name="America/Lima" value="STD5" />
-        <zone name="America/Los_Angeles" value="PST8PDT,M3.2.0,M11.1.0" />
-        <zone name="America/Louisville" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Lower_Princes" value="AST4" />
-        <zone name="America/Maceio" value="STD3" />
-        <zone name="America/Managua" value="CST6" />
-        <zone name="America/Manaus" value="STD4" />
-        <zone name="America/Marigot" value="AST4" />
-        <zone name="America/Martinique" value="AST4" />
-        <zone name="America/Matamoros" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Mazatlan" value="MST7" />
-        <zone name="America/Mendoza" value="STD3" />
-        <zone name="America/Menominee" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Merida" value="CST6" />
-        <zone name="America/Metlakatla" value="AKST9AKDT,M3.2.0,M11.1.0" />
-        <zone name="America/Mexico_City" value="CST6" />
-        <zone name="America/Miquelon" value="STD3DST,M3.2.0,M11.1.0" />
-        <zone name="America/Moncton" value="AST4ADT,M3.2.0,M11.1.0" />
-        <zone name="America/Monterrey" value="CST6" />
-        <zone name="America/Montevideo" value="STD3" />
-        <zone name="America/Montreal" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Montserrat" value="AST4" />
-        <zone name="America/Nassau" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/New_York" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Nipigon" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Nome" value="AKST9AKDT,M3.2.0,M11.1.0" />
-        <zone name="America/Noronha" value="STD2" />
-        <zone name="America/North_Dakota/Beulah" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/North_Dakota/Center" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/North_Dakota/New_Salem" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Nuuk" value="STD2DST,M3.5.0/-1,M10.5.0/0" />
-        <zone name="America/Ojinaga" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Panama" value="EST5" />
-        <zone name="America/Pangnirtung" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Paramaribo" value="STD3" />
-        <zone name="America/Phoenix" value="MST7" />
-        <zone name="America/Port-au-Prince" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Port_of_Spain" value="AST4" />
-        <zone name="America/Porto_Acre" value="STD5" />
-        <zone name="America/Porto_Velho" value="STD4" />
-        <zone name="America/Puerto_Rico" value="AST4" />
-        <zone name="America/Punta_Arenas" value="STD3" />
-        <zone name="America/Rainy_River" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Rankin_Inlet" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Recife" value="STD3" />
-        <zone name="America/Regina" value="CST6" />
-        <zone name="America/Resolute" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Rio_Branco" value="STD5" />
-        <zone name="America/Rosario" value="STD3" />
-        <zone name="America/Santa_Isabel" value="PST8PDT,M3.2.0,M11.1.0" />
-        <zone name="America/Santarem" value="STD3" />
-        <zone name="America/Santiago" value="STD4DST,M9.1.6/24,M4.1.6/24" />
-        <zone name="America/Santo_Domingo" value="AST4" />
-        <zone name="America/Sao_Paulo" value="STD3" />
-        <zone name="America/Scoresbysund" value="STD1DST,M3.5.0/0,M10.5.0/1" />
-        <zone name="America/Shiprock" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="America/Sitka" value="AKST9AKDT,M3.2.0,M11.1.0" />
-        <zone name="America/St_Barthelemy" value="AST4" />
-        <zone name="America/St_Johns" value="NST3:30NDT,M3.2.0,M11.1.0" />
-        <zone name="America/St_Kitts" value="AST4" />
-        <zone name="America/St_Lucia" value="AST4" />
-        <zone name="America/St_Thomas" value="AST4" />
-        <zone name="America/St_Vincent" value="AST4" />
-        <zone name="America/Swift_Current" value="CST6" />
-        <zone name="America/Tegucigalpa" value="CST6" />
-        <zone name="America/Thule" value="AST4ADT,M3.2.0,M11.1.0" />
-        <zone name="America/Thunder_Bay" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Tijuana" value="PST8PDT,M3.2.0,M11.1.0" />
-        <zone name="America/Toronto" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="America/Tortola" value="AST4" />
-        <zone name="America/Vancouver" value="PST8PDT,M3.2.0,M11.1.0" />
-        <zone name="America/Virgin" value="AST4" />
-        <zone name="America/Whitehorse" value="MST7" />
-        <zone name="America/Winnipeg" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="America/Yakutat" value="AKST9AKDT,M3.2.0,M11.1.0" />
-        <zone name="America/Yellowknife" value="MST7MDT,M3.2.0,M11.1.0" />
-
-        <zone name="Antarctica/Casey" value="STD-11" />
-        <zone name="Antarctica/Davis" value="STD-7" />
-        <zone name="Antarctica/DumontDUrville" value="STD-10" />
-        <zone name="Antarctica/Macquarie" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Antarctica/Mawson" value="STD-5" />
-        <zone name="Antarctica/McMurdo" value="NZST-12NZDT,M9.5.0,M4.1.0/3" />
-        <zone name="Antarctica/Palmer" value="STD3" />
-        <zone name="Antarctica/Rothera" value="STD3" />
-        <zone name="Antarctica/South_Pole" value="NZST-12NZDT,M9.5.0,M4.1.0/3" />
-        <zone name="Antarctica/Syowa" value="STD-3" />
-        <zone name="Antarctica/Troll" value="STD-0DST-2,M3.5.0/1,M10.5.0/3" />
-        <zone name="Antarctica/Vostok" value="STD-6" />
-
-        <zone name="Arctic/Longyearbyen" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-
-        <zone name="Asia/Aden" value="STD-3" />
-        <zone name="Asia/Almaty" value="STD-6" />
-        <zone name="Asia/Amman" value="STD-3" />
-        <zone name="Asia/Anadyr" value="STD-12" />
-        <zone name="Asia/Aqtau" value="STD-5" />
-        <zone name="Asia/Aqtobe" value="STD-5" />
-        <zone name="Asia/Ashgabat" value="STD-5" />
-        <zone name="Asia/Ashkhabad" value="STD-5" />
-        <zone name="Asia/Atyrau" value="STD-5" />
-        <zone name="Asia/Baghdad" value="STD-3" />
-        <zone name="Asia/Bahrain" value="STD-3" />
-        <zone name="Asia/Baku" value="STD-4" />
-        <zone name="Asia/Bangkok" value="STD-7" />
-        <zone name="Asia/Barnaul" value="STD-7" />
-        <zone name="Asia/Beirut" value="EET-2EEST,M3.5.0/0,M10.5.0/0" />
-        <zone name="Asia/Bishkek" value="STD-6" />
-        <zone name="Asia/Brunei" value="STD-8" />
-        <zone name="Asia/Calcutta" value="IST-5:30" />
-        <zone name="Asia/Chita" value="STD-9" />
-        <zone name="Asia/Choibalsan" value="STD-8" />
-        <zone name="Asia/Chongqing" value="CST-8" />
-        <zone name="Asia/Chungking" value="CST-8" />
-        <zone name="Asia/Colombo" value="STD-5:30" />
-        <zone name="Asia/Dacca" value="STD-6" />
-        <zone name="Asia/Damascus" value="STD-3" />
-        <zone name="Asia/Dhaka" value="STD-6" />
-        <zone name="Asia/Dili" value="STD-9" />
-        <zone name="Asia/Dubai" value="STD-4" />
-        <zone name="Asia/Dushanbe" value="STD-5" />
-        <zone name="Asia/Famagusta" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Asia/Gaza" value="EET-2EEST,M3.4.4/50,M10.4.4/50" />
-        <zone name="Asia/Harbin" value="CST-8" />
-        <zone name="Asia/Hebron" value="EET-2EEST,M3.4.4/50,M10.4.4/50" />
-        <zone name="Asia/Ho_Chi_Minh" value="STD-7" />
-        <zone name="Asia/Hong_Kong" value="HKT-8" />
-        <zone name="Asia/Hovd" value="STD-7" />
-        <zone name="Asia/Irkutsk" value="STD-8" />
-        <zone name="Asia/Istanbul" value="STD-3" />
-        <zone name="Asia/Jakarta" value="WIB-7" />
-        <zone name="Asia/Jayapura" value="WIT-9" />
-        <zone name="Asia/Jerusalem" value="IST-2IDT,M3.4.4/26,M10.5.0" />
-        <zone name="Asia/Kabul" value="STD-4:30" />
-        <zone name="Asia/Kamchatka" value="STD-12" />
-        <zone name="Asia/Karachi" value="PKT-5" />
-        <zone name="Asia/Kashgar" value="STD-6" />
-        <zone name="Asia/Kathmandu" value="STD-5:45" />
-        <zone name="Asia/Katmandu" value="STD-5:45" />
-        <zone name="Asia/Khandyga" value="STD-9" />
-        <zone name="Asia/Kolkata" value="IST-5:30" />
-        <zone name="Asia/Krasnoyarsk" value="STD-7" />
-        <zone name="Asia/Kuala_Lumpur" value="STD-8" />
-        <zone name="Asia/Kuching" value="STD-8" />
-        <zone name="Asia/Kuwait" value="STD-3" />
-        <zone name="Asia/Macao" value="CST-8" />
-        <zone name="Asia/Macau" value="CST-8" />
-        <zone name="Asia/Magadan" value="STD-11" />
-        <zone name="Asia/Makassar" value="WITA-8" />
-        <zone name="Asia/Manila" value="PST-8" />
-        <zone name="Asia/Muscat" value="STD-4" />
-        <zone name="Asia/Nicosia" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Asia/Novokuznetsk" value="STD-7" />
-        <zone name="Asia/Novosibirsk" value="STD-7" />
-        <zone name="Asia/Omsk" value="STD-6" />
-        <zone name="Asia/Oral" value="STD-5" />
-        <zone name="Asia/Phnom_Penh" value="STD-7" />
-        <zone name="Asia/Pontianak" value="WIB-7" />
-        <zone name="Asia/Pyongyang" value="KST-9" />
-        <zone name="Asia/Qatar" value="STD-3" />
-        <zone name="Asia/Qostanay" value="STD-6" />
-        <zone name="Asia/Qyzylorda" value="STD-5" />
-        <zone name="Asia/Rangoon" value="STD-6:30" />
-        <zone name="Asia/Riyadh" value="STD-3" />
-        <zone name="Asia/Saigon" value="STD-7" />
-        <zone name="Asia/Sakhalin" value="STD-11" />
-        <zone name="Asia/Samarkand" value="STD-5" />
-        <zone name="Asia/Seoul" value="KST-9" />
-        <zone name="Asia/Shanghai" value="CST-8" />
-        <zone name="Asia/Singapore" value="STD-8" />
-        <zone name="Asia/Srednekolymsk" value="STD-11" />
-        <zone name="Asia/Taipei" value="CST-8" />
-        <zone name="Asia/Tashkent" value="STD-5" />
-        <zone name="Asia/Tbilisi" value="STD-4" />
-        <zone name="Asia/Tehran" value="STD-3:30" />
-        <zone name="Asia/Tel_Aviv" value="IST-2IDT,M3.4.4/26,M10.5.0" />
-        <zone name="Asia/Thimbu" value="STD-6" />
-        <zone name="Asia/Thimphu" value="STD-6" />
-        <zone name="Asia/Tokyo" value="JST-9" />
-        <zone name="Asia/Tomsk" value="STD-7" />
-        <zone name="Asia/Ujung_Pandang" value="WITA-8" />
-        <zone name="Asia/Ulaanbaatar" value="STD-8" />
-        <zone name="Asia/Ulan_Bator" value="STD-8" />
-        <zone name="Asia/Urumqi" value="STD-6" />
-        <zone name="Asia/Ust-Nera" value="STD-10" />
-        <zone name="Asia/Vientiane" value="STD-7" />
-        <zone name="Asia/Vladivostok" value="STD-10" />
-        <zone name="Asia/Yakutsk" value="STD-9" />
-        <zone name="Asia/Yangon" value="STD-6:30" />
-        <zone name="Asia/Yekaterinburg" value="STD-5" />
-        <zone name="Asia/Yerevan" value="STD-4" />
-
-        <zone name="Atlantic/Azores" value="STD1DST,M3.5.0/0,M10.5.0/1" />
-        <zone name="Atlantic/Bermuda" value="AST4ADT,M3.2.0,M11.1.0" />
-        <zone name="Atlantic/Canary" value="WET0WEST,M3.5.0/1,M10.5.0" />
-        <zone name="Atlantic/Cape_Verde" value="STD1" />
-        <zone name="Atlantic/Faeroe" value="WET0WEST,M3.5.0/1,M10.5.0" />
-        <zone name="Atlantic/Faroe" value="WET0WEST,M3.5.0/1,M10.5.0" />
-        <zone name="Atlantic/Jan_Mayen" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Atlantic/Madeira" value="WET0WEST,M3.5.0/1,M10.5.0" />
-        <zone name="Atlantic/Reykjavik" value="GMT0" />
-        <zone name="Atlantic/South_Georgia" value="STD2" />
-        <zone name="Atlantic/St_Helena" value="GMT0" />
-        <zone name="Atlantic/Stanley" value="STD3" />
-
-        <zone name="Australia/ACT" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/Adelaide" value="ACST-9:30ACDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/Brisbane" value="AEST-10" />
-        <zone name="Australia/Broken_Hill" value="ACST-9:30ACDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/Canberra" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/Currie" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/Darwin" value="ACST-9:30" />
-        <zone name="Australia/Eucla" value="STD-8:45" />
-        <zone name="Australia/Hobart" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/LHI" value="STD-10:30DST-11,M10.1.0,M4.1.0" />
-        <zone name="Australia/Lindeman" value="AEST-10" />
-        <zone name="Australia/Lord_Howe" value="STD-10:30DST-11,M10.1.0,M4.1.0" />
-        <zone name="Australia/Melbourne" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/NSW" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/North" value="ACST-9:30" />
-        <zone name="Australia/Perth" value="AWST-8" />
-        <zone name="Australia/Queensland" value="AEST-10" />
-        <zone name="Australia/South" value="ACST-9:30ACDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/Sydney" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/Tasmania" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/Victoria" value="AEST-10AEDT,M10.1.0,M4.1.0/3" />
-        <zone name="Australia/West" value="AWST-8" />
-        <zone name="Australia/Yancowinna" value="ACST-9:30ACDT,M10.1.0,M4.1.0/3" />
-
-        <zone name="Brazil/Acre" value="STD5" />
-        <zone name="Brazil/DeNoronha" value="STD2" />
-        <zone name="Brazil/East" value="STD3" />
-        <zone name="Brazil/West" value="STD4" />
-
-        <zone name="CET" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-
-        <zone name="CST6CDT" value="CST6CDT,M3.2.0,M11.1.0" />
-
-        <zone name="Canada/Atlantic" value="AST4ADT,M3.2.0,M11.1.0" />
-        <zone name="Canada/Central" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="Canada/Eastern" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="Canada/Mountain" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="Canada/Newfoundland" value="NST3:30NDT,M3.2.0,M11.1.0" />
-        <zone name="Canada/Pacific" value="PST8PDT,M3.2.0,M11.1.0" />
-        <zone name="Canada/Saskatchewan" value="CST6" />
-        <zone name="Canada/Yukon" value="MST7" />
-
-        <zone name="Chile/Continental" value="STD4DST,M9.1.6/24,M4.1.6/24" />
-        <zone name="Chile/EasterIsland" value="STD6DST,M9.1.6/22,M4.1.6/22" />
-
-        <zone name="Cuba" value="CST5CDT,M3.2.0/0,M11.1.0/1" />
-
-        <zone name="EET" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-
-        <zone name="EST" value="EST5" />
-
-        <zone name="EST5EDT" value="EST5EDT,M3.2.0,M11.1.0" />
-
-        <zone name="Egypt" value="EET-2EEST,M4.5.5/0,M10.5.4/24" />
-
-        <zone name="Eire" value="IST-1GMT0,M10.5.0,M3.5.0/1" />
-
-        <zone name="Etc/GMT" value="GMT0" />
-        <zone name="Etc/GMT+0" value="GMT0" />
-        <zone name="Etc/GMT+1" value="GMT1" />
-        <zone name="Etc/GMT+10" value="GMT10" />
-        <zone name="Etc/GMT+11" value="GMT11" />
-        <zone name="Etc/GMT+12" value="GMT12" />
-        <zone name="Etc/GMT+2" value="GMT2" />
-        <zone name="Etc/GMT+3" value="GMT3" />
-        <zone name="Etc/GMT+4" value="GMT4" />
-        <zone name="Etc/GMT+5" value="GMT5" />
-        <zone name="Etc/GMT+6" value="GMT6" />
-        <zone name="Etc/GMT+7" value="GMT7" />
-        <zone name="Etc/GMT+8" value="GMT8" />
-        <zone name="Etc/GMT+9" value="GMT9" />
-        <zone name="Etc/GMT-0" value="GMT0" />
-        <zone name="Etc/GMT-1" value="GMT-1" />
-        <zone name="Etc/GMT-10" value="GMT-10" />
-        <zone name="Etc/GMT-11" value="GMT-11" />
-        <zone name="Etc/GMT-12" value="GMT-12" />
-        <zone name="Etc/GMT-13" value="GMT-13" />
-        <zone name="Etc/GMT-14" value="GMT-14" />
-        <zone name="Etc/GMT-2" value="GMT-2" />
-        <zone name="Etc/GMT-3" value="GMT-3" />
-        <zone name="Etc/GMT-4" value="GMT-4" />
-        <zone name="Etc/GMT-5" value="GMT-5" />
-        <zone name="Etc/GMT-6" value="GMT-6" />
-        <zone name="Etc/GMT-7" value="GMT-7" />
-        <zone name="Etc/GMT-8" value="GMT-8" />
-        <zone name="Etc/GMT-9" value="GMT-9" />
-        <zone name="Etc/GMT0" value="GMT0" />
-        <zone name="Etc/Greenwich" value="GMT0" />
-        <zone name="Etc/UCT" value="UTC0" />
-        <zone name="Etc/UTC" value="UTC0" />
-        <zone name="Etc/Universal" value="UTC0" />
-        <zone name="Etc/Zulu" value="UTC0" />
-
-        <zone name="Europe/Amsterdam" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Andorra" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Astrakhan" value="STD-4" />
-        <zone name="Europe/Athens" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Belfast" value="GMT0BST,M3.5.0/1,M10.5.0" />
-        <zone name="Europe/Belgrade" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Berlin" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Bratislava" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Brussels" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Bucharest" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Budapest" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Busingen" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Chisinau" value="EET-2EEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Copenhagen" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Dublin" value="IST-1GMT0,M10.5.0,M3.5.0/1" />
-        <zone name="Europe/Gibraltar" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Guernsey" value="GMT0BST,M3.5.0/1,M10.5.0" />
-        <zone name="Europe/Helsinki" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Isle_of_Man" value="GMT0BST,M3.5.0/1,M10.5.0" />
-        <zone name="Europe/Istanbul" value="STD-3" />
-        <zone name="Europe/Jersey" value="GMT0BST,M3.5.0/1,M10.5.0" />
-        <zone name="Europe/Kaliningrad" value="EET-2" />
-        <zone name="Europe/Kiev" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Kirov" value="MSK-3" />
-        <zone name="Europe/Kyiv" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Lisbon" value="WET0WEST,M3.5.0/1,M10.5.0" />
-        <zone name="Europe/Ljubljana" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/London" value="GMT0BST,M3.5.0/1,M10.5.0" />
-        <zone name="Europe/Luxembourg" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Madrid" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Malta" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Mariehamn" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Minsk" value="STD-3" />
-        <zone name="Europe/Monaco" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Moscow" value="MSK-3" />
-        <zone name="Europe/Nicosia" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Oslo" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Paris" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Podgorica" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Prague" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Riga" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Rome" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Samara" value="STD-4" />
-        <zone name="Europe/San_Marino" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Sarajevo" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Saratov" value="STD-4" />
-        <zone name="Europe/Simferopol" value="MSK-3" />
-        <zone name="Europe/Skopje" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Sofia" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Stockholm" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Tallinn" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Tirane" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Tiraspol" value="EET-2EEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Ulyanovsk" value="STD-4" />
-        <zone name="Europe/Uzhgorod" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Vaduz" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Vatican" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Vienna" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Vilnius" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Volgograd" value="MSK-3" />
-        <zone name="Europe/Warsaw" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Zagreb" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-        <zone name="Europe/Zaporozhye" value="EET-2EEST,M3.5.0/3,M10.5.0/4" />
-        <zone name="Europe/Zurich" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-
-        <zone name="Factory" value="STD0" />
-
-        <zone name="GB" value="GMT0BST,M3.5.0/1,M10.5.0" />
-
-        <zone name="GB-Eire" value="GMT0BST,M3.5.0/1,M10.5.0" />
-
-        <zone name="GMT" value="GMT0" />
-
-        <zone name="GMT+0" value="GMT0" />
-
-        <zone name="GMT-0" value="GMT0" />
-
-        <zone name="GMT0" value="GMT0" />
-
-        <zone name="Greenwich" value="GMT0" />
-
-        <zone name="HST" value="HST10" />
-
-        <zone name="Hongkong" value="HKT-8" />
-
-        <zone name="Iceland" value="GMT0" />
-
-        <zone name="Indian/Antananarivo" value="EAT-3" />
-        <zone name="Indian/Chagos" value="STD-6" />
-        <zone name="Indian/Christmas" value="STD-7" />
-        <zone name="Indian/Cocos" value="STD-6:30" />
-        <zone name="Indian/Comoro" value="EAT-3" />
-        <zone name="Indian/Kerguelen" value="STD-5" />
-        <zone name="Indian/Mahe" value="STD-4" />
-        <zone name="Indian/Maldives" value="STD-5" />
-        <zone name="Indian/Mauritius" value="STD-4" />
-        <zone name="Indian/Mayotte" value="EAT-3" />
-        <zone name="Indian/Reunion" value="STD-4" />
-
-        <zone name="Iran" value="STD-3:30" />
-
-        <zone name="Israel" value="IST-2IDT,M3.4.4/26,M10.5.0" />
-
-        <zone name="Jamaica" value="EST5" />
-
-        <zone name="Japan" value="JST-9" />
-
-        <zone name="Kwajalein" value="STD-12" />
-
-        <zone name="Libya" value="EET-2" />
-
-        <zone name="MET" value="MET-1MEST,M3.5.0,M10.5.0/3" />
-
-        <zone name="MST" value="MST7" />
-
-        <zone name="MST7MDT" value="MST7MDT,M3.2.0,M11.1.0" />
-
-        <zone name="Mexico/BajaNorte" value="PST8PDT,M3.2.0,M11.1.0" />
-        <zone name="Mexico/BajaSur" value="MST7" />
-        <zone name="Mexico/General" value="CST6" />
-
-        <zone name="NZ" value="NZST-12NZDT,M9.5.0,M4.1.0/3" />
-
-        <zone name="NZ-CHAT" value="STD-12:45DST,M9.5.0/2:45,M4.1.0/3:45" />
-
-        <zone name="Navajo" value="MST7MDT,M3.2.0,M11.1.0" />
-
-        <zone name="PRC" value="CST-8" />
-
-        <zone name="PST8PDT" value="PST8PDT,M3.2.0,M11.1.0" />
-
-        <zone name="Pacific/Apia" value="STD-13" />
-        <zone name="Pacific/Auckland" value="NZST-12NZDT,M9.5.0,M4.1.0/3" />
-        <zone name="Pacific/Bougainville" value="STD-11" />
-        <zone name="Pacific/Chatham" value="STD-12:45DST,M9.5.0/2:45,M4.1.0/3:45" />
-        <zone name="Pacific/Chuuk" value="STD-10" />
-        <zone name="Pacific/Easter" value="STD6DST,M9.1.6/22,M4.1.6/22" />
-        <zone name="Pacific/Efate" value="STD-11" />
-        <zone name="Pacific/Enderbury" value="STD-13" />
-        <zone name="Pacific/Fakaofo" value="STD-13" />
-        <zone name="Pacific/Fiji" value="STD-12" />
-        <zone name="Pacific/Funafuti" value="STD-12" />
-        <zone name="Pacific/Galapagos" value="STD6" />
-        <zone name="Pacific/Gambier" value="STD9" />
-        <zone name="Pacific/Guadalcanal" value="STD-11" />
-        <zone name="Pacific/Guam" value="ChST-10" />
-        <zone name="Pacific/Honolulu" value="HST10" />
-        <zone name="Pacific/Johnston" value="HST10" />
-        <zone name="Pacific/Kanton" value="STD-13" />
-        <zone name="Pacific/Kiritimati" value="STD-14" />
-        <zone name="Pacific/Kosrae" value="STD-11" />
-        <zone name="Pacific/Kwajalein" value="STD-12" />
-        <zone name="Pacific/Majuro" value="STD-12" />
-        <zone name="Pacific/Marquesas" value="STD9:30" />
-        <zone name="Pacific/Midway" value="SST11" />
-        <zone name="Pacific/Nauru" value="STD-12" />
-        <zone name="Pacific/Niue" value="STD11" />
-        <zone name="Pacific/Norfolk" value="STD-11DST,M10.1.0,M4.1.0/3" />
-        <zone name="Pacific/Noumea" value="STD-11" />
-        <zone name="Pacific/Pago_Pago" value="SST11" />
-        <zone name="Pacific/Palau" value="STD-9" />
-        <zone name="Pacific/Pitcairn" value="STD8" />
-        <zone name="Pacific/Pohnpei" value="STD-11" />
-        <zone name="Pacific/Ponape" value="STD-11" />
-        <zone name="Pacific/Port_Moresby" value="STD-10" />
-        <zone name="Pacific/Rarotonga" value="STD10" />
-        <zone name="Pacific/Saipan" value="ChST-10" />
-        <zone name="Pacific/Samoa" value="SST11" />
-        <zone name="Pacific/Tahiti" value="STD10" />
-        <zone name="Pacific/Tarawa" value="STD-12" />
-        <zone name="Pacific/Tongatapu" value="STD-13" />
-        <zone name="Pacific/Truk" value="STD-10" />
-        <zone name="Pacific/Wake" value="STD-12" />
-        <zone name="Pacific/Wallis" value="STD-12" />
-        <zone name="Pacific/Yap" value="STD-10" />
-
-        <zone name="Poland" value="CET-1CEST,M3.5.0,M10.5.0/3" />
-
-        <zone name="Portugal" value="WET0WEST,M3.5.0/1,M10.5.0" />
-
-        <zone name="ROC" value="CST-8" />
-
-        <zone name="ROK" value="KST-9" />
-
-        <zone name="Singapore" value="STD-8" />
-
-        <zone name="Turkey" value="STD-3" />
-
-        <zone name="UCT" value="UTC0" />
-
-        <zone name="US/Alaska" value="AKST9AKDT,M3.2.0,M11.1.0" />
-        <zone name="US/Aleutian" value="HST10HDT,M3.2.0,M11.1.0" />
-        <zone name="US/Arizona" value="MST7" />
-        <zone name="US/Central" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="US/East-Indiana" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="US/Eastern" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="US/Hawaii" value="HST10" />
-        <zone name="US/Indiana-Starke" value="CST6CDT,M3.2.0,M11.1.0" />
-        <zone name="US/Michigan" value="EST5EDT,M3.2.0,M11.1.0" />
-        <zone name="US/Mountain" value="MST7MDT,M3.2.0,M11.1.0" />
-        <zone name="US/Pacific" value="PST8PDT,M3.2.0,M11.1.0" />
-        <zone name="US/Samoa" value="SST11" />
-
-        <zone name="UTC" value="UTC0" />
-
-        <zone name="Universal" value="UTC0" />
-
-        <zone name="W-SU" value="MSK-3" />
-
-        <zone name="WET" value="WET0WEST,M3.5.0/1,M10.5.0" />
-
-        <zone name="Zulu" value="UTC0" />
-    </timezones>
-</configuration>
diff --git a/conf/rayo/cacert.pem b/conf/rayo/cacert.pem
deleted file mode 100644 (file)
index 72e1417..0000000
+++ /dev/null
@@ -1,3366 +0,0 @@
-##
-## ca-bundle.crt -- Bundle of CA Root Certificates
-##
-## Certificate data from Mozilla as of: Sun Feb 19 04:03:37 2012
-##
-## This is a bundle of X.509 certificates of public Certificate Authorities
-## (CA). These were automatically extracted from Mozilla's root certificates
-## file (certdata.txt).  This file can be found in the mozilla source tree:
-## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
-##
-## It contains the certificates in PEM format and therefore
-## can be directly used with curl / libcurl / php_curl, or with
-## an Apache+mod_ssl webserver for SSL client authentication.
-## Just configure this file as the SSLCACertificateFile.
-##
-
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is the Netscape security libraries.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1994-2000
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-# @(#) $RCSfile: certdata.txt,v $ $Revision: 1.82 $ $Date: 2012/02/18 21:41:46 $
-
-GTE CyberTrust Global Root
-==========================
------BEGIN CERTIFICATE-----
-MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg
-Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG
-A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz
-MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL
-Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0
-IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u
-sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql
-HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1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DEtMCsGA1UE
-CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG
-A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS
-spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB
-Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961
-zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB
-BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95
-70+sB3c4
------END CERTIFICATE-----
-
-Digital Signature Trust Co. Global CA 1
-=======================================
------BEGIN CERTIFICATE-----
-MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE
-ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMTAeFw05ODEy
-MTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs
-IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUA
-A4GLADCBhwKBgQCgbIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJE
-NySZj9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlVSn5JTe2i
-o74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo
-BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
-dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw
-IoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQY
-MBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAM
-BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
-ACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEq
-kzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4
-RbyhkwS7hp86W0N6w4pl
------END CERTIFICATE-----
-
-Digital Signature Trust Co. Global CA 3
-=======================================
------BEGIN CERTIFICATE-----
-MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE
-ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMjAeFw05ODEy
-MDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs
-IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUA
-A4GLADCBhwKBgQC/k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGOD
-VvsoLeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3oTQPMx7JS
-xhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo
-BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0
-dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw
-IoAPMTk5ODEyMDkxOTE3MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQY
-MBaAFB6CTShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5WzAM
-BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB
-AEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHRxdf0CiUPPXiBng+xZ8SQTGPdXqfi
-up/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVLB3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1
-mPnHfxsb1gYgAlihw6ID
------END CERTIFICATE-----
-
-Verisign Class 3 Public Primary Certification Authority
-=======================================================
------BEGIN CERTIFICATE-----
-MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx
-FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5
-IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow
-XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz
-IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA
-A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94
-f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol
-hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA
-TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah
-WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf
-Tqj/ZA1k
------END CERTIFICATE-----
-
-Verisign Class 3 Public Primary Certification Authority - G2
-============================================================
------BEGIN CERTIFICATE-----
-MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT
-MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
-eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln
-biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz
-dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT
-MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy
-eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIE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YJBtYze4D1gCCAPRX5r
-on+jjBXu
------END CERTIFICATE-----
-
-Verisign Class 3 Public Primary Certification Authority - G3
-============================================================
------BEGIN CERTIFICATE-----
-MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
-CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
-dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
-cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1
-EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc
-cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw
-EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj
-055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
-ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f
-j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC
-/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0
-xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa
-t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ==
------END CERTIFICATE-----
-
-Verisign Class 4 Public Primary Certification Authority - G3
-============================================================
------BEGIN CERTIFICATE-----
-MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl
-IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw
-CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy
-dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv
-cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg
-Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
-ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS
-tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM
-8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW
-Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX
-Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA
-j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt
-mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm
-fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd
-RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG
-UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg==
------END CERTIFICATE-----
-
-Entrust.net Secure Server CA
-============================
------BEGIN CERTIFICATE-----
-MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNV
-BAoTC0VudHJ1c3QubmV0MTswOQYDVQ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pZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu
-dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0MFqBDzIwMTkw
-NTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8BdiE1U9s/8KAGv7UISX8+1i0Bow
-HQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAaMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA
-BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyN
-Ewr75Ji174z4xRAN95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9
-n9cd2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI=
------END CERTIFICATE-----
-
-Entrust.net Premium 2048 Secure Server CA
-=========================================
------BEGIN CERTIFICATE-----
-MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u
-ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp
-bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV
-BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx
-NzUwNTFaFw0xOTEyMjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3
-d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIG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PR0ml8xQ==
------END CERTIFICATE-----
-
-Baltimore CyberTrust Root
-=========================
------BEGIN CERTIFICATE-----
-MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE
-ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li
-ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC
-SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs
-dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME
-uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB
-UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C
-G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9
-XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr
-l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI
-VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB
-BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh
-cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5
-hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa
-Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H
-RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp
------END CERTIFICATE-----
-
-Equifax Secure Global eBusiness CA
-==================================
------BEGIN CERTIFICATE-----
-MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
-RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp
-bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx
-HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds
-b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV
-PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN
-qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn
-hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j
-BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs
-MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN
-I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY
-NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV
------END CERTIFICATE-----
-
-Equifax Secure eBusiness CA 1
-=============================
------BEGIN CERTIFICATE-----
-MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
-RXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENB
-LTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQwMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UE
-ChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNz
-IENBLTEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ
-1MRoRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBuWqDZQu4a
-IZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKwEnv+j6YDAgMBAAGjZjBk
-MBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kW
-Nl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRKeDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQF
-AAOBgQB1W6ibAxHm6VZMzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5
-lSE/9dR+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN/Bf+
-KpYrtWKmpj29f5JZzVoqgrI3eQ==
------END CERTIFICATE-----
-
-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lia
-78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUm
-V+GRMOrN
------END CERTIFICATE-----
-
-AddTrust Low-Value Services Root
-================================
------BEGIN CERTIFICATE-----
-MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
-QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRU
-cnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMwMTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQsw
-CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBO
-ZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEB
-AQUAA4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ulCDtbKRY6
-54eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6ntGO0/7Gcrjyvd7ZWxbWr
-oulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyldI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1
-Zmne3yzxbrww2ywkEtvrNTVokMsAsJchPXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJui
-GMx1I4S+6+JNM3GOGvDC+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8w
-HQYDVR0OBBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8EBTAD
-AQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBlMQswCQYDVQQGEwJT
-RTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEw
-HwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxt
-ZBsfzQ3duQH6lmM0MkhHma6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph
-iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY
-eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr
-mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj
-ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk=
------END CERTIFICATE-----
-
-AddTrust External Root
-======================
------BEGIN CERTIFICATE-----
-MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
-QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD
-VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw
-NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU
-cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg
-Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821
-+iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw
-Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo
-aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy
-2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7
-7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P
-BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL
-VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk
-VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB
-IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl
-j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5
-6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355
-e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u
-G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ=
------END CERTIFICATE-----
-
-AddTrust Public Services Root
-=============================
------BEGIN CERTIFICATE-----
-MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG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NojVhaTdt02KLmuG7jD8WS6IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL
-+YPoRNWyQSW/iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao
-GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9
-Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H
-EufOX1362KqxMy3ZdvJOOjMMK7MtkAY=
------END CERTIFICATE-----
-
-AddTrust Qualified Certificates Root
-====================================
------BEGIN CERTIFICATE-----
-MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML
-QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU
-cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx
-CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ
-IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG
-9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwqxBb/4Oxx
-64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G87B4pfYOQnrjfxvM0PC3
-KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i2O+tCBGaKZnhqkRFmhJePp1tUvznoD1o
-L/BLcHwTOK28FSXx1s6rosAx1i+f4P8UWfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GR
-wVY18BTcZTYJbqukB8c10cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HU
-MIHRMB0GA1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/
-BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6FrpGkwZzELMAkGA1UE
-BhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29y
-azEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlmaWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQAD
-ggEBABmrder4i2VhlRO6aQTvhsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxG
-GuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X
-dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9ze
-RXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDB
-iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE=
------END CERTIFICATE-----
-
-Entrust Root Certification Authority
-====================================
------BEGIN CERTIFICATE-----
-MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV
-BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw
-b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMD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RgrFg5fNuH8KrUwJM/gYwx7WBr+
-mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq
-A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg
-Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP
-pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d
-FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp
-gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm
-X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS
------END CERTIFICATE-----
-
-America Online Root Certification Authority 1
-=============================================
------BEGIN CERTIFICATE-----
-MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
-QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp
-Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG
-A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg
-T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD
-ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG
-v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z
-DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh
-sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP
-8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T
-AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z
-o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf
-GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF
-VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft
-3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g
-Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds
-sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7
------END CERTIFICATE-----
-
-America Online Root Certification Authority 2
-=============================================
------BEGIN CERTIFICATE-----
-MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
-QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp
-Y2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2MDAwMFoXDTM3MDkyOTE0MD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XKpVpDM3SHpR7LZQdqnXXs5jLrLxkU0C8j6ysNstc
-rbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rC
-oznl2yY4rYsK7hljxxwk3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3V
-p6ea5EQz6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNVHQ4E
-FgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w
-gYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1NlY3VyZUNlcnRpZmlj
-YXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRwOi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlm
-aWNhdGVTZXJ2aWNlcy5jcmwwDQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm
-4J4oqF7Tt/Q05qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj
-Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRL
-DXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw
-pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H
-RR3B7Hzs/Sk=
------END CERTIFICATE-----
-
-Comodo Trusted Services root
-============================
------BEGIN CERTIFICATE-----
-MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS
-R3JlYXRlciBNYW5jaGVzdGVy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2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp
-8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC
-bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu
-g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p
-vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr
-qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto=
------END CERTIFICATE-----
-
-Security Communication Root CA
-==============================
------BEGIN CERTIFICATE-----
-MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
-U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
-HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP
-U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw
-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw
-8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM
-DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX
-5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd
-DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2
-JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw
-DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g
-0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a
-mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ
-s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ
-6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi
-FL39vmwLAw==
------END CERTIFICATE-----
-
-Sonera Class 2 Root CA
-======================
------BEGIN CERTIFICATE-----
-MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG
-U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw
-NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh
-IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3
-/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT
-dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG
-f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P
-tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH
-nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT
-XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt
-0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI
-cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph
-Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx
-EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH
-llpwrN9M
------END CERTIFICATE-----
-
-Staat der Nederlanden Root CA
-=============================
------BEGIN CERTIFICATE-----
-MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UE
-ChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-Um9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEyMTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4w
-HAYDVQQKExVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxh
-bmRlbiBSb290IENBMIIBIjANBgkqhki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kn
-iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67
-nfhmqA==
------END CERTIFICATE-----
-
-Camerfirma Chambers of Commerce Root
-====================================
------BEGIN CERTIFICATE-----
-MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe
-QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i
-ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx
-NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp
-cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn
-MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC
-AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU
-xFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0dBmpAPrMMhe5cG3nCYsS4No41XQEMIwRH
-NaqbYE6gZj3LJgqcQKH0XZi/caulAGgq7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jW
-DA+wWFjbw2Y3npuRVDM30pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFV
-d9oKDMyXroDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIGA1Ud
-EwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5jaGFtYmVyc2lnbi5v
-cmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p26EpW1eLTXYGduHRooowDgYDVR0P
-AQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hh
-bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD
-VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz
-aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi
-fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD
-L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN
-UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n
-ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1
-erfutGWaIZDgqtCYvDi1czyL+Nw=
------END CERTIFICATE-----
-
-Camerfirma Global Chambersign Root
-==================================
------BEGIN CERTIFICATE-----
-MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe
-QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i
-ZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYx
-NDE4WhcNMzcwOTMwMTY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DANBgkqhkiG9w0BAQUFAAOCAQEA
-PDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y
-gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ
-PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4
-IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes
-t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A==
------END CERTIFICATE-----
-
-NetLock Notary (Class A) Root
-=============================
------BEGIN CERTIFICATE-----
-MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQI
-EwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6
-dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9j
-ayBLb3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oX
-DTE5MDIxOTIzMTQ0N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQH
-EwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYD
-VQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFz
-cyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSM
-D7tM9DceqQWC2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lQhIFRoZSBpc3N1YW5jZSBh
-bmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sg
-Q1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFp
-bCBhdCBjcHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5
-ayZrU3/b39/zcT0mwBQOxmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjP
-ytoUMaFP0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQQeJB
-CWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxkf1qbFFgBJ34TUMdr
-KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM
-8CgHrTwXZoi1/baI
------END CERTIFICATE-----
-
-NetLock Business (Class B) Root
-===============================
------BEGIN CERTIFICATE-----
-MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUxETAPBgNVBAcT
-CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV
-BAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQDEylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikg
-VGFudXNpdHZhbnlraWFkbzAeFw05OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYD
-VQQGEwJIVTERMA8GA1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRv
-bnNhZ2kgS2Z0LjEaMBgGA1UEC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QgdGhl
-IHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2
-YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBj
-cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM
-43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR
-stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI
------END CERTIFICATE-----
-
-NetLock Express (Class C) Root
-==============================
------BEGIN CERTIFICATE-----
-MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT
-CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV
-BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBD
-KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJ
-BgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6
-dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMrTmV0TG9j
-ayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzANBgkqhkiG9w0BAQEFAAOB
-jQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNAOoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3Z
-W3oDvV3zO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FBQADggEBAAWdP4id0ckaVaGs
-afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM
-PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl
-xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD
-KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3
-QBFGmh95DmK/D5fs4C8fF5Q=
------END CERTIFICATE-----
-
-StartCom Certification Authority
-================================
------BEGIN CERTIFICATE-----
-MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN
-U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu
-ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0
-NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk
-LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg
-U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw
-ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y
-o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/
-Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srh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gQ0Ew
-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO
-9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy
-UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW
-/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy
-oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf
-GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF
-66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq
-hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc
-EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn
-SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i
-8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe
-+o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g==
------END CERTIFICATE-----
-
-DigiCert Global Root CA
-=======================
------BEGIN CERTIFICATE-----
-MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG
-EwJVUzEVMBMGA1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U+Krk2U886
-UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk
-CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=
------END CERTIFICATE-----
-
-DigiCert High Assurance EV Root CA
-==================================
------BEGIN CERTIFICATE-----
-MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG
-EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw
-KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw
-MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ
-MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu
-Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t
-Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS
-OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3
-MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ
-NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe
-h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB
-Af8wHQYDVR0OBB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XpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs
-vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3
-oKfN5XozNmr6mis=
------END CERTIFICATE-----
-
-TURKTRUST Certificate Services Provider Root 1
-==============================================
------BEGIN CERTIFICATE-----
-MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOcUktUUlVTVCBF
-bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGDAJUUjEP
-MA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykgMjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0
-acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMx
-MDI3MTdaFw0xNTAzMjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsg
-U2VydGlmaWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYMAlRSMQ8wDQYDVQQHDAZB
-TktBUkExVjBUBgNVBAoMTShjKSAyMDA1IFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBC
-aWxpxZ9pbSBHw7x2ZW5sacSfaSBIaXptZXRsZXJpIEEuxZ4uMIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEAylIF1mMD2Bxf3dJ7XfIMYGFbazt0K3gNfUW9InTojAPBxhEqPZW8qZSwu5GX
-yGl8hMW0kWxsE2qkVa2kheiVfrMArwDCBRj1cJ02i67L5BuBf5OI+2pVu32Fks66WJ/bMsW9Xe8i
-Si9BB35JYbOG7E6mQW6EvAPs9TscyB/C7qju6hJKjRTP8wrgUDn5CDX4EVmt5yLqS8oUBt5CurKZ
-8y1UiBAG6uEaPj1nH/vO+3yC6BFdSsG5FOpU2WabfIl9BJpiyelSPJ6c79L1JuTm5Rh8i27fbMx4
-W09ysstcP4wFjdFMjK2Sx+F4f2VsSQZQLJ4ywtdKxnWKWU51b0dewQIDAQABoxAwDjAMBgNVHRME
-BTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAV9VX/N5aAWSGk/KEVTCD21F/aAyT8z5Aa9CEKmu46
-sWrv7/hg0Uw2ZkUd82YCdAR7kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxE
-q8Sn5RTOPEFhfEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy
-B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdAaLX/7KfS0zgY
-nNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKSRGQDJereW26fyfJOrN3H
------END CERTIFICATE-----
-
-TURKTRUST Certificate Services Provider Root 2
-==============================================
------BEGIN CERTIFICATE-----
-MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBF
-bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP
-MA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg
-QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcN
-MDUxMTA3MTAwNzU3WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVr
-dHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HE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3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64
-OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov
-L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm
-5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr
-44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf
-Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m
-Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp
-mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk
-vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf
-KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br
-NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj
-viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ
------END CERTIFICATE-----
-
-SwissSign Silver CA - G2
-========================
------BEGIN CERTIFICATE-----
-MIIFvTCCA6WgAwIBAgIITxvUL1S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/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB
-tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0
-cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P
-4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F
-kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L
-3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx
-/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa
-DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP
-e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu
-WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ
-DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub
-DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u
------END CERTIFICATE-----
-
-GeoTrust Primary Certification Authority
-========================================
------BEGIN CERTIFICATE-----
-MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG
-EwJVUzEWMBQGA1U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-afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD
-VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF
-AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE
-uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX
-xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89
-jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH
-z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA==
------END CERTIFICATE-----
-
-VeriSign Class 3 Public Primary Certification Authority - G5
-============================================================
------BEGIN CERTIFICATE-----
-MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
-BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
-ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
-IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp
-ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB
-yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln
-biBUcnVzdCB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r9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV
-HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi
-0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud
-EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn
-oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA
-MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+
-OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn
-CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5
-3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc
-f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW
------END CERTIFICATE-----
-
-COMODO Certification Authority
-==============================
------BEGIN CERTIFICATE-----
-MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE
-BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
-A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1
-dGhvcml0eTAeFw0wNjE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BwJVmc
-IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
-+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
------END CERTIFICATE-----
-
-Network Solutions Certificate Authority
-=======================================
------BEGIN CERTIFICATE-----
-MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG
-EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr
-IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx
-MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu
-MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx
-jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT
-aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT
-crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc
-/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB
-AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP
-BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv
-bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA
-A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q
-4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/
-GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv
-wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD
-ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey
------END CERTIFICATE-----
-
-WellsSecure Public Root Certificate Authority
-=============================================
------BEGIN CERTIFICATE-----
-MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM
-F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw
-NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN
-MDcxMjEzMTcwNzU0WhcNMjIxMjE0MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dl
-bGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYD
-VQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G
-CSqGSIb3DQEBAQUAA4IBDwA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bbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ
-tylv2G0xffX8oRAHh84vWdw+WNs=
------END CERTIFICATE-----
-
-COMODO ECC Certification Authority
-==================================
------BEGIN CERTIFICATE-----
-MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC
-R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE
-ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB
-dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix
-GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
-Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo
-b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X
-4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni
-wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E
-BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG
-FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA
-U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
------END C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EGDAWgBSjBS8YYFDC
-iQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUFAAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RK
-q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q
-MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg
-Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI
-lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF
-0mBWWg==
------END CERTIFICATE-----
-
-Security Communication EV RootCA1
-=================================
------BEGIN CERTIFICATE-----
-MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
-U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2VjdXJpdHkgQ29tbXVuaWNh
-dGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIzMloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UE
-BhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNl
-Y3VyaXR5IENvbW11bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
-AQoCggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSERMqm4miO
-/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gOzXppFodEtZDkBp2uoQSX
-WHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5bmB2iDQL87PRsJ3KYeJk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A1MSIw
-IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5
-IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9
-Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg
-Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD
-d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ
-/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R
-LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw
-AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ
-KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm
-MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4
-+vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa
-hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY
-okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0=
------END CERTIFICATE-----
-
-Microsec e-Szigno Root CA
-=========================
------BEGIN CERTIFICATE-----
-MIIHqDCCBp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kogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2
-hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T
-X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW
-WL1WMRJOEcgh4LMRkWXbtKaIOM5V
------END CERTIFICATE-----
-
-ePKI Root Certification Authority
-=================================
------BEGIN CERTIFICATE-----
-MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG
-EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg
-Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx
-MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq
-MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B
-AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs
-IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi
-lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv
-qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX
-12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfp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4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy
-sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD
-BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw=
------END CERTIFICATE-----
-
-T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3
-=============================================================================================================================
------BEGIN CERTIFICATE-----
-MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH
-DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q
-aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ry
-b25payB2ZSBLcmlwdG9sb2ppIEFyYcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNV
-BAsMGkthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUg
-S8O2ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAeFw0wNzA4
-MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIxGDAWBgNVBAcMD0dlYnpl
-IC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmlsaW1zZWwgdmUgVGVrbm9sb2ppayBBcmHF
-n3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBUQUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZl
-IEtyaXB0b2xv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irZgCFPBdy7
-pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27sEzNxZy5p+qksP2bA
-EllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2mSlf56oBzKwzqBwKu5HEA6BvtjT5
-htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yCe/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQj
-el/wroQk5PMr+4okoyeYZdowdXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915
------END CERTIFICATE-----
-
-EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1
-==========================================================================
------BEGIN CERTIFICATE-----
-MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF
-bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMTcwNQYDVQQKDC5FQkcg
-QmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXptZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAe
-Fw0wNjA4MTcwMDIxMDlaFw0xNjA4MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25p
-ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2lt
-IFRla25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIiMA0GCSqG
-SIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h4fuXd7hxlugTlkaDT7by
-X3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAktiHq6yOU/im/+4mRDGSaBUorzAzu8T2b
-gmmkTPiab+ci2hC6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or
-czvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gNv7Sg2Ca+I19zN38m5pIEo3/PIKe38zrK
-y5nLAgMBAAGjczBxMBEGCWCGSAGG+EIBAQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscC
-wQ7vptU7ETAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991S
-lgrHAsEO76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnKOOK5
-Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvHugDnuL8BV8F3RTIM
-O/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7HgviyJA/qIYM/PmLXoXLT1tLYhFHxUV8
-BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fLbuXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2
-G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m
-mxE=
------END CERTIFICATE-----
-
-ApplicationCA - Japanese Government
-===================================
------BEGIN CERTIFICATE-----
-MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT
-SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw
-MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl
-cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
-CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4
-fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN
-wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE
-jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu
-nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU
-WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV
-BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD
-vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs
-o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g
-/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD
-io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW
-dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL
-rosot4LKGAfmt1t06SAZf7IbiVQ=
------END CERTIFICATE-----
-
-GeoTrust Primary Certification Authority - G3
-=============================================
------BEGIN CERTIFICATE-----
-MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE
-BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOT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ENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD
-AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s
-t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt
------END CERTIFICATE-----
-
-thawte Primary Root CA - G2
-===========================
------BEGIN CERTIFICATE-----
-MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC
-VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu
-IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg
-Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV
-MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG
-b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt
-IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS
-LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5
-8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU
-mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN
-G4k8VIZ3KMqh9HneteY4sPBlcIx/Al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zhkGcuYMXDhpxwTW
-vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E
-BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ
-KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK
-A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu
-t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC
-8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm
-er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A=
------END CERTIFICATE-----
-
-GeoTrust Primary Certification Authority - G2
-=============================================
------BEGIN CERTIFICATE-----
-MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC
-VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu
-Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD
-ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1
-OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg
-MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl
-b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG
-BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc
-KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD
-VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+
-EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m
-ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2
-npaqBA+K
------END CERTIFICATE-----
-
-VeriSign Universal Root Certification Authority
-===============================================
------BEGIN CERTIFICATE-----
-MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE
-BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO
-ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk
-IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u
-IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV
-UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv
-cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLC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-wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4
-mJO37M2CYfE45k+XmCpajQ==
------END CERTIFICATE-----
-
-VeriSign Class 3 Public Primary Certification Authority - G4
-============================================================
------BEGIN CERTIFICATE-----
-MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC
-VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3
-b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz
-ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj
-YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL
-MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU
-cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo
-b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5
-IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8
-Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz
-rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB
-/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw
-HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u
-Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD
-A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx
-AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA==
------END CERTIFICATE-----
-
-NetLock Arany (Class Gold) Főtanúsítvány
-============================================
------BEGIN CERTIFICATE-----
-MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G
-A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610
-dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB
-cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx
-MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO
-ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv
-biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6
-c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu
-0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw
-/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk
-H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw
-fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1
-neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB
-BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW
-qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta
-YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC
-bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna
-NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu
-dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E=
------END CERTIFICATE-----
-
-Staat der Nederlanden Root CA - G2
-==================================
------BEGIN CERTIFICATE-----
-MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE
-CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g
-Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXD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BAoTDUhvbmdrb25n
-IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF
-AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1
-ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr
-auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh
-qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY
-V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV
-HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i
-h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio
-l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei
-IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps
-T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT
-c4afU9hDDl3WY4JxHYB0yvbiAmvZWg==
------END CERTIFICATE-----
-
-SecureSign RootCA11
-===================
------BEGIN CERTIFICATE-----
-MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi
-SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5j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FDWug/Fq
-TYl6+rPYLWbwNof1K1MCAwEAAaOBqjCBpzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKaz
-4SsrSbbXc6GqlPUB53NlTKxQMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU
-9QHnc2VMrFAwRAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv
-bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWImfQwng4/F9tqg
-aHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3gvoFNTPhNahXwOf9jU8/kzJP
-eGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKeI6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1Pwk
-zQSulgUV1qzOMPPKC8W64iLgpq0i5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1
-ThCojz2GuHURwCRiipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oI
-KiMnMCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZo5NjEFIq
-nxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6zqylfDJKZ0DcMDQj3dcE
-I2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacNGHk0vFQYXlPKNFHtRQrmjseCNj6nOGOp
-MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o
-tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA==
------END CERTIFICATE-----
-
-Verisign Class 3 Public Primary Certification Authority
-=======================================================
------BEGIN CERTIFICATE-----
-MIICPDC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YeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02
-yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi
-LXpUq3DDfSJlgnCW
------END CERTIFICATE-----
-
-E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi
-===================================================
------BEGIN CERTIFICATE-----
-MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG
-EwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxpZ2kgQS5TLjE8MDoGA1UEAxMz
-ZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3
-MDEwNDExMzI0OFoXDTE3MDEwNDExMzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0
-cm9uaWsgQmlsZ2kgR3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9u
-aWsgU2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
-AQoCggEBAMMSIJ6wXgBljU5Gu4Bc6SwGl9XzcslwuedLZYDBS75+PNdUMZTe1RK6UxYC6lhj71vY
-8+0qGqpxSKPcEC1fX+tcS5yWCEIlKBHMilpiAVDV6wlTL/jDj/6z/P2douNffb7tC+Bg62nsM+3Y
-jfsSSYMAyYuXjDtzKjKzEve5TfL0TW3H5tYmNwjy2f1rXKPlSFxYvEK+A1qBuhw1DADT9SN+cTAI
-JjjcJRFHLfO6IxClv7wC90Nex/6wN1CZew+TzuZDLMN+DfIcQ2Zgy2ExR4ejT669VmxMvLz4Bcpk
-9Ok0oSy1c+HCPujIyTQlCFzz7abHlJ+tiEMl1+E5YP6sOVkCAwEAAaNCMEAwDgYDVR0PAQH/BA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HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl
-OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2
-xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE
-FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7
-lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8
-EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E
-bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18
-YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r
-kpeDMdmztcpHWD9f
------END CERTIFICATE-----
-
-TC TrustCenter Universal CA III
-===============================
------BEGIN CERTIFICATE-----
-MIID4TCCAsmgAwIBAgIOYyUAAQACFI0zFQLkbPQwDQYJKoZIhvcNAQEFBQAwezELMAkGA1UEBhMC
-REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy
-IFVuaXZlcnNhbCBDQTEoMCYGA1UEAxMfVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJSTAe
-Fw0wOTA5MDkwODE1MjdaFw0yOTEyMzEyMzU5NTlaMHsxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNU
-QyBUcnVzdENlbnRlciBHbWJIMSQwIgYDVQQLExtUQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0Ex
-KDAmBgNVBAMTH1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQSBJSUkwggEiMA0GCSqGSIb3DQEB
-AQUAA4IBDwAwggEKAoIBAQDC2pxisLlxErALyBpXsq6DFJmzNEubkKLF5+cvAqBNLaT6hdqbJYUt
-QCggbergvbFIgyIpRJ9Og+41URNzdNW88jBmlFPAQDYvDIRlzg9uwliT6CwLOunBjvvya8o84pxO
-juT5fdMnnxvVZ3iHLX8LR7PH6MlIfK8vzArZQe+f/prhsq75U7Xl6UafYOPfjdN/+5Z+s7Vy+Eut
-CHnNaYlAJ/Uqwa1D7KRTyGG299J5KmcYdkhtWyUB0SbFt1dpIxVbYYqt8Bst2a9c8SaQaanVDED1
-M4BDj5yjdipFtK+/fz6HP3bFzSreIMUWWMv5G/UPyw0RUmS40nZid4PxWJ//AgMBAAGjYzBhMB8G
-A1UdIwQYMBaAFFbn4VslQ4Dg9ozhcbyO5YAvxEjiMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/
-BAQDAgEGMB0GA1UdDgQWBBRW5+FbJUOA4PaM4XG8juWAL8RI4jANBgkqhkiG9w0BAQUFAAOCAQEA
-g8ev6n9NCjw5sWi+e22JLumzCecYV42FmhfzdkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+
-KGwWaODIl0YgoGhnYIg5IFHYaAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhK
-BgePxLcHsU0GDeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV
-CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPHLQNjO9Po5KIq
-woIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg==
------END CERTIFICATE-----
-
-Autoridad de Certificacion Firmaprofesional CIF A62634068
-=========================================================
------BEGIN CERTIFICATE-----
-M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/VU+I22mlaHFoI6
-M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1
-YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF
-9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK
-zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG
-nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg
-OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ
------END CERTIFICATE-----
-
-Global Chambersign Root - 2008
-==============================
------BEGIN CERTIFICATE-----
-MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD
-MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv
-bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu
-QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx
-NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg
-Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ
-QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD
-a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UEChMSQUMgQ2FtZXJm
-aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp
-1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0
-dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG
-/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6
-ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s
-dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg
-9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH
-foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du
-qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr
-P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq
-c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
-09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
------END CERTIFICATE-----
-
-Go Daddy Root Certificate Authority - G2
-========================================
------BEGIN CERTIFICATE-----
-MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
-B0F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pL1E/QYV
-N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO
-LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1
------END CERTIFICATE-----
-
-Starfield Root Certificate Authority - G2
-=========================================
------BEGIN CERTIFICATE-----
-MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
-B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
-b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0
-eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw
-DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg
-VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB
-dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv
-W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs
-bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk
-N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf
-ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU
-JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
-AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol
-TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx
-4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw
-F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K
-pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ
-c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0
------END CERTIFICATE-----
-
-Starfield Services Root Certificate Authority - G2
-==================================================
------BEGIN CERTIFICATE-----
-MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT
-B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s
-b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl
-IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV
-BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT
-dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg
-Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC
-AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2
-h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa
-hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP
-LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB
-rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw
-AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG
-SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP
-E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy
-xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd
-iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza
-YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6
------END CERTIFICATE-----
-
-AffirmTrust Commercial
-======================
------BEGIN CERTIFICATE-----
-MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS
-BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw
-MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly
-bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF
-AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb
-DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV
-C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6
-BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww
-MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV
-HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC
-AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG
-hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi
-qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv
-0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh
-sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8=
------END CERTIFICATE-----
-
-AffirmTrust Networking
-======================
------BEGIN CERTIFICATE-----
-MIIDTDCC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TJ3s7xgaVY5
-/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo
-+Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB
-/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv
-MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg
-Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC
-6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S
-L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK
-+4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV
-BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg
-IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60
-g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb
-zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw==
------END CERTIFICATE-----
-
-AffirmTrust Premium ECC
-=======================
------BEGIN CERTIFICATE-----
-MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV
-BAoMC0FmZ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XR5
-MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC
-AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC
-l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J
-J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4
-fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0
-cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB
-Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw
-DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj
-jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1
-mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
-Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
-03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
------END CERTIFICATE-----
-
-Certinomis - Autorité Racine
-=============================
------BEGIN CERTIFICATE-----
-MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK
-Q2V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EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0G
-A1UdDgQWBBQNjLZh2kS40RR9w759XkjwzspqsDAXBgNVHSAEEDAOMAwGCiqBegFWAgIAAQEwDQYJ
-KoZIhvcNAQEFBQADggIBACQ+YAZ+He86PtvqrxyaLAEL9MW12Ukx9F1BjYkMTv9sov3/4gbIOZ/x
-WqndIlgVqIrTseYyCYIDbNc/CMf4uboAbbnW/FIyXaR/pDGUu7ZMOH8oMDX/nyNTt7buFHAAQCva
-R6s0fl6nVjBhK4tDrP22iCj1a7Y+YEq6QpA0Z43q619FVDsXrIvkxmUP7tCMXWY5zjKn2BCXwH40
-nJ+U8/aGH88bc62UeYdocMMzpXDn2NU4lG9jeeu/Cg4I58UvD0KgKxRA/yHgBcUn4YQRE7rWhh1B
-CxMjidPJC+iKunqjo3M3NYB9Ergzd0A4wPpeMNLytqOx1qKVl4GbUu1pTP+A5FPbVFsDbVRfsbjv
-JL1vnxHDx2TCDyhihWZeGnuyt++uNckZM6i4J9szVb9o4XVIRFb7zdNIu0eJOqxp9YDG5ERQL1TE
-qkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b
-WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE
-wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/
-vgt2Fl43N+bYdJeimUV5
------END CERTIFICATE-----
-
-Root CA Generalitat Valenciana
-==============================
------BEGIN CERTIFICATE-----
-MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJFUzEfMB0GA1UE
-ChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290
-IENBIEdlbmVyYWx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DbwvUB/tOdQ/TLtPAF8fGKOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmr
-sQd7TZjTXLDR8KdCoLXEjq/+8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZd
-JXDRZslo+S4RFGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS
-mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmEDNuxUCAKGkq6
-ahq97BvIxYSazQ==
------END CERTIFICATE-----
-
-TWCA Root Certification Authority
-=================================
------BEGIN CERTIFICATE-----
-MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ
-VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh
-dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG
-EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB
-IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
-AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx
-QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC
-oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP
-4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r
-y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB
-BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG
-9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC
-mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
-QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
-T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
-Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
------END CERTIFICATE-----
-
-Security Communication RootCA2
-==============================
------BEGIN CERTIFICATE-----
-MIIDdzCCAl+gAwIBAgIBADANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJKUDElMCMGA1UEChMc
-U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEnMCUGA1UECxMeU2VjdXJpdHkgQ29tbXVuaWNh
-dGlvbiBSb290Q0EyMB4XDTA5MDUyOTA1MDAzOVoXDTI5MDUyOTA1MDAzOVowXTELMAkGA1UEBhMC
-SlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xJzAlBgNVBAsTHlNlY3Vy
-aXR5IENvbW11bmljYXRpb24gUm9vdENBMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
-ANAVOVKxUrO6xVmCxF1SrjpDZYBLx/KWvNs2l9amZIyoXvDjChz335c9S672XewhtUGrzbl+dp++
-+T42NKA7wfYxEUV0kz1XgMX5iZnK5atq1LXaQZAQwdbW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CsGAQUFBwIBFiBodHRwczovL3d3dy5jYXRjZXJ0
-Lm5ldC92ZXJhcnJlbDA1BggrBgEFBQcCAjApGidWZWdldSBodHRwczovL3d3dy5jYXRjZXJ0Lm5l
-dC92ZXJhcnJlbCAwDQYJKoZIhvcNAQEFBQADggEBAKBIW4IB9k1IuDlVNZyAelOZ1Vr/sXE7zDkJ
-lF7W2u++AVtd0x7Y/X1PzaBB4DSTv8vihpw3kpBWHNzrKQXlxJ7HNd+KDM3FIUPpqojlNcAZQmNa
-Al6kSBg6hW/cnbw/nZzBh7h6YQjpdwt/cKt63dmXLGQehb+8dJahw3oS7AwaboMMPOhyRp/7SNVe
-l+axofjk70YllJyJ22k4vuxcDlbHZVHlUIiIv0LVKz3l+bqeLrPK9HOSAgu+TGbrIP65y7WZf+a2
-E/rKS03Z7lNGBjvGTq2TWoF+bCpLagVFjPIhpDGQh2xlnJ2lYJU6Un/10asIbvPuW/mIPX64b24D
-5EI=
------END CERTIFICATE-----
diff --git a/conf/rayo/dialplan/public.xml b/conf/rayo/dialplan/public.xml
deleted file mode 100644 (file)
index 76c4ea2..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<include>
-  <context name="public">
-
-    <extension name="unloop">
-      <condition field="${unroll_loops}" expression="^true$"/>
-      <condition field="${sip_looped_call}" expression="^true$">
-       <action application="deflect" data="${destination_number}"/>
-      </condition>
-    </extension>
-    <!--
-       Tag anything pass thru here as an outside_call so you can make sure not
-       to create any routing loops based on the conditions that it came from 
-       the outside of the switch.  
-    -->
-    <extension name="outside_call" continue="true">
-      <condition>
-       <action application="set" data="outside_call=true"/>
-       <action application="export" data="RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}"/>
-      </condition>
-    </extension>
-
-    <extension name="call_debug" continue="true">
-      <condition field="${call_debug}" expression="^true$" break="never">
-       <action application="info"/>
-      </condition>
-    </extension>
-
-    <extension name="adhearsion">
-      <condition>
-       <action application="rayo" data=""/>
-      </condition>
-    </extension>
-    
-  </context>
-</include>
-
diff --git a/conf/rayo/directory/default.xml b/conf/rayo/directory/default.xml
deleted file mode 100644 (file)
index 11c2e63..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--
-    NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE 
-    
-    FreeSWITCH works off the concept of users and domains just like email.
-    You have users that are in domains for example 1000@domain.com.
-    
-    When freeswitch gets a register packet it looks for the user in the directory
-    based on the from or to domain in the packet depending on how your sofia profile
-    is configured.  Out of the box the default domain will be the IP address of the
-    machine running FreeSWITCH.  This IP can be found by typing "sofia status" at the
-    CLI.  You will register your phones to the IP and not the hostname by default.
-    If you wish to register using the domain please open vars.xml in the root conf
-    directory and set the default domain to the hostname you desire.  Then you would
-    use the domain name in the client instead of the IP address to register 
-    with FreeSWITCH.
-    
-    NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE 
--->
-
-<include>
-  <!--the domain or ip (the right hand side of the @ in the addr-->
-  <domain name="$${domain}">
-    <params>
-      <param name="dial-string" value="{^^:sip_invite_domain=${dialed_domain}:presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(*/${dialed_user}@${dialed_domain})}"/>
-    </params>
-
-    <variables>
-    </variables>
-
-    <groups>
-      <group name="default">
-       <users>
-         <X-PRE-PROCESS cmd="include" data="default/*.xml"/>
-       </users>
-      </group>
-    </groups>
-
-  </domain>
-</include>
diff --git a/conf/rayo/directory/default/usera.xml b/conf/rayo/directory/default/usera.xml
deleted file mode 100644 (file)
index 1e9c412..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<include>
-  <user id="usera">
-    <!-- Outbound Registrations Related to this user -->
-    <gateways>
-    </gateways>
-    <params>
-      <!-- omit password for authless registration -->
-      <param name="password" value="1"/>
-    </params>
-    <variables>
-      <!--all variables here will be set on all inbound calls that originate from this user -->
-      <variable name="user_context" value="public"/>
-      <variable name="effective_caller_id_name" value="User A"/>
-      <variable name="effective_caller_id_number" value="9009095333"/>
-    </variables>
-
-    <vcard>
-      <!-- insert optional compliant vcard xml here-->
-    </vcard>
-  </user>
-</include>
diff --git a/conf/rayo/directory/default/userb.xml b/conf/rayo/directory/default/userb.xml
deleted file mode 100644 (file)
index 9775d83..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<include>
-  <user id="userb">
-    <!-- Outbound Registrations Related to this user -->
-    <gateways>
-    </gateways>
-    <params>
-      <!-- omit password for authless registration -->
-      <param name="password" value="1"/>
-    </params>
-    <variables>
-      <!--all variables here will be set on all inbound calls that originate from this user -->
-      <variable name="user_context" value="public"/>
-      <variable name="effective_caller_id_name" value="User B"/>
-      <variable name="effective_caller_id_number" value="9009093733"/>
-    </variables>
-
-    <vcard>
-      <!-- insert optional compliant vcard xml here-->
-    </vcard>
-  </user>
-</include>
diff --git a/conf/rayo/directory/default/userc.xml b/conf/rayo/directory/default/userc.xml
deleted file mode 100644 (file)
index d870a05..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<include>
-  <user id="userc">
-    <!-- Outbound Registrations Related to this user -->
-    <gateways>
-    </gateways>
-    <params>
-      <!-- omit password for authless registration -->
-      <param name="password" value="1"/>
-    </params>
-    <variables>
-      <!--all variables here will be set on all inbound calls that originate from this user -->
-      <variable name="user_context" value="public"/>
-      <variable name="effective_caller_id_name" value="User C"/>
-      <variable name="effective_caller_id_number" value="8006492568"/>
-    </variables>
-
-    <vcard>
-      <!-- insert optional compliant vcard xml here-->
-    </vcard>
-  </user>
-</include>
diff --git a/conf/rayo/directory/default/userd.xml b/conf/rayo/directory/default/userd.xml
deleted file mode 100644 (file)
index e0a63ec..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<include>
-  <user id="userd">
-    <!-- Outbound Registrations Related to this user -->
-    <gateways>
-    </gateways>
-    <params>
-      <!-- omit password for authless registration -->
-      <param name="password" value="1"/>
-    </params>
-    <variables>
-      <!--all variables here will be set on all inbound calls that originate from this user -->
-      <variable name="user_context" value="public"/>
-      <variable name="effective_caller_id_name" value="Jenny"/>
-      <variable name="effective_caller_id_number" value="2128675309"/>
-    </variables>
-
-    <vcard>
-      <!-- insert optional compliant vcard xml here-->
-    </vcard>
-  </user>
-</include>
diff --git a/conf/rayo/freeswitch.xml b/conf/rayo/freeswitch.xml
deleted file mode 100644 (file)
index f38983e..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0"?>
-<!--
-    NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE 
-    
-    This is the FreeSWITCH default config.  Everything you see before you now traverses 
-    down into all the directories including files which include more files.  The default
-    config comes out of the box already working in most situations as a PBX.  This will
-    allow you to get started testing and playing with various things in FreeSWITCH.
-    
-    Before you start to modify this default please visit this wiki page:
-    
-    http://wiki.freeswitch.org/wiki/Getting_Started_Guide#Some_stuff_to_try_out.21
-    
-    If all else fails you can read our FAQ located at:
-    
-    http://wiki.freeswitch.org/wiki/FreeSwitch_FAQ
-    
-    NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE 
--->
-<document type="freeswitch/xml">
-  <!--#comment 
-      All comments starting with #command will be preprocessed and never sent to the xml parser
-      Valid instructions:
-      #include ==> Include another file to this exact point
-                   (partial xml should be encased in <include></include> tags)
-      #set     ==> Set a global variable (can be expanded during preprocessing with $$ variables)
-                   (note the double $$ which denotes preprocessor variables)
-      #comment ==> A general comment such as this
-      
-      The preprocessor will compile the full xml document to ${prefix}/log/freeswitch.xml.fsxml
-      Don't modify it while freeswitch is running cos it is mem mapped in most cases =D
-      
-      The same can be achieved with the <X-PRE-PROCESS> tag where the attrs 'cmd' and 'data' are
-      parsed in the same way.
-  -->
-  <!--#comment
-      vars.xml contains all the #set directives for the preprocessor.
-  -->
-  <X-PRE-PROCESS cmd="include" data="vars.xml"/>
-
-  <section name="configuration" description="Various Configuration">
-    <X-PRE-PROCESS cmd="include" data="autoload_configs/*.xml"/>
-  </section>
-  
-  <section name="dialplan" description="Regex/XML Dialplan">
-    <X-PRE-PROCESS cmd="include" data="dialplan/*.xml"/>
-  </section>
-
-  <!-- mod_dingaling is reliant on the vcard data in the "directory" section. -->
-  <!-- mod_sofia is reliant on the user data for authorization -->
-  <section name="directory" description="User Directory">
-      <X-PRE-PROCESS cmd="include" data="directory/*.xml"/>
-  </section>
-
-  <!-- languages section (under development still) -->
-  <section name="languages" description="Language Management">
-    <X-PRE-PROCESS cmd="include" data="lang/de/*.xml"/>
-    <X-PRE-PROCESS cmd="include" data="lang/en/*.xml"/>
-    <X-PRE-PROCESS cmd="include" data="lang/fr/*.xml"/>
-    <X-PRE-PROCESS cmd="include" data="lang/ru/*.xml"/>
-    <X-PRE-PROCESS cmd="include" data="lang/he/*.xml"/>
-    <X-PRE-PROCESS cmd="include" data="lang/es/es_ES.xml"/>
-    <X-NO-PRE-PROCESS cmd="include" data="lang/es/es_MX.xml"/>
-    <X-PRE-PROCESS cmd="include" data="lang/pt/pt_BR.xml"/>
-    <X-NO-PRE-PROCESS cmd="include" data="lang/pt/pt_PT.xml"/>
-    <X-NO-PRE-PROCESS cmd="include" data="lang/sv/*.xml"/>
-  </section>
-
-</document>
diff --git a/conf/rayo/lang/de/de.xml b/conf/rayo/lang/de/de.xml
deleted file mode 100644 (file)
index a7dbab0..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<include>
-  <language name="de" sound-prefix="/snds" tts-engine="cepstral" tts-voice="david">
-    <phrases>
-      <macros>
-        <X-PRE-PROCESS cmd="include" data="demo/demo.xml"/>
-        <!--voicemail_de_tts is purely implemented with tts, we need a files based implementation too -->
-        <X-PRE-PROCESS cmd="include" data="vm/tts.xml"/>
-      </macros>
-    </phrases>
-  </language>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/de/demo/demo.xml b/conf/rayo/lang/de/demo/demo.xml
deleted file mode 100644 (file)
index fa77948..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<include>
-  <macro name="msgcount">
-    <input pattern="(.*)">
-      <match>
-        <action function="execute" data="sleep(1000)"/>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-        <!-- or -->
-        <!--<action function="speak-text" data="Sie haben $1 Nachrichten"/>-->
-      </match>
-    </input>
-  </macro>
-  <macro name="saydate">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="timespec">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="time_measurement"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="ip-addr">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="iterated" type="ip_address"/>
-        <action function="say" data="$1" method="pronounced" type="ip_address"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="spell">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="spell-phonetic">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="tts-timeleft">
-    <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
-    <!-- If the function "break" is encountered all parsing will cease -->
-    <input pattern="(\d+):(\d+)">
-      <match>
-        <action function="speak-text" data="Sie haben $1 Minuten, $2 Sekunden übrig $strftime(%Y-%m-%d)"/>
-        <action function="break"/>
-      </match>
-      <nomatch>
-        <action function="speak-text" data="Die Eingabe war ungültig."/>
-      </nomatch>
-    </input>
-    <input pattern="(\d+) min (\d+) sek">
-      <match>
-        <action function="speak-text" data="Sie haben $1 Minuten, $2 Sekunden übrig $strftime(%Y-%m-%d)"/>
-      </match>
-      <nomatch>
-        <action function="speak-text" data="Die Eingabe war ungültig."/>
-      </nomatch>
-    </input>
-  </macro>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/de/vm/sounds.xml b/conf/rayo/lang/de/vm/sounds.xml
deleted file mode 100644 (file)
index 657e611..0000000
+++ /dev/null
@@ -1,413 +0,0 @@
-<include>
-
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-        <!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-abort.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^(1):(.*)$" break_on_match="true">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action application="log" data="INFO $1 $2"/>
-        <action function="say" data="$1" method="pronounced" type="items" gender="feminine"/>
-        <action function="play-file" data="voicemail/vm-$2.wav"/>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items" gender="feminine"/>
-        <action function="play-file" data="voicemail/vm-$2.wav"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <!-- To listen to new messages -->
-        <action function="play-file" data="voicemail/vm-listen_new.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-        <!-- To listen to saved messages -->
-        <action function="play-file" data="voicemail/vm-listen_saved.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-        <!-- For advanced options -->
-        <action function="play-file" data="voicemail/vm-advanced.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-        <!-- To exit -->
-        <action function="play-file" data="voicemail/vm-to_exit.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <!-- To record a greeting -->
-        <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-        <!-- To choose greeting -->
-        <action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-        <!-- To record your name -->
-        <action function="play-file" data="voicemail/vm-record_name2.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-        <!-- To change password -->
-        <action function="play-file" data="voicemail/vm-change_password.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-        <!-- To return to main menu -->
-        <action function="play-file" data="voicemail/vm-main_menu.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-rerecord.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-continue.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-send_message_now.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-        <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-return_call.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-return_call.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_message.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-greeting.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-selected.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-person.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-not_available.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-        <action function="play-file" data="voicemail/vm-message_number.wav"/>
-        <action application="log" data="INFO $1 $2"/>
-        <action function="say" data="$2" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack">
-    <input pattern="^(too-small)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-too-small.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-        <action application="log" data="INFO $1"/>
-        <action function="say" data="$1" method="counted" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_disk_quota_exceeded">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_announce_ext">
-    <input pattern="^([^\:]+):(.*)$">
-      <match>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_full">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_empty">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/de/vm/tts.xml b/conf/rayo/lang/de/vm/tts.xml
deleted file mode 100644 (file)
index f91cae1..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-<include>
-
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Bitte geben Sie Ihren Benutzernamen ein, gefolgt von $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Bitte geben Sie Ihr Passwort ein, gefolgt von $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Falsche Benutzerdaten."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Willkommen in Ihrem Postfach."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Auf Wiedersehen."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Zu viele Fehlversuche."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^1:(.*)$">
-      <match>
-        <action function="speak-text" data="Sie haben 1 $2 Nachricht im Ordner ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^([0,2-9]+):(.*)$">
-      <match>
-        <action function="speak-text" data="Sie haben $1 $2 Nachrichten im Ordner ${voicemail_current_folder}."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="Um neue Nachrichten zu hören, drücken Sie $1. Um gespeicherte Nachrichten zu hören, drücken Sie $2, Für erweiterte Optionen, drücken Sie $3. Zum beenden drücken Sie $4."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="Um eine Ansage aufzunehmen, drücken Sie $1. Um eine Ansage auszuwählen, drücken Sie $2. Um ihren Namen aufzunehmen, drücken Sie $3. Um zum Hauptmenü zurückzukehren, drücken Sie $4."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Sprechen Sie Ihren Namen nach dem Ton, drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="Um die Aufzeichnung anzuhören, drücken Sie $1. Um die Aufzeichnung zu speichern, drücken Sie $2. Für eine erneute Aufnahme drücken Sie $3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="Drücken Sie $1 um diese Nachricht als wichtig zu markieren. Um fortzufahren drücken Sie $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="Drücken Sie $1 um die Nachricht erneut zu hören. Um die Nachricht zu speichern, drücken Sie $2. Zum löschen der Nachricht drücken Sie $3. Für die Weiterleitung als Email, drücken Sie $4."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Wählen Sie eine Ansage zwischen 1 und 3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Ungültige Eingabe."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Zeichnen Sie Ihre Ansage nach dem Ton auf. Drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Sprechen Sie nach dem Ton. Drücken Sie eine beliebige Taste oder hören Sie auf zu sprechen um die Aufnahme zu beenden."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Ansage $1 ausgewählt."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1 ist nicht verfügbar."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(.*)$">
-      <match>
-        <action function="speak-text" data="$1 Nachricht Nummer $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_ack">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Nachricht $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$strftime($1|%A, %B %d %Y, %I %M %p)"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/demo/demo-ivr.xml b/conf/rayo/lang/en/demo/demo-ivr.xml
deleted file mode 100644 (file)
index 98f155a..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-<include>
-
-  <macro name="demo_ivr_count">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="demo_ivr_main_menu" pause="100"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
-    <input pattern="(.*)">
-      <match>
-        <!-- string together several existing sound files to create one long greeting -->
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
-        <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
-        <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
-
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
-        <action function="play-file" data="silence_stream://1500"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Register for ClueCon -->
-        <action function="play-file" data="ivr/ivr-register_for_cluecon.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 6: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/6.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_main_menu_short" pause="100">
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="silence_stream://1000"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
-  <macro name="demo_ivr_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_sub_menu_short">
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/demo/demo.xml b/conf/rayo/lang/en/demo/demo.xml
deleted file mode 100644 (file)
index bcfe6a8..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<include>
-  <macro name="msgcount">
-    <input pattern="(.*)">
-      <match>
-        <action function="execute" data="sleep(1000)"/>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-        <!-- or -->
-        <!--<action function="speak-text" data="you have $1 messages"/>-->
-      </match>
-    </input>
-  </macro>
-  <macro name="saydate">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="timespec">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="time_measurement"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="ip-addr">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="iterated" type="ip_address"/>
-        <action function="say" data="$1" method="pronounced" type="ip_address"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="spell">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="spell-phonetic">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="tts-timeleft">
-    <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
-    <!-- If the function "break" is encountered all parsing will cease -->
-    <input pattern="(\d+):(\d+)">
-      <match>
-        <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
-        <action function="break"/>
-      </match>
-      <nomatch>
-        <action function="speak-text" data="That input was invalid."/>
-      </nomatch>
-    </input>
-    <input pattern="(\d+) min (\d+) sec">
-      <match>
-        <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
-      </match>
-      <nomatch>
-        <action function="speak-text" data="That input was invalid."/>
-      </nomatch>
-    </input>
-  </macro>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/demo/funnies.xml b/conf/rayo/lang/en/demo/funnies.xml
deleted file mode 100644 (file)
index e901c5a..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<include>
-  <macro name="funny_prompts" pause="750">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-wakey_wakey_sunshine.wav"/>
-        <action function="play-file" data="ivr/ivr-no_no_no.wav"/>
-        <action function="play-file" data="ivr/ivr-did_you_mean_to_press_key.wav"/>
-        <action function="play-file" data="ivr/ivr-seriously_mean_to_press_key.wav"/>
-        <action function="play-file" data="ivr/ivr-oh_whatever.wav"/>
-        <action function="play-file" data="ivr/ivr-one_more_mistake.wav"/>
-        <action function="play-file" data="ivr/ivr-congratulations_you_pressed_star.wav"/>
-        <action function="play-file" data="ivr/ivr-engineers_busy_assisting_other_sales.wav"/>
-        <action function="play-file" data="ivr/ivr-message_self_destruct.wav"/>
-        <action function="play-file" data="ivr/ivr-all_your_call_are_belong_to_us.wav"/>
-        <action function="play-file" data="ivr/ivr-love_those_touch_tones.wav"/>
-        <action function="play-file" data="ivr/ivr-yes_we_have_no_bananas.wav"/>
-        <action function="play-file" data="ivr/ivr-dude_you_suck.wav"/>
-        <action function="play-file" data="ivr/ivr-on_hold_indefinitely.wav"/>
-        <action function="play-file" data="ivr/ivr-youre_doing_it_wrong.wav"/>
-        <action function="play-file" data="ivr/ivr-were_asterisk_free.wav"/>
-        <action function="play-file" data="ivr/ivr-douche_telecom.wav"/>
-        <action function="play-file" data="ivr/ivr-asterisk_like_syphilis.wav"/>
-        <action function="play-file" data="ivr/ivr-freeguipy.wav"/>
-        <action function="play-file" data="ivr/ivr-terribly_wrong_awkward.wav"/>
-        <action function="play-file" data="ivr/ivr-it_was_that_bug.wav"/>
-        <action function="play-file" data="ivr/ivr-concentrate.wav"/>
-        <action function="play-file" data="ivr/ivr-founder_of_freesource.wav"/>
-        <action function="play-file" data="ivr/ivr-cold_foolish.wav"/>
-        <action function="play-file" data="ivr/ivr-trollover_minutes.wav"/>
-        <action function="play-file" data="ivr/ivr-yuno_silent_drill.wav"/>
-        <action function="play-file" data="ivr/ivr-beacuase.wav"/>
-      </match>
-    </input>
-  </macro>
-</include>
\ No newline at end of file
diff --git a/conf/rayo/lang/en/demo/new-demo-ivr.xml b/conf/rayo/lang/en/demo/new-demo-ivr.xml
deleted file mode 100644 (file)
index 619d992..0000000
+++ /dev/null
@@ -1,171 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-  <macro name="new_demo_ivr_main_menu" pause="100"> <!-- See conf/ivr_menus/ivr.conf.xml for an example on how to use this macro in an IVR -->
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="silence_stream://500"/>
-
-        <!-- Menu option 1: For information about FreeSWITCH... -->
-        <action function="play-file" data="misc/misc-information_about_freeswitch.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: To learn more about FreeSWITCH Solutions... -->
-        <action function="play-file" data="misc/misc-learn_more_about_freeswitch_solutions.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: To hear about ClueCon -->
-        <action function="play-file" data="misc/misc-to_hear_about_cluecon.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: For other options -->
-        <action function="play-file" data="ivr/ivr-for_other_options.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as new_demo_ivr_main_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="new_demo_ivr_main_menu_short" pause="100"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option 1: For information about FreeSWITCH... -->
-        <action function="play-file" data="misc/misc-information_about_freeswitch.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: To learn more about FreeSWITCH Solutions... -->
-        <action function="play-file" data="misc/misc-learn_more_about_freeswitch_solutions.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: To hear about ClueCon -->
-        <action function="play-file" data="misc/misc-to_hear_about_cluecon.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: For other options -->
-        <action function="play-file" data="ivr/ivr-for_other_options.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- More information about FreeSWITCH... -->
-  <macro name="learn_about_freeswitch_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <!-- Information about FreeSWITCH and OSTAG... -->
-        <action function="play-file" data="misc-freeswitch_is_state_of_the_art.wav"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="misc-it_is_stable_scalable_extensible.wav"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="misc-free_to_download.wav"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="misc-freeswitch_sponsored_by_ostag.wav"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="misc-ostag_learn_more.wav"/>
-        <action function="play-file" data="silence_stream://50"/>
-
-        <!-- Menu option 9: Repeat this information -->
-        <action function="play-file" data="ivr/ivr-repeat_this_information.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- More information about FreeSWITCH Solutions... -->
-  <macro name="learn_about_freeswitch_solutions_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <!-- Information about FreeSWITCH Solutions... -->
-        <action function="play-file" data="[[sounds from tony/brian]]"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="[[sounds from tony/brian]]"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="[[sounds from tony/brian]]"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="[[sounds from tony/brian]]"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="[[sounds from tony/brian]]"/>
-        <action function="play-file" data="silence_stream://50"/>
-
-        <!-- Menu option 9: Repeat this information -->
-        <action function="play-file" data="ivr/ivr-repeat_this_information.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- More information about ClueCon -->
-  <macro name="learn_about_cluecon_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <!-- Information about ClueCon... -->
-        <action function="play-file" data="misc-cluecon_is_premier_conference.wav"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="misc-chicago_each_summer.wav"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="misc-wide_range_of_persons.wav"/>
-        <action function="play-file" data="silence_stream://50"/>
-        <action function="play-file" data="misc-support_open_source_by_attending.wav"/>
-        <action function="play-file" data="silence_stream://500"/>
-        <action function="play-file" data="ivr-register_for_cluecon.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-        <action function="play-file" data="silence_stream://500"/>
-
-        <!-- Menu option 9: Repeat this information -->
-        <action function="play-file" data="ivr/ivr-repeat_this_information.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/en/dir/sounds.xml b/conf/rayo/lang/en/dir/sounds.xml
deleted file mode 100644 (file)
index b715a7f..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-<include>
-
-  <macro name="directory_intro">
-    <input pattern="^(last_name)" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-enter_person.wav"/>
-        <action function="play-file" data="directory/dir-last_name.wav"/>
-      </match>
-    </input>
-    <input pattern="^(first_name)" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-enter_person.wav"/>
-        <action function="play-file" data="directory/dir-first_name.wav"/>
-      </match>
-    </input>
-    <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-to_search_by.wav"/>
-        <action function="play-file" data="directory/dir-first_name.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-to_search_by.wav"/>
-        <action function="play-file" data="directory/dir-last_name.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_min_search_digits">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-specify_mininum.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count">
-    <input pattern="^0$" break_on_match="true">
-      <match>
-        <action function="play-file" data="directory/dir-no_matching_results.wav"/>
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="directory/dir-result_match.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count_too_large">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-too_many_result.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_last">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-no_more_results.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_item">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-result_number.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_at">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-at_extension.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_menu">
-    <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-      <match>
-        <action function="play-file" data="directory/dir-to_select_entry.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-for_next.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-for_prev.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-start_new_search.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/dir/tts.xml b/conf/rayo/lang/en/dir/tts.xml
deleted file mode 100644 (file)
index d5f112d..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-<include>
-
-  <macro name="directory_intro">
-    <input pattern="^(last_name)" break_on_match="false">
-      <match>
-        <action function="speak-text" data="Please enter the first few digit of the person last name"/>
-      </match>
-    </input>
-    <input pattern="^(first_name)" break_on_match="false">
-      <match>
-        <action function="speak-text" data="Please enter the first few digit of the person first name"/>
-      </match>
-    </input>
-    <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="speak-text" data="to search by first name, press $2"/>
-      </match>
-    </input>
-    <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="speak-text" data="to search by last name, press $2"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_min_search_digits">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="You need to specify a minimum the first $1 letters of the person name, try again."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count">
-    <input pattern="^0$" break_on_match="true">
-      <match>
-        <action function="speak-text" data="Your search match no user on this system, try again."/>
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1 result match your search"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count_too_large">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Your search returned too many result, please try again"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_last">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="No more result"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_item">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Result number $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_menu">
-    <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-      <match>
-        <action function="speak-text" data="To select this entry press $1, for the next entry press $2, for the previous entry press $3, to make a new search press $4"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_at">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="at extension $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/en.xml b/conf/rayo/lang/en/en.xml
deleted file mode 100644 (file)
index 24bee31..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<include>
-  <language name="en" say-module="en" sound-prefix="$${sound_prefix}" tts-engine="cepstral" tts-voice="callie">
-    <phrases>
-      <macros>
-        <X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
-        <!-- voicemail_en_tts is purely implemented with tts, we have the files based one that is the default. -->
-        <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/> <!-- vm/tts.xml if you want to use tts and have cepstral -->
-        <X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral -->
-        <X-PRE-PROCESS cmd="include" data="ivr/*.xml"/>  <!-- IVR and custom phrases go here -->
-      </macros>
-      <X-PRE-PROCESS cmd="include" data="vm/voicemail_ivr.xml"/>
-    </phrases>
-  </language>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/ivr/sounds.xml b/conf/rayo/lang/en/ivr/sounds.xml
deleted file mode 100644 (file)
index 0c4f0b9..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-<include>
-  <macro name="queue_position">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="ivr/ivr-you_are_number.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="ivr/ivr-in_line.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="has_called_conf">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="$1"/>
-        <action function="sleep" data="100"/>
-        <action function="play-file" data="conference/conf-has_joined.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="has_left_conf">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="$1"/>
-        <action function="sleep" data="100"/>
-        <action function="play-file" data="conference/conf-has_left.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="callers_in_conf">
-    <input pattern="^1$" break_on_match="true">
-      <match>
-        <action function="sleep" data="500"/>
-        <!--<action function="play-file" data="ivr/ivr-there_is.wav"/>-->
-        <action function="play-file" data="digits/1.wav"/>
-        <action function="sleep" data="100"/>
-        <action function="play-file" data="conference/conf-listener_in_conference.wav"/>
-      </match>
-    </input>
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="sleep" data="500"/>
-        <action function="play-file" data="ivr/ivr-there_are.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="sleep" data="100"/>
-        <action function="play-file" data="conference/conf-members_in_conference.wav"/>
-      </match>
-      <nomatch>
-        <action function="sleep" data="500"/>
-        <action function="play-file" data="ivr/ivr-there_are.wav"/>
-        <action function="play-file" data="digits/0.wav"/>
-        <action function="sleep" data="100"/>
-        <action function="play-file" data="conference/conf-members_in_conference.wav"/>
-      </nomatch>
-    </input>
-  </macro>
-
-  <macro name="enter_dest_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="sleep" data="1000"/>
-        <action function="play-file" data="ivr/ivr-enter_destination_telephone_number.wav"/>
-        <action function="sleep" data="1000"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="enter_src_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="sleep" data="1000"/>
-        <action function="play-file" data="ivr/ivr-enter_source_telephone_number.wav"/>
-        <action function="sleep" data="1000"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="call_forward_set">
-    <input pattern="^(\d+):(\d+)$">
-      <match>
-        <action function="sleep" data="1000"/>
-        <action function="play-file" data="ivr/ivr-extension_number.wav"/>
-        <action function="sleep" data="400"/>
-        <action function="say" data="$1" method="iterated" type="number"/>
-        <action function="sleep" data="400"/>
-        <action function="play-file" data="digits/2.wav"/>
-        <action function="sleep" data="1000"/>
-        <action function="play-file" data="ivr/ivr-extension_number.wav"/>
-        <action function="sleep" data="400"/>
-        <action function="say" data="$2" method="iterated" type="number"/>
-        <action function="sleep" data="1000"/>
-        <action function="play-file" data="ivr/ivr-call_forwarding_has_been_set.wav"/>
-        <action function="sleep" data="1500"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="call_forward_cancel">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="sleep" data="1000"/>
-        <action function="play-file" data="ivr/ivr-extension_number.wav"/>
-        <action function="sleep" data="400"/>
-        <action function="say" data="$1" method="iterated" type="number"/>
-        <action function="play-file" data="ivr/ivr-call_forwarding_has_been_cancelled.wav"/>
-        <action function="sleep" data="1500"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="screen_confirm">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="sleep" data="500"/>
-        <action function="play-file" data="ivr/ivr-call_from.wav"/>
-        <action function="sleep" data="250"/>
-        <!-- Note, be sure to pass in the full path to the file or else!! -->
-        <action function="play-file" data="$1"/>
-        <action function="sleep" data="500"/>
-        <action function="play-file" data="ivr/ivr-to_accept_press_one.wav"/>
-        <action function="sleep" data="500"/>
-        <action function="play-file" data="ivr/ivr-to_reject.wav"/>
-        <action function="sleep" data="50"/>
-        <action function="play-file" data="ivr/ivr-hang_up.wav"/>
-        <action function="sleep" data="1500"/>
-        <action function="play-file" data="ivr/ivr-call_from.wav"/>
-        <action function="sleep" data="250"/>
-        <action function="play-file" data="$1"/>
-        <action function="sleep" data="500"/>
-        <action function="play-file" data="ivr/ivr-to_accept_press_one.wav"/>
-        <action function="sleep" data="500"/>
-        <action function="play-file" data="ivr/ivr-to_reject.wav"/>
-        <action function="sleep" data="50"/>
-        <action function="play-file" data="ivr/ivr-hang_up.wav"/>
-        <action function="sleep" data="1500"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/vm/sounds.xml b/conf/rayo/lang/en/vm/sounds.xml
deleted file mode 100644 (file)
index fdef472..0000000
+++ /dev/null
@@ -1,441 +0,0 @@
-<include>
-
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_change_pass_success">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-password_has_been_changed.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_change_pass_fail">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-password_not_valid.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-        <!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-abort.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^(1):(.*)$" break_on_match="true">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-$2.wav"/>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-$2.wav"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <!-- To listen to new messages -->
-        <action function="play-file" data="voicemail/vm-listen_new.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To listen to saved messages -->
-        <action function="play-file" data="voicemail/vm-listen_saved.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- For advanced options -->
-        <action function="play-file" data="voicemail/vm-advanced.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To exit -->
-        <action function="play-file" data="voicemail/vm-to_exit.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <!-- To record a greeting -->
-        <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To choose greeting -->
-        <action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To record your name -->
-        <action function="play-file" data="voicemail/vm-record_name2.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To change password -->
-        <action function="play-file" data="voicemail/vm-change_password.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To return to main menu -->
-        <action function="play-file" data="voicemail/vm-main_menu.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-rerecord.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-continue.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-send_message_now.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-        <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-return_call.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-return_call.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_message.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-greeting.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-selected.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-person.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-not_available.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-        <action function="play-file" data="voicemail/vm-message_number.wav"/>
-        <action function="say" data="$2" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^000|^$|^[Aa]non|^[Pp]rivate" break_on_match="true">
-      <match>
-        <!-- add 'anonymous caller' sound here -->
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="ivr/ivr-this_is_a_call_from.wav"/>
-        <action function="execute" data="sleep(100)"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(500)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack">
-    <input pattern="^(too-small)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-too-small.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="short_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_disk_quota_exceeded">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_announce_ext">
-    <input pattern="^([^\:]+):(.*)$">
-      <match>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_full">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_empty">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/vm/tts.xml b/conf/rayo/lang/en/vm/tts.xml
deleted file mode 100644 (file)
index 2de4b37..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-<include>
-
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="please enter your i d, followed by $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="please enter your password, followed by $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="login incorrect."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="welcome to your voicemail."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="goodbye."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="too many failed attempts."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^1:(.*)$" break_on_match="true">
-      <match>
-        <action function="speak-text" data="you have 1 $1 message in folder ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-        <action function="speak-text" data="you have $1 $2 messages in folder ${voicemail_current_folder}."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To listen to new messages, press $1, To listen to saved messages, press $2, For advanced options, press $3, to exit, press $4."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To record a greeting, press $1, To choose a greeting, press $2, To record your name, press $3, to change your password, press $5, to return to the main menu, press $5."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="at the tone, please record your name, press any key or stop talking to end the recording."/>
-
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To listen to the recording, press $1, To save the recording, press $2, To re record, press $3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To mark this message urgent, press $1, To continue, press $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="speak-text" data="$1 is not a valid extension."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="speak-text" data="enter the extension you wish to forward to, then press $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="speak-text" data="To record an announcement, press $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To listen to the recording again, press $1, To save the recording, press $2,  To delete the recording, press $3, to forward the recording to your email, press $4, to call the caller now, press $5, To forward this message to another extension, press $6."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="choose a greeting between 1 and 3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="invalid value."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="record your greeting at the tone, press any key or stop talking to end the recording."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="record your message at the tone, press any key or stop talking to end the recording."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="greeting $1 selected."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1 is not available."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(.*)$">
-      <match>
-        <action function="speak-text" data="$1 message number $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_ack">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="message $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="${strftime($1|%A, %B %d %Y, %I:%M %p)}"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/en/vm/voicemail_ivr.xml b/conf/rayo/lang/en/vm/voicemail_ivr.xml
deleted file mode 100644 (file)
index 1c48299..0000000
+++ /dev/null
@@ -1,417 +0,0 @@
-<include>
-
-  <macros name="voicemail_ivr">
-    <macro name="press_key">
-      <input pattern="^(.*):(.*)$">
-        <match>
-          <action function="play-file" data="$2"/>
-          <action function="play-file" data="voicemail/vm-press.wav"/>
-          <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="plural_msg">
-      <input pattern="^[1]:(.*):(.*)$" break_on_match="true">
-        <match>
-          <action function="play-file" data="$1"/>
-        </match>
-      </input>
-      <input pattern="^.*:(.*):(.*)$" break_on_match="true">
-        <match>
-          <action function="play-file" data="$2"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="enter_id">
-      <input pattern="(.+)">
-        <match>
-          <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-          <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        </match>
-        <nomatch>
-          <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-          <action function="say" data="${VM-Key-Terminator}" method="pronounced" type="name_spelled"/>
-        </nomatch>
-      </input>
-    </macro>
-
-    <macro name="enter_pass">
-      <input pattern="(.+)">
-        <match>
-          <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-          <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        </match>
-        <nomatch>
-          <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-          <action function="say" data="${VM-Key-Terminator}" method="pronounced" type="name_spelled"/>
-        </nomatch>
-
-      </input>
-    </macro>
-
-    <macro name="fail_auth">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="hello">
-      <input>
-        <match>
-          <!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
-        </match>
-      </input>
-    </macro>
-
-    <macro name="goodbye">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="abort">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-abort.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="message_count">
-      <input field="${VM-Total-New-Urgent-Messages}" pattern="^(0)$">
-        <nomatch>
-          <action function="play-file" data="voicemail/vm-you_have.wav"/>
-          <action function="say" data="${VM-Total-New-Urgent-Messages}" method="pronounced" type="items"/>
-          <action function="play-file" data="voicemail/vm-urgent-new.wav"/>
-          <action function="phrase" phrase="plural_msg@voicemail_ivr" data="${VM-Total-New-Urgent-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
-        </nomatch>
-      </input>
-      <input field="${VM-Total-New-Messages}" pattern="^(\d+)$">
-        <match>
-          <action function="play-file" data="voicemail/vm-you_have.wav"/>
-          <action function="say" data="${VM-Total-New-Messages}" method="pronounced" type="items"/>
-          <action function="play-file" data="voicemail/vm-new.wav"/>
-          <action function="phrase" phrase="plural_msg@voicemail_ivr" data="${VM-Total-New-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
-        </match>
-      </input>
-      <input field="${VM-Total-Saved-Messages}" pattern="^(0)$">
-        <nomatch>
-          <action function="play-file" data="currency/and.wav"/>
-          <action function="say" data="${VM-Total-Saved-Messages}" method="pronounced" type="items"/>
-          <action function="play-file" data="voicemail/vm-saved.wav"/>
-          <action function="phrase" phrase="plural_msg@voicemail_ivr" data="${VM-Total-Saved-Messages}:voicemail/vm-message.wav:voicemail/vm-messages.wav"/>
-        </nomatch>
-      </input>
-    </macro>
-
-    <macro name="menu">
-      <input field="${VM-Total-New-Messages}" pattern="^(0)$">
-        <nomatch>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Play-New-Messages}:voicemail/vm-listen_new.wav"/>
-       </nomatch>
-      </input>
-      <input field="${VM-Total-Saved-Messages}" pattern="^(0)$">
-       <nomatch>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Play-Saved-Messages}:voicemail/vm-listen_saved.wav"/>
-       </nomatch>
-      </input>
-      <input>
-       <match>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Config-Menu}:voicemail/vm-advanced.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Terminator}:voicemail/vm-to_exit.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="config_menu">
-      <input>
-        <match>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Record-Greeting}:voicemail/vm-to_record_greeting.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Choose-Greeting}:voicemail/vm-choose_greeting.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Record-Name}:voicemail/vm-record_name2.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Change-Password}:voicemail/vm-change_password.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Menu}:voicemail/vm-main_menu.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="record_name">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="forward_ask_prepend">
-      <input>
-        <match>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Prepend}:voicemail/vm-forward_add_intro.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Forward}:voicemail/vm-send_message_now.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="forward_ask_extension">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-          <!--<action function="phrase" phrase="play-file" data="voicemail/vm-followed_by.wav"/>-->
-          <!--<action function="say" data="${VM-Key-Terminate}" method="pronounced" type="name_spelled"/>-->
-        </match>
-      </input>
-    </macro>
-
-    <macro name="record_file_check">
-      <input>
-        <match>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Listen-File}:voicemail/vm-listen_to_recording.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Save-File}:voicemail/vm-save_recording.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Record-File}:voicemail/vm-rerecord.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="record_urgent_check">
-      <input>
-        <match>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Urgent}:voicemail/vm-mark-urgent.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Terminator}:voicemail/vm-continue.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="forward_prepend">
-      <input>
-        <match>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Prepend}:voicemail/vm-forward_add_intro.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Forward}:voicemail/vm-send_message_now.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="forward_message_enter_extension">
-      <input pattern="^([0-9#*])$">
-        <match>
-          <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-          <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-          <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="invalid_extension">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="listen_file_check">
-      <input>
-        <match>
-          <!--<action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Next-Msg}:voicemail/vm-for_next_msg.wav"/>--> <!-- Not existant in callie recordings -->
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Listen-File}:voicemail/vm-listen_to_recording.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Save-File}:voicemail/vm-save_recording.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Delete-File}:voicemail/vm-delete_recording.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Forward}:voicemail/vm-to_forward.wav"/>
-        </match>
-      </input>
-      <input field="${VM-Message-Email}" pattern="^$">
-        <nomatch>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Email}:voicemail/vm-forward_to_email.wav"/>
-        </nomatch>
-      </input>
-      <input>
-        <match>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Callback}:voicemail/vm-return_call.wav"/>
-          <action function="phrase" phrase="press_key@voicemail_ivr" data="${VM-Key-Main-Forward}:voicemail/vm-to_forward.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="choose_greeting">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="choose_greeting_fail">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="record_greeting">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="record_message">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-record_message.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="greeting_selected">
-      <input pattern="^(\d+)$">
-        <match>
-         <action function="play-file" data="${VM-Preference-Greeting-File-Path}"/>
-          <action function="play-file" data="voicemail/vm-greeting.wav"/>
-          <action function="say" data="$1" method="pronounced" type="items"/>
-          <action function="play-file" data="voicemail/vm-selected.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="play_greeting">
-      <input pattern="^(.*)$">
-        <match>
-          <action function="play-file" data="voicemail/vm-person.wav"/>
-          <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-          <action function="play-file" data="voicemail/vm-not_available.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="say_number">
-      <input pattern="^(\d+)$">
-        <match>
-          <action function="say" data="$1" method="pronounced" type="items"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="say_message_number">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-${VM-Message-Type}.wav"/>
-          <action function="play-file" data="voicemail/vm-message_number.wav"/>
-          <action function="say" data="${VM-Message-Number}" method="pronounced" type="items"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="say_phone_number">
-      <input pattern="^(.*)$">
-        <match>
-          <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="say_name">
-      <input pattern="^(.*)$">
-        <match>
-          <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        </match>
-      </input>
-    </macro>
-    <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-    <macro name="ack">
-      <input pattern="^(too-small)$">
-        <match>
-          <action function="play-file" data="voicemail/vm-too-small.wav"/>
-        </match>
-      </input>
-      <input pattern="^(undeleted)$">
-        <match>
-          <action function="play-file" data="voicemail/vm-message.wav"/>
-          <action function="play-file" data="voicemail/vm-$1.wav"/>
-        </match>
-      </input>
-      <input pattern="^(deleted)$">
-        <match>
-          <action function="play-file" data="voicemail/vm-message.wav"/>
-          <action function="play-file" data="voicemail/vm-$1.wav"/>
-        </match>
-      </input>
-      <input pattern="^(saved)$">
-        <match>
-          <action function="play-file" data="voicemail/vm-message.wav"/>
-          <action function="play-file" data="voicemail/vm-$1.wav"/>
-        </match>
-      </input>
-      <input pattern="^(emailed)$">
-        <match>
-          <action function="play-file" data="voicemail/vm-message.wav"/>
-          <action function="play-file" data="voicemail/vm-$1.wav"/>
-        </match>
-      </input>
-      <input pattern="^(marked-urgent)$">
-        <match>
-          <action function="play-file" data="voicemail/vm-message.wav"/>
-          <action function="play-file" data="voicemail/vm-$1.wav"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="say_date">
-      <input pattern="^(.*)$">
-        <match>
-          <action function="say" data="$1" method="pronounced" type="short_date_time"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="say_date_event">
-      <input>
-        <match>
-          <action function="say" data="${VM-Message-Received-Epoch}" method="pronounced" type="short_date_time"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="play_message">
-      <input>
-        <match>
-          <action function="play-file" data="${VM-Message-File-Path}"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="play_recording">
-      <input>
-        <match>
-          <action function="play-file" data="${VM-Record-File-Path}"/>
-        </match>
-      </input>
-    </macro>
-
-    <macro name="disk_quota_exceeded">
-      <input>
-        <match>
-          <action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
-        </match>
-      </input>
-    </macro>
-  </macros>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/es/demo/demo-es-ES.xml b/conf/rayo/lang/es/demo/demo-es-ES.xml
deleted file mode 100644 (file)
index 4c6919d..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-    <macro name="msgcount">
-      <input pattern="(.*)">
-       <match>
-         <action function="execute" data="sleep(1000)"/>
-         <action function="play-file" data="voicemail/vm-you_have.wav"/>
-         <action function="say" data="$1" method="pronounced" type="items"/>
-         <action function="play-file" data="voicemail/vm-messages.wav"/>
-         <!-- or -->
-         <!--<action function="speak-text" data="Usted tiene $1 mensajes"/>-->
-       </match>
-      </input>
-    </macro>
-    <macro name="saydate">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="timespec">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="time_measurement"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="ip-addr">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="iterated" type="ip_address"/>
-         <action function="say" data="$1" method="pronounced" type="ip_address"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="spell">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="spell-phonetic">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="tts-timeleft">
-      <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
-      <!-- If the function "break" is encountered all parsing will cease -->
-      <input pattern="(\d+):(\d+)">
-       <match>
-         <action function="speak-text" data="Quedan $1 minutos y $2 segundos $strftime(%Y-%m-%d)"/>
-         <action function="break"/>
-       </match>
-       <nomatch>
-         <action function="speak-text" data="Esa fue una entrada inválida."/>
-       </nomatch>
-      </input>
-      <input pattern="(\d+) min (\d+) sec">
-       <match>
-         <action function="speak-text" data="Quedan $1 minutos y $2 segundos $strftime(%Y-%m-%d)"/>
-       </match>
-       <nomatch>
-         <action function="speak-text" data="Esa fue una entrada inválida."/>
-       </nomatch>
-      </input>
-    </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/demo/demo-es-MX.xml b/conf/rayo/lang/es/demo/demo-es-MX.xml
deleted file mode 100644 (file)
index 4c6919d..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-    <macro name="msgcount">
-      <input pattern="(.*)">
-       <match>
-         <action function="execute" data="sleep(1000)"/>
-         <action function="play-file" data="voicemail/vm-you_have.wav"/>
-         <action function="say" data="$1" method="pronounced" type="items"/>
-         <action function="play-file" data="voicemail/vm-messages.wav"/>
-         <!-- or -->
-         <!--<action function="speak-text" data="Usted tiene $1 mensajes"/>-->
-       </match>
-      </input>
-    </macro>
-    <macro name="saydate">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="timespec">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="time_measurement"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="ip-addr">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="iterated" type="ip_address"/>
-         <action function="say" data="$1" method="pronounced" type="ip_address"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="spell">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="spell-phonetic">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="tts-timeleft">
-      <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
-      <!-- If the function "break" is encountered all parsing will cease -->
-      <input pattern="(\d+):(\d+)">
-       <match>
-         <action function="speak-text" data="Quedan $1 minutos y $2 segundos $strftime(%Y-%m-%d)"/>
-         <action function="break"/>
-       </match>
-       <nomatch>
-         <action function="speak-text" data="Esa fue una entrada inválida."/>
-       </nomatch>
-      </input>
-      <input pattern="(\d+) min (\d+) sec">
-       <match>
-         <action function="speak-text" data="Quedan $1 minutos y $2 segundos $strftime(%Y-%m-%d)"/>
-       </match>
-       <nomatch>
-         <action function="speak-text" data="Esa fue una entrada inválida."/>
-       </nomatch>
-      </input>
-    </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/demo/demo-ivr-es-ES.xml b/conf/rayo/lang/es/demo/demo-ivr-es-ES.xml
deleted file mode 100644 (file)
index ec7d7bc..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-
-  <macro name="demo_ivr_count">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="demo_ivr_main_menu" pause="100"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
-    <input pattern="(.*)">
-      <match>
-        <!-- string together several existing sound files to create one long greeting -->
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
-        <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
-        <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
-
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
-        <action function="play-file" data="silence_stream://1500"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Register for ClueCon -->
-        <action function="play-file" data="ivr/ivr-register_for_cluecon.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 6: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/6.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_main_menu_short" pause="100"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="silence_stream://1000"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
-  <macro name="demo_ivr_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_sub_menu_short"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/demo/demo-ivr-es-MX.xml b/conf/rayo/lang/es/demo/demo-ivr-es-MX.xml
deleted file mode 100644 (file)
index ec7d7bc..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-
-  <macro name="demo_ivr_count">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="demo_ivr_main_menu" pause="100"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
-    <input pattern="(.*)">
-      <match>
-        <!-- string together several existing sound files to create one long greeting -->
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
-        <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
-        <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
-
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
-        <action function="play-file" data="silence_stream://1500"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Register for ClueCon -->
-        <action function="play-file" data="ivr/ivr-register_for_cluecon.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 6: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/6.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_main_menu_short" pause="100"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="silence_stream://1000"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
-  <macro name="demo_ivr_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_sub_menu_short"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/dir/sounds-es-ES.xml b/conf/rayo/lang/es/dir/sounds-es-ES.xml
deleted file mode 100644 (file)
index 2bdc149..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-       <macro name="directory_intro">
-               <input pattern="^(last_name)" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-enter_person.wav"/>
-                               <action function="play-file" data="directory/dir-last_name.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name)" break_on_match="false">
-                       <match>
-                <action function="play-file" data="directory/dir-enter_person.wav"/>
-                <action function="play-file" data="directory/dir-first_name.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_search_by.wav"/>
-                               <action function="play-file" data="directory/dir-first_name.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_search_by.wav"/>
-                               <action function="play-file" data="directory/dir-last_name.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_min_search_digits">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-specify_mininum.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                               <action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count">
-               <input pattern="^0$" break_on_match="true">
-                       <match>
-                               <action function="play-file" data="directory/dir-no_matching_results.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                               <action function="play-file" data="directory/dir-result_match.wav"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count_too_large">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-too_many_result.wav"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_last">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-no_more_results.wav"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_item">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-result_number.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_at">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-at_extension.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_menu">
-               <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_select_entry.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-for_next.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-for_prev.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-start_new_search.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_say_name">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/dir/sounds-es-MX.xml b/conf/rayo/lang/es/dir/sounds-es-MX.xml
deleted file mode 100644 (file)
index 2bdc149..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-       <macro name="directory_intro">
-               <input pattern="^(last_name)" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-enter_person.wav"/>
-                               <action function="play-file" data="directory/dir-last_name.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name)" break_on_match="false">
-                       <match>
-                <action function="play-file" data="directory/dir-enter_person.wav"/>
-                <action function="play-file" data="directory/dir-first_name.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_search_by.wav"/>
-                               <action function="play-file" data="directory/dir-first_name.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_search_by.wav"/>
-                               <action function="play-file" data="directory/dir-last_name.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_min_search_digits">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-specify_mininum.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                               <action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count">
-               <input pattern="^0$" break_on_match="true">
-                       <match>
-                               <action function="play-file" data="directory/dir-no_matching_results.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                               <action function="play-file" data="directory/dir-result_match.wav"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count_too_large">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-too_many_result.wav"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_last">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-no_more_results.wav"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_item">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-result_number.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_at">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-at_extension.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_menu">
-               <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_select_entry.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-for_next.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-for_prev.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-start_new_search.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_say_name">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/dir/tts-es-ES.xml b/conf/rayo/lang/es/dir/tts-es-ES.xml
deleted file mode 100644 (file)
index fbdeca7..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-       <macro name="directory_intro">
-               <input pattern="^(last_name)" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Introduzca las primeras letras del apellido de la persona."/>
-                       </match>
-               </input>
-               <input pattern="^(first_name)" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Introduzca las primeras letras del nombre de la persona."/>
-                       </match>
-               </input>
-               <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Para buscar por apellido, pulse $2"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Para buscar por nombre, pulse $2"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_min_search_digits">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Necesita especificar un mínimo de $1 letras del nombre buscado. Por favor intente de nuevo."/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count">
-               <input pattern="^0$" break_on_match="true">
-                       <match>
-                               <action function="speak-text" data="No hay resultados que coincidan con su busqueda. Por favor intente de nuevo."/>
-                       </match>
-               </input>
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="$1 resultados coinciden con su busqueda."/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count_too_large">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Su busqueda genera demasiados resultados. Por favor intente de nuevo."/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_last">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="No hay más resultados."/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_item">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Resultado número $1"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_menu">
-               <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-                       <match>
-                               <action function="speak-text" data="Para seleccionar este resultado pulse $1, para el resultado siguiente pulse $2, para el resultado previo pulse $3, para empezar una nueva busqueda pulse $4"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_at">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="en la extensión $1"/>
-                       </match>
-               </input>
-       </macro>
-       <macro name="directory_result_say_name">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="$1"/>
-                       </match>
-               </input>
-       </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/dir/tts-es-MX.xml b/conf/rayo/lang/es/dir/tts-es-MX.xml
deleted file mode 100644 (file)
index ddf15d0..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-       <macro name="directory_intro">
-               <input pattern="^(last_name)" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Ingrese las primeras letras del apellido de la persona."/>
-                       </match>
-               </input>
-               <input pattern="^(first_name)" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Ingrese las primeras letras del nombre de la persona."/>
-                       </match>
-               </input>
-               <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Para buscar por apellido, pulse $2"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Para buscar por nombre, pulse $2"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_min_search_digits">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Necesita especificar un mínimo de $1 letras del nombre buscado. Por favor intente de nuevo."/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count">
-               <input pattern="^0$" break_on_match="true">
-                       <match>
-                               <action function="speak-text" data="No hay resultados que coincidan con su busqueda. Por favor intente de nuevo."/>
-                       </match>
-               </input>
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="$1 resultados coinciden con su busqueda."/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count_too_large">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Su busqueda genera demasiados resultados. Por favor intente de nuevo."/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_last">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="No hay más resultados."/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_item">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Resultado número $1"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_menu">
-               <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-                       <match>
-                               <action function="speak-text" data="Para seleccionar este resultado pulse $1, para el resultado siguiente pulse $2, para el resultado previo pulse $3, para empezar una nueva busqueda pulse $4"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_at">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="en la extensión $1"/>
-                       </match>
-               </input>
-       </macro>
-       <macro name="directory_result_say_name">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="$1"/>
-                       </match>
-               </input>
-       </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/es_ES.xml b/conf/rayo/lang/es/es_ES.xml
deleted file mode 100644 (file)
index f8de685..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<include>
-  <language name="es" sound-path="$${sounds_dir}/es/ES/cristina" tts-engine="cepstral" tts-voice="marta">
-    <X-PRE-PROCESS cmd="include" data="demo/*-es-ES.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
-    <!--voicemail_es_ES_tts is purely implemented with tts, we have the files based one that is the default. -->
-    <X-PRE-PROCESS cmd="include" data="vm/sounds-es-ES.xml"/>  <!-- vm/tts.xml if you want to use tts and have cepstral -->
-    <X-PRE-PROCESS cmd="include" data="dir/sounds-es-ES.xml"/>  <!-- dir/tts.xml if you want to use tts and have cepstral -->
-  </language>
-</include>
diff --git a/conf/rayo/lang/es/es_MX.xml b/conf/rayo/lang/es/es_MX.xml
deleted file mode 100644 (file)
index 936abcf..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<include>
-  <language name="es" sound-path="$${sounds_dir}/es/mx/maria" tts-engine="cepstral" tts-voice="marta">
-    <X-PRE-PROCESS cmd="include" data="demo/*-es-MX.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
-    <!--voicemail_es_MX_tts is purely implemented with tts, we have the files based one that is the default. -->
-    <X-PRE-PROCESS cmd="include" data="vm/sounds-es-MX.xml"/>  <!-- vm/tts.xml if you want to use tts and have cepstral -->
-    <X-PRE-PROCESS cmd="include" data="dir/sounds-es-MX.xml"/>  <!-- dir/tts.xml if you want to use tts and have cepstral -->
-  </language>
-</include>
diff --git a/conf/rayo/lang/es/vm/sounds-es-ES.xml b/conf/rayo/lang/es/vm/sounds-es-ES.xml
deleted file mode 100644 (file)
index dcc9d9f..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-abort.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^(1):(.*)$" break_on_match="true">
-      <match>
-       <action function="play-file" data="voicemail/vm-you_have.wav"/>
-       <action function="play-file" data="digits/un.wav"/>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$2.wav"/> 
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-you_have.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-messages.wav"/>
-       <action function="play-file" data="voicemail/vm-$2_s.wav"/> 
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To listen to new messages -->
-       <action function="play-file" data="voicemail/vm-listen_new.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To listen to saved messages -->
-       <action function="play-file" data="voicemail/vm-listen_saved.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- For advanced options -->
-       <action function="play-file" data="voicemail/vm-advanced.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To exit -->
-       <action function="play-file" data="voicemail/vm-to_exit.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To record a greeting -->
-       <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To choose greeting -->
-       <action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To record your name -->
-       <action function="play-file" data="voicemail/vm-record_name2.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To change password -->
-       <action function="play-file" data="voicemail/vm-change_password.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To return to main menu -->
-       <action function="play-file" data="voicemail/vm-main_menu.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-rerecord.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-continue.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-send_message_now.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-       <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-return_call.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-return_call.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_message.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-greeting.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-selected.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-person.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-not_available.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-$1.wav"/> 
-       <action function="play-file" data="voicemail/vm-message_number.wav"/>
-       <action function="say" data="$2" method="pronounced" type="items"/> 
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack"> 
-    <input pattern="^(too-small)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-too-small.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_disk_quota_exceeded">
-    <input pattern="^(.*)$">
-        <match>
-            <action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
-        </match>
-    </input>
-  </macro>
-
-  <macro name="valet_announce_ext">
-    <input pattern="^([^\:]+):(.*)$">
-      <match>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_full">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_empty">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/vm/sounds-es-MX.xml b/conf/rayo/lang/es/vm/sounds-es-MX.xml
deleted file mode 100644 (file)
index 1f22c43..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-abort.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^(1):(.*)$" break_on_match="true">
-      <match>
-       <action function="play-file" data="voicemail/vm-you_have.wav"/>
-       <action function="play-file" data="digits/un.wav"/>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$2.wav"/> 
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-you_have.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-messages.wav"/>
-       <action function="play-file" data="voicemail/vm-$2.wav"/> 
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To listen to new messages -->
-       <action function="play-file" data="voicemail/vm-listen_new.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To listen to saved messages -->
-       <action function="play-file" data="voicemail/vm-listen_saved.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- For advanced options -->
-       <action function="play-file" data="voicemail/vm-advanced.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To exit -->
-       <action function="play-file" data="voicemail/vm-to_exit.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To record a greeting -->
-       <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To choose greeting -->
-       <action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To record your name -->
-       <action function="play-file" data="voicemail/vm-record_name2.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To change password -->
-       <action function="play-file" data="voicemail/vm-change_password.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To return to main menu -->
-       <action function="play-file" data="voicemail/vm-main_menu.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-rerecord.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-continue.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-send_message_now.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-       <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-return_call.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-return_call.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_message.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-greeting.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-selected.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-person.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-not_available.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-$1.wav"/> 
-       <action function="play-file" data="voicemail/vm-message_number.wav"/>
-       <action function="say" data="$2" method="pronounced" type="items"/> 
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack"> 
-    <input pattern="^(too-small)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-too-small.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_disk_quota_exceeded">
-    <input pattern="^(.*)$">
-        <match>
-            <action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
-        </match>
-    </input>
-  </macro>
-
-  <macro name="valet_announce_ext">
-    <input pattern="^([^\:]+):(.*)$">
-      <match>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_full">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_empty">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/vm/tts-es-ES.xml b/conf/rayo/lang/es/vm/tts-es-ES.xml
deleted file mode 100644 (file)
index 6dab48c..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Por favor introduzca su número de usuario, seguido por $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Por favor introduzca su contraseña, seguido por $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Inicio de sesión incorrecto."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Bienvenido a su buzón de voz."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Adiós."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Demasiados intentos fallidos."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^1:(.*)$" break_on_match="true">
-      <match>
-       <action function="speak-text" data="Usted tiene 1 $1 mensaje en la bandeja de entrada ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-       <action function="speak-text" data="Usted tiene $1 $2 mensajes en la bandeja de entrada ${voicemail_current_folder}."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para escuchar mensajes nuevos, pulse $1. Para escuchar mensajes guardados, pulse $2. Para opciones avanzadas, pulse $3. Para salir, pulse $4."/>
-      </match>
-    </input>
-  </macro>
-
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para grabar un saludo, pulse $1. Para elegir un saludo, pulse $2. Para grabar su nombre, pulse $3. Para cambiar su contraseña, pulse $5. Para el menú principal, pulse $5."/>
-      </match>
-    </input>
-  </macro>
-
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Por favor grabe su nombre después de la señal, pulse cualquier tecla o deje de hablar para poner fin a la grabación."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para escuchar la grabación, pulse $1. Para guardar la grabación, pulse $2. Para regrabar, pulse $3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para marcar este mensaje como urgente, pulse $1. Para continuar, pulse $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="$1 no es una extensión válida."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="Introduzca la extensión a la cual quiere enviar este mensaje, seguido de $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="Para grabar un saludo, pulse $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para escuchar la grabación, pulse $1. Para guardar la grabación, pulse $2. Para eliminar la grabación, pulse $3. Para enviar la grabación a su e-mail, pulse $4. Para devolver la llamada, pulse $5. Para enviar este mensaje a otra extensión, pulse $6."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Elija un saludo entre 1 y 9."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Valor inválido."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Grabe su saludo después de la señal, pulse cualquier tecla o deje de hablar para poner fin a la grabación."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Grabe su mensaje después de la señal, pulse cualquier tecla o deje de hablar para poner fin a la grabación."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Saludo $1 seleccionado."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1 no está disponible."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(.*)$">
-      <match>
-       <action function="speak-text" data="$1 mensaje número $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_ack">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="mensaje $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="${strftime($1|%A, %B %d %Y, %I:%M %p)}"/>
-      </match>
-    </input>
-  </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/es/vm/tts-es-MX.xml b/conf/rayo/lang/es/vm/tts-es-MX.xml
deleted file mode 100644 (file)
index ce5722e..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Por favor ingrese su número de usuario, seguido por $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Por favor ingrese su contraseña, seguido por $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Inicio de sesión incorrecto."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Bienvenido a su buzón de voz."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Adiós."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Demasiados intentos fallidos."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^1:(.*)$" break_on_match="true">
-      <match>
-       <action function="speak-text" data="Usted tiene 1 $1 mensaje en la bandeja de entrada ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-       <action function="speak-text" data="Usted tiene $1 $2 mensajes en la bandeja de entrada ${voicemail_current_folder}."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para escuchar mensajes nuevos, pulse $1. Para escuchar mensajes guardados, pulse $2. Para opciones avanzadas, pulse $3. Para salir, pulse $4."/>
-      </match>
-    </input>
-  </macro>
-
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para grabar un saludo, pulse $1. Para elegir un saludo, pulse $2. Para grabar su nombre, pulse $3. Para cambiar su contraseña, pulse $5. Para el menú principal, pulse $5."/>
-      </match>
-    </input>
-  </macro>
-
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Después del tono, por favor anote su nombre, pulse cualquier tecla o deje de hablar para poner fin a la grabación."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para escuchar la grabación, pulse $1. Para guardar la grabación, pulse $2. Para regrabar, pulse $3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para marcar este mensaje como urgente, pulse $1. Para continuar, pulse $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="$1 no es una extensión válida."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="Introduzca la extensión a la cual quiere enviar este mensaje, seguido de $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="Para grabar un saludo, pulse $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para escuchar la grabación, pulse $1. Para guardar la grabación, pulse $2. Para eliminar la grabación, pulse $3. Para enviar la grabación a su e-mail, pulse $4. Para devolver la llamada, pulse $5. Para enviar este mensaje a otra extensión, pulse $6."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Elija un saludo entre 1 y 9."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Valor inválido."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Grabe su saludo después del tono, pulse cualquier tecla o deje de hablar para poner fin a la grabación."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Grabe su mensaje después del tono, pulse cualquier tecla o deje de hablar para poner fin a la grabación."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Saludo $1 seleccionado."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1 no está disponible."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(.*)$">
-      <match>
-       <action function="speak-text" data="$1 mensaje número $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_ack">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="mensaje $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="${strftime($1|%A, %B %d %Y, %I:%M %p)}"/>
-      </match>
-    </input>
-  </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/fr/demo/demo.xml b/conf/rayo/lang/fr/demo/demo.xml
deleted file mode 100644 (file)
index 0d0de59..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<include>
-  <macro name="msgcount">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="tuas.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="messages.wav"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="timeleft">
-    <input pattern="(\d+):(\d+)">
-      <match>
-        <action function="speak-text" data="il reste $1 minutes et $2 secondes"/>
-      </match>
-    </input>
-  </macro>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/fr/dir/sounds.xml b/conf/rayo/lang/fr/dir/sounds.xml
deleted file mode 100644 (file)
index a0dcb2c..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-<include>
-
-  <macro name="directory_intro">
-    <input pattern="^(last_name)" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-enter-person.wav"/>
-        <action function="play-file" data="directory/dir-last_name.wav"/>
-      </match>
-    </input>
-    <input pattern="^(first_name)" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-enter-person.wav"/>
-        <action function="play-file" data="directory/dir-first_name.wav"/>
-      </match>
-    </input>
-    <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-to_search_by.wav"/>
-        <action function="play-file" data="directory/dir-first_name.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-to_search_by.wav"/>
-        <action function="play-file" data="directory/dir-last_name.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_min_search_digits">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-specify_mininum_first.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count">
-    <input pattern="^0$" break_on_match="true">
-      <match>
-        <action function="play-file" data="directory/dir-no_match_entry.wav"/>
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="directory/dir-result_match.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count_too_large">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-to_many_result.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_last">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-no_more_result.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_item">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-result_number.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_at">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-at_extension.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_menu">
-    <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-      <match>
-        <action function="play-file" data="directory/dir-to_select_entry.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-for_next.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-for_prev.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-to_make_new_search.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/fr/dir/tts.xml b/conf/rayo/lang/fr/dir/tts.xml
deleted file mode 100644 (file)
index 7d3e5e3..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<include>
-
-  <macro name="directory_intro">
-    <input pattern="^(last_name)" break_on_match="false">
-      <match>
-        <action function="speak-text" data="Veuillez entrer les premières lettres du nom de famille"/>
-      </match>
-    </input>
-    <input pattern="^(first_name)" break_on_match="false">
-      <match>
-        <action function="speak-text" data="Veuillez entrer les premières lettres du prénom"/>
-      </match>
-    </input>
-    <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="speak-text" data="pour chercher par prénom, tapez $2"/>
-      </match>
-    </input>
-    <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="speak-text" data="pour chercher par nom de famille, tapez $2"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_min_search_digits">
-    <input pattern="^(1)$">
-      <match>
-        <action function="speak-text" data="Vous devez entrer au minimum une lettre du nom de la personne, essayez encore"/>
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Vous devez entrer au minimum $1 lettres du nom de la personne, essayer encore"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count">
-    <input pattern="^0$" break_on_match="true">
-      <match>
-        <action function="speak-text" data="Votre recherche n'a retournée aucun résultat, essayez encore"/>
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1 résultats correspondent à votre recherche"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count_too_large">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Votre recherche retourne trop de résultats, essayer encore"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_last">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Fin des résultats."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_item">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Résultat numéro $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_menu">
-    <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-      <match>
-        <action function="speak-text" data="Pour sélectionner ce nom, tapez $1, pour le nom suivant tapez $2, pour le nom précédent, tapez $3, pour faire une nouvelle recherche, tapez $4"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_at">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="au poste $1"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="directory_result_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/fr/fr.xml b/conf/rayo/lang/fr/fr.xml
deleted file mode 100644 (file)
index 124ca02..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<include>
-  <language name="fr" say-module="fr" sound-prefix="$${sounds_dir}/fr/ca/june" tts-engine="cepstral" tts-voice="david">
-    <phrases>
-      <macros>
-        <X-PRE-PROCESS cmd="include" data="demo/demo.xml"/>
-        <!-- voicemail_fr_tts is purely implemented with tts, we need a files based implementation too -->
-        <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
-        <X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/> <!-- dir/tts.xml if you want to use tts and have cepstral -->
-      </macros>
-    </phrases>
-  </language>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/fr/vm/sounds.xml b/conf/rayo/lang/fr/vm/sounds.xml
deleted file mode 100644 (file)
index 9cd209e..0000000
+++ /dev/null
@@ -1,255 +0,0 @@
-<include>
-
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Entrez votre Identification, suivi par $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Entrez votre code, suivi par $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Identification incorrecte."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Bienvenue sur votre répondeur."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Au revoir."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="Trop de tentatives ont échouées."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^([^:]+):urgent-new">
-      <match>
-        <action function="speak-text" data="Vous avez $1 nouveaux messages urgents dans le répertoire ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^([^:]+):new">
-      <match>
-        <action function="speak-text" data="Vous avez $1 nouveaux messages dans le répertoire ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^([^:]+):saved">
-      <match>
-        <action function="speak-text" data="Vous avez $1 messages sauvegardés dans le répertoire ${voicemail_current_folder}."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="Pour écouter les nouveaux messages, tapez $1, Pour écouter les messages enregistrés, tapez $2, Pour les options avancées, tapez $3, pour sortir, tapez $4."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="pour enregistrer un message d'accueil, tapez $1, Pour choisir votre message d'accueil, tapez $2, Pour enregistrer votre nom, tapez $3, Pour changer votre mot de passe, tapez $4, Pour retourner au menu principal, tapez $5."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="enregistrez votre nom après le bip, puis tapez une touche, ou arrêtez de parler pour arrêter l'enregistrement."/>
-
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="Pour écouter l'enregistrement, tapez $1, pour sauvegarder l'enregistrement, tapez $2, Pour réenregistrer, tapez $3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="Pour indiquer que ce message est urgent, tapez $1, Pour continuer, tapez $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])(:(.*))?$">
-      <match>
-        <action function="speak-text"
-                data="Pour réécouter l'enregistrement à nouveau, tapez $1, Pour sauvegarder l'enregistrement, tapez $2, Pour supprimer l'enregistrement, tapez $3, pour transférer l'enregistrement à votre email $8, tapez $4, Pour appeler l'auteur du message, tapez $5, Pour transférer ce message à un autre numéro, tapez $6."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="choisissez un message d'accueil entre 1 et 3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="valeur incorrecte."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="enregistrez votre message d'accueil après le bip, puis tapez une touche ou arrêtez de parler pour arrêter l'enregistrement."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="enregistrez votre message après le bip, puis tapez une touche ou arrêtez de parler pour arrêter l'enregistrement."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="message d'accueil numéro $1 sélectionné."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1 n'est pas disponible."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^new:(.*)$">
-      <match>
-        <action function="speak-text" data="nouveau message numéro $1."/>
-      </match>
-    </input>
-    <input pattern="^saved:(.*)$">
-      <match>
-        <action function="speak-text" data="message sauvegardé numéro $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_ack">
-    <input pattern="^(too-small)$">
-      <match>
-        <action function="speak-text" data="message trop court"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-        <action function="speak-text" data="message supprimé"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-        <action function="speak-text" data="message sauvegardé"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-        <action function="speak-text" data="message envoyé"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-        <action function="speak-text" data="message marqué urgent"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="${strftime($1|%e/%m/%Y, %H heures %M)}"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/he/demo/demo-ivr.xml b/conf/rayo/lang/he/demo/demo-ivr.xml
deleted file mode 100644 (file)
index df8d24b..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-<include>
-
-  <macro name="demo_ivr_count">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="demo_ivr_main_menu" pause="100"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
-    <input pattern="(.*)">
-      <match>
-        <!-- string together several existing sound files to create one long greeting -->
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
-        <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
-        <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
-
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
-        <action function="play-file" data="silence_stream://1500"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Register for ClueCon -->
-        <action function="play-file" data="ivr/ivr-register_for_cluecon.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 6: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/6.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_main_menu_short" pause="100">
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="silence_stream://1000"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
-  <macro name="demo_ivr_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_sub_menu_short">
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/he/demo/demo.xml b/conf/rayo/lang/he/demo/demo.xml
deleted file mode 100644 (file)
index bcfe6a8..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-<include>
-  <macro name="msgcount">
-    <input pattern="(.*)">
-      <match>
-        <action function="execute" data="sleep(1000)"/>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-        <!-- or -->
-        <!--<action function="speak-text" data="you have $1 messages"/>-->
-      </match>
-    </input>
-  </macro>
-  <macro name="saydate">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="timespec">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="time_measurement"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="ip-addr">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="iterated" type="ip_address"/>
-        <action function="say" data="$1" method="pronounced" type="ip_address"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="spell">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="spell-phonetic">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="tts-timeleft">
-    <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
-    <!-- If the function "break" is encountered all parsing will cease -->
-    <input pattern="(\d+):(\d+)">
-      <match>
-        <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
-        <action function="break"/>
-      </match>
-      <nomatch>
-        <action function="speak-text" data="That input was invalid."/>
-      </nomatch>
-    </input>
-    <input pattern="(\d+) min (\d+) sec">
-      <match>
-        <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
-      </match>
-      <nomatch>
-        <action function="speak-text" data="That input was invalid."/>
-      </nomatch>
-    </input>
-  </macro>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/he/dir/sounds.xml b/conf/rayo/lang/he/dir/sounds.xml
deleted file mode 100644 (file)
index 5fd13ff..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-<include>
-
-  <macro name="directory_intro">
-    <input pattern="^(last_name)" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-enter_person.wav"/>
-        <action function="play-file" data="directory/dir-last_name.wav"/>
-      </match>
-    </input>
-    <input pattern="^(first_name)" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-enter_person.wav"/>
-        <action function="play-file" data="directory/dir-first_name.wav"/>
-      </match>
-    </input>
-    <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-to_search_by.wav"/>
-        <action function="play-file" data="directory/dir-first_name.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-to_search_by.wav"/>
-        <action function="play-file" data="directory/dir-last_name.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_min_search_digits">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-specify_mininum.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count">
-    <input pattern="^0$" break_on_match="true">
-      <match>
-        <action function="play-file" data="directory/dir-no_matching_results.wav"/>
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="directory/dir-result_match.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count_too_large">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-too_many_result.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_last">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-no_more_results.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_item">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-result_number.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_at">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-at_extension.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_menu">
-    <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-      <match>
-        <action function="play-file" data="directory/dir-to_select_entry.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-for_next.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-for_prev.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-start_new_search.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/he/he.xml b/conf/rayo/lang/he/he.xml
deleted file mode 100644 (file)
index 7cca73c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<include>
-  <language name="he" sound-prefix="$${sounds_dir}/he/daniel" tts-engine="cepstral" tts-voice="daniel">
-    <phrases>
-      <macros>
-        <X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
-        <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
-        <X-PRE-PROCESS cmd="include" data="dir/sounds.xml"/>
-      </macros>
-    </phrases>
-  </language>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/he/vm/sounds.xml b/conf/rayo/lang/he/vm/sounds.xml
deleted file mode 100644 (file)
index 917c84b..0000000
+++ /dev/null
@@ -1,417 +0,0 @@
-<include>
-
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-        <!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-abort.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^(1):(.*)$" break_on_match="true">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-$2.wav"/>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-$2.wav"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <!-- To listen to new messages -->
-        <action function="play-file" data="voicemail/vm-listen_new.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To listen to saved messages -->
-        <action function="play-file" data="voicemail/vm-listen_saved.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- For advanced options -->
-        <action function="play-file" data="voicemail/vm-advanced.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To exit -->
-        <action function="play-file" data="voicemail/vm-to_exit.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <!-- To record a greeting -->
-        <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To choose greeting -->
-        <action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To record your name -->
-        <action function="play-file" data="voicemail/vm-record_name2.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To change password -->
-        <action function="play-file" data="voicemail/vm-change_password.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-        <action function="execute" data="sleep(100)"/>
-
-        <!-- To return to main menu -->
-        <action function="play-file" data="voicemail/vm-main_menu.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-rerecord.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-continue.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-send_message_now.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-        <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-return_call.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-return_call.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_message.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-greeting.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-selected.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-person.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-not_available.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-        <action function="play-file" data="voicemail/vm-message_number.wav"/>
-        <action function="say" data="$2" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack">
-    <input pattern="^(too-small)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-too-small.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_disk_quota_exceeded">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_announce_ext">
-    <input pattern="^([^\:]+):(.*)$">
-      <match>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_full">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_empty">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/pt/demo/demo-ivr-pt-BR.xml b/conf/rayo/lang/pt/demo/demo-ivr-pt-BR.xml
deleted file mode 100644 (file)
index ec7d7bc..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-
-  <macro name="demo_ivr_count">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="demo_ivr_main_menu" pause="100"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
-    <input pattern="(.*)">
-      <match>
-        <!-- string together several existing sound files to create one long greeting -->
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
-        <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
-        <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
-
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
-        <action function="play-file" data="silence_stream://1500"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Register for ClueCon -->
-        <action function="play-file" data="ivr/ivr-register_for_cluecon.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 6: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/6.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_main_menu_short" pause="100"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="silence_stream://1000"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
-  <macro name="demo_ivr_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_sub_menu_short"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/demo/demo-ivr-pt-PT.xml b/conf/rayo/lang/pt/demo/demo-ivr-pt-PT.xml
deleted file mode 100644 (file)
index ec7d7bc..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-
-  <macro name="demo_ivr_count">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="demo_ivr_main_menu" pause="100"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
-    <input pattern="(.*)">
-      <match>
-        <!-- string together several existing sound files to create one long greeting -->
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
-        <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
-        <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
-
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
-        <action function="play-file" data="silence_stream://1500"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Register for ClueCon -->
-        <action function="play-file" data="ivr/ivr-register_for_cluecon.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 6: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/6.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_main_menu_short" pause="100"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="silence_stream://1000"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="play-file" data="silence_stream://2000"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
-  <macro name="demo_ivr_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_sub_menu_short"> 
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/demo/demo-pt-BR.xml b/conf/rayo/lang/pt/demo/demo-pt-BR.xml
deleted file mode 100644 (file)
index 846561a..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-    <macro name="msgcount">
-      <input pattern="(.*)">
-       <match>
-         <action function="execute" data="sleep(1000)"/>
-         <action function="play-file" data="voicemail/vm-you_have.wav"/>
-         <action function="say" data="$1" method="pronounced" type="items"/>
-         <action function="play-file" data="voicemail/vm-messages.wav"/>
-         <!-- or -->
-         <!--<action function="speak-text" data="you have $1 messages"/>-->
-       </match>
-      </input>
-    </macro>
-    <macro name="saydate">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="timespec">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="time_measurement"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="ip-addr">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="iterated" type="ip_address"/>
-         <action function="say" data="$1" method="pronounced" type="ip_address"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="spell">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="spell-phonetic">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="tts-timeleft">
-      <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
-      <!-- If the function "break" is encountered all parsing will cease -->
-      <input pattern="(\d+):(\d+)">
-       <match>
-         <action function="speak-text" data="Faltam $1 minutos, $2 segundos $strftime(%Y-%m-%d)"/>
-         <action function="break"/>
-       </match>
-       <nomatch>
-         <action function="speak-text" data="Essa opção não é valida."/>
-       </nomatch>
-      </input>
-      <input pattern="(\d+) min (\d+) sec">
-       <match>
-         <action function="speak-text" data="Faltam $1 minutos, $2 segundos $strftime(%Y-%m-%d)"/>
-       </match>
-       <nomatch>
-         <action function="speak-text" data="Essa opção não é valida."/>
-       </nomatch>
-      </input>
-    </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/demo/demo-pt-PT.xml b/conf/rayo/lang/pt/demo/demo-pt-PT.xml
deleted file mode 100644 (file)
index 34464f7..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-    <macro name="msgcount">
-      <input pattern="(.*)">
-       <match>
-         <action function="execute" data="sleep(1000)"/>
-         <action function="play-file" data="voicemail/vm-you_have.wav"/>
-         <action function="say" data="$1" method="pronounced" type="items"/>
-         <action function="play-file" data="voicemail/vm-messages.wav"/>
-         <!-- or -->
-         <!--<action function="speak-text" data="Você tem $1 mensagens"/>-->
-       </match>
-      </input>
-    </macro>
-    <macro name="saydate">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="timespec">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="time_measurement"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="ip-addr">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="iterated" type="ip_address"/>
-         <action function="say" data="$1" method="pronounced" type="ip_address"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="spell">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="spell-phonetic">
-      <input pattern="(.*)">
-       <match>
-         <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
-       </match>
-      </input>
-    </macro>
-    <macro name="tts-timeleft">
-      <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
-      <!-- If the function "break" is encountered all parsing will cease -->
-      <input pattern="(\d+):(\d+)">
-       <match>
-         <action function="speak-text" data="Faltam $1 minutos, $2 segundos $strftime(%Y-%m-%d)"/>
-         <action function="break"/>
-       </match>
-       <nomatch>
-         <action function="speak-text" data="Essa era uma entrada inválida."/>
-       </nomatch>
-      </input>
-      <input pattern="(\d+) min (\d+) sec">
-       <match>
-         <action function="speak-text" data="Faltam $1 minutos, $2 segundos $strftime(%Y-%m-%d)"/>
-       </match>
-       <nomatch>
-         <action function="speak-text" data="Essa era uma entrada inválida."/>
-       </nomatch>
-      </input>
-    </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/dir/sounds-pt-BR.xml b/conf/rayo/lang/pt/dir/sounds-pt-BR.xml
deleted file mode 100644 (file)
index 2bdc149..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-       <macro name="directory_intro">
-               <input pattern="^(last_name)" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-enter_person.wav"/>
-                               <action function="play-file" data="directory/dir-last_name.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name)" break_on_match="false">
-                       <match>
-                <action function="play-file" data="directory/dir-enter_person.wav"/>
-                <action function="play-file" data="directory/dir-first_name.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_search_by.wav"/>
-                               <action function="play-file" data="directory/dir-first_name.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_search_by.wav"/>
-                               <action function="play-file" data="directory/dir-last_name.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_min_search_digits">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-specify_mininum.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                               <action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count">
-               <input pattern="^0$" break_on_match="true">
-                       <match>
-                               <action function="play-file" data="directory/dir-no_matching_results.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                               <action function="play-file" data="directory/dir-result_match.wav"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count_too_large">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-too_many_result.wav"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_last">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-no_more_results.wav"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_item">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-result_number.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_at">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-at_extension.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_menu">
-               <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_select_entry.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-for_next.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-for_prev.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-start_new_search.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_say_name">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/dir/sounds-pt-PT.xml b/conf/rayo/lang/pt/dir/sounds-pt-PT.xml
deleted file mode 100644 (file)
index 2bdc149..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-       <macro name="directory_intro">
-               <input pattern="^(last_name)" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-enter_person.wav"/>
-                               <action function="play-file" data="directory/dir-last_name.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name)" break_on_match="false">
-                       <match>
-                <action function="play-file" data="directory/dir-enter_person.wav"/>
-                <action function="play-file" data="directory/dir-first_name.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_search_by.wav"/>
-                               <action function="play-file" data="directory/dir-first_name.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_search_by.wav"/>
-                               <action function="play-file" data="directory/dir-last_name.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_min_search_digits">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-specify_mininum.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                               <action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count">
-               <input pattern="^0$" break_on_match="true">
-                       <match>
-                               <action function="play-file" data="directory/dir-no_matching_results.wav"/>
-                       </match>
-               </input>
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                               <action function="play-file" data="directory/dir-result_match.wav"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count_too_large">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-too_many_result.wav"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_last">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-no_more_results.wav"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_item">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-result_number.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="items"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_at">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="play-file" data="directory/dir-at_extension.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_menu">
-               <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-                       <match>
-                               <action function="play-file" data="directory/dir-to_select_entry.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-for_next.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-for_prev.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-                               <action function="play-file" data="directory/dir-start_new_search.wav"/>
-                               <action function="play-file" data="directory/dir-press.wav"/>
-                               <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_say_name">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-                       </match>
-               </input>
-       </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/dir/tts-pt-BR.xml b/conf/rayo/lang/pt/dir/tts-pt-BR.xml
deleted file mode 100644 (file)
index 71b79c6..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-       <macro name="directory_intro">
-               <input pattern="^(last_name)" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Por favor marque as primeiras letras do apelido da pessoa"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name)" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Por favor marque as primeiras letras do nome da pessoa"/>
-                       </match>
-               </input>
-               <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Para buscar por primeiro nome, digite $2"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Para buscar por apelido, digite $2"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_min_search_digits">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Você precisa dizer um mínimo de $1 letras do nome da pessoa, tente novamente."/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count">
-               <input pattern="^0$" break_on_match="true">
-                       <match>
-                               <action function="speak-text" data="Não foram encontrados resultados, tente novamente."/>
-                       </match>
-               </input>
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="$1 resultados encontrados para a sua busca."/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count_too_large">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="A  sua busca devolveu muitos resultados, por favor tente novamente."/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_last">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Não há mais resultados."/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_item">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Resultado número $1"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_menu">
-               <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-                       <match>
-                               <action function="speak-text" data="Para escolher este resultado digite $1, Para o resultado seguinte digite $2, Para o resultado anterior digite $3, Para uma nova busca digite $4"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_at">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="No ramal $1"/>
-                       </match>
-               </input>
-       </macro>
-       <macro name="directory_result_say_name">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="$1"/>
-                       </match>
-               </input>
-       </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/dir/tts-pt-PT.xml b/conf/rayo/lang/pt/dir/tts-pt-PT.xml
deleted file mode 100644 (file)
index 4f03c5a..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-
-       <macro name="directory_intro">
-               <input pattern="^(last_name)" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Por favor introduza os primeiras letras do apelido da pessoa"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name)" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Por favor introduza os primeiros dígitos do primeiro nome da pessoa"/>
-                       </match>
-               </input>
-               <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Para pesquisar por primeiro nome, marque $2"/>
-                       </match>
-               </input>
-               <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-                       <match>
-                               <action function="speak-text" data="Para pesquisar por apelido, marque $2"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_min_search_digits">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Você necessita de especificar um mínimo de $1 letras do nome da pessoa, tente novamente."/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count">
-               <input pattern="^0$" break_on_match="true">
-                       <match>
-                               <action function="speak-text" data="Não foram encontrados resultados, tente novamente."/>
-                       </match>
-               </input>
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="$1 resultados encontrados para a sua pesquisa."/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_count_too_large">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="A sua pesquisa devolveu demasiados resultados, por favor tente novamente."/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_last">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Não há mais resultados"/>
-                       </match>
-               </input>
-
-       </macro>
-
-       <macro name="directory_result_item">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Resultado número $1"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_menu">
-               <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-                       <match>
-                               <action function="speak-text" data="Para seleccionar este resultado marque $1, Para o resultado seguinte marque $2, Para o resultado anterior marque $3, Para iniciar uma nova pesquisa marque $4"/>
-                       </match>
-               </input>
-       </macro>
-
-       <macro name="directory_result_at">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="Na extensão $1"/>
-                       </match>
-               </input>
-       </macro>
-       <macro name="directory_result_say_name">
-               <input pattern="^(.*)$">
-                       <match>
-                               <action function="speak-text" data="$1"/>
-                       </match>
-               </input>
-       </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/pt_BR.xml b/conf/rayo/lang/pt/pt_BR.xml
deleted file mode 100644 (file)
index 690ee69..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<include>
-  <language name="pt" sound-path="$${sounds_dir}/pt/BR/karina" tts-engine="cepstral" tts-voice="marta">
-    <X-PRE-PROCESS cmd="include" data="demo/*-pt-BR.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
-    <!--voicemail_pt_BR_tts is purely implemented with tts, we have the files based one that is the default. -->
-    <X-PRE-PROCESS cmd="include" data="vm/sounds-pt-BR.xml"/>  <!-- vm/tts.xml if you want to use tts and have cepstral -->
-    <X-PRE-PROCESS cmd="include" data="dir/sounds-pt-BR.xml"/>  <!-- dir/tts.xml if you want to use tts and have cepstral -->
-  </language>
-</include>
diff --git a/conf/rayo/lang/pt/pt_PT.xml b/conf/rayo/lang/pt/pt_PT.xml
deleted file mode 100644 (file)
index c30b361..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<include>
-  <language name="pt" sound-path="$${sounds_dir}/pt/PT/karina" tts-engine="cepstral" tts-voice="marta">
-    <X-PRE-PROCESS cmd="include" data="demo/*-pt-PT.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
-    <!--voicemail_pt_PT_tts is purely implemented with tts, we have the files based one that is the default. -->
-    <X-PRE-PROCESS cmd="include" data="vm/sounds-pt-PT.xml"/>  <!-- vm/tts.xml if you want to use tts and have cepstral -->
-    <X-PRE-PROCESS cmd="include" data="dir/sounds-pt-PT.xml"/>  <!-- dir/tts.xml if you want to use tts and have cepstral -->
-  </language>
-</include>
diff --git a/conf/rayo/lang/pt/vm/sounds-pt-BR.xml b/conf/rayo/lang/pt/vm/sounds-pt-BR.xml
deleted file mode 100644 (file)
index 1ab472a..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-abort.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^(1):(.*)$" break_on_match="true">
-      <match>
-       <action function="play-file" data="voicemail/vm-you_have.wav"/>
-       <action function="play-file" data="digits/uma.wav"/>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$2.wav"/> 
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-you_have.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-messages.wav"/>
-       <action function="play-file" data="voicemail/vm-$2_s.wav"/> 
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To listen to new messages -->
-       <action function="play-file" data="voicemail/vm-listen_new.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To listen to saved messages -->
-       <action function="play-file" data="voicemail/vm-listen_saved.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- For advanced options -->
-       <action function="play-file" data="voicemail/vm-advanced.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To exit -->
-       <action function="play-file" data="voicemail/vm-to_exit.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To record a greeting -->
-       <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To choose greeting -->
-       <action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To record your name -->
-       <action function="play-file" data="voicemail/vm-record_name2.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To change password -->
-       <action function="play-file" data="voicemail/vm-change_password.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To return to main menu -->
-       <action function="play-file" data="voicemail/vm-main_menu.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-rerecord.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-continue.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-send_message_now.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-       <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-return_call.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-return_call.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_message.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-greeting.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-selected.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-person.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-not_available.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-$1.wav"/> 
-       <action function="play-file" data="voicemail/vm-message_number.wav"/>
-       <action function="say" data="$2" method="pronounced" type="items"/> 
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack"> 
-    <input pattern="^(too-small)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-too-small.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_disk_quota_exceeded">
-    <input pattern="^(.*)$">
-        <match>
-            <action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
-        </match>
-    </input>
-  </macro>
-
-  <macro name="valet_announce_ext">
-    <input pattern="^([^\:]+):(.*)$">
-      <match>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_full">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_empty">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/vm/sounds-pt-PT.xml b/conf/rayo/lang/pt/vm/sounds-pt-PT.xml
deleted file mode 100644 (file)
index 587d3fe..0000000
+++ /dev/null
@@ -1,404 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <!--<action function="play-file" data="voicemail/vm-hello.wav"/> -->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-abort.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^(1):(.*)$" break_on_match="true">
-      <match>
-       <action function="play-file" data="voicemail/vm-you_have.wav"/>
-       <action function="play-file" data="digits/uma.wav"/>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$2.wav"/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-you_have.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-messages.wav"/>
-       <action function="play-file" data="voicemail/vm-$2_s.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To listen to new messages -->
-       <action function="play-file" data="voicemail/vm-listen_new.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To listen to saved messages -->
-       <action function="play-file" data="voicemail/vm-listen_saved.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- For advanced options -->
-       <action function="play-file" data="voicemail/vm-advanced.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To exit -->
-       <action function="play-file" data="voicemail/vm-to_exit.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To record a greeting -->
-       <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To choose greeting -->
-       <action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To record your name -->
-       <action function="play-file" data="voicemail/vm-record_name2.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To change password -->
-       <action function="play-file" data="voicemail/vm-change_password.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(100)"/>
-
-       <!-- To return to main menu -->
-       <action function="play-file" data="voicemail/vm-main_menu.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-rerecord.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-continue.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-send_message_now.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-       <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-return_call.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-return_call.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-       <action function="play-file" data="voicemail/vm-press.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-record_message.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-greeting.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-selected.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-person.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-not_available.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-$1.wav"/> 
-       <action function="play-file" data="voicemail/vm-message_number.wav"/>
-       <action function="say" data="$2" method="pronounced" type="items"/> 
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack"> 
-    <input pattern="^(too-small)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-too-small.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-message.wav"/>
-       <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_disk_quota_exceeded">
-    <input pattern="^(.*)$">
-        <match>
-            <action function="play-file" data="voicemail/vm-mailbox_full.wav"/>
-        </match>
-    </input>
-  </macro>
-
-  <macro name="valet_announce_ext">
-    <input pattern="^([^\:]+):(.*)$">
-      <match>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_full">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_empty">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/vm/tts-pt-BR.xml b/conf/rayo/lang/pt/vm/tts-pt-BR.xml
deleted file mode 100644 (file)
index 4f77045..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Por favor digite o seu número de usuario, e depois $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Por favor digite a sua contrasenha, e depois $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Inicio incorreto da sessão."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Bem-vindo ao seu correio de voz."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Até logo."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Muitas tentativas fracassadas."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^1:(.*)$" break_on_match="true">
-      <match>
-       <action function="speak-text" data="Você tem 1 $1 mensagem no directório ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-       <action function="speak-text" data="Você tem  $1 $2 mensagens no directório ${voicemail_current_folder}."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para ouvir as mensagens novas, digite $1, Para ouvir as mensagens armazenadas, digite $2, Para opções avançadas, digite $3, Para sair, digite $4."/>
-      </match>
-    </input>
-  </macro>
-
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para gravar a sua saudação, digite $1, Para escolher a sua saudação, digite $2, Para gravar o seu nome, digite $3, Para mudar a sua senha, digite $5, Para o menu principal, digite $5."/>
-      </match>
-    </input>
-  </macro>
-
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Após o sinal grave o seu nome, digite qualquer tecla ou deixe de falar para finalizar a gravação."/>
-
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para ouvir a gravação, digite $1, Para guardar a gravação, digite $2, Para gravar novamente, digite $3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para marcar esta mensagem como urgente, digite $1, Para continuar, digite $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="$1 não é um ramal válido."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="Marque o ramal para o qual pretende encaminhar esta mensagem, e depois $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="Para gravar um anúncio, digite $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para ouvir a gravação novamente, press $1, Para guardar a gravação, press $2,  Para borrar a gravação, press $3, Para enviar a gravação para o seu email, press $4, Para devolver a ligação agora, press $5, Para encaminhar esta mensagem para outro ramal, press $6."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Escolha uma saudação entre as opções 1 e 3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Valor inválido."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Após o sinal grave a sua saudação, digite qualquer tecla ou deixe de falar para finalizar a gravação."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Após o sinal grave a sua mensagem, digite qualquer tecla ou deixe de falar para finalizar a gravação."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Saudação $1 selecionada."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1 não está disponível."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(.*)$">
-      <match>
-       <action function="speak-text" data="$1 mensagem número $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_ack">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Mensagem $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="${strftime($1|%A, %B %d %Y, %I:%M %p)}"/>
-      </match>
-    </input>
-  </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/pt/vm/tts-pt-PT.xml b/conf/rayo/lang/pt/vm/tts-pt-PT.xml
deleted file mode 100644 (file)
index c3dfc3a..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Por favor introduza o seu número de utilizador, seguido de $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Por favor introduza a sua palavra passe, seguida de $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Falha na autenticação."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Bem-vindo ao seu correio de voz."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Até breve."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="speak-text" data="Demasiadas tentativas falhadas."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^1:(.*)$" break_on_match="true">
-      <match>
-       <action function="speak-text" data="Você tem 1 $1 mensagen no directório ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-       <action function="speak-text" data="Você tem $1 $2 mensagens no directório ${voicemail_current_folder}."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para ouvir as mensagens novas, marque $1, Para ouvir as mensagens guardadas, marque $2, Para opções avançadas, marque $3, Para sair, marque $4."/>
-      </match>
-    </input>
-  </macro>
-
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para gravar a sua saudação, marque $1, Para escolher a sua saudação, marque $2, Para gravar o seu nome, marque $3, Para alterar a sua palavra passe, marque $5, Para o menu principal, marque $5."/>
-      </match>
-    </input>
-  </macro>
-
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Após o sinal grave o seu nome, pressione qualquer tecla ou deixe de falar para parar a gravação."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para ouvir a gravação, marque $1, Para guardar a gravação, marque $2, Para gravar novamente, marque $3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para marcar esta mensagem como urgente, marque $1, Para continuar, marque $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="$1 não é uma extensão válida."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="Introduza a extensão para a qual pretende encaminhar esta mensagem, seguido de $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="speak-text" data="Para gravar um anúncio, marque $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="speak-text" 
-               data="Para ouvir a gravação novamente, marque $1, Para guardar a gravação, marque $2,  Para apagar a gravação, marque $3, Para encaminhar a gravação para o seu email, marque $4, Para devolver a chamada agora, marque $5, Para encaminhar esta mensagem para outra extensão, marque $6."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Seleccione uma saudação entre 1 e 3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="valor inválido."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Após o sinal grave a sua saudação, pressione qualquer tecla ou deixe de falar para parar a gravação."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Após o sinal grave a sua mensagem, pressione qualquer tecla ou deixe de falar para parar a gravação."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Saudação $1 seleccionada."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1 não está disponível."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(.*)$">
-      <match>
-       <action function="speak-text" data="$1 mensagem número $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_ack">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="Mensagem $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="speak-text" data="${strftime($1|%A, %B %d %Y, %I:%M %p)}"/>
-      </match>
-    </input>
-  </macro>
-
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/lang/ru/demo/demo-ivr.xml b/conf/rayo/lang/ru/demo/demo-ivr.xml
deleted file mode 100644 (file)
index 7de0d7f..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-<include>
-
-  <macro name="demo_ivr_count">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="demo_ivr_main_menu" pause="250"> <!-- See conf/autoload_config/ivr.conf.xml for an example on how to use this macro in an IVR -->
-    <input pattern="(.*)">
-      <match>
-        <!-- string together several existing sound files to create one long greeting -->
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-this_ivr_will_let_you_test_features.wav"/>
-        <action function="play-file" data="ivr/ivr-you_may_exit_by_hanging_up.wav"/>
-        <!-- note that you can do more than just play files, e.g. have pauses and do TTS -->
-
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="play-file" data="ivr/ivr-enter_ext_pound.wav"/>
-        <action function="execute" data="sleep(1500)"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="execute" data="sleep(2000)"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_main_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_main_menu_short" pause="250">
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option 1: Call FreeSWITCH conference-->
-        <action function="execute" data="sleep(1000)"/>
-        <action function="play-file" data="ivr/ivr-to_call_the_freeswitch_conference.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/1.wav"/>
-
-        <!-- Menu option 2: Do FreeSWITCH echo test -->
-        <action function="play-file" data="ivr/ivr-to_do_a_freeswitch_echo_test.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/2.wav"/>
-
-        <!-- Menu option 3: Listen to Music on Hold -->
-        <action function="play-file" data="ivr/ivr-to_listen_to_moh.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/3.wav"/>
-
-        <!-- Menu option 4: Hear a sample submenu -->
-        <action function="play-file" data="ivr/ivr-to_hear_sample_submenu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/4.wav"/>
-
-        <!-- Menu option 5: Listen to screaming monkeys -->
-        <action function="play-file" data="ivr/ivr-to_hear_screaming_monkeys.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/5.wav"/>
-
-        <!-- Menu option 9: Repeat these options -->
-        <action function="play-file" data="ivr/ivr-to_repeat_these_options.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/9.wav"/>
-        <action function="execute" data="sleep(2000)"/>
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the "long" greeting for the demo_ivr_sub_menu -->
-  <macro name="demo_ivr_sub_menu">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="ivr/ivr-welcome_to_freeswitch.wav"/>
-        <action function="play-file" data="ivr/ivr-sample_submenu.wav"/>
-
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-  <!-- The following macro is the same as demo_ivr_sub_menu except it is the "short" version -->
-  <!-- The short version has all the options but not the initial greeting -->
-  <macro name="demo_ivr_sub_menu_short">
-    <input pattern="(.*)">
-      <match>
-        <!-- Menu option *: Return to top menu -->
-        <action function="play-file" data="ivr/ivr-to_return_to_previous_menu.wav"/>
-        <action function="play-file" data="ivr/ivr-please.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="play-file" data="digits/star.wav"/>
-
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/ru/demo/demo.xml b/conf/rayo/lang/ru/demo/demo.xml
deleted file mode 100644 (file)
index 10c9dbc..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<include>
-  <macro name="saymoney">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="currency"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="msgcount">
-    <input pattern="(.*)">
-      <match>
-        <action function="execute" data="sleep(1000)"/>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-        <!-- or -->
-        <!--<action function="speak-text" data="you have $1 messages"/>-->
-      </match>
-    </input>
-  </macro>
-  <macro name="saydate">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="saydatetime">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="timespec">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="time_measurement"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="timespec2">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="CURRENT_DATE_TIME"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="ip-addr-interated">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="iterated" type="ip_address"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="ip-addr">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="ip_address"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="spell">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="spell-phonetic">
-    <input pattern="(.*)">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="tts-timeleft">
-    <!-- The parser will visit each <input> tag and execute the actions in <match> or <nomatch> depending on the pattern param -->
-    <!-- If the function "break" is encountered all parsing will cease -->
-    <input pattern="(\d+):(\d+)">
-      <match>
-        <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
-        <action function="break"/>
-      </match>
-      <nomatch>
-        <action function="speak-text" data="That input was invalid."/>
-      </nomatch>
-    </input>
-    <input pattern="(\d+) min (\d+) sec">
-      <match>
-        <action function="speak-text" data="You have $1 minutes, $2 seconds remaining $strftime(%Y-%m-%d)"/>
-      </match>
-      <nomatch>
-        <action function="speak-text" data="That input was invalid."/>
-      </nomatch>
-    </input>
-  </macro>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/ru/dir/sounds.xml b/conf/rayo/lang/ru/dir/sounds.xml
deleted file mode 100644 (file)
index a0dcb2c..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-<include>
-
-  <macro name="directory_intro">
-    <input pattern="^(last_name)" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-enter-person.wav"/>
-        <action function="play-file" data="directory/dir-last_name.wav"/>
-      </match>
-    </input>
-    <input pattern="^(first_name)" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-enter-person.wav"/>
-        <action function="play-file" data="directory/dir-first_name.wav"/>
-      </match>
-    </input>
-    <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-to_search_by.wav"/>
-        <action function="play-file" data="directory/dir-first_name.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="play-file" data="directory/dir-to_search_by.wav"/>
-        <action function="play-file" data="directory/dir-last_name.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_min_search_digits">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-specify_mininum_first.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="directory/dir-letters_of_person_name.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count">
-    <input pattern="^0$" break_on_match="true">
-      <match>
-        <action function="play-file" data="directory/dir-no_match_entry.wav"/>
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="directory/dir-result_match.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count_too_large">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-to_many_result.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_last">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-no_more_result.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_item">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-result_number.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_at">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="directory/dir-at_extension.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_menu">
-    <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-      <match>
-        <action function="play-file" data="directory/dir-to_select_entry.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-for_next.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-for_prev.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="directory/dir-to_make_new_search.wav"/>
-        <action function="play-file" data="directory/dir-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/ru/dir/tts.xml b/conf/rayo/lang/ru/dir/tts.xml
deleted file mode 100644 (file)
index f0aafa2..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<include>
-
-  <macro name="directory_intro">
-    <input pattern="^(last_name)" break_on_match="false">
-      <match>
-        <action function="speak-text" data="Please enter the first few digit of the person last name"/>
-      </match>
-    </input>
-    <input pattern="^(first_name)" break_on_match="false">
-      <match>
-        <action function="speak-text" data="Please enter the first few digit of the person first name"/>
-      </match>
-    </input>
-    <input pattern="^(last_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="speak-text" data="to search by first name, press $2"/>
-      </match>
-    </input>
-    <input pattern="^(first_name):([0-9#*])$" break_on_match="false">
-      <match>
-        <action function="speak-text" data="to search by last name, press $2"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_min_search_digits">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="You need to specify a minimum the first $1 letters of the person name, try again."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count">
-    <input pattern="^0$" break_on_match="true">
-      <match>
-        <action function="speak-text" data="Your search match no user on this system, try again."/>
-      </match>
-    </input>
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1 result match your search"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_count_too_large">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Your search returned too many result, please try again"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_last">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="No more result"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_item">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="Result number $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_menu">
-    <input pattern="^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$">
-      <match>
-        <action function="speak-text" data="To select this entry press $1, for the next entry press $2, for the previous entry press $3, to make a new search press $4"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="directory_result_at">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="at extension $1"/>
-      </match>
-    </input>
-  </macro>
-  <macro name="directory_result_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/ru/ru.xml b/conf/rayo/lang/ru/ru.xml
deleted file mode 100644 (file)
index 5f52e76..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<!--тестовые файлы Вы звуковые файлы можно взять тут svn co http://svn.freeswitch.ru/bbv/mod_say_ru/ru/  -->
-<include>
-  <language name="ru" sound-prefix="$${sounds_dir}/ru/RU/elena" tts-engine="cepstral" tts-voice="elena">
-    <phrases>
-      <macros>
-        <X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
-        <!--voicemail_en_tts is purely implemented with tts, we have the files based one that is the default. -->
-        <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>  <!-- vm/tts.xml if you want to use tts and have cepstral -->
-      </macros>
-    </phrases>
-  </language>
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/ru/vm/sounds.xml b/conf/rayo/lang/ru/vm/sounds.xml
deleted file mode 100644 (file)
index 2ee9e6e..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-<include>
-
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-enter_id.wav"/>
-        <!--<action function="say" data="$1" method="pronounced" type="name_spelled"/>-->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-enter_pass.wav"/>
-        <!-- лишнее и так долго <action function="say" data="$1" method="pronounced" type="name_spelled"/>-->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-fail_auth.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-hello.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-goodbye.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-        <action function="play-file" data="voicemail/vm-abort.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^(\d+[0,2-9]1|[2-9]1|1):(.*)$"> <!--1, и всё что больше 20-ти 21,31,41 ..   -->
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="MESSAGES"/>
-        <action function="play-file" data="voicemail/vm-$2.wav"/>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <!--<action function="play-file" data="voicemail/vm-in_folder.wav"/>-->
-      </match>
-    </input>
-    <!-- от 10 до 19 и ноль --> <!-- от 5до 9 и больше 20-ти 25-29 -->
-    <input pattern="^(\d+1[0-9]|1[0-9]|0|\d+[0-9][0,5-9]|[2-9][0,5-9]|[0,5-9]):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="MESSAGES"/>
-        <action function="play-file" data="voicemail/vm-$2x.wav"/>
-        <action function="play-file" data="voicemail/vm-messagex.wav"/>
-        <!--<action function="play-file" data="voicemail/vm-in_folder.wav"/>-->
-      </match>
-    </input>
-    <input pattern="^(\d+[0,2-9][2-4]|[2-9][2-4]|[2-4]):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-you_have.wav"/>
-        <action function="say" data="$1" method="pronounced" type="MESSAGES"/>
-        <action function="play-file" data="voicemail/vm-$2x.wav"/>
-        <action function="play-file" data="voicemail/vm-messages.wav"/>
-        <action function="play-file" data="voicemail/vm-in_folder.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-listen_new.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-listen_saved.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-advanced.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-        <action function="play-file" data="voicemail/vm-to_exit.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_record_greeting.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-choose_greeting.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-record_name2.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-change_password.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-main_menu.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_name1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-rerecord.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-mark-urgent.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-continue.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-forward_add_intro.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-send_message_now.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-forward_enter_ext.wav"/>
-        <action function="play-file" data="voicemail/vm-followed_by.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-that_was_an_invalid_ext.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-forward_to_email.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-return_call.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="play-file" data="voicemail/vm-listen_to_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-save_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-delete_recording.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-return_call.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-to_forward.wav"/>
-        <action function="play-file" data="voicemail/vm-press.wav"/>
-        <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-choose_greeting_choose.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-choose_greeting_fail.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_greeting.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-record_message.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-greeting.wav"/>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-        <action function="play-file" data="voicemail/vm-selected.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-person.wav"/>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-        <action function="play-file" data="voicemail/vm-not_available.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-        <action function="play-file" data="voicemail/vm-message_number.wav"/>
-        <action function="say" data="$2" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack">
-    <input pattern="^(too-small)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-too-small.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-        <action function="play-file" data="voicemail/vm-message.wav"/>
-        <action function="play-file" data="voicemail/vm-$1.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/ru/vm/tts.xml b/conf/rayo/lang/ru/vm/tts.xml
deleted file mode 100644 (file)
index 2de4b37..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-<include>
-
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="please enter your i d, followed by $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="please enter your password, followed by $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="login incorrect."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="welcome to your voicemail."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="goodbye."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-        <action function="speak-text" data="too many failed attempts."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-    <input pattern="^1:(.*)$" break_on_match="true">
-      <match>
-        <action function="speak-text" data="you have 1 $1 message in folder ${voicemail_current_folder}."/>
-      </match>
-    </input>
-    <input pattern="^(\d+):(.*)$">
-      <match>
-        <action function="speak-text" data="you have $1 $2 messages in folder ${voicemail_current_folder}."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To listen to new messages, press $1, To listen to saved messages, press $2, For advanced options, press $3, to exit, press $4."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To record a greeting, press $1, To choose a greeting, press $2, To record your name, press $3, to change your password, press $5, to return to the main menu, press $5."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="at the tone, please record your name, press any key or stop talking to end the recording."/>
-
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To listen to the recording, press $1, To save the recording, press $2, To re record, press $3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To mark this message urgent, press $1, To continue, press $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="speak-text" data="$1 is not a valid extension."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="speak-text" data="enter the extension you wish to forward to, then press $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*])$">
-      <match>
-        <action function="speak-text" data="To record an announcement, press $1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-        <action function="speak-text"
-                data="To listen to the recording again, press $1, To save the recording, press $2,  To delete the recording, press $3, to forward the recording to your email, press $4, to call the caller now, press $5, To forward this message to another extension, press $6."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="choose a greeting between 1 and 3."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="invalid value."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="record your greeting at the tone, press any key or stop talking to end the recording."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="record your message at the tone, press any key or stop talking to end the recording."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="greeting $1 selected."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1 is not available."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(.*)$">
-      <match>
-        <action function="speak-text" data="$1 message number $2."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="$1."/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_ack">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="message $1"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="speak-text" data="${strftime($1|%A, %B %d %Y, %I:%M %p)}"/>
-      </match>
-    </input>
-  </macro>
-
-</include>
-<!--
-For Emacs:
-Local Variables:
-mode:xml
-indent-tabs-mode:nil
-tab-width:2
-c-basic-offset:2
-End:
-For VIM:
-vim:set softtabstop=2 shiftwidth=2 tabstop=2 expandtab:
--->
diff --git a/conf/rayo/lang/sv/sv.xml b/conf/rayo/lang/sv/sv.xml
deleted file mode 100644 (file)
index f77e022..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<include>
-  <language name="sv" sound-path="$${sounds_dir}/sv/se/jakob" tts-engine="" tts-voice="">
-    <X-PRE-PROCESS cmd="include" data="ivr/*.xml"/> <!-- Note: this now grabs whole subdir, previously grabbed only demo.xml -->
-    <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>
-    <!--voicemail is purely implemented with files based one that is the default. -->
-  </language>
-</include>
diff --git a/conf/rayo/lang/sv/vm/sounds.xml b/conf/rayo/lang/sv/vm/sounds.xml
deleted file mode 100644 (file)
index aaee3c0..0000000
+++ /dev/null
@@ -1,504 +0,0 @@
-<include><!--This line will be ignored it's here to validate the xml and is optional -->
-  <macro name="voicemail_enter_id">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-knappa_in_din_anknytning_foljt_av.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_enter_pass">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-knappa_in_ditt_pinnummer_foljt_av.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_fail_auth">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-felaktig_inloggning.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_hello">
-    <input pattern="(.*)">
-      <match>
-       <!--<action function="play-file" data="voicemail/vm-hej.wav"/> -->
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_goodbye">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-hejda.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_abort">
-    <input pattern="(.*)">
-      <match>
-       <action function="play-file" data="voicemail/vm-for_manga_felaktiga_forsok.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_message_count">
-       <!-- 
-       Pattern matching needed:
-               0:*
-               1:new
-               *:new
-                       :saved
-                       :urgent
-                       :urgent-new
-                       :urgent-saved
-       -->
-       <input pattern="^(0):(.*)$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="play-file" data="voicemail/vm-inga.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelanden.wav"/>
-               </match>
-       </input>
-       <input pattern="^(1):new$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items" gender="utrum"/>
-                       <action function="play-file" data="voicemail/vm-nytt.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelande..wav"/>
-               </match>
-       </input>
-       <input pattern="^(\d+):new$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items"/>
-                       <action function="play-file" data="voicemail/vm-nya.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelanden.wav"/>
-               </match>
-       </input>
-       <input pattern="^(1):saved$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items" gender="utrum"/>
-                       <action function="play-file" data="voicemail/vm-sparat.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelande..wav"/>
-               </match>
-       </input>
-       <input pattern="^(\d+):saved$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items"/>
-                       <action function="play-file" data="voicemail/vm-sparade.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelanden.wav"/>
-               </match>
-       </input>
-       <input pattern="^(1):urgent$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items" gender="utrum"/>
-                       <action function="play-file" data="voicemail/vm-viktigt.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelande..wav"/>
-               </match>
-       </input>
-       <input pattern="^(\d+):urgent$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items"/>
-                       <action function="play-file" data="voicemail/vm-viktiga.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelanden.wav"/>
-               </match>
-       </input>
-       <input pattern="^(1):urgent-new$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items" gender="utrum"/>
-                       <action function="play-file" data="voicemail/vm-viktigt_nytt.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelande..wav"/>
-               </match>
-       </input>
-       <input pattern="^(\d+):urgent-new$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items"/>
-                       <action function="play-file" data="voicemail/vm-viktiga_nya.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelanden.wav"/>
-               </match>
-       </input>
-       <input pattern="^(1):urgent-saved$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items" gender="utrum"/>
-                       <action function="play-file" data="voicemail/vm-viktigt_sparat.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelande..wav"/>
-               </match>
-       </input>
-       <input pattern="^(\d+):urgent-saved$" break_on_match="true">
-               <match>
-                       <action function="play-file" data="voicemail/vm-du_har.wav"/>
-                       <action function="say" data="$1" method="pronounced" type="items"/>
-                       <action function="play-file" data="voicemail/vm-viktiga_sparade.wav"/> 
-                       <action function="play-file" data="voicemail/vm-meddelanden.wav"/>
-               </match>
-       </input>
-  </macro>
-
-  <macro name="voicemail_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To listen to new messages -->
-       <action function="play-file" data="voicemail/vm-for_att_lyssna_pa_nya_meddelanden.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-
-       <!-- To listen to saved messages -->
-       <action function="play-file" data="voicemail/vm-for_att_lyssna_pa_sparade_meddelanden.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-
-       <!-- For advanced options -->
-       <action function="play-file" data="voicemail/vm-for_avancerade_installningar.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-
-       <!-- To exit -->
-       <action function="play-file" data="voicemail/vm-for_att_avsluta.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_phonetic"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_config_menu">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <!-- To record a greeting -->
-       <action function="play-file" data="voicemail/vm-for_att_spela_in_en_halsning.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-
-       <!-- To choose greeting -->
-       <action function="play-file" data="voicemail/vm-for_att_valja_utgaende_meddelande.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-
-       <!-- To record your name -->
-       <action function="play-file" data="voicemail/vm-for_att_spela_in_ditt_namn.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-
-       <!-- To change password -->
-       <action function="play-file" data="voicemail/vm-for_att_byta_losenord.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-
-       <!-- To return to main menu -->
-       <action function="play-file" data="voicemail/vm-for_att_lyssna_till_huvudmenyn.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-efter_tonen_kan_du_spela_in_ditt_namn.wav"/>
-       <action function="play-file" data="voicemail/vm-for_att_avsluta_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck_valfri_knapp_eller_sluta_prata.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-for_att_lyssna_pa_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_spara_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_spela_in_igen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_urgent_check">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-for_att_markera_detta_meddelande_viktigt.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_fortsatta.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_prepend">
-    <input pattern="^([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-for_att_infoga_en_introduktion_till_detta_meddelande.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_skicka_detta_meddelande_nu.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_forward_message_enter_extension">
-    <input pattern="^([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-knappa_in_anknytningen_att_vidarebefordra_detta_meddelande_till.wav"/>
-       <action function="play-file" data="voicemail/vm-foljt_av.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_invalid_extension">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-det_var_en_felaktig_anknytning.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_listen_file_check">
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-for_att_lyssna_pa_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_spara_meddelandet.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_radera_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_vidarebefordra_detta_meddelande_till_din_epost.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$4" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_ringa_tillbaka_nu.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_vidarebefordra_detta_meddelande.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-    <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
-      <match>
-       <action function="play-file" data="voicemail/vm-for_att_lyssna_pa_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_spara_meddelandet.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_radera_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$3" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_ringa_tillbaka_nu.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$5" method="pronounced" type="name_spelled"/>
-       <action function="execute" data="sleep(200)"/>
-       <action function="play-file" data="voicemail/vm-for_att_vidarebefordra_detta_meddelande.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck.wav"/>
-       <action function="say" data="$6" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-valj_en_halsning_mellan_1_och_9.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_choose_greeting_fail">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-det_var_ett_felaktigt_val.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-spela_in_din_halsning_efter_tonen.wav"/>
-       <action function="play-file" data="voicemail/vm-for_att_avsluta_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck_valfri_knapp_eller_sluta_prata.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_record_message">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-spela_in_ditt_meddelande_efter_tonen.wav"/>
-       <action function="play-file" data="voicemail/vm-for_att_avsluta_inspelningen.wav"/>
-       <action function="play-file" data="voicemail/vm-tryck_valfri_knapp_eller_sluta_prata.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_greeting_selected">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-meddelande_nummer.wav"/>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-       <action function="play-file" data="voicemail/vm-markerad.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_play_greeting">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-personen_med_anknytning.wav"/>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-       <action function="play-file" data="voicemail/vm-not_ar_inte_tillganglig.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_number">
-    <input pattern="^(\d+)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="items"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_message_number">
-    <input pattern="^([a-z]+):(\d+)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-$1.wav"/> 
-       <action function="play-file" data="voicemail/vm-meddelande_nummer.wav"/>
-       <action function="say" data="$2" method="pronounced" type="items"/> 
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_phone_number">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_name">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-  <!-- Note: Update this to marked-urgent,emailed and saved once new sound files are recorded -->
-  <macro name="voicemail_ack"> 
-    <input pattern="^(too-small)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-din_inspelning_ar_kortare_an_tillaten_langd_vanligen_forsok_igen.wav"/>
-      </match>
-    </input>
-    <input pattern="^(deleted)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-meddelande.wav"/>
-       <action function="play-file" data="voicemail/vm-raderat.wav"/>
-      </match>
-    </input>
-    <input pattern="^(saved)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-meddelande.wav"/>
-       <action function="play-file" data="voicemail/vm-sparat.wav"/>
-      </match>
-    </input>
-    <input pattern="^(emailed)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-meddelande.wav"/>
-       <action function="play-file" data="voicemail/vm-skickat_pa_epost.wav"/>
-      </match>
-    </input>
-    <input pattern="^(marked-urgent)$">
-      <match>
-       <action function="play-file" data="voicemail/vm-meddelande.wav"/>
-       <action function="play-file" data="voicemail/vm-markerat_som_viktigt.wav"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_say_date">
-    <input pattern="^(.*)$">
-      <match>
-       <action function="say" data="$1" method="pronounced" type="current_date_time"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="voicemail_disk_quota_exceeded">
-    <input pattern="^(.*)$">
-        <match>
-            <action function="play-file" data="voicemail/vm-den_rostbrevladan_ar_full_vanligen_forsok_ringa_senare.wav"/>
-        </match>
-    </input>
-  </macro>
-
-  <macro name="valet_announce_ext">
-    <input pattern="^([^\:]+):(.*)$">
-      <match>
-        <action function="say" data="$2" method="pronounced" type="name_spelled"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_full">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-
-  <macro name="valet_lot_empty">
-    <input pattern="^(.*)$">
-      <match>
-        <action function="play-file" data="tone_stream://%(275,10,600);%(275,100,300)"/>
-      </match>
-    </input>
-  </macro>
-</include><!--This line will be ignored it's here to validate the xml and is optional -->
diff --git a/conf/rayo/mime.types b/conf/rayo/mime.types
deleted file mode 100644 (file)
index b680b33..0000000
+++ /dev/null
@@ -1,1609 +0,0 @@
-#
-# MIME type configs overriden by the FreeSWITCH project.
-#
-audio/mpeg                                     mp3 mpga mp2 mp2a m2a m3a
-image/jpeg                                     jpg jpeg jpe
-#
-# Additional MIME types added by the FreeSWITCH project.  Any duplicate file extensions listed here will only be
-# used to map from MIME -> extension and not extension -> MIME
-audio/x-mpeg                                   mp3
-audio/mp3                                      mp3
-audio/x-mp3                                    mp3
-audio/mpeg3                                    mp3
-audio/x-mpeg3                                  mp3
-audio/mpg                                      mp3
-audio/x-mpegaudio                              mp3
-audio/x-wave                                   wav
-audio/wave                                     wav
-#
-# The section below was taken from Apache httpd Project at
-# <https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types>
-#
-# This file maps Internet media types to unique file extension(s).
-# Although created for httpd, this file is used by many software systems
-# and has been placed in the public domain for unlimited redisribution.
-#
-# The table below contains both registered and (common) unregistered types.
-# A type that has no unique extension can be ignored -- they are listed
-# here to guide configurations toward known types and to make it easier to
-# identify "new" types.  File extensions are also commonly used to indicate
-# content languages and encodings, so choose them carefully.
-#
-# Internet media types should be registered as described in RFC 4288.
-# The registry is at <http://www.iana.org/assignments/media-types/>.
-#
-# MIME type (lowercased)                       Extensions
-# ============================================ ==========
-# application/1d-interleaved-parityfec
-# application/3gpp-ims+xml
-# application/activemessage
-application/andrew-inset                       ez
-# application/applefile
-application/applixware                         aw
-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/calendar+xml
-# application/cals-1840
-# application/ccmp+xml
-application/ccxml+xml                          ccxml
-application/cdmi-capability                    cdmia
-application/cdmi-container                     cdmic
-application/cdmi-domain                                cdmid
-application/cdmi-object                                cdmio
-application/cdmi-queue                         cdmiq
-# application/cea-2018+xml
-# application/cellml+xml
-# application/cfw
-# application/cnrp+xml
-# application/commonground
-# application/conference-info+xml
-# application/cpl+xml
-# application/csta+xml
-# application/cstadata+xml
-application/cu-seeme                           cu
-# application/cybercash
-application/davmount+xml                       davmount
-# application/dca-rft
-# application/dec-dx
-# application/dialog-info+xml
-# application/dicom
-# application/dns
-application/docbook+xml                                dbk
-# application/dskpp+xml
-application/dssc+der                           dssc
-application/dssc+xml                           xdssc
-# application/dvcs
-application/ecmascript                         ecma
-# application/edi-consent
-# application/edi-x12
-# application/edifact
-application/emma+xml                           emma
-# application/epp+xml
-application/epub+zip                           epub
-# application/eshop
-# application/example
-application/exi                                        exi
-# application/fastinfoset
-# application/fastsoap
-# application/fits
-application/font-tdpfr                         pfr
-# application/framework-attributes+xml
-application/gml+xml                            gml
-application/gpx+xml                            gpx
-application/gxf                                        gxf
-# application/h224
-# application/held+xml
-# application/http
-application/hyperstudio                                stk
-# application/ibe-key-request+xml
-# application/ibe-pkg-reply+xml
-# application/ibe-pp-data
-# application/iges
-# application/im-iscomposing+xml
-# application/index
-# application/index.cmd
-# application/index.obj
-# application/index.response
-# application/index.vnd
-application/inkml+xml                          ink inkml
-# application/iotp
-application/ipfix                              ipfix
-# application/ipp
-# application/isup
-application/java-archive                       jar
-application/java-serialized-object             ser
-application/java-vm                            class
-application/javascript                         js
-application/json                               json
-application/jsonml+json                                jsonml
-# application/kpml-request+xml
-# application/kpml-response+xml
-application/lost+xml                           lostxml
-application/mac-binhex40                       hqx
-application/mac-compactpro                     cpt
-# application/macwriteii
-application/mads+xml                           mads
-application/marc                               mrc
-application/marcxml+xml                                mrcx
-application/mathematica                                ma nb mb
-# application/mathml-content+xml
-# application/mathml-presentation+xml
-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/media_control+xml
-application/mediaservercontrol+xml             mscml
-application/metalink+xml                       metalink
-application/metalink4+xml                      meta4
-application/mets+xml                           mets
-# application/mikey
-application/mods+xml                           mods
-# application/moss-keys
-# application/moss-signature
-# application/mosskey-data
-# application/mosskey-request
-application/mp21                               m21 mp21
-application/mp4                                        mp4s
-# application/mpeg4-generic
-# application/mpeg4-iod
-# application/mpeg4-iod-xmt
-# application/msc-ivr+xml
-# application/msc-mixer+xml
-application/msword                             doc dot
-application/mxf                                        mxf
-# application/nasdata
-# application/news-checkgroups
-# application/news-groupinfo
-# application/news-transmission
-# application/nss
-# application/ocsp-request
-# application/ocsp-response
-application/octet-stream       bin dms lrf mar so dist distz pkg bpk dump elc deploy
-application/oda                                        oda
-application/oebps-package+xml                  opf
-application/ogg                                        ogx
-application/omdoc+xml                          omdoc
-application/onenote                            onetoc onetoc2 onetmp onepkg
-application/oxps                               oxps
-# application/parityfec
-application/patch-ops-error+xml                        xer
-application/pdf                                        pdf
-application/pgp-encrypted                      pgp
-# application/pgp-keys
-application/pgp-signature                      asc sig
-application/pics-rules                         prf
-# application/pidf+xml
-# application/pidf-diff+xml
-application/pkcs10                             p10
-application/pkcs7-mime                         p7m p7c
-application/pkcs7-signature                    p7s
-application/pkcs8                              p8
-application/pkix-attr-cert                     ac
-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/prs.rdf-xml-crypt
-# application/prs.xsf+xml
-application/pskc+xml                           pskcxml
-# 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/resource-lists-diff+xml            rld
-# application/riscos
-# application/rlmi+xml
-application/rls-services+xml                   rs
-application/rpki-ghostbusters                  gbr
-application/rpki-manifest                      mft
-application/rpki-roa                           roa
-# application/rpki-updown
-application/rsd+xml                            rsd
-application/rss+xml                            rss
-application/rtf                                        rtf
-# application/rtx
-# application/samlassertion+xml
-# application/samlmetadata+xml
-application/sbml+xml                           sbml
-application/scvp-cv-request                    scq
-application/scvp-cv-response                   scs
-application/scvp-vp-request                    spq
-application/scvp-vp-response                   spp
-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/sparql-query                       rq
-application/sparql-results+xml                 srx
-# application/spirits-event+xml
-application/srgs                               gram
-application/srgs+xml                           grxml
-application/sru+xml                            sru
-application/ssdl+xml                           ssdl
-application/ssml+xml                           ssml
-# application/tamp-apex-update
-# application/tamp-apex-update-confirm
-# application/tamp-community-update
-# application/tamp-community-update-confirm
-# application/tamp-error
-# application/tamp-sequence-adjust
-# application/tamp-sequence-adjust-confirm
-# application/tamp-status-query
-# application/tamp-status-response
-# application/tamp-update
-# application/tamp-update-confirm
-application/tei+xml                            tei teicorpus
-application/thraud+xml                         tfi
-# application/timestamp-query
-# application/timestamp-reply
-application/timestamped-data                   tsd
-# application/tve-trigger
-# application/ulpfec
-# application/vcard+xml
-# 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.3gpp2.tcap                     tcap
-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.air-application-installer-package+zip    air
-application/vnd.adobe.formscentral.fcdt                fcdt
-application/vnd.adobe.fxp                      fxp fxpl
-# application/vnd.adobe.partial-upload
-application/vnd.adobe.xdp+xml                  xdp
-application/vnd.adobe.xfdf                     xfdf
-# application/vnd.aether.imp
-# application/vnd.ah-barcode
-application/vnd.ahead.space                    ahead
-application/vnd.airzip.filesecure.azf          azf
-application/vnd.airzip.filesecure.azs          azs
-application/vnd.amazon.ebook                   azw
-application/vnd.americandynamics.acc           acc
-application/vnd.amiga.ami                      ami
-# application/vnd.amundsen.maze+xml
-application/vnd.android.package-archive                apk
-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.apple.mpegurl                  m3u8
-# application/vnd.arastra.swi
-application/vnd.aristanetworks.swi             swi
-application/vnd.astraea-software.iota          iota
-application/vnd.audiograph                     aep
-# application/vnd.autopackage
-# application/vnd.avistar+xml
-application/vnd.blueice.multipass              mpm
-# application/vnd.bluetooth.ep.oob
-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.cloanto.rp9                    rp9
-application/vnd.clonk.c4group                  c4g c4d c4f c4p c4u
-application/vnd.cluetrust.cartomobile-config           c11amc
-application/vnd.cluetrust.cartomobile-config-pkg       c11amz
-# application/vnd.collection+json
-# application/vnd.commerce-battelle
-application/vnd.commonspace                    csp
-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.ctct.ws+xml
-# application/vnd.cups-pdf
-# application/vnd.cups-postscript
-application/vnd.cups-ppd                       ppd
-# application/vnd.cups-raster
-# application/vnd.cups-raw
-# application/vnd.curl
-application/vnd.curl.car                       car
-application/vnd.curl.pcurl                     pcurl
-# application/vnd.cybank
-application/vnd.dart                           dart
-application/vnd.data-vision.rdz                        rdz
-application/vnd.dece.data                      uvf uvvf uvd uvvd
-application/vnd.dece.ttml+xml                  uvt uvvt
-application/vnd.dece.unspecified               uvx uvvx
-application/vnd.dece.zip                       uvz uvvz
-application/vnd.denovo.fcselayout-link         fe_launch
-# application/vnd.dir-bi.plate-dl-nosuffix
-application/vnd.dna                            dna
-application/vnd.dolby.mlp                      mlp
-# application/vnd.dolby.mobile.1
-# application/vnd.dolby.mobile.2
-application/vnd.dpgraph                                dpg
-application/vnd.dreamfactory                   dfac
-application/vnd.ds-keypoint                    kpxx
-application/vnd.dvb.ait                                ait
-# application/vnd.dvb.dvbj
-# application/vnd.dvb.esgcontainer
-# application/vnd.dvb.ipdcdftnotifaccess
-# application/vnd.dvb.ipdcesgaccess
-# application/vnd.dvb.ipdcesgaccess2
-# application/vnd.dvb.ipdcesgpdd
-# application/vnd.dvb.ipdcroaming
-# application/vnd.dvb.iptv.alfec-base
-# application/vnd.dvb.iptv.alfec-enhancement
-# application/vnd.dvb.notif-aggregate-root+xml
-# application/vnd.dvb.notif-container+xml
-# application/vnd.dvb.notif-generic+xml
-# application/vnd.dvb.notif-ia-msglist+xml
-# application/vnd.dvb.notif-ia-registration-request+xml
-# application/vnd.dvb.notif-ia-registration-response+xml
-# application/vnd.dvb.notif-init+xml
-# application/vnd.dvb.pfr
-application/vnd.dvb.service                    svc
-# application/vnd.dxr
-application/vnd.dynageo                                geo
-# application/vnd.easykaraoke.cdgdownload
-# 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.emclient.accessrequest+xml
-application/vnd.enliven                                nml
-# application/vnd.eprints.data+xml
-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.etsi.aoc+xml
-# application/vnd.etsi.cug+xml
-# application/vnd.etsi.iptvcommand+xml
-# application/vnd.etsi.iptvdiscovery+xml
-# application/vnd.etsi.iptvprofile+xml
-# application/vnd.etsi.iptvsad-bc+xml
-# application/vnd.etsi.iptvsad-cod+xml
-# application/vnd.etsi.iptvsad-npvr+xml
-# application/vnd.etsi.iptvservice+xml
-# application/vnd.etsi.iptvsync+xml
-# application/vnd.etsi.iptvueprofile+xml
-# application/vnd.etsi.mcid+xml
-# application/vnd.etsi.overload-control-policy-dataset+xml
-# application/vnd.etsi.sci+xml
-# application/vnd.etsi.simservs+xml
-# application/vnd.etsi.tsl+xml
-# application/vnd.etsi.tsl.der
-# application/vnd.eudora.data
-application/vnd.ezpix-album                    ez2
-application/vnd.ezpix-package                  ez3
-# application/vnd.f-secure.mobile
-application/vnd.fdf                            fdf
-application/vnd.fdsn.mseed                     mseed
-application/vnd.fdsn.seed                      seed dataless
-# application/vnd.ffsns
-# application/vnd.fints
-application/vnd.flographit                     gph
-application/vnd.fluxtime.clip                  ftc
-# application/vnd.font-fontforge-sfd
-application/vnd.framemaker                     fm frame maker book
-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.geocube+xml
-application/vnd.geogebra.file                  ggb
-application/vnd.geogebra.tool                  ggt
-application/vnd.geometry-explorer              gex gre
-application/vnd.geonext                                gxt
-application/vnd.geoplan                                g2w
-application/vnd.geospace                       g3w
-# application/vnd.globalplatform.card-content-mgt
-# application/vnd.globalplatform.card-content-mgt-response
-application/vnd.gmx                            gmx
-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.hal+json
-application/vnd.hal+xml                                hal
-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.hydrostatix.sof-data           sfd-hdstx
-# application/vnd.hzn-3d-crossword
-# 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.iccprofile                     icc icm
-application/vnd.igloader                       igl
-application/vnd.immervision-ivp                        ivp
-application/vnd.immervision-ivu                        ivu
-# application/vnd.informedcontrol.rms+xml
-# application/vnd.informix-visionary
-# application/vnd.infotech.project
-# application/vnd.infotech.project+xml
-# application/vnd.innopath.wamp.notification
-application/vnd.insors.igm                     igm
-application/vnd.intercon.formnet               xpw xpx
-application/vnd.intergeo                       i2g
-# application/vnd.intertrust.digibox
-# application/vnd.intertrust.nncp
-application/vnd.intu.qbo                       qbo
-application/vnd.intu.qfx                       qfx
-# application/vnd.iptc.g2.conceptitem+xml
-# application/vnd.iptc.g2.knowledgeitem+xml
-# application/vnd.iptc.g2.newsitem+xml
-# application/vnd.iptc.g2.newsmessage+xml
-# application/vnd.iptc.g2.packageitem+xml
-# application/vnd.iptc.g2.planningitem+xml
-application/vnd.ipunplugged.rcprofile          rcprofile
-application/vnd.irepository.package+xml                irp
-application/vnd.is-xpr                         xpr
-application/vnd.isac.fcs                       fcs
-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.joost.joda-archive             joda
-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.kodak-descriptor               sse
-application/vnd.las.las+xml                    lasxml
-# 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.license+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.motorola.iprm
-application/vnd.mozilla.xul+xml                        xul
-application/vnd.ms-artgalry                    cil
-# application/vnd.ms-asf
-application/vnd.ms-cab-compressed              cab
-# application/vnd.ms-color.iccprofile
-application/vnd.ms-excel                       xls xlm xla xlc xlt xlw
-application/vnd.ms-excel.addin.macroenabled.12         xlam
-application/vnd.ms-excel.sheet.binary.macroenabled.12  xlsb
-application/vnd.ms-excel.sheet.macroenabled.12         xlsm
-application/vnd.ms-excel.template.macroenabled.12      xltm
-application/vnd.ms-fontobject                  eot
-application/vnd.ms-htmlhelp                    chm
-application/vnd.ms-ims                         ims
-application/vnd.ms-lrm                         lrm
-# application/vnd.ms-office.activex+xml
-application/vnd.ms-officetheme                 thmx
-# application/vnd.ms-opentype
-# application/vnd.ms-package.obfuscated-opentype
-application/vnd.ms-pki.seccat                  cat
-application/vnd.ms-pki.stl                     stl
-# application/vnd.ms-playready.initiator+xml
-application/vnd.ms-powerpoint                  ppt pps pot
-application/vnd.ms-powerpoint.addin.macroenabled.12            ppam
-application/vnd.ms-powerpoint.presentation.macroenabled.12     pptm
-application/vnd.ms-powerpoint.slide.macroenabled.12            sldm
-application/vnd.ms-powerpoint.slideshow.macroenabled.12                ppsm
-application/vnd.ms-powerpoint.template.macroenabled.12         potm
-# application/vnd.ms-printing.printticket+xml
-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-word.document.macroenabled.12       docm
-application/vnd.ms-word.template.macroenabled.12       dotm
-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.multiad.creator
-# application/vnd.multiad.creator.cif
-# application/vnd.music-niff
-application/vnd.musician                       mus
-application/vnd.muvee.style                    msty
-application/vnd.mynfc                          taglet
-# application/vnd.ncd.control
-# application/vnd.ncd.reference
-# application/vnd.nervana
-# application/vnd.netfpx
-application/vnd.neurolanguage.nlu              nlu
-application/vnd.nitf                           ntf nitf
-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.ntt-local.file-transfer
-# application/vnd.ntt-local.sip-ta_remote
-# application/vnd.ntt-local.sip-ta_tcp_stream
-application/vnd.oasis.opendocument.chart               odc
-application/vnd.oasis.opendocument.chart-template      otc
-application/vnd.oasis.opendocument.database            odb
-application/vnd.oasis.opendocument.formula             odf
-application/vnd.oasis.opendocument.formula-template    odft
-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         odm
-application/vnd.oasis.opendocument.text-template       ott
-application/vnd.oasis.opendocument.text-web            oth
-# application/vnd.obn
-# application/vnd.oftn.l10n+json
-# application/vnd.oipf.contentaccessdownload+xml
-# application/vnd.oipf.contentaccessstreaming+xml
-# application/vnd.oipf.cspg-hexbinary
-# application/vnd.oipf.dae.svg+xml
-# application/vnd.oipf.dae.xhtml+xml
-# application/vnd.oipf.mippvcontrolmessage+xml
-# application/vnd.oipf.pae.gem
-# application/vnd.oipf.spdiscovery+xml
-# application/vnd.oipf.spdlist+xml
-# application/vnd.oipf.ueprofile+xml
-# application/vnd.oipf.userprofile+xml
-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.ltkm
-# application/vnd.oma.bcast.notification+xml
-# application/vnd.oma.bcast.provisioningtrigger
-# 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.bcast.stkm
-# application/vnd.oma.cab-address-book+xml
-# application/vnd.oma.cab-feature-handler+xml
-# application/vnd.oma.cab-pcc+xml
-# application/vnd.oma.cab-user-prefs+xml
-# application/vnd.oma.dcd
-# application/vnd.oma.dcdc
-application/vnd.oma.dd2+xml                    dd2
-# application/vnd.oma.drm.risd+xml
-# application/vnd.oma.group-usage-list+xml
-# application/vnd.oma.pal+xml
-# application/vnd.oma.poc.detailed-progress-report+xml
-# application/vnd.oma.poc.final-report+xml
-# application/vnd.oma.poc.groups+xml
-# application/vnd.oma.poc.invocation-descriptor+xml
-# application/vnd.oma.poc.optimized-progress-report+xml
-# application/vnd.oma.push
-# application/vnd.oma.scidm.messages+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.openxmlformats-officedocument.custom-properties+xml
-# application/vnd.openxmlformats-officedocument.customxmlproperties+xml
-# application/vnd.openxmlformats-officedocument.drawing+xml
-# application/vnd.openxmlformats-officedocument.drawingml.chart+xml
-# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml
-# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml
-# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml
-# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml
-# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml
-# application/vnd.openxmlformats-officedocument.extended-properties+xml
-# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml
-# application/vnd.openxmlformats-officedocument.presentationml.comments+xml
-# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml
-# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml
-# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml
-application/vnd.openxmlformats-officedocument.presentationml.presentation      pptx
-# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml
-# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml
-application/vnd.openxmlformats-officedocument.presentationml.slide     sldx
-# application/vnd.openxmlformats-officedocument.presentationml.slide+xml
-# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml
-# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml
-application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
-# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml
-# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml
-# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml
-# application/vnd.openxmlformats-officedocument.presentationml.tags+xml
-application/vnd.openxmlformats-officedocument.presentationml.template  potx
-# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml
-# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml
-application/vnd.openxmlformats-officedocument.spreadsheetml.sheet      xlsx
-# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml
-application/vnd.openxmlformats-officedocument.spreadsheetml.template   xltx
-# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml
-# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml
-# application/vnd.openxmlformats-officedocument.theme+xml
-# application/vnd.openxmlformats-officedocument.themeoverride+xml
-# application/vnd.openxmlformats-officedocument.vmldrawing
-# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml
-application/vnd.openxmlformats-officedocument.wordprocessingml.document        docx
-# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml
-application/vnd.openxmlformats-officedocument.wordprocessingml.template        dotx
-# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml
-# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml
-# application/vnd.openxmlformats-package.core-properties+xml
-# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml
-# application/vnd.openxmlformats-package.relationships+xml
-# application/vnd.quobject-quoxdocument
-# application/vnd.osa.netdeploy
-application/vnd.osgeo.mapguide.package         mgp
-# application/vnd.osgi.bundle
-application/vnd.osgi.dp                                dp
-application/vnd.osgi.subsystem                 esa
-# application/vnd.otps.ct-kip+xml
-application/vnd.palm                           pdb pqa oprc
-# application/vnd.paos.xml
-application/vnd.pawaafile                      paw
-application/vnd.pg.format                      str
-application/vnd.pg.osasli                      ei6
-# application/vnd.piaccess.application-licence
-application/vnd.picsel                         efif
-application/vnd.pmi.widget                     wg
-# 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.radisys.moml+xml
-# application/vnd.radisys.msml+xml
-# application/vnd.radisys.msml-audit+xml
-# application/vnd.radisys.msml-audit-conf+xml
-# application/vnd.radisys.msml-audit-conn+xml
-# application/vnd.radisys.msml-audit-dialog+xml
-# application/vnd.radisys.msml-audit-stream+xml
-# application/vnd.radisys.msml-conf+xml
-# application/vnd.radisys.msml-dialog+xml
-# application/vnd.radisys.msml-dialog-base+xml
-# application/vnd.radisys.msml-dialog-fax-detect+xml
-# application/vnd.radisys.msml-dialog-fax-sendrecv+xml
-# application/vnd.radisys.msml-dialog-group+xml
-# application/vnd.radisys.msml-dialog-speech+xml
-# application/vnd.radisys.msml-dialog-transform+xml
-# application/vnd.rainstor.data
-# application/vnd.rapid
-application/vnd.realvnc.bed                    bed
-application/vnd.recordare.musicxml             mxl
-application/vnd.recordare.musicxml+xml         musicxml
-# application/vnd.renlearn.rlprint
-application/vnd.rig.cryptonote                 cryptonote
-application/vnd.rim.cod                                cod
-application/vnd.rn-realmedia                   rm
-application/vnd.rn-realmedia-vbr               rmvb
-application/vnd.route66.link66+xml             link66
-# application/vnd.rs-274x
-# application/vnd.ruckus.download
-# application/vnd.s3sms
-application/vnd.sailingtracker.track           st
-# application/vnd.sbm.cid
-# application/vnd.sbm.mid2
-# 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.smart.notebook
-application/vnd.smart.teacher                  teacher
-# application/vnd.software602.filler.form+xml
-# application/vnd.software602.filler.form-xml-zip
-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.stardivision.calc              sdc
-application/vnd.stardivision.draw              sda
-application/vnd.stardivision.impress           sdd
-application/vnd.stardivision.math              smf
-application/vnd.stardivision.writer            sdw vor
-application/vnd.stardivision.writer-global     sgl
-application/vnd.stepmania.package              smzip
-application/vnd.stepmania.stepchart            sm
-# application/vnd.street-stream
-application/vnd.sun.xml.calc                   sxc
-application/vnd.sun.xml.calc.template          stc
-application/vnd.sun.xml.draw                   sxd
-application/vnd.sun.xml.draw.template          std
-application/vnd.sun.xml.impress                        sxi
-application/vnd.sun.xml.impress.template       sti
-application/vnd.sun.xml.math                   sxm
-application/vnd.sun.xml.writer                 sxw
-application/vnd.sun.xml.writer.global          sxg
-application/vnd.sun.xml.writer.template                stw
-# application/vnd.sun.wadl+xml
-application/vnd.sus-calendar                   sus susp
-application/vnd.svd                            svd
-# application/vnd.swiftview-ics
-application/vnd.symbian.install                        sis sisx
-application/vnd.syncml+xml                     xsm
-application/vnd.syncml.dm+wbxml                        bdm
-application/vnd.syncml.dm+xml                  xdm
-# application/vnd.syncml.dm.notification
-# application/vnd.syncml.ds.notification
-application/vnd.tao.intent-module-archive      tao
-application/vnd.tcpdump.pcap                   pcap cap dmp
-application/vnd.tmobile-livetv                 tmo
-application/vnd.trid.tpt                       tpt
-application/vnd.triscape.mxs                   mxs
-application/vnd.trueapp                                tra
-# application/vnd.truedoc
-# application/vnd.ubisoft.webplayer
-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.verimatrix.vcas
-# 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.wmc
-# application/vnd.wmf.bootstrap
-# application/vnd.wolfram.mathematica
-# application/vnd.wolfram.mathematica.package
-application/vnd.wolfram.player                 nbp
-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.xfdl.webform
-# application/vnd.xmi+xml
-# 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.openscoreformat                 osf
-application/vnd.yamaha.openscoreformat.osfpvg+xml      osfpvg
-# application/vnd.yamaha.remote-setup
-application/vnd.yamaha.smaf-audio              saf
-application/vnd.yamaha.smaf-phrase             spf
-# application/vnd.yamaha.through-ngn
-# application/vnd.yamaha.tunnel-udpencap
-application/vnd.yellowriver-custom-menu                cmp
-application/vnd.zul                            zir zirz
-application/vnd.zzazz.deck+xml                 zaz
-application/voicexml+xml                       vxml
-# application/vq-rtcpxr
-# application/watcherinfo+xml
-# application/whoispp-query
-# application/whoispp-response
-application/widget                             wgt
-application/winhlp                             hlp
-# application/wita
-# application/wordperfect5.1
-application/wsdl+xml                           wsdl
-application/wspolicy+xml                       wspolicy
-application/x-7z-compressed                    7z
-application/x-abiword                          abw
-application/x-ace-compressed                   ace
-# application/x-amf
-application/x-apple-diskimage                  dmg
-application/x-authorware-bin                   aab x32 u32 vox
-application/x-authorware-map                   aam
-application/x-authorware-seg                   aas
-application/x-bcpio                            bcpio
-application/x-bittorrent                       torrent
-application/x-blorb                            blb blorb
-application/x-bzip                             bz
-application/x-bzip2                            bz2 boz
-application/x-cbr                              cbr cba cbt cbz cb7
-application/x-cdlink                           vcd
-application/x-cfs-compressed                   cfs
-application/x-chat                             chat
-application/x-chess-pgn                                pgn
-application/x-conference                       nsc
-# application/x-compress
-application/x-cpio                             cpio
-application/x-csh                              csh
-application/x-debian-package                   deb udeb
-application/x-dgc-compressed                   dgc
-application/x-director                 dir dcr dxr cst cct cxt w3d fgd swa
-application/x-doom                             wad
-application/x-dtbncx+xml                       ncx
-application/x-dtbook+xml                       dtb
-application/x-dtbresource+xml                  res
-application/x-dvi                              dvi
-application/x-envoy                            evy
-application/x-eva                              eva
-application/x-font-bdf                         bdf
-# application/x-font-dos
-# application/x-font-framemaker
-application/x-font-ghostscript                 gsf
-# application/x-font-libgrx
-application/x-font-linux-psf                   psf
-application/x-font-otf                         otf
-application/x-font-pcf                         pcf
-application/x-font-snf                         snf
-# application/x-font-speedo
-# application/x-font-sunos-news
-application/x-font-ttf                         ttf ttc
-application/x-font-type1                       pfa pfb pfm afm
-application/font-woff                          woff
-# application/x-font-vfont
-application/x-freearc                          arc
-application/x-futuresplash                     spl
-application/x-gca-compressed                   gca
-application/x-glulx                            ulx
-application/x-gnumeric                         gnumeric
-application/x-gramps-xml                       gramps
-application/x-gtar                             gtar
-# application/x-gzip
-application/x-hdf                              hdf
-application/x-install-instructions             install
-application/x-iso9660-image                    iso
-application/x-java-jnlp-file                   jnlp
-application/x-latex                            latex
-application/x-lzh-compressed                   lzh lha
-application/x-mie                              mie
-application/x-mobipocket-ebook                 prc mobi
-application/x-ms-application                   application
-application/x-ms-shortcut                      lnk
-application/x-ms-wmd                           wmd
-application/x-ms-wmz                           wmz
-application/x-ms-xbap                          xbap
-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 wmz emf emz
-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-nzb                              nzb
-application/x-pkcs12                           p12 pfx
-application/x-pkcs7-certificates               p7b spc
-application/x-pkcs7-certreqresp                        p7r
-application/x-rar-compressed                   rar
-application/x-research-info-systems            ris
-application/x-sh                               sh
-application/x-shar                             shar
-application/x-shockwave-flash                  swf
-application/x-silverlight-app                  xap
-application/x-sql                              sql
-application/x-stuffit                          sit
-application/x-stuffitx                         sitx
-application/x-subrip                           srt
-application/x-sv4cpio                          sv4cpio
-application/x-sv4crc                           sv4crc
-application/x-t3vm-image                       t3
-application/x-tads                             gam
-application/x-tar                              tar
-application/x-tcl                              tcl
-application/x-tex                              tex
-application/x-tex-tfm                          tfm
-application/x-texinfo                          texinfo texi
-application/x-tgif                             obj
-application/x-ustar                            ustar
-application/x-wais-source                      src
-application/x-x509-ca-cert                     der crt
-application/x-xfig                             fig
-application/x-xliff+xml                                xlf
-application/x-xpinstall                                xpi
-application/x-xz                               xz
-application/x-zmachine                         z1 z2 z3 z4 z5 z6 z7 z8
-# application/x400-bp
-application/xaml+xml                           xaml
-# application/xcap-att+xml
-# application/xcap-caps+xml
-application/xcap-diff+xml                      xdf
-# application/xcap-el+xml
-# application/xcap-error+xml
-# application/xcap-ns+xml
-# application/xcon-conference-info-diff+xml
-# application/xcon-conference-info+xml
-application/xenc+xml                           xenc
-application/xhtml+xml                          xhtml xht
-# application/xhtml-voice+xml
-application/xml                                        xml xsl
-application/xml-dtd                            dtd
-# application/xml-external-parsed-entity
-# application/xmpp+xml
-application/xop+xml                            xop
-application/xproc+xml                          xpl
-application/xslt+xml                           xslt
-application/xspf+xml                           xspf
-application/xv+xml                             mxml xhvml xvml xvm
-application/yang                               yang
-application/yin+xml                            yin
-application/zip                                        zip
-# audio/1d-interleaved-parityfec
-# audio/32kadpcm
-# audio/3gpp
-# audio/3gpp2
-# audio/ac3
-audio/adpcm                                    adp
-# audio/amr
-# audio/amr-wb
-# audio/amr-wb+
-# audio/asc
-# audio/atrac-advanced-lossless
-# audio/atrac-x
-# audio/atrac3
-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/dv
-# audio/dvi4
-# audio/eac3
-# audio/evrc
-# audio/evrc-qcp
-# audio/evrc0
-# audio/evrc1
-# audio/evrcb
-# audio/evrcb0
-# audio/evrcb1
-# audio/evrcwb
-# audio/evrcwb0
-# audio/evrcwb1
-# audio/example
-# audio/fwdred
-# audio/g719
-# 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/gsm-hr-08
-# audio/ilbc
-# audio/ip-mr_v2.5
-# audio/isac
-# 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/musepack
-audio/ogg                                      oga ogg spx
-# audio/opus
-# audio/parityfec
-# audio/pcma
-# audio/pcma-wb
-# audio/pcmu-wb
-# audio/pcmu
-# audio/prs.sid
-# audio/qcelp
-# audio/red
-# audio/rtp-enc-aescm128
-# audio/rtp-midi
-# audio/rtx
-audio/s3m                                      s3m
-audio/silk                                     sil
-# audio/smv
-# audio/smv0
-# audio/smv-qcp
-# audio/sp-midi
-# audio/speex
-# audio/t140c
-# audio/t38
-# audio/telephone-event
-# audio/tone
-# audio/uemclip
-# audio/ulpfec
-# 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.dece.audio                           uva uvva
-audio/vnd.digital-winds                                eol
-# audio/vnd.dlna.adts
-# audio/vnd.dolby.heaac.1
-# audio/vnd.dolby.heaac.2
-# audio/vnd.dolby.mlp
-# audio/vnd.dolby.mps
-# audio/vnd.dolby.pl2
-# audio/vnd.dolby.pl2x
-# audio/vnd.dolby.pl2z
-# audio/vnd.dolby.pulse.1
-audio/vnd.dra                                  dra
-audio/vnd.dts                                  dts
-audio/vnd.dts.hd                               dtshd
-# audio/vnd.dvb.file
-# audio/vnd.everad.plj
-# audio/vnd.hns.audio
-audio/vnd.lucent.voice                         lvp
-audio/vnd.ms-playready.media.pya               pya
-# 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.rip                                  rip
-# audio/vnd.sealedmedia.softseal.mpeg
-# audio/vnd.vmx.cvsd
-# audio/vorbis
-# audio/vorbis-config
-audio/webm                                     weba
-audio/x-aac                                    aac
-audio/x-aiff                                   aif aiff aifc
-audio/x-caf                                    caf
-audio/x-flac                                   flac
-audio/x-matroska                               mka
-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-tta
-audio/x-wav                                    wav
-audio/xm                                       xm
-chemical/x-cdx                                 cdx
-chemical/x-cif                                 cif
-chemical/x-cmdf                                        cmdf
-chemical/x-cml                                 cml
-chemical/x-csml                                        csml
-# chemical/x-pdb
-chemical/x-xyz                                 xyz
-image/bmp                                      bmp
-image/cgm                                      cgm
-# image/example
-# image/fits
-image/g3fax                                    g3
-image/gif                                      gif
-image/ief                                      ief
-# image/jp2
-image/jpeg                                     jpeg jpg jpe
-# image/jpm
-# image/jpx
-image/ktx                                      ktx
-# image/naplps
-image/png                                      png
-image/prs.btif                                 btif
-# image/prs.pti
-image/sgi                                      sgi
-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.dece.graphic                         uvi uvvi uvg uvvg
-image/vnd.dvb.subtitle                         sub
-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
-# image/vnd.mix
-image/vnd.ms-modi                              mdi
-image/vnd.ms-photo                             wdp
-image/vnd.net-fpx                              npx
-# image/vnd.radiance
-# 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/webp                                     webp
-image/x-3ds                                    3ds
-image/x-cmu-raster                             ras
-image/x-cmx                                    cmx
-image/x-freehand                               fh fhc fh4 fh5 fh7
-image/x-icon                                   ico
-image/x-mrsid-image                            sid
-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-tga                                    tga
-image/x-xbitmap                                        xbm
-image/x-xpixmap                                        xpm
-image/x-xwindowdump                            xwd
-# message/cpim
-# message/delivery-status
-# message/disposition-notification
-# message/example
-# message/external-body
-# message/feedback-report
-# message/global
-# message/global-delivery-status
-# message/global-disposition-notification
-# message/global-headers
-# message/http
-# message/imdn+xml
-# message/news
-# message/partial
-message/rfc822                                 eml mime
-# message/s-http
-# message/sip
-# message/sipfrag
-# message/tracking-status
-# message/vnd.si.simp
-# model/example
-model/iges                                     igs iges
-model/mesh                                     msh mesh silo
-model/vnd.collada+xml                          dae
-model/vnd.dwf                                  dwf
-# model/vnd.flatland.3dml
-model/vnd.gdl                                  gdl
-# model/vnd.gs-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
-model/x3d+binary                               x3db x3dbz
-model/x3d+vrml                                 x3dv x3dvz
-model/x3d+xml                                  x3d x3dz
-# multipart/alternative
-# multipart/appledouble
-# multipart/byteranges
-# multipart/digest
-# multipart/encrypted
-# multipart/example
-# multipart/form-data
-# multipart/header-set
-# multipart/mixed
-# multipart/parallel
-# multipart/related
-# multipart/report
-# multipart/signed
-# multipart/voice-message
-# text/1d-interleaved-parityfec
-text/cache-manifest                            appcache
-text/calendar                                  ics ifb
-text/css                                       css
-text/csv                                       csv
-# text/directory
-# text/dns
-# text/ecmascript
-# text/enriched
-# text/example
-# text/fwdred
-text/html                                      html htm
-# text/javascript
-text/n3                                                n3
-# text/parityfec
-text/plain                                     txt text conf def list log in
-# text/prs.fallenstein.rst
-text/prs.lines.tag                             dsc
-# text/vnd.radisys.msml-basic-layout
-# 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/turtle                                    ttl
-# text/ulpfec
-text/uri-list                                  uri uris urls
-text/vcard                                     vcard
-# text/vnd.abc
-text/vnd.curl                                  curl
-text/vnd.curl.dcurl                            dcurl
-text/vnd.curl.scurl                            scurl
-text/vnd.curl.mcurl                            mcurl
-# text/vnd.dmclientscript
-text/vnd.dvb.subtitle                          sub
-# text/vnd.esmertec.theme-descriptor
-text/vnd.fly                                   fly
-text/vnd.fmi.flexstor                          flx
-text/vnd.graphviz                              gv
-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.si.uricatalogue
-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-java-source                             java
-text/x-opml                                    opml
-text/x-pascal                                  p pas
-text/x-nfo                                     nfo
-text/x-setext                                  etx
-text/x-sfv                                     sfv
-text/x-uuencode                                        uu
-text/x-vcalendar                               vcs
-text/x-vcard                                   vcf
-# text/xml
-# text/xml-external-parsed-entity
-# video/1d-interleaved-parityfec
-video/3gpp                                     3gp
-# video/3gpp-tt
-video/3gpp2                                    3g2
-# video/bmpeg
-# video/bt656
-# video/celb
-# video/dv
-# video/example
-video/h261                                     h261
-video/h263                                     h263
-# video/h263-1998
-# video/h263-2000
-video/h264                                     h264
-# video/h264-rcdo
-# video/h264-svc
-video/jpeg                                     jpgv
-# video/jpeg2000
-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/ogg                                      ogv
-# video/parityfec
-# video/pointer
-video/quicktime                                        qt mov
-# video/raw
-# video/rtp-enc-aescm128
-# video/rtx
-# video/smpte292m
-# video/ulpfec
-# video/vc1
-# video/vnd.cctv
-video/vnd.dece.hd                              uvh uvvh
-video/vnd.dece.mobile                          uvm uvvm
-# video/vnd.dece.mp4
-video/vnd.dece.pd                              uvp uvvp
-video/vnd.dece.sd                              uvs uvvs
-video/vnd.dece.video                           uvv uvvv
-# video/vnd.directv.mpeg
-# video/vnd.directv.mpeg-tts
-# video/vnd.dlna.mpeg-tts
-video/vnd.dvb.file                             dvb
-video/vnd.fvt                                  fvt
-# video/vnd.hns.video
-# video/vnd.iptvforum.1dparityfec-1010
-# video/vnd.iptvforum.1dparityfec-2005
-# video/vnd.iptvforum.2dparityfec-1010
-# video/vnd.iptvforum.2dparityfec-2005
-# video/vnd.iptvforum.ttsavc
-# video/vnd.iptvforum.ttsmpeg2
-# video/vnd.motorola.video
-# video/vnd.motorola.videop
-video/vnd.mpegurl                              mxu m4u
-video/vnd.ms-playready.media.pyv               pyv
-# 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.uvvu.mp4                             uvu uvvu
-video/vnd.vivo                                 viv
-video/webm                                     webm
-video/x-f4v                                    f4v
-video/x-fli                                    fli
-video/x-flv                                    flv
-video/x-m4v                                    m4v
-video/x-matroska                               mkv mk3d mks
-video/x-mng                                    mng
-video/x-ms-asf                                 asf asx
-video/x-ms-vob                                 vob
-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
-video/x-smv                                    smv
-x-conference/x-cooltalk                                ice
diff --git a/conf/rayo/sip_profiles/external.xml b/conf/rayo/sip_profiles/external.xml
deleted file mode 100644 (file)
index 2b601fb..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-<profile name="external">
-  <!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
-  <!-- This profile is only for outbound registrations to providers -->
-  <gateways>
-    <X-PRE-PROCESS cmd="include" data="external/*.xml"/>
-  </gateways>
-
-  <aliases>
-    <!--
-        <alias name="outbound"/>
-        <alias name="nat"/>
-    -->
-  </aliases>
-
-  <domains>
-    <domain name="all" alias="false" parse="true"/>
-  </domains>
-
-  <settings>
-    <param name="debug" value="0"/>
-    <!-- If you want FreeSWITCH to shutdown if this profile fails to load, uncomment the next line. -->
-    <!-- <param name="shutdown-on-fail" value="true"/> -->
-    <param name="sip-trace" value="no"/>
-    <param name="sip-capture" value="no"/>
-    <param name="rfc2833-pt" value="101"/>
-    <!-- RFC 5626 : Send reg-id and sip.instance -->
-    <!--<param name="enable-rfc-5626" value="true"/> -->
-    <param name="sip-port" value="$${external_sip_port}"/>
-    <param name="dialplan" value="XML"/>
-    <param name="context" value="public"/>
-    <param name="dtmf-duration" value="2000"/>
-    <param name="inbound-codec-prefs" value="$${global_codec_prefs}"/>
-    <param name="outbound-codec-prefs" value="$${outbound_codec_prefs}"/>
-    <param name="hold-music" value="$${hold_music}"/>
-    <param name="rtp-timer-name" value="soft"/>
-    <!--<param name="enable-100rel" value="true"/>-->
-    <!--<param name="disable-srv503" value="true"/>-->
-    <!-- This could be set to "passive" -->
-    <param name="local-network-acl" value="localnet.auto"/>
-    <param name="manage-presence" value="false"/>
-
-    <!-- used to share presence info across sofia profiles
-         manage-presence needs to be set to passive on this profile
-         if you want it to behave as if it were the internal profile
-         for presence.
-    -->
-    <!-- Name of the db to use for this profile -->
-    <!--<param name="dbname" value="share_presence"/>-->
-    <!--<param name="presence-hosts" value="$${domain}"/>-->
-    <!--<param name="force-register-domain" value="$${domain}"/>-->
-    <!--all inbound reg will stored in the db using this domain -->
-    <!--<param name="force-register-db-domain" value="$${domain}"/>-->
-    <!-- ************************************************* -->
-
-    <!--<param name="aggressive-nat-detection" value="true"/>-->
-    <param name="inbound-codec-negotiation" value="generous"/>
-    <param name="nonce-ttl" value="60"/>
-    <param name="auth-calls" value="$${external_auth_calls}"/>
-    <param name="inbound-late-negotiation" value="true"/>
-    <!--
-        DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
-    -->
-    <param name="rtp-ip" value="$${external_rtp_ip}"/>
-    <param name="sip-ip" value="$${external_sip_ip}"/>
-    <param name="ext-rtp-ip" value="auto-nat"/>
-    <param name="ext-sip-ip" value="auto-nat"/>
-    <param name="rtp-timeout-sec" value="300"/>
-    <param name="rtp-hold-timeout-sec" value="1800"/>
-    <!--<param name="enable-3pcc" value="true"/>-->
-
-    <!-- TLS: disabled by default, set to "true" to enable -->
-    <param name="tls" value="$${external_ssl_enable}"/>
-    <!-- Set to true to not bind on the normal sip-port but only on the TLS port -->
-    <param name="tls-only" value="false"/>
-    <!-- additional bind parameters for TLS -->
-    <param name="tls-bind-params" value="transport=tls"/>
-    <!-- Port to listen on for TLS requests. (5081 will be used if unspecified) -->
-    <param name="tls-sip-port" value="$${external_tls_port}"/>
-    <!-- Location of the agent.pem and cafile.pem ssl certificates (needed for TLS server) -->
-    <param name="tls-cert-dir" value="$${external_ssl_dir}"/>
-    <!-- Optionally set the passphrase password used by openSSL to encrypt/decrypt TLS private key files -->
-    <param name="tls-passphrase" value=""/>
-    <!-- Verify the date on TLS certificates -->
-    <param name="tls-verify-date" value="true"/>
-    <!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
-    <!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'subjects_in', 'subjects_out' and 'subjects_all' for subject validation. Multiple policies can be split with a '|' pipe -->
-    <param name="tls-verify-policy" value="none"/>
-    <!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
-    <param name="tls-verify-depth" value="2"/>
-    <!-- If the tls-verify-policy is set to subjects_all or subjects_in this sets which subjects are allowed, multiple subjects can be split with a '|' pipe -->
-    <param name="tls-verify-in-subjects" value=""/>
-    <!-- TLS version ("sslv23" (default), "tlsv1"). NOTE: Phones may not work with TLSv1 -->
-    <param name="tls-version" value="$${sip_tls_version}"/>
-  </settings>
-</profile>
diff --git a/conf/rayo/sip_profiles/external/example.xml b/conf/rayo/sip_profiles/external/example.xml
deleted file mode 100644 (file)
index 0497bcd..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-<include>
-  <!--<gateway name="asterlink.com">-->
-  <!--/// account username *required* ///-->
-  <!--<param name="username" value="cluecon"/>-->
-  <!--/// auth realm: *optional* same as gateway name, if blank ///-->
-  <!--<param name="realm" value="asterlink.com"/>-->
-  <!--/// username to use in from: *optional* same as  username, if blank ///-->
-  <!--<param name="from-user" value="cluecon"/>-->
-  <!--/// domain to use in from: *optional* same as  realm, if blank ///-->
-  <!--<param name="from-domain" value="asterlink.com"/>-->
-  <!--/// account password *required* ///-->
-  <!--<param name="password" value="2007"/>-->
-  <!--/// extension for inbound calls: *optional* same as username, if blank ///-->
-  <!--<param name="extension" value="cluecon"/>-->
-  <!--/// proxy host: *optional* same as realm, if blank ///-->
-  <!--<param name="proxy" value="asterlink.com"/>-->
-  <!--/// send register to this proxy: *optional* same as proxy, if blank ///-->
-  <!--<param name="register-proxy" value="mysbc.com"/>-->
-  <!--/// expire in seconds: *optional* 3600, if blank ///-->
-  <!--<param name="expire-seconds" value="60"/>-->
-  <!--/// do not register ///-->
-  <!--<param name="register" value="false"/>-->
-  <!-- which transport to use for register -->
-  <!--<param name="register-transport" value="udp"/>-->
-  <!--How many seconds before a retry when a failure or timeout occurs -->
-  <!--<param name="retry-seconds" value="30"/>-->
-  <!--Use the callerid of an inbound call in the from field on outbound calls via this gateway -->
-  <!--<param name="caller-id-in-from" value="false"/>-->
-  <!--extra sip params to send in the contact-->
-  <!--<param name="contact-params" value=""/>-->
-  <!--send an options ping every x seconds, failure will unregister and/or mark it down-->
-  <!--<param name="ping" value="25"/>-->
-  <!--</gateway>-->
-  <!--rfc5626 : Abilitazione rfc5626 ///-->
-  <!--<param name="rfc-5626" value="true"/>-->
-  <!--rfc5626 : extra sip params to send in the contact-->
-  <!--<param name="reg-id" value="1"/>-->
-</include>
diff --git a/conf/rayo/vars.xml b/conf/rayo/vars.xml
deleted file mode 100644 (file)
index af602ca..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<include>
-  <X-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/en/us/callie"/>
-  <!--<Z-PRE-PROCESS cmd="set" data="sound_prefix=$${sounds_dir}/en/us/allison"/>-->
-
-  <!--
-      This setting is what sets the default domain FreeSWITCH will use if all else fails.
-      
-      FreeSWICH will default to $${local_ip_v4} unless changed.  Changing this setting does 
-      affect the sip authentication.  Please review conf/directory/default.xml for more
-      information on this topic.
-  -->
-  <X-PRE-PROCESS cmd="set" data="domain=$${local_ip_v4}"/>
-  <X-PRE-PROCESS cmd="set" data="domain_name=$${domain}"/>
-  <X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>
-  <X-PRE-PROCESS cmd="set" data="use_profile=external"/>
-
-  <X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU,PCMA"/>
-  <X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA"/>
-
-  <!-- 
-       THIS IS ONLY USED FOR DINGALING
-
-       bind_server_ip
-
-       Can be an ip address, a dns name, or "auto". 
-       This determines an ip address available on this host to bind.
-       If you are separating RTP and SIP traffic, you will want to have
-       use different addresses where this variable appears.
-       Used by: dingaling.conf.xml
-  -->
-  <X-PRE-PROCESS cmd="set" data="bind_server_ip=auto"/>
-
-  <!-- unroll-loops
-       Used to turn on sip loopback unrolling.
-  --> 
-  <X-PRE-PROCESS cmd="set" data="unroll_loops=true"/>
-
-  <X-PRE-PROCESS cmd="set" data="outbound_caller_name=FreeSWITCH"/>
-  <X-PRE-PROCESS cmd="set" data="outbound_caller_id=0000000000"/>
-
-  <!-- various debug and defaults -->
-  <X-PRE-PROCESS cmd="set" data="call_debug=false"/>
-  <X-PRE-PROCESS cmd="set" data="console_loglevel=info"/>
-  <X-PRE-PROCESS cmd="set" data="default_areacode=617"/>
-  <X-PRE-PROCESS cmd="set" data="default_country=US"/>
-
-  <!-- if false or undefined, the destination number is included in presence NOTIFY dm:note.
-       if true, the destination number is not included -->
-  <X-PRE-PROCESS cmd="set" data="presence_privacy=false"/>
-
-  <!--
-      SIP and TLS settings. http://wiki.freeswitch.org/wiki/Tls
-  -->
-  <X-PRE-PROCESS cmd="set" data="sip_tls_version=tlsv1"/>
-
-  <!-- Rayo -->
-  <X-PRE-PROCESS cmd="set" data="rayo_ip=$${local_ip_v4}"/>
-  <X-PRE-PROCESS cmd="set" data="rayo_domain_name=$${rayo_ip}"/>
-
-  <!-- External SIP Profile -->
-  <X-PRE-PROCESS cmd="set" data="external_rtp_ip=$${local_ip_v4}"/>
-  <X-PRE-PROCESS cmd="set" data="external_sip_ip=$${local_ip_v4}"/>
-  <X-PRE-PROCESS cmd="set" data="external_sip_port=5060"/>
-  <X-PRE-PROCESS cmd="set" data="external_tls_port=5061"/>
-  <X-PRE-PROCESS cmd="set" data="external_tls_enable=false"/>
-  <X-PRE-PROCESS cmd="set" data="external_tls_dir=$${base_dir}/conf/ssl"/>
-  <X-PRE-PROCESS cmd="set" data="external_auth_calls=false"/>
-</include>
index 6991398ae7eb68be8c12c20fcca2dec408647e61..0d9c2efc1a1908275e04f7c341383db974b10edc 100644 (file)
@@ -2210,7 +2210,6 @@ AC_CONFIG_FILES([Makefile
                src/mod/event_handlers/mod_json_cdr/Makefile
                src/mod/event_handlers/mod_radius_cdr/Makefile
                src/mod/event_handlers/mod_odbc_cdr/Makefile
-               src/mod/event_handlers/mod_rayo/Makefile
                src/mod/event_handlers/mod_smpp/Makefile
                src/mod/event_handlers/mod_snmp/Makefile
                src/mod/event_handlers/mod_event_zmq/Makefile
@@ -2222,7 +2221,6 @@ AC_CONFIG_FILES([Makefile
                src/mod/formats/mod_shell_stream/Makefile
                src/mod/formats/mod_shout/Makefile
                src/mod/formats/mod_sndfile/Makefile
-               src/mod/formats/mod_ssml/Makefile
                src/mod/formats/mod_tone_stream/Makefile
                src/mod/formats/mod_vlc/Makefile
                src/mod/formats/mod_portaudio_stream/Makefile
@@ -2339,7 +2337,6 @@ AC_CONFIG_SUBDIRS([libs/srtp])
 if test "$use_system_apr" != "yes"; then
    AC_CONFIG_SUBDIRS([libs/apr])
 fi
-AC_CONFIG_SUBDIRS([libs/iksemel])
 
 case $host in
    *-openbsd*|*-netbsd*)
index 0f0784d3f58160cf270072a44af0be44e9e74a5d..7d6182d7903ac1faaf1f976227e345630ef0fbd5 100644 (file)
@@ -550,11 +550,6 @@ Module: event_handlers/mod_radius_cdr
 Description: mod_radius_cdr
  Adds mod_radius_cdr.
 
-Module: event_handlers/mod_rayo
-Description: mod_rayo
- Adds mod_rayo.
-Depends: freeswitch-mod-ssml (= ${binary:Version})
-
 Module: event_handlers/mod_smpp
 Description: mod_snmp
  Adds mod_snmp.
@@ -604,10 +599,6 @@ Description: mod_sndfile
 Build-Depends: libsndfile1-dev, libflac-dev, libogg-dev,
  libvorbis-dev
 
-Module: formats/mod_ssml
-Description: mod_ssml
- Adds mod_ssml.
-
 Module: formats/mod_tone_stream
 Description: mod_tone_stream
  Adds mod_tone_stream.
index 5a76744817d6ec68df376b8ac1f99de866e81b6d..2270e4a9d54e4a0bfbb43569fc39e131387c3abc 100644 (file)
@@ -1202,10 +1202,6 @@ Files: src/include/switch_cpp.h
 Copyright: 2007 Yossi Neiman <freeswitch@cartissolutions.com>
 License: MPL-1.1  (well, maybe -- it refers to a COPYING file, so probably docs/COPYING, in which case MPL-1.1)
 
-Files: libs/iksemel/*
-Copyright: 2000-2007 Gurer Ozen <madcat@e-kolay.net>
-License: LGPL-2.1
-
 Files: libs/apr*/*
 Copyright: 2000-2005 The Apache Software Foundation or its licensors
  1991-1992, RSA Data Security, Inc.
@@ -1519,7 +1515,6 @@ License: MPL-1.1
 
 Files: src/mod/endpoints/mod_gsmopen/gsmlib/gsmlib-1.10-patched-13ubuntu/*
  src/mod/languages/mod_lua/lua-mode.el
- libs/iksemel/ltmain.sh
 Copyright: 1995-2007 Free Software Foundation, Inc.
 License: GPL-2+
 
index 88aaee3f717e03debd73b3df713dc16e927f8dce..8b5d9ebe5ec3814ddf63dfd75ef9f3855732608f 100755 (executable)
@@ -82,7 +82,6 @@ override_dh_auto_configure: .stamp-configure
 .stamp-build: .stamp-configure
        @$(call show_vars)
        make -j$(NJOBS) core
-       make iksemel-dep
        make -j$(NJOBS)
        make -C libs/esl pymod
        make -C libs/esl py3mod
index 9e62b082326825f402f2037f16c93e6dfd9e4836..e9394d18bb37dfbfdff56bdcf17be11c037d352b 100644 (file)
@@ -1240,7 +1240,7 @@ SEARCH_INCLUDES        = YES
 # contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           =../libs/apr ../libs/apr-util ../libs/iksemel ../libs/libnatpmp \
+INCLUDE_PATH           =../libs/apr ../libs/apr-util ../libs/libnatpmp \
                        ../libs/miniupnpc ../libs/sofia-sip ../libs/spandsp \
                        ../libs/srtp ../libs/win32 ../libs/xmlrpc-c
 
diff --git a/freeswitch-config-rayo.spec b/freeswitch-config-rayo.spec
deleted file mode 100644 (file)
index d022978..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-######################################################################################################################
-#
-# freeswitch-config-rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
-# Copyright (C) 2013-2015, Grasshopper
-#
-# Version: MPL 1.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is freeswitch-config-rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
-#
-# The Initial Developer of the Original Code is Grasshopper
-# Portions created by the Initial Developer are Copyright (C)
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Chris Rienzo <crienzo@grasshopper.com>
-#
-# freeswitch-rayo-config -- RPM packaging for Rayo Server configuration
-#
-######################################################################################################################
-
-%define nonparsedversion 1.7.0
-%define version %(echo '%{nonparsedversion}' | sed 's/-//g')
-%define release 1
-
-%define fsname freeswitch
-
-%define        PREFIX          %{_prefix}
-%define EXECPREFIX     %{_exec_prefix}
-%define BINDIR         %{_bindir}
-%define SBINDIR                %{_sbindir}
-%define LIBEXECDIR     %{_libexecdir}/%fsname
-%define SYSCONFDIR     %{_sysconfdir}/%fsname
-%define SHARESTATEDIR  %{_sharedstatedir}/%fsname
-%define LOCALSTATEDIR  %{_localstatedir}/lib/%fsname
-%define LIBDIR         %{_libdir}
-%define INCLUDEDIR     %{_includedir}
-%define _datarootdir   %{_prefix}/share
-%define DATAROOTDIR    %{_datarootdir}
-%define DATADIR                %{_datadir}
-%define INFODIR                %{_infodir}
-%define LOCALEDIR      %{_datarootdir}/locale
-%define MANDIR         %{_mandir}
-%define DOCDIR         %{_defaultdocdir}/%fsname
-%define HTMLDIR                %{_defaultdocdir}/%fsname/html
-%define DVIDIR         %{_defaultdocdir}/%fsname/dvi
-%define PDFDIR         %{_defaultdocdir}/%fsname/pdf
-%define PSDIR          %{_defaultdocdir}/%fsname/ps
-%define LOGFILEDIR     /var/log/%fsname
-%define MODINSTDIR     %{_libdir}/%fsname/mod
-%define RUNDIR         %{_localstatedir}/run/%fsname
-%define DBDIR          %{LOCALSTATEDIR}/db
-%define HTDOCSDIR      %{_datarootdir}/%fsname/htdocs
-%define SOUNDSDIR      %{_datarootdir}/%fsname/sounds
-%define GRAMMARDIR     %{_datarootdir}/%fsname/grammar
-%define SCRIPTDIR      %{_datarootdir}/%fsname/scripts
-%define RECORDINGSDIR  %{LOCALSTATEDIR}/recordings
-%define PKGCONFIGDIR   %{_datarootdir}/%fsname/pkgconfig
-%define HOMEDIR                %{LOCALSTATEDIR}
-
-Name: freeswitch-config-rayo
-Version: %{version}
-Release: %{release}%{?dist}
-License: MPL1.1
-Summary: Rayo configuration for the FreeSWITCH Open Source telephone platform.
-Group: System/Libraries
-Packager: Chris Rienzo
-URL: http://www.freeswitch.org/
-Source0: freeswitch-%{nonparsedversion}.tar.bz2
-Requires: freeswitch
-Requires: freeswitch-application-conference
-Requires: freeswitch-application-esf
-Requires: freeswitch-application-expr
-Requires: freeswitch-application-fsv
-Requires: freeswitch-application-http-cache
-Requires: freeswitch-asrtts-flite
-Requires: freeswitch-asrtts-pocketsphinx
-Requires: freeswitch-codec-h26x
-Requires: freeswitch-codec-ilbc
-Requires: freeswitch-codec-opus
-Requires: freeswitch-codec-vp8
-Requires: freeswitch-event-rayo
-Requires: freeswitch-format-local-stream
-Requires: freeswitch-format-mod-shout
-Requires: freeswitch-format-shell-stream
-Requires: freeswitch-format-ssml
-Requires: freeswitch-sounds-music-8000
-Requires: freeswitch-lang-en
-Requires: freeswitch-sounds-en-us-callie-8000
-BuildRequires: bash
-BuildArch: noarch
-BuildRoot:    %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%description
-FreeSWITCH rayo server implementation.
-
-%prep
-%setup -b0 -q -n freeswitch-%{nonparsedversion}
-
-%build
-
-%install
-%{__rm} -rf %{buildroot}
-%{__install} -d -m 0750 %{buildroot}/%{SYSCONFDIR}
-%{__install} -d -m 0750 %{buildroot}/%{SYSCONFDIR}/autoload_configs
-%{__install} -d -m 0750 %{buildroot}/%{SYSCONFDIR}/dialplan
-%{__install} -d -m 0750 %{buildroot}/%{SYSCONFDIR}/sip_profiles
-%{__install} -d -m 0750 %{buildroot}/%{SYSCONFDIR}/directory
-%{__cp} -prv ./conf/rayo/*.{xml,types,pem} %{buildroot}/%{SYSCONFDIR}/
-%{__cp} -prv ./conf/rayo/{autoload_configs,dialplan} %{buildroot}/%{SYSCONFDIR}/
-%{__cp} -prv ./conf/rayo/sip_profiles/external.xml %{buildroot}/%{SYSCONFDIR}/sip_profiles
-%{__cp} -prv ./conf/rayo/sip_profiles/external %{buildroot}/%{SYSCONFDIR}/sip_profiles
-%{__cp} -prv ./conf/rayo/directory %{buildroot}/%{SYSCONFDIR}/
-
-%postun
-
-%clean
-%{__rm} -rf %{buildroot}
-
-%files
-%defattr(-,freeswitch,daemon)
-%dir %attr(0750, freeswitch, daemon) %{SYSCONFDIR}
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/cacert.pem
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/*.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/mime.types
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/acl.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/cdr_csv.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/conference.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/console.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/event_socket.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/http_cache.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/local_stream.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/logfile.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/modules.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/pocketsphinx.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/post_load_modules.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/presence_map.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/rayo.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/shout.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/sofia.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/spandsp.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/ssml.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/switch.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/autoload_configs/timezones.conf.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/dialplan/public.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/directory/default.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/directory/default/*.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/sip_profiles/*.xml
-%config(noreplace) %attr(0640, freeswitch, daemon) %{SYSCONFDIR}/sip_profiles/external/*.xml
-
-### END OF config-rayo
-
-######################################################################################################################
-#
-#                                              Changelog
-#
-######################################################################################################################
-%changelog
-* Tue Apr 23 2019 - Andrey Volk
-- Fix build for Stack 20.x
-* Tue Jun 10 2014 crienzo@grasshopper.com
-- Remove dependency to high resolution music and sounds files
-- Remove dependency to specific FreeSWITCH package version
-* Mon Jun 03 2013 - crienzo@grasshopper.com
-- Added users and internal profile for softphone testing
-* Wed May 08 2013 - crienzo@grasshopper.com
-- Initial revision
-
index 98ce36cb903e485325c72e3d886daf3d3d597881..6d7ad663d4aa8c9d88b738bf42e9cafe9f9c3c58 100644 (file)
@@ -35,8 +35,6 @@
 %define build_py26_esl 0
 %define build_timerfd 0
 %define build_mod_esl 0
-%define build_mod_rayo 1
-%define build_mod_ssml 1
 %define build_mod_v8 0
 
 %{?with_sang_tc:%define build_sng_tc 1 }
@@ -984,17 +982,6 @@ Requires:        %{name} = %{version}-%{release}
 %description event-radius-cdr
 RADIUS Logger for the FreeSWITCH open source telephony platform
 
-%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
@@ -1087,16 +1074,6 @@ BuildRequires:   opusfile-devel >= 0.5
 %description format-opusfile
 Mod Opusfile is a FreeSWITCH module to allow you to play Opus encoded files
 
-%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
@@ -1472,9 +1449,6 @@ EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_pg_csv
                        event_handlers/mod_cdr_mongodb event_handlers/mod_format_cdr event_handlers/mod_erlang_event event_handlers/mod_event_multicast \
                        event_handlers/mod_event_socket event_handlers/mod_json_cdr event_handlers/mod_radius_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 
 ######################################################################################################################
@@ -1484,9 +1458,6 @@ EVENT_HANDLERS_MODULES+=" event_handlers/mod_rayo"
 ######################################################################################################################
 FORMATS_MODULES="formats/mod_local_stream formats/mod_native_file formats/mod_opusfile 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
 
 ######################################################################################################################
 #
@@ -2278,11 +2249,6 @@ fi
 %files event-radius-cdr
 %{MODINSTDIR}/mod_radius_cdr.so*
 
-%if %{build_mod_rayo}
-%files event-rayo 
-%{MODINSTDIR}/mod_rayo.so*
-%endif
-
 %files event-snmp
 %{MODINSTDIR}/mod_snmp.so*
 
@@ -2310,11 +2276,6 @@ fi
 %files format-mod-shout
 %{MODINSTDIR}/mod_shout.so*
 
-%if %{build_mod_ssml}
-%files format-ssml
-%{MODINSTDIR}/mod_ssml.so*
-%endif
-
 %files format-tone-stream
 %{MODINSTDIR}/mod_tone_stream.so*
 
index 87da2671c62c487e8af57c432ed01d22b4a089c0..77e312f88b5b1746e426a3bb8e6fbf755edb65f8 100644 (file)
@@ -58,32 +58,6 @@ opal
 /esl/Release/
 /flite-*/
 /freeradius-client-*/
-/iksemel/build/compile
-/iksemel/doc/Makefile
-/iksemel/doc/Makefile.in
-/iksemel/include/config.h
-/iksemel/include/Makefile
-/iksemel/include/Makefile.in
-/iksemel/include/stamp-h1
-/iksemel/Makefile
-/iksemel/Makefile.in
-/iksemel/src/Makefile
-/iksemel/src/Makefile.in
-/iksemel/test/Makefile
-/iksemel/test/Makefile.in
-/iksemel/test/tst-dom
-/iksemel/test/tst-filter
-/iksemel/test/tst-iks
-/iksemel/test/tst-ikstack
-/iksemel/test/tst-jid
-/iksemel/test/tst-md5
-/iksemel/test/tst-sax
-/iksemel/test/tst-sha
-/iksemel/tools/ikslint
-/iksemel/tools/iksperf
-/iksemel/tools/iksroster
-/iksemel/tools/Makefile
-/iksemel/tools/Makefile.in
 /ilbc/config-h.in
 /ilbc/doc/Makefile
 /ilbc/doc/Makefile.in
@@ -600,7 +574,6 @@ opal
 /v8-*.zip
 
 # build products we should remove
-!/iksemel/ltmain.sh
 !/libg722_1/config/depcomp
 !/libg722_1/config/missing
 !/tiff-*/config/depcomp
@@ -622,7 +595,6 @@ srtp/build/compile
 /portaudio/
 portaudio.*.log
 apr/configure
-iksemel/configure
 libyuv/Makefile
 libyuv/convert
 srtp/configure
diff --git a/libs/iksemel/.update b/libs/iksemel/.update
deleted file mode 100644 (file)
index a3a56a0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Mon Jul 15 16:57:11 CDT 2013
diff --git a/libs/iksemel/AUTHORS b/libs/iksemel/AUTHORS
deleted file mode 100644 (file)
index 2ba1196..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-Author
-======
-
-Gurer Ozen <madcat@e-kolay.net>
-
-
-Contributions
-=============
-
-Bernhard R. Link (code)
-Fabien Ninoles (code)
-Evan Prodromou (jabberx improvements, project maintenance)
-David Yitzchak Cohen (countless bug reports)
-Benoit Laniel (mingw port)
-Darrell Karbott (ikstransport)
-Rafal Piotrowski (SASL auth)
diff --git a/libs/iksemel/COPYING b/libs/iksemel/COPYING
deleted file mode 100644 (file)
index c4792dd..0000000
+++ /dev/null
@@ -1,515 +0,0 @@
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
-  When we speak of free software, we are referring to freedom of use,
-not price.  Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-^L
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-^L
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-\f
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-^L
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-^L
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-^L
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-^L
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-^L
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-^L
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey the exclusion of warranty; and each file should
-have at least the "copyright" line and a pointer to where the full
-notice is found.
-
-
-    <one line to give the library's name and a brief idea of what it
-does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
-
-Also add information on how to contact you by electronic and paper
-mail.
-
-You should also get your employer (if you work as a programmer) or
-your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James
-Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/libs/iksemel/ChangeLog b/libs/iksemel/ChangeLog
deleted file mode 100644 (file)
index 7896521..0000000
+++ /dev/null
@@ -1,648 +0,0 @@
-2007-08-02  Gurer
-       * tst-iks.c: test for new append/prepend functions added.
-
-2007-08-01  Gurer
-       * Patch from Benjamin Bennett:
-         base64.c: fix padding
-       * sha.c: 64bit fix (long -> int)
-       * iks.c: new funcs: iks_append, iks_prepend
-         iks_append_cdata, iks_prepend_cdata
-       * stream.c: iks_sasl_challenge split into smaller functions
-         This change also fixes some possible leaks which are detected
-         by Coverity Inc's excellent Prevent product.
-
-2006-05-19  Gurer
-       * dom.c: fixed (size % FILE_IO_BUFFER_SIZE) problem in iks_load()
-
-2005-08-29  Gurer
-       * Patch from Jakob Schroter:
-         iksemel.texi: small documentation update
-       * Patch from Darrell Karbott:
-         sax.c: use fixed instead of floating point (for arm)
-         mark static const data properly
-         explicit char* uchar* casts
-
-2004-08-14  Gurer
-       * version bump to 1.3
-       * patch from Roland Hedberg
-         io-posix.c: io_connect now tries all addrinfo values.
-
-2004-08-05  Gurer
-       * iksemel.h: ikstransport cosmetic cleanup.
-       * iksemel.texi: mingw notice added.
-
-2004-07-30  Gurer
-       * iksemel.h: get_fd and connect_fd is removed from ikstransport api.
-         ikstransport structure now has an abi_version field.
-         new IKS_TRANSPORT_V1 macro defined for using in abi_version.
-       * io-posix.c: modified for new ikstransport scheme.
-       * stream.c: iks_connect_fd and iks_fd now works directly.
-
-2004-07-30  Gurer
-       * sax.c: bug in parser's utf8 checker fixed.
-
-2004-07-28  Gurer
-       * stream.c: buffer size corrected in iks_send_header.
-
-2004-07-26  Gurer
-       * iksroster.c: "iksroster" resource is default, if not given by user.
-       * stream.c: iks_start_tls() cosmetic cleanup.
-
-2004-07-23  Gurer
-       * iks.c: ikstack value of attribute nodes wasnt set correctly. fixed.
-
-2004-07-21  Gurer
-       * patch from Benoit Laniel
-         configure.ac: objdump check for cross compiling
-         iksroster.c, perf.c, io-unix.c: WIN32 is changed to _WIN32
-
-2004-07-19  Gurer
-       * iks.c: iks_child() verifies that node is a tag before accessing
-         children field in struct.
-
-2004-07-13  Gurer
-       * stream.c: if no realm is provided in sasl, server name is used
-
-2004-06-14  Gurer
-       * iksemel.texi: sasl&tls funcs documented a bit.
-
-2004-06-14  Gurer
-       * patch from Darrell Karbott
-         iksemel.h: async events are passed as a struct
-           ikstransport struct is defined as const
-           server_name is passed to the iksTConnectAsync
-           additional network error codes
-         stream.c: iks_recv() checks if iks_disconnect called during parsing
-
-2004-05-22  Gurer
-       * iks.c: iks_cdata() returns value for attributes
-       * sax.c: utf8 stack_pos fix
-
-2004-05-19  Gurer
-       * io-posix.c: now compiles without getaddrinfo()
-
-2004-05-05  Gurer
-       * sax.c: iks_parser_stack() added, returns the ikstack of an iksparser
-       * stream.c: ikstranport api is now passing iksparser instead of ikstack
-         to the connect functions.
-
-2004-05-05  Gurer
-       * stream.c: patch from Rafal Piotrowski
-         iks_sasl_challenge() cleanup
-
-2004-05-01  Gurer
-       * iksroster.c: sasl auth finally works.
-
-2004-04-30  Gurer
-       * iksroster.c: cleanup.
-
-2004-04-30  Gurer
-       * Another patch from Rafal Piotrowski
-         tst-md5.c: test code for md5.c functions, and new utils:
-         iks_make_resource_bind(), iks_make_session(), iks_stream_features()
-       * iksemel.h: iks_auth_sasl renamed to iks_start_sasl
-          IKS_AUTH_SASL_PLAIN renamed to IKS_SASL_PLAIN
-          IKS_AUTH_SASL_DIGEST_MD5 renamed to IKS_SASL_DIGEST_MD5
-
-2004-04-29  Gurer
-       * Patch from Rafal Piotrowski applied
-         md5 and base64 api, and sasl auth support!
-       * iksroster.c: --sasl option added.
-
-2004-04-27  Gurer
-       * io-unix.c: renamed to io-posix.c, it runs on windows with mingw
-         so less confusion this way.
-       * stream.c: warnings cleaned up, iks_connect_async_with finished.
-
-2004-04-26  Gurer
-       * iksemel.h: new error code IKS_NET_TLSFAIL
-       * stream.c: tls code cleaned up.
-       * configure.ac: new option --disable-default-io
-         you can use it to disable compiling of io-unix.c if you dont need
-         it and want to use your own socket code.
-
-2004-04-13  Gurer
-       * iksemel.h: new error code IKS_NET_NOTSUPP
-       * stream.c: not supported error code is supported now :)
-       * sha.c: free() is replaced with iks_free()
-
-2004-04-10  Gurer
-       * stream.c: saga continues, tls is working on ikstransport.
-       * iksroster.c: --log option for turning on xml debug output.
-
-2004-04-10  Gurer
-       * stream.c: second part:
-         it is using iks_default_transport (provided by io-unix.c) now.
-         all network code is removed.
-         iks_connect_with() allows you to use your own transport code.
-         (note: testing needed and async api is not fully implemented yet)
-
-2004-04-10  Gurer
-       * iksemel.h: first part of the long expected socket abstraction.
-         many thanks to Darrell Karbott for ideas and a sample implementation.
-       * io-unix.c: new file, transport code for unix sockets.
-
-2004-03-22  Gurer
-       * dom.c: iks_load() now frees the resources if iks_parse returns error.
-
-2004-03-19  Gurer
-       * stream.c: iks_is_secure() added, checks that if a stream is secured.
-       * iksroster.c: cleanup a bit.
-
-2004-03-18  Gurer
-       * iksroster.c, stream.c: secure connection works, but api isn't
-       stablized yet, and some cleanup needed.
-
-2004-03-08  Gurer
-       * iksroster.c: new option for secure connection, needs testing.
-
-2004-03-01  Gurer
-       * sax.c: second part, IKS_NOMEM conditions are checked properly.
-
-2004-02-29  Gurer
-       * iksemel.h: stddef.h is included to get size_t for C apps.
-       * sax.c: first part of the memory usage optimization.
-
-2004-02-27  Gurer
-       * iksemel.h: cstddef is included for C++ apps to provide size_t type.
-
-2004-02-25  Gurer
-       * src/sha.c: iks_sha_print() uses lowercase hex numbers now.
-
-2004-02-10  Gurer
-       * src/iks.c: Tag, cdata and attribute structures have different sizes now.
-         Saves 8 bytes per tag, 20 bytes per cdata/attrib on 32 bit archs.
-
-2004-02-10  Gurer
-       * src/ikstack.c: iks_stack_stats is dead, long live iks_stack_stat.
-       * tools/iksperf.c: dom test now iks_delete()s the parsed tree
-               and even measures the freeing time.
-
-2004-02-07  Gurer
-       * src/ikstack.c: iks_stack_stats returns total values.
-
-2004-02-06  Gurer
-       * src/ikstack.c: new stack implementation, all callers changed too.
-
-2004-02-03  Gurer
-       * test/tst-ikstack.c: tst-ikstack-str.c moved here.
-       * test/tst-ikstack.c: alignment test added.
-       * src/ikstack.c: iks_stack_alloc() always returns aligned memory.
-       * src/ikstack.c: patch from Ilkka Lyytinen:
-               iks_stack_strecat alignment fix.
-
-2003-10-16  Gurer
-       * src/iks.c: escape_size off by one bug in iks_string() is fixed.
-       * src/dom.c: iks_load and iks_save uses (const char *) for filename now.
-
-2003-10-09  Gurer
-       * src/Makefile.am: --no-undefined changed to -no-undefined
-       * stream.c: data->current is NULLed *before* calling the hook,
-         so you can keep the node in memory when you are returning
-         an error from your hook.
-       * tools/perf.c: GetTickCount is used instead of gettimeofday on Windows.
-
-2003-10-08  Gurer
-       * dom.c: iks_save is not using unnecessary object stack.
-       * A great patch from Benoit Laniel <nels@pgroupe.net> applied.
-       This allows iksemel to be compiled on Windows with MinGW.
-       Detailed changes:
-       * configure.ac: check for st_blksize in stat structure (which is
-         missing in Windows). Check for libwsock32, the Windows socket library.
-         The check is only done when compiling for a MinGW host to avoid
-         problems when having Wine libraries.
-       * src/Makefile.am: add -no-undefined to libiksmel_la_LDFLAGS to enable
-         DLL compilation on Windows.
-       * src/stream.c: include winsock.h and do not include posix socket
-         headers on Windows. Use closesocket instead of close on Windows.
-         Check socket errors with '== -1' instead of '< 0'.
-       * tools/ikslint.c: conditional use of st_blksize.
-       * tools/iksroster.c: add Winsock initialization and cleanup code
-         (needed to use sockets on Windows).
-
-2003-10-05  Gurer
-       * utility.c: iks_set_mem_funcs() added.
-       * iksperf.c: --memdbg option added.
-       * tools/perf.c: mallinfo stuff removed.
-
-2003-09-15  Gurer
-       * version bump to 1.2
-       * stream.c: iks_start_tls() added with the help of gnutls library.
-
-2003-09-11  Gurer
-       * stream.c: iks_connect_via() added. it can send a different name to the
-         connected server. useful for connecting the server via a ssh tunnel.
-         suggestion and patch by Wolf Bergenheim.
-
-2003-09-09  Gurer
-       * stream.c: network buffer is allocated inside the stack at the first
-         connect call, and not free()d with reset.
-
-2003-09-08  Gurer
-       * sax.c: iks_parser_reset() no longer free()s allocated buffers.
-         it also calls the delete hook of the extending parser.
-       * dom.c: reset zeroes internal state.
-       * stream.c: resetting the parser is now equal to iks_disconnect ()
-
-2003-09-07  Gurer
-       * sax.c: malloc()s changed with iks_malloc()
-         attr buffer is not freed after each tag. minor speedup.
-
-2003-09-05  Gurer
-       * ikslint.c: tag histogram is per file now instead of global.
-
-2003-09-04  Gurer
-       * iksemel.texi: resource links moved to here from HACKING.
-       * utility.c: iks_malloc(), iks_free() wrappers added.
-         all malloc() and free() calls are changed with them.
-
-2003-09-03  Gurer
-       * ikslint.c: can display tag usage histogram now.
-
-2003-09-03  Gurer
-       * ikslint.c: benchmark options removed. reading from stdin supported.
-         reports tag mismatchs.
-       * dom.c: iks_tree() added. converts a string into a tree.
-       * iksemel.texi: iks_tree, iks_set_size_hint, iks_copy documented.
-
-2003-09-03  Gurer
-       * iks.c: iks_string() now malloc()s memory if no stack is given.
-         it also runs *very* fast now.
-
-2003-09-02  Gurer
-       * iksperf.c: errors are redirected to stderr again.
-         tree serialization test added.
-
-2003-08-31  Gurer
-       * dom.c: default chunk size is increased. iks_set_size_hint()
-         function added. you can give an approximate size for the
-         file, and a better chunk size is selected for memory allocations.
-         greatly speeds up dom parser.
-       * iksperf.c: dom test uses iks_set_size_hint(). small fixes.
-       * iksperf.c: sha1 test.
-
-2003-08-31  Gurer
-       * tools/iksperf.c: new tool for speed/memory usage testing.
-       * iksemel.texi: a new chapter about iksemel development added.
-
-2003-08-23  Gurer
-       * doc/iksemel.texi: document license changed to GPL from GNU Free
-         Documentation License.
-       * ikstack.c: iks_stack_strecat() added.
-       * iks.c: iks_insert_cdata() modified to use iks_stack_strecat().
-         this greatly reduces memory usage when data is parsed in very small
-         chunks or cdata sections contains lots of escaped characters.
-
-2003-07-29  Gurer
-       * iksemel.h: iks_connect_tcp(), iks_send_stream() and
-         iks_send_raw() now take const arguments.
-       * iks.c: iks_root() added.
-       * iks.c: iks_string() works on cdata nodes.
-
-2003-07-20  Gurer
-       * iks.c: iks_copy() bug is fixed.
-
-2003-07-15  Gurer
-       * dom.c: whitespace outside of markup won't added to the tree.
-       * stream.c: iks_connect_fd correctly sets SF_FOREIGN flag.
-       * src/Makefile.am: libtool revision bump, forgot that while doing 1.1 bump.
-       * iks.c: new iks_copy() and iks_copy_within() functions.
-
-2003-06-29  Gurer
-       * 1.0 release!
-       * version bump to 1.1
-
-2003-06-26  Gurer
-       * ikstack.c: reallocation bug in iks_stack_strcat() fixed.
-       * ikstack.c: iks_stack_strcat() and iks_stack_strcatv() now returns
-         a non-zero value if there isn't enough memory.
-       * iks.c: new functions: iks_next_tag(), iks_prev_tag(), iks_first_tag().
-       * iks.c: new function: iks_find_with_attrib().
-
-2003-06-19  Gurer
-       * stream.c: new function iks_connect_fd ().
-       * stream.c: iks_send_header () is modified.
-
-2003-06-17  Gurer
-       * sax.c: tags without attributes which contain whitespace before '>'
-         parsed correctly.
-
-2003-06-16  Gurer
-       * stream.c: node isn't deleted automatically after hook anymore.
-       * iksroster.c: upload is working.
-
-2003-06-15  Gurer
-       * tools/iksroster.c: new goodie. backups your jabber roster.
-       * iks.c: iks_insert_attrib() can be used for modifying and deleting attributes.
-       * stream.c: return value of the stream hook is actually used.
-
-2003-06-13  Gurer
-       * iksemel.texi: more text.
-       * iksemel.h: iksFilterHook now returns 'int' instead of 'enum iksfilterret'.
-
-2003-06-12  Gurer
-       * iksemel.h: iksStreamHook's return type is changed 'enum ikserror' to int.
-         type is changed 'enum iksnodetype' to int.
-       * iksemel.texi: more text.
-
-2003-06-09  Gurer
-       * doc/iksemel.texi: restructured.
-       * iksemel.h: 'enum ikstagtype' type is changed to 'int' in iksTagHook.
-         'enum ikserror' changed to 'int' in iksTagHook, iksCDataHook, iks_parse().
-         'enum iksfileerror' changed to 'int' in iks_load() and iks_save().
-         'enum iksneterror' changed to 'int' in stream.c functions.
-         common error values removed from iksfileerror and iksneterror.
-       * dom.c: iks_load() checks the return value of iks_parse() now.
-
-2003-06-02  Gurer
-       * filter.c: rules now has priority:
-         id > from = from_partial > ns > subtype > type
-
-2003-05-29  Gurer
-       * jabber.c: fixes and API cleanup:
-         iks_id_new() now sets id->partial field.
-         pak->to field removed.
-         'to' argument added to iks_make_s10n()
-         'type' and 'to' arguments removed from iks_make_pres()
-         const keyword added to prototypes.
-       * filter.c: TO rule removed, FROM_PARTIAL rule added.
-
-2003-05-26  Gurer
-       * sax.c: new function iks_nr_lines(), returns how much lines parsed.
-       * ikslint.c: document's line number is displayed in errors. some cleanup.
-
-2003-05-26  Gurer
-       * sax.c: a bug in C_TAG context is found and fixed.
-
-2003-05-24  Gurer
-       * sax.c: saga continues:
-         UTF8 validity checks added. You can't feed famous 0xC0 0x80 anymore.
-         <![CDATA[ ... ]]> sections are recognized.
-       * tst-sax.c: related tests added as usual.
-
-2003-05-23  Gurer
-       * tools/ikslint.c: new goodie, checks xml files for well-formedness.
-       * sax.c: Attribute values can contain ' or " if they are quoted within
-         the other quote character.
-
-2003-05-23  Gurer
-       * tst-sax.c: framework and tests for badly formed xml.
-       * sax.c: more cleanup, and well-formedness checks:
-         iks_parse() argument for xml data is now const char*.
-         0xFF, 0xFE and 0x00 bytes are invalid utf8.
-         Close tags have no attributes.
-         Single tags must end with '/>'.
-
-2003-05-22  Gurer
-       * sax.c: some cleanup.
-       * sax.c: iks_get_udata() renamed to iks_user_data()
-       * sax.c: new function iks_nr_bytes(), returns how much bytes parsed.
-       * tst-sax.c, tst-dom.c: uses iks_nr_bytes() when reporting bugs.
-
-2003-05-22  Gurer
-       * iks.c: iks_string() was printing siblings of the toplevel tag. fixed.
-         thanks David Yitzchak Cohen for reporting.
-       * HACKING: URLs of related standart documents added.
-       * tst-filter.c: new framework.
-       * tst-dom.c: new framework and tests.
-
-2003-05-20  Gurer
-       * sax.c: '>' is valid and '--' is invalid inside the comments.
-
-2003-05-17  Gurer
-       * HACKING: explanation of iksemel's design goals added.
-       * sax.c: parser now ignores PIs, markup and comments.
-       * dom.c, stream.c: PI checks removed.
-
-2003-05-16  Gurer
-       * sax.c: several fixes.
-       * tst-sax.c: attribute checks and more tests.
-
-2003-05-16  Gurer
-       * tst-sax.c: improved framework and more tests.
-       * finetune.h: DEFAULT_DOM_CHUNK_SIZE, DEFAULT_STREAM_CHUNK_SIZE
-       * stream.c, dom.c: now uses chunk size values from finetune.h
-
-2003-05-07  Gurer
-       * complete redesign here.
-
-2002-01-16  Evan Prodromou <mr.bad@pigdog.org>
-       * test/testiks.c: removed buggy unit test for previous entry,
-         since I couldn't figure out why it segfaulted. Will investigate
-         and fix later.
-       
-2002-01-07  Evan Prodromou <mr.bad@pigdog.org>
-       * core.c: fixed off-by-one bug with reallocation of attributes.
-       * test/testiks.c: added test for above bug.
-       
-2002-12-20  Evan Prodromou <mr.bad@pigdog.org>
-       * COPYING: New version of the LGPL.
-       * INSTALL: New FSF install info. Both of these were updated by autoreconf.
-               
-2002-12-12  Evan Prodromou <mr.bad@pigdog.org>
-       * include/iksemel.h: added id to Jabber packets.
-       * src/jabber.c: get ID in Jabber packets.
-
-2002-12-9  Evan Prodromou <mr.bad@pigdog.org>
-       * doc/ROADMAP: added this file.
-
-2002-11-28  Evan Prodromou <mr.bad@pigdog.org>
-       * io.c: broke out stream initialization to its own function, in
-         anticipation of supporting other kinds of streams.
-       * iksemel.h: added new stream function.
-
-2002-11-15  Evan Prodromou <mr.bad@pigdog.org>
-       * configure.in: added check to see if you want to build with dmalloc.
-       * parser.c: make Jabber parsers use pool memory. Also, make Jabber
-         parser delete packets after posting them to callback function.
-       * convert.c: made converter used pool memory.
-       * iks.c: fixed iks constructor/destructor so they mark pool owner
-         and only delete the pool if the iks is the owner.
-       * sha.c: changed sha objects to use pool memory.
-       
-2002-11-07  Evan Prodromou <mr.bad@pigdog.org>
-
-       * ikspool.c: added ALIGN_ON, ALIGNED(), *_OFFSET macros.
-         Try to make sure that all pointer math is done with
-         aligned (val % ALIGN_ON == 0) values.
-         Fixed bug in _realloc() where incoming size wasn't
-         checked for alignment, size.
-       * testpool.c: added tests for absurdly small values
-         of page size, alloc size, realloc size.
-
-2002-11-06  Evan Prodromou <mr.bad@pigdog.org>
-
-       * iksemel.h: added IKS_NS_XROSTER, for jabber:x:roster NS.
-
-2002-11-06  Evan Prodromou <mr.bad@pigdog.org>
-
-       * core.c: changed iks_parse to use realloc instead of
-         malloc, copy, free.
-
-2002-11-04  Evan Prodromou <mr.bad@pigdog.org>
-
-       * ikspool.c: For iks_pool_realloc, made it call _alloc if the
-         passed-in pointer is NULL. This is the way realloc() works.
-        * testpool.c: added a test for the above condition.
-       
-2002-11-04  Evan Prodromou <mr.bad@pigdog.org>
-
-       * ikspool.c: Added some comments.
-
-2002-11-03  Evan Prodromou <mr.bad@pigdog.org>
-
-       * iksid.c: changed contract for iks_id_new, iks_id_set: const char *
-                  instead of char *.
-       * iksemel.h: changed prototypes for iks_id_new, iks_id_set.
-
-2002-11-03  Evan Prodromou <mr.bad@pigdog.org>
-
-       * iksid.c: fixed bug in iks_id_set causing segfault if field was
-                  previously NULL.
-       * testid.c: added tests to check for above bug.
-       * test/.cvsignore: Ignore testpool and testid.
-       
-2002-11-03  Evan Prodromou <mr.bad@pigdog.org>
-
-       * iksid.c: fixed bug in iks_id_new with partial (no resource) IDs.
-       * testid.c: added tests to check for above bug.
-       
-2002-11-03  Evan Prodromou <mr.bad@pigdog.org>
-
-       * iksid.c: moved iksid functions to this file from jabber.c.
-                  added new function, iks_id_delete, to delete an iksid.
-                  implemented iks_id_set.
-                  made iks_id_new use iks_pool_set_owner if it creates a pool.
-                  changed iks_id_new so it doesn't write on src.
-       * iksemel.h: added prototype for iks_id_delete.
-       * testid.c: created basic unit tests for iksid. 
-
-2002-11-02  Evan Prodromou <mr.bad@pigdog.org>
-
-       * Added the beginnings of unit tests for memory allocation.
-         More needed.
-               
-2002-11-02  Evan Prodromou <mr.bad@pigdog.org>
-
-       * ikspool.c: added new best-fit memory allocation functions.
-       * utility.c: removed old memory-allocation functions.
-       * iksemel.h: added new memory allocation functions:
-                    iks_pool_owner
-                    iks_pool_set_owner
-                    iks_pool_realloc
-                    iks_pool_calloc
-                    iks_pool_free
-                    redefined ikspool structure for hiding.
-
-2001-06-08  Gurer <palpa@jabber.org>
-
-       * core.c: xml unescaping.
-
-2001-06-07  Gurer <palpa@jabber.org>
-
-       * convert.c: small bugfix in iks_conv_new()
-
-2001-05-25  Gurer <palpa@jabber.org>
-
-       * configure.in: now checks gcc before adding -Wall to CFLAGS
-       * io.c: iks_recv() and iks_load() fixes.
-
-2001-05-24  Gurer <palpa@jabber.org>
-
-       * configure.in: more checks.
-       * include/common.h: deals with including right files depending on
-         configure checks, source files include this.
-
-2001-05-22  Gurer <palpa@jabber.org>
-
-       * jabber.c: iks_id_printx() added
-                   new packet type IKS_PAK_ERROR for <stream:error>
-       * sha.c: iks_sha_delete() added
-       * configure.in, parser.c: optional expat support
-
-2001-05-21  Gurer <palpa@jabber.org>
-
-       * parser.c: restructured. now parsers are allocated via iks_sax_new
-       * core.c: actual parser is moved to here
-       * convert.c: charset conversion stuff moved to here
-       * utility.c: alignment bug of iks_pool_alloc fixed
-
-2001-04-10  Gurer <palpa@jabber.org>
-
-       * utility.c: charset convertion functions now use a static buffer and
-                    require string length argument
-
-2001-03-19  Gurer <palpa@jabber.org>
-
-       * utility.c: iks_conv_from/to renamed to iks_conv_utf8/locale
-                    iconv fixes
-
-2001-03-17  Gurer <palpa@jabber.org>
-
-       * utility.c: iks_conv_from/to() fixes
-       * doc/: a bit more documentation
-
-2001-03-15  Gurer <palpa@jabber.org>
-
-       * jabber.c: iks_packet() uses the namespace of first child in IQ packets
-                   instead of looking for a <query> tag.
-       * utility.c: iks_conv_ functions for utf8<->locale convertions
-
-2001-03-13  Fabien Ninoles <fabien@debian.org>
-
-       * autogen.sh: Well, autoconf are better run into the src directory, indeed.
-       * configure.in: Add iconv check, ripped from gabber.
-       * src/Makefile.am: Oops! include dir is in srcdir!
-
-2001-03-12  Gurer <palpa@jabber.org>
-
-       * doc/ : new files, basic structure for documentation
-
-2001-03-09  Fabien Ninoles <fabien@debian.org>
-
-       * utility.c: Correction to the unescape routine... which do some
-                    mess around with indexes.
-       * parser.c: Unescape CDATA et attrib value before inserting them.
-       * autogen.sh: Enable running it from a build directory.
-
-2000-03-07  Gurer <palpa@jabber.org>
-
-       * iks.c: iks_string() now works correctly with a NULL ikspool argument
-       * io.c: return code check of fputs in iks_save() is corrected
-       * doc: new directory
-       * doc/main.texi: started documenting the library API in Texinfo format
-
-2000-03-05  Gurer <palpa@jabber.org>
-
-       * iksemel.h: IKS_NS_ macros synced with latest jabber server
-       * parser.c: attribute buffer grow bug fixed
-       * iks.c: iks_hide() implemented
-
-2000-02-01  Gurer <palpa@jabber.org>
-
-       * parser.c: attribute pointers bug fixed
-       * testiks.c: new test for parser
-
-2000-01-30  Gurer <palpa@jabber.org>
-
-       * configure.in, makefile.am, test/makefile.am: make check target works now
-       * testiks.c: new tests for string and xml node functions
-
-2000-01-28  Gurer <palpa@jabber.org>
-
-       * test: new directory
-       * test/testiks.c: a simple program for self testing
-       * makefile.am, src/makefile.am: fixes for make dist
-
-2000-01-25  Gurer <palpa@jabber.org>
-
-       * sha.c: sha1 implementation
-       * jabber.c: iks_make_auth() now supports digest auth
-
-2000-01-16  Gurer <palpa@jabber.org>
-
-       * io.c: iks_load() implemented
-
-2000-12-20  Gurer <palpa@jabber.org>
-
-       * initial commit.
diff --git a/libs/iksemel/HACKING b/libs/iksemel/HACKING
deleted file mode 100644 (file)
index 5cd46d5..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-
-License:
-========
-
-iksemel is developed and released under GNU Lesser General Public License.
-A copy of the license can be found in the file COPYING. You should read it
-before sending patches to the iksemel, since it is implicitly assumed that
-your patches are also submitted under the LGPL license.
-
-
-Roadmap:
-========
-
-Main goal of the iksemel is removing complexity from programs using the
-library and the library itself. This is the reason why only a subset of XML
-is supported. Some things like UTF16, entity definitons, DTDs will be eventually
-implemented when we found ways to implement them without adding
-too much complexity to the iksemel code. Somewhat external standarts
-(XPath, XQuery, XSLT, vs) will probably not make it into the iksemel.
-
-* validation
-
-I think easiest way to add this feature is writing another parser based on the
-sax parser which parses a dtd (either from sax parser's markup callback which
-needs to be implemented or from an external source via iks_vsax_set_dtd() call)
-and checks the arguments of sax callbacks. Using it via dom or stream parsers
-can require some clever tricks. there are also xml schemas. they are easy to parse
-(it is xml anyway) but can be hard to apply.
-
-* utf16
-
-There are two sides of this. Improving parser to accept utf16 can be relatively
-easy. But on the client side things can get confusing. What will be the default
-character set used by iks_new(), iks_insert_cdata() and similar functions? and
-how they will allow other charsets to be used. Supporting more than utf8 and
-utf16 is more difficult. Hopefully there is no immediate need for this. Jabber
-uses only utf8 and you can use iconv if you are using another charset in your
-application. Btw, there is also byte order issue which is silly. Inventor of BOM
-crap must be killed.
-
-* jabber roster
-
-Roster handling generally depends on the UI system used. But I think a generic
-roster handler which parses roster result, pushes, presence changes and
-allows application to access and display this data can be useful. Challenge
-here is making it UI independent and extensible by the application.
-
-
-File Layout:
-============
-
-doc/
-* iksemel.texi                Documentation in texinfo format.
-include/
-* common.h                    Internal header for some common definitions.
-* iksemel.h                   Library API
-* finetune.h                  Default memory allocation sizes.
-src/
-* ikstack.c                   Memory management functions.
-* utility.c                   Small string utility functions.
-* iks.c                       XML tree management.
-* sax.c                       SAX parser.
-* dom.c                       DOM parser.
-* stream.c                    Stream parser.
-* sha.c                       SHA1 hash functions.
-* jabber.c                    Jabber utilities.
-* filter.c                    Packet filter for Jabber.
-test/
-(self test programs)
-tools/
-(varius utility programs)
diff --git a/libs/iksemel/INSTALL b/libs/iksemel/INSTALL
deleted file mode 100644 (file)
index 7d1c323..0000000
+++ /dev/null
@@ -1,365 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
-
-   Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved.  This file is offered as-is,
-without warranty of any kind.
-
-Basic Installation
-==================
-
-   Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package.  The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package.  Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below.  The lack of an optional feature in a given package is not
-necessarily a bug.  More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
-   The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation.  It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
-   It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring.  Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
-   If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
-   The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'.  You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
-   The simplest way to compile this package is:
-
-  1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.
-
-     Running `configure' might take a while.  While running, it prints
-     some messages telling which features it is checking for.
-
-  2. Type `make' to compile the package.
-
-  3. Optionally, type `make check' to run any self-tests that come with
-     the package, generally using the just-built uninstalled binaries.
-
-  4. Type `make install' to install the programs and any data files and
-     documentation.  When installing into a prefix owned by root, it is
-     recommended that the package be configured and built as a regular
-     user, and only the `make install' phase executed with root
-     privileges.
-
-  5. Optionally, type `make installcheck' to repeat any self-tests, but
-     this time using the binaries in their final installed location.
-     This target does not install anything.  Running this target as a
-     regular user, particularly if the prior `make install' required
-     root privileges, verifies that the installation completed
-     correctly.
-
-  6. You can remove the program binaries and object files from the
-     source code directory by typing `make clean'.  To also remove the
-     files that `configure' created (so you can compile the package for
-     a different kind of computer), type `make distclean'.  There is
-     also a `make maintainer-clean' target, but that is intended mainly
-     for the package's developers.  If you use it, you may have to get
-     all sorts of other programs in order to regenerate files that came
-     with the distribution.
-
-  7. Often, you can also type `make uninstall' to remove the installed
-     files again.  In practice, not all packages have tested that
-     uninstallation works correctly, even though it is required by the
-     GNU Coding Standards.
-
-  8. Some packages, particularly those that use Automake, provide `make
-     distcheck', which can by used by developers to test that all other
-     targets like `make install' and `make uninstall' work correctly.
-     This target is generally not run by end users.
-
-Compilers and Options
-=====================
-
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  Run `./configure --help'
-for details on some of the pertinent environment variables.
-
-   You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment.  Here
-is an example:
-
-     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
-   *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you can use GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.  This
-is known as a "VPATH" build.
-
-   With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory.  After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
-   On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor.  Like
-this:
-
-     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
-                 CPP="gcc -E" CXXCPP="g++ -E"
-
-   This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
-   By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc.  You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
-absolute file name.
-
-   You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files.  If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
-   In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.  In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
-   The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
-having to reconfigure or recompile.
-
-   The first method involves providing an override variable for each
-affected directory.  For example, `make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-`${prefix}'.  Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated.  The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
-   The second method involves providing the `DESTDIR' variable.  For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names.  The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters.  On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
-
-Optional Features
-=================
-
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
-   Some packages pay attention to `--enable-FEATURE' options to
-`configure', where FEATURE indicates an optional part of the package.
-They may also pay attention to `--with-PACKAGE' options, where PACKAGE
-is something like `gnu-as' or `x' (for the X Window System).  The
-`README' should mention any `--enable-' and `--with-' options that the
-package recognizes.
-
-   For packages that use the X Window System, `configure' can usually
-find the X include and library files automatically, but if it doesn't,
-you can use the `configure' options `--x-includes=DIR' and
-`--x-libraries=DIR' to specify their locations.
-
-   Some packages offer the ability to configure how verbose the
-execution of `make' will be.  For these packages, running `./configure
---enable-silent-rules' sets the default to minimal output, which can be
-overridden with `make V=1'; while running `./configure
---disable-silent-rules' sets the default to verbose, which can be
-overridden with `make V=0'.
-
-Particular systems
-==================
-
-   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
-CC is not installed, it is recommended to use the following options in
-order to use an ANSI C compiler:
-
-     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
-
-and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-
-   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
-parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
-a workaround.  If GNU CC is not installed, it is therefore recommended
-to try
-
-     ./configure CC="cc"
-
-and if that doesn't work, try
-
-     ./configure CC="cc -nodtk"
-
-   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
-directory contains several dysfunctional programs; working variants of
-these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
-in your `PATH', put it _after_ `/usr/bin'.
-
-   On Haiku, software installed for all users goes in `/boot/common',
-not `/usr/local'.  It is recommended to use the following options:
-
-     ./configure --prefix=/boot/common
-
-Specifying the System Type
-==========================
-
-   There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on.  Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
-`--build=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name which has the form:
-
-     CPU-COMPANY-SYSTEM
-
-where SYSTEM can have one of these forms:
-
-     OS
-     KERNEL-OS
-
-   See the file `config.sub' for the possible values of each field.  If
-`config.sub' isn't included in this package, then this package doesn't
-need to know the machine type.
-
-   If you are _building_ compiler tools for cross-compiling, you should
-use the option `--target=TYPE' to select the type of system they will
-produce code for.
-
-   If you want to _use_ a cross compiler, that generates code for a
-platform different from the build platform, you should specify the
-"host" platform (i.e., that on which the generated programs will
-eventually be run) with `--host=TYPE'.
-
-Sharing Defaults
-================
-
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
-`configure' looks for `PREFIX/share/config.site' if it exists, then
-`PREFIX/etc/config.site' if it exists.  Or, you can set the
-`CONFIG_SITE' environment variable to the location of the site script.
-A warning: not all `configure' scripts look for a site script.
-
-Defining Variables
-==================
-
-   Variables not defined in a site shell script can be set in the
-environment passed to `configure'.  However, some packages may run
-configure again during the build, and the customized values of these
-variables may be lost.  In order to avoid this problem, you should set
-them in the `configure' command line, using `VAR=value'.  For example:
-
-     ./configure CC=/usr/local2/bin/gcc
-
-causes the specified `gcc' to be used as the C compiler (unless it is
-overridden in the site shell script).
-
-Unfortunately, this technique does not work for `CONFIG_SHELL' due to
-an Autoconf bug.  Until the bug is fixed you can use this workaround:
-
-     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
-
-`configure' Invocation
-======================
-
-   `configure' recognizes the following options to control how it
-operates.
-
-`--help'
-`-h'
-     Print a summary of all of the options to `configure', and exit.
-
-`--help=short'
-`--help=recursive'
-     Print a summary of the options unique to this package's
-     `configure', and exit.  The `short' variant lists options used
-     only in the top level, while the `recursive' variant lists options
-     also present in any nested packages.
-
-`--version'
-`-V'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
-
-`--cache-file=FILE'
-     Enable the cache: use and save the results of the tests in FILE,
-     traditionally `config.cache'.  FILE defaults to `/dev/null' to
-     disable caching.
-
-`--config-cache'
-`-C'
-     Alias for `--cache-file=config.cache'.
-
-`--quiet'
-`--silent'
-`-q'
-     Do not print messages saying which checks are being made.  To
-     suppress all normal output, redirect it to `/dev/null' (any error
-     messages will still be shown).
-
-`--srcdir=DIR'
-     Look for the package's source code in directory DIR.  Usually
-     `configure' can determine that directory automatically.
-
-`--prefix=DIR'
-     Use DIR as the installation prefix.  *note Installation Names::
-     for more details, including other options available for fine-tuning
-     the installation locations.
-
-`--no-create'
-`-n'
-     Run the configure checks, but stop before creating any output
-     files.
-
-`configure' also accepts some other, not widely useful, options.  Run
-`configure --help' for more details.
-
diff --git a/libs/iksemel/Makefile.am b/libs/iksemel/Makefile.am
deleted file mode 100644 (file)
index 8ba57fe..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-##
-## Process this file with automake to produce Makefile.in
-##
-
-SUBDIRS = include src tools test doc
-
-EXTRA_DIST = HACKING iksemel.pc.in
-
-pkgconfigdir=$(libdir)/pkgconfig
-pkgconfig_DATA = iksemel.pc
-
-snapshot:
-       $(MAKE) dist distdir=$(PACKAGE)-`date +"%y%m%d"`
-       mv $(PACKAGE)-`date +"%y%m%d"`.tar.gz ../
-
-ikslite:
-       cp include/iksemel.h ../
-       cat include/finetune.h src/utility.c src/ikstack.c src/sax.c src/iks.c src/dom.c >../iksemel.c
diff --git a/libs/iksemel/NEWS b/libs/iksemel/NEWS
deleted file mode 100644 (file)
index 87d60a3..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-V1.3 (2007-08-02)
-* Project is moved to
-    http://code.google.com/p/iksemel/
-  there is also a new mailing list at:
-    http://groups.google.com/group/iksemel
-  Please use those instead of old jabberstudio.org addresses.
-* iksemel is now participating in Coverity Inc's free software
-  quality improvement program (http://scan.coverity.com). As a
-  first result, a few problems found by Coverity's static analysis
-  tool in the iks_sasl_challenge() are fixed in this release, and
-  other than that, iksemel passes from defect test with no problems.
-* Extra padding problem in the base64 encoder is fixed. Some servers
-  were having problems with extra '=' padded SASL digests.
-* New dom functions: iks_append(), iks_prepend(), iks_append_cdata(),
-  iks_prepend_cdata(). You can append/prepend new nodes within the
-  siblings with them, insert_ functions were only appending at the
-  last child. Thus editing a tree is much easier now.
-* iks_load was giving error on files with multiply of 4Kb sizes, fixed.
-
-V1.2 (2004-08-06)
-* SASL authentication.
-* SSH connections via gnutls library.
-* Socket code abstracted, you can even provide your own transport functions.
-* Compiles on Windows with MinGW.
-* iks_sha_print() uses lowercase hex numbers to comply with latest jabber.
-* New stack implementation, much faster and uses less memory.
-  Unfortunately API has changed a bit:
-  iks_stack_strcat, strcatv, print functions removed.
-  iks_stack_stats modified.
-  iks_stack_strecat renamed to iks_stack_strcat.
-  iks_stack_new takes two chunk sizes, one for structures one for strings.
-  iks_stack_strdup returns (char *).
-
-V1.1 (2003-09-11)
-* Minor sax parser speed up.
-* iks_string() and dom parser performance is improved greatly.
-* iksperf: new tool for measuring iksemel performance.
-* ikslint: better error checking. supports stdin. can display tag usage histogram.
-* New dom functions: iks_copy(), iks_copy_within(), iks_root(), iks_tree().
-* License of the documentation changed to GPL from GNU FDL.
-
-V1.0 (2003-06-29)
-* API redesigned.
-* iconv interface removed.
-* ikslint and iksroster tools.
-* Jabber packet filter.
-* IPv6 support.
-* iks_find_with_attrib, iks_next_tag, iks_prev_tag, iks_first_tag functions.
-* Parser improvements (CDATA sections, comments, UTF8 validity checks)
-* Memory pools are replaced with object stacks.
-
-V0.1 (2002-10-30)
-* First release.
diff --git a/libs/iksemel/README b/libs/iksemel/README
deleted file mode 100644 (file)
index 306c559..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-
-                      iksemel 1.3
-
-Copyright (c) 2000-2004 Gurer Ozen <madcat@e-kolay.net>
-
-
-Introduction:
--------------
-
-This is an XML parser library mainly designed for Jabber applications.
-It provides SAX, DOM, and special Jabber stream APIs. Library is coded
-in ANSI C except the network code (which is POSIX compatible), thus
-highly portable. Iksemel is released under GNU Lesser General Public
-License. A copy of the license is included in the COPYING file.
-
-
-Requirements:
--------------
-
-Libtool, Automake and Autoconf packages are required for compiling cvs
-versions.
-
-
-Compiling & Install:
---------------------
-
-If you got the source from CVS, type
-
-  ./autogen.sh
-
-for creating configuration script and files.
-
-Then type
-
-  ./configure
-  make
-
-now library is compiled. You can test it with
-
-  make check
-
-and install it with
-
-  (become root if necessary)
-  make install
diff --git a/libs/iksemel/TODO b/libs/iksemel/TODO
deleted file mode 100644 (file)
index d20bebb..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-
-This file contains a simple list of TODO items.
-More general ideas can be found in the roadmap part of the file HACKING.
-
-(in order of importance)
-
-* parser: &#1234; and &#xA25F; like entities must be unescaped.
-* packet filter or a generic xml filter? something like a simplified xpath?
-* a separate utf8 validator function can be useful
-* utf8 <-> utf16 conversion functions can be useful
-
-anything else? :-)
diff --git a/libs/iksemel/acinclude.m4 b/libs/iksemel/acinclude.m4
deleted file mode 100644 (file)
index 72e6d43..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not)
-dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page
-dnl also defines GSTUFF_PKG_ERRORS on error
-AC_DEFUN([PKG_CHECK_MODULES], [
-  succeeded=no
-
-  if test -z "$PKG_CONFIG"; then
-    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-  fi
-
-  if test "$PKG_CONFIG" = "no" ; then
-     echo "*** The pkg-config script could not be found. Make sure it is"
-     echo "*** in your path, or set the PKG_CONFIG environment variable"
-     echo "*** to the full path to pkg-config."
-     echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config."
-  else
-     PKG_CONFIG_MIN_VERSION=0.9.0
-     if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
-        AC_MSG_CHECKING(for $2)
-
-        if $PKG_CONFIG --exists "$2" ; then
-            AC_MSG_RESULT(yes)
-            succeeded=yes
-
-            AC_MSG_CHECKING($1_CFLAGS)
-            $1_CFLAGS=`$PKG_CONFIG --cflags "$2"`
-            AC_MSG_RESULT($$1_CFLAGS)
-
-            AC_MSG_CHECKING($1_LIBS)
-            $1_LIBS=`$PKG_CONFIG --libs "$2"`
-            AC_MSG_RESULT($$1_LIBS)
-        else
-            $1_CFLAGS=""
-            $1_LIBS=""
-            ## If we have a custom action on failure, don't print errors, but 
-            ## do set a variable so people can do so.
-            $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
-            ifelse([$4], ,echo $$1_PKG_ERRORS,)
-        fi
-
-        AC_SUBST($1_CFLAGS)
-        AC_SUBST($1_LIBS)
-     else
-        echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
-        echo "*** See http://www.freedesktop.org/software/pkgconfig"
-     fi
-  fi
-
-  if test $succeeded = yes; then
-     ifelse([$3], , :, [$3])
-  else
-     ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4])
-  fi
-])
-
-
-
diff --git a/libs/iksemel/acsite.m4 b/libs/iksemel/acsite.m4
deleted file mode 100644 (file)
index 593df04..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-m4_include([build/libgnutls.m4])
-
diff --git a/libs/iksemel/build/libgnutls.m4 b/libs/iksemel/build/libgnutls.m4
deleted file mode 100644 (file)
index cf3fe46..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-dnl Autoconf macros for libgnutls
-dnl $id$
-
-# Modified for LIBGNUTLS -- nmav
-# Configure paths for LIBGCRYPT
-# Shamelessly stolen from the one of XDELTA by Owen Taylor
-# Werner Koch   99-12-09
-
-dnl AM_PATH_LIBGNUTLS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for libgnutls, and define LIBGNUTLS_CFLAGS and LIBGNUTLS_LIBS
-dnl
-AC_DEFUN([AX_PATH_LIBGNUTLS],
-[dnl
-dnl Get the cflags and libraries from the libgnutls-config script
-dnl
-AC_ARG_WITH(libgnutls-prefix,
-          [  --with-libgnutls-prefix=PFX   Prefix where libgnutls is installed (optional)],
-          libgnutls_config_prefix="$withval", libgnutls_config_prefix="")
-
-  if test x$libgnutls_config_prefix != x ; then
-     if test x${LIBGNUTLS_CONFIG+set} != xset ; then
-        LIBGNUTLS_CONFIG=$libgnutls_config_prefix/bin/libgnutls-config
-     fi
-  fi
-
-  AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no)
-  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-  no_libgnutls=""
-  if test "$LIBGNUTLS_CONFIG" != "no"; then
-    LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags`
-    LIBGNUTLS_LIBS="`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs` -lpthread  -lgcrypt"
-    libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version`
-  elif test "$PKG_CONFIG" != "no"; then
-    LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags gnutls`
-    LIBGNUTLS_LIBS="`$PKG_CONFIG --libs gnutls` -lpthread -lgcrypt"
-    libgnutls_config_version=`$PKG_CONFIG --modversion gnutls`
-  else
-    no_libgnutls=yes
-  fi
-
-  min_libgnutls_version=ifelse([$1], ,0.1.0,$1)
-  AC_MSG_CHECKING(for libgnutls - version >= $min_libgnutls_version)
-
-  if test x"$no_libgnutls" = x""; then
-
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
-      LIBS="$LIBS $LIBGNUTLS_LIBS"
-dnl
-dnl Now check if the installed libgnutls is sufficiently new. Also sanity
-dnl checks the results of libgnutls-config to some extent
-dnl
-      rm -f conf.libgnutlstest
-      AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gnutls/gnutls.h>
-
-int
-main ()
-{
-    system ("touch conf.libgnutlstest");
-
-    if( strcmp( gnutls_check_version(NULL), "$libgnutls_config_version" ) )
-    {
-      printf("\n*** 'libgnutls-config --version' returned %s, but LIBGNUTLS (%s)\n",
-             "$libgnutls_config_version", gnutls_check_version(NULL) );
-      printf("*** was found! If libgnutls-config was correct, then it is best\n");
-      printf("*** to remove the old version of LIBGNUTLS. You may also be able to fix the error\n");
-      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
-      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
-      printf("*** required on your system.\n");
-      printf("*** If libgnutls-config was wrong, set the environment variable LIBGNUTLS_CONFIG\n");
-      printf("*** to point to the correct copy of libgnutls-config, and remove the file config.cache\n");
-      printf("*** before re-running configure\n");
-    }
-    else if ( strcmp(gnutls_check_version(NULL), LIBGNUTLS_VERSION ) )
-    {
-      printf("\n*** LIBGNUTLS header file (version %s) does not match\n", LIBGNUTLS_VERSION);
-      printf("*** library (version %s)\n", gnutls_check_version(NULL) );
-    }
-    else
-    {
-      if ( gnutls_check_version( "$min_libgnutls_version" ) )
-      {
-        return 0;
-      }
-     else
-      {
-        printf("no\n*** An old version of LIBGNUTLS (%s) was found.\n",
-                gnutls_check_version(NULL) );
-        printf("*** You need a version of LIBGNUTLS newer than %s. The latest version of\n",
-               "$min_libgnutls_version" );
-        printf("*** LIBGNUTLS is always available from ftp://gnutls.hellug.gr/pub/gnutls.\n");
-        printf("*** \n");
-        printf("*** If you have already installed a sufficiently new version, this error\n");
-        printf("*** probably means that the wrong copy of the libgnutls-config shell script is\n");
-        printf("*** being found. The easiest way to fix this is to remove the old version\n");
-        printf("*** of LIBGNUTLS, but you can also set the LIBGNUTLS_CONFIG environment to point to the\n");
-        printf("*** correct copy of libgnutls-config. (In this case, you will have to\n");
-        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
-        printf("*** so that the correct libraries are found at run-time))\n");
-      }
-    }
-  return 1;
-}
-],, no_libgnutls=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-  fi
-
-  if test "x$no_libgnutls" = x ; then
-     AC_MSG_RESULT(yes)
-     ifelse([$2], , :, [$2])
-  else
-     if test -f conf.libgnutlstest ; then
-        :
-     else
-        AC_MSG_RESULT(no)
-     fi
-     if test "$LIBGNUTLS_CONFIG" = "no" ; then
-       echo "*** The libgnutls-config script installed by LIBGNUTLS could not be found"
-       echo "*** If LIBGNUTLS was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the LIBGNUTLS_CONFIG environment variable to the"
-       echo "*** full path to libgnutls-config."
-     else
-       if test -f conf.libgnutlstest ; then
-        :
-       else
-          echo "*** Could not run libgnutls test program, checking why..."
-          CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS"
-          LIBS="$LIBS $LIBGNUTLS_LIBS"
-          AC_TRY_LINK([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gnutls/gnutls.h>
-],      [ return !!gnutls_check_version(NULL); ],
-        [ echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding LIBGNUTLS or finding the wrong"
-          echo "*** version of LIBGNUTLS. If it is not finding LIBGNUTLS, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-          echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-          echo "***" ],
-        [ echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means LIBGNUTLS was incorrectly installed"
-          echo "*** or that you have moved LIBGNUTLS since it was installed. In the latter case, you"
-          echo "*** may want to edit the libgnutls-config script: $LIBGNUTLS_CONFIG" ])
-          CFLAGS="$ac_save_CFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-     LIBGNUTLS_CFLAGS=""
-     LIBGNUTLS_LIBS=""
-     ifelse([$3], , :, [$3])
-  fi
-  rm -f conf.libgnutlstest
-  AC_SUBST(LIBGNUTLS_CFLAGS)
-  AC_SUBST(LIBGNUTLS_LIBS)
-])
-
-dnl *-*wedit:notab*-*  Please keep this as the last line.
diff --git a/libs/iksemel/configure.ac b/libs/iksemel/configure.ac
deleted file mode 100644 (file)
index d8a7970..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(iksemel,1.3)
-AC_PREREQ(2.50)
-AC_CONFIG_AUX_DIR(build)
-AC_CONFIG_SRCDIR([configure.ac])
-AM_INIT_AUTOMAKE
-AC_CONFIG_HEADERS(include/config.h)
-
-CFLAGS="$CFLAGS $CONFIGURE_CFLAGS"
-CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS"
-LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS"
-
-AC_CANONICAL_HOST
-
-dnl Checks for programs
-AC_PROG_CC
-AC_PROG_INSTALL
-AC_CHECK_TOOL(OBJDUMP, objdump, :)
-AM_PROG_LIBTOOL
-AC_LANG_C
-
-dnl Checks for header files
-AC_HEADER_STDC
-AC_CHECK_HEADERS(unistd.h strings.h errno.h)
-
-dnl Checks for typedefs and structures
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_SIZE_T
-AC_CHECK_MEMBERS([struct stat.st_blksize])
-
-dnl Special check for windows
-case "$host_os" in
-       *mingw*)
-               AC_CHECK_LIB(wsock32, main, , AC_MSG_ERROR(Winsock is needed for a Win32 build.))
-               ;;
-esac
-
-dnl Check for posix io
-AC_ARG_ENABLE(default-io,
-[  --disable-default-io    disable builtin socket transport code ],
-        defio=$enableval, defio=yes)
-if test "$defio" = yes; then
-       AC_DEFINE(USE_DEFAULT_IO,1,[Define this is you want default transport])
-fi
-AM_CONDITIONAL(DO_POSIX, test "x$defio" = "xyes")
-
-dnl Checks for library functions
-AC_SEARCH_LIBS(recv,socket)
-AC_CHECK_FUNCS(getopt_long)
-AC_CHECK_FUNCS(getaddrinfo)
-
-#AX_PATH_LIBGNUTLS(,AC_DEFINE(HAVE_GNUTLS,,"Use libgnutls"))
-
-m4_include([openssl.m4])
-SAC_OPENSSL
-
-dnl Check -Wall flag of GCC
-if test "x$GCC" = "xyes"; then
-  if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
-    CFLAGS="$CFLAGS -Wall"
-  fi
-fi
-
-AC_DEFUN([AX_COMPILER_VENDOR],
-[
-AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
- [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
-  # note: don't check for gcc first since some other compilers define __GNUC__
-  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
-    vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
-#if !($vencpp)
-      thisisanerror;
-#endif
-])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
-  done
- ])
-])
-
-AX_COMPILER_VENDOR
-
-#  Enable 64 bit build
-AC_ARG_ENABLE(64,
-[AC_HELP_STRING([--enable-64],[build with 64 bit support])],[enable_64="$enable_64"],[enable_64="no"])
-
-if test "x${ax_cv_c_compiler_vendor}"  =  "xsun" ; then
-    if test "${enable_64}" = "yes"; then
-        CFLAGS="$CFLAGS -mt -m64 -lgpg-error"
-        CXXFLAGS="$CXXFLAGS -mt -m64 -lgpg-error"
-       SUNFLAGS="-xc99=all -mt -m64 -lgpg-error"
-    else 
-       CFLAGS="$CFLAGS  -mt -lgpg-error"
-       CXXFLAGS="$CXXFLAGS -mt -lgpg-error"
-       SUNFLAGS="-xc99=all -mt -lgpg-error"
-    fi
-fi
-
-AC_SUBST(SUNCFLAGS)
-
-dnl Generating makefiles
-AC_CONFIG_FILES([
-Makefile
-iksemel.pc
-src/Makefile
-include/Makefile
-tools/Makefile
-test/Makefile
-doc/Makefile
-])
-AC_OUTPUT
diff --git a/libs/iksemel/configure.gnu b/libs/iksemel/configure.gnu
deleted file mode 100644 (file)
index c78238d..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-srcpath=$(dirname $0 2>/dev/null )  || srcpath="." 
-$srcpath/configure "$@" --disable-shared --with-pic
-
diff --git a/libs/iksemel/doc/Makefile.am b/libs/iksemel/doc/Makefile.am
deleted file mode 100644 (file)
index e7701d3..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-##
-## Process this file with automake to produce Makefile.in
-##
-
-#info_TEXINFOS = iksemel.texi
diff --git a/libs/iksemel/doc/iksemel.texi b/libs/iksemel/doc/iksemel.texi
deleted file mode 100644 (file)
index fd683e2..0000000
+++ /dev/null
@@ -1,1534 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c %**start of header
-@setfilename iksemel
-@setcontentsaftertitlepage
-@settitle Iksemel Programmers Manual
-@set VERSION 1.2
-@c %**end of header
-
-@titlepage
-@title iksemel programmers manual
-@subtitle A tutorial and API reference for the iksemel library @value{VERSION}
-@page
-@vskip 0pt plus 1filll
-Copyright @copyright{} 2001-2003 G@"urer @"Ozen
-
-This is a free document; you can redistribute it and/or
-modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2, or
-(at your option) any later version.You may obtain a copy of the
-GNU General Public License from the Free Software Foundation
-by visiting their Web site or by writing to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA.
-
-@end titlepage
-
-@ifinfo
-@node Top, , , (dir)
-@top iksemel Programmers Manual
-
-Copyright @copyright{} 2001-2003 G@"urer @"Ozen
-
-This is a free document; you can redistribute it and/or
-modify it under the terms of the GNU General Public License as
-published by the Free Software Foundation; either version 2, or
-(at your option) any later version.You may obtain a copy of the
-GNU General Public License from the Free Software Foundation
-by visiting their Web site or by writing to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA.
-
-@menu
-* Introduction::
-
-* Tutorials::
-
-* Development::
-
-* Datatype Index::
-
-* Function Index::
-@end menu
-@end ifinfo
-
-@node Introduction, Tutorials, ,Top
-@chapter Introduction
-
-iksemel is an XML (eXtensible Markup Language) parser library
-designed for Jabber applications. It is coded in ANSI C for POSIX
-compatible environments, thus highly portable. It is free software
-released under the GNU Lesser General Public License.
-
-The purprose of this manual is to tell you how to use the facilities
-of the iksemel library. Manual is written with the assumption that you
-are familiar with the C programming language, basic programming
-concepts, XML and Jabber protocol.
-
-@section Compiling the Library
-
-You need to install MinGW (@url{http://mingw.org}) under Windows to be able
-to compile iksemel. Although not tested by the author, Cygwin should
-work equally well.
-
-Library can be built with:
-
-@example
-./configure
-make
-@end example
-
-If you want to make a self test:
-
-@example
-make test
-@end example
-
-Now you can install it with:
-
-@example
-make install
-@end example
-
-
-@section Using iksemel in Applications
-
-You need to include @file{iksemel.h} file in your source to access library API.
-You can do this with:
-
-@code{#include "iksemel.h"}
-
-Now you can use iksemel functions and compile your source. In able to link
-your compiled object files and generate your executable program, you have to
-link with iksemel library. This can be done with:
-
-@example
-gcc -o myprg src1.o src2.o src3.o -liksemel
-@end example
-
-iksemel registers itself with pkg-config while installing, so if you are using
-autotools in your program, you can simply check the availability of iksemel
-and configure your build process accordingly with:
-
-@example
-PKG_CHECK_MODULES(IKSEMEL,iksemel,,exit)
-@end example
-
-This would result in IKSEMEL_LIBS and IKSEMEL_CFLAGS substitution variables
-set to correct values.
-
-@node Tutorials,Development,Introduction,Top
-@chapter Tutorials
-
-@ifinfo
-@menu
-* Parsing an XML Document::
-
-* Working with XML Trees::
-
-* XML Streams::
-
-* Writing a Jabber Client::
-
-* Utility Functions::
-@end menu
-@end ifinfo
-
-
-@comment ============================================================
-@node Parsing an XML Document,Working with XML Trees,,Tutorials
-@section Parsing an XML Document
-
-iksemel parser sequentally processes the XML document. Each encountered XML
-element (i.e. tags, character data, comments, processing instructions, etc.)
-is reported to your application by calling the hook functions you have provided.
-This type of interface is called SAX (serial access) interface.
-
-@tindex iksparser
-Parser stores its state in a small structure. This structure is referenced by
-@code{iksparser} type, and managed with following functions:
-
-@deftypefun iksparser* iks_sax_new (void* @var{user_data}, iksTagHook* @var{tagHook}, iksCDataHook* @var{cdataHook});
-This function allocates and initializes a parser structure. If allocation fails,
-NULL value is returned. @var{user_data} is passed directly to hook functions.
-@end deftypefun
-
-@deftp Typedef iksTagHook
-int iksTagHook (void* @var{user_data}, char* @var{name}, char** @var{atts}, int @var{type});
-
-This function is called when a tag parsed. @var{name} is the name of the tag. If tag has
-no attributes @var{atts} is NULL, otherwise it contains a null terminated list of
-pointers to tag's attributes and their values. If return value isn't @code{IKS_OK},
-it is passed immediately to the caller of the @code{iks_parse}.
-
-@var{type} is one of the following:
-@table @code
-@item IKS_OPEN
-Opening tag, i.e. <tag attr='value'>
-@item IKS_CLOSE
-Closing tag, i.e. </tag>
-@item IKS_SINGLE
-Standalone tag, i.e. <tag attr='value'/>
-@end table
-@end deftp
-
-@deftp Typedef iksCDataHook
-int iksCDataHook (void* @var{user_data}, char* @var{data}, size_t @var{len});
-
-@var{data} is a pointer to the character data. Encoding is UTF-8 and it isn't terminated
-with a null character. Size of the data is given with @var{len} in bytes. This function
-can be called several times with smaller sized data for a single string. If
-return value isn't @code{IKS_OK}, it is passed immediately to the caller of the
-@code{iks_parse}.
-@end deftp
-
-@deftypefun int iks_parse (iksparser* @var{prs}, char *@var{data}, size_t @var{len}, int @var{finish});
-You give XML document to the parser with this function. @var{data}
-is a @var{len} bytes string. If @var{len} is zero, data must be a null
-terminated string.
-
-If @var{finish} value is zero, parser waits for more data later. If you
-want to finish parsing without giving data, call it like:
-@example
-iks_parse (my_parser, NULL, 0, 1);
-@end example
-
-You should check the return value for following conditions:
-@table @code
-@item IKS_OK
-There isn't any problem.
-@item IKS_NOMEM
-Not enough memory.
-@item IKS_BADXML
-Document is not well-formed.
-@item IKS_HOOK
-Your hook decided that there is an error.
-@end table
-@end deftypefun
-
-@deftypefun void iks_parser_delete (iksparser* @var{prs});
-This function frees parser structure and associated data.
-@end deftypefun
-
-Now we have learned how to create and use a sax parser. Lets parse a simple
-XML document. Write following code into a @file{test.c} file.
-
-@smallexample
-#include <stdio.h>
-#include <iksemel.h>
-
-int pr_tag (void *udata, char *name, char **atts, int type)
-@{
-    switch (type) @{
-        case IKS_OPEN:
-            printf ("TAG <%s>\n", name);
-            break;
-        case IKS_CLOSE:
-            printf ("TAG </%s>\n", name);
-            break;
-        case IKS_SINGLE:
-            printf ("TAG <%s/>\n", name);
-            break;
-    @}
-    if (atts) @{
-        int i = 0;
-        while (atts[i]) @{
-            printf ("  ATTRIB %s='%s'\n", atts[i], atts[i+1]);
-            i += 2;
-        @}
-    @}
-    return IKS_OK;
-@}
-
-enum ikserror pr_cdata (void *udata, char *data, size_t len)
-@{
-    int i;
-    printf ("CDATA [");
-    for (i = 0; i < len; i++)
-        putchar (data[i]);
-    printf ("]\n");
-    return IKS_OK;
-@}
-
-int main (int argc, char *argv[])
-@{
-    iksparser *p;
-    p = iks_sax_new (NULL, pr_tag, pr_cdata);
-    switch (iks_parse (p, argv[1], 0, 1)) @{
-        case IKS_OK:
-            puts ("OK");
-            break;
-        case IKS_NOMEM:
-            puts ("Not enough memory");
-            exit (1);
-        case IKS_BADXML:
-            puts ("XML document is not well-formed");
-            exit (2);
-        case IKS_HOOK:
-            puts ("Our hooks didn't like something");
-            exit (2);
-    @}
-    iks_parser_delete (p);
-    return 0;
-@}
-@end smallexample
-
-Now compile and test it with:
-
-@example
-gcc -o test test.c -liksemel
-./test "<test>Hello<br/>World!</test>"
-./test "<lala a='12' b='42'/>"
-@end example
-
-@heading Error Handling
-
-XML standart states that once an error is detected, the processor must not continue
-normal processing (i.e. it must not pass character data or markup information to
-the application). So iksemel stops processing immediately when it encounters a
-syntax error, or one of your hook functions return any one value than @code{IKS_OK},
-and @code{iks_parse} function returns with the error code.
-
-Since it is useful for debugging, iksemel provides functions to get position of
-the error. Position is usually at the starting character for syntax errors. Since
-your hooks are called after whole element (i.e. markup or character data) is
-passed, position is at the end of the erroneous element for @code{IKS_HOOK} errors.
-
-@deftypefun {unsigned long} iks_nr_bytes (iksparser* @var{prs});
-Returns how many number of bytes parsed.
-@end deftypefun
-
-@deftypefun {unsigned long} iks_nr_lines (iksparser* @var{prs});
-Returns how many number of lines parsed.
-@end deftypefun
-
-If you want to parse another document with your parser again, you should use
-the following function to reset your parser.
-
-@deftypefun void iks_parser_reset (iksparser* @var{prs});
-Resets the parser's internal state.
-@end deftypefun
-
-
-@comment ============================================================
-@node Working with XML Trees,XML Streams,Parsing an XML Document,Tutorials
-@section Working with XML Trees
-
-SAX interface uses very little memory, but it forces you to access XML
-documents sequentally. In many cases you want to keep a tree like
-representation of XML document in memory and want to access and
-modify its content randomly.
-
-iksemel provides functions for efficiently creating such trees either
-from documents or programmaticaly. You can access and modify this
-tree and can easily generate a new XML document from the tree.
-
-This is called DOM (Document Object Model) interface.
-
-@ifinfo
-@menu
-* Memory Management::
-
-* Creating a Tree::
-
-* Accessing the Tree::
-
-* Converting a Tree into an XML Document::
-
-* Parsing an XML Document into a Tree::
-@end menu
-@end ifinfo
-
-
-@comment ============================================================
-@node Memory Management,Creating a Tree,,Working with XML Trees
-@subsection Memory Management
-
-Since keeping whole document content uses a lot of memory and requires
-many calls to OS's memory allocation layer, iksemel uses a simple object
-stack system for minimizing calls to the @code{malloc} function and releasing
-all the memory associated with a tree in a single step.
-
-A parsed XML tree contains following objects:
-@table @samp
-@item Nodes
-These are basic blocks of document. They can contain a tag, attribute pair
-of a tag, or character data. Tag nodes can also contain other nodes as
-children. Node structure has a small fixed size depending on the node type.
-@item Names
-Names of tags and attributes. They are utf-8 encoded small strings.
-@item Character Data
-They are similar to names but usually much bigger.
-@end table
-
-iksemel's object stack has two separate areas for keeping these data objects.
-Meta chunk contains all the structures and aligned data, while the data chunk
-contains strings. Each chunk starts with a choosen size memory block, then
-when necessary more blocks allocated for providing space. Unless there is a big
-request, each block is double the size of the previous block, thus real memory
-needs are quickly reached without allocating too many blocks, or wasting
-memory with too big blocks.
-
-@deftp Typedef ikstack
-This is a structure defining the object stack. Its fields are private
-and subject to change with new iksemel releases.
-@end deftp
-
-@deftypefun {ikstack *} iks_stack_new (size_t @var{meta_chunk}, size_t @var{data_chunk});
-Creates an object stack. @var{meta_chunk} is the initial size of the
-data block used for structures and aligned data. @var{data_chunk} is
-the initial size of the data block used for strings. They are both in byte units.
-
-These two initial chunks and a small object stack structure is allocated in
-one @code{malloc} call for optimization purproses.
-@end deftypefun
-
-@deftypefun {void *} iks_stack_alloc (ikstack * @var{stack}, size_t @var{size});
-Allocates @var{size} bytes of space from the object stack's meta chunk.
-Allocated space is aligned on platform's default alignment boundary and
-isn't initialized. Returns a pointer to the space, or NULL if there isn't enough
-space available and allocating a new block fails.
-@end deftypefun
-
-@deftypefun {void *} iks_stack_strdup (ikstack * @var{stack}, const char * @var{src}, size_t @var{len});
-Copies given string @var{src} into the object stack's data chunk. Returns a
-pointer to the new string, or NULL if there isn't enough space in the stack.
-If @var{len} is zero string must be null terminated.
-@end deftypefun
-
-@deftypefun void iks_stack_delete (ikstack * @var{stack});
-Gives all memory associated with object stack to the system.
-@end deftypefun
-
-Since character data sections are usually parsed in separate blocks,
-a growable string implementation is necessary for saving memory.
-
-@deftypefun {char *} iks_stack_strcat (ikstack *@var{stack}, char *@var{old}, size_t @var{old_len}, const char *@var{src}, size_t @var{src_len});
-This function appends the string @var{src} to the string @var{old} in the
-stack's data chunk. If  @var{old} is NULL it behaves like @code{iks_stack_strdup}.
-Otherwise @var{old} has to be a string created with @code{iks_stack_strdup}
-or @code{iks_stack_strcat} functions.
-
-If @var{old_len} or @var{src_len} is zero, corresponding string must be null
-terminated.
-
-Since string can be moved into another block of the data chunk, you must use the
-returned value for new string, and must not reference to @var{old} anymore.
-Return value can be NULL if there isn't enough space in stack, and allocating a
-new block fails.
-@end deftypefun
-
-
-@comment ============================================================
-@node Creating a Tree,Accessing the Tree,Memory Management,Working with XML Trees
-@subsection Creating a Tree
-
-@deftp Typedef iks
-This is a structure defining a XML node. Its fields are private and only
-accessed by following functions.
-@end deftp
-
-@deftypefun iks* iks_new (const char *@var{name});
-Creates an object stack and creates a IKS_TAG type of node with given
-tag name inside the stack. Tag name is also copied into the stack.
-Returns the node pointer, or NULL if there isn't enough memory.
-@end deftypefun
-
-@deftypefun iks* iks_new_within (const char *@var{name}, ikstack* @var{stack});
-Creates a IKS_TAG type of node with the given tag name. Node and tag
-name is allocated inside the given object stack. Returns the node
-pointer, or NULL if there isn't enough memory.
-@end deftypefun
-
-@deftypefun iks* iks_insert (iks *@var{x}, const char *@var{name});
-Creates a IKS_TAG type of node with the given tag name. Node and tag
-name is allocated inside the @var{x} node's object stack and linked
-to @var{x} as a child node. Returns the node pointer, or NULL if there
-isn't enough memory.
-@end deftypefun
-
-@deftypefun iks* iks_insert_cdata (iks* @var{x}, const char* @var{data}, size_t @var{len});
-Creates a IKS_CDATA type of node with given character data. Node is
-allocated inside the @var{x} node's object stack and linked to @var{x}
-as a child node. Data is copied as well. If @var{len} is zero data must
-be a null terminated string. Returns the node pointer, or NULL if
-there isn't enough memory.
-@end deftypefun
-
-@deftypefun iks* iks_insert_attrib (iks* @var{x}, const char* @var{name}, const char* @var{value});
-Creates a IKS_ATTRIBUTE type of node with given attribute name and the
-value. Node is allocated inside the @var{x} node's object stack and
-linked to @var{x} as an attribute node. Attribute name and value is
-copied as well. Returns the node pointer, or NULL if there isn't
-enough memory.
-
-Reinserting another value with same attribute name changes an attribute's
-value. If @var{value} is NULL, attribute is removed from the tag.
-@end deftypefun
-
-@deftypefun iks* iks_insert_node (iks* @var{x}, iks* @var{y});
-Links node @var{y} to node @var{x} as a child node. Nodes are not copied
-between object stacks, be careful.
-@end deftypefun
-
-@deftypefun void iks_hide (iks *@var{x});
-Changes the links of the other nodes so that @var{x} becomes invisible.
-It stays in the same object stack with neighbour nodes, be careful.
-@end deftypefun
-
-@deftypefun void iks_delete (iks *@var{x});
-Frees the object stack of the node @var{x}.
-@end deftypefun
-
-Now lets create a tree representation of following XML document:
-
-@example
-<message type='chat' from='bob@@bd.com'>
-<subject>song lyric</subject><priority>high</priority>
-<body>
-<em style='underline'>here is the correct version:</em>
-i just don't see why i should even care
-it's not dark yet, but it's getting there
-</body>
-</message>
-@end example
-
-here is the code:
-
-@example
-iks *x, *y, *z;
-
-x = iks_new ("message");
-iks_insert_attrib (x, "type", "chat");
-iks_insert_attrib (x, "from", "bob@@bd.com");
-iks_insert_cdata (x, "\n", 1);
-iks_insert_cdata (iks_insert (x, "subject"), "song lyric", 10);
-iks_insert_cdata (iks_insert (x, "priority"), "high", 4);
-iks_insert_cdata (x, "\n", 1);
-y = iks_insert (x, "body");
-iks_insert_cdata (y, "\n", 1);
-z = iks_insert (y, "em");
-iks_insert_attrib (z, "style", "underline");
-iks_insert_cdata (z, "here is the correct version", 0);
-iks_insert_cdata (y, "\n", 1);
-iks_insert_cdata (y, "i just don't see why", 0);
-iks_insert_cdata (y, "i should even care\n", 0);
-iks_insert_cdata (y, "it's not dark yet,", 0);
-iks_insert_cdata (y, "but it's getting there\n", 0);
-iks_insert_cdata (x, "\n", 1);
-@end example
-
-Notice how newlines are inserted for proper formatting of document. They aren't
-necessary for representing data, but they make it easier to read document for
-humans.
-
-Also notice how @code{iks_insert} and @code{iks_insert_cdata} chained.
-
-There are also functions for duplicating xml trees. They are:
-
-@deftypefun {iks *} iks_copy (iks* @var{x});
-Creates a full copy of the tree in a newly created object stack.
-@end deftypefun
-
-@deftypefun {iks *} iks_copy_within (iks* @var{x}, ikstack *@var{s});
-Creates a full copy of the tree in given object stack.
-@end deftypefun
-
-@comment ============================================================
-@node Accessing the Tree,Converting a Tree into an XML Document,Creating a Tree,Working with XML Trees
-@subsection Accessing a Tree
-
-Basic access functions allow you to move on the tree:
-
-@deftypefun iks* iks_next (iks* @var{x});
-@end deftypefun
-@deftypefun iks* iks_prev (iks* @var{x});
-@end deftypefun
-@deftypefun iks* iks_parent (iks* @var{x});
-@end deftypefun
-@deftypefun iks* iks_child (iks* @var{x});
-@end deftypefun
-@deftypefun iks* iks_attrib (iks* @var{x});
-@end deftypefun
-
-These functions return a pointer to the next, previous, parent, first child,
-and first attribute node of the given node @var{x}. If that node doesn't
-exist or @var{x} is NULL, a NULL value is returned.
-
-@deftypefun {iks *} iks_root (iks *@var{x});
-Returns the topmost parent node of the @var{x}.
-@end deftypefun
-
-@deftypefun iks* iks_next_tag (iks* @var{x});
-@end deftypefun
-@deftypefun iks* iks_prev_tag (iks* @var{x});
-@end deftypefun
-@deftypefun iks* iks_first_tag (iks* @var{x});
-@end deftypefun
-
-These functions return a pointer to the next, previous, first child node
-of the given node @var{x}. Only tag nodes are considered, other type
-of the nodes are skipped. If such a node doesn't exist or @var{x} is NULL,
-a NULL value is returned.
-
-Another group of functions allow you to access specific information and
-content of the nodes:
-
-@deftypefun ikstack* iks_stack (iks* @var{x});
-Returns the object stack which node @var{x} stays.
-@end deftypefun
-
-@deftypefun {enum ikstype} iks_type (iks* @var{x});
-Returns the type of the node.
-
-@tindex ikstype
-@table @code
-@item IKS_TAG
-Node is a tag and can contain child nodes and attributes.
-@item IKS_CDATA
-Node contains character data.
-@item IKS_ATTRIBUTE
-Node contains an attribute and its value.
-@end table
-@end deftypefun
-
-@deftypefun char* iks_name (iks* @var{x});
-Returns the name of the tag for nodes with the type @var{IKS_TAG}.
-Returns an attribute's name for nodes of type IKS_ATTRIBUTE.
-@end deftypefun
-
-@deftypefun char* iks_cdata (iks* @var{x});
-Returns a pointer to node's character data if available, NULL otherwise.
-Returns an attribute's value for nodes of type IKS_ATTRIBUTE.
-@end deftypefun
-
-@deftypefun size_t iks_cdata_size (iks *@var{x});
-Returns the size of the node's character data in bytes.
-@end deftypefun
-
-@deftypefun int iks_has_children (iks *@var{x});
-Returns a non-zero value if node @var{x} has a child node.
-@end deftypefun
-
-@deftypefun int iks_has_attribs (iks *@var{x});
-Returns a non-zero value if node @var{x} has attributes.
-@end deftypefun
-
-Last group of the functions simplifies finding and accessing the content
-of a specific node:
-
-@deftypefun iks* iks_find (iks *@var{x}, const char *@var{name});
-Searches a IKS_TAG type of node with @var{name} as tag name in child
-nodes of @var{x}. Returns a pointer to the node if found, NULL otherwise.
-@end deftypefun
-
-@deftypefun char* iks_find_cdata (iks* @var{x}, const char* @var{name});
-Searches a IKS_TAG type of node with @var{name} as tag name in child
-nodes of @var{x}. Returns a pointer to the character data of the node's
-first child node if found, NULL otherwise.
-@end deftypefun
-
-@deftypefun char* iks_find_attrib (iks* @var{x}, const char* @var{name});
-Searches an attribute with given name in attributes of the @var{x}.
-Returns a pointer to attribute value if found, NULL otherwise.
-@end deftypefun
-
-@deftypefun {iks *} iks_find_with_attrib (iks *@var{x}, const char *@var{tagname}, const char *@var{attrname}, const char *@var{value});
-Searches for a child tag of @var{x} which has an attribute with name
-@var{attrname} and value @var{value}. If @var{tagname} isn't NULL,
-name of the tag must also match. Returns a pointer to the node if found,
-NULL otherwise.
-@end deftypefun
-
-Here is an example which demonstrates accessing file names in a fictitious
-XML playlist file:
-
-@example
-<playlist>
-    <item type='mpg'>
-        <name>/home/madcat/download/matrix_rev_trailer.mpg</name>
-        <duration>1:17</duration>
-    </item>
-    <item type='rm'>
-        <name>/home/madcat/anim/clementine_ep1.rm</name>
-        <duration>22:00</duration>
-    </item>
-    <item type='avi'>
-        <name>/home/madcat/anim/futurama/ep101.avi</name>
-        <subtitle>/home/madcat/subs/futurama/ep101.txt</subtitle>
-        <duration>30:00</duration>
-    </item>
-    <repeat/>
-    <fullscreen/>
-    <noui/>
-</playlist>
-@end example
-
-and here is the code:
-
-@example
-#include <stdio.h>
-#include <iksemel.h>
-
-int main (int argc, char *argv[])
-@{
-    iks *x, *y;
-    int e;
-
-    if (argc < 2) @{
-        printf ("usage: %s <playlistfile>", argv[0]);
-        return 0;
-    @}
-    e = iks_load (argv[1], &x);
-    if (e != IKS_OK) @{
-       printf ("parse error %d\n", e);
-        return 1;
-    @}
-    if (iks_find (x, "repeat")) puts ("repeat mode enabled");
-    y = iks_child (x);
-    while (y) @{
-        if (iks_type (y) == IKS_TAG
-            && strcmp (iks_name (y), "item") == 0) @{
-               printf ("Filename: [%s]\n", iks_find_cdata (y, "name"));
-        @}
-        y = iks_next (y);
-     @}
-    iks_delete (x);
-    return 0;
-@}
-@end example
-
-
-@comment ============================================================
-@node Converting a Tree into an XML Document,Parsing an XML Document into a Tree,Accessing the Tree,Working with XML Trees
-@subsection Converting a Tree to an XML Document
-
-There is a function for converting given XML tree into a null terminated string.
-
-@deftypefun {char *} iks_string (ikstack* @var{stack}, iks* @var{x});
-Converts given tree into a string. String is created inside the given object
-stack. Returns a pointer to the string, or NULL if there isn't enough memory
-available.
-
-If @var{stack} is NULL, string is created inside an @code{iks_malloc}ed buffer.
-You can free it later with @code{iks_free} function.
-@end deftypefun
-
-Here is an example which builds a tree and print it.
-
-@example
-iks *x;
-char *t;
-
-x = iks_new ("test");
-iks_insert_cdata (iks_insert (x, "a"), "1234", 4);
-iks_insert (x, "br");
-iks_insert_cdata (x, "1234", 4);
-t = iks_string (iks_stack (x), x);
-puts (t);
-iks_delete (x);
-@end example
-
-
-@comment ============================================================
-@node Parsing an XML Document into a Tree,,Converting a Tree into an XML Document,Working with XML Trees
-@subsection Parsing a Document into a Tree
-
-If you want to automatically convert an XML document into a tree, you can use
-iksemel's DOM parser. It is created with following function:
-
-@deftypefun iksparser* iks_dom_new (iks **@var{iksptr});
-Creates a DOM parser. A pointer to the created XML tree is put into the
-variable pointed by @var{iksptr}. Returns a pointer to the parser, or NULL
-is there isn't enough memory.
-@end deftypefun
-
-Usage is same as SAX parser. You feed the data with @code{iks_parse}, and if
-there isn't an error, you can access to your tree from variable @code{*iksptr}.
-
-Here is a simple example:
-
-@example
-iks *x;
-iksparser *p;
-
-p = iks_dom_new (&x);
-if (IKS_OK != iks_parse (p, "<a>bcd</a>", 9, 1)) @{
-    puts ("parse error");
-@}
-/* x is useable after that point */
-
-/* this will print 'bcd' */
-printf ("%s\n", iks_cdata (iks_child (x)));
-@end example
-
-If you know the size of the file ahead, or you have an approximate idea,
-you can tell this to the dom parser for choosing a better memory allocation
-strategy. Here is the function for this.
-
-@deftypefun void iks_set_size_hint (iksparser *@var{prs}, size_t @var{approx_size});
-Parser @var{prs} must be a dom type parser. @var{approx_size} is the
-expected size of the xml document. Parser chooses its chunk size
-based on this information. Helps performance while processing big files.
-@end deftypefun
-
-If you already have your XML document in memory, you can simply parse
-it with:
-
-@deftypefun {iks *} iks_tree (const char *@var{xml_str}, size_t @var{len}, int *@var{err});
-This function parses the buffer pointed by @var{xml_str}. If @var{len} is zero
-buffer is considered as a null terminated utf8 string. Returns the parsed tree,
-or NULL if there is an error. If @var{err} is not NULL, actual error code (returned
-by iks_parse) is put there.
-@end deftypefun
-
-Most of the times you want to load your configuration (or similar) files directly
-into trees. iksemel provides two functions to greatly simplify this:
-
-@deftypefun int iks_load (const char *@var{fname}, iks **@var{xptr});
-Loads the XML file. Tree is placed into the variable pointed by @var{xptr}.
-@end deftypefun
-
-@deftypefun int iks_save (const char *@var{fname}, iks *@var{x});
-Converts tree @var{x} into a string and saves to the file.
-@end deftypefun
-
-Both functions return same error codes as @code{iks_parse}. Some additional
-error codes are defined for indicating file problems. They are:
-
-@table @code
-@item IKS_FILE_NOFILE
-A file with the given name doesn't exist.
-@item IKS_FILE_NOACCESS
-Cannot open file. Possibly a permission problem.
-@item IKS_FILE_RWERR
-Read or write operation failed.
-@end table
-
-Here is a simple example which parses a file and saves it into another:
-
-@example
-iks *x;
-
-if (IKS_OK != iks_load ("file1.xml", &x)) @{
-    puts ("loading error");
-@}
-if (IKS_OK != iks_save ("file2.xml", x)) @{
-    puts ("saving error");
-@}
-@end example
-
-
-@comment ============================================================
-@node XML Streams,Writing a Jabber Client,Working with XML Trees,Tutorials
-@section XML Streams
-
-XML streams function as containers for any XML chunks sent asynchronously
-between network endpoints. They are used for asyncronously exchanging
-relatively small payload of structured information between entities.
-
-A stream is initiated by one of hosts connecting to the other, and sending a
-<stream:stream> tag. Receiving entity replies with a second XML stream
-back to the initiating entity within the same connection. Each unit of
-information is send as a direct child tag of the <stream:stream> tag.
-Stream is closed with </stream:stream>.
-
-XML streams use a subset of XML. Specifically they should not contain
-processing instructions, non-predefined entities, comments, or DTDs.
-
-Jabber protocol uses XML streams for exchanging messages, presence
-information, and other information like authorization, search, time and
-version queries, protocol extensions.
-
-iksemel provides you a stream parser, which automatically handles connection
-to the server, and calls your hook function with incoming information
-parsed and converted to an XML tree.
-
-You can create such a parser with:
-
-@deftypefun iksparser* iks_stream_new (char* @var{name_space}, void* @var{user_data}, iksStreamHook* @var{streamHook});
-Allocates and initalizes a stream parser. @var{name_space} indicates the
-stream type, jabber clients use "jabber:client" namespace. @var{user_data}
-is passed directly to your hook function.
-@end deftypefun
-
-@deftp Typedef iksStreamHook
-int iksStreamHook (void* @var{user_data}, int @var{type}, iks* @var{node});
-
-Depending on the value of the @var{type}, @var{node} contains:
-@table @code
-@item IKS_NODE_START
-Got the <stream:stream> tag, namespace, stream id and other information
-is contained in the @var{node}.
-@item IKS_NODE_NORMAL
-A first level child of the <stream:stream> tag is received. @var{node} contains
-the parsed tag. If you are connected to a jabber server, you can get <message>,
-<presence>, or <iq> tags.
-@item IKS_NODE_ERROR
-Got a <stream:error> tag, details can be accessed from @var{node}.
-@item IKS_NODE_STOP
-</stream:stream> tag is received or connection is closed, @var{node} is @code{NULL}.
-@end table
-
-Freeing the node with @code{iks_delete} is up to you.
-@end deftp
-
-You can manually feed this parser with @code{iks_parse} function, but using
-iksemel's connection facilities is easier for most of the cases.
-
-This functions return @code{IKS_OK} for success. Error codes of @code{iks_parse}
-are used in same manner. Following additional codes are defined for
-network related problems:
-
-@table @code
-@item IKS_NET_NODNS
-Hostname lookup failed. Possible reasons: hostname is incorrect,
-you are not online, your dns server isn't accessible.
-@item IKS_NET_NOSOCK
-Socket cannot created.
-@item IKS_NET_NOCONN
-Connection attemp failed. Possible reasons: host is not an XML stream
-server, port number is wrong, server is busy or closed for the moment.
-@item IKS_NET_RWERR
-@code{send} or @code{recv} call is failed when attempting to exchange
-the data with the server. You should close the connection with @code{iks_disconnect}
-after getting this error from data transfer functions.
-@end table
-
-@deftypefun int iks_connect_tcp (iksparser *@var{prs}, const char *@var{server}, int @var{port});
-This function connects the parser to a server and sends stream header for you.
-@var{server} is the host name of the server and @var{port} is the tcp port
-number which server is listening to. You can use @code{IKS_JABBER_PORT}
-macro for the default jabber client port (5222).
-@end deftypefun
-
-@deftypefun int iks_connect_fd (iksparser *@var{prs}, int @var{fd});
-Attaches parser to an already opened connection. @var{fd} is the socket
-descriptor. Note that @code{iks_disconnect} doesn't close the socket
-for this kind of connection, opening and closing of the socket is up to your
-application. Stream header is not sent automatically. You can use
-@code{iks_send_header} function for sending it.
-@end deftypefun
-
-@deftypefun void iks_disconnect (iksparser *@var{prs});
-Closes connection to the server, and frees connection resources.
-@end deftypefun
-
-After successfully connecting to a server, you can use following functions
-for exchanging information with server.
-
-@deftypefun int iks_recv (iksparser* @var{prs}, int @var{timeout});
-If @var{timeout} is @code{-1}, waits until some data arrives from server,
-and process the data. Your stream hook can be called if a complete
-chunk is arrived.
-
-If @var{timeout} is a positive integer, @code{iks_recv} returns if no data
-arrives for @var{timeout} seconds.
-
-If @var{timeout} is zero, @code{iks_recv} checks if there is any data
-waiting at the network buffer, and returns without waiting for data.
-@end deftypefun
-
-@deftypefun int iks_fd (iksparser* @var{prs});
-Returns the file descriptor of the connected socket. You can use this in
-your @code{select} function or some other input loop to act whenever
-some data from the server arrives. This value of only valid between
-a successful @code{iks_connect_tcp} and @code{iks_disconnect}.
-@end deftypefun
-
-@deftypefun int iks_send (iksparser* @var{prs}, iks* @var{x});
-Converts the tree given in @var{x} to a string, and sends to the server.
-String is created inside the object stack of @var{x}.
-@end deftypefun
-
-@deftypefun int iks_send_raw (iksparser* @var{prs}, char* @var{xmlstr});
-Sends the string given in @var{xmlstr} to the server.
-@end deftypefun
-
-@deftypefun int iks_send_header (iksparser *@var{prs}, char *@var{to});
-Sends the stream header. @var{to} is the name of the server.
-Normally @code{iks_connect_tcp} function calls this for you. This
-is only useful if you are using @code{iks_connect_fd}.
-@end deftypefun
-
-Sometimes it is useful to log incoming and outgoing data to your parser
-for debugging your applications. iksemel provides a logging facility for you.
-
-@deftypefun void iks_set_log_hook (iksparser* @var{prs}, iksLogHook* @var{logHook});
-Sets the log function for your stream parser. You can't use this function
-on any other type of parser.
-@end deftypefun
-
-@deftp Typedef iksLogHook
-void iksLogHook (void* @var{user_data}, const char* @var{data}, size_t @var{size}, int @var{is_incoming});
-
-@var{user_data} is same value which you give with @code{iks_stream_new}.
-@var{data} is @var{size} bytes of data. Be very careful that this data may be
-coming from other side of the connection and can contain malicius bytes. It isn't
-checked by iksemel yet, so you should check it yourself before displaying or
-passing to other systems in your application or computer. If @var{is_incoming}
-is a non-zero value, data is incoming from server, otherwise it is outgoing to the
-server.
-@end deftp
-
-
-@comment ============================================================
-@node Writing a Jabber Client,Utility Functions,XML Streams,Tutorials
-@section Writing a Jabber Client
-
-@ifinfo
-@menu
-* Security::
-
-* Packets::
-
-* Packet Filter::
-
-* Creating Common Packets::
-
-@end menu
-@end ifinfo
-
-@comment ============================================================
-@node Security,Packets,,Writing a Jabber Client
-@subsection Security
-
-iksemel supports TLS protocol for encrypted communication and SASL
-protocol for authentication. TLS is handled by gnutls library.
-
-@deftypefun int iks_has_tls (void);
-If iksemel is compiled with gnutls library, this function returns a non-zero
-value indicating you can try encrypted connection with the server.
-@end deftypefun
-
-@deftypefun int iks_start_tls (iksparser* @var{prs});
-Starts a TLS handshake over already connected parser. Returns IKS_OK or
-one of the IKS_NET_ errors. If handshake succeeds you'll get another
-stream header from server.
-@end deftypefun
-
-@deftypefun int iks_is_secure (iksparser* @var{prs});
-Returns a non-zero value if a secure connection is fully established
-between server.
-@end deftypefun
-
-@deftypefun int iks_start_sasl (iksparser* @var{prs}, enum ikssasltype @var{type}, char* @var{username}, char* @var{pass});
-Starts SASL operation.
-@end deftypefun
-
-See tools/iksroster.c for a good example.
-
-@comment ============================================================
-@node Packets,Packet Filter,Security,Writing a Jabber Client
-@subsection Packets
-
-iksemel can parse a jabber XML node and provide you a public packet
-structure which contains information like node type and subtype, id,
-namespace, sender's jabber id, etc.
-
-This handles a lot of node parsing for you. Packets are also used in
-the packet filter subsystem.
-
-@deftypefun {ikspak *} iks_packet (iks *@var{x});
-Takes a node from stream and extracts information from it to a packet structure.
-Structure is allocated inside the node's object stack.
-@end deftypefun
-
-@tindex ikspak
-@code{ikspak} structure has following fields:
-
-@table @code
-@item iks *x;
-This is a pointer to the node.
-@item iksid *from;
-Sender's jabber id in parsed form. See below for @code{iksid} structure.
-@item iks *query;
-A pointer to the <query> tag for IQ nodes.
-@item char *ns;
-Namespace of the content for IQ nodes.
-@item char *id;
-ID of the node.
-@item enum ikspaktype type;
-Type of the node. Possible types are:
-
-@table @code
-@item IKS_PAK_NONE
-Unknown node.
-@item IKS_PAK_MESSAGE
-Message node.
-@item IKS_PAK_PRESENCE
-Presence node with presence publishing operation.
-@item IKS_PAK_S10N
-Presence node with subscription operation.
-@item IKS_PAK_IQ
-IQ node.
-@end table
-@item enum iksubtype subtype;
-Sub type of the node. Sub types for message nodes:
-
-@table @code
-@item IKS_TYPE_NONE
-A normal message.
-@item IKS_TYPE_CHAT
-Private chat message.
-@item IKS_TYPE_GROUPCHAT
-Multi user chat message.
-@item IKS_TYPE_HEADLINE
-Message from a news source.
-@item IKS_TYPE_ERROR
-Message error.
-@end table
-
-Sub types for IQ nodes:
-
-@table @code
-@item IKS_TYPE_GET
-Asks for some information.
-@item IKS_TYPE_SET
-Request for changing information.
-@item IKS_TYPE_RESULT
-Reply to get and set requests.
-@item IKS_TYPE_ERROR
-IQ error.
-@end table
-
-Sub types for subscription nodes:
-
-@table @code
-@item IKS_TYPE_SUBSCRIBE,
-Asks for subscribing to the presence.
-@item IKS_TYPE_SUBSCRIBED,
-Grants subscription.
-@item IKS_TYPE_UNSUBSCRIBE,
-Asks for unsubscribing to the presence.
-@item IKS_TYPE_UNSUBSCRIBED,
-Cancels subscription.
-@item IKS_TYPE_ERROR
-Presence error.
-@end table
-
-Sub types for presence nodes:
-
-@table @code
-@item IKS_TYPE_PROBE,
-Asks presence status.
-@item IKS_TYPE_AVAILABLE,
-Publishes entity as available. More information can be found in @code{show} field.
-@item IKS_TYPE_UNAVAILABLE
-Publishes entity as unavailable. More information can be found in @code{show} field.
-@end table
-@item enum ikshowtype show;
-Presence state for the presence nodes.
-
-@table @code
-@item IKS_SHOW_UNAVAILABLE
-Entity is unavailable.
-@item IKS_SHOW_AVAILABLE
-Entity is available.
-@item IKS_SHOW_CHAT
-Entity is free for chat.
-@item IKS_SHOW_AWAY
-Entity is away for a short time.
-@item IKS_SHOW_XA
-Entity is away for a long time.
-@item IKS_SHOW_DND
-Entity doesn't want to be disturbed.
-@end table
-@end table
-
-iksemel has two functions to parse and compare jabber IDs.
-
-@deftypefun {iksid *} iks_id_new (ikstack *@var{s}, const char *@var{jid});
-Parses a jabber id into its parts. @code{iksid} structure is created inside
-the @var{s} object stack.
-@end deftypefun
-
-@tindex iksid
-@code{iksid} structure has following fields:
-
-@table @code
-@item char *user;
-User name.
-@item char *server;
-Server name.
-@item char *resource;
-Resource.
-@item char *partial;
-User name and server name.
-@item char *full;
-User name, server name and resource.
-@end table
-
-You can access this fields and read their values. Comparing two parsed jabber
-ids can be done with:
-
-@deftypefun int iks_id_cmp (iksid *@var{a}, iksid *@var{b}, int @var{parts});
-Compares @var{parts} of @var{a} and @var{b}. Part values are:
-
-@table @code
-@item IKS_ID_USER
-@item IKS_ID_SERVER
-@item IKS_ID_RESOURCE
-@end table
-
-@sp 1
-You can combine this values with @code{or} operator. Some common combinations
-are predefined for you:
-
-@table @code
-@item IKS_ID_PARTIAL
-@code{IKS_ID_USER | IKS_ID_SERVER}
-@item IKS_ID_FULL
-@code{IKS_ID_USER | IKS_ID_SERVER | IKS_ID_RESOURCE}
-@end table
-
-Return value is @code{0} for equality. If entities are not equal a combination of
-part values showing different parts is returned.
-@end deftypefun
-
-
-@comment ============================================================
-@node Packet Filter,Creating Common Packets,Packets,Writing a Jabber Client
-@subsection Packet Filter
-
-Packet filter handles routing incoming packets to related functions.
-
-@tindex iksfilter
-@deftypefun {iksfilter *} iks_filter_new (void);
-Creates a new packet filter.
-@end deftypefun
-
-@deftypefun void iks_filter_packet (iksfilter *@var{f}, ikspak *@var{pak});
-Feeds the filter with given packet. Packet is compared to registered rules and
-hook functions of the matching rules are called in most matched to least
-matched order.
-@end deftypefun
-
-@deftypefun void iks_filter_delete (iksfilter *@var{f});
-Frees filter and rules.
-@end deftypefun
-
-Rules are created with following function:
-
-@tindex iksrule
-@deftypefun {iksrule *} iks_filter_add_rule (iksfilter *@var{f}, iksFilterHook *@var{filterHook}, void *@var{user_data}, @dots{});
-Adds a rule to the filter @var{f}. @var{user_data} is passed directly to your
-hook function @var{filterHook}.
-
-A rule consist of one or more type and value pairs. Possible types:
-@table @code
-@item IKS_RULE_ID
-Compares @code{char *} value to packet ids.
-@item IKS_RULE_FROM
-Compares @code{char *} value to packet senders.
-@item IKS_RULE_FROM_PARTIAL
-Compares @code{char *} value to packet sender. Ignores resource part of jabber id.
-@item IKS_RULE_NS
-Compares @code{char *} value to namespace of iq packets.
-@item IKS_RULE_TYPE
-Compares @code{int} value to packet types.
-@item IKS_RULE_SUBTYPE
-Compares @code{int} value to packet sub types.
-@item IKS_RULE_DONE
-Terminates the rule pairs.
-@end table
-@end deftypefun
-
-Here is an example which creates a filter and adds three rules:
-@example
-iksfilter *f;
-
-f = iks_filter_new ();
-iks_filter_add_rule (f, on_msg, NULL,
-                     IKS_RULE_TYPE, IKS_PAK_MESSAGE,
-                    IKS_RULE_DONE);
-iks_filter_add_rule (f, on_auth_result, NULL,
-                     IKS_RULE_TYPE, IKS_PAK_IQ,
-                    IKS_RULE_SUBTYPE, IKS_TYPE_RESULT,
-                    IKS_RULE_ID, "auth",
-                    IKS_RULE_DONE);
-iks_filter_add_rule (f, on_roster_push, NULL,
-                     IKS_RULE_TYPE, IKS_PAK_IQ,
-                    IKS_RULE_SUBTYPE, IKS_TYPE_SET,
-                    IKS_RULE_NS, "jabber:iq:roster",
-                    IKS_RULE_DONE);
-@end example
-
-@deftp Typedef iksFilterHook
-int iksFilterHook (void *user_data, ikspak *pak);
-
-Your hook is called with your @var{user_data} and matching packet @var{pak}.
-You can return two different values from your hook:
-@table @code
-@item IKS_FILTER_PASS
-Packet is forwarded to least matching rules.
-@item IKS_FILTER_EAT
-Filtering process for the packet ends.
-@end table
-@end deftp
-
-You can remove the rules with following functions:
-
-@deftypefun void iks_filter_remove_rule (iksfilter *@var{f}, iksrule *@var{rule});
-Removes the rule from filter.
-@end deftypefun
-
-@deftypefun void iks_filter_remove_hook (iksfilter *@var{f}, iksFilterHook *@var{filterHook});
-Remove the rules using @var{filterHook} function from filter.
-@end deftypefun
-
-
-@comment ============================================================
-@node Creating Common Packets,,Packet Filter,Writing a Jabber Client
-@subsection Creating Common Packets
-
-A usual jabber network traffic contains many similar XML constructs. iksemel
-provides several utility functions for creating them. They all generate an XML
-tree, so you can add or modify some parts of the tree, and send to server then.
-
-@deftypefun {iks *} iks_make_auth (iksid *@var{id}, const char *@var{pass}, const char *@var{sid});
-Creates an authorization packet. @var{id} is your parsed jabber id, and @var{pass}
-is your password.
-
-If stream id @var{sid} isn't NULL, SHA1 authentication is used, otherwise password
-is attached in plain text. You can learn stream id from @code{IKS_STREAM_START}
-packet in your stream hook like this:
-
-@example
-char *sid;
-
-if (type == IKS_STREAM_START) @{
-    sid = iks_find_attrib (node, "id");
-@}
-@end example
-@end deftypefun
-
-@deftypefun {iks *} iks_make_msg (enum iksubtype @var{type}, const char *@var{to}, const char *@var{body});
-Creates a message packet. @var{type} is the message type, @var{to} is jabber id
-of the recipient, @var{body} is the message.
-@end deftypefun
-
-@deftypefun {iks *} iks_make_s10n (enum iksubtype @var{type}, const char *@var{to}, const char *@var{msg});
-Creates a presence packet for subscription operations. @var{type} is operation,
-@var{to} is jabber id of the recipient, @var{msg} is a small message for
-introducing yourself, or explaning the reason of why you are subscribing or
-unsubscribing.
-@end deftypefun
-
-@deftypefun {iks *} iks_make_pres (enum ikshowtype @var{show}, const char *@var{status});
-Creates a presence packet for publishing your presence. @var{show} is your
-presence state and @var{status} is a message explaining why you are not
-available at the moment, or what you are doing now.
-@end deftypefun
-
-@deftypefun {iks *} iks_make_iq (enum iksubtype @var{type}, const char *@var{xmlns});
-Creates an IQ packet. @var{type} is operation type and @var{xmlns} is the
-namespace of the content. You usually have to add real content to the <query>
-tag before sending this packet.
-@end deftypefun
-
-
-@comment ============================================================
-@node Utility Functions,,Writing a Jabber Client,Tutorials
-@section Utility Functions
-
-@subsection Memory Utilities
-
-@deftypefun {void *} iks_malloc (size_t @var{size});
-@end deftypefun
-@deftypefun void iks_free (void *@var{ptr});
-@end deftypefun
-
-These are wrappers around ANSI malloc and free functions used by the
-iksemel library itself. You can free the output of iks_string (only if you
-passed it a NULL stack) with iks_free for example. That is important
-if you are using a malloc debugger in your application but not in iksemel
-or vice versa.
-
-@comment ============================================================
-@subsection String Utilities
-
-@deftypefun {char *} iks_strdup (const char *@var{src});
-@end deftypefun
-@deftypefun int iks_strcmp (const char *@var{a}, const char *@var{b});
-@end deftypefun
-@deftypefun int iks_strcasecmp (const char *@var{a}, const char *@var{b});
-@end deftypefun
-@deftypefun int iks_strncmp (const char *@var{a}, const char *@var{b}, size_t @var{n});
-@end deftypefun
-@deftypefun int iks_strncasecmp (const char *@var{a}, const char *@var{b}, size_t @var{n});
-@end deftypefun
-@deftypefun size_t iks_strlen (const char *@var{src});
-@end deftypefun
-
-These functions work exactly like their ANSI equivalents except that they allow
-NULL values for string pointers. If @var{src} is NULL, iks_strdup and iks_strlen
-returns zero. If @var{a} or @var{b} is NULL in string comparisation functions
-they return -1.
-
-Their usefulness comes from the fact that they can chained with DOM traversing
-functions like this:
-
-@smallexample
-if (iks_strcmp (iks_find_attrib (x, "id"), "x1") == 0) count++;
-@end smallexample
-
-That example works even x doesn't have an 'id' attribute and iks_find_attrib
-returns NULL. So you don't need to use temporary variables in such
-situations.
-
-@comment ============================================================
-@subsection SHA1 Hash
-
-Secure Hash Algorithm (SHA1) is used in the Jabber authentication
-protocol for encoding your password when sending to the server.
-This is normally handled by iks_make_auth() function, but if you
-want to handle it manually, or if you need a good hash function
-for other purproses you can use these functions.
-
-@deftypefun iksha* iks_sha_new (void);
-Allocates a structure for keeping calculation values and the state.
-@end deftypefun
-
-@deftypefun void iks_sha_reset (iksha *@var{sha});
-Resets the state of the calculation.
-@end deftypefun
-
-@deftypefun void iks_sha_hash (iksha *@var{sha}, const unsigned char *@var{data}, int @var{len}, int @var{finish});
-Calculates the hash value of the given data. If @var{finish} is non
-zero, applies the last step of the calculation.
-@end deftypefun
-
-@deftypefun void iks_sha_print (iksha *@var{sha}, char *@var{hash});
-Prints the result of a finished calculation into the buffer pointed by @var{hash}
-in hexadecimal string form. Buffer must be at least 40 bytes long. String
-is not null terminated.
-@end deftypefun
-
-@deftypefun void iks_sha (const char *@var{data}, char *@var{hash});
-Calculates the hash value of @var{data} and prints into @var{hash}.
-This is a helper function for simple hash calculations. It calls
-other functions for the actual work.
-@end deftypefun
-
-
-@comment ============================================================
-
-
-@node Development,Datatype Index,Tutorials,Top
-@chapter Development
-
-This chapter contains information on plan, procedure and standarts of
-iksemel development.
-
-@section Roadmap
-
-There are three main functions iksemel tries to provide to applications:
-@itemize @bullet
-@item
-A generic XML parser with SAX and DOM interfaces.
-@item
-XML stream client and server functionality.
-@item
-Utilities for Jabber clients.
-@end itemize
-
-Goal of the iksemel is providing these functions while supporting embedded
-environments, keeping usage simple, and having a robust implementation.
-
-Some decisions are made to reach this goal:
-
-Code is written in ANSI C with a single dependency on C library. Instead of
-using expat or libxml, a simple built-in parser is used. Similarly glib and
-gnu only features of glibc (like object stacks) are avoided and built-in
-memory and string utilities are used. This may seem like code duplication
-but since they are optimized for iksemel and only a few kb in size,
-it isn't a big disadvantage.
-
-Code is placed files in a modular fashion, and different modules don't depend
-on others' internal details. This allows taking unneeded functionality out when
-building for low resource situations.
-
-It is tried to give functions names which are consistent, clear and short.
-
-API is documented with texinfo for high quality printed output and info file
-output for fast and simple access during application development. Instead
-of using an autogenerated system or simply listing function descriptions,
-a task oriented tutorial approach is used.
-
-@section Coding Style
-
-Here is a short list describing preferred coding style for iksemel.
-Please keep in mind when sending patches.
-
-@itemize @bullet
-@item
-Indentation is done with tabs. Aligning is done with spaces.
-@item
-Placement of braces is K&R style.
-@item
-Function names are put at the start of line.
-@item
-Function names are lowercase.
-@item
-Words of the function names are separated with underscore character.
-@item
-Structure and variable names are lowercase.
-@item
-Macro and enumarations names are uppercase.
-@item
-Exported library API is contained in the single iksemel.h file.
-@item
-Exported function names start with iks_
-@item
-Exported structure and type names start with iks
-@item
-Exported macro and enumaration names start with IKS_
-@end itemize
-
-Here is an example:
-
-@smallexample
-int
-iks_new_func (char *text)
-@{
-    int i;
-
-    i = an_internal_func (text);
-    if (IKS_SOME_VALUE == i) @{
-        iks_some_func (text);
-        i++;
-    @}
-    return i;
-@}
-@end smallexample
-
-@section Resources
-
-@itemize @bullet
-@item
-RFC 2279, UTF-8 format @url{http://www.ietf.org/rfc/rfc2279.txt}
-@item
-W3C Recommendation, Extensible Markup Language 1.0 @url{http://www.w3.org/TR/REC-xml}
-@item
-Annotated XML Specification @url{http://www.xml.com/axml/testaxml.htm}
-@item
-Jabber Protocol Documents @url{http://www.jabber.org/protocol/}
-@end itemize
-
-
-@comment ============================================================
-
-
-@node Datatype Index,Function Index,Development,Top
-@unnumbered Datatype Index
-@printindex tp
-
-
-@node Function Index,,Datatype Index,Top
-@unnumbered Function Index
-@printindex fn
-
-
-@contents
-@bye
diff --git a/libs/iksemel/iksemel.pc.in b/libs/iksemel/iksemel.pc.in
deleted file mode 100644 (file)
index 7f5c9d2..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: iksemel
-Description: XML parser library for Jabber
-Version: @VERSION@
-Libs: -L${libdir} -liksemel
-Cflags: -I${includedir}
diff --git a/libs/iksemel/include/Makefile.am b/libs/iksemel/include/Makefile.am
deleted file mode 100644 (file)
index 23899ee..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-##
-## Process this file with automake to produce Makefile.in
-##
-
-include_HEADERS = iksemel.h
-noinst_HEADERS = common.h finetune.h
diff --git a/libs/iksemel/include/common.h b/libs/iksemel/include/common.h
deleted file mode 100644 (file)
index af94f6f..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <sys/types.h>
-#include <stdio.h>
-
-#ifdef STDC_HEADERS
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#elif HAVE_STRINGS_H
-#include <strings.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-#ifndef errno
-extern int errno;
-#endif
-
-#include "finetune.h"
diff --git a/libs/iksemel/include/finetune.h b/libs/iksemel/include/finetune.h
deleted file mode 100644 (file)
index 1eae1d8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-/* minimum sax buffer size */
-#define SAX_BUFFER_MIN_SIZE 128
-
-/* sax parser structure plus extra data of dom parser */
-#define DEFAULT_DOM_CHUNK_SIZE 256
-
-/* sax parser structure plus extra data of stream parser */
-#define DEFAULT_STREAM_CHUNK_SIZE 256
-
-/* iks structure, its data, child iks structures, for stream parsing */
-#define DEFAULT_IKS_CHUNK_SIZE 1024
-
-/* iks structure, its data, child iks structures, for file parsing */
-#define DEFAULT_DOM_IKS_CHUNK_SIZE 2048
-
-/* rule structure and from/to/id/ns strings */
-#define DEFAULT_RULE_CHUNK_SIZE 128
-
-/* file is read by blocks with this size */
-#define FILE_IO_BUF_SIZE 4096
-
-/* network receive buffer */
-#define NET_IO_BUF_SIZE 4096
diff --git a/libs/iksemel/include/iksemel.h b/libs/iksemel/include/iksemel.h
deleted file mode 100644 (file)
index dc6df91..0000000
+++ /dev/null
@@ -1,414 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2007 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#ifndef IKSEMEL_H
-#define IKSEMEL_H 1
-
-#ifdef __cplusplus
-#include <cstddef>     /* size_t for C++ */
-extern "C" {
-#else
-#include <stddef.h>    /* size_t for C */
-#endif
-
-/*****  object stack  *****/
-
-struct ikstack_struct;
-typedef struct ikstack_struct ikstack;
-
-ikstack *iks_stack_new (size_t meta_chunk, size_t data_chunk);
-void *iks_stack_alloc (ikstack *s, size_t size);
-char *iks_stack_strdup (ikstack *s, const char *src, size_t len);
-char *iks_stack_strcat (ikstack *s, char *old, size_t old_len, const char *src, size_t src_len);
-void iks_stack_stat (ikstack *s, size_t *allocated, size_t *used);
-void iks_stack_delete (ikstack **sp);
-
-/*****  utilities  *****/
-
-void *iks_malloc (size_t size);
-void iks_real_free (void *ptr);
-void iks_set_mem_funcs (void *(*malloc_func)(size_t size), void (*free_func)(void *ptr));
-
-char *iks_strdup (const char *src);
-char *iks_strcat (char *dest, const char *src);
-int iks_strcmp (const char *a, const char *b);
-int iks_strcasecmp (const char *a, const char *b);
-int iks_strncmp (const char *a, const char *b, size_t n);
-int iks_strncasecmp (const char *a, const char *b, size_t n);
-size_t iks_strlen (const char *src);
-char *iks_escape (ikstack *s, char *src, size_t len);
-char *iks_unescape (ikstack *s, char *src, size_t len);
-
-#define iks_free(p) if (p) {iks_real_free(p) ; p = NULL;}
-
-/*****  dom tree  *****/
-
-enum ikstype {
-       IKS_NONE = 0,
-       IKS_TAG,
-       IKS_ATTRIBUTE,
-       IKS_CDATA
-};
-
-struct iks_struct;
-typedef struct iks_struct iks;
-
-iks *iks_new (const char *name);
-iks *iks_new_within (const char *name, ikstack *s);
-iks *iks_insert (iks *x, const char *name);
-iks *iks_insert_cdata (iks *x, const char *data, size_t len);
-iks *iks_insert_attrib (iks *x, const char *name, const char *value);
-iks *iks_insert_node (iks *x, iks *y);
-iks *iks_append (iks *x, const char *name);
-iks *iks_prepend (iks *x, const char *name);
-iks *iks_append_cdata (iks *x, const char *data, size_t len);
-iks *iks_prepend_cdata (iks *x, const char *data, size_t len);
-void iks_hide (iks *x);
-void iks_delete (iks *x);
-iks *iks_next (iks *x);
-iks *iks_next_tag (iks *x);
-iks *iks_prev (iks *x);
-iks *iks_prev_tag (iks *x);
-iks *iks_parent (iks *x);
-iks *iks_root (iks *x);
-iks *iks_child (iks *x);
-iks *iks_first_tag (iks *x);
-iks *iks_attrib (iks *x);
-iks *iks_find (iks *x, const char *name);
-char *iks_find_cdata (iks *x, const char *name);
-char *iks_find_attrib (iks *x, const char *name);
-iks *iks_find_with_attrib (iks *x, const char *tagname, const char *attrname, const char *value);
-ikstack *iks_stack (iks *x);
-enum ikstype iks_type (iks *x);
-char *iks_name (iks *x);
-char *iks_cdata (iks *x);
-size_t iks_cdata_size (iks *x);
-int iks_has_children (iks *x);
-int iks_has_attribs (iks *x);
-char *iks_string (ikstack *s, iks *x);
-iks *iks_copy (iks *x);
-iks *iks_copy_within (iks *x, ikstack *s);
-
-/*****  sax parser  *****/
-
-enum ikserror {
-       IKS_OK = 0,
-       IKS_NOMEM,
-       IKS_BADXML,
-       IKS_HOOK
-};
-
-enum ikstagtype {
-       IKS_OPEN,
-       IKS_CLOSE,
-       IKS_SINGLE
-};
-
-typedef int (iksTagHook)(void *user_data, char *name, char **atts, int type);
-typedef int (iksCDataHook)(void *user_data, char *data, size_t len);
-typedef void (iksDeleteHook)(void *user_data);
-
-struct iksparser_struct;
-typedef struct iksparser_struct  iksparser;
-
-iksparser *iks_sax_new (void *user_data, iksTagHook *tagHook, iksCDataHook *cdataHook);
-iksparser *iks_sax_extend (ikstack *s, void *user_data, iksTagHook *tagHook, iksCDataHook *cdataHook, iksDeleteHook *deleteHook);
-ikstack *iks_parser_stack (iksparser *prs);
-void *iks_user_data (iksparser *prs);
-unsigned long iks_nr_bytes (iksparser *prs);
-unsigned long iks_nr_lines (iksparser *prs);
-int iks_parse (iksparser *prs, const char *data, size_t len, int finish);
-void iks_parser_reset (iksparser *prs);
-void iks_parser_delete (iksparser *prs);
-
-/*****  dom parser  *****/
-
-enum iksfileerror {
-       IKS_FILE_NOFILE = 4,
-       IKS_FILE_NOACCESS,
-       IKS_FILE_RWERR
-};
-
-iksparser *iks_dom_new (iks **iksptr);
-void iks_set_size_hint (iksparser *prs, size_t approx_size);
-iks *iks_tree (const char *xml_str, size_t len, int *err);
-int iks_load (const char *fname, iks **xptr);
-int iks_save (const char *fname, iks *x);
-
-/*****  transport layer  *****/
-
-enum iksasyncevents {
-       IKS_ASYNC_RESOLVED,
-       IKS_ASYNC_CONNECTED,
-       IKS_ASYNC_WRITE,
-       IKS_ASYNC_WRITTEN,
-       IKS_ASYNC_READ,
-       IKS_ASYNC_CLOSED,
-       IKS_ASYNC_ERROR
-};
-
-typedef struct iksasyncevent_struct {
-       int event;
-       int data0;
-       int data1;
-} iksasyncevent;
-
-typedef void (iksTClose)(void *socket);
-typedef int (iksTConnect)(iksparser *prs, void **socketptr, const char *server, int port);
-typedef int (iksTSend)(void *socket, const char *data, size_t len);
-typedef int (iksTRecv)(void *socket, char *buffer, size_t buf_len, int timeout);
-typedef int (iksAsyncNotify)(void *user_data, iksasyncevent *event);
-typedef int (iksTConnectAsync)(iksparser *prs, void **socketptr, const char *server, const char *server_name, int port, void *notify_data, iksAsyncNotify *notify_func);
-
-#define IKS_TRANSPORT_V1 0
-
-typedef const struct ikstransport_struct {
-       int abi_version;
-       /* basic api, connect can be NULL if only async api is provided */
-       iksTConnect *connect;
-       iksTSend *send;
-       iksTRecv *recv;
-       iksTClose *close;
-       /* optional async api */
-       iksTConnectAsync *connect_async;
-} ikstransport;
-
-extern ikstransport iks_default_transport;
-
-/*****  stream parser  *****/
-
-enum iksneterror {
-       IKS_NET_NODNS = 4,
-       IKS_NET_NOSOCK,
-       IKS_NET_NOCONN,
-       IKS_NET_RWERR,
-       IKS_NET_NOTSUPP,
-       IKS_NET_TLSFAIL,
-       IKS_NET_DROPPED,
-       IKS_NET_UNKNOWN
-};
-
-enum iksnodetype {
-       IKS_NODE_START,
-       IKS_NODE_NORMAL,
-       IKS_NODE_ERROR,
-       IKS_NODE_STOP
-};
-
-enum ikssasltype {
-       IKS_SASL_PLAIN,
-       IKS_SASL_DIGEST_MD5
-};
-
-#define IKS_JABBER_PORT 5222
-
-typedef int (iksStreamHook)(void *user_data, int type, iks *node);
-typedef void (iksLogHook)(void *user_data, const char *data, size_t size, int is_incoming);
-
-iksparser *iks_stream_new (char *name_space, void *user_data, iksStreamHook *streamHook);
-void *iks_stream_user_data (iksparser *prs);
-void iks_set_log_hook (iksparser *prs, iksLogHook *logHook);
-int iks_connect_tcp (iksparser *prs, const char *server, int port);
-int iks_connect_fd (iksparser *prs, int fd);
-int iks_connect_via (iksparser *prs, const char *server, int port, const char *server_name);
-int iks_connect_with (iksparser *prs, const char *server, int port, const char *server_name, ikstransport *trans);
-int iks_connect_async (iksparser *prs, const char *server, int port, void *notify_data, iksAsyncNotify *notify_func);
-int iks_connect_async_with (iksparser *prs, const char *server, int port, const char *server_name, ikstransport *trans, void *notify_data, iksAsyncNotify *notify_func);
-int iks_fd (iksparser *prs);
-int iks_recv (iksparser *prs, int timeout);
-int iks_send_header (iksparser *prs, const char *to);
-int iks_send (iksparser *prs, iks *x);
-int iks_send_raw (iksparser *prs, const char *xmlstr);
-void iks_disconnect (iksparser *prs);
-int iks_has_tls (void);
-int iks_is_secure (iksparser *prs);
-int iks_start_tls (iksparser *prs);
-int iks_proceed_tls (iksparser *prs, const char *cert_file, const char *key_file);
-int iks_start_sasl (iksparser *prs, enum ikssasltype type, char *username, char *pass);
-
-/*****  jabber  *****/
-
-#define IKS_NS_CLIENT     "jabber:client"
-#define IKS_NS_SERVER     "jabber:server"
-#define IKS_NS_AUTH       "jabber:iq:auth"
-#define IKS_NS_AUTH_0K    "jabber:iq:auth:0k"
-#define IKS_NS_REGISTER   "jabber:iq:register"
-#define IKS_NS_ROSTER     "jabber:iq:roster"
-#define IKS_NS_XROSTER "jabber:x:roster"
-#define IKS_NS_OFFLINE    "jabber:x:offline"
-#define IKS_NS_AGENT      "jabber:iq:agent"
-#define IKS_NS_AGENTS     "jabber:iq:agents"
-#define IKS_NS_BROWSE     "jabber:iq:browse"
-#define IKS_NS_CONFERENCE "jabber:iq:conference"
-#define IKS_NS_DELAY      "jabber:x:delay"
-#define IKS_NS_VERSION    "jabber:iq:version"
-#define IKS_NS_TIME       "jabber:iq:time"
-#define IKS_NS_VCARD      "vcard-temp"
-#define IKS_NS_PRIVATE    "jabber:iq:private"
-#define IKS_NS_SEARCH     "jabber:iq:search"
-#define IKS_NS_OOB        "jabber:iq:oob"
-#define IKS_NS_XOOB       "jabber:x:oob"
-#define IKS_NS_ADMIN      "jabber:iq:admin"
-#define IKS_NS_FILTER     "jabber:iq:filter"
-#define IKS_NS_GATEWAY    "jabber:iq:gateway"
-#define IKS_NS_LAST       "jabber:iq:last"
-#define IKS_NS_SIGNED     "jabber:x:signed"
-#define IKS_NS_ENCRYPTED  "jabber:x:encrypted"
-#define IKS_NS_ENVELOPE   "jabber:x:envelope"
-#define IKS_NS_EVENT      "jabber:x:event"
-#define IKS_NS_EXPIRE     "jabber:x:expire"
-#define IKS_NS_XHTML      "http://www.w3.org/1999/xhtml"
-#define IKS_NS_XMPP_SASL  "urn:ietf:params:xml:ns:xmpp-sasl"
-#define IKS_NS_XMPP_BIND  "urn:ietf:params:xml:ns:xmpp-bind"
-#define IKS_NS_XMPP_SESSION  "urn:ietf:params:xml:ns:xmpp-session"
-
-#define IKS_ID_USER 1
-#define IKS_ID_SERVER 2
-#define IKS_ID_RESOURCE 4
-#define IKS_ID_PARTIAL IKS_ID_USER | IKS_ID_SERVER
-#define IKS_ID_FULL IKS_ID_USER | IKS_ID_SERVER | IKS_ID_RESOURCE
-
-#define IKS_STREAM_STARTTLS                   1
-#define IKS_STREAM_SESSION                    2
-#define IKS_STREAM_BIND                       4
-#define IKS_STREAM_SASL_PLAIN                 8
-#define IKS_STREAM_SASL_MD5                  16
-
-typedef struct iksid_struct {
-       char *user;
-       char *server;
-       char *resource;
-       char *partial;
-       char *full;
-} iksid;
-
-iksid *iks_id_new (ikstack *s, const char *jid);
-int iks_id_cmp (iksid *a, iksid *b, int parts);
-
-enum ikspaktype {
-       IKS_PAK_NONE = 0,
-       IKS_PAK_MESSAGE,
-       IKS_PAK_PRESENCE,
-       IKS_PAK_IQ,
-       IKS_PAK_S10N
-};
-
-enum iksubtype {
-       IKS_TYPE_NONE = 0,
-       IKS_TYPE_ERROR,
-
-       IKS_TYPE_CHAT,
-       IKS_TYPE_GROUPCHAT,
-       IKS_TYPE_HEADLINE,
-
-       IKS_TYPE_GET,
-       IKS_TYPE_SET,
-       IKS_TYPE_RESULT,
-
-       IKS_TYPE_SUBSCRIBE,
-       IKS_TYPE_SUBSCRIBED,
-       IKS_TYPE_UNSUBSCRIBE,
-       IKS_TYPE_UNSUBSCRIBED,
-       IKS_TYPE_PROBE,
-       IKS_TYPE_AVAILABLE,
-       IKS_TYPE_UNAVAILABLE
-};
-
-enum ikshowtype {
-       IKS_SHOW_UNAVAILABLE = 0,
-       IKS_SHOW_AVAILABLE,
-       IKS_SHOW_CHAT,
-       IKS_SHOW_AWAY,
-       IKS_SHOW_XA,
-       IKS_SHOW_DND
-};
-
-typedef struct ikspak_struct {
-       iks *x;
-       iksid *from;
-       iks *query;
-       char *ns;
-       char *id;
-       enum ikspaktype type;
-       enum iksubtype subtype;
-       enum ikshowtype show;
-} ikspak;
-
-ikspak *iks_packet (iks *x);
-
-iks *iks_make_auth (iksid *id, const char *pass, const char *sid);
-iks *iks_make_msg (enum iksubtype type, const char *to, const char *body);
-iks *iks_make_s10n (enum iksubtype type, const char *to, const char *msg);
-iks *iks_make_pres (enum ikshowtype show, const char *status);
-iks *iks_make_iq (enum iksubtype type, const char *xmlns);
-iks *iks_make_resource_bind(iksid *id);
-iks *iks_make_session(void);
-int iks_stream_features(iks *x);
-
-/*****  jabber packet filter  *****/
-
-#define IKS_RULE_DONE 0
-#define IKS_RULE_ID 1
-#define IKS_RULE_TYPE 2
-#define IKS_RULE_SUBTYPE 4
-#define IKS_RULE_FROM 8
-#define IKS_RULE_FROM_PARTIAL 16
-#define IKS_RULE_NS 32
-
-enum iksfilterret {
-       IKS_FILTER_PASS,
-       IKS_FILTER_EAT
-};
-
-typedef int (iksFilterHook)(void *user_data, ikspak *pak);
-
-struct iksfilter_struct;
-typedef struct iksfilter_struct iksfilter;
-struct iksrule_struct;
-typedef struct iksrule_struct iksrule;
-
-iksfilter *iks_filter_new (void);
-iksrule *iks_filter_add_rule (iksfilter *f, iksFilterHook *filterHook, void *user_data, ...);
-void iks_filter_remove_rule (iksfilter *f, iksrule *rule);
-void iks_filter_remove_hook (iksfilter *f, iksFilterHook *filterHook);
-void iks_filter_packet (iksfilter *f, ikspak *pak);
-void iks_filter_delete (iksfilter *f);
-
-/*****  sha1  *****/
-
-struct iksha_struct;
-typedef struct iksha_struct iksha;
-
-iksha *iks_sha_new (void);
-void iks_sha_reset (iksha *sha);
-void iks_sha_hash (iksha *sha, const unsigned char *data, size_t len, int finish);
-void iks_sha_print (iksha *sha, char *hash);
-void iks_sha_delete (iksha *sha);
-void iks_sha (const char *data, char *hash);
-
-/*****  md5  *****/
-
-struct ikmd5_struct;
-typedef struct iksmd5_struct iksmd5;
-
-iksmd5 *iks_md5_new(void);
-void iks_md5_reset(iksmd5 *md5);
-void iks_md5_hash(iksmd5 *md5, const unsigned char *data, size_t slen, int finish);
-void iks_md5_delete(iksmd5 *md5);
-void iks_md5_print(iksmd5 *md5, char *buf);
-void iks_md5_digest(iksmd5 *md5, unsigned char *digest);
-void iks_md5(const char *data, char *buf);
-
-/*****  base64  *****/
-
-char *iks_base64_decode(const char *buf);
-char *iks_base64_encode(const char *buf, int len);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  /* IKSEMEL_H */
diff --git a/libs/iksemel/include/stamp-h.in b/libs/iksemel/include/stamp-h.in
deleted file mode 100644 (file)
index 9788f70..0000000
+++ /dev/null
@@ -1 +0,0 @@
-timestamp
diff --git a/libs/iksemel/ltmain.sh b/libs/iksemel/ltmain.sh
deleted file mode 100755 (executable)
index 0223495..0000000
+++ /dev/null
@@ -1,6911 +0,0 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-basename="s,^.*/,,g"
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.5.22
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
-
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
-
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  SP2NL='tr \040 \012'
-  NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  SP2NL='tr \100 \n'
-  NL2SP='tr \r\n \100\100'
-  ;;
-esac
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
-  eval "if test \"\${$lt_var+set}\" = set; then
-         save_$lt_var=\$$lt_var
-         $lt_var=C
-         export $lt_var
-       fi"
-done
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS="  $lt_nl"
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  $echo "$modename: not configured to build any kind of library" 1>&2
-  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit $EXIT_FAILURE
-fi
-
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-duplicate_deps=no
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible.  If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
-    my_template="${TMPDIR-/tmp}/${1-$progname}"
-
-    if test "$run" = ":"; then
-      # Return a directory name, but don't create it in dry-run mode
-      my_tmpdir="${my_template}-$$"
-    else
-
-      # If mktemp works, use that first and foremost
-      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
-      if test ! -d "$my_tmpdir"; then
-       # Failing that, at least try and use $RANDOM to avoid a race
-       my_tmpdir="${my_template}-${RANDOM-0}$$"
-
-       save_mktempdir_umask=`umask`
-       umask 0077
-       $mkdir "$my_tmpdir"
-       umask $save_mktempdir_umask
-      fi
-
-      # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || {
-        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
-       exit $EXIT_FAILURE
-      }
-    fi
-
-    $echo "X$my_tmpdir" | $Xsed
-}
-
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
-  win32_libid_type="unknown"
-  win32_fileres=`file -L $1 2>/dev/null`
-  case $win32_fileres in
-  *ar\ archive\ import\ library*) # definitely import
-    win32_libid_type="x86 archive import"
-    ;;
-  *ar\ archive*) # could be an import, or static
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
-      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 | \
-       $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
-      case $win32_nmres in
-      import*)  win32_libid_type="x86 archive import";;
-      *)        win32_libid_type="x86 archive static";;
-      esac
-    fi
-    ;;
-  *DLL*)
-    win32_libid_type="x86 DLL"
-    ;;
-  *executable*) # but shell scripts are "executable" too...
-    case $win32_fileres in
-    *MS\ Windows\ PE\ Intel*)
-      win32_libid_type="x86 DLL"
-      ;;
-    esac
-    ;;
-  esac
-  $echo $win32_libid_type
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
-    if test -n "$available_tags" && test -z "$tagname"; then
-      CC_quoted=
-      for arg in $CC; do
-       case $arg in
-         *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-       CC_quoted="$CC_quoted $arg"
-      done
-      case $@ in
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
-      # Blanks at the start of $base_compile will cause this to fail
-      # if we don't check for them as well.
-      *)
-       for z in $available_tags; do
-         if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
-           # Evaluate the configuration.
-           eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
-           CC_quoted=
-           for arg in $CC; do
-           # Double-quote args containing other shell metacharacters.
-           case $arg in
-             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
-             arg="\"$arg\""
-             ;;
-           esac
-           CC_quoted="$CC_quoted $arg"
-         done
-           case "$@ " in
-             " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
-             # The compiler in the base compile command matches
-             # the one in the tagged configuration.
-             # Assume this is the tagged configuration we want.
-             tagname=$z
-             break
-             ;;
-           esac
-         fi
-       done
-       # If $tagname still isn't set, then no tagged configuration
-       # was found and let the user know that the "--tag" command
-       # line option must be used.
-       if test -z "$tagname"; then
-         $echo "$modename: unable to infer tagged configuration"
-         $echo "$modename: specify a tag with \`--tag'" 1>&2
-         exit $EXIT_FAILURE
-#        else
-#          $echo "$modename: using $tagname tagged configuration"
-       fi
-       ;;
-      esac
-    fi
-}
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
-
-    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
-    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
-    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
-     :
-    else
-      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
-      exit $EXIT_FAILURE
-    fi
-}
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
-    my_gentop="$1"; shift
-    my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
-    my_status=""
-
-    $show "${rm}r $my_gentop"
-    $run ${rm}r "$my_gentop"
-    $show "$mkdir $my_gentop"
-    $run $mkdir "$my_gentop"
-    my_status=$?
-    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
-      exit $my_status
-    fi
-
-    for my_xlib in $my_oldlibs; do
-      # Extract the objects.
-      case $my_xlib in
-       [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
-       *) my_xabs=`pwd`"/$my_xlib" ;;
-      esac
-      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
-      my_xlib_u=$my_xlib
-      while :; do
-        case " $extracted_archives " in
-       *" $my_xlib_u "*)
-         extracted_serial=`expr $extracted_serial + 1`
-         my_xlib_u=lt$extracted_serial-$my_xlib ;;
-       *) break ;;
-       esac
-      done
-      extracted_archives="$extracted_archives $my_xlib_u"
-      my_xdir="$my_gentop/$my_xlib_u"
-
-      $show "${rm}r $my_xdir"
-      $run ${rm}r "$my_xdir"
-      $show "$mkdir $my_xdir"
-      $run $mkdir "$my_xdir"
-      exit_status=$?
-      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
-       exit $exit_status
-      fi
-      case $host in
-      *-darwin*)
-       $show "Extracting $my_xabs"
-       # Do not bother doing anything if just a dry run
-       if test -z "$run"; then
-         darwin_orig_dir=`pwd`
-         cd $my_xdir || exit $?
-         darwin_archive=$my_xabs
-         darwin_curdir=`pwd`
-         darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
-         darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
-         if test -n "$darwin_arches"; then 
-           darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
-           darwin_arch=
-           $show "$darwin_base_archive has multiple architectures $darwin_arches"
-           for darwin_arch in  $darwin_arches ; do
-             mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-             cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-             func_extract_an_archive "`pwd`" "${darwin_base_archive}"
-             cd "$darwin_curdir"
-             $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
-           done # $darwin_arches
-      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
-           darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
-           darwin_file=
-           darwin_files=
-           for darwin_file in $darwin_filelist; do
-             darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
-             lipo -create -output "$darwin_file" $darwin_files
-           done # $darwin_filelist
-           ${rm}r unfat-$$
-           cd "$darwin_orig_dir"
-         else
-           cd "$darwin_orig_dir"
-           func_extract_an_archive "$my_xdir" "$my_xabs"
-         fi # $darwin_arches
-       fi # $run
-       ;;
-      *)
-        func_extract_an_archive "$my_xdir" "$my_xabs"
-        ;;
-      esac
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-    done
-    func_extract_archives_result="$my_oldobjs"
-}
-# End of Shell function definitions
-#####################################
-
-# Darwin sucks
-eval std_shrext=\"$shrext_cmds\"
-
-disable_libs=no
-
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
-  arg="$1"
-  shift
-
-  case $arg in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case $prev in
-    execute_dlfiles)
-      execute_dlfiles="$execute_dlfiles $arg"
-      ;;
-    tag)
-      tagname="$arg"
-      preserve_args="${preserve_args}=$arg"
-
-      # Check whether tagname contains only valid characters
-      case $tagname in
-      *[!-_A-Za-z0-9,/]*)
-       $echo "$progname: invalid tag name: $tagname" 1>&2
-       exit $EXIT_FAILURE
-       ;;
-      esac
-
-      case $tagname in
-      CC)
-       # Don't test for the "default" C tag, as we know, it's there, but
-       # not specially marked.
-       ;;
-      *)
-       if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
-         taglist="$taglist $tagname"
-         # Evaluate the configuration.
-         eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
-       else
-         $echo "$progname: ignoring unknown tag $tagname" 1>&2
-       fi
-       ;;
-      esac
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
-
-    prev=
-    prevopt=
-    continue
-  fi
-
-  # Have we seen a non-optional argument yet?
-  case $arg in
-  --help)
-    show_help=yes
-    ;;
-
-  --version)
-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    $echo
-    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
-    $echo "This is free software; see the source for copying conditions.  There is NO"
-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit $?
-    ;;
-
-  --config)
-    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
-    # Now print the configurations for the tags.
-    for tagname in $taglist; do
-      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
-    done
-    exit $?
-    ;;
-
-  --debug)
-    $echo "$progname: enabling shell trace mode"
-    set -x
-    preserve_args="$preserve_args $arg"
-    ;;
-
-  --dry-run | -n)
-    run=:
-    ;;
-
-  --features)
-    $echo "host: $host"
-    if test "$build_libtool_libs" = yes; then
-      $echo "enable shared libraries"
-    else
-      $echo "disable shared libraries"
-    fi
-    if test "$build_old_libs" = yes; then
-      $echo "enable static libraries"
-    else
-      $echo "disable static libraries"
-    fi
-    exit $?
-    ;;
-
-  --finish) mode="finish" ;;
-
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
-
-  --preserve-dup-deps) duplicate_deps="yes" ;;
-
-  --quiet | --silent)
-    show=:
-    preserve_args="$preserve_args $arg"
-    ;;
-
-  --tag)
-    prevopt="--tag"
-    prev=tag
-    preserve_args="$preserve_args --tag"
-    ;;
-  --tag=*)
-    set tag "$optarg" ${1+"$@"}
-    shift
-    prev=tag
-    preserve_args="$preserve_args --tag"
-    ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
-    ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
-
-  *)
-    nonopt="$arg"
-    break
-    ;;
-  esac
-done
-
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-fi
-
-case $disable_libs in
-no) 
-  ;;
-shared)
-  build_libtool_libs=no
-  build_old_libs=yes
-  ;;
-static)
-  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-  ;;
-esac
-
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
-
-if test -z "$show_help"; then
-
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
-    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
-    case $nonopt in
-    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
-      mode=link
-      for arg
-      do
-       case $arg in
-       -c)
-          mode=compile
-          break
-          ;;
-       esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
-      ;;
-    *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
-
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-       if test -n "$nonopt"; then
-         $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-       else
-         $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-       fi
-      fi
-      ;;
-    esac
-  fi
-
-  # Only execute mode is allowed to have -dlopen flags.
-  if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-
-  # Change the help message to a mode-specific one.
-  generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case $mode in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
-    suppress_opt=yes
-    suppress_output=
-    arg_mode=normal
-    libobj=
-    later=
-
-    for arg
-    do
-      case $arg_mode in
-      arg  )
-       # do not "continue".  Instead, add this to base_compile
-       lastarg="$arg"
-       arg_mode=normal
-       ;;
-
-      target )
-       libobj="$arg"
-       arg_mode=normal
-       continue
-       ;;
-
-      normal )
-       # Accept any command-line options.
-       case $arg in
-       -o)
-         if test -n "$libobj" ; then
-           $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         arg_mode=target
-         continue
-         ;;
-
-       -static | -prefer-pic | -prefer-non-pic)
-         later="$later $arg"
-         continue
-         ;;
-
-       -no-suppress)
-         suppress_opt=no
-         continue
-         ;;
-
-       -Xcompiler)
-         arg_mode=arg  #  the next one goes into the "base_compile" arg list
-         continue      #  The current "srcfile" will either be retained or
-         ;;            #  replaced later.  I would guess that would be a bug.
-
-       -Wc,*)
-         args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
-         lastarg=
-         save_ifs="$IFS"; IFS=','
-         for arg in $args; do
-           IFS="$save_ifs"
-
-           # Double-quote args containing other shell metacharacters.
-           # Many Bourne shells cannot handle close brackets correctly
-           # in scan sets, so we specify it separately.
-           case $arg in
-             *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \     ]*|*]*|"")
-             arg="\"$arg\""
-             ;;
-           esac
-           lastarg="$lastarg $arg"
-         done
-         IFS="$save_ifs"
-         lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
-         # Add the arguments to base_compile.
-         base_compile="$base_compile $lastarg"
-         continue
-         ;;
-
-       * )
-         # Accept the current argument as the source file.
-         # The previous "srcfile" becomes the current argument.
-         #
-         lastarg="$srcfile"
-         srcfile="$arg"
-         ;;
-       esac  #  case $arg
-       ;;
-      esac    #  case $arg_mode
-
-      # Aesthetically quote the previous argument.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      case $lastarg in
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, and some SunOS ksh mistreat backslash-escaping
-      # in scan sets (worked around with variable expansion),
-      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
-      # at all, so we specify them separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       lastarg="\"$lastarg\""
-       ;;
-      esac
-
-      base_compile="$base_compile $lastarg"
-    done # for arg
-
-    case $arg_mode in
-    arg)
-      $echo "$modename: you must specify an argument for -Xcompile"
-      exit $EXIT_FAILURE
-      ;;
-    target)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *)
-      # Get the name of the library object.
-      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
-      ;;
-    esac
-
-    # Recognize several different file suffixes.
-    # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSifmso]'
-    case $libobj in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.ii) xform=ii ;;
-    *.class) xform=class ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    *.java) xform=java ;;
-    *.obj) xform=obj ;;
-    esac
-
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
-    case $libobj in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
-    *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    esac
-
-    func_infer_tag $base_compile
-
-    for arg in $later; do
-      case $arg in
-      -static)
-       build_old_libs=yes
-       continue
-       ;;
-
-      -prefer-pic)
-       pic_mode=yes
-       continue
-       ;;
-
-      -prefer-non-pic)
-       pic_mode=no
-       continue
-       ;;
-      esac
-    done
-
-    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
-    case $qlibobj in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       qlibobj="\"$qlibobj\"" ;;
-    esac
-    test "X$libobj" != "X$qlibobj" \
-       && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"'  &()|`$[]' \
-       && $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
-    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$xdir" = "X$obj"; then
-      xdir=
-    else
-      xdir=$xdir/
-    fi
-    lobj=${xdir}$objdir/$objname
-
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    # Delete any leftover library objects.
-    if test "$build_old_libs" = yes; then
-      removelist="$obj $lobj $libobj ${libobj}T"
-    else
-      removelist="$lobj $libobj ${libobj}T"
-    fi
-
-    $run $rm $removelist
-    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-
-    # On Cygwin there's no "real" PIC flag so we must build both object types
-    case $host_os in
-    cygwin* | mingw* | pw32* | os2*)
-      pic_mode=default
-      ;;
-    esac
-    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
-      # non-PIC code in shared libraries is not supported
-      pic_mode=default
-    fi
-
-    # Calculate the filename of the output object if compiler does
-    # not support -o with -c
-    if test "$compiler_c_o" = no; then
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
-      lockfile="$output_obj.lock"
-      removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-    else
-      output_obj=
-      need_locks=no
-      lockfile=
-    fi
-
-    # Lock this critical section if it is needed
-    # We use this script file to make the link, it avoids creating a new file
-    if test "$need_locks" = yes; then
-      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
-       $show "Waiting for $lockfile to be removed"
-       sleep 2
-      done
-    elif test "$need_locks" = warn; then
-      if test -f "$lockfile"; then
-       $echo "\
-*** ERROR, $lockfile exists and contains:
-`cat $lockfile 2>/dev/null`
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-      $echo "$srcfile" > "$lockfile"
-    fi
-
-    if test -n "$fix_srcfile_path"; then
-      eval srcfile=\"$fix_srcfile_path\"
-    fi
-    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
-    case $qsrcfile in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-      qsrcfile="\"$qsrcfile\"" ;;
-    esac
-
-    $run $rm "$libobj" "${libobj}T"
-
-    # Create a libtool object file (analogous to a ".la" file),
-    # but don't create it if we're doing a dry run.
-    test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
-
-    # Only build a PIC object if we are building libtool libraries.
-    if test "$build_libtool_libs" = yes; then
-      # Without this assignment, base_compile gets emptied.
-      fbsd_hideous_sh_bug=$base_compile
-
-      if test "$pic_mode" != no; then
-       command="$base_compile $qsrcfile $pic_flag"
-      else
-       # Don't build PIC code
-       command="$base_compile $qsrcfile"
-      fi
-
-      if test ! -d "${xdir}$objdir"; then
-       $show "$mkdir ${xdir}$objdir"
-       $run $mkdir ${xdir}$objdir
-       exit_status=$?
-       if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
-         exit $exit_status
-       fi
-      fi
-
-      if test -z "$output_obj"; then
-       # Place PIC objects in $objdir
-       command="$command -o $lobj"
-      fi
-
-      $run $rm "$lobj" "$output_obj"
-
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-       test -n "$output_obj" && $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-       $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      # Just move the object if needed, then go on to compile the next one
-      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
-       $show "$mv $output_obj $lobj"
-       if $run $mv $output_obj $lobj; then :
-       else
-         error=$?
-         $run $rm $removelist
-         exit $error
-       fi
-      fi
-
-      # Append the name of the PIC object to the libtool object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
-      # Allow error messages only from the first compilation.
-      if test "$suppress_opt" = yes; then
-        suppress_output=' >/dev/null 2>&1'
-      fi
-    else
-      # No PIC object so indicate it doesn't exist in the libtool
-      # object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
-    fi
-
-    # Only build a position-dependent object if we build old libraries.
-    if test "$build_old_libs" = yes; then
-      if test "$pic_mode" != yes; then
-       # Don't build PIC code
-       command="$base_compile $qsrcfile"
-      else
-       command="$base_compile $qsrcfile $pic_flag"
-      fi
-      if test "$compiler_c_o" = yes; then
-       command="$command -o $obj"
-      fi
-
-      # Suppress compiler output if we already did a PIC compilation.
-      command="$command$suppress_output"
-      $run $rm "$obj" "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      if test "$need_locks" = warn &&
-        test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-       $echo "\
-*** ERROR, $lockfile contains:
-`cat $lockfile 2>/dev/null`
-
-but it should contain:
-$srcfile
-
-This indicates that another process is trying to use the same
-temporary object file, and libtool could not work around it because
-your compiler does not support \`-c' and \`-o' together.  If you
-repeat this compilation, it may succeed, by chance, but you had better
-avoid parallel builds (make -j) in this platform, or get a better
-compiler."
-
-       $run $rm $removelist
-       exit $EXIT_FAILURE
-      fi
-
-      # Just move the object if needed
-      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
-       $show "$mv $output_obj $obj"
-       if $run $mv $output_obj $obj; then :
-       else
-         error=$?
-         $run $rm $removelist
-         exit $error
-       fi
-      fi
-
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
-
-EOF
-    else
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
-
-EOF
-    fi
-
-    $run $mv "${libobj}T" "${libobj}"
-
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $run $rm "$lockfile"
-    fi
-
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool link mode
-  link | relink)
-    modename="$modename: link"
-    case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invocation.
-      # allow_undefined=no
-
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    libtool_args="$nonopt"
-    base_compile="$nonopt $@"
-    compile_command="$nonopt"
-    finalize_command="$nonopt"
-
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    old_deplibs=
-    compiler_flags=
-    linker_flags=
-    dllsearchpath=
-    lib_search_path=`pwd`
-    inst_prefix_dir=
-
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    ltlibs=
-    module=no
-    no_install=no
-    objs=
-    non_pic_objects=
-    notinst_path= # paths that contain not-installed libtool libraries
-    precious_files_regex=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-    vinfo_number=no
-
-    func_infer_tag $base_compile
-
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -all-static | -static | -static-libtool-libs)
-    case $arg in
-    -all-static)
-         if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-           $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-         fi
-         if test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
-         fi
-         prefer_static_libs=yes
-         ;;
-    -static)
-         if test -z "$pic_flag" && test -n "$link_static_flag"; then
-           dlopen_self=$dlopen_self_static
-         fi
-         prefer_static_libs=built
-         ;;
-    -static-libtool-libs)
-      if test -z "$pic_flag" && test -n "$link_static_flag"; then
-        dlopen_self=$dlopen_self_static
-      fi
-      prefer_static_libs=yes
-      ;;
-    esac
-       build_libtool_libs=no
-       build_old_libs=yes
-       break
-       ;;
-      esac
-    done
-
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
-
-    # Go through the arguments, transforming them on the way.
-    while test "$#" -gt 0; do
-      arg="$1"
-      shift
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
-       ;;
-      *) qarg=$arg ;;
-      esac
-      libtool_args="$libtool_args $qarg"
-
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-       case $prev in
-       output)
-         compile_command="$compile_command @OUTPUT@"
-         finalize_command="$finalize_command @OUTPUT@"
-         ;;
-       esac
-
-       case $prev in
-       dlfiles|dlprefiles)
-         if test "$preload" = no; then
-           # Add the symbol object into the linking commands.
-           compile_command="$compile_command @SYMFILE@"
-           finalize_command="$finalize_command @SYMFILE@"
-           preload=yes
-         fi
-         case $arg in
-         *.la | *.lo) ;;  # We handle these cases below.
-         force)
-           if test "$dlself" = no; then
-             dlself=needless
-             export_dynamic=yes
-           fi
-           prev=
-           continue
-           ;;
-         self)
-           if test "$prev" = dlprefiles; then
-             dlself=yes
-           elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-             dlself=yes
-           else
-             dlself=needless
-             export_dynamic=yes
-           fi
-           prev=
-           continue
-           ;;
-         *)
-           if test "$prev" = dlfiles; then
-             dlfiles="$dlfiles $arg"
-           else
-             dlprefiles="$dlprefiles $arg"
-           fi
-           prev=
-           continue
-           ;;
-         esac
-         ;;
-       expsyms)
-         export_symbols="$arg"
-         if test ! -f "$arg"; then
-           $echo "$modename: symbol file \`$arg' does not exist"
-           exit $EXIT_FAILURE
-         fi
-         prev=
-         continue
-         ;;
-       expsyms_regex)
-         export_symbols_regex="$arg"
-         prev=
-         continue
-         ;;
-       inst_prefix)
-         inst_prefix_dir="$arg"
-         prev=
-         continue
-         ;;
-       precious_regex)
-         precious_files_regex="$arg"
-         prev=
-         continue
-         ;;
-       release)
-         release="-$arg"
-         prev=
-         continue
-         ;;
-       objectlist)
-         if test -f "$arg"; then
-           save_arg=$arg
-           moreargs=
-           for fil in `cat $save_arg`
-           do
-#            moreargs="$moreargs $fil"
-             arg=$fil
-             # A libtool-controlled object.
-
-             # Check to see that this really is a libtool object.
-             if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-               pic_object=
-               non_pic_object=
-
-               # Read the .lo file
-               # If there is no directory component, then add one.
-               case $arg in
-               */* | *\\*) . $arg ;;
-               *) . ./$arg ;;
-               esac
-
-               if test -z "$pic_object" || \
-                  test -z "$non_pic_object" ||
-                  test "$pic_object" = none && \
-                  test "$non_pic_object" = none; then
-                 $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-                 exit $EXIT_FAILURE
-               fi
-
-               # Extract subdirectory from the argument.
-               xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-               if test "X$xdir" = "X$arg"; then
-                 xdir=
-               else
-                 xdir="$xdir/"
-               fi
-
-               if test "$pic_object" != none; then
-                 # Prepend the subdirectory the object is found in.
-                 pic_object="$xdir$pic_object"
-
-                 if test "$prev" = dlfiles; then
-                   if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-                     dlfiles="$dlfiles $pic_object"
-                     prev=
-                     continue
-                   else
-                     # If libtool objects are unsupported, then we need to preload.
-                     prev=dlprefiles
-                   fi
-                 fi
-
-                 # CHECK ME:  I think I busted this.  -Ossama
-                 if test "$prev" = dlprefiles; then
-                   # Preload the old-style object.
-                   dlprefiles="$dlprefiles $pic_object"
-                   prev=
-                 fi
-
-                 # A PIC object.
-                 libobjs="$libobjs $pic_object"
-                 arg="$pic_object"
-               fi
-
-               # Non-PIC object.
-               if test "$non_pic_object" != none; then
-                 # Prepend the subdirectory the object is found in.
-                 non_pic_object="$xdir$non_pic_object"
-
-                 # A standard non-PIC object
-                 non_pic_objects="$non_pic_objects $non_pic_object"
-                 if test -z "$pic_object" || test "$pic_object" = none ; then
-                   arg="$non_pic_object"
-                 fi
-               else
-                 # If the PIC object exists, use it instead.
-                 # $xdir was prepended to $pic_object above.
-                 non_pic_object="$pic_object"
-                 non_pic_objects="$non_pic_objects $non_pic_object"
-               fi
-             else
-               # Only an error if not doing a dry-run.
-               if test -z "$run"; then
-                 $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-                 exit $EXIT_FAILURE
-               else
-                 # Dry-run case.
-
-                 # Extract subdirectory from the argument.
-                 xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-                 if test "X$xdir" = "X$arg"; then
-                   xdir=
-                 else
-                   xdir="$xdir/"
-                 fi
-
-                 pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-                 non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-                 libobjs="$libobjs $pic_object"
-                 non_pic_objects="$non_pic_objects $non_pic_object"
-               fi
-             fi
-           done
-         else
-           $echo "$modename: link input file \`$save_arg' does not exist"
-           exit $EXIT_FAILURE
-         fi
-         arg=$save_arg
-         prev=
-         continue
-         ;;
-       rpath | xrpath)
-         # We need an absolute path.
-         case $arg in
-         [\\/]* | [A-Za-z]:[\\/]*) ;;
-         *)
-           $echo "$modename: only absolute run-paths are allowed" 1>&2
-           exit $EXIT_FAILURE
-           ;;
-         esac
-         if test "$prev" = rpath; then
-           case "$rpath " in
-           *" $arg "*) ;;
-           *) rpath="$rpath $arg" ;;
-           esac
-         else
-           case "$xrpath " in
-           *" $arg "*) ;;
-           *) xrpath="$xrpath $arg" ;;
-           esac
-         fi
-         prev=
-         continue
-         ;;
-       xcompiler)
-         compiler_flags="$compiler_flags $qarg"
-         prev=
-         compile_command="$compile_command $qarg"
-         finalize_command="$finalize_command $qarg"
-         continue
-         ;;
-       xlinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $wl$qarg"
-         prev=
-         compile_command="$compile_command $wl$qarg"
-         finalize_command="$finalize_command $wl$qarg"
-         continue
-         ;;
-       xcclinker)
-         linker_flags="$linker_flags $qarg"
-         compiler_flags="$compiler_flags $qarg"
-         prev=
-         compile_command="$compile_command $qarg"
-         finalize_command="$finalize_command $qarg"
-         continue
-         ;;
-       shrext)
-         shrext_cmds="$arg"
-         prev=
-         continue
-         ;;
-       darwin_framework|darwin_framework_skip)
-         test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
-         compile_command="$compile_command $arg"
-         finalize_command="$finalize_command $arg"
-         prev=
-         continue
-         ;;
-       *)
-         eval "$prev=\"\$arg\""
-         prev=
-         continue
-         ;;
-       esac
-      fi # test -n "$prev"
-
-      prevarg="$arg"
-
-      case $arg in
-      -all-static)
-       if test -n "$link_static_flag"; then
-         compile_command="$compile_command $link_static_flag"
-         finalize_command="$finalize_command $link_static_flag"
-       fi
-       continue
-       ;;
-
-      -allow-undefined)
-       # FIXME: remove this flag sometime in the future.
-       $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-       continue
-       ;;
-
-      -avoid-version)
-       avoid_version=yes
-       continue
-       ;;
-
-      -dlopen)
-       prev=dlfiles
-       continue
-       ;;
-
-      -dlpreopen)
-       prev=dlprefiles
-       continue
-       ;;
-
-      -export-dynamic)
-       export_dynamic=yes
-       continue
-       ;;
-
-      -export-symbols | -export-symbols-regex)
-       if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-         $echo "$modename: more than one -exported-symbols argument is not allowed"
-         exit $EXIT_FAILURE
-       fi
-       if test "X$arg" = "X-export-symbols"; then
-         prev=expsyms
-       else
-         prev=expsyms_regex
-       fi
-       continue
-       ;;
-
-      -framework|-arch|-isysroot)
-       case " $CC " in
-         *" ${arg} ${1} "* | *" ${arg} ${1} "*) 
-               prev=darwin_framework_skip ;;
-         *) compiler_flags="$compiler_flags $arg"
-            prev=darwin_framework ;;
-       esac
-       compile_command="$compile_command $arg"
-       finalize_command="$finalize_command $arg"
-       continue
-       ;;
-
-      -inst-prefix-dir)
-       prev=inst_prefix
-       continue
-       ;;
-
-      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
-      # so, if we see these flags be careful not to treat them like -L
-      -L[A-Z][A-Z]*:*)
-       case $with_gcc/$host in
-       no/*-*-irix* | /*-*-irix*)
-         compile_command="$compile_command $arg"
-         finalize_command="$finalize_command $arg"
-         ;;
-       esac
-       continue
-       ;;
-
-      -L*)
-       dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         absdir=`cd "$dir" && pwd`
-         if test -z "$absdir"; then
-           $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-           absdir="$dir"
-           notinst_path="$notinst_path $dir"
-         fi
-         dir="$absdir"
-         ;;
-       esac
-       case "$deplibs " in
-       *" -L$dir "*) ;;
-       *)
-         deplibs="$deplibs -L$dir"
-         lib_search_path="$lib_search_path $dir"
-         ;;
-       esac
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$dir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$dir";;
-         esac
-         case :$dllsearchpath: in
-         *":$testbindir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$testbindir";;
-         esac
-         ;;
-       esac
-       continue
-       ;;
-
-      -l*)
-       if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
-         case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
-           # These systems don't actually have a C or math library (as such)
-           continue
-           ;;
-         *-*-os2*)
-           # These systems don't actually have a C library (as such)
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-           # Do not include libc due to us having libc/libc_r.
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C and math libraries are in the System framework
-           deplibs="$deplibs -framework System"
-           continue
-           ;;
-         *-*-sco3.2v5* | *-*-sco5v6*)
-           # Causes problems with __ctype
-           test "X$arg" = "X-lc" && continue
-           ;;
-         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-           # Compiler inserts libc in the correct place for threads to work
-           test "X$arg" = "X-lc" && continue
-           ;;
-         esac
-       elif test "X$arg" = "X-lc_r"; then
-        case $host in
-        *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-          # Do not include libc_r directly, use -pthread flag.
-          continue
-          ;;
-        esac
-       fi
-       deplibs="$deplibs $arg"
-       continue
-       ;;
-
-      # Tru64 UNIX uses -model [arg] to determine the layout of C++
-      # classes, name mangling, and exception handling.
-      -model)
-       compile_command="$compile_command $arg"
-       compiler_flags="$compiler_flags $arg"
-       finalize_command="$finalize_command $arg"
-       prev=xcompiler
-       continue
-       ;;
-
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-       compiler_flags="$compiler_flags $arg"
-       compile_command="$compile_command $arg"
-       finalize_command="$finalize_command $arg"
-       continue
-       ;;
-
-      -module)
-       module=yes
-       continue
-       ;;
-
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m* pass through architecture-specific compiler args for GCC
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -pg pass through profiling flag for GCC
-      # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
-      -t[45]*|-txscale*|@*)
-
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-        compile_command="$compile_command $arg"
-        finalize_command="$finalize_command $arg"
-        compiler_flags="$compiler_flags $arg"
-        continue
-        ;;
-
-      -shrext)
-       prev=shrext
-       continue
-       ;;
-
-      -no-fast-install)
-       fast_install=no
-       continue
-       ;;
-
-      -no-install)
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         # The PATH hackery in wrapper scripts is required on Windows
-         # in order for the loader to find any dlls it needs.
-         $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
-         $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
-         fast_install=no
-         ;;
-       *) no_install=yes ;;
-       esac
-       continue
-       ;;
-
-      -no-undefined)
-       allow_undefined=no
-       continue
-       ;;
-
-      -objectlist)
-       prev=objectlist
-       continue
-       ;;
-
-      -o) prev=output ;;
-
-      -precious-files-regex)
-       prev=precious_regex
-       continue
-       ;;
-
-      -release)
-       prev=release
-       continue
-       ;;
-
-      -rpath)
-       prev=rpath
-       continue
-       ;;
-
-      -R)
-       prev=xrpath
-       continue
-       ;;
-
-      -R*)
-       dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
-       # We need an absolute path.
-       case $dir in
-       [\\/]* | [A-Za-z]:[\\/]*) ;;
-       *)
-         $echo "$modename: only absolute run-paths are allowed" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-       case "$xrpath " in
-       *" $dir "*) ;;
-       *) xrpath="$xrpath $dir" ;;
-       esac
-       continue
-       ;;
-
-      -static | -static-libtool-libs)
-       # The effects of -static are defined in a previous loop.
-       # We used to do the same as -all-static on platforms that
-       # didn't have a PIC flag, but the assumption that the effects
-       # would be equivalent was wrong.  It would break on at least
-       # Digital Unix and AIX.
-       continue
-       ;;
-
-      -thread-safe)
-       thread_safe=yes
-       continue
-       ;;
-
-      -version-info)
-       prev=vinfo
-       continue
-       ;;
-      -version-number)
-       prev=vinfo
-       vinfo_number=yes
-       continue
-       ;;
-
-      -Wc,*)
-       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-         case $flag in
-           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
-           flag="\"$flag\""
-           ;;
-         esac
-         arg="$arg $wl$flag"
-         compiler_flags="$compiler_flags $flag"
-       done
-       IFS="$save_ifs"
-       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-       ;;
-
-      -Wl,*)
-       args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
-       arg=
-       save_ifs="$IFS"; IFS=','
-       for flag in $args; do
-         IFS="$save_ifs"
-         case $flag in
-           *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \       ]*|*]*|"")
-           flag="\"$flag\""
-           ;;
-         esac
-         arg="$arg $wl$flag"
-         compiler_flags="$compiler_flags $wl$flag"
-         linker_flags="$linker_flags $flag"
-       done
-       IFS="$save_ifs"
-       arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-       ;;
-
-      -Xcompiler)
-       prev=xcompiler
-       continue
-       ;;
-
-      -Xlinker)
-       prev=xlinker
-       continue
-       ;;
-
-      -XCClinker)
-       prev=xcclinker
-       continue
-       ;;
-
-      # Some other compiler flag.
-      -* | +*)
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-       ;;
-
-      *.$objext)
-       # A standard object.
-       objs="$objs $arg"
-       ;;
-
-      *.lo)
-       # A libtool-controlled object.
-
-       # Check to see that this really is a libtool object.
-       if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         pic_object=
-         non_pic_object=
-
-         # Read the .lo file
-         # If there is no directory component, then add one.
-         case $arg in
-         */* | *\\*) . $arg ;;
-         *) . ./$arg ;;
-         esac
-
-         if test -z "$pic_object" || \
-            test -z "$non_pic_object" ||
-            test "$pic_object" = none && \
-            test "$non_pic_object" = none; then
-           $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-
-         # Extract subdirectory from the argument.
-         xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-         if test "X$xdir" = "X$arg"; then
-           xdir=
-         else
-           xdir="$xdir/"
-         fi
-
-         if test "$pic_object" != none; then
-           # Prepend the subdirectory the object is found in.
-           pic_object="$xdir$pic_object"
-
-           if test "$prev" = dlfiles; then
-             if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-               dlfiles="$dlfiles $pic_object"
-               prev=
-               continue
-             else
-               # If libtool objects are unsupported, then we need to preload.
-               prev=dlprefiles
-             fi
-           fi
-
-           # CHECK ME:  I think I busted this.  -Ossama
-           if test "$prev" = dlprefiles; then
-             # Preload the old-style object.
-             dlprefiles="$dlprefiles $pic_object"
-             prev=
-           fi
-
-           # A PIC object.
-           libobjs="$libobjs $pic_object"
-           arg="$pic_object"
-         fi
-
-         # Non-PIC object.
-         if test "$non_pic_object" != none; then
-           # Prepend the subdirectory the object is found in.
-           non_pic_object="$xdir$non_pic_object"
-
-           # A standard non-PIC object
-           non_pic_objects="$non_pic_objects $non_pic_object"
-           if test -z "$pic_object" || test "$pic_object" = none ; then
-             arg="$non_pic_object"
-           fi
-         else
-           # If the PIC object exists, use it instead.
-           # $xdir was prepended to $pic_object above.
-           non_pic_object="$pic_object"
-           non_pic_objects="$non_pic_objects $non_pic_object"
-         fi
-       else
-         # Only an error if not doing a dry-run.
-         if test -z "$run"; then
-           $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-           exit $EXIT_FAILURE
-         else
-           # Dry-run case.
-
-           # Extract subdirectory from the argument.
-           xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-           if test "X$xdir" = "X$arg"; then
-             xdir=
-           else
-             xdir="$xdir/"
-           fi
-
-           pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-           non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-           libobjs="$libobjs $pic_object"
-           non_pic_objects="$non_pic_objects $non_pic_object"
-         fi
-       fi
-       ;;
-
-      *.$libext)
-       # An archive.
-       deplibs="$deplibs $arg"
-       old_deplibs="$old_deplibs $arg"
-       continue
-       ;;
-
-      *.la)
-       # A libtool-controlled library.
-
-       if test "$prev" = dlfiles; then
-         # This library was specified with -dlopen.
-         dlfiles="$dlfiles $arg"
-         prev=
-       elif test "$prev" = dlprefiles; then
-         # The library was specified with -dlpreopen.
-         dlprefiles="$dlprefiles $arg"
-         prev=
-       else
-         deplibs="$deplibs $arg"
-       fi
-       continue
-       ;;
-
-      # Some other compiler argument.
-      *)
-       # Unknown arguments in both finalize_command and compile_command need
-       # to be aesthetically quoted because they are evaled later.
-       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-       case $arg in
-       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
-         arg="\"$arg\""
-         ;;
-       esac
-       ;;
-      esac # arg
-
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-       compile_command="$compile_command $arg"
-       finalize_command="$finalize_command $arg"
-      fi
-    done # argument parsing loop
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      compile_command="$compile_command $arg"
-      finalize_command="$finalize_command $arg"
-    fi
-
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
-
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
-    else
-      shlib_search_path=
-    fi
-    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
-
-    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$output_objdir" = "X$output"; then
-      output_objdir="$objdir"
-    else
-      output_objdir="$output_objdir/$objdir"
-    fi
-    # Create the object directory.
-    if test ! -d "$output_objdir"; then
-      $show "$mkdir $output_objdir"
-      $run $mkdir $output_objdir
-      exit_status=$?
-      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
-       exit $exit_status
-      fi
-    fi
-
-    # Determine the type of output
-    case $output in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *.$libext) linkmode=oldlib ;;
-    *.lo | *.$objext) linkmode=obj ;;
-    *.la) linkmode=lib ;;
-    *) linkmode=prog ;; # Anything else should be a program.
-    esac
-
-    case $host in
-    *cygwin* | *mingw* | *pw32*)
-      # don't eliminate duplications in $postdeps and $predeps
-      duplicate_compiler_generated_deps=yes
-      ;;
-    *)
-      duplicate_compiler_generated_deps=$duplicate_deps
-      ;;
-    esac
-    specialdeplibs=
-
-    libs=
-    # Find all interdependent deplibs by searching for libraries
-    # that are linked more than once (e.g. -la -lb -la)
-    for deplib in $deplibs; do
-      if test "X$duplicate_deps" = "Xyes" ; then
-       case "$libs " in
-       *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-       esac
-      fi
-      libs="$libs $deplib"
-    done
-
-    if test "$linkmode" = lib; then
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
-      # Compute libraries that are listed more than once in $predeps
-      # $postdeps and mark them as special (i.e., whose duplicates are
-      # not to be eliminated).
-      pre_post_deps=
-      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
-       for pre_post_dep in $predeps $postdeps; do
-         case "$pre_post_deps " in
-         *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
-         esac
-         pre_post_deps="$pre_post_deps $pre_post_dep"
-       done
-      fi
-      pre_post_deps=
-    fi
-
-    deplibs=
-    newdependency_libs=
-    newlib_search_path=
-    need_relink=no # whether we're linking any uninstalled libtool libraries
-    notinst_deplibs= # not-installed libtool libraries
-    case $linkmode in
-    lib)
-       passes="conv link"
-       for file in $dlfiles $dlprefiles; do
-         case $file in
-         *.la) ;;
-         *)
-           $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
-           exit $EXIT_FAILURE
-           ;;
-         esac
-       done
-       ;;
-    prog)
-       compile_deplibs=
-       finalize_deplibs=
-       alldeplibs=no
-       newdlfiles=
-       newdlprefiles=
-       passes="conv scan dlopen dlpreopen link"
-       ;;
-    *)  passes="conv"
-       ;;
-    esac
-    for pass in $passes; do
-      if test "$linkmode,$pass" = "lib,link" ||
-        test "$linkmode,$pass" = "prog,scan"; then
-       libs="$deplibs"
-       deplibs=
-      fi
-      if test "$linkmode" = prog; then
-       case $pass in
-       dlopen) libs="$dlfiles" ;;
-       dlpreopen) libs="$dlprefiles" ;;
-       link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
-       esac
-      fi
-      if test "$pass" = dlopen; then
-       # Collect dlpreopened libraries
-       save_deplibs="$deplibs"
-       deplibs=
-      fi
-      for deplib in $libs; do
-       lib=
-       found=no
-       case $deplib in
-       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-         if test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$deplib $compile_deplibs"
-           finalize_deplibs="$deplib $finalize_deplibs"
-         else
-           compiler_flags="$compiler_flags $deplib"
-         fi
-         continue
-         ;;
-       -l*)
-         if test "$linkmode" != lib && test "$linkmode" != prog; then
-           $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
-           continue
-         fi
-         name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
-         for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-           for search_ext in .la $std_shrext .so .a; do
-             # Search the libtool library
-             lib="$searchdir/lib${name}${search_ext}"
-             if test -f "$lib"; then
-               if test "$search_ext" = ".la"; then
-                 found=yes
-               else
-                 found=no
-               fi
-               break 2
-             fi
-           done
-         done
-         if test "$found" != yes; then
-           # deplib doesn't seem to be a libtool library
-           if test "$linkmode,$pass" = "prog,link"; then
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             deplibs="$deplib $deplibs"
-             test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-           fi
-           continue
-         else # deplib is a libtool library
-           # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
-           # We need to do some special things here, and not later.
-           if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-             case " $predeps $postdeps " in
-             *" $deplib "*)
-               if (${SED} -e '2q' $lib |
-                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-                 library_names=
-                 old_library=
-                 case $lib in
-                 */* | *\\*) . $lib ;;
-                 *) . ./$lib ;;
-                 esac
-                 for l in $old_library $library_names; do
-                   ll="$l"
-                 done
-                 if test "X$ll" = "X$old_library" ; then # only static version available
-                   found=no
-                   ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-                   test "X$ladir" = "X$lib" && ladir="."
-                   lib=$ladir/$old_library
-                   if test "$linkmode,$pass" = "prog,link"; then
-                     compile_deplibs="$deplib $compile_deplibs"
-                     finalize_deplibs="$deplib $finalize_deplibs"
-                   else
-                     deplibs="$deplib $deplibs"
-                     test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-                   fi
-                   continue
-                 fi
-               fi
-               ;;
-             *) ;;
-             esac
-           fi
-         fi
-         ;; # -l
-       -L*)
-         case $linkmode in
-         lib)
-           deplibs="$deplib $deplibs"
-           test "$pass" = conv && continue
-           newdependency_libs="$deplib $newdependency_libs"
-           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-           ;;
-         prog)
-           if test "$pass" = conv; then
-             deplibs="$deplib $deplibs"
-             continue
-           fi
-           if test "$pass" = scan; then
-             deplibs="$deplib $deplibs"
-           else
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           fi
-           newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-           ;;
-         *)
-           $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
-           ;;
-         esac # linkmode
-         continue
-         ;; # -L
-       -R*)
-         if test "$pass" = link; then
-           dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-           # Make sure the xrpath contains only unique directories.
-           case "$xrpath " in
-           *" $dir "*) ;;
-           *) xrpath="$xrpath $dir" ;;
-           esac
-         fi
-         deplibs="$deplib $deplibs"
-         continue
-         ;;
-       *.la) lib="$deplib" ;;
-       *.$libext)
-         if test "$pass" = conv; then
-           deplibs="$deplib $deplibs"
-           continue
-         fi
-         case $linkmode in
-         lib)
-           valid_a_lib=no
-           case $deplibs_check_method in
-             match_pattern*)
-               set dummy $deplibs_check_method
-               match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-               if eval $echo \"$deplib\" 2>/dev/null \
-                   | $SED 10q \
-                   | $EGREP "$match_pattern_regex" > /dev/null; then
-                 valid_a_lib=yes
-               fi
-               ;;
-             pass_all)
-               valid_a_lib=yes
-               ;;
-            esac
-           if test "$valid_a_lib" != yes; then
-             $echo
-             $echo "*** Warning: Trying to link with static lib archive $deplib."
-             $echo "*** I have the capability to make that library automatically link in when"
-             $echo "*** you link to this library.  But I can only do this if you have a"
-             $echo "*** shared version of the library, which you do not appear to have"
-             $echo "*** because the file extensions .$libext of this argument makes me believe"
-             $echo "*** that it is just a static archive that I should not used here."
-           else
-             $echo
-             $echo "*** Warning: Linking the shared library $output against the"
-             $echo "*** static library $deplib is not portable!"
-             deplibs="$deplib $deplibs"
-           fi
-           continue
-           ;;
-         prog)
-           if test "$pass" != link; then
-             deplibs="$deplib $deplibs"
-           else
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           fi
-           continue
-           ;;
-         esac # linkmode
-         ;; # *.$libext
-       *.lo | *.$objext)
-         if test "$pass" = conv; then
-           deplibs="$deplib $deplibs"
-         elif test "$linkmode" = prog; then
-           if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
-             # If there is no dlopen support or we're linking statically,
-             # we need to preload.
-             newdlprefiles="$newdlprefiles $deplib"
-             compile_deplibs="$deplib $compile_deplibs"
-             finalize_deplibs="$deplib $finalize_deplibs"
-           else
-             newdlfiles="$newdlfiles $deplib"
-           fi
-         fi
-         continue
-         ;;
-       %DEPLIBS%)
-         alldeplibs=yes
-         continue
-         ;;
-       esac # case $deplib
-       if test "$found" = yes || test -f "$lib"; then :
-       else
-         $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$ladir" = "X$lib" && ladir="."
-
-       dlname=
-       dlopen=
-       dlpreopen=
-       libdir=
-       library_names=
-       old_library=
-       # If the library was installed with an old release of libtool,
-       # it will not redefine variables installed, or shouldnotlink
-       installed=yes
-       shouldnotlink=no
-       avoidtemprpath=
-
-
-       # Read the .la file
-       case $lib in
-       */* | *\\*) . $lib ;;
-       *) . ./$lib ;;
-       esac
-
-       if test "$linkmode,$pass" = "lib,link" ||
-          test "$linkmode,$pass" = "prog,scan" ||
-          { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-         test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-         test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
-       fi
-
-       if test "$pass" = conv; then
-         # Only check for convenience libraries
-         deplibs="$lib $deplibs"
-         if test -z "$libdir"; then
-           if test -z "$old_library"; then
-             $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-             exit $EXIT_FAILURE
-           fi
-           # It is a libtool convenience library, so add in its objects.
-           convenience="$convenience $ladir/$objdir/$old_library"
-           old_convenience="$old_convenience $ladir/$objdir/$old_library"
-           tmp_libs=
-           for deplib in $dependency_libs; do
-             deplibs="$deplib $deplibs"
-              if test "X$duplicate_deps" = "Xyes" ; then
-               case "$tmp_libs " in
-               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-               esac
-              fi
-             tmp_libs="$tmp_libs $deplib"
-           done
-         elif test "$linkmode" != prog && test "$linkmode" != lib; then
-           $echo "$modename: \`$lib' is not a convenience library" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         continue
-       fi # $pass = conv
-
-
-       # Get the name of the library we link against.
-       linklib=
-       for l in $old_library $library_names; do
-         linklib="$l"
-       done
-       if test -z "$linklib"; then
-         $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # This library was specified with -dlopen.
-       if test "$pass" = dlopen; then
-         if test -z "$libdir"; then
-           $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         if test -z "$dlname" ||
-            test "$dlopen_support" != yes ||
-            test "$build_libtool_libs" = no; then
-           # If there is no dlname, no dlopen support or we're linking
-           # statically, we need to preload.  We also need to preload any
-           # dependent libraries so libltdl's deplib preloader doesn't
-           # bomb out in the load deplibs phase.
-           dlprefiles="$dlprefiles $lib $dependency_libs"
-         else
-           newdlfiles="$newdlfiles $lib"
-         fi
-         continue
-       fi # $pass = dlopen
-
-       # We need an absolute path.
-       case $ladir in
-       [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
-       *)
-         abs_ladir=`cd "$ladir" && pwd`
-         if test -z "$abs_ladir"; then
-           $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
-           $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-           abs_ladir="$ladir"
-         fi
-         ;;
-       esac
-       laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-
-       # Find the relevant object directory and library name.
-       if test "X$installed" = Xyes; then
-         if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           $echo "$modename: warning: library \`$lib' was moved." 1>&2
-           dir="$ladir"
-           absdir="$abs_ladir"
-           libdir="$abs_ladir"
-         else
-           dir="$libdir"
-           absdir="$libdir"
-         fi
-         test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
-       else
-         if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-           dir="$ladir"
-           absdir="$abs_ladir"
-           # Remove this search path later
-           notinst_path="$notinst_path $abs_ladir"
-         else
-           dir="$ladir/$objdir"
-           absdir="$abs_ladir/$objdir"
-           # Remove this search path later
-           notinst_path="$notinst_path $abs_ladir"
-         fi
-       fi # $installed = yes
-       name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-
-       # This library was specified with -dlpreopen.
-       if test "$pass" = dlpreopen; then
-         if test -z "$libdir"; then
-           $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-         # Prefer using a static library (so that no silly _DYNAMIC symbols
-         # are required to link).
-         if test -n "$old_library"; then
-           newdlprefiles="$newdlprefiles $dir/$old_library"
-         # Otherwise, use the dlname, so that lt_dlopen finds it.
-         elif test -n "$dlname"; then
-           newdlprefiles="$newdlprefiles $dir/$dlname"
-         else
-           newdlprefiles="$newdlprefiles $dir/$linklib"
-         fi
-       fi # $pass = dlpreopen
-
-       if test -z "$libdir"; then
-         # Link the convenience library
-         if test "$linkmode" = lib; then
-           deplibs="$dir/$old_library $deplibs"
-         elif test "$linkmode,$pass" = "prog,link"; then
-           compile_deplibs="$dir/$old_library $compile_deplibs"
-           finalize_deplibs="$dir/$old_library $finalize_deplibs"
-         else
-           deplibs="$lib $deplibs" # used for prog,scan pass
-         fi
-         continue
-       fi
-
-
-       if test "$linkmode" = prog && test "$pass" != link; then
-         newlib_search_path="$newlib_search_path $ladir"
-         deplibs="$lib $deplibs"
-
-         linkalldeplibs=no
-         if test "$link_all_deplibs" != no || test -z "$library_names" ||
-            test "$build_libtool_libs" = no; then
-           linkalldeplibs=yes
-         fi
-
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           case $deplib in
-           -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
-           esac
-           # Need to link against all dependency_libs?
-           if test "$linkalldeplibs" = yes; then
-             deplibs="$deplib $deplibs"
-           else
-             # Need to hardcode shared library paths
-             # or/and link against static libraries
-             newdependency_libs="$deplib $newdependency_libs"
-           fi
-           if test "X$duplicate_deps" = "Xyes" ; then
-             case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-             esac
-           fi
-           tmp_libs="$tmp_libs $deplib"
-         done # for deplib
-         continue
-       fi # $linkmode = prog...
-
-       if test "$linkmode,$pass" = "prog,link"; then
-         if test -n "$library_names" &&
-         { { test "$prefer_static_libs" = no ||
-             test "$prefer_static_libs,$installed" = "built,yes"; } ||
-           test -z "$old_library"; }; then
-           # We need to hardcode the library path
-           if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
-             # Make sure the rpath contains only unique directories.
-             case "$temp_rpath " in
-             *" $dir "*) ;;
-             *" $absdir "*) ;;
-             *) temp_rpath="$temp_rpath $absdir" ;;
-             esac
-           fi
-
-           # Hardcode the library path.
-           # Skip directories that are in the system default run-time
-           # search path.
-           case " $sys_lib_dlsearch_path " in
-           *" $absdir "*) ;;
-           *)
-             case "$compile_rpath " in
-             *" $absdir "*) ;;
-             *) compile_rpath="$compile_rpath $absdir"
-             esac
-             ;;
-           esac
-           case " $sys_lib_dlsearch_path " in
-           *" $libdir "*) ;;
-           *)
-             case "$finalize_rpath " in
-             *" $libdir "*) ;;
-             *) finalize_rpath="$finalize_rpath $libdir"
-             esac
-             ;;
-           esac
-         fi # $linkmode,$pass = prog,link...
-
-         if test "$alldeplibs" = yes &&
-            { test "$deplibs_check_method" = pass_all ||
-              { test "$build_libtool_libs" = yes &&
-                test -n "$library_names"; }; }; then
-           # We only need to search for static libraries
-           continue
-         fi
-       fi
-
-       link_static=no # Whether the deplib will be linked statically
-       use_static_libs=$prefer_static_libs
-       if test "$use_static_libs" = built && test "$installed" = yes ; then
-         use_static_libs=no
-       fi
-       if test -n "$library_names" &&
-          { test "$use_static_libs" = no || test -z "$old_library"; }; then
-         if test "$installed" = no; then
-           notinst_deplibs="$notinst_deplibs $lib"
-           need_relink=yes
-         fi
-         # This is a shared library
-
-         # Warn about portability, can't link against -module's on
-         # some systems (darwin)
-         if test "$shouldnotlink" = yes && test "$pass" = link ; then
-           $echo
-           if test "$linkmode" = prog; then
-             $echo "*** Warning: Linking the executable $output against the loadable module"
-           else
-             $echo "*** Warning: Linking the shared library $output against the loadable module"
-           fi
-           $echo "*** $linklib is not portable!"
-         fi
-         if test "$linkmode" = lib &&
-            test "$hardcode_into_libs" = yes; then
-           # Hardcode the library path.
-           # Skip directories that are in the system default run-time
-           # search path.
-           case " $sys_lib_dlsearch_path " in
-           *" $absdir "*) ;;
-           *)
-             case "$compile_rpath " in
-             *" $absdir "*) ;;
-             *) compile_rpath="$compile_rpath $absdir"
-             esac
-             ;;
-           esac
-           case " $sys_lib_dlsearch_path " in
-           *" $libdir "*) ;;
-           *)
-             case "$finalize_rpath " in
-             *" $libdir "*) ;;
-             *) finalize_rpath="$finalize_rpath $libdir"
-             esac
-             ;;
-           esac
-         fi
-
-         if test -n "$old_archive_from_expsyms_cmds"; then
-           # figure out the soname
-           set dummy $library_names
-           realname="$2"
-           shift; shift
-           libname=`eval \\$echo \"$libname_spec\"`
-           # use dlname if we got it. it's perfectly good, no?
-           if test -n "$dlname"; then
-             soname="$dlname"
-           elif test -n "$soname_spec"; then
-             # bleh windows
-             case $host in
-             *cygwin* | mingw*)
-               major=`expr $current - $age`
-               versuffix="-$major"
-               ;;
-             esac
-             eval soname=\"$soname_spec\"
-           else
-             soname="$realname"
-           fi
-
-           # Make a new name for the extract_expsyms_cmds to use
-           soroot="$soname"
-           soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
-           newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
-
-           # If the library has no export list, then create one now
-           if test -f "$output_objdir/$soname-def"; then :
-           else
-             $show "extracting exported symbol list from \`$soname'"
-             save_ifs="$IFS"; IFS='~'
-             cmds=$extract_expsyms_cmds
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-             done
-             IFS="$save_ifs"
-           fi
-
-           # Create $newlib
-           if test -f "$output_objdir/$newlib"; then :; else
-             $show "generating import library for \`$soname'"
-             save_ifs="$IFS"; IFS='~'
-             cmds=$old_archive_from_expsyms_cmds
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-             done
-             IFS="$save_ifs"
-           fi
-           # make sure the library variables are pointing to the new library
-           dir=$output_objdir
-           linklib=$newlib
-         fi # test -n "$old_archive_from_expsyms_cmds"
-
-         if test "$linkmode" = prog || test "$mode" != relink; then
-           add_shlibpath=
-           add_dir=
-           add=
-           lib_linked=yes
-           case $hardcode_action in
-           immediate | unsupported)
-             if test "$hardcode_direct" = no; then
-               add="$dir/$linklib"
-               case $host in
-                 *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
-                 *-*-sysv4*uw2*) add_dir="-L$dir" ;;
-                 *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-                   *-*-unixware7*) add_dir="-L$dir" ;;
-                 *-*-darwin* )
-                   # if the lib is a module then we can not link against
-                   # it, someone is ignoring the new warnings I added
-                   if /usr/bin/file -L $add 2> /dev/null |
-                      $EGREP ": [^:]* bundle" >/dev/null ; then
-                     $echo "** Warning, lib $linklib is a module, not a shared library"
-                     if test -z "$old_library" ; then
-                       $echo
-                       $echo "** And there doesn't seem to be a static archive available"
-                       $echo "** The link will probably fail, sorry"
-                     else
-                       add="$dir/$old_library"
-                     fi
-                   fi
-               esac
-             elif test "$hardcode_minus_L" = no; then
-               case $host in
-               *-*-sunos*) add_shlibpath="$dir" ;;
-               esac
-               add_dir="-L$dir"
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = no; then
-               add_shlibpath="$dir"
-               add="-l$name"
-             else
-               lib_linked=no
-             fi
-             ;;
-           relink)
-             if test "$hardcode_direct" = yes; then
-               add="$dir/$linklib"
-             elif test "$hardcode_minus_L" = yes; then
-               add_dir="-L$dir"
-               # Try looking first in the location we're being installed to.
-               if test -n "$inst_prefix_dir"; then
-                 case $libdir in
-                   [\\/]*)
-                     add_dir="$add_dir -L$inst_prefix_dir$libdir"
-                     ;;
-                 esac
-               fi
-               add="-l$name"
-             elif test "$hardcode_shlibpath_var" = yes; then
-               add_shlibpath="$dir"
-               add="-l$name"
-             else
-               lib_linked=no
-             fi
-             ;;
-           *) lib_linked=no ;;
-           esac
-
-           if test "$lib_linked" != yes; then
-             $echo "$modename: configuration error: unsupported hardcode properties"
-             exit $EXIT_FAILURE
-           fi
-
-           if test -n "$add_shlibpath"; then
-             case :$compile_shlibpath: in
-             *":$add_shlibpath:"*) ;;
-             *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
-             esac
-           fi
-           if test "$linkmode" = prog; then
-             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
-             test -n "$add" && compile_deplibs="$add $compile_deplibs"
-           else
-             test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add $deplibs"
-             if test "$hardcode_direct" != yes && \
-                test "$hardcode_minus_L" != yes && \
-                test "$hardcode_shlibpath_var" = yes; then
-               case :$finalize_shlibpath: in
-               *":$libdir:"*) ;;
-               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-               esac
-             fi
-           fi
-         fi
-
-         if test "$linkmode" = prog || test "$mode" = relink; then
-           add_shlibpath=
-           add_dir=
-           add=
-           # Finalize command for both is simple: just hardcode it.
-           if test "$hardcode_direct" = yes; then
-             add="$libdir/$linklib"
-           elif test "$hardcode_minus_L" = yes; then
-             add_dir="-L$libdir"
-             add="-l$name"
-           elif test "$hardcode_shlibpath_var" = yes; then
-             case :$finalize_shlibpath: in
-             *":$libdir:"*) ;;
-             *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-             esac
-             add="-l$name"
-           elif test "$hardcode_automatic" = yes; then
-             if test -n "$inst_prefix_dir" &&
-                test -f "$inst_prefix_dir$libdir/$linklib" ; then
-               add="$inst_prefix_dir$libdir/$linklib"
-             else
-               add="$libdir/$linklib"
-             fi
-           else
-             # We cannot seem to hardcode it, guess we'll fake it.
-             add_dir="-L$libdir"
-             # Try looking first in the location we're being installed to.
-             if test -n "$inst_prefix_dir"; then
-               case $libdir in
-                 [\\/]*)
-                   add_dir="$add_dir -L$inst_prefix_dir$libdir"
-                   ;;
-               esac
-             fi
-             add="-l$name"
-           fi
-
-           if test "$linkmode" = prog; then
-             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
-             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
-           else
-             test -n "$add_dir" && deplibs="$add_dir $deplibs"
-             test -n "$add" && deplibs="$add $deplibs"
-           fi
-         fi
-       elif test "$linkmode" = prog; then
-         # Here we assume that one of hardcode_direct or hardcode_minus_L
-         # is not unsupported.  This is valid on all known static and
-         # shared platforms.
-         if test "$hardcode_direct" != unsupported; then
-           test -n "$old_library" && linklib="$old_library"
-           compile_deplibs="$dir/$linklib $compile_deplibs"
-           finalize_deplibs="$dir/$linklib $finalize_deplibs"
-         else
-           compile_deplibs="-l$name -L$dir $compile_deplibs"
-           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
-         fi
-       elif test "$build_libtool_libs" = yes; then
-         # Not a shared library
-         if test "$deplibs_check_method" != pass_all; then
-           # We're trying link a shared library against a static one
-           # but the system doesn't support it.
-
-           # Just print a warning and add the library to dependency_libs so
-           # that the program can be linked against the static library.
-           $echo
-           $echo "*** Warning: This system can not link to static lib archive $lib."
-           $echo "*** I have the capability to make that library automatically link in when"
-           $echo "*** you link to this library.  But I can only do this if you have a"
-           $echo "*** shared version of the library, which you do not appear to have."
-           if test "$module" = yes; then
-             $echo "*** But as you try to build a module library, libtool will still create "
-             $echo "*** a static module, that should work as long as the dlopening application"
-             $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
-             if test -z "$global_symbol_pipe"; then
-               $echo
-               $echo "*** However, this would only work if libtool was able to extract symbol"
-               $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-               $echo "*** not find such a program.  So, this module is probably useless."
-               $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-             fi
-             if test "$build_old_libs" = no; then
-               build_libtool_libs=module
-               build_old_libs=yes
-             else
-               build_libtool_libs=no
-             fi
-           fi
-         else
-           deplibs="$dir/$old_library $deplibs"
-           link_static=yes
-         fi
-       fi # link shared/static library?
-
-       if test "$linkmode" = lib; then
-         if test -n "$dependency_libs" &&
-            { test "$hardcode_into_libs" != yes ||
-              test "$build_old_libs" = yes ||
-              test "$link_static" = yes; }; then
-           # Extract -R from dependency_libs
-           temp_deplibs=
-           for libdir in $dependency_libs; do
-             case $libdir in
-             -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
-                  case " $xrpath " in
-                  *" $temp_xrpath "*) ;;
-                  *) xrpath="$xrpath $temp_xrpath";;
-                  esac;;
-             *) temp_deplibs="$temp_deplibs $libdir";;
-             esac
-           done
-           dependency_libs="$temp_deplibs"
-         fi
-
-         newlib_search_path="$newlib_search_path $absdir"
-         # Link against this library
-         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
-         # ... and its dependency_libs
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           newdependency_libs="$deplib $newdependency_libs"
-           if test "X$duplicate_deps" = "Xyes" ; then
-             case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-             esac
-           fi
-           tmp_libs="$tmp_libs $deplib"
-         done
-
-         if test "$link_all_deplibs" != no; then
-           # Add the search paths of all dependency libraries
-           for deplib in $dependency_libs; do
-             case $deplib in
-             -L*) path="$deplib" ;;
-             *.la)
-               dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
-               test "X$dir" = "X$deplib" && dir="."
-               # We need an absolute path.
-               case $dir in
-               [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-               *)
-                 absdir=`cd "$dir" && pwd`
-                 if test -z "$absdir"; then
-                   $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-                   absdir="$dir"
-                 fi
-                 ;;
-               esac
-               if grep "^installed=no" $deplib > /dev/null; then
-                 path="$absdir/$objdir"
-               else
-                 eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-                 if test -z "$libdir"; then
-                   $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-                   exit $EXIT_FAILURE
-                 fi
-                 if test "$absdir" != "$libdir"; then
-                   $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
-                 fi
-                 path="$absdir"
-               fi
-               depdepl=
-               case $host in
-               *-*-darwin*)
-                 # we do not want to link against static libs,
-                 # but need to link against shared
-                 eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-                 if test -n "$deplibrary_names" ; then
-                   for tmp in $deplibrary_names ; do
-                     depdepl=$tmp
-                   done
-                   if test -f "$path/$depdepl" ; then
-                     depdepl="$path/$depdepl"
-                   fi
-                   # do not add paths which are already there
-                   case " $newlib_search_path " in
-                   *" $path "*) ;;
-                   *) newlib_search_path="$newlib_search_path $path";;
-                   esac
-                 fi
-                 path=""
-                 ;;
-               *)
-                 path="-L$path"
-                 ;;
-               esac
-               ;;
-             -l*)
-               case $host in
-               *-*-darwin*)
-                 # Again, we only want to link against shared libraries
-                 eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
-                 for tmp in $newlib_search_path ; do
-                   if test -f "$tmp/lib$tmp_libs.dylib" ; then
-                     eval depdepl="$tmp/lib$tmp_libs.dylib"
-                     break
-                   fi
-                 done
-                 path=""
-                 ;;
-               *) continue ;;
-               esac
-               ;;
-             *) continue ;;
-             esac
-             case " $deplibs " in
-             *" $path "*) ;;
-             *) deplibs="$path $deplibs" ;;
-             esac
-             case " $deplibs " in
-             *" $depdepl "*) ;;
-             *) deplibs="$depdepl $deplibs" ;;
-             esac
-           done
-         fi # link_all_deplibs != no
-       fi # linkmode = lib
-      done # for deplib in $libs
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
-       # Link the dlpreopened libraries before other libraries
-       for deplib in $save_deplibs; do
-         deplibs="$deplib $deplibs"
-       done
-      fi
-      if test "$pass" != dlopen; then
-       if test "$pass" != conv; then
-         # Make sure lib_search_path contains only unique directories.
-         lib_search_path=
-         for dir in $newlib_search_path; do
-           case "$lib_search_path " in
-           *" $dir "*) ;;
-           *) lib_search_path="$lib_search_path $dir" ;;
-           esac
-         done
-         newlib_search_path=
-       fi
-
-       if test "$linkmode,$pass" != "prog,link"; then
-         vars="deplibs"
-       else
-         vars="compile_deplibs finalize_deplibs"
-       fi
-       for var in $vars dependency_libs; do
-         # Add libraries to $var in reverse order
-         eval tmp_libs=\"\$$var\"
-         new_libs=
-         for deplib in $tmp_libs; do
-           # FIXME: Pedantically, this is the right thing to do, so
-           #        that some nasty dependency loop isn't accidentally
-           #        broken:
-           #new_libs="$deplib $new_libs"
-           # Pragmatically, this seems to cause very few problems in
-           # practice:
-           case $deplib in
-           -L*) new_libs="$deplib $new_libs" ;;
-           -R*) ;;
-           *)
-             # And here is the reason: when a library appears more
-             # than once as an explicit dependence of a library, or
-             # is implicitly linked in more than once by the
-             # compiler, it is considered special, and multiple
-             # occurrences thereof are not removed.  Compare this
-             # with having the same library being listed as a
-             # dependency of multiple other libraries: in this case,
-             # we know (pedantically, we assume) the library does not
-             # need to be listed more than once, so we keep only the
-             # last copy.  This is not always right, but it is rare
-             # enough that we require users that really mean to play
-             # such unportable linking tricks to link the library
-             # using -Wl,-lname, so that libtool does not consider it
-             # for duplicate removal.
-             case " $specialdeplibs " in
-             *" $deplib "*) new_libs="$deplib $new_libs" ;;
-             *)
-               case " $new_libs " in
-               *" $deplib "*) ;;
-               *) new_libs="$deplib $new_libs" ;;
-               esac
-               ;;
-             esac
-             ;;
-           esac
-         done
-         tmp_libs=
-         for deplib in $new_libs; do
-           case $deplib in
-           -L*)
-             case " $tmp_libs " in
-             *" $deplib "*) ;;
-             *) tmp_libs="$tmp_libs $deplib" ;;
-             esac
-             ;;
-           *) tmp_libs="$tmp_libs $deplib" ;;
-           esac
-         done
-         eval $var=\"$tmp_libs\"
-       done # for var
-      fi
-      # Last step: remove runtime libs from dependency_libs
-      # (they stay in deplibs)
-      tmp_libs=
-      for i in $dependency_libs ; do
-       case " $predeps $postdeps $compiler_lib_search_path " in
-       *" $i "*)
-         i=""
-         ;;
-       esac
-       if test -n "$i" ; then
-         tmp_libs="$tmp_libs $i"
-       fi
-      done
-      dependency_libs=$tmp_libs
-    done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
-      dlprefiles="$newdlprefiles"
-    fi
-
-    case $linkmode in
-    oldlib)
-      if test -n "$deplibs"; then
-       $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-       $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-       $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-       $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
-      ;;
-
-    lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case $outputname in
-      lib*)
-       name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-       eval shared_ext=\"$shrext_cmds\"
-       eval libname=\"$libname_spec\"
-       ;;
-      *)
-       if test "$module" = no; then
-         $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-       if test "$need_lib_prefix" != no; then
-         # Add the "lib" prefix for modules if required
-         name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-         eval shared_ext=\"$shrext_cmds\"
-         eval libname=\"$libname_spec\"
-       else
-         libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-       fi
-       ;;
-      esac
-
-      if test -n "$objs"; then
-       if test "$deplibs_check_method" != pass_all; then
-         $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
-         exit $EXIT_FAILURE
-       else
-         $echo
-         $echo "*** Warning: Linking the shared library $output against the non-libtool"
-         $echo "*** objects $objs is not portable!"
-         libobjs="$libobjs $objs"
-       fi
-      fi
-
-      if test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
-      fi
-
-      set dummy $rpath
-      if test "$#" -gt 2; then
-       $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
-
-      oldlibs=
-      if test -z "$rpath"; then
-       if test "$build_libtool_libs" = yes; then
-         # Building a libtool convenience library.
-         # Some compilers have problems with a `.al' extension so
-         # convenience libraries should have the same extension an
-         # archive normally would.
-         oldlibs="$output_objdir/$libname.$libext $oldlibs"
-         build_libtool_libs=convenience
-         build_old_libs=yes
-       fi
-
-       if test -n "$vinfo"; then
-         $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
-       fi
-
-       if test -n "$release"; then
-         $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-       fi
-      else
-
-       # Parse the version information argument.
-       save_ifs="$IFS"; IFS=':'
-       set dummy $vinfo 0 0 0
-       IFS="$save_ifs"
-
-       if test -n "$8"; then
-         $echo "$modename: too many parameters to \`-version-info'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # convert absolute version numbers to libtool ages
-       # this retains compatibility with .la files and attempts
-       # to make the code below a bit more comprehensible
-
-       case $vinfo_number in
-       yes)
-         number_major="$2"
-         number_minor="$3"
-         number_revision="$4"
-         #
-         # There are really only two kinds -- those that
-         # use the current revision as the major version
-         # and those that subtract age and use age as
-         # a minor version.  But, then there is irix
-         # which has an extra 1 added just for fun
-         #
-         case $version_type in
-         darwin|linux|osf|windows|none)
-           current=`expr $number_major + $number_minor`
-           age="$number_minor"
-           revision="$number_revision"
-           ;;
-         freebsd-aout|freebsd-elf|sunos)
-           current="$number_major"
-           revision="$number_minor"
-           age="0"
-           ;;
-         irix|nonstopux)
-           current=`expr $number_major + $number_minor - 1`
-           age="$number_minor"
-           revision="$number_minor"
-           ;;
-         esac
-         ;;
-       no)
-         current="$2"
-         revision="$3"
-         age="$4"
-         ;;
-       esac
-
-       # Check that each of the things are valid numbers.
-       case $current in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       case $revision in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       case $age in
-       0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-       *)
-         $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       if test "$age" -gt "$current"; then
-         $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-         $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # Calculate the version variables.
-       major=
-       versuffix=
-       verstring=
-       case $version_type in
-       none) ;;
-
-       darwin)
-         # Like Linux, but with the current version available in
-         # verstring for coding it into the library header
-         major=.`expr $current - $age`
-         versuffix="$major.$age.$revision"
-         # Darwin ld doesn't like 0 for these options...
-         minor_current=`expr $current + 1`
-         verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
-         ;;
-
-       freebsd-aout)
-         major=".$current"
-         versuffix=".$current.$revision";
-         ;;
-
-       freebsd-elf)
-         major=".$current"
-         versuffix=".$current";
-         ;;
-
-       irix | nonstopux)
-         major=`expr $current - $age + 1`
-
-         case $version_type in
-           nonstopux) verstring_prefix=nonstopux ;;
-           *)         verstring_prefix=sgi ;;
-         esac
-         verstring="$verstring_prefix$major.$revision"
-
-         # Add in all the interfaces that we are compatible with.
-         loop=$revision
-         while test "$loop" -ne 0; do
-           iface=`expr $revision - $loop`
-           loop=`expr $loop - 1`
-           verstring="$verstring_prefix$major.$iface:$verstring"
-         done
-
-         # Before this point, $major must not contain `.'.
-         major=.$major
-         versuffix="$major.$revision"
-         ;;
-
-       linux)
-         major=.`expr $current - $age`
-         versuffix="$major.$age.$revision"
-         ;;
-
-       osf)
-         major=.`expr $current - $age`
-         versuffix=".$current.$age.$revision"
-         verstring="$current.$age.$revision"
-
-         # Add in all the interfaces that we are compatible with.
-         loop=$age
-         while test "$loop" -ne 0; do
-           iface=`expr $current - $loop`
-           loop=`expr $loop - 1`
-           verstring="$verstring:${iface}.0"
-         done
-
-         # Make executables depend on our current version.
-         verstring="$verstring:${current}.0"
-         ;;
-
-       sunos)
-         major=".$current"
-         versuffix=".$current.$revision"
-         ;;
-
-       windows)
-         # Use '-' rather than '.', since we only want one
-         # extension on DOS 8.3 filesystems.
-         major=`expr $current - $age`
-         versuffix="-$major"
-         ;;
-
-       *)
-         $echo "$modename: unknown library version type \`$version_type'" 1>&2
-         $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       # Clear the version info if we defaulted, and they specified a release.
-       if test -z "$vinfo" && test -n "$release"; then
-         major=
-         case $version_type in
-         darwin)
-           # we can't check for "0.0" in archive_cmds due to quoting
-           # problems, so we reset it completely
-           verstring=
-           ;;
-         *)
-           verstring="0.0"
-           ;;
-         esac
-         if test "$need_version" = no; then
-           versuffix=
-         else
-           versuffix=".0.0"
-         fi
-       fi
-
-       # Remove version info from name if versioning should be avoided
-       if test "$avoid_version" = yes && test "$need_version" = no; then
-         major=
-         versuffix=
-         verstring=""
-       fi
-
-       # Check to see if the archive will have undefined symbols.
-       if test "$allow_undefined" = yes; then
-         if test "$allow_undefined_flag" = unsupported; then
-           $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-           build_libtool_libs=no
-           build_old_libs=yes
-         fi
-       else
-         # Don't allow undefined symbols.
-         allow_undefined_flag="$no_undefined_flag"
-       fi
-      fi
-
-      if test "$mode" != relink; then
-       # Remove our outputs, but don't remove object files since they
-       # may have been created when compiling PIC objects.
-       removelist=
-       tempremovelist=`$echo "$output_objdir/*"`
-       for p in $tempremovelist; do
-         case $p in
-           *.$objext)
-              ;;
-           $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-              if test "X$precious_files_regex" != "X"; then
-                if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
-                then
-                  continue
-                fi
-              fi
-              removelist="$removelist $p"
-              ;;
-           *) ;;
-         esac
-       done
-       if test -n "$removelist"; then
-         $show "${rm}r $removelist"
-         $run ${rm}r $removelist
-       fi
-      fi
-
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-       oldlibs="$oldlibs $output_objdir/$libname.$libext"
-
-       # Transform .lo files to .o files.
-       oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
-
-      # Eliminate all temporary directories.
-#      for path in $notinst_path; do
-#      lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
-#      deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
-#      dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
-#      done
-
-      if test -n "$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       temp_xrpath=
-       for libdir in $xrpath; do
-         temp_xrpath="$temp_xrpath -R$libdir"
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
-         esac
-       done
-       if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
-         dependency_libs="$temp_xrpath $dependency_libs"
-       fi
-      fi
-
-      # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
-      dlfiles=
-      for lib in $old_dlfiles; do
-       case " $dlprefiles $dlfiles " in
-       *" $lib "*) ;;
-       *) dlfiles="$dlfiles $lib" ;;
-       esac
-      done
-
-      # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
-      dlprefiles=
-      for lib in $old_dlprefiles; do
-       case "$dlprefiles " in
-       *" $lib "*) ;;
-       *) dlprefiles="$dlprefiles $lib" ;;
-       esac
-      done
-
-      if test "$build_libtool_libs" = yes; then
-       if test -n "$rpath"; then
-         case $host in
-         *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
-           # these systems don't actually have a c library (as such)!
-           ;;
-         *-*-rhapsody* | *-*-darwin1.[012])
-           # Rhapsody C library is in the System framework
-           deplibs="$deplibs -framework System"
-           ;;
-         *-*-netbsd*)
-           # Don't link with libc until the a.out ld.so is fixed.
-           ;;
-         *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-           # Do not include libc due to us having libc/libc_r.
-           ;;
-         *-*-sco3.2v5* | *-*-sco5v6*)
-           # Causes problems with __ctype
-           ;;
-         *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-           # Compiler inserts libc in the correct place for threads to work
-           ;;
-         *)
-           # Add libc to deplibs on all other systems if necessary.
-           if test "$build_libtool_need_lc" = "yes"; then
-             deplibs="$deplibs -lc"
-           fi
-           ;;
-         esac
-       fi
-
-       # Transform deplibs into only deplibs that can be linked in shared.
-       name_save=$name
-       libname_save=$libname
-       release_save=$release
-       versuffix_save=$versuffix
-       major_save=$major
-       # I'm not sure if I'm treating the release correctly.  I think
-       # release should show up in the -l (ie -lgmp5) so we don't want to
-       # add it in twice.  Is that correct?
-       release=""
-       versuffix=""
-       major=""
-       newdeplibs=
-       droppeddeps=no
-       case $deplibs_check_method in
-       pass_all)
-         # Don't check for shared/static.  Everything works.
-         # This might be a little naive.  We might want to check
-         # whether the library exists or not.  But this is on
-         # osf3 & osf4 and I'm not really sure... Just
-         # implementing what was already the behavior.
-         newdeplibs=$deplibs
-         ;;
-       test_compile)
-         # This code stresses the "libraries are programs" paradigm to its
-         # limits. Maybe even breaks it.  We compile a program, linking it
-         # against the deplibs as a proxy for the library.  Then we can check
-         # whether they linked in statically or dynamically with ldd.
-         $rm conftest.c
-         cat > conftest.c <<EOF
-         int main() { return 0; }
-EOF
-         $rm conftest
-      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
-           ldd_output=`ldd conftest`
-           for i in $deplibs; do
-             name=`expr $i : '-l\(.*\)'`
-             # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-               if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                 case " $predeps $postdeps " in
-                 *" $i "*)
-                   newdeplibs="$newdeplibs $i"
-                   i=""
-                   ;;
-                 esac
-               fi
-               if test -n "$i" ; then
-                 libname=`eval \\$echo \"$libname_spec\"`
-                 deplib_matches=`eval \\$echo \"$library_names_spec\"`
-                 set dummy $deplib_matches
-                 deplib_match=$2
-                 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                   newdeplibs="$newdeplibs $i"
-                 else
-                   droppeddeps=yes
-                   $echo
-                   $echo "*** Warning: dynamic linker does not accept needed library $i."
-                   $echo "*** I have the capability to make that library automatically link in when"
-                   $echo "*** you link to this library.  But I can only do this if you have a"
-                   $echo "*** shared version of the library, which I believe you do not have"
-                   $echo "*** because a test_compile did reveal that the linker did not use it for"
-                   $echo "*** its dynamic dependency list that programs get resolved with at runtime."
-                 fi
-               fi
-             else
-               newdeplibs="$newdeplibs $i"
-             fi
-           done
-         else
-           # Error occurred in the first compile.  Let's try to salvage
-           # the situation: Compile a separate program for each library.
-           for i in $deplibs; do
-             name=`expr $i : '-l\(.*\)'`
-             # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-               $rm conftest
-               if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
-                 ldd_output=`ldd conftest`
-                 if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-                   case " $predeps $postdeps " in
-                   *" $i "*)
-                     newdeplibs="$newdeplibs $i"
-                     i=""
-                     ;;
-                   esac
-                 fi
-                 if test -n "$i" ; then
-                   libname=`eval \\$echo \"$libname_spec\"`
-                   deplib_matches=`eval \\$echo \"$library_names_spec\"`
-                   set dummy $deplib_matches
-                   deplib_match=$2
-                   if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-                     newdeplibs="$newdeplibs $i"
-                   else
-                     droppeddeps=yes
-                     $echo
-                     $echo "*** Warning: dynamic linker does not accept needed library $i."
-                     $echo "*** I have the capability to make that library automatically link in when"
-                     $echo "*** you link to this library.  But I can only do this if you have a"
-                     $echo "*** shared version of the library, which you do not appear to have"
-                     $echo "*** because a test_compile did reveal that the linker did not use this one"
-                     $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
-                   fi
-                 fi
-               else
-                 droppeddeps=yes
-                 $echo
-                 $echo "*** Warning!  Library $i is needed by this library but I was not able to"
-                 $echo "*** make it link in!  You will probably need to install it or some"
-                 $echo "*** library that it depends on before this library will be fully"
-                 $echo "*** functional.  Installing it before continuing would be even better."
-               fi
-             else
-               newdeplibs="$newdeplibs $i"
-             fi
-           done
-         fi
-         ;;
-       file_magic*)
-         set dummy $deplibs_check_method
-         file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-         for a_deplib in $deplibs; do
-           name=`expr $a_deplib : '-l\(.*\)'`
-           # If $name is empty we are operating on a -L argument.
-            if test "$name" != "" && test  "$name" != "0"; then
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-               case " $predeps $postdeps " in
-               *" $a_deplib "*)
-                 newdeplibs="$newdeplibs $a_deplib"
-                 a_deplib=""
-                 ;;
-               esac
-             fi
-             if test -n "$a_deplib" ; then
-               libname=`eval \\$echo \"$libname_spec\"`
-               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-                 for potent_lib in $potential_libs; do
-                     # Follow soft links.
-                     if ls -lLd "$potent_lib" 2>/dev/null \
-                        | grep " -> " >/dev/null; then
-                       continue
-                     fi
-                     # The statement above tries to avoid entering an
-                     # endless loop below, in case of cyclic links.
-                     # We might still enter an endless loop, since a link
-                     # loop can be closed while we follow links,
-                     # but so what?
-                     potlib="$potent_lib"
-                     while test -h "$potlib" 2>/dev/null; do
-                       potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
-                       case $potliblink in
-                       [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-                       *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-                       esac
-                     done
-                     if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-                        | ${SED} 10q \
-                        | $EGREP "$file_magic_regex" > /dev/null; then
-                       newdeplibs="$newdeplibs $a_deplib"
-                       a_deplib=""
-                       break 2
-                     fi
-                 done
-               done
-             fi
-             if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               $echo
-               $echo "*** Warning: linker path does not have real file for library $a_deplib."
-               $echo "*** I have the capability to make that library automatically link in when"
-               $echo "*** you link to this library.  But I can only do this if you have a"
-               $echo "*** shared version of the library, which you do not appear to have"
-               $echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
-                 $echo "*** with $libname but no candidates were found. (...for file magic test)"
-               else
-                 $echo "*** with $libname and none of the candidates passed a file format test"
-                 $echo "*** using a file magic. Last file checked: $potlib"
-               fi
-             fi
-           else
-             # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
-           fi
-         done # Gone through all deplibs.
-         ;;
-       match_pattern*)
-         set dummy $deplibs_check_method
-         match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-         for a_deplib in $deplibs; do
-           name=`expr $a_deplib : '-l\(.*\)'`
-           # If $name is empty we are operating on a -L argument.
-           if test -n "$name" && test "$name" != "0"; then
-             if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-               case " $predeps $postdeps " in
-               *" $a_deplib "*)
-                 newdeplibs="$newdeplibs $a_deplib"
-                 a_deplib=""
-                 ;;
-               esac
-             fi
-             if test -n "$a_deplib" ; then
-               libname=`eval \\$echo \"$libname_spec\"`
-               for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-                 potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-                 for potent_lib in $potential_libs; do
-                   potlib="$potent_lib" # see symlink-check above in file_magic test
-                   if eval $echo \"$potent_lib\" 2>/dev/null \
-                       | ${SED} 10q \
-                       | $EGREP "$match_pattern_regex" > /dev/null; then
-                     newdeplibs="$newdeplibs $a_deplib"
-                     a_deplib=""
-                     break 2
-                   fi
-                 done
-               done
-             fi
-             if test -n "$a_deplib" ; then
-               droppeddeps=yes
-               $echo
-               $echo "*** Warning: linker path does not have real file for library $a_deplib."
-               $echo "*** I have the capability to make that library automatically link in when"
-               $echo "*** you link to this library.  But I can only do this if you have a"
-               $echo "*** shared version of the library, which you do not appear to have"
-               $echo "*** because I did check the linker path looking for a file starting"
-               if test -z "$potlib" ; then
-                 $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
-               else
-                 $echo "*** with $libname and none of the candidates passed a file format test"
-                 $echo "*** using a regex pattern. Last file checked: $potlib"
-               fi
-             fi
-           else
-             # Add a -L argument.
-             newdeplibs="$newdeplibs $a_deplib"
-           fi
-         done # Gone through all deplibs.
-         ;;
-       none | unknown | *)
-         newdeplibs=""
-         tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-           -e 's/ -[LR][^ ]*//g'`
-         if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-           for i in $predeps $postdeps ; do
-             # can't use Xsed below, because $i might contain '/'
-             tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
-           done
-         fi
-         if $echo "X $tmp_deplibs" | $Xsed -e 's/[     ]//g' \
-           | grep . >/dev/null; then
-           $echo
-           if test "X$deplibs_check_method" = "Xnone"; then
-             $echo "*** Warning: inter-library dependencies are not supported in this platform."
-           else
-             $echo "*** Warning: inter-library dependencies are not known to be supported."
-           fi
-           $echo "*** All declared inter-library dependencies are being dropped."
-           droppeddeps=yes
-         fi
-         ;;
-       esac
-       versuffix=$versuffix_save
-       major=$major_save
-       release=$release_save
-       libname=$libname_save
-       name=$name_save
-
-       case $host in
-       *-*-rhapsody* | *-*-darwin1.[012])
-         # On Rhapsody replace the C library is the System framework
-         newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
-         ;;
-       esac
-
-       if test "$droppeddeps" = yes; then
-         if test "$module" = yes; then
-           $echo
-           $echo "*** Warning: libtool could not satisfy all declared inter-library"
-           $echo "*** dependencies of module $libname.  Therefore, libtool will create"
-           $echo "*** a static module, that should work as long as the dlopening"
-           $echo "*** application is linked with the -dlopen flag."
-           if test -z "$global_symbol_pipe"; then
-             $echo
-             $echo "*** However, this would only work if libtool was able to extract symbol"
-             $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-             $echo "*** not find such a program.  So, this module is probably useless."
-             $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-           fi
-           if test "$build_old_libs" = no; then
-             oldlibs="$output_objdir/$libname.$libext"
-             build_libtool_libs=module
-             build_old_libs=yes
-           else
-             build_libtool_libs=no
-           fi
-         else
-           $echo "*** The inter-library dependencies that have been dropped here will be"
-           $echo "*** automatically added whenever a program is linked with this library"
-           $echo "*** or is declared to -dlopen it."
-
-           if test "$allow_undefined" = no; then
-             $echo
-             $echo "*** Since this library must not contain undefined symbols,"
-             $echo "*** because either the platform does not support them or"
-             $echo "*** it was explicitly requested with -no-undefined,"
-             $echo "*** libtool will only create a static version of it."
-             if test "$build_old_libs" = no; then
-               oldlibs="$output_objdir/$libname.$libext"
-               build_libtool_libs=module
-               build_old_libs=yes
-             else
-               build_libtool_libs=no
-             fi
-           fi
-         fi
-       fi
-       # Done checking deplibs!
-       deplibs=$newdeplibs
-      fi
-
-
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-       case " $new_libs " in
-       *" -L$path/$objdir "*) ;;
-       *)
-         case " $deplibs " in
-         *" -L$path/$objdir "*)
-           new_libs="$new_libs -L$path/$objdir" ;;
-         esac
-         ;;
-       esac
-      done
-      for deplib in $deplibs; do
-       case $deplib in
-       -L*)
-         case " $new_libs " in
-         *" $deplib "*) ;;
-         *) new_libs="$new_libs $deplib" ;;
-         esac
-         ;;
-       *) new_libs="$new_libs $deplib" ;;
-       esac
-      done
-      deplibs="$new_libs"
-
-
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
-
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-       if test "$hardcode_into_libs" = yes; then
-         # Hardcode the library paths
-         hardcode_libdirs=
-         dep_rpath=
-         rpath="$finalize_rpath"
-         test "$mode" != relink && rpath="$compile_rpath$rpath"
-         for libdir in $rpath; do
-           if test -n "$hardcode_libdir_flag_spec"; then
-             if test -n "$hardcode_libdir_separator"; then
-               if test -z "$hardcode_libdirs"; then
-                 hardcode_libdirs="$libdir"
-               else
-                 # Just accumulate the unique libdirs.
-                 case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-                 *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-                   ;;
-                 *)
-                   hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-                   ;;
-                 esac
-               fi
-             else
-               eval flag=\"$hardcode_libdir_flag_spec\"
-               dep_rpath="$dep_rpath $flag"
-             fi
-           elif test -n "$runpath_var"; then
-             case "$perm_rpath " in
-             *" $libdir "*) ;;
-             *) perm_rpath="$perm_rpath $libdir" ;;
-             esac
-           fi
-         done
-         # Substitute the hardcoded libdirs into the rpath.
-         if test -n "$hardcode_libdir_separator" &&
-            test -n "$hardcode_libdirs"; then
-           libdir="$hardcode_libdirs"
-           if test -n "$hardcode_libdir_flag_spec_ld"; then
-             eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-           else
-             eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-           fi
-         fi
-         if test -n "$runpath_var" && test -n "$perm_rpath"; then
-           # We should set the runpath_var.
-           rpath=
-           for dir in $perm_rpath; do
-             rpath="$rpath$dir:"
-           done
-           eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
-         fi
-         test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
-       fi
-
-       shlibpath="$finalize_shlibpath"
-       test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
-       if test -n "$shlibpath"; then
-         eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
-       fi
-
-       # Get the real and link names of the library.
-       eval shared_ext=\"$shrext_cmds\"
-       eval library_names=\"$library_names_spec\"
-       set dummy $library_names
-       realname="$2"
-       shift; shift
-
-       if test -n "$soname_spec"; then
-         eval soname=\"$soname_spec\"
-       else
-         soname="$realname"
-       fi
-       if test -z "$dlname"; then
-         dlname=$soname
-       fi
-
-       lib="$output_objdir/$realname"
-       linknames=
-       for link
-       do
-         linknames="$linknames $link"
-       done
-
-       # Use standard objects if they are pic
-       test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-
-       # Prepare the list of exported symbols
-       if test -z "$export_symbols"; then
-         if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-           $show "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
-           $run $rm $export_symbols
-           cmds=$export_symbols_cmds
-           save_ifs="$IFS"; IFS='~'
-           for cmd in $cmds; do
-             IFS="$save_ifs"
-             eval cmd=\"$cmd\"
-             if len=`expr "X$cmd" : ".*"` &&
-              test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-               $show "$cmd"
-               $run eval "$cmd" || exit $?
-               skipped_export=false
-             else
-               # The command line is too long to execute in one step.
-               $show "using reloadable object file for export list..."
-               skipped_export=:
-               # Break out early, otherwise skipped_export may be
-               # set to false by a later but shorter cmd.
-               break
-             fi
-           done
-           IFS="$save_ifs"
-           if test -n "$export_symbols_regex"; then
-             $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-             $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-             $show "$mv \"${export_symbols}T\" \"$export_symbols\""
-             $run eval '$mv "${export_symbols}T" "$export_symbols"'
-           fi
-         fi
-       fi
-
-       if test -n "$export_symbols" && test -n "$include_expsyms"; then
-         $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-       fi
-
-       tmp_deplibs=
-       for test_deplib in $deplibs; do
-               case " $convenience " in
-               *" $test_deplib "*) ;;
-               *)
-                       tmp_deplibs="$tmp_deplibs $test_deplib"
-                       ;;
-               esac
-       done
-       deplibs="$tmp_deplibs"
-
-       if test -n "$convenience"; then
-         if test -n "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-         else
-           gentop="$output_objdir/${outputname}x"
-           generated="$generated $gentop"
-
-           func_extract_archives $gentop $convenience
-           libobjs="$libobjs $func_extract_archives_result"
-         fi
-       fi
-       
-       if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-         eval flag=\"$thread_safe_flag_spec\"
-         linker_flags="$linker_flags $flag"
-       fi
-
-       # Make a backup of the uninstalled library when relinking
-       if test "$mode" = relink; then
-         $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
-       fi
-
-       # Do each of the archive commands.
-       if test "$module" = yes && test -n "$module_cmds" ; then
-         if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-           eval test_cmds=\"$module_expsym_cmds\"
-           cmds=$module_expsym_cmds
-         else
-           eval test_cmds=\"$module_cmds\"
-           cmds=$module_cmds
-         fi
-       else
-       if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-         eval test_cmds=\"$archive_expsym_cmds\"
-         cmds=$archive_expsym_cmds
-       else
-         eval test_cmds=\"$archive_cmds\"
-         cmds=$archive_cmds
-         fi
-       fi
-
-       if test "X$skipped_export" != "X:" &&
-          len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-          test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         :
-       else
-         # The command line is too long to link in one step, link piecewise.
-         $echo "creating reloadable object files..."
-
-         # Save the value of $output and $libobjs because we want to
-         # use them later.  If we have whole_archive_flag_spec, we
-         # want to use save_libobjs as it was before
-         # whole_archive_flag_spec was expanded, because we can't
-         # assume the linker understands whole_archive_flag_spec.
-         # This may have to be revisited, in case too many
-         # convenience libraries get linked in and end up exceeding
-         # the spec.
-         if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
-           save_libobjs=$libobjs
-         fi
-         save_output=$output
-         output_la=`$echo "X$output" | $Xsed -e "$basename"`
-
-         # Clear the reloadable object creation command queue and
-         # initialize k to one.
-         test_cmds=
-         concat_cmds=
-         objlist=
-         delfiles=
-         last_robj=
-         k=1
-         output=$output_objdir/$output_la-${k}.$objext
-         # Loop over the list of objects to be linked.
-         for obj in $save_libobjs
-         do
-           eval test_cmds=\"$reload_cmds $objlist $last_robj\"
-           if test "X$objlist" = X ||
-              { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-                test "$len" -le "$max_cmd_len"; }; then
-             objlist="$objlist $obj"
-           else
-             # The command $test_cmds is almost too long, add a
-             # command to the queue.
-             if test "$k" -eq 1 ; then
-               # The first file doesn't have a previous command to add.
-               eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
-             else
-               # All subsequent reloadable object files will link in
-               # the last one created.
-               eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
-             fi
-             last_robj=$output_objdir/$output_la-${k}.$objext
-             k=`expr $k + 1`
-             output=$output_objdir/$output_la-${k}.$objext
-             objlist=$obj
-             len=1
-           fi
-         done
-         # Handle the remaining objects by creating one last
-         # reloadable object file.  All subsequent reloadable object
-         # files will link in the last one created.
-         test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-         eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
-         if ${skipped_export-false}; then
-           $show "generating symbol list for \`$libname.la'"
-           export_symbols="$output_objdir/$libname.exp"
-           $run $rm $export_symbols
-           libobjs=$output
-           # Append the command to create the export file.
-           eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
-          fi
-
-         # Set up a command to remove the reloadable object files
-         # after they are used.
-         i=0
-         while test "$i" -lt "$k"
-         do
-           i=`expr $i + 1`
-           delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
-         done
-
-         $echo "creating a temporary reloadable object file: $output"
-
-         # Loop through the commands generated above and execute them.
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $concat_cmds; do
-           IFS="$save_ifs"
-           $show "$cmd"
-           $run eval "$cmd" || exit $?
-         done
-         IFS="$save_ifs"
-
-         libobjs=$output
-         # Restore the value of output.
-         output=$save_output
-
-         if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
-           eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-         fi
-         # Expand the library linking commands again to reset the
-         # value of $libobjs for piecewise linking.
-
-         # Do each of the archive commands.
-         if test "$module" = yes && test -n "$module_cmds" ; then
-           if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-             cmds=$module_expsym_cmds
-           else
-             cmds=$module_cmds
-           fi
-         else
-         if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-           cmds=$archive_expsym_cmds
-         else
-           cmds=$archive_cmds
-           fi
-         fi
-
-         # Append the command to remove the reloadable object files
-         # to the just-reset $cmds.
-         eval cmds=\"\$cmds~\$rm $delfiles\"
-       fi
-       save_ifs="$IFS"; IFS='~'
-       for cmd in $cmds; do
-         IFS="$save_ifs"
-         eval cmd=\"$cmd\"
-         $show "$cmd"
-         $run eval "$cmd" || {
-           lt_exit=$?
-
-           # Restore the uninstalled library and exit
-           if test "$mode" = relink; then
-             $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-           fi
-
-           exit $lt_exit
-         }
-       done
-       IFS="$save_ifs"
-
-       # Restore the uninstalled library and exit
-       if test "$mode" = relink; then
-         $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
-
-         if test -n "$convenience"; then
-           if test -z "$whole_archive_flag_spec"; then
-             $show "${rm}r $gentop"
-             $run ${rm}r "$gentop"
-           fi
-         fi
-
-         exit $EXIT_SUCCESS
-       fi
-
-       # Create links to the real library.
-       for linkname in $linknames; do
-         if test "$realname" != "$linkname"; then
-           $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
-           $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
-         fi
-       done
-
-       # If -module or -export-dynamic was specified, set the dlname.
-       if test "$module" = yes || test "$export_dynamic" = yes; then
-         # On all known operating systems, these are identical.
-         dlname="$soname"
-       fi
-      fi
-      ;;
-
-    obj)
-      if test -n "$deplibs"; then
-       $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-       $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$xrpath"; then
-       $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
-
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
-
-      case $output in
-      *.lo)
-       if test -n "$objs$old_deplibs"; then
-         $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-         exit $EXIT_FAILURE
-       fi
-       libobj="$output"
-       obj=`$echo "X$output" | $Xsed -e "$lo2o"`
-       ;;
-      *)
-       libobj=
-       obj="$output"
-       ;;
-      esac
-
-      # Delete the old objects.
-      $run $rm $obj $libobj
-
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec and hope we can get by with
-      # turning comma into space..
-      wl=
-
-      if test -n "$convenience"; then
-       if test -n "$whole_archive_flag_spec"; then
-         eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-      reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
-       else
-         gentop="$output_objdir/${obj}x"
-         generated="$generated $gentop"
-
-         func_extract_archives $gentop $convenience
-         reload_conv_objs="$reload_objs $func_extract_archives_result"
-       fi
-      fi
-
-      # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
-
-      output="$obj"
-      cmds=$reload_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-       IFS="$save_ifs"
-       eval cmd=\"$cmd\"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-       if test -n "$gentop"; then
-         $show "${rm}r $gentop"
-         $run ${rm}r $gentop
-       fi
-
-       exit $EXIT_SUCCESS
-      fi
-
-      if test "$build_libtool_libs" != yes; then
-       if test -n "$gentop"; then
-         $show "${rm}r $gentop"
-         $run ${rm}r $gentop
-       fi
-
-       # Create an invalid libtool object if no PIC, so that we don't
-       # accidentally link it into a program.
-       # $show "echo timestamp > $libobj"
-       # $run eval "echo timestamp > $libobj" || exit $?
-       exit $EXIT_SUCCESS
-      fi
-
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
-       # Only do commands if we really have different PIC objects.
-       reload_objs="$libobjs $reload_conv_objs"
-       output="$libobj"
-       cmds=$reload_cmds
-       save_ifs="$IFS"; IFS='~'
-       for cmd in $cmds; do
-         IFS="$save_ifs"
-         eval cmd=\"$cmd\"
-         $show "$cmd"
-         $run eval "$cmd" || exit $?
-       done
-       IFS="$save_ifs"
-      fi
-
-      if test -n "$gentop"; then
-       $show "${rm}r $gentop"
-       $run ${rm}r $gentop
-      fi
-
-      exit $EXIT_SUCCESS
-      ;;
-
-    prog)
-      case $host in
-       *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
-      esac
-      if test -n "$vinfo"; then
-       $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
-      fi
-
-      if test -n "$release"; then
-       $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
-
-      if test "$preload" = yes; then
-       if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
-          test "$dlopen_self_static" = unknown; then
-         $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
-       fi
-      fi
-
-      case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
-       # On Rhapsody replace the C library is the System framework
-       compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-       finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-       ;;
-      esac
-
-      case $host in
-      *darwin*)
-        # Don't allow lazy linking, it breaks C++ global constructors
-        if test "$tagname" = CXX ; then
-        compile_command="$compile_command ${wl}-bind_at_load"
-        finalize_command="$finalize_command ${wl}-bind_at_load"
-        fi
-        ;;
-      esac
-
-
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-       case " $new_libs " in
-       *" -L$path/$objdir "*) ;;
-       *)
-         case " $compile_deplibs " in
-         *" -L$path/$objdir "*)
-           new_libs="$new_libs -L$path/$objdir" ;;
-         esac
-         ;;
-       esac
-      done
-      for deplib in $compile_deplibs; do
-       case $deplib in
-       -L*)
-         case " $new_libs " in
-         *" $deplib "*) ;;
-         *) new_libs="$new_libs $deplib" ;;
-         esac
-         ;;
-       *) new_libs="$new_libs $deplib" ;;
-       esac
-      done
-      compile_deplibs="$new_libs"
-
-
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
-
-      if test -n "$rpath$xrpath"; then
-       # If the user specified any rpath flags, then add them.
-       for libdir in $rpath $xrpath; do
-         # This is the magic to use -rpath.
-         case "$finalize_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_rpath="$finalize_rpath $libdir" ;;
-         esac
-       done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-               ;;
-             esac
-           fi
-         else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
-         fi
-       elif test -n "$runpath_var"; then
-         case "$perm_rpath " in
-         *" $libdir "*) ;;
-         *) perm_rpath="$perm_rpath $libdir" ;;
-         esac
-       fi
-       case $host in
-       *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-         testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
-         case :$dllsearchpath: in
-         *":$libdir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$libdir";;
-         esac
-         case :$dllsearchpath: in
-         *":$testbindir:"*) ;;
-         *) dllsearchpath="$dllsearchpath:$testbindir";;
-         esac
-         ;;
-       esac
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-       if test -n "$hardcode_libdir_flag_spec"; then
-         if test -n "$hardcode_libdir_separator"; then
-           if test -z "$hardcode_libdirs"; then
-             hardcode_libdirs="$libdir"
-           else
-             # Just accumulate the unique libdirs.
-             case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-             *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-               ;;
-             *)
-               hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-               ;;
-             esac
-           fi
-         else
-           eval flag=\"$hardcode_libdir_flag_spec\"
-           rpath="$rpath $flag"
-         fi
-       elif test -n "$runpath_var"; then
-         case "$finalize_perm_rpath " in
-         *" $libdir "*) ;;
-         *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-         esac
-       fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-        test -n "$hardcode_libdirs"; then
-       libdir="$hardcode_libdirs"
-       eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-       # Transform all the library objects into standard objects.
-       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-      fi
-
-      dlsyms=
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-       if test -n "$NM" && test -n "$global_symbol_pipe"; then
-         dlsyms="${outputname}S.c"
-       else
-         $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-       fi
-      fi
-
-      if test -n "$dlsyms"; then
-       case $dlsyms in
-       "") ;;
-       *.c)
-         # Discover the nlist of each of the dlfiles.
-         nlist="$output_objdir/${outputname}.nm"
-
-         $show "$rm $nlist ${nlist}S ${nlist}T"
-         $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
-         # Parse the name list into a source file.
-         $show "creating $output_objdir/$dlsyms"
-
-         test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
-         if test "$dlself" = yes; then
-           $show "generating symbol list for \`$output'"
-
-           test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
-           # Add our own program objects to the symbol list.
-           progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-           for arg in $progfiles; do
-             $show "extracting global C symbols from \`$arg'"
-             $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-           done
-
-           if test -n "$exclude_expsyms"; then
-             $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-             $run eval '$mv "$nlist"T "$nlist"'
-           fi
-
-           if test -n "$export_symbols_regex"; then
-             $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-             $run eval '$mv "$nlist"T "$nlist"'
-           fi
-
-           # Prepare the list of exported symbols
-           if test -z "$export_symbols"; then
-             export_symbols="$output_objdir/$outputname.exp"
-             $run $rm $export_symbols
-             $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-              case $host in
-              *cygwin* | *mingw* )
-               $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-               $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
-                ;;
-              esac
-           else
-             $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
-             $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
-             $run eval 'mv "$nlist"T "$nlist"'
-              case $host in
-              *cygwin* | *mingw* )
-               $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-               $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
-                ;;
-              esac
-           fi
-         fi
-
-         for arg in $dlprefiles; do
-           $show "extracting global C symbols from \`$arg'"
-           name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
-           $run eval '$echo ": $name " >> "$nlist"'
-           $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-         done
-
-         if test -z "$run"; then
-           # Make sure we have at least an empty file.
-           test -f "$nlist" || : > "$nlist"
-
-           if test -n "$exclude_expsyms"; then
-             $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-             $mv "$nlist"T "$nlist"
-           fi
-
-           # Try sorting and uniquifying the output.
-           if grep -v "^: " < "$nlist" |
-               if sort -k 3 </dev/null >/dev/null 2>&1; then
-                 sort -k 3
-               else
-                 sort +2
-               fi |
-               uniq > "$nlist"S; then
-             :
-           else
-             grep -v "^: " < "$nlist" > "$nlist"S
-           fi
-
-           if test -f "$nlist"S; then
-             eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
-           else
-             $echo '/* NONE */' >> "$output_objdir/$dlsyms"
-           fi
-
-           $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
-
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-"
-
-           case $host in
-           *cygwin* | *mingw* )
-         $echo >> "$output_objdir/$dlsyms" "\
-/* DATA imports from DLLs on WIN32 can't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs */
-struct {
-"
-             ;;
-           * )
-         $echo >> "$output_objdir/$dlsyms" "\
-const struct {
-"
-             ;;
-           esac
-
-
-         $echo >> "$output_objdir/$dlsyms" "\
-  const char *name;
-  lt_ptr address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
-           eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
-           $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
-         fi
-
-         pic_flag_for_symtable=
-         case $host in
-         # compiling the symbol table file with pic_flag works around
-         # a FreeBSD bug that causes programs to crash when -lm is
-         # linked before any other PIC object.  But we must not use
-         # pic_flag when linking with -static.  The problem exists in
-         # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-         *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-           case "$compile_command " in
-           *" -static "*) ;;
-           *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
-           esac;;
-         *-*-hpux*)
-           case "$compile_command " in
-           *" -static "*) ;;
-           *) pic_flag_for_symtable=" $pic_flag";;
-           esac
-         esac
-
-         # Now compile the dynamic symbol file.
-         $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-         $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
-         # Clean up the generated files.
-         $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
-         $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
-         # Transform the symbol file into the correct name.
-          case $host in
-          *cygwin* | *mingw* )
-            if test -f "$output_objdir/${outputname}.def" ; then
-              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
-              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            else
-              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-             fi
-            ;;
-          * )
-            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            ;;
-          esac
-         ;;
-       *)
-         $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-      else
-       # We keep going just in case the user didn't refer to
-       # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-       # really was required.
-
-       # Nullify the symbol file.
-       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
-       finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
-      fi
-
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-       # Replace the output file specification.
-       compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
-       link_command="$compile_command$compile_rpath"
-
-       # We have no uninstalled library dependencies, so finalize right now.
-       $show "$link_command"
-       $run eval "$link_command"
-       exit_status=$?
-
-       # Delete the generated files.
-       if test -n "$dlsyms"; then
-         $show "$rm $output_objdir/${outputname}S.${objext}"
-         $run $rm "$output_objdir/${outputname}S.${objext}"
-       fi
-
-       exit $exit_status
-      fi
-
-      if test -n "$shlibpath_var"; then
-       # We should set the shlibpath_var
-       rpath=
-       for dir in $temp_rpath; do
-         case $dir in
-         [\\/]* | [A-Za-z]:[\\/]*)
-           # Absolute path.
-           rpath="$rpath$dir:"
-           ;;
-         *)
-           # Relative path: add a thisdir entry.
-           rpath="$rpath\$thisdir/$dir:"
-           ;;
-         esac
-       done
-       temp_rpath="$rpath"
-      fi
-
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-       compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-       finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
-
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-       if test -n "$perm_rpath"; then
-         # We should set the runpath_var.
-         rpath=
-         for dir in $perm_rpath; do
-           rpath="$rpath$dir:"
-         done
-         compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
-       fi
-       if test -n "$finalize_perm_rpath"; then
-         # We should set the runpath_var.
-         rpath=
-         for dir in $finalize_perm_rpath; do
-           rpath="$rpath$dir:"
-         done
-         finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
-       fi
-      fi
-
-      if test "$no_install" = yes; then
-       # We don't need to create a wrapper script.
-       link_command="$compile_var$compile_command$compile_rpath"
-       # Replace the output file specification.
-       link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-       # Delete the old output file.
-       $run $rm $output
-       # Link the executable and exit
-       $show "$link_command"
-       $run eval "$link_command" || exit $?
-       exit $EXIT_SUCCESS
-      fi
-
-      if test "$hardcode_action" = relink; then
-       # Fast installation is not supported
-       link_command="$compile_var$compile_command$compile_rpath"
-       relink_command="$finalize_var$finalize_command$finalize_rpath"
-
-       $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-       $echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-       if test "$fast_install" != no; then
-         link_command="$finalize_var$compile_command$finalize_rpath"
-         if test "$fast_install" = yes; then
-           relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
-         else
-           # fast_install is set to needless
-           relink_command=
-         fi
-       else
-         link_command="$compile_var$compile_command$compile_rpath"
-         relink_command="$finalize_var$finalize_command$finalize_rpath"
-       fi
-      fi
-
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
-
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
-
-      # Now create the wrapper script.
-      $show "creating $output"
-
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-       # Preserve any variables that may affect compiler behavior
-       for var in $variables_saved_for_relink; do
-         if eval test -z \"\${$var+set}\"; then
-           relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-         elif eval var_value=\$$var; test -z "$var_value"; then
-           relink_command="$var=; export $var; $relink_command"
-         else
-           var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-           relink_command="$var=\"$var_value\"; export $var; $relink_command"
-         fi
-       done
-       relink_command="(cd `pwd`; $relink_command)"
-       relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
-      fi
-
-      # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
-       case $progpath in
-       [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-       *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-       esac
-       qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-       qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-       # win32 will think the script is a binary if it has
-       # a .exe suffix, so we strip it off here.
-       case $output in
-         *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
-       esac
-       # test for cygwin because mv fails w/o .exe extensions
-       case $host in
-         *cygwin*)
-           exeext=.exe
-           outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
-         *) exeext= ;;
-       esac
-       case $host in
-         *cygwin* | *mingw* )
-            output_name=`basename $output`
-            output_path=`dirname $output`
-            cwrappersource="$output_path/$objdir/lt-$output_name.c"
-            cwrapper="$output_path/$output_name.exe"
-            $rm $cwrappersource $cwrapper
-            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
-           cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
-
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "/bin/sh $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
-*/
-EOF
-           cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# ifndef DIR_SEPARATOR_2
-#  define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-#  define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
-        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-/* -DDEBUG is fairly common in CFLAGS.  */
-#undef DEBUG
-#if defined DEBUGWRAPPER
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
-#else
-# define DEBUG(format, ...)
-#endif
-
-const char *program_name = NULL;
-
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-const char * base_name (const char *name);
-char * find_executable(const char *wrapper);
-int    check_executable(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int i;
-
-  program_name = (char *) xstrdup (base_name (argv[0]));
-  DEBUG("(main) argv[0]      : %s\n",argv[0]);
-  DEBUG("(main) program_name : %s\n",program_name);
-  newargz = XMALLOC(char *, argc+2);
-EOF
-
-            cat >> $cwrappersource <<EOF
-  newargz[0] = (char *) xstrdup("$SHELL");
-EOF
-
-            cat >> $cwrappersource <<"EOF"
-  newargz[1] = find_executable(argv[0]);
-  if (newargz[1] == NULL)
-    lt_fatal("Couldn't find %s", argv[0]);
-  DEBUG("(main) found exe at : %s\n",newargz[1]);
-  /* we know the script has the same name, without the .exe */
-  /* so make sure newargz[1] doesn't end in .exe */
-  strendzap(newargz[1],".exe");
-  for (i = 1; i < argc; i++)
-    newargz[i+1] = xstrdup(argv[i]);
-  newargz[argc+1] = NULL;
-
-  for (i=0; i<argc+1; i++)
-  {
-    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
-    ;
-  }
-
-EOF
-
-            case $host_os in
-              mingw*)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",(char const **)newargz);
-EOF
-              ;;
-              *)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",newargz);
-EOF
-              ;;
-            esac
-
-            cat >> $cwrappersource <<"EOF"
-  return 127;
-}
-
-void *
-xmalloc (size_t num)
-{
-  void * p = (void *) malloc (num);
-  if (!p)
-    lt_fatal ("Memory exhausted");
-
-  return p;
-}
-
-char *
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
-
-const char *
-base_name (const char *name)
-{
-  const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
-    name += 2;
-#endif
-
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return base;
-}
-
-int
-check_executable(const char * path)
-{
-  struct stat st;
-
-  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
-  if ((!path) || (!*path))
-    return 0;
-
-  if ((stat (path, &st) >= 0) &&
-      (
-        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
-#if defined (S_IXOTH)
-       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
-#endif
-#if defined (S_IXGRP)
-       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
-#endif
-       ((st.st_mode & S_IXUSR) == S_IXUSR))
-      )
-    return 1;
-  else
-    return 0;
-}
-
-/* Searches for the full path of the wrapper.  Returns
-   newly allocated full path name if found, NULL otherwise */
-char *
-find_executable (const char* wrapper)
-{
-  int has_slash = 0;
-  const char* p;
-  const char* p_next;
-  /* static buffer for getcwd */
-  char tmp[LT_PATHMAX + 1];
-  int tmp_len;
-  char* concat_name;
-
-  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
-
-  if ((wrapper == NULL) || (*wrapper == '\0'))
-    return NULL;
-
-  /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
-  {
-    concat_name = xstrdup (wrapper);
-    if (check_executable(concat_name))
-      return concat_name;
-    XFREE(concat_name);
-  }
-  else
-  {
-#endif
-    if (IS_DIR_SEPARATOR (wrapper[0]))
-    {
-      concat_name = xstrdup (wrapper);
-      if (check_executable(concat_name))
-        return concat_name;
-      XFREE(concat_name);
-    }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  }
-#endif
-
-  for (p = wrapper; *p; p++)
-    if (*p == '/')
-    {
-      has_slash = 1;
-      break;
-    }
-  if (!has_slash)
-  {
-    /* no slashes; search PATH */
-    const char* path = getenv ("PATH");
-    if (path != NULL)
-    {
-      for (p = path; *p; p = p_next)
-      {
-        const char* q;
-        size_t p_len;
-        for (q = p; *q; q++)
-          if (IS_PATH_SEPARATOR(*q))
-            break;
-        p_len = q - p;
-        p_next = (*q == '\0' ? q : q + 1);
-        if (p_len == 0)
-        {
-          /* empty path: current directory */
-          if (getcwd (tmp, LT_PATHMAX) == NULL)
-            lt_fatal ("getcwd failed");
-          tmp_len = strlen(tmp);
-          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
-          memcpy (concat_name, tmp, tmp_len);
-          concat_name[tmp_len] = '/';
-          strcpy (concat_name + tmp_len + 1, wrapper);
-        }
-        else
-        {
-          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
-          memcpy (concat_name, p, p_len);
-          concat_name[p_len] = '/';
-          strcpy (concat_name + p_len + 1, wrapper);
-        }
-        if (check_executable(concat_name))
-          return concat_name;
-        XFREE(concat_name);
-      }
-    }
-    /* not found in PATH; assume curdir */
-  }
-  /* Relative path | not found in path: prepend cwd */
-  if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
-  tmp_len = strlen(tmp);
-  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
-  memcpy (concat_name, tmp, tmp_len);
-  concat_name[tmp_len] = '/';
-  strcpy (concat_name + tmp_len + 1, wrapper);
-
-  if (check_executable(concat_name))
-    return concat_name;
-  XFREE(concat_name);
-  return NULL;
-}
-
-char *
-strendzap(char *str, const char *pat)
-{
-  size_t len, patlen;
-
-  assert(str != NULL);
-  assert(pat != NULL);
-
-  len = strlen(str);
-  patlen = strlen(pat);
-
-  if (patlen <= len)
-  {
-    str += len - patlen;
-    if (strcmp(str, pat) == 0)
-      *str = '\0';
-  }
-  return str;
-}
-
-static void
-lt_error_core (int exit_status, const char * mode,
-          const char * message, va_list ap)
-{
-  fprintf (stderr, "%s: %s: ", program_name, mode);
-  vfprintf (stderr, message, ap);
-  fprintf (stderr, ".\n");
-
-  if (exit_status >= 0)
-    exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
-  va_end (ap);
-}
-EOF
-          # we should really use a build-platform specific compiler
-          # here, but OTOH, the wrappers (shell script and this C one)
-          # are only useful if you want to execute the "real" binary.
-          # Since the "real" binary is built for $host, then this
-          # wrapper might as well be built for $host, too.
-          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
-          ;;
-        esac
-        $rm $output
-        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
-
-       $echo > $output "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
-
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
-  notinst_deplibs='$notinst_deplibs'
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    echo=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$echo works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$echo will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-       $echo >> $output "\
-
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
-
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
-
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
-
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
-  done
-
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
-       if test "$fast_install" = yes; then
-         $echo >> $output "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
-
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
-
-    file=\"\$\$-\$program\"
-
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
-
-         $echo >> $output "\
-
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
-      else
-       $echo \"\$relink_command_output\" >&2
-       $rm \"\$progdir/\$file\"
-       exit $EXIT_FAILURE
-      fi
-    fi
-
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $rm \"\$progdir/\$program\";
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $rm \"\$progdir/\$file\"
-  fi"
-       else
-         $echo >> $output "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
-       fi
-
-       $echo >> $output "\
-
-  if test -f \"\$progdir/\$program\"; then"
-
-       # Export our shlibpath_var if we have one.
-       if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-         $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
-
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
-
-    export $shlibpath_var
-"
-       fi
-
-       # fixup the dll searchpath if we need to.
-       if test -n "$dllsearchpath"; then
-         $echo >> $output "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
-       fi
-
-       $echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-       case $host in
-       # Backslashes separate directories on plain windows
-       *-*-mingw | *-*-os2*)
-         $echo >> $output "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
-         ;;
-
-       *)
-         $echo >> $output "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
-         ;;
-       esac
-       $echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \$*\"
-      exit $EXIT_FAILURE
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi\
-"
-       chmod +x $output
-      fi
-      exit $EXIT_SUCCESS
-      ;;
-    esac
-
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
-
-      if test "$build_libtool_libs" = convenience; then
-       oldobjs="$libobjs_save"
-       addlibs="$convenience"
-       build_libtool_libs=no
-      else
-       if test "$build_libtool_libs" = module; then
-         oldobjs="$libobjs_save"
-         build_libtool_libs=no
-       else
-         oldobjs="$old_deplibs $non_pic_objects"
-       fi
-       addlibs="$old_convenience"
-      fi
-
-      if test -n "$addlibs"; then
-       gentop="$output_objdir/${outputname}x"
-       generated="$generated $gentop"
-
-       func_extract_archives $gentop $addlibs
-       oldobjs="$oldobjs $func_extract_archives_result"
-      fi
-
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-       cmds=$old_archive_from_new_cmds
-      else
-       # POSIX demands no paths to be encoded in archives.  We have
-       # to avoid creating archives with duplicate basenames if we
-       # might have to extract them afterwards, e.g., when creating a
-       # static archive out of a convenience library, or when linking
-       # the entirety of a libtool archive into another (currently
-       # not supported by libtool).
-       if (for obj in $oldobjs
-           do
-             $echo "X$obj" | $Xsed -e 's%^.*/%%'
-           done | sort | sort -uc >/dev/null 2>&1); then
-         :
-       else
-         $echo "copying selected object files to avoid basename conflicts..."
-
-         if test -z "$gentop"; then
-           gentop="$output_objdir/${outputname}x"
-           generated="$generated $gentop"
-
-           $show "${rm}r $gentop"
-           $run ${rm}r "$gentop"
-           $show "$mkdir $gentop"
-           $run $mkdir "$gentop"
-           exit_status=$?
-           if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
-             exit $exit_status
-           fi
-         fi
-
-         save_oldobjs=$oldobjs
-         oldobjs=
-         counter=1
-         for obj in $save_oldobjs
-         do
-           objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-           case " $oldobjs " in
-           " ") oldobjs=$obj ;;
-           *[\ /]"$objbase "*)
-             while :; do
-               # Make sure we don't pick an alternate name that also
-               # overlaps.
-               newobj=lt$counter-$objbase
-               counter=`expr $counter + 1`
-               case " $oldobjs " in
-               *[\ /]"$newobj "*) ;;
-               *) if test ! -f "$gentop/$newobj"; then break; fi ;;
-               esac
-             done
-             $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-             $run ln "$obj" "$gentop/$newobj" ||
-             $run cp "$obj" "$gentop/$newobj"
-             oldobjs="$oldobjs $gentop/$newobj"
-             ;;
-           *) oldobjs="$oldobjs $obj" ;;
-           esac
-         done
-       fi
-
-       eval cmds=\"$old_archive_cmds\"
-
-       if len=`expr "X$cmds" : ".*"` &&
-            test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-         cmds=$old_archive_cmds
-       else
-         # the command line is too long to link in one step, link in parts
-         $echo "using piecewise archive linking..."
-         save_RANLIB=$RANLIB
-         RANLIB=:
-         objlist=
-         concat_cmds=
-         save_oldobjs=$oldobjs
-
-         # Is there a better way of finding the last object in the list?
-         for obj in $save_oldobjs
-         do
-           last_oldobj=$obj
-         done
-         for obj in $save_oldobjs
-         do
-           oldobjs="$objlist $obj"
-           objlist="$objlist $obj"
-           eval test_cmds=\"$old_archive_cmds\"
-           if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-              test "$len" -le "$max_cmd_len"; then
-             :
-           else
-             # the above command should be used before it gets too long
-             oldobjs=$objlist
-             if test "$obj" = "$last_oldobj" ; then
-               RANLIB=$save_RANLIB
-             fi
-             test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-             eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
-             objlist=
-           fi
-         done
-         RANLIB=$save_RANLIB
-         oldobjs=$objlist
-         if test "X$oldobjs" = "X" ; then
-           eval cmds=\"\$concat_cmds\"
-         else
-           eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
-         fi
-       fi
-      fi
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-        eval cmd=\"$cmd\"
-       IFS="$save_ifs"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$generated"; then
-      $show "${rm}r$generated"
-      $run ${rm}r$generated
-    fi
-
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
-
-      # Preserve any variables that may affect compiler behavior
-      for var in $variables_saved_for_relink; do
-       if eval test -z \"\${$var+set}\"; then
-         relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-       elif eval var_value=\$$var; test -z "$var_value"; then
-         relink_command="$var=; export $var; $relink_command"
-       else
-         var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-         relink_command="$var=\"$var_value\"; export $var; $relink_command"
-       fi
-      done
-      # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
-      if test "$hardcode_automatic" = yes ; then
-       relink_command=
-      fi
-
-
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-       for installed in no yes; do
-         if test "$installed" = yes; then
-           if test -z "$install_libdir"; then
-             break
-           fi
-           output="$output_objdir/$outputname"i
-           # Replace all uninstalled libtool libraries with the installed ones
-           newdependency_libs=
-           for deplib in $dependency_libs; do
-             case $deplib in
-             *.la)
-               name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
-               eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-               if test -z "$libdir"; then
-                 $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-                 exit $EXIT_FAILURE
-               fi
-               newdependency_libs="$newdependency_libs $libdir/$name"
-               ;;
-             *) newdependency_libs="$newdependency_libs $deplib" ;;
-             esac
-           done
-           dependency_libs="$newdependency_libs"
-           newdlfiles=
-           for lib in $dlfiles; do
-             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-             if test -z "$libdir"; then
-               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-               exit $EXIT_FAILURE
-             fi
-             newdlfiles="$newdlfiles $libdir/$name"
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-             eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-             if test -z "$libdir"; then
-               $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-               exit $EXIT_FAILURE
-             fi
-             newdlprefiles="$newdlprefiles $libdir/$name"
-           done
-           dlprefiles="$newdlprefiles"
-         else
-           newdlfiles=
-           for lib in $dlfiles; do
-             case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-               *) abs=`pwd`"/$lib" ;;
-             esac
-             newdlfiles="$newdlfiles $abs"
-           done
-           dlfiles="$newdlfiles"
-           newdlprefiles=
-           for lib in $dlprefiles; do
-             case $lib in
-               [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-               *) abs=`pwd`"/$lib" ;;
-             esac
-             newdlprefiles="$newdlprefiles $abs"
-           done
-           dlprefiles="$newdlprefiles"
-         fi
-         $rm $output
-         # place dlname in correct position for cygwin
-         tdlname=$dlname
-         case $host,$output,$installed,$module,$dlname in
-           *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
-         esac
-         $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# The name that we can dlopen(3).
-dlname='$tdlname'
-
-# Names of this library.
-library_names='$library_names'
-
-# The name of the static archive.
-old_library='$old_library'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
-
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
-         if test "$installed" = no && test "$need_relink" = yes; then
-           $echo >> $output "\
-relink_command=\"$relink_command\""
-         fi
-       done
-      fi
-
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
-      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
-      ;;
-    esac
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool install mode
-  install)
-    modename="$modename: install"
-
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
-       # Allow the use of GNU shtool's install command.
-       $echo "X$nonopt" | grep shtool > /dev/null; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       arg="\"$arg\""
-       ;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg=$nonopt
-    fi
-
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case $arg in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \      ]*|*]*|"")
-      arg="\"$arg\""
-      ;;
-    esac
-    install_prog="$install_prog$arg"
-
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-       files="$files $dest"
-       dest=$arg
-       continue
-      fi
-
-      case $arg in
-      -d) isdir=yes ;;
-      -f) 
-       case " $install_prog " in
-       *[\\\ /]cp\ *) ;;
-       *) prev=$arg ;;
-       esac
-       ;;
-      -g | -m | -o) prev=$arg ;;
-      -s)
-       stripme=" -s"
-       continue
-       ;;
-      -*)
-       ;;
-      *)
-       # If the previous option needed an argument, then skip it.
-       if test -n "$prev"; then
-         prev=
-       else
-         dest=$arg
-         continue
-       fi
-       ;;
-      esac
-
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \    ]*|*]*|"")
-       arg="\"$arg\""
-       ;;
-      esac
-      install_prog="$install_prog $arg"
-    done
-
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    if test -z "$files"; then
-      if test -z "$dest"; then
-       $echo "$modename: no file or destination specified" 1>&2
-      else
-       $echo "$modename: you must specify a destination" 1>&2
-      fi
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test "$#" -gt 2; then
-       $echo "$modename: \`$dest' is not a directory" 1>&2
-       $echo "$help" 1>&2
-       exit $EXIT_FAILURE
-      fi
-    fi
-    case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-       case $file in
-       *.lo) ;;
-       *)
-         $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-      done
-      ;;
-    esac
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
-
-      # Do each installation.
-      case $file in
-      *.$libext)
-       # Do the static libraries later.
-       staticlibs="$staticlibs $file"
-       ;;
-
-      *.la)
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       library_names=
-       old_library=
-       relink_command=
-       # If there is no directory component, then add one.
-       case $file in
-       */* | *\\*) . $file ;;
-       *) . ./$file ;;
-       esac
-
-       # Add the libdir to current_libdirs if it is the destination.
-       if test "X$destdir" = "X$libdir"; then
-         case "$current_libdirs " in
-         *" $libdir "*) ;;
-         *) current_libdirs="$current_libdirs $libdir" ;;
-         esac
-       else
-         # Note the libdir as a future libdir.
-         case "$future_libdirs " in
-         *" $libdir "*) ;;
-         *) future_libdirs="$future_libdirs $libdir" ;;
-         esac
-       fi
-
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
-       test "X$dir" = "X$file/" && dir=
-       dir="$dir$objdir"
-
-       if test -n "$relink_command"; then
-         # Determine the prefix the user has applied to our future dir.
-         inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
-
-         # Don't allow the user to place us outside of our expected
-         # location b/c this prevents finding dependent libraries that
-         # are installed to the same prefix.
-         # At present, this check doesn't affect windows .dll's that
-         # are installed into $libdir/../bin (currently, that works fine)
-         # but it's something to keep an eye on.
-         if test "$inst_prefix_dir" = "$destdir"; then
-           $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
-           exit $EXIT_FAILURE
-         fi
-
-         if test -n "$inst_prefix_dir"; then
-           # Stick the inst_prefix_dir data into the link command.
-           relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
-         else
-           relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
-         fi
-
-         $echo "$modename: warning: relinking \`$file'" 1>&2
-         $show "$relink_command"
-         if $run eval "$relink_command"; then :
-         else
-           $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-           exit $EXIT_FAILURE
-         fi
-       fi
-
-       # See the names of the shared library.
-       set dummy $library_names
-       if test -n "$2"; then
-         realname="$2"
-         shift
-         shift
-
-         srcname="$realname"
-         test -n "$relink_command" && srcname="$realname"T
-
-         # Install the shared library and build the symlinks.
-         $show "$install_prog $dir/$srcname $destdir/$realname"
-         $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
-         if test -n "$stripme" && test -n "$striplib"; then
-           $show "$striplib $destdir/$realname"
-           $run eval "$striplib $destdir/$realname" || exit $?
-         fi
-
-         if test "$#" -gt 0; then
-           # Delete the old symlinks, and create new ones.
-           # Try `ln -sf' first, because the `ln' binary might depend on
-           # the symlink we replace!  Solaris /bin/ln does not understand -f,
-           # so we also need to try rm && ln -s.
-           for linkname
-           do
-             if test "$linkname" != "$realname"; then
-                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
-                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
-             fi
-           done
-         fi
-
-         # Do each command in the postinstall commands.
-         lib="$destdir/$realname"
-         cmds=$postinstall_cmds
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $cmds; do
-           IFS="$save_ifs"
-           eval cmd=\"$cmd\"
-           $show "$cmd"
-           $run eval "$cmd" || {
-             lt_exit=$?
-
-             # Restore the uninstalled library and exit
-             if test "$mode" = relink; then
-               $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-             fi
-
-             exit $lt_exit
-           }
-         done
-         IFS="$save_ifs"
-       fi
-
-       # Install the pseudo-library for information purposes.
-       name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-       instname="$dir/$name"i
-       $show "$install_prog $instname $destdir/$name"
-       $run eval "$install_prog $instname $destdir/$name" || exit $?
-
-       # Maybe install the static library, too.
-       test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-       ;;
-
-      *.lo)
-       # Install (i.e. copy) a libtool object.
-
-       # Figure out destination file name, if it wasn't already specified.
-       if test -n "$destname"; then
-         destfile="$destdir/$destname"
-       else
-         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-         destfile="$destdir/$destfile"
-       fi
-
-       # Deduce the name of the destination old-style object file.
-       case $destfile in
-       *.lo)
-         staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
-         ;;
-       *.$objext)
-         staticdest="$destfile"
-         destfile=
-         ;;
-       *)
-         $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-         ;;
-       esac
-
-       # Install the libtool object if requested.
-       if test -n "$destfile"; then
-         $show "$install_prog $file $destfile"
-         $run eval "$install_prog $file $destfile" || exit $?
-       fi
-
-       # Install the old object if enabled.
-       if test "$build_old_libs" = yes; then
-         # Deduce the name of the old-style object file.
-         staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
-         $show "$install_prog $staticobj $staticdest"
-         $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-       fi
-       exit $EXIT_SUCCESS
-       ;;
-
-      *)
-       # Figure out destination file name, if it wasn't already specified.
-       if test -n "$destname"; then
-         destfile="$destdir/$destname"
-       else
-         destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-         destfile="$destdir/$destfile"
-       fi
-
-       # If the file is missing, and there is a .exe on the end, strip it
-       # because it is most likely a libtool script we actually want to
-       # install
-       stripped_ext=""
-       case $file in
-         *.exe)
-           if test ! -f "$file"; then
-             file=`$echo $file|${SED} 's,.exe$,,'`
-             stripped_ext=".exe"
-           fi
-           ;;
-       esac
-
-       # Do a test to see if this is really a libtool program.
-       case $host in
-       *cygwin*|*mingw*)
-           wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
-           ;;
-       *)
-           wrapper=$file
-           ;;
-       esac
-       if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
-         notinst_deplibs=
-         relink_command=
-
-         # Note that it is not necessary on cygwin/mingw to append a dot to
-         # foo even if both foo and FILE.exe exist: automatic-append-.exe
-         # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-         # `FILE.' does not work on cygwin managed mounts.
-         #
-         # If there is no directory component, then add one.
-         case $wrapper in
-         */* | *\\*) . ${wrapper} ;;
-         *) . ./${wrapper} ;;
-         esac
-
-         # Check the variables that should have been set.
-         if test -z "$notinst_deplibs"; then
-           $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
-           exit $EXIT_FAILURE
-         fi
-
-         finalize=yes
-         for lib in $notinst_deplibs; do
-           # Check to see that each library is installed.
-           libdir=
-           if test -f "$lib"; then
-             # If there is no directory component, then add one.
-             case $lib in
-             */* | *\\*) . $lib ;;
-             *) . ./$lib ;;
-             esac
-           fi
-           libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-           if test -n "$libdir" && test ! -f "$libfile"; then
-             $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-             finalize=no
-           fi
-         done
-
-         relink_command=
-         # Note that it is not necessary on cygwin/mingw to append a dot to
-         # foo even if both foo and FILE.exe exist: automatic-append-.exe
-         # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-         # `FILE.' does not work on cygwin managed mounts.
-         #
-         # If there is no directory component, then add one.
-         case $wrapper in
-         */* | *\\*) . ${wrapper} ;;
-         *) . ./${wrapper} ;;
-         esac
-
-         outputname=
-         if test "$fast_install" = no && test -n "$relink_command"; then
-           if test "$finalize" = yes && test -z "$run"; then
-             tmpdir=`func_mktempdir`
-             file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
-             outputname="$tmpdir/$file"
-             # Replace the output file specification.
-             relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
-
-             $show "$relink_command"
-             if $run eval "$relink_command"; then :
-             else
-               $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-               ${rm}r "$tmpdir"
-               continue
-             fi
-             file="$outputname"
-           else
-             $echo "$modename: warning: cannot relink \`$file'" 1>&2
-           fi
-         else
-           # Install the binary that we compiled earlier.
-           file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
-         fi
-       fi
-
-       # remove .exe since cygwin /usr/bin/install will append another
-       # one anyway 
-       case $install_prog,$host in
-       */usr/bin/install*,*cygwin*)
-         case $file:$destfile in
-         *.exe:*.exe)
-           # this is ok
-           ;;
-         *.exe:*)
-           destfile=$destfile.exe
-           ;;
-         *:*.exe)
-           destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
-           ;;
-         esac
-         ;;
-       esac
-       $show "$install_prog$stripme $file $destfile"
-       $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
-       test -n "$outputname" && ${rm}r "$tmpdir"
-       ;;
-      esac
-    done
-
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
-
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
-
-      if test -n "$stripme" && test -n "$old_striplib"; then
-       $show "$old_striplib $oldlib"
-       $run eval "$old_striplib $oldlib" || exit $?
-      fi
-
-      # Do each command in the postinstall commands.
-      cmds=$old_postinstall_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-       IFS="$save_ifs"
-       eval cmd=\"$cmd\"
-       $show "$cmd"
-       $run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
-
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
-
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-    else
-      exit $EXIT_SUCCESS
-    fi
-    ;;
-
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
-
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-       libdirs="$libdirs $dir"
-      done
-
-      for libdir in $libdirs; do
-       if test -n "$finish_cmds"; then
-         # Do each command in the finish commands.
-         cmds=$finish_cmds
-         save_ifs="$IFS"; IFS='~'
-         for cmd in $cmds; do
-           IFS="$save_ifs"
-           eval cmd=\"$cmd\"
-           $show "$cmd"
-           $run eval "$cmd" || admincmds="$admincmds
-       $cmd"
-         done
-         IFS="$save_ifs"
-       fi
-       if test -n "$finish_eval"; then
-         # Do the single finish_eval.
-         eval cmds=\"$finish_eval\"
-         $run eval "$cmds" || admincmds="$admincmds
-       $cmds"
-       fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    test "$show" = : && exit $EXIT_SUCCESS
-
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    $echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $echo "   $libdir"
-    done
-    $echo
-    $echo "If you ever happen to want to link against installed libraries"
-    $echo "in a given directory, LIBDIR, you must either use libtool, and"
-    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $echo "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      $echo "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $echo "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $echo
-    $echo "See any operating system documentation about shared libraries for"
-    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
-
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit $EXIT_FAILURE
-    fi
-
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test ! -f "$file"; then
-       $echo "$modename: \`$file' is not a file" 1>&2
-       $echo "$help" 1>&2
-       exit $EXIT_FAILURE
-      fi
-
-      dir=
-      case $file in
-      *.la)
-       # Check to see that this really is a libtool archive.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-       else
-         $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-         $echo "$help" 1>&2
-         exit $EXIT_FAILURE
-       fi
-
-       # Read the libtool library.
-       dlname=
-       library_names=
-
-       # If there is no directory component, then add one.
-       case $file in
-       */* | *\\*) . $file ;;
-       *) . ./$file ;;
-       esac
-
-       # Skip this library if it cannot be dlopened.
-       if test -z "$dlname"; then
-         # Warn if it was a shared library.
-         test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-         continue
-       fi
-
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$dir" = "X$file" && dir=.
-
-       if test -f "$dir/$objdir/$dlname"; then
-         dir="$dir/$objdir"
-       else
-         $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-         exit $EXIT_FAILURE
-       fi
-       ;;
-
-      *.lo)
-       # Just add the directory containing the .lo file.
-       dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-       test "X$dir" = "X$file" && dir=.
-       ;;
-
-      *)
-       $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-       continue
-       ;;
-      esac
-
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
-
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-       eval "$shlibpath_var=\"\$dir\""
-      else
-       eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
-
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
-
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case $file in
-      -*) ;;
-      *)
-       # Do a test to see if this is really a libtool program.
-       if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         # If there is no directory component, then add one.
-         case $file in
-         */* | *\\*) . $file ;;
-         *) . ./$file ;;
-         esac
-
-         # Transform arg to wrapped name.
-         file="$progdir/$program"
-       fi
-       ;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
-
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-       # Export the shlibpath_var.
-       eval "export $shlibpath_var"
-      fi
-
-      # Restore saved environment variables
-      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-      do
-       eval "if test \"\${save_$lt_var+set}\" = set; then
-               $lt_var=\$save_$lt_var; export $lt_var
-             else
-               $lt_unset $lt_var
-             fi"
-      done
-
-
-      # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-       eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-       $echo "export $shlibpath_var"
-      fi
-      $echo "$cmd$args"
-      exit $EXIT_SUCCESS
-    fi
-    ;;
-
-  # libtool clean and uninstall mode
-  clean | uninstall)
-    modename="$modename: $mode"
-    rm="$nonopt"
-    files=
-    rmforce=
-    exit_status=0
-
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
-
-    for arg
-    do
-      case $arg in
-      -f) rm="$rm $arg"; rmforce=yes ;;
-      -*) rm="$rm $arg" ;;
-      *) files="$files $arg" ;;
-      esac
-    done
-
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
-
-    rmdirs=
-
-    origobjdir="$objdir"
-    for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$dir" = "X$file"; then
-       dir=.
-       objdir="$origobjdir"
-      else
-       objdir="$dir/$origobjdir"
-      fi
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-      test "$mode" = uninstall && objdir="$dir"
-
-      # Remember objdir for removal later, being careful to avoid duplicates
-      if test "$mode" = clean; then
-       case " $rmdirs " in
-         *" $objdir "*) ;;
-         *) rmdirs="$rmdirs $objdir" ;;
-       esac
-      fi
-
-      # Don't error if the file doesn't exist and rm -f was used.
-      if (test -L "$file") >/dev/null 2>&1 \
-       || (test -h "$file") >/dev/null 2>&1 \
-       || test -f "$file"; then
-       :
-      elif test -d "$file"; then
-       exit_status=1
-       continue
-      elif test "$rmforce" = yes; then
-       continue
-      fi
-
-      rmfiles="$file"
-
-      case $name in
-      *.la)
-       # Possibly a libtool archive, so verify it.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-         . $dir/$name
-
-         # Delete the libtool libraries and symlinks.
-         for n in $library_names; do
-           rmfiles="$rmfiles $objdir/$n"
-         done
-         test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
-
-         case "$mode" in
-         clean)
-           case "  $library_names " in
-           # "  " in the beginning catches empty $dlname
-           *" $dlname "*) ;;
-           *) rmfiles="$rmfiles $objdir/$dlname" ;;
-           esac
-            test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
-           ;;
-         uninstall)
-           if test -n "$library_names"; then
-             # Do each command in the postuninstall commands.
-             cmds=$postuninstall_cmds
-             save_ifs="$IFS"; IFS='~'
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd"
-               if test "$?" -ne 0 && test "$rmforce" != yes; then
-                 exit_status=1
-               fi
-             done
-             IFS="$save_ifs"
-           fi
-
-           if test -n "$old_library"; then
-             # Do each command in the old_postuninstall commands.
-             cmds=$old_postuninstall_cmds
-             save_ifs="$IFS"; IFS='~'
-             for cmd in $cmds; do
-               IFS="$save_ifs"
-               eval cmd=\"$cmd\"
-               $show "$cmd"
-               $run eval "$cmd"
-               if test "$?" -ne 0 && test "$rmforce" != yes; then
-                 exit_status=1
-               fi
-             done
-             IFS="$save_ifs"
-           fi
-           # FIXME: should reinstall the best remaining shared library.
-           ;;
-         esac
-       fi
-       ;;
-
-      *.lo)
-       # Possibly a libtool object, so verify it.
-       if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-
-         # Read the .lo file
-         . $dir/$name
-
-         # Add PIC object to the list of files to remove.
-         if test -n "$pic_object" \
-            && test "$pic_object" != none; then
-           rmfiles="$rmfiles $dir/$pic_object"
-         fi
-
-         # Add non-PIC object to the list of files to remove.
-         if test -n "$non_pic_object" \
-            && test "$non_pic_object" != none; then
-           rmfiles="$rmfiles $dir/$non_pic_object"
-         fi
-       fi
-       ;;
-
-      *)
-       if test "$mode" = clean ; then
-         noexename=$name
-         case $file in
-         *.exe)
-           file=`$echo $file|${SED} 's,.exe$,,'`
-           noexename=`$echo $name|${SED} 's,.exe$,,'`
-           # $file with .exe has already been added to rmfiles,
-           # add $file without .exe
-           rmfiles="$rmfiles $file"
-           ;;
-         esac
-         # Do a test to see if this is a libtool program.
-         if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-           relink_command=
-           . $dir/$noexename
-
-           # note $name still contains .exe if it was in $file originally
-           # as does the version of $file that was added into $rmfiles
-           rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
-           if test "$fast_install" = yes && test -n "$relink_command"; then
-             rmfiles="$rmfiles $objdir/lt-$name"
-           fi
-           if test "X$noexename" != "X$name" ; then
-             rmfiles="$rmfiles $objdir/lt-${noexename}.c"
-           fi
-         fi
-       fi
-       ;;
-      esac
-      $show "$rm $rmfiles"
-      $run $rm $rmfiles || exit_status=1
-    done
-    objdir="$origobjdir"
-
-    # Try to remove the ${objdir}s in the directories where we deleted files
-    for dir in $rmdirs; do
-      if test -d "$dir"; then
-       $show "rmdir $dir"
-       $run rmdir $dir >/dev/null 2>&1
-      fi
-    done
-
-    exit $exit_status
-    ;;
-
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
-  esac
-
-  if test -z "$exec_cmd"; then
-    $echo "$modename: invalid operation mode \`$mode'" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi # test -z "$show_help"
-
-if test -n "$exec_cmd"; then
-  eval exec $exec_cmd
-  exit $EXIT_FAILURE
-fi
-
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
-    --config          show all configuration variables
-    --debug           enable verbose shell tracing
--n, --dry-run         display commands without modifying any files
-    --features        display basic configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --tag=TAG         use configuration variables from tag TAG
-    --version         print version information
-
-MODE must be one of the following:
-
-      clean           remove files from the build directory
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool@gnu.org>."
-  exit $EXIT_SUCCESS
-  ;;
-
-clean)
-  $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
-  -static           always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-                    try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-                    try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-fast-install  disable the fast-install mode
-  -no-install       link a not-installable executable
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
-  -precious-files-regex REGEX
-                    don't remove output files matching REGEX
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of uninstalled libtool libraries
-  -static-libtool-libs
-                    do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                    specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-  ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit $?
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries.  Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them.  This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration.  But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-disable_libs=shared
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-disable_libs=static
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/libs/iksemel/openssl.m4 b/libs/iksemel/openssl.m4
deleted file mode 100644 (file)
index 6bf1851..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-dnl ======================================================================
-dnl SAC_OPENSSL
-dnl ======================================================================
-AC_DEFUN([SAC_OPENSSL], [
-
-AC_ARG_WITH(openssl,
-[  --with-openssl          use OpenSSL [[enabled]]],, with_openssl=pkg-config)
-
-dnl SOSXXX:SAC_ASSERT_DEF([openssl libraries])
-
-
-if test "$with_openssl" = no  ;then
-  : # No openssl
-else
-
-  if test "$with_openssl" = "pkg-config" ; then
-    PKG_CHECK_MODULES(openssl, openssl,
-       [HAVE_TLS=1 HAVE_SSL=1 LIBS="$openssl_LIBS $LIBS"],
-       [HAVE_SSL=0])
-  fi
-
-  if test x$HAVE_SSL = x1 ; then
-     AC_DEFINE([HAVE_LIBCRYPTO], 1, [Define to 1 if you have the `crypto' library (-lcrypto).])
-     AC_DEFINE([HAVE_LIBSSL], 1, [Define to 1 if you have the `ssl' library (-lssl).])
-  else
-    AC_CHECK_HEADERS([openssl/tls1.h], [
-      HAVE_SSL=1 HAVE_TLS=1
-
-      AC_CHECK_LIB(crypto, BIO_new,,
-       HAVE_SSL=0
-       AC_MSG_WARN(OpenSSL crypto library was not found))
-
-      AC_CHECK_LIB(ssl, TLSv1_method,,
-       HAVE_TLS=0
-       AC_MSG_WARN(OpenSSL protocol library was not found))
-     ],[AC_MSG_WARN(OpenSSL include files were not found)],[#include <openssl/safestack.h>])
-  fi
-
-  if test x$HAVE_SSL = x1; then
-     AC_DEFINE([HAVE_SSL], 1, [Define to 1 if you have OpenSSL])
-  fi
-
-  if test x$HAVE_TLS = x1; then
-    AC_DEFINE([HAVE_TLS], 1, [Define to 1 if you have TLS])
-  fi
-fi
-
-AM_CONDITIONAL(HAVE_TLS, test x$HAVE_TLS = x1)
-])
diff --git a/libs/iksemel/src/Makefile.am b/libs/iksemel/src/Makefile.am
deleted file mode 100644 (file)
index 0997e84..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-##
-## Process this file with automake to produce Makefile.in
-##
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-lib_LTLIBRARIES = libiksemel.la
-
-if DO_POSIX
-posix_c = io-posix.c
-endif
-
-libiksemel_la_SOURCES = \
-       ikstack.c \
-       utility.c \
-       iks.c \
-       sax.c \
-       dom.c \
-       $(posix_c) \
-       stream.c \
-       sha.c \
-       jabber.c \
-       filter.c \
-       md5.c \
-       base64.c
-
-libiksemel_la_LDFLAGS = -version-info 4:0:1 -no-undefined
-libiksemel_la_CFLAGS = $(CFLAGS) $(LIBGNUTLS_CFLAGS)  
-libiksemel_la_LIBADD = $(LIBGNUTLS_LIBS)  
diff --git a/libs/iksemel/src/base64.c b/libs/iksemel/src/base64.c
deleted file mode 100644 (file)
index bb89ce8..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-static const char base64_charset[] =
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-
-char *iks_base64_decode(const char *buf)
-{
-       char *res, *save;
-       char val;
-        const char *foo; 
-       const char *end;
-       int index;
-       size_t len;
-
-       if (!buf)
-               return NULL;
-
-       len = iks_strlen(buf) * 6 / 8 + 1;
-
-       save = res = iks_malloc(len);
-       if (!save)
-               return NULL;
-       memset(res, 0, len);
-
-       index = 0;
-       end = buf + iks_strlen(buf);
-
-       while (*buf && buf < end) {
-               if (!(foo = strchr(base64_charset, *buf)))
-                       foo = base64_charset;
-               val = (int)(foo - base64_charset);
-               buf++;
-               switch (index) {
-                       case 0:
-                               *res |= val << 2;
-                               break;
-                       case 1:
-                               *res++ |= val >> 4;
-                               *res |= val << 4;
-                               break;
-                       case 2:
-                               *res++ |= val >> 2;
-                               *res |= val << 6;
-                               break;
-                       case 3:
-                               *res++ |= val;
-                               break;
-               }
-               index++;
-               index %= 4;
-       }
-       *res = 0;
-
-       return save;
-}
-
-char *iks_base64_encode(const char *buf, int len)
-{
-       char *res, *save;
-       int k, t;
-
-       len = (len > 0) ? (len) : (iks_strlen(buf));
-       save = res = iks_malloc((len*8) / 6 + 4);
-       if (!save) return NULL;
-
-       for (k = 0; k < len/3; ++k) {
-               *res++ = base64_charset[*buf >> 2];
-               t = ((*buf & 0x03) << 4);
-               buf++;
-               *res++ = base64_charset[t | (*buf >> 4)];
-               t = ((*buf & 0x0F) << 2);
-               buf++;
-               *res++ = base64_charset[t | (*buf >> 6)];
-               *res++ = base64_charset[*buf++ & 0x3F];
-       }
-
-       switch (len % 3) {
-               case 2:
-                       *res++ = base64_charset[*buf >> 2];
-                       t =  ((*buf & 0x03) << 4);
-                       buf++;
-                       *res++ = base64_charset[t | (*buf >> 4)];
-                       *res++ = base64_charset[((*buf++ & 0x0F) << 2)];
-                       *res++ = '=';
-                       break;
-               case 1:
-                       *res++ = base64_charset[*buf >> 2];
-                       *res++ = base64_charset[(*buf++ & 0x03) << 4];
-                       *res++ = '=';
-                       *res++ = '=';
-                       break;
-       }
-       *res = 0;
-       return save;
-}
diff --git a/libs/iksemel/src/dom.c b/libs/iksemel/src/dom.c
deleted file mode 100644 (file)
index 849bf20..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-struct dom_data {
-       iks **iksptr;
-       iks *current;
-       size_t chunk_size;
-};
-
-static int
-tagHook (struct dom_data *data, char *name, char **atts, int type)
-{
-       iks *x;
-
-       if (IKS_OPEN == type || IKS_SINGLE == type) {
-               if (data->current) {
-                       x = iks_insert (data->current, name);
-               } else {
-                       ikstack *s;
-                       s = iks_stack_new (data->chunk_size, data->chunk_size);
-                       x = iks_new_within (name, s);
-               }
-               if (atts) {
-                       int i=0;
-                       while (atts[i]) {
-                               iks_insert_attrib (x, atts[i], atts[i+1]);
-                               i += 2;
-                       }
-               }
-               data->current = x;
-       }
-       if (IKS_CLOSE == type || IKS_SINGLE == type) {
-               x = iks_parent (data->current);
-               if (iks_strcmp(iks_name(data->current), name) != 0)
-                       return IKS_BADXML;
-               if (x)
-                       data->current = x;
-               else {
-                       *(data->iksptr) = data->current;
-                       data->current = NULL;
-               }
-       }
-       return IKS_OK;
-}
-
-static int
-cdataHook (struct dom_data *data, char *cdata, size_t len)
-{
-       if (data->current) iks_insert_cdata (data->current, cdata, len);
-       return IKS_OK;
-}
-
-static void
-deleteHook (struct dom_data *data)
-{
-       if (data->current) iks_delete (data->current);
-       data->current = NULL;
-}
-
-iksparser *
-iks_dom_new (iks **iksptr)
-{
-       ikstack *s;
-       struct dom_data *data;
-
-       *iksptr = NULL;
-       s = iks_stack_new (DEFAULT_DOM_CHUNK_SIZE, 0);
-       if (!s) return NULL;
-       data = iks_stack_alloc (s, sizeof (struct dom_data));
-       data->iksptr = iksptr;
-       data->current = NULL;
-       data->chunk_size = DEFAULT_DOM_IKS_CHUNK_SIZE;
-       return iks_sax_extend (s, data, (iksTagHook *) tagHook, (iksCDataHook *) cdataHook, (iksDeleteHook *) deleteHook);
-}
-
-void
-iks_set_size_hint (iksparser *prs, size_t approx_size)
-{
-       size_t cs;
-       struct dom_data *data = iks_user_data (prs);
-
-       cs = approx_size / 10;
-       if (cs < DEFAULT_DOM_IKS_CHUNK_SIZE) cs = DEFAULT_DOM_IKS_CHUNK_SIZE;
-       data->chunk_size = cs;
-}
-
-iks *
-iks_tree (const char *xml_str, size_t len, int *err)
-{
-       iksparser *prs;
-       iks *x;
-       int e;
-
-       if (0 == len) len = strlen (xml_str);
-       prs = iks_dom_new (&x);
-       if (!prs) {
-               if (err) *err = IKS_NOMEM;
-               return NULL;
-       }
-       e = iks_parse (prs, xml_str, len, 1);
-       if (err) *err = e;
-       iks_parser_delete (prs);
-       return x;
-}
-
-int
-iks_load (const char *fname, iks **xptr)
-{
-       iksparser *prs;
-       char *buf;
-       FILE *f;
-       int len, done = 0;
-       int ret;
-
-       *xptr = NULL;
-
-       buf = iks_malloc (FILE_IO_BUF_SIZE);
-       if (!buf) return IKS_NOMEM;
-       ret = IKS_NOMEM;
-       prs = iks_dom_new (xptr);
-       if (prs) {
-               f = fopen (fname, "r");
-               if (f) {
-                       while (0 == done) {
-                               len = fread (buf, 1, FILE_IO_BUF_SIZE, f);
-                               if (len < FILE_IO_BUF_SIZE) {
-                                       if (0 == feof (f)) {
-                                               ret = IKS_FILE_RWERR;
-                                               break;
-                                       }
-                                       if (0 == len) ret = IKS_OK;
-                                       done = 1;
-                               }
-                               if (len > 0) {
-                                       int e;
-                                       e = iks_parse (prs, buf, len, done);
-                                       if (IKS_OK != e) {
-                                               ret = e;
-                                               break;
-                                       }
-                                       if (done) ret = IKS_OK;
-                               }
-                       }
-                       fclose (f);
-               } else {
-                       if (ENOENT == errno) ret = IKS_FILE_NOFILE;
-                       else ret = IKS_FILE_NOACCESS;
-               }
-               iks_parser_delete (prs);
-       }
-       iks_free (buf);
-       return ret;
-}
-
-int
-iks_save (const char *fname, iks *x)
-{
-       FILE *f;
-       char *data;
-       int ret;
-
-       ret = IKS_NOMEM;
-       data = iks_string (NULL, x);
-       if (data) {
-               ret = IKS_FILE_NOACCESS;
-               f = fopen (fname, "w");
-               if (f) {
-                       ret = IKS_FILE_RWERR;
-                       if (fputs (data, f) >= 0) ret = IKS_OK;
-                       fclose (f);
-               }
-               iks_free (data);
-       }
-       return ret;
-}
diff --git a/libs/iksemel/src/filter.c b/libs/iksemel/src/filter.c
deleted file mode 100644 (file)
index d5cea11..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-struct iksrule_struct {
-       struct iksrule_struct *next, *prev;
-       ikstack *s;
-       void *user_data;
-       iksFilterHook *filterHook;
-       char *id;
-       char *from;
-       char *ns;
-       int score;
-       int rules;
-       enum ikstype type;
-       enum iksubtype subtype;
-};
-
-struct iksfilter_struct {
-       iksrule *rules;
-       iksrule *last_rule;
-};
-
-iksfilter *
-iks_filter_new (void)
-{
-       iksfilter *f;
-
-       f = iks_malloc (sizeof (iksfilter));
-       if (!f) return NULL;
-       memset (f, 0, sizeof (iksfilter));
-
-       return f;
-}
-
-iksrule *
-iks_filter_add_rule (iksfilter *f, iksFilterHook *filterHook, void *user_data, ...)
-{
-       ikstack *s;
-       iksrule *rule;
-       va_list ap;
-       int type;
-
-       s = iks_stack_new (sizeof (iksrule), DEFAULT_RULE_CHUNK_SIZE);
-       if (!s) return NULL;
-       rule = iks_stack_alloc (s, sizeof (iksrule));
-       memset (rule, 0, sizeof (iksrule));
-       rule->s = s;
-       rule->user_data = user_data;
-       rule->filterHook = filterHook;
-
-       va_start (ap, user_data);
-       while (1) {
-               type = va_arg (ap, int);
-               if (IKS_RULE_DONE == type) break;
-               rule->rules += type;
-               switch (type) {
-                       case IKS_RULE_TYPE:
-                               rule->type = va_arg (ap, int);
-                               break;
-                       case IKS_RULE_SUBTYPE:
-                               rule->subtype = va_arg (ap, int);
-                               break;
-                       case IKS_RULE_ID:
-                               rule->id = iks_stack_strdup (s, va_arg (ap, char *), 0);
-                               break;
-                       case IKS_RULE_NS:
-                               rule->ns = iks_stack_strdup (s, va_arg (ap, char *), 0);
-                               break;
-                       case IKS_RULE_FROM:
-                               rule->from = iks_stack_strdup (s, va_arg (ap, char *), 0);
-                               break;
-                       case IKS_RULE_FROM_PARTIAL:
-                               rule->from = iks_stack_strdup (s, va_arg (ap, char *), 0);
-                               break;
-               }
-       }
-       va_end (ap);
-
-       if (!f->rules) f->rules = rule;
-       if (f->last_rule) f->last_rule->next = rule;
-       rule->prev = f->last_rule;
-       f->last_rule = rule;
-       return rule;
-}
-
-void
-iks_filter_remove_rule (iksfilter *f, iksrule *rule)
-{
-       if (rule->prev) rule->prev->next = rule->next;
-       if (rule->next) rule->next->prev = rule->prev;
-       if (f->rules == rule) f->rules = rule->next;
-       if (f->last_rule == rule) f->last_rule = rule->prev;
-       iks_stack_delete (&rule->s);
-}
-
-void
-iks_filter_remove_hook (iksfilter *f, iksFilterHook *filterHook)
-{
-       iksrule *rule, *tmp;
-
-       rule = f->rules;
-       while (rule) {
-               tmp = rule->next;
-               if (rule->filterHook == filterHook) iks_filter_remove_rule (f, rule);
-               rule = tmp;
-       }
-}
-
-void
-iks_filter_packet (iksfilter *f, ikspak *pak)
-{
-       iksrule *rule, *max_rule;
-       int fail, score, max_score;
-
-       rule = f->rules;
-       max_rule = NULL;
-       max_score = 0;
-       while (rule) {
-               score = 0;
-               fail = 0;
-               if (rule->rules & IKS_RULE_TYPE) {
-                       if (rule->type == pak->type) score += 1; else fail = 1;
-               }
-               if (rule->rules & IKS_RULE_SUBTYPE) {
-                       if (rule->subtype == pak->subtype) score += 2; else fail = 1;
-               }
-               if (rule->rules & IKS_RULE_ID) {
-                       if (iks_strcmp (rule->id, pak->id) == 0) score += 16; else fail = 1;
-               }
-               if (rule->rules & IKS_RULE_NS) {
-                       if (iks_strcmp (rule->ns, pak->ns) == 0) score += 4; else fail = 1;
-               }
-               if (rule->rules & IKS_RULE_FROM) {
-                       if (pak->from && iks_strcmp (rule->from, pak->from->full) == 0) score += 8; else fail = 1;
-               }
-               if (rule->rules & IKS_RULE_FROM_PARTIAL) {
-                       if (pak->from && iks_strcmp (rule->from, pak->from->partial) == 0) score += 8; else fail = 1;
-               }
-               if (fail != 0) score = 0;
-               rule->score = score;
-               if (score > max_score) {
-                       max_rule = rule;
-                       max_score = score;
-               }
-               rule = rule->next;
-       }
-       while (max_rule) {
-               if (IKS_FILTER_EAT == max_rule->filterHook (max_rule->user_data, pak)) return;
-               max_rule->score = 0;
-               max_rule = NULL;
-               max_score = 0;
-               rule = f->rules;
-               while (rule) {
-                       if (rule->score > max_score) {
-                               max_rule = rule;
-                               max_score = rule->score;
-                       }
-                       rule = rule->next;
-               }
-       }
-}
-
-void
-iks_filter_delete (iksfilter *f)
-{
-       iksrule *rule, *tmp;
-
-       rule = f->rules;
-       while (rule) {
-               tmp = rule->next;
-               iks_stack_delete (&rule->s);
-               rule = tmp;
-       }
-       iks_free (f);
-}
diff --git a/libs/iksemel/src/iks.c b/libs/iksemel/src/iks.c
deleted file mode 100644 (file)
index 75071c1..0000000
+++ /dev/null
@@ -1,765 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2007 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-#define IKS_COMMON \
-       struct iks_struct *next, *prev; \
-       struct iks_struct *parent; \
-       enum ikstype type; \
-       ikstack *s
-
-struct iks_struct {
-       IKS_COMMON;
-};
-
-struct iks_tag {
-       IKS_COMMON;
-       struct iks_struct *children, *last_child;
-       struct iks_struct *attribs, *last_attrib;
-       char *name;
-};
-
-#define IKS_TAG_NAME(x) ((struct iks_tag *) (x) )->name
-#define IKS_TAG_CHILDREN(x) ((struct iks_tag *) (x) )->children
-#define IKS_TAG_LAST_CHILD(x) ((struct iks_tag *) (x) )->last_child
-#define IKS_TAG_ATTRIBS(x) ((struct iks_tag *) (x) )->attribs
-#define IKS_TAG_LAST_ATTRIB(x) ((struct iks_tag *) (x) )->last_attrib
-
-struct iks_cdata {
-       IKS_COMMON;
-       char *cdata;
-       size_t len;
-};
-
-#define IKS_CDATA_CDATA(x) ((struct iks_cdata *) (x) )->cdata
-#define IKS_CDATA_LEN(x) ((struct iks_cdata *) (x) )->len
-
-struct iks_attrib {
-       IKS_COMMON;
-       char *name;
-       char *value;
-};
-
-#define IKS_ATTRIB_NAME(x) ((struct iks_attrib *) (x) )->name
-#define IKS_ATTRIB_VALUE(x) ((struct iks_attrib *) (x) )->value
-
-/*****  Node Creating & Deleting  *****/
-
-iks *
-iks_new (const char *name)
-{
-       ikstack *s;
-       iks *x;
-
-       s = iks_stack_new (sizeof (struct iks_tag) * 6, 256);
-       if (!s) return NULL;
-       x = iks_new_within (name, s);
-       if (!x) {
-               iks_stack_delete (&s);
-               return NULL;
-       }
-       return x;
-}
-
-iks *
-iks_new_within (const char *name, ikstack *s)
-{
-       iks *x;
-       size_t len;
-
-       if (name) len = sizeof (struct iks_tag); else len = sizeof (struct iks_cdata);
-       x = iks_stack_alloc (s, len);
-       if (!x) return NULL;
-       memset (x, 0, len);
-       x->s = s;
-       x->type = IKS_TAG;
-       if (name) {
-               IKS_TAG_NAME (x) = iks_stack_strdup (s, name, 0);
-               if (!IKS_TAG_NAME (x)) return NULL;
-       }
-       return x;
-}
-
-iks *
-iks_insert (iks *x, const char *name)
-{
-       iks *y;
-
-       if (!x) return NULL;
-
-       y = iks_new_within (name, x->s);
-       if (!y) return NULL;
-       y->parent = x;
-       if (!IKS_TAG_CHILDREN (x)) IKS_TAG_CHILDREN (x) = y;
-       if (IKS_TAG_LAST_CHILD (x)) {
-               IKS_TAG_LAST_CHILD (x)->next = y;
-               y->prev = IKS_TAG_LAST_CHILD (x);
-       }
-       IKS_TAG_LAST_CHILD (x) = y;
-       return y;
-}
-
-iks *
-iks_insert_cdata (iks *x, const char *data, size_t len)
-{
-       iks *y;
-
-       if(!x || !data) return NULL;
-       if(len == 0) len = strlen (data);
-
-       y = IKS_TAG_LAST_CHILD (x);
-       if (y && y->type == IKS_CDATA) {
-               IKS_CDATA_CDATA (y) = iks_stack_strcat (x->s, IKS_CDATA_CDATA (y), IKS_CDATA_LEN (y), data, len);
-               IKS_CDATA_LEN (y) += len;
-       } else {
-               y = iks_insert (x, NULL);
-               if (!y) return NULL;
-               y->type = IKS_CDATA;
-               IKS_CDATA_CDATA (y) = iks_stack_strdup (x->s, data, len);
-               if (!IKS_CDATA_CDATA (y)) return NULL;
-               IKS_CDATA_LEN (y) = len;
-       }
-       return y;
-}
-
-iks *
-iks_insert_attrib (iks *x, const char *name, const char *value)
-{
-       iks *y;
-
-       if (!x) return NULL;
-
-       y = IKS_TAG_ATTRIBS (x);
-       while (y) {
-               if (strcmp (name, IKS_ATTRIB_NAME (y)) == 0) break;
-               y = y->next;
-       }
-       if (NULL == y) {
-               if (!value) return NULL;
-               y = iks_stack_alloc (x->s, sizeof (struct iks_attrib));
-               if (!y) return NULL;
-               memset (y, 0, sizeof (struct iks_attrib));
-               y->type = IKS_ATTRIBUTE;
-               y->s = x->s;
-               IKS_ATTRIB_NAME (y) = iks_stack_strdup (x->s, name, 0);
-               if (!IKS_ATTRIB_NAME (y)) return NULL;
-               y->parent = x;
-               if (!IKS_TAG_ATTRIBS (x)) IKS_TAG_ATTRIBS (x) = y;
-               if (IKS_TAG_LAST_ATTRIB (x)) {
-                       IKS_TAG_LAST_ATTRIB (x)->next = y;
-                       y->prev = IKS_TAG_LAST_ATTRIB (x);
-               }
-               IKS_TAG_LAST_ATTRIB (x) = y;
-       }
-
-       if (value) {
-               IKS_ATTRIB_VALUE (y) = iks_stack_strdup (x->s, value, 0);
-               if (!IKS_ATTRIB_VALUE (y)) return NULL;
-       } else {
-               if (y->next) y->next->prev = y->prev;
-               if (y->prev) y->prev->next = y->next;
-               if (IKS_TAG_ATTRIBS (x) == y) IKS_TAG_ATTRIBS (x) = y->next;
-               if (IKS_TAG_LAST_ATTRIB (x) == y) IKS_TAG_LAST_ATTRIB (x) = y->prev;
-       }
-
-       return y;
-}
-
-iks *
-iks_insert_node (iks *x, iks *y)
-{
-       y->parent = x;
-       if (!IKS_TAG_CHILDREN (x)) IKS_TAG_CHILDREN (x) = y;
-       if (IKS_TAG_LAST_CHILD (x)) {
-               IKS_TAG_LAST_CHILD (x)->next = y;
-               y->prev = IKS_TAG_LAST_CHILD (x);
-       }
-       IKS_TAG_LAST_CHILD (x) = y;
-       return y;
-}
-
-iks *
-iks_append (iks *x, const char *name)
-{
-       iks *y;
-
-       if (!x) return NULL;
-       y = iks_new_within (name, x->s);
-       if (!y) return NULL;
-
-       if (x->next) {
-               x->next->prev = y;
-       } else {
-               IKS_TAG_LAST_CHILD (x->parent) = y;
-       }
-       y->next = x->next;
-       x->next = y;
-       y->parent = x->parent;
-       y->prev = x;
-
-       return y;
-}
-
-iks *
-iks_prepend (iks *x, const char *name)
-{
-       iks *y;
-
-       if (!x) return NULL;
-       y = iks_new_within (name, x->s);
-       if (!y) return NULL;
-
-       if (x->prev) {
-               x->prev->next = y;
-       } else {
-               IKS_TAG_CHILDREN (x->parent) = y;
-       }
-       y->prev = x->prev;
-       x->prev = y;
-       y->parent = x->parent;
-       y->next = x;
-
-       return y;
-}
-
-iks *
-iks_append_cdata (iks *x, const char *data, size_t len)
-{
-       iks *y;
-
-       if (!x || !data) return NULL;
-       if (len == 0) len = strlen (data);
-
-       y = iks_new_within (NULL, x->s);
-       if (!y) return NULL;
-       y->type = IKS_CDATA;
-       IKS_CDATA_CDATA (y) = iks_stack_strdup (x->s, data, len);
-       if (!IKS_CDATA_CDATA (y)) return NULL;
-       IKS_CDATA_LEN (y) = len;
-
-       if (x->next) {
-               x->next->prev = y;
-       } else {
-               IKS_TAG_LAST_CHILD (x->parent) = y;
-       }
-       y->next = x->next;
-       x->next = y;
-       y->parent = x->parent;
-       y->prev = x;
-
-       return y;
-}
-
-iks *
-iks_prepend_cdata (iks *x, const char *data, size_t len)
-{
-       iks *y;
-
-       if (!x || !data) return NULL;
-       if (len == 0) len = strlen (data);
-
-       y = iks_new_within (NULL, x->s);
-       if (!y) return NULL;
-       y->type = IKS_CDATA;
-       IKS_CDATA_CDATA(y) = iks_stack_strdup (x->s, data, len);
-       if (!IKS_CDATA_CDATA (y)) return NULL;
-       IKS_CDATA_LEN (y) = len;
-
-       if (x->prev) {
-               x->prev->next = y;
-       } else {
-               IKS_TAG_CHILDREN (x->parent) = y;
-       }
-       y->prev = x->prev;
-       x->prev = y;
-       y->parent = x->parent;
-       y->next = x;
-
-       return y;
-}
-
-void
-iks_hide (iks *x)
-{
-       iks *y;
-
-       if (!x) return;
-
-       if (x->prev) x->prev->next = x->next;
-       if (x->next) x->next->prev = x->prev;
-       y = x->parent;
-       if (y) {
-               if (IKS_TAG_CHILDREN (y) == x) IKS_TAG_CHILDREN (y) = x->next;
-               if (IKS_TAG_LAST_CHILD (y) == x) IKS_TAG_LAST_CHILD (y) = x->prev;
-       }
-}
-
-void
-iks_delete (iks *x)
-{
-       if (x) iks_stack_delete (&x->s);
-}
-
-/*****  Node Traversing  *****/
-
-iks *
-iks_next (iks *x)
-{
-       if (x) return x->next;
-       return NULL;
-}
-
-iks *
-iks_next_tag (iks *x)
-{
-       if (x) {
-               while (1) {
-                       x = x->next;
-                       if (NULL == x) break;
-                       if (IKS_TAG == x->type) return x;
-               }
-       }
-       return NULL;
-}
-
-iks *
-iks_prev (iks *x)
-{
-       if (x) return x->prev;
-       return NULL;
-}
-
-iks *
-iks_prev_tag (iks *x)
-{
-       if (x) {
-               while (1) {
-                       x = x->prev;
-                       if (NULL == x) break;
-                       if (IKS_TAG == x->type) return x;
-               }
-       }
-       return NULL;
-}
-
-iks *
-iks_parent (iks *x)
-{
-       if (x) return x->parent;
-       return NULL;
-}
-
-iks *
-iks_root (iks *x)
-{
-       if (x) {
-               while (x->parent)
-                       x = x->parent;
-       }
-       return x;
-}
-
-iks *
-iks_child (iks *x)
-{
-       if (x && IKS_TAG == x->type) return IKS_TAG_CHILDREN (x);
-       return NULL;
-}
-
-iks *
-iks_first_tag (iks *x)
-{
-       if (x) {
-               x = IKS_TAG_CHILDREN (x);
-               while (x) {
-                       if (IKS_TAG == x->type) return x;
-                       x = x->next;
-               }
-       }
-       return NULL;
-}
-
-iks *
-iks_attrib (iks *x)
-{
-       if (x) return IKS_TAG_ATTRIBS (x);
-       return NULL;
-}
-
-iks *
-iks_find (iks *x, const char *name)
-{
-       iks *y;
-
-       if (!x) return NULL;
-       y = IKS_TAG_CHILDREN (x);
-       while (y) {
-               if (IKS_TAG == y->type && IKS_TAG_NAME (y) && strcmp (IKS_TAG_NAME (y), name) == 0) return y;
-               y = y->next;
-       }
-       return NULL;
-}
-
-char *
-iks_find_cdata (iks *x, const char *name)
-{
-       iks *y;
-
-       y = iks_find (x, name);
-       if (!y) return NULL;
-       y = IKS_TAG_CHILDREN (y);
-       if (!y || IKS_CDATA != y->type) return NULL;
-       return IKS_CDATA_CDATA (y);
-}
-
-char *
-iks_find_attrib (iks *x, const char *name)
-{
-       iks *y;
-
-       if (!x) return NULL;
-
-       y = IKS_TAG_ATTRIBS (x);
-       while (y) {
-               if (IKS_ATTRIB_NAME (y) && strcmp (IKS_ATTRIB_NAME (y), name) == 0)
-                       return IKS_ATTRIB_VALUE (y);
-               y = y->next;
-       }
-       return NULL;
-}
-
-iks *
-iks_find_with_attrib (iks *x, const char *tagname, const char *attrname, const char *value)
-{
-       iks *y;
-
-       if (NULL == x) return NULL;
-
-       if (tagname) {
-               for (y = IKS_TAG_CHILDREN (x); y; y = y->next) {
-                       if (IKS_TAG == y->type
-                               && strcmp (IKS_TAG_NAME (y), tagname) == 0
-                               && iks_strcmp (iks_find_attrib (y, attrname), value) == 0) {
-                                       return y;
-                       }
-               }
-       } else {
-               for (y = IKS_TAG_CHILDREN (x); y; y = y->next) {
-                       if (IKS_TAG == y->type
-                               && iks_strcmp (iks_find_attrib (y, attrname), value) == 0) {
-                                       return y;
-                       }
-               }
-       }
-       return NULL;
-}
-
-/*****  Node Information  *****/
-
-ikstack *
-iks_stack (iks *x)
-{
-       if (x) return x->s;
-       return NULL;
-}
-
-enum ikstype
-iks_type (iks *x)
-{
-       if (x) return x->type;
-       return IKS_NONE;
-}
-
-char *
-iks_name (iks *x)
-{
-       if (x) {
-               if (IKS_TAG == x->type)
-                       return IKS_TAG_NAME (x);
-               else
-                       return IKS_ATTRIB_NAME (x);
-       }
-       return NULL;
-}
-
-char *
-iks_cdata (iks *x)
-{
-       if (x) {
-               if (IKS_CDATA == x->type)
-                       return IKS_CDATA_CDATA (x);
-               else
-                       return IKS_ATTRIB_VALUE (x);
-       }
-       return NULL;
-}
-
-size_t
-iks_cdata_size (iks *x)
-{
-       if (x) return IKS_CDATA_LEN (x);
-       return 0;
-}
-
-int
-iks_has_children (iks *x)
-{
-       if (x && IKS_TAG == x->type && IKS_TAG_CHILDREN (x)) return 1;
-       return 0;
-}
-
-int
-iks_has_attribs (iks *x)
-{
-       if (x && IKS_TAG == x->type && IKS_TAG_ATTRIBS (x)) return 1;
-       return 0;
-}
-
-/*****  Serializing  *****/
-
-static size_t
-escape_size (char *src, size_t len)
-{
-       size_t sz;
-       char c;
-       int i;
-
-       sz = 0;
-       for (i = 0; i < len; i++) {
-               c = src[i];
-               switch (c) {
-                       case '&': sz += 5; break;
-                       case '\'': sz += 6; break;
-                       case '"': sz += 6; break;
-                       case '<': sz += 4; break;
-                       case '>': sz += 4; break;
-                       default: sz++; break;
-               }
-       }
-       return sz;
-}
-
-static char *
-my_strcat (char *dest, char *src, size_t len)
-{
-       if (0 == len) len = strlen (src);
-       memcpy (dest, src, len);
-       return dest + len;
-}
-
-static char *
-escape (char *dest, char *src, size_t len)
-{
-       char c;
-       int i;
-       int j = 0;
-
-       for (i = 0; i < len; i++) {
-               c = src[i];
-               if ('&' == c || '<' == c || '>' == c || '\'' == c || '"' == c) {
-                       if (i - j > 0) dest = my_strcat (dest, src + j, i - j);
-                       j = i + 1;
-                       switch (c) {
-                       case '&': dest = my_strcat (dest, "&amp;", 5); break;
-                       case '\'': dest = my_strcat (dest, "&apos;", 6); break;
-                       case '"': dest = my_strcat (dest, "&quot;", 6); break;
-                       case '<': dest = my_strcat (dest, "&lt;", 4); break;
-                       case '>': dest = my_strcat (dest, "&gt;", 4); break;
-                       }
-               }
-       }
-       if (i - j > 0) dest = my_strcat (dest, src + j, i - j);
-       return dest;
-}
-
-char *
-iks_string (ikstack *s, iks *x)
-{
-       size_t size;
-       int level, dir;
-       iks *y, *z;
-       char *ret, *t;
-
-       if (!x) return NULL;
-
-       if (x->type == IKS_CDATA) {
-               if (s) {
-                       return iks_stack_strdup (s, IKS_CDATA_CDATA (x), IKS_CDATA_LEN (x));
-               } else {
-                       ret = iks_malloc (IKS_CDATA_LEN (x));
-                       memcpy (ret, IKS_CDATA_CDATA (x), IKS_CDATA_LEN (x));
-                       return ret;
-               }
-       }
-
-       size = 0;
-       level = 0;
-       dir = 0;
-       y = x;
-       while (1) {
-               if (dir==0) {
-                       if (y->type == IKS_TAG) {
-                               size++;
-                               size += strlen (IKS_TAG_NAME (y));
-                               for (z = IKS_TAG_ATTRIBS (y); z; z = z->next) {
-                                       if (z->type == IKS_NONE) {
-                                               continue;
-                                       }
-                                       size += 4 + strlen (IKS_ATTRIB_NAME (z))
-                                               + escape_size (IKS_ATTRIB_VALUE (z), strlen (IKS_ATTRIB_VALUE (z)));
-                               }
-                               if (IKS_TAG_CHILDREN (y)) {
-                                       size++;
-                                       y = IKS_TAG_CHILDREN (y);
-                                       level++;
-                                       continue;
-                               } else {
-                                       size += 2;
-                               }
-                       } else {
-                               size += escape_size (IKS_CDATA_CDATA (y), IKS_CDATA_LEN (y));
-                       }
-               }
-               z = y->next;
-               if (z) {
-                       if (0 == level) {
-                               if (IKS_TAG_CHILDREN (y)) size += 3 + strlen (IKS_TAG_NAME (y));
-                               break;
-                       }
-                       y = z;
-                       dir = 0;
-               } else {
-                       y = y->parent;
-                       level--;
-                       if (level >= 0) size += 3 + strlen (IKS_TAG_NAME (y));
-                       if (level < 1) break;
-                       dir = 1;
-               }
-       }
-
-       if (s) ret = iks_stack_alloc (s, size + 1);
-       else ret = iks_malloc (size + 1);
-
-       if (!ret) return NULL;
-
-       t = ret;
-       level = 0;
-       dir = 0;
-       while (1) {
-               if (dir==0) {
-                       if (x->type == IKS_TAG) {
-                               *t++ = '<';
-                               t = my_strcat (t, IKS_TAG_NAME (x), 0);
-                               y = IKS_TAG_ATTRIBS (x);
-                               while (y) {
-                                       *t++ = ' ';
-                                       t = my_strcat (t, IKS_ATTRIB_NAME (y), 0);
-                                       *t++ = '=';
-                                       *t++ = '\'';
-                                       t = escape (t, IKS_ATTRIB_VALUE (y), strlen (IKS_ATTRIB_VALUE (y)));
-                                       *t++ = '\'';
-                                       y = y->next;
-                               }
-                               if (IKS_TAG_CHILDREN (x)) {
-                                       *t++ = '>';
-                                       x = IKS_TAG_CHILDREN (x);
-                                       level++;
-                                       continue;
-                               } else {
-                                       *t++ = '/';
-                                       *t++ = '>';
-                               }
-                       } else {
-                               t = escape (t, IKS_CDATA_CDATA (x), IKS_CDATA_LEN (x));
-                       }
-               }
-               y = x->next;
-               if (y) {
-                       if (0 == level) {
-                               if (IKS_TAG_CHILDREN (x)) {
-                                       *t++ = '<';
-                                       *t++ = '/';
-                                       t = my_strcat (t, IKS_TAG_NAME (x), 0);
-                                       *t++ = '>';
-                               }
-                               break;
-                       }
-                       x = y;
-                       dir = 0;
-               } else {
-                       x = x->parent;
-                       level--;
-                       if (level >= 0) {
-                                       *t++ = '<';
-                                       *t++ = '/';
-                                       t = my_strcat (t, IKS_TAG_NAME (x), 0);
-                                       *t++ = '>';
-                               }
-                       if (level < 1) break;
-                       dir = 1;
-               }
-       }
-       *t = '\0';
-
-       return ret;
-}
-
-/*****  Copying  *****/
-
-iks *
-iks_copy_within (iks *x, ikstack *s)
-{
-       int level=0, dir=0;
-       iks *copy = NULL;
-       iks *cur = NULL;
-       iks *y;
-
-       while (1) {
-               if (dir == 0) {
-                       if (x->type == IKS_TAG) {
-                               if (copy == NULL) {
-                                       copy = iks_new_within (IKS_TAG_NAME (x), s);
-                                       cur = copy;
-                               } else {
-                                       cur = iks_insert (cur, IKS_TAG_NAME (x));
-                               }
-                               for (y = IKS_TAG_ATTRIBS (x); y; y = y->next) {
-                                       iks_insert_attrib (cur, IKS_ATTRIB_NAME (y), IKS_ATTRIB_VALUE (y));
-                               }
-                               if (IKS_TAG_CHILDREN (x)) {
-                                       x = IKS_TAG_CHILDREN (x);
-                                       level++;
-                                       continue;
-                               } else {
-                                       cur = cur->parent;
-                               }
-                       } else {
-                               iks_insert_cdata (cur, IKS_CDATA_CDATA (x), IKS_CDATA_LEN (x));
-                       }
-               }
-               y = x->next;
-               if (y) {
-                       if (0 == level) break;
-                       x = y;
-                       dir = 0;
-               } else {
-                       if (level < 2) break;
-                       level--;
-                       x = x->parent;
-                       cur = cur->parent;
-                       dir = 1;
-               }
-       }
-       return copy;
-}
-
-iks *
-iks_copy (iks *x)
-{
-       return iks_copy_within (x, iks_stack_new (sizeof (struct iks_tag) * 6, 256));
-}
diff --git a/libs/iksemel/src/ikstack.c b/libs/iksemel/src/ikstack.c
deleted file mode 100644 (file)
index b5fd75e..0000000
+++ /dev/null
@@ -1,214 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2004 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-struct align_test { char a; double b; };
-#define DEFAULT_ALIGNMENT  ((size_t) ((char *) &((struct align_test *) 0)->b - (char *) 0))
-#define ALIGN_MASK ( DEFAULT_ALIGNMENT - 1 )
-#define MIN_CHUNK_SIZE ( DEFAULT_ALIGNMENT * 8 )
-#define MIN_ALLOC_SIZE DEFAULT_ALIGNMENT
-#define ALIGN(x) ( (x) + (DEFAULT_ALIGNMENT - ( (x) & ALIGN_MASK)) )
-
-typedef struct ikschunk_struct {
-       struct ikschunk_struct *next;
-       size_t size;
-       size_t used;
-       size_t last;
-       char data[4];
-} ikschunk;
-
-struct ikstack_struct {
-       size_t allocated;
-       ikschunk *meta;
-       ikschunk *data;
-};
-
-static ikschunk *
-find_space (ikstack *s, ikschunk *c, size_t size)
-{
-       /* FIXME: dont use *2 after over allocated chunks */
-       while (c) {
-               if (c->size - c->used >= size) return c;
-               if (!c->next) {
-                       if ((c->size * 2) > size) size = c->size * 2;
-                       c->next = iks_malloc (sizeof (ikschunk) + size);
-                       if (!c->next) return NULL;
-                       s->allocated += sizeof (ikschunk) + size;
-                       c = c->next;
-                       c->next = NULL;
-                       c->size = size;
-                       c->used = 0;
-                       c->last = (size_t) -1;
-                       return c;
-               }
-               c = c->next;
-       }
-       return NULL;
-}
-
-ikstack *
-iks_stack_new (size_t meta_chunk, size_t data_chunk)
-{
-       ikstack *s;
-       size_t len;
-
-       if (meta_chunk < MIN_CHUNK_SIZE) meta_chunk = MIN_CHUNK_SIZE;
-       if (meta_chunk & ALIGN_MASK) meta_chunk = ALIGN (meta_chunk);
-       if (data_chunk < MIN_CHUNK_SIZE) data_chunk = MIN_CHUNK_SIZE;
-       if (data_chunk & ALIGN_MASK) data_chunk = ALIGN (data_chunk);
-
-       len = sizeof (ikstack) + meta_chunk + data_chunk + (sizeof (ikschunk) * 2);
-       s = iks_malloc (len);
-       if (!s) return NULL;
-       s->allocated = len;
-       s->meta = (ikschunk *) ((char *) s + sizeof (ikstack));
-       s->meta->next = NULL;
-       s->meta->size = meta_chunk;
-       s->meta->used = 0;
-       s->meta->last = (size_t) -1;
-       s->data = (ikschunk *) ((char *) s + sizeof (ikstack) + sizeof (ikschunk) + meta_chunk);
-       s->data->next = NULL;
-       s->data->size = data_chunk;
-       s->data->used = 0;
-       s->data->last = (size_t) -1;
-       return s;
-}
-
-void *
-iks_stack_alloc (ikstack *s, size_t size)
-{
-       ikschunk *c;
-       void *mem;
-
-       if (size < MIN_ALLOC_SIZE) size = MIN_ALLOC_SIZE;
-       if (size & ALIGN_MASK) size = ALIGN (size);
-
-       c = find_space (s, s->meta, size);
-       if (!c) return NULL;
-       mem = c->data + c->used;
-       c->used += size;
-       return mem;
-}
-
-char *
-iks_stack_strdup (ikstack *s, const char *src, size_t len)
-{
-       ikschunk *c;
-       char *dest;
-
-       if (!src) return NULL;
-       if (0 == len) len = strlen (src);
-
-       c = find_space (s, s->data, len + 1);
-       if (!c) return NULL;
-       dest = c->data + c->used;
-       c->last = c->used;
-       c->used += len + 1;
-       memcpy (dest, src, len);
-       dest[len] = '\0';
-       return dest;
-}
-
-char *
-iks_stack_strcat (ikstack *s, char *old, size_t old_len, const char *src, size_t src_len)
-{
-       char *ret;
-       ikschunk *c;
-
-       if (!old) {
-               return iks_stack_strdup (s, src, src_len);
-       }
-       if (0 == old_len) old_len = strlen (old);
-       if (0 == src_len) src_len = strlen (src);
-
-       for (c = s->data; c; c = c->next) {
-               if (c->data + c->last == old) break;
-       }
-       if (!c) {
-               c = find_space (s, s->data, old_len + src_len + 1);
-               if (!c) return NULL;
-               ret = c->data + c->used;
-               c->last = c->used;
-               c->used += old_len + src_len + 1;
-               memcpy (ret, old, old_len);
-               memcpy (ret + old_len, src, src_len);
-               ret[old_len + src_len] = '\0';
-               return ret;
-       }
-
-       if (c->size - c->used > src_len) {
-               ret = c->data + c->last;
-               memcpy (ret + old_len, src, src_len);
-               c->used += src_len;
-               ret[old_len + src_len] = '\0';
-       } else {
-               /* FIXME: decrease c->used before moving string to new place */
-               c = find_space (s, s->data, old_len + src_len + 1);
-               if (!c) return NULL;
-               c->last = c->used;
-               ret = c->data + c->used;
-               memcpy (ret, old, old_len);
-               c->used += old_len;
-               memcpy (c->data + c->used, src, src_len);
-               c->used += src_len;
-               c->data[c->used] = '\0';
-               c->used++;
-       }
-       return ret;
-}
-
-void
-iks_stack_stat (ikstack *s, size_t *allocated, size_t *used)
-{
-       ikschunk *c;
-
-       if (allocated) {
-               *allocated = s->allocated;
-       }
-       if (used) {
-               *used = 0;
-               for (c = s->meta; c; c = c->next) {
-                       (*used) += c->used;
-               }
-               for (c = s->data; c; c = c->next) {
-                       (*used) += c->used;
-               }
-       }
-}
-
-void
-iks_stack_delete (ikstack **sp)
-{
-       ikschunk *c, *tmp;
-       ikstack *s;
-
-       if (!sp) {
-               return;
-       }
-
-       s = *sp;
-
-       if (!s) {
-               return;
-       }
-
-       *sp = NULL;
-       c = s->meta->next;
-       while (c) {
-               tmp = c->next;
-               iks_free (c);
-               c = tmp;
-       }
-       c = s->data->next;
-       while (c) {
-               tmp = c->next;
-               iks_free (c);
-               c = tmp;
-       }
-       iks_free (s);
-}
diff --git a/libs/iksemel/src/io-posix.c b/libs/iksemel/src/io-posix.c
deleted file mode 100644 (file)
index f0a8e07..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2004 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-#ifdef _WIN32
-#include <winsock.h>
-#else
-#include <netdb.h>
-#include <sys/time.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#endif
-
-static void
-io_close (void *socket)
-{
-       int sock = (int) socket;
-#ifdef _WIN32
-       closesocket (sock);
-#else
-       close (sock);
-#endif
-}
-
-static int
-io_connect (iksparser *prs, void **socketptr, const char *server, int port)
-{
-       int sock = -1;
-       int tmp;
-#ifdef HAVE_GETADDRINFO
-       struct addrinfo hints;
-       struct addrinfo *addr_res, *addr_ptr;
-       char port_str[6];
-       int err = 0;
-       int family = AF_INET;
-
-       if (strchr(server, ':')) {
-               family = AF_INET6;
-       }
-
-       hints.ai_flags = AI_CANONNAME;
-       hints.ai_family = family;
-       hints.ai_socktype = SOCK_STREAM;
-       hints.ai_protocol = 0;
-       hints.ai_addrlen = 0;
-       hints.ai_canonname = NULL;
-       hints.ai_addr = NULL;
-       hints.ai_next = NULL;
-       sprintf (port_str, "%i", port);
-
-       if (getaddrinfo (server, port_str, &hints, &addr_res) != 0)
-               return IKS_NET_NODNS;
-
-       addr_ptr = addr_res;
-       while (addr_ptr) {
-               err = IKS_NET_NOSOCK;
-               sock = socket (addr_ptr->ai_family, addr_ptr->ai_socktype, addr_ptr->ai_protocol);
-               if (sock != -1) {
-                       err = IKS_NET_NOCONN;
-                       tmp = connect (sock, addr_ptr->ai_addr, addr_ptr->ai_addrlen);
-
-                       if (tmp == 0) break;
-                       io_close ((void *) sock);
-                       sock = -1;
-               }
-               addr_ptr = addr_ptr->ai_next;
-       }
-       freeaddrinfo (addr_res);
-
-       if (sock == -1) return err;
-#else
-       struct hostent *host;
-       struct sockaddr_in sin;
-
-       host = gethostbyname (server);
-       if (!host) return IKS_NET_NODNS;
-
-       memcpy (&sin.sin_addr, host->h_addr, host->h_length);
-       sin.sin_family = host->h_addrtype;
-       sin.sin_port = htons (port);
-       sock = socket (host->h_addrtype, SOCK_STREAM, 0);
-       if (sock == -1) return IKS_NET_NOSOCK;
-
-       tmp = connect (sock, (struct sockaddr *)&sin, sizeof (struct sockaddr_in));
-       if (tmp != 0) {
-               io_close ((void *) sock);
-               return IKS_NET_NOCONN;
-       }
-#endif
-
-       *socketptr = (void *) sock;
-
-       return IKS_OK;
-}
-
-static int
-io_send (void *socket, const char *data, size_t len)
-{
-       int sock = (int) socket;
-
-       if (send (sock, data, len, 0) == -1) return IKS_NET_RWERR;
-       return IKS_OK;
-}
-
-static int
-io_recv (void *socket, char *buffer, size_t buf_len, int timeout)
-{
-       int sock = (int) socket;
-       fd_set fds;
-       struct timeval tv, *tvptr;
-       int len;
-       char *bound;
-
-       tv.tv_sec = 0;
-       tv.tv_usec = 0;
-
-       FD_ZERO (&fds);
-       FD_SET (sock, &fds);
-       tv.tv_sec = timeout;
-
-       if (timeout != -1) tvptr = &tv; else tvptr = NULL;
-       if (select (sock + 1, &fds, NULL, NULL, tvptr) > 0) {
-               len = recv (sock, buffer, buf_len, 0);
-               if (len > 0) {
-                       char *p, *e = NULL, *t = NULL;
-                       bound = buffer + (len -1);
-
-                       for (p = buffer; p < bound; p++) {
-                               if (*p == '>') {
-                                       e = p;
-                                       t = p+1;
-                                       if (*t == '<') {
-                                               continue;
-                                       }
-                                       while(p < bound && t < bound) {
-                                               if (*t != ' ' && *t != '<') {
-                                                       t = e = NULL;
-                                                       break;
-                                               }
-                                               if (*t == '<') {
-                                                       p = t;
-                                                       *(p-1) = '>';
-                                                       *e = ' ';
-                                                       e = NULL;
-                                                       break;
-                                               }
-
-                                               t++;
-                                       }
-                               }
-                       }
-                       return len;
-               } else if (len <= 0) {
-                       return -1;
-               }
-       }
-       return 0;
-}
-
-ikstransport iks_default_transport = {
-       IKS_TRANSPORT_V1,
-       io_connect,
-       io_send,
-       io_recv,
-       io_close,
-       NULL
-};
diff --git a/libs/iksemel/src/jabber.c b/libs/iksemel/src/jabber.c
deleted file mode 100644 (file)
index 9143751..0000000
+++ /dev/null
@@ -1,330 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-iksid *
-iks_id_new (ikstack *s, const char *jid)
-{
-       iksid *id;
-       char *src, *tmp;
-
-/* FIXME: add jabber id validity checks to this function */
-/* which characters are allowed in id parts? */
-
-       if (!jid) return NULL;
-       id = iks_stack_alloc (s, sizeof (iksid));
-       if (!id) return NULL;
-       memset (id, 0, sizeof (iksid));
-
-       /* skip scheme */
-       if (strncmp ("jabber:", jid, 7) == 0) jid += 7;
-
-       id->full = iks_stack_strdup (s, jid, 0);
-       src = id->full;
-
-       /* split resource */
-       tmp = strchr (src, '/');
-       if (tmp) {
-               id->partial = iks_stack_strdup (s, src, tmp - src);
-               id->resource = tmp + 1;
-               src = id->partial;
-       } else {
-               id->partial = src;
-       }
-
-       /* split user */
-       tmp = strchr (src, '@');
-       if (tmp) {
-               id->user = iks_stack_strdup (s, src, tmp - src);
-               src = ++tmp;
-       }
-
-       id->server = src;
-
-       return id;
-}
-
-int
-iks_id_cmp (iksid *a, iksid *b, int parts)
-{
-       int diff;
-
-       if (!a || !b) return (IKS_ID_RESOURCE | IKS_ID_USER | IKS_ID_SERVER);
-       diff = 0;
-       if (parts & IKS_ID_RESOURCE && !(!a->resource && !b->resource) && iks_strcmp (a->resource, b->resource) != 0)
-               diff += IKS_ID_RESOURCE;
-       if (parts & IKS_ID_USER && !(!a->user && !b->user) && iks_strcasecmp (a->user, b->user) != 0)
-               diff += IKS_ID_USER;
-       if (parts & IKS_ID_SERVER && !(!a->server && !b->server) && iks_strcmp (a->server, b->server) != 0)
-               diff += IKS_ID_SERVER;
-       return diff;
-}
-
-ikspak *
-iks_packet (iks *x)
-{
-       ikspak *pak;
-       ikstack *s;
-       char *tmp;
-
-       s = iks_stack (x);
-       pak = iks_stack_alloc (s, sizeof (ikspak));
-       if (!pak) return NULL;
-       memset (pak, 0, sizeof (ikspak));
-       pak->x = x;
-       tmp = iks_find_attrib (x, "from");
-       if (tmp) pak->from = iks_id_new (s, tmp);
-       pak->id = iks_find_attrib (x, "id");
-
-       tmp = iks_find_attrib (x, "type");
-       if (strcmp (iks_name (x), "message") == 0) {
-               pak->type = IKS_PAK_MESSAGE;
-               if (tmp) {
-                       if (strcmp (tmp, "chat") == 0)
-                               pak->subtype = IKS_TYPE_CHAT;
-                       else if (strcmp (tmp, "groupchat") == 0)
-                               pak->subtype = IKS_TYPE_GROUPCHAT;
-                       else if (strcmp (tmp, "headline") == 0)
-                               pak->subtype = IKS_TYPE_HEADLINE;
-                       else if (strcmp (tmp, "error") == 0)
-                               pak->subtype = IKS_TYPE_ERROR;
-               }
-       } else if (strcmp (iks_name (x), "presence") == 0) {
-               pak->type = IKS_PAK_S10N;
-               if (tmp) {
-                       if (strcmp (tmp, "unavailable") == 0) {
-                               pak->type = IKS_PAK_PRESENCE;
-                               pak->subtype = IKS_TYPE_UNAVAILABLE;
-                               pak->show = IKS_SHOW_UNAVAILABLE;
-                       } else if (strcmp (tmp, "probe") == 0) {
-                               pak->type = IKS_PAK_PRESENCE;
-                               pak->subtype = IKS_TYPE_PROBE;
-                       } else if(strcmp(tmp, "subscribe") == 0)
-                               pak->subtype = IKS_TYPE_SUBSCRIBE;
-                       else if(strcmp(tmp, "subscribed") == 0)
-                               pak->subtype = IKS_TYPE_SUBSCRIBED;
-                       else if(strcmp(tmp, "unsubscribe") == 0)
-                               pak->subtype = IKS_TYPE_UNSUBSCRIBE;
-                       else if(strcmp(tmp, "unsubscribed") == 0)
-                               pak->subtype = IKS_TYPE_UNSUBSCRIBED;
-                       else if(strcmp(tmp, "error") == 0)
-                               pak->subtype = IKS_TYPE_ERROR;
-               } else {
-                       pak->type = IKS_PAK_PRESENCE;
-                       pak->subtype = IKS_TYPE_AVAILABLE;
-                       tmp = iks_find_cdata (x, "show");
-                       pak->show = IKS_SHOW_AVAILABLE;
-                       if (tmp) {
-                               if (strcmp (tmp, "chat") == 0)
-                                       pak->show = IKS_SHOW_CHAT;
-                               else if (strcmp (tmp, "away") == 0)
-                                       pak->show = IKS_SHOW_AWAY;
-                               else if (strcmp (tmp, "xa") == 0)
-                                       pak->show = IKS_SHOW_XA;
-                               else if (strcmp (tmp, "dnd") == 0)
-                                       pak->show = IKS_SHOW_DND;
-                       }
-               }
-       } else if (strcmp (iks_name (x), "iq") == 0) {
-               iks *q;
-               pak->type = IKS_PAK_IQ;
-               if (tmp) {
-                       if (strcmp (tmp, "get") == 0)
-                               pak->subtype = IKS_TYPE_GET;
-                       else if (strcmp (tmp, "set") == 0)
-                               pak->subtype = IKS_TYPE_SET;
-                       else if (strcmp (tmp, "result") == 0)
-                               pak->subtype = IKS_TYPE_RESULT;
-                       else if (strcmp (tmp, "error") == 0)
-                               pak->subtype = IKS_TYPE_ERROR;
-               }
-               for (q = iks_child (x); q; q = iks_next (q)) {
-                       if (IKS_TAG == iks_type (q)) {
-                               char *ns;
-                               ns = iks_find_attrib (q, "xmlns");
-                               if (ns) {
-                                       pak->query = q;
-                                       pak->ns = ns;
-                                       break;
-                               }
-                       }
-               }
-       }
-       return pak;
-}
-
-iks *
-iks_make_auth (iksid *id, const char *pass, const char *sid)
-{
-       iks *x, *y;
-
-       x = iks_new ("iq");
-       iks_insert_attrib (x, "type", "set");
-       y = iks_insert (x, "query");
-       iks_insert_attrib (y, "xmlns", IKS_NS_AUTH);
-       iks_insert_cdata (iks_insert (y, "username"), id->user, 0);
-       iks_insert_cdata (iks_insert (y, "resource"), id->resource, 0);
-       if(sid) {
-               char buf[41];
-               iksha *sha;
-               sha = iks_sha_new ();
-               iks_sha_hash (sha, (const unsigned char*)sid, strlen (sid), 0);
-               iks_sha_hash (sha, (const unsigned char*)pass, strlen (pass), 1);
-               iks_sha_print (sha, buf);
-               iks_sha_delete (sha);
-               iks_insert_cdata (iks_insert (y, "digest"), buf, 40);
-       } else {
-               iks_insert_cdata (iks_insert (y, "password"), pass, 0);
-       }
-       return x;
-}
-
-iks *
-iks_make_msg (enum iksubtype type, const char *to, const char *body)
-{
-       iks *x;
-       char *t = NULL;
-
-       x = iks_new ("message");
-       switch (type) {
-       case IKS_TYPE_CHAT: t = "chat"; break;
-       case IKS_TYPE_GROUPCHAT: t = "groupchat"; break;
-       case IKS_TYPE_HEADLINE: t = "headline"; break;
-       default: break;
-       }
-       if (t) iks_insert_attrib (x, "type", t);
-       if (to) iks_insert_attrib (x, "to", to);
-       if (body) iks_insert_cdata (iks_insert (x, "body"), body, 0);
-       return x;
-}
-
-iks *
-iks_make_s10n (enum iksubtype type, const char *to, const char *msg)
-{
-       iks *x;
-       char *t;
-
-       x = iks_new ("presence");
-       switch (type) {
-               case IKS_TYPE_SUBSCRIBE: t = "subscribe"; break;
-               case IKS_TYPE_SUBSCRIBED: t = "subscribed"; break;
-               case IKS_TYPE_UNSUBSCRIBE: t = "unsubscribe"; break;
-               case IKS_TYPE_UNSUBSCRIBED: t = "unsubscribed"; break;
-               case IKS_TYPE_PROBE: t = "probe"; break;
-               default: t = NULL; break;
-       }
-       if (t) iks_insert_attrib (x, "type", t);
-       if (to) iks_insert_attrib (x, "to", to);
-       if (msg) iks_insert_cdata(iks_insert (x, "status"), msg, 0);
-       return x;
-}
-
-iks *
-iks_make_pres (enum ikshowtype show, const char *status)
-{
-       iks *x;
-       char *t;
-
-       x = iks_new ("presence");
-       switch (show) {
-               case IKS_SHOW_CHAT: t = "chat"; break;
-               case IKS_SHOW_AWAY: t = "away"; break;
-               case IKS_SHOW_XA: t = "xa"; break;
-               case IKS_SHOW_DND: t = "dnd"; break;
-               case IKS_SHOW_UNAVAILABLE:
-                       t = NULL;
-                       iks_insert_attrib (x, "type", "unavailable");
-                       break;
-               default: t = NULL; break;
-       }
-       if (t) iks_insert_cdata (iks_insert (x, "show"), t, 0);
-       if (status) iks_insert_cdata(iks_insert (x, "status"), status, 0);
-       return x;
-}
-
-iks *
-iks_make_iq (enum iksubtype type, const char *xmlns)
-{
-       iks *x;
-       char *t = NULL;
-
-       x = iks_new ("iq");
-       switch (type) {
-       case IKS_TYPE_GET: t = "get"; break;
-       case IKS_TYPE_SET: t = "set"; break;
-       case IKS_TYPE_RESULT: t = "result"; break;
-       case IKS_TYPE_ERROR: t = "error"; break;
-       default: break;
-       }
-       if (t) iks_insert_attrib (x, "type", t);
-       iks_insert_attrib (iks_insert (x, "query"), "xmlns", xmlns);
-
-       return x;
-}
-
-iks *
-iks_make_resource_bind (iksid *id)
-{
-       iks *x, *y, *z;
-
-       x = iks_new("iq");
-       iks_insert_attrib(x, "type", "set");
-       y = iks_insert(x, "bind");
-       iks_insert_attrib(y, "xmlns", IKS_NS_XMPP_BIND);
-       if (id->resource && iks_strcmp(id->resource, "")) {
-               z = iks_insert(y, "resource");
-               iks_insert_cdata(z, id->resource, 0);
-       }
-       return x;
-}
-
-iks *
-iks_make_session (void)
-{
-       iks *x, *y;
-
-       x = iks_new ("iq");
-       iks_insert_attrib (x, "type", "set");
-       y = iks_insert (x, "session");
-       iks_insert_attrib (y, "xmlns", IKS_NS_XMPP_SESSION);
-       return x;
-}
-
-static int
-iks_sasl_mechanisms (iks *x)
-{
-       int sasl_mech = 0;
-
-       while (x) {
-               if (!iks_strcmp(iks_cdata(iks_child(x)), "DIGEST-MD5"))
-                       sasl_mech |= IKS_STREAM_SASL_MD5;
-               else if (!iks_strcmp(iks_cdata(iks_child(x)), "PLAIN"))
-                       sasl_mech |= IKS_STREAM_SASL_PLAIN;
-               x = iks_next_tag(x);
-       }
-       return sasl_mech;
-}
-
-int
-iks_stream_features (iks *x)
-{
-       int features = 0;
-
-       if (iks_strcmp(iks_name(x), "stream:features"))
-               return 0;
-       for (x = iks_child(x); x; x = iks_next_tag(x))
-               if (!iks_strcmp(iks_name(x), "starttls"))
-                       features |= IKS_STREAM_STARTTLS;
-               else if (!iks_strcmp(iks_name(x), "bind"))
-                       features |= IKS_STREAM_BIND;
-               else if (!iks_strcmp(iks_name(x), "session"))
-                       features |= IKS_STREAM_SESSION;
-               else if (!iks_strcmp(iks_name(x), "mechanisms"))
-                       features |= iks_sasl_mechanisms(iks_child(x));
-       return features;
-}
diff --git a/libs/iksemel/src/md5.c b/libs/iksemel/src/md5.c
deleted file mode 100644 (file)
index 11af2d8..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-#define GET_UINT32(n,b,i) {  \
-       (n) = ( (unsigned long int) (b)[(i)    ]     )  \
-               | ( (unsigned long int) (b)[(i) + 1] <<  8 )  \
-               | ( (unsigned long int) (b)[(i) + 2] << 16 )  \
-               | ( (unsigned long int) (b)[(i) + 3] << 24 ); \
-}
-
-#define PUT_UINT32(n,b,i) {  \
-       (b)[(i)    ] = (unsigned char) ( (n)       );  \
-       (b)[(i) + 1] = (unsigned char) ( (n) >>  8 );  \
-       (b)[(i) + 2] = (unsigned char) ( (n) >> 16 );  \
-       (b)[(i) + 3] = (unsigned char) ( (n) >> 24 );  \
-}
-
-#define F(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
-
-#define G(x,y,z) ((y) ^ ((z) & ((x) ^ (y))))
-
-#define H(x,y,z) ((x) ^ (y) ^ (z))
-
-#define I(x,y,z) ((y) ^ ((x) | ~(z)))
-
-#define S(x,n) (((x) << (n)) | (((x) & 0xFFFFFFFF) >> (32 - (n))))
-
-#define P(r,i,f,k,s,t) {  \
-       r[i] += f(r[((i)+1)%4],r[((i)+2)%4],r[((i)+3)%4]) + X[k] + t; \
-       r[i] = S(r[i],s) + r[((i)+1)%4];  \
-}
-
-struct iksmd5_struct {
-       unsigned long int total[2];
-       unsigned long int state[4];
-       unsigned char buffer[64];
-       unsigned char blen;
-};
-
-static const unsigned long int T[] =
-       { 0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee,
-         0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501,
-         0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be,
-         0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821,
-         0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa,
-         0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8,
-         0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed,
-         0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a,
-         0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c,
-         0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70,
-         0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x04881d05,
-         0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665,
-         0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039,
-         0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1,
-         0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1,
-         0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391 };
-
-static void iks_md5_compute(iksmd5 *md5);
-
-void iks_md5_reset(iksmd5 *md5)
-{
-       memset(md5, 0, sizeof(iksmd5));
-       md5->state[0] = 0x67452301;
-       md5->state[1] = 0xEFCDAB89;
-       md5->state[2] = 0x98BADCFE;
-       md5->state[3] = 0x10325476;
-}
-
-iksmd5 *iks_md5_new(void)
-{
-       iksmd5 *md5 = malloc(sizeof(iksmd5));
-
-       if (!md5)
-               return NULL;
-       iks_md5_reset(md5);
-       return md5;
-}
-
-void iks_md5_hash(iksmd5 *md5, const unsigned char *data, size_t slen, int finish)
-{
-       int i, j;
-       int len = slen;
-
-       i = (64 - md5->blen);
-       j = (len < i) ? (len) : (i);
-       memcpy(md5->buffer + md5->blen, data, j);
-       md5->blen += j;
-       len -= j;
-       data += j;
-       while (len > 0) {
-               iks_md5_compute(md5);
-               md5->blen = 0;
-               md5->total[0] += 8*64;
-               md5->total[1] += (md5->total[0] < 8*64);
-               j = (len < 64) ? (len) : (64);
-               memcpy(md5->buffer, data, j);
-               md5->blen = j;
-               len -= j;
-               data += j;
-       }
-       if (finish) {
-               md5->total[0] += 8*md5->blen;
-               md5->total[1] += (md5->total[0] < 8*md5->blen);
-               md5->buffer[(md5->blen)++] = 0x80;
-               if (md5->blen > 56) {
-                       while (md5->blen < 64)
-                               md5->buffer[(md5->blen)++] = 0x00;
-                       iks_md5_compute(md5);
-                       md5->blen = 0;
-               }
-               while (md5->blen < 56)
-                       md5->buffer[(md5->blen)++] = 0x00;
-               PUT_UINT32(md5->total[0], md5->buffer, 56);
-               PUT_UINT32(md5->total[1], md5->buffer, 60);
-               iks_md5_compute(md5);
-       }
-}
-
-void iks_md5_delete(iksmd5 *md5)
-{
-       free(md5);
-}
-
-void iks_md5_digest(iksmd5 *md5, unsigned char *digest)
-{
-       PUT_UINT32(md5->state[0], digest,  0);
-       PUT_UINT32(md5->state[1], digest,  4);
-       PUT_UINT32(md5->state[2], digest,  8);
-       PUT_UINT32(md5->state[3], digest, 12);
-}
-
-void iks_md5_print(iksmd5 *md5, char *buf)
-{
-  int i;
-       unsigned char digest[16];
-
-       iks_md5_digest(md5, digest);
-       for (i = 0; i < 16; i++) {
-               sprintf (buf, "%02x", digest[i]);
-               buf += 2;
-       }
-}
-
-void iks_md5(const char *data, char *buf)
-{
-       iksmd5 *md5 = iks_md5_new();
-
-       iks_md5_hash(md5, (const unsigned char*)data, strlen(data), 1);
-       iks_md5_print(md5, buf);
-       iks_md5_delete(md5);
-}
-
-static void iks_md5_compute(iksmd5 *md5)
-{
-       unsigned long int X[16], R[4];
-       unsigned char RS1[] = { 7, 12 ,17, 22 };
-       unsigned char RS2[] = { 5, 9 ,14, 20 };
-       unsigned char RS3[] = { 4, 11 ,16, 23 };
-       unsigned char RS4[] = { 6, 10 ,15, 21 };
-       int i, j, k, p;
-
-       for (i = 0; i < 16; ++i)
-                GET_UINT32(X[i], md5->buffer, i*4);
-
-       for (i = 0; i < 4; ++i)
-               R[i] = md5->state[i];
-
-       for (i = j = k = 0; i < 16; ++i, j = i%4, k = (k+3)%4)
-               P(R, k, F, i, RS1[j], T[i]);
-
-       for (i = j = k = 0, p = 1; i < 16; ++i, j = i%4, k = (k+3)%4, p = (p+5)%16)
-               P(R, k, G, p, RS2[j], T[i+16]);
-
-       for (i = j = k = 0, p = 5; i < 16; ++i, j = i%4, k = (k+3)%4, p = (p+3)%16)
-               P(R, k, H, p, RS3[j], T[i+32]);
-
-       for (i = j = k = p = 0; i < 16; ++i, j = i%4, k = (k+3)%4, p = (p+7)%16)
-               P(R, k, I, p, RS4[j], T[i+48]);
-
-       for (i = 0; i < 4; ++i)
-               md5->state[i] += R[i];
-}
-
diff --git a/libs/iksemel/src/sax.c b/libs/iksemel/src/sax.c
deleted file mode 100644 (file)
index beb3621..0000000
+++ /dev/null
@@ -1,635 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2004 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-enum cons_e {
-       C_CDATA = 0,
-       C_TAG_START,
-       C_TAG,
-       C_TAG_END,
-       C_ATTRIBUTE,
-       C_ATTRIBUTE_1,
-       C_ATTRIBUTE_2,
-       C_VALUE,
-       C_VALUE_APOS,
-       C_VALUE_QUOT,
-       C_WHITESPACE,
-       C_ENTITY,
-       C_COMMENT,
-       C_COMMENT_1,
-       C_COMMENT_2,
-       C_COMMENT_3,
-       C_MARKUP,
-       C_MARKUP_1,
-       C_SECT,
-       C_SECT_CDATA,
-       C_SECT_CDATA_1,
-       C_SECT_CDATA_2,
-       C_SECT_CDATA_3,
-       C_SECT_CDATA_4,
-       C_SECT_CDATA_C,
-       C_SECT_CDATA_E,
-       C_SECT_CDATA_E2,
-       C_PI
-};
-
-/* if you add a variable here, dont forget changing iks_parser_reset */
-struct iksparser_struct {
-       ikstack *s;
-       void *user_data;
-       iksTagHook *tagHook;
-       iksCDataHook *cdataHook;
-       iksDeleteHook *deleteHook;
-       /* parser context */
-       char *stack;
-       size_t stack_pos;
-       size_t stack_max;
-
-       enum cons_e context;
-       enum cons_e oldcontext;
-
-       char *tag_name;
-       enum ikstagtype tagtype;
-
-       unsigned int attmax;
-       unsigned int attcur;
-       int attflag;
-       char **atts;
-       int valflag;
-
-       unsigned int entpos;
-       char entity[8];
-
-       unsigned long nr_bytes;
-       unsigned long nr_lines;
-
-       int uni_max;
-       int uni_len;
-};
-
-iksparser *
-iks_sax_new (void *user_data, iksTagHook *tagHook, iksCDataHook *cdataHook)
-{
-       iksparser *prs;
-
-       prs = iks_malloc (sizeof (iksparser));
-       if (NULL == prs) return NULL;
-       memset (prs, 0, sizeof (iksparser));
-       prs->user_data = user_data;
-       prs->tagHook = tagHook;
-       prs->cdataHook = cdataHook;
-       return prs;
-}
-
-iksparser *
-iks_sax_extend (ikstack *s, void *user_data, iksTagHook *tagHook, iksCDataHook *cdataHook, iksDeleteHook *deleteHook)
-{
-       iksparser *prs;
-
-       prs = iks_stack_alloc (s, sizeof (iksparser));
-       if (NULL == prs) return NULL;
-       memset (prs, 0, sizeof (iksparser));
-       prs->s = s;
-       prs->user_data = user_data;
-       prs->tagHook = tagHook;
-       prs->cdataHook = cdataHook;
-       prs->deleteHook = deleteHook;
-       return prs;
-}
-
-ikstack *
-iks_parser_stack (iksparser *prs)
-{
-       return prs->s;
-}
-
-void *
-iks_user_data (iksparser *prs)
-{
-       return prs->user_data;
-}
-
-unsigned long
-iks_nr_bytes (iksparser *prs)
-{
-       return prs->nr_bytes;
-}
-
-unsigned long
-iks_nr_lines (iksparser *prs)
-{
-       return prs->nr_lines;
-}
-
-#define IS_WHITESPACE(x) ' ' == (x) || '\t' == (x) || '\r' == (x) || '\n' == (x)
-#define NOT_WHITESPACE(x) ' ' != (x) && '\t' != (x) && '\r' != (x) && '\n' != (x)
-
-static int
-stack_init (iksparser *prs)
-{
-       prs->stack = iks_malloc (128);
-       if (!prs->stack) return 0;
-       prs->stack_max = 128;
-       prs->stack_pos = 0;
-       return 1;
-}
-
-static int
-stack_expand (iksparser *prs, int len)
-{
-       size_t need;
-       off_t diff;
-       char *tmp;
-       need = len - (prs->stack_max - prs->stack_pos);
-       if (need < prs->stack_max) {
-               need = prs->stack_max * 2;
-       } else {
-               /* need x 1.2 for integer only archs like ARM */
-               need = prs->stack_max + ( (need * 6) / 5);
-       }
-       tmp = iks_malloc (need);
-       if (!tmp) return 0;
-       diff = tmp - prs->stack;
-       memcpy (tmp, prs->stack, prs->stack_max);
-       iks_free (prs->stack);
-       prs->stack = tmp;
-       prs->stack_max = need;
-       prs->tag_name += diff;
-       if (prs->attflag != 0) {
-               int i = 0;
-               while (i < (prs->attmax * 2)) {
-                       if (prs->atts[i]) prs->atts[i] += diff;
-                       i++;
-               }
-       }
-       return 1;
-}
-
-#define STACK_INIT \
-       if (NULL == prs->stack && 0 == stack_init (prs)) return IKS_NOMEM
-
-#define STACK_PUSH_START (prs->stack + prs->stack_pos)
-
-#define STACK_PUSH(buf,len) \
-{ \
-       char *sbuf = (buf); \
-       size_t slen = (len); \
-       if (prs->stack_max - prs->stack_pos <= slen) { \
-               if (0 == stack_expand (prs, slen)) return IKS_NOMEM; \
-       } \
-       memcpy (prs->stack + prs->stack_pos, sbuf, slen); \
-       prs->stack_pos += slen; \
-}
-
-#define STACK_PUSH_END \
-{ \
-       if (prs->stack_pos >= prs->stack_max) { \
-               if (0 == stack_expand (prs, 1)) return IKS_NOMEM; \
-       } \
-       prs->stack[prs->stack_pos] = '\0'; \
-       prs->stack_pos++; \
-}
-
-static enum ikserror
-sax_core (iksparser *prs, char *buf, int len)
-{
-       enum ikserror err;
-       int pos = 0, old = 0, re, stack_old = -1;
-       unsigned char c;
-
-       while (pos < len) {
-               re = 0;
-               c = buf[pos];
-               if (0 == c || 0xFE == c || 0xFF == c) return IKS_BADXML;
-               if (prs->uni_max) {
-                       if ((c & 0xC0) != 0x80) return IKS_BADXML;
-                       prs->uni_len++;
-                       if (prs->uni_len == prs->uni_max) prs->uni_max = 0;
-                       goto cont;
-               } else {
-                       if (c & 0x80) {
-                               if ((c & 0x60) == 0x40) {
-                                       prs->uni_max = 2;
-                               } else if ((c & 0x70) == 0x60) {
-                                       prs->uni_max = 3;
-                               } else if ((c & 0x78) == 0x70) {
-                                       prs->uni_max = 4;
-                               } else if ((c & 0x7C) == 0x78) {
-                                       prs->uni_max = 5;
-                               } else if ((c & 0x7E) == 0x7C) {
-                                       prs->uni_max = 6;
-                               } else {
-                                       return IKS_BADXML;
-                               }
-                               /* if ((c & mask) == 0) return IKS_BADXML; I AM WRONG */
-                               prs->uni_len = 1;
-                               if (stack_old == -1
-                                       && (prs->context == C_TAG
-                                               || prs->context == C_ATTRIBUTE_1
-                                               || prs->context == C_VALUE_APOS
-                                               || prs->context == C_VALUE_QUOT)) stack_old = pos;
-                               goto cont;
-                       }
-               }
-
-               switch (prs->context) {
-                       case C_CDATA:
-                               if ('&' == c) {
-                                       if (old < pos && prs->cdataHook) {
-                                               err = prs->cdataHook (prs->user_data, &buf[old], pos - old);
-                                               if (IKS_OK != err) return err;
-                                       }
-                                       prs->context = C_ENTITY;
-                                       prs->entpos = 0;
-                                       break;
-                               }
-                               if ('<' == c) {
-                                       if (old < pos && prs->cdataHook) {
-                                               err = prs->cdataHook (prs->user_data, &buf[old], pos - old);
-                                               if (IKS_OK != err) return err;
-                                       }
-                                       STACK_INIT;
-                                       prs->tag_name = STACK_PUSH_START;
-                                       if (!prs->tag_name) return IKS_NOMEM;
-                                       prs->context = C_TAG_START;
-                               }
-                               break;
-
-                       case C_TAG_START:
-                               prs->context = C_TAG;
-                               if ('/' == c) {
-                                       prs->tagtype = IKS_CLOSE;
-                                       break;
-                               }
-                               if ('?' == c) {
-                                       prs->context = C_PI;
-                                       break;
-                               }
-                               if ('!' == c) {
-                                       prs->context = C_MARKUP;
-                                       break;
-                               }
-                               prs->tagtype = IKS_OPEN;
-                               stack_old = pos;
-                               break;
-
-                       case C_TAG:
-                               if (IS_WHITESPACE(c)) {
-                                       if (IKS_CLOSE == prs->tagtype)
-                                               prs->oldcontext = C_TAG_END;
-                                       else
-                                               prs->oldcontext = C_ATTRIBUTE;
-                                       prs->context = C_WHITESPACE;
-                                       if (stack_old != -1) STACK_PUSH (buf + stack_old, pos - stack_old);
-                                       stack_old = -1;
-                                       STACK_PUSH_END;
-                                       break;
-                               }
-                               if ('/' == c) {
-                                       if (IKS_CLOSE == prs->tagtype) return IKS_BADXML;
-                                       prs->tagtype = IKS_SINGLE;
-                                       prs->context = C_TAG_END;
-                                       if (stack_old != -1) STACK_PUSH (buf + stack_old, pos - stack_old);
-                                       stack_old = -1;
-                                       STACK_PUSH_END;
-                                       break;
-                               }
-                               if ('>' == c) {
-                                       prs->context = C_TAG_END;
-                                       if (stack_old != -1) STACK_PUSH (buf + stack_old, pos - stack_old);
-                                       stack_old = -1;
-                                       STACK_PUSH_END;
-                                       re = 1;
-                                       break;
-                               }
-                               if (stack_old == -1) stack_old = pos;
-                               break;
-
-                       case C_TAG_END:
-                               if (c != '>') return IKS_BADXML;
-                               if (prs->tagHook) {
-                                       char **tmp;
-                                       if (prs->attcur == 0) tmp = NULL; else tmp = prs->atts;
-                                       err = prs->tagHook (prs->user_data, prs->tag_name, tmp, prs->tagtype);
-                                       if (IKS_OK != err) return err;
-                               }
-                               prs->stack_pos = 0;
-                               stack_old = -1;
-                               prs->attcur = 0;
-                               prs->attflag = 0;
-                               prs->context = C_CDATA;
-                               old = pos + 1;
-                               break;
-
-                       case C_ATTRIBUTE:
-                               if ('/' == c) {
-                                       prs->tagtype = IKS_SINGLE;
-                                       prs->context = C_TAG_END;
-                                       break;
-                               }
-                               if ('>' == c) {
-                                       prs->context = C_TAG_END;
-                                       re = 1;
-                                       break;
-                               }
-                               if (!prs->atts) {
-                                       prs->attmax = 12;
-                                       prs->atts = iks_malloc (sizeof(char *) * 2 * 12);
-                                       if (!prs->atts) return IKS_NOMEM;
-                                       memset (prs->atts, 0, sizeof(char *) * 2 * 12);
-                                       prs->attcur = 0;
-                               } else {
-                                       if (prs->attcur >= (prs->attmax * 2)) {
-                                               void *tmp;
-                                               prs->attmax += 12;
-                                               tmp = iks_malloc (sizeof(char *) * 2 * prs->attmax);
-                                               if (!tmp) return IKS_NOMEM;
-                                               memset (tmp, 0, sizeof(char *) * 2 * prs->attmax);
-                                               memcpy (tmp, prs->atts, sizeof(char *) * prs->attcur);
-                                               free (prs->atts);
-                                               prs->atts = tmp;
-                                       }
-                               }
-                               prs->attflag = 1;
-                               prs->atts[prs->attcur] = STACK_PUSH_START;
-                               stack_old = pos;
-                               prs->context = C_ATTRIBUTE_1;
-                               break;
-
-                       case C_ATTRIBUTE_1:
-                               if ('=' == c) {
-                                       if (stack_old != -1) STACK_PUSH (buf + stack_old, pos - stack_old);
-                                       stack_old = -1;
-                                       STACK_PUSH_END;
-                                       prs->context = C_VALUE;
-                                       break;
-                               }
-                               if (stack_old == -1) stack_old = pos;
-                               break;
-
-                       case C_ATTRIBUTE_2:
-                               if ('/' == c) {
-                                       prs->tagtype = IKS_SINGLE;
-                                       prs->atts[prs->attcur] = NULL;
-                                       prs->context = C_TAG_END;
-                                       break;
-                               }
-                               if ('>' == c) {
-                                       prs->atts[prs->attcur] = NULL;
-                                       prs->context = C_TAG_END;
-                                       re = 1;
-                                       break;
-                               }
-                               prs->context = C_ATTRIBUTE;
-                               re = 1;
-                               break;
-
-                       case C_VALUE:
-                               prs->atts[prs->attcur + 1] = STACK_PUSH_START;
-                               if ('\'' == c) {
-                                       prs->context = C_VALUE_APOS;
-                                       break;
-                               }
-                               if ('"' == c) {
-                                       prs->context = C_VALUE_QUOT;
-                                       break;
-                               }
-                               return IKS_BADXML;
-
-                       case C_VALUE_APOS:
-                               if ('\'' == c) {
-                                       if (stack_old != -1) STACK_PUSH (buf + stack_old, pos - stack_old);
-                                       stack_old = -1;
-                                       STACK_PUSH_END;
-                                       prs->oldcontext = C_ATTRIBUTE_2;
-                                       prs->context = C_WHITESPACE;
-                                       prs->attcur += 2;
-                               }
-                               if (stack_old == -1) stack_old = pos;
-                               break;
-
-                       case C_VALUE_QUOT:
-                               if ('"' == c) {
-                                       if (stack_old != -1) STACK_PUSH (buf + stack_old, pos - stack_old);
-                                       stack_old = -1;
-                                       STACK_PUSH_END;
-                                       prs->oldcontext = C_ATTRIBUTE_2;
-                                       prs->context = C_WHITESPACE;
-                                       prs->attcur += 2;
-                               }
-                               if (stack_old == -1) stack_old = pos;
-                               break;
-
-                       case C_WHITESPACE:
-                               if (NOT_WHITESPACE(c)) {
-                                       prs->context = prs->oldcontext;
-                                       re = 1;
-                               }
-                               break;
-
-                       case C_ENTITY:
-                               if (';' == c) {
-                                       char hede[2];
-                                       char t = '?';
-                                       prs->entity[prs->entpos] = '\0';
-                                       if (strcmp(prs->entity, "amp") == 0)
-                                               t = '&';
-                                       else if (strcmp(prs->entity, "quot") == 0)
-                                               t = '"';
-                                       else if (strcmp(prs->entity, "apos") == 0)
-                                               t = '\'';
-                                       else if (strcmp(prs->entity, "lt") == 0)
-                                               t = '<';
-                                       else if (strcmp(prs->entity, "gt") == 0)
-                                               t = '>';
-                                       old = pos + 1;
-                                       hede[0] = t;
-                                       if (prs->cdataHook) {
-                                               err = prs->cdataHook (prs->user_data, &hede[0], 1);
-                                               if (IKS_OK != err) return err;
-                                       }
-                                       prs->context = C_CDATA;
-                               } else {
-                                       prs->entity[prs->entpos++] = buf[pos];
-                                       if (prs->entpos > 7) return IKS_BADXML;
-                               }
-                               break;
-
-                       case C_COMMENT:
-                               if ('-' != c) return IKS_BADXML;
-                               prs->context = C_COMMENT_1;
-                               break;
-
-                       case C_COMMENT_1:
-                               if ('-' == c) prs->context = C_COMMENT_2;
-                               break;
-
-                       case C_COMMENT_2:
-                               if ('-' == c)
-                                       prs->context = C_COMMENT_3;
-                               else
-                                       prs->context = C_COMMENT_1;
-                               break;
-
-                       case C_COMMENT_3:
-                               if ('>' != c) return IKS_BADXML;
-                               prs->context = C_CDATA;
-                               old = pos + 1;
-                               break;
-
-                       case C_MARKUP:
-                               if ('[' == c) {
-                                       prs->context = C_SECT;
-                                       break;
-                               }
-                               if ('-' == c) {
-                                       prs->context = C_COMMENT;
-                                       break;
-                               }
-                               prs->context = C_MARKUP_1;
-
-                       case C_MARKUP_1:
-                               if ('>' == c) {
-                                       old = pos + 1;
-                                       prs->context = C_CDATA;
-                               }
-                               break;
-
-                       case C_SECT:
-                               if ('C' == c) {
-                                       prs->context = C_SECT_CDATA;
-                                       break;
-                               }
-                               return IKS_BADXML;
-
-                       case C_SECT_CDATA:
-                               if ('D' != c) return IKS_BADXML;
-                               prs->context = C_SECT_CDATA_1;
-                               break;
-
-                       case C_SECT_CDATA_1:
-                               if ('A' != c) return IKS_BADXML;
-                               prs->context = C_SECT_CDATA_2;
-                               break;
-
-                       case C_SECT_CDATA_2:
-                               if ('T' != c) return IKS_BADXML;
-                               prs->context = C_SECT_CDATA_3;
-                               break;
-
-                       case C_SECT_CDATA_3:
-                               if ('A' != c) return IKS_BADXML;
-                               prs->context = C_SECT_CDATA_4;
-                               break;
-
-                       case C_SECT_CDATA_4:
-                               if ('[' != c) return IKS_BADXML;
-                               old = pos + 1;
-                               prs->context = C_SECT_CDATA_C;
-                               break;
-
-                       case C_SECT_CDATA_C:
-                               if (']' == c) {
-                                       prs->context = C_SECT_CDATA_E;
-                                       if (prs->cdataHook && old < pos) {
-                                               err = prs->cdataHook (prs->user_data, &buf[old], pos - old);
-                                               if (IKS_OK != err) return err;
-                                       }
-                               }
-                               break;
-
-                       case C_SECT_CDATA_E:
-                               if (']' == c) {
-                                       prs->context = C_SECT_CDATA_E2;
-                               } else {
-                                       if (prs->cdataHook) {
-                                               err = prs->cdataHook (prs->user_data, "]", 1);
-                                               if (IKS_OK != err) return err;
-                                       }
-                                       old = pos;
-                                       prs->context = C_SECT_CDATA_C;
-                               }
-                               break;
-
-                       case C_SECT_CDATA_E2:
-                               if ('>' == c) {
-                                       old = pos + 1;
-                                       prs->context = C_CDATA;
-                               } else if (']' == c) {
-                                       /* ]]] scenario */
-                                       if (prs->cdataHook) {
-                                               err = prs->cdataHook (prs->user_data, "]", 1);
-                                               if (IKS_OK != err) return err;
-                                       }
-                                       old = pos;
-                               } else {
-                                       if (prs->cdataHook) {
-                                               err = prs->cdataHook (prs->user_data, "]]", 2);
-                                               if (IKS_OK != err) return err;
-                                       }
-                                       old = pos;
-                                       prs->context = C_SECT_CDATA_C;
-                               }
-                               break;
-
-                       case C_PI:
-                               old = pos + 1;
-                               if ('>' == c) prs->context = C_CDATA;
-                               break;
-               }
-cont:
-               if (0 == re) {
-                       pos++;
-                       prs->nr_bytes++;
-                       if ('\n' == c) prs->nr_lines++;
-               }
-       }
-
-       if (stack_old != -1)
-               STACK_PUSH (buf + stack_old, pos - stack_old);
-
-       err = IKS_OK;
-       if (prs->cdataHook && (prs->context == C_CDATA || prs->context == C_SECT_CDATA_C) && old < pos)
-               err = prs->cdataHook (prs->user_data, &buf[old], pos - old);
-       return err;
-}
-
-int
-iks_parse (iksparser *prs, const char *data, size_t len, int finish)
-{
-       if (!data) return IKS_OK;
-       if (len == 0) len = strlen (data);
-       return sax_core (prs, (char *) data, len);
-}
-
-void
-iks_parser_reset (iksparser *prs)
-{
-       if (prs->deleteHook) prs->deleteHook (prs->user_data);
-       prs->stack_pos = 0;
-       prs->context = 0;
-       prs->oldcontext = 0;
-       prs->tagtype = 0;
-       prs->attcur = 0;
-       prs->attflag = 0;
-       prs->valflag = 0;
-       prs->entpos = 0;
-       prs->nr_bytes = 0;
-       prs->nr_lines = 0;
-       prs->uni_max = 0;
-       prs->uni_len = 0;
-}
-
-void
-iks_parser_delete (iksparser *prs)
-{
-       if (prs->deleteHook) prs->deleteHook (prs->user_data);
-       if (prs->stack) iks_free (prs->stack);
-       if (prs->atts) iks_free (prs->atts);
-       if (prs->s) iks_stack_delete (&prs->s); else iks_free (prs);
-}
diff --git a/libs/iksemel/src/sha.c b/libs/iksemel/src/sha.c
deleted file mode 100644 (file)
index 330e1b0..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-static void sha_buffer (iksha *sha, const unsigned char *data, int len);
-static void sha_calculate (iksha *sha);
-
-struct iksha_struct {
-       unsigned int hash[5];
-       unsigned int buf[80];
-       int blen;
-       unsigned int lenhi, lenlo;
-};
-
-iksha *
-iks_sha_new (void)
-{
-       iksha *sha;
-
-       sha = iks_malloc (sizeof (iksha));
-       if (!sha) return NULL;
-       iks_sha_reset (sha);
-       return sha;
-}
-
-void
-iks_sha_reset (iksha *sha)
-{
-       memset (sha, 0, sizeof (iksha));
-       sha->hash[0] = 0x67452301;
-       sha->hash[1] = 0xefcdab89;
-       sha->hash[2] = 0x98badcfe;
-       sha->hash[3] = 0x10325476;
-       sha->hash[4] = 0xc3d2e1f0;
-}
-
-void
-iks_sha_hash (iksha *sha, const unsigned char *data, size_t len, int finish)
-{
-       unsigned char pad[8];
-       unsigned char padc;
-
-       if (data && len != 0) sha_buffer (sha, data, len);
-       if (!finish) return;
-
-       pad[0] = (unsigned char)((sha->lenhi >> 24) & 0xff);
-       pad[1] = (unsigned char)((sha->lenhi >> 16) & 0xff);
-       pad[2] = (unsigned char)((sha->lenhi >> 8) & 0xff);
-       pad[3] = (unsigned char)(sha->lenhi & 0xff);
-       pad[4] = (unsigned char)((sha->lenlo >> 24) & 0xff);
-       pad[5] = (unsigned char)((sha->lenlo >> 16) & 0xff);
-       pad[6] = (unsigned char)((sha->lenlo >> 8) & 0xff);
-       pad[7] = (unsigned char)(sha->lenlo & 255);
-
-       padc = 0x80;
-       sha_buffer (sha, &padc, 1);
-
-       padc = 0x00;
-       while (sha->blen != 56)
-               sha_buffer (sha, &padc, 1);
-
-       sha_buffer (sha, pad, 8);
-}
-
-void
-iks_sha_print (iksha *sha, char *hash)
-{
-       int i;
-
-       for (i=0; i<5; i++)
-       {
-               sprintf (hash, "%08x", sha->hash[i]);
-               hash += 8;
-       }
-}
-
-void
-iks_sha_delete (iksha *sha)
-{
-       iks_free (sha);
-}
-
-void
-iks_sha (const char *data, char *hash)
-{
-       iksha *sha;
-
-       sha = iks_sha_new ();
-       iks_sha_hash (sha, (const unsigned char*)data, strlen (data), 1);
-       iks_sha_print (sha, hash);
-       iks_free (sha);
-}
-
-static void
-sha_buffer (iksha *sha, const unsigned char *data, int len)
-{
-       int i;
-
-       for (i=0; i<len; i++) {
-               sha->buf[sha->blen / 4] <<= 8;
-               sha->buf[sha->blen / 4] |= (unsigned int)data[i];
-               if ((++sha->blen) % 64 == 0) {
-                       sha_calculate (sha);
-                       sha->blen = 0;
-               }
-               sha->lenlo += 8;
-               sha->lenhi += (sha->lenlo < 8);
-       }
-}
-
-#define SRL(x,y) (((x) << (y)) | ((x) >> (32-(y))))
-#define SHA(a,b,f,c) \
-       for (i= (a) ; i<= (b) ; i++) { \
-               TMP = SRL(A,5) + ( (f) ) + E + sha->buf[i] + (c) ; \
-               E = D; \
-               D = C; \
-               C = SRL(B,30); \
-               B = A; \
-               A = TMP; \
-       }
-
-static void
-sha_calculate (iksha *sha)
-{
-       int i;
-       unsigned int A, B, C, D, E, TMP;
-
-       for (i=16; i<80; i++)
-               sha->buf[i] = SRL (sha->buf[i-3] ^ sha->buf[i-8] ^ sha->buf[i-14] ^ sha->buf[i-16], 1);
-
-       A = sha->hash[0];
-       B = sha->hash[1];
-       C = sha->hash[2];
-       D = sha->hash[3];
-       E = sha->hash[4];
-
-       SHA (0,  19, ((C^D)&B)^D,     0x5a827999);
-       SHA (20, 39, B^C^D,           0x6ed9eba1);
-       SHA (40, 59, (B&C)|(D&(B|C)), 0x8f1bbcdc);
-       SHA (60, 79, B^C^D,           0xca62c1d6);
-
-       sha->hash[0] += A;
-       sha->hash[1] += B;
-       sha->hash[2] += C;
-       sha->hash[3] += D;
-       sha->hash[4] += E;
-}
diff --git a/libs/iksemel/src/stream.c b/libs/iksemel/src/stream.c
deleted file mode 100644 (file)
index f304f67..0000000
+++ /dev/null
@@ -1,1054 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2007 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "config.h"
-#ifdef HAVE_GNUTLS
-#define _XOPEN_SOURCE 500
-#define _GNU_SOURCE
-#include <pthread.h>
-#endif
-
-
-#include "common.h"
-#include "iksemel.h"
-
-#ifdef HAVE_GNUTLS
-#include <gnutls/gnutls.h>
-#endif
-
-#ifdef HAVE_SSL
-#include <openssl/ssl.h>
-#include <openssl/err.h>
-#ifdef WIN32
-#include "Winsock2.h"
-typedef unsigned __int32 uint32_t;
-#else
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#include <poll.h>
-#endif
-#endif
-
-#define SF_FOREIGN 1
-#define SF_TRY_SECURE 2
-#define SF_SECURE 4
-#define SF_SERVER 8
-
-struct stream_data {
-       iksparser *prs;
-       ikstack *s;
-       ikstransport *trans;
-       char *name_space;
-       void *user_data;
-       const char *server;
-       iksStreamHook *streamHook;
-       iksLogHook *logHook;
-       iks *current;
-       char *buf;
-       void *sock;
-       unsigned int flags;
-       char *auth_username;
-       char *auth_pass;
-       char *cert_file;
-       char *key_file;
-#ifdef HAVE_GNUTLS
-       gnutls_session sess;
-       gnutls_certificate_credentials cred;
-#elif HAVE_SSL
-       SSL* ssl;
-       SSL_CTX* ssl_ctx; 
-#endif
-};
-
-#define WANT_READ 1
-#define WANT_WRITE 0
-
-#ifdef HAVE_SSL
-#ifdef WIN32
-static int sock_ready(struct stream_data *data, int ms, int w_read)
-{
-       int r = 0, e = 0;
-       fd_set rfds, wfds, efds, *fds;
-       struct timeval tv;
-
-       FD_ZERO(&rfds);
-       FD_ZERO(&wfds);
-       FD_ZERO(&efds);
-
-       if (w_read) {
-               fds = &rfds;
-       } else {
-               fds = &wfds;
-       }
-
-#ifdef WIN32
-#pragma warning( push )
-#pragma warning( disable : 4127 )
-       FD_SET(SSL_get_fd(data->ssl), fds);
-#pragma warning( pop ) 
-#else
-       FD_SET(SSL_get_fd(data->ssl), fds);
-#endif
-
-       tv.tv_sec = ms / 1000;
-       tv.tv_usec = (ms % 1000) * ms;
-       
-       r = select (SSL_get_fd(data->ssl) + 1, w_read ? &rfds : NULL, w_read ? NULL : &wfds, &efds, &tv); 
-
-       if (r > 0) {
-       
-#ifdef WIN32
-#pragma warning( push )
-#pragma warning( disable : 4127 )
-               e = FD_ISSET(SSL_get_fd(data->ssl), &efds);
-#pragma warning( pop ) 
-#else
-               e = FD_ISSET(SSL_get_fd(data->ssl), &efds);
-#endif         
-               
-               if (e) {
-                       r = -1;
-               } else {
-               
-#ifdef WIN32
-#pragma warning( push )
-#pragma warning( disable : 4127 )
-                       r = FD_ISSET(SSL_get_fd(data->ssl), fds);
-#pragma warning( pop ) 
-#else
-                       r = FD_ISSET(SSL_get_fd(data->ssl), fds);
-#endif 
-                       
-               }
-       }
-               
-       return r;
-}
-#else
-static int sock_ready(struct stream_data *data, int ms, int w_read)
-{
-       struct pollfd pfds[2] = { { 0 } };
-       int s = 0, r = 0, w = w_read ? POLLIN : POLLOUT;
-       
-       pfds[0].fd = SSL_get_fd(data->ssl);
-       pfds[0].events = w | POLLHUP | POLLERR;
-       
-       s = poll(pfds, 1, ms);
-
-
-       if (s < 0) {
-               r = s;
-       } else if (s > 0) {
-               if ((pfds[0].revents & w)) {
-                       r = 1;
-               } else if ((pfds[0].revents & POLLHUP) || (pfds[0].revents & POLLERR)) {
-                       r = -1;
-               }
-       }
-
-       return r;
-}
-#endif
-#endif
-
-#ifdef HAVE_GNUTLS
-#ifndef WIN32
-#include <gcrypt.h>
-GCRY_THREAD_OPTION_PTHREAD_IMPL;
-#endif
-
-static size_t
-tls_push (iksparser *prs, const char *buffer, size_t len)
-{
-       struct stream_data *data = iks_user_data (prs);
-       int ret;
-       ret = data->trans->send (data->sock, buffer, len);
-       if (ret) return (size_t) -1;
-       return len;
-}
-
-static size_t
-tls_pull (iksparser *prs, char *buffer, size_t len)
-{
-       struct stream_data *data = iks_user_data (prs);
-       int ret;
-       ret = data->trans->recv (data->sock, buffer, len, -1);
-       if (ret == -1) return (size_t) -1;
-       return ret;
-}
-
-static int
-handshake (struct stream_data *data)
-{
-       const int protocol_priority[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 };
-       const int kx_priority[] = { GNUTLS_KX_RSA, 0 };
-       const int cipher_priority[] = { GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR, 0};
-       const int comp_priority[] = { GNUTLS_COMP_ZLIB, GNUTLS_COMP_NULL, 0 };
-       const int mac_priority[] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 };
-       int ret;
-
-#ifndef WIN32
-       gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
-#endif
-
-       if (gnutls_global_init () != 0)
-               return IKS_NOMEM;
-
-       if (gnutls_certificate_allocate_credentials (&data->cred) < 0)
-               return IKS_NOMEM;
-
-       if (gnutls_init (&data->sess, GNUTLS_CLIENT) != 0) {
-               gnutls_certificate_free_credentials (data->cred);
-               return IKS_NOMEM;
-       }
-
-       gnutls_protocol_set_priority (data->sess, protocol_priority);
-       gnutls_cipher_set_priority(data->sess, cipher_priority);
-       gnutls_compression_set_priority(data->sess, comp_priority);
-       gnutls_kx_set_priority(data->sess, kx_priority);
-       gnutls_mac_set_priority(data->sess, mac_priority);
-       gnutls_credentials_set (data->sess, GNUTLS_CRD_CERTIFICATE, data->cred);
-
-
-       gnutls_transport_set_push_function (data->sess, (gnutls_push_func) tls_push);
-       gnutls_transport_set_pull_function (data->sess, (gnutls_pull_func) tls_pull);
-       
-       gnutls_transport_set_ptr (data->sess, data->prs);
-
-       ret = gnutls_handshake (data->sess);
-       if (ret != 0) {
-               gnutls_deinit (data->sess);
-               gnutls_certificate_free_credentials (data->cred);
-               return IKS_NET_TLSFAIL;
-       }
-
-       data->flags &= (~SF_TRY_SECURE);
-       data->flags |= SF_SECURE;
-
-       if (!(data->flags & SF_SERVER)) {
-               iks_send_header (data->prs, data->server);
-       }
-
-       return IKS_OK;
-} // HAVE_GNUTLS
-#elif HAVE_SSL
-static int wait_for_data(struct stream_data *data, int ret, int timeout)
-{
-       int err;
-       int retval = IKS_OK;
-
-       err = SSL_get_error(data->ssl, ret);
-       
-       switch(err)
-       {
-               case SSL_ERROR_WANT_READ:
-                       ret = sock_ready(data, timeout*1000, WANT_READ);
-                       break;
-               case SSL_ERROR_WANT_WRITE:
-                       ret = sock_ready(data, timeout*1000, WANT_WRITE);
-                       break;
-               default:
-                       if (data->logHook) {
-                               data->logHook(data->user_data, ERR_error_string(err, NULL), strlen(ERR_error_string(err, NULL)), 1); 
-                       }
-                       ret = -1;
-                       break;
-
-                       
-
-       }
-
-       if (ret == -1) {
-               retval = IKS_NET_TLSFAIL;
-       }
-       
-       
-       ERR_clear_error();
-                               
-       return retval;
-}
-
-
-#ifndef WIN32
-#include <fcntl.h>
-#endif
-
-int iks_set_blocking(void *fd, int blocking)
-{
-#ifdef WIN32
-    unsigned long mode = !blocking;
-#endif
-    if (!fd) {
-               return -1;
-       }
-    
-#ifdef WIN32
-    if (ioctlsocket((SOCKET)(intptr_t) fd, FIONBIO, &mode)) {
-        return -1;
-    }
-
-#else
-    int flags;
-       int mfd = (int)(intptr_t)fd;
-
-    if ((flags = fcntl(mfd, F_GETFL, 0)) < 0) {
-        return -1;
-    }
-
-    if (fcntl(mfd, F_SETFL, flags | (!blocking ? O_NONBLOCK : ~O_NONBLOCK)) < 0) {
-        return -1;
-    }
-#endif
-
-    return 0;
-}
-
-
-
-static int
-handshake (struct stream_data *data)
-{
-       int ret;
-       int finished;
-
-       SSL_library_init();
-       SSL_load_error_strings();
-       
-       if (data->flags & SF_SERVER) {
-               data->ssl_ctx = SSL_CTX_new(TLSv1_server_method());
-               if(!data->ssl_ctx) return IKS_NOMEM;
-
-               if (SSL_CTX_use_certificate_file(data->ssl_ctx, data->cert_file, SSL_FILETYPE_PEM) <= 0) {
-                       return IKS_NET_TLSFAIL;
-               }
-               if (SSL_CTX_use_PrivateKey_file(data->ssl_ctx, data->key_file, SSL_FILETYPE_PEM) <= 0) {
-                       return IKS_NET_TLSFAIL;
-               }
-               SSL_CTX_set_verify(data->ssl_ctx, SSL_VERIFY_NONE, NULL);
-       } else {
-               data->ssl_ctx = SSL_CTX_new(TLSv1_method());
-               if(!data->ssl_ctx) return IKS_NOMEM;
-       }
-       
-       data->ssl = SSL_new(data->ssl_ctx);
-       if(!data->ssl) return IKS_NOMEM;
-       
-       iks_set_blocking(data->sock, 0);
-
-       if( SSL_set_fd(data->ssl, (int)(intptr_t)data->sock) != 1 ) return IKS_NOMEM;
-       
-       /* Set both the read and write BIO's to non-blocking mode */
-       BIO_set_nbio(SSL_get_rbio(data->ssl), 1);
-       BIO_set_nbio(SSL_get_wbio(data->ssl), 1);
-
-       finished = 0;
-       
-       do
-       {
-               if (data->flags & SF_SERVER) {
-                       ret = SSL_accept(data->ssl);
-               } else {
-                       ret = SSL_connect(data->ssl);
-               }
-               
-               if( ret != 1 ) 
-               {
-                       if( wait_for_data(data, ret, 1) != IKS_OK ) 
-                       {
-                               finished = 1; 
-                               SSL_free(data->ssl);
-                       }
-               }
-       } while( ret != 1 && finished != 1 );
-       
-       if( ret == 1 )
-       {
-               data->flags &= (~SF_TRY_SECURE);
-               data->flags |= SF_SECURE;
-       
-               if (!(data->flags & SF_SERVER)) {
-                       iks_send_header (data->prs, data->server);
-               }
-       }
-       
-       return ret == 1 ? IKS_OK : IKS_NET_TLSFAIL;
-}
-#endif
-
-static void
-insert_attribs (iks *x, char **atts)
-{
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       iks_insert_attrib (x, atts[i], atts[i+1]);
-                       i += 2;
-               }
-       }
-}
-
-#define CNONCE_LEN 4
-
-static void
-parse_digest (char *message, const char *key, char **value_ptr, char **value_end_ptr)
-{
-       char *t;
-
-       *value_ptr = NULL;
-       *value_end_ptr = NULL;
-
-       t = strstr(message, key);
-       if (t) {
-               t += strlen(key);
-               *value_ptr = t;
-               while (t[0] != '\0') {
-                       if (t[0] != '\\' && t[1] == '"') {
-                               ++t;
-                               *value_end_ptr = t;
-                               return;
-                       }
-                       ++t;
-               }
-       }
-}
-
-static iks *
-make_sasl_response (struct stream_data *data, char *message)
-{
-       iks *x = NULL;
-       char *realm, *realm_end;
-       char *nonce, *nonce_end;
-       char cnonce[CNONCE_LEN*8 + 1];
-       iksmd5 *md5;
-       unsigned char a1_h[16], a1[33], a2[33], response_value[33];
-       char *response, *response_coded;
-       int i;
-
-       parse_digest(message, "realm=\"", &realm, &realm_end);
-       parse_digest(message, "nonce=\"", &nonce, &nonce_end);
-
-       /* nonce is necessary for auth */
-       if (!nonce || !nonce_end) return NULL;
-       *nonce_end = '\0';
-
-       /* if no realm is given use the server hostname */
-       if (realm) {
-               if (!realm_end) return NULL;
-               *realm_end = '\0';
-       } else {
-               realm = (char *) data->server;
-       }
-
-       /* generate random client challenge */
-       for (i = 0; i < CNONCE_LEN; ++i)
-               sprintf (cnonce + i*8, "%08x", rand());
-
-       md5 = iks_md5_new();
-       if (!md5) return NULL;
-
-       iks_md5_hash (md5, (const unsigned char*)data->auth_username, iks_strlen (data->auth_username), 0);
-       iks_md5_hash (md5, (const unsigned char*)":", 1, 0);
-       iks_md5_hash (md5, (const unsigned char*)realm, iks_strlen (realm), 0);
-       iks_md5_hash (md5, (const unsigned char*)":", 1, 0);
-       iks_md5_hash (md5, (const unsigned char*)data->auth_pass, iks_strlen (data->auth_pass), 1);
-       iks_md5_digest (md5, a1_h);
-
-       iks_md5_reset (md5);
-       iks_md5_hash (md5, (const unsigned char*)a1_h, 16, 0);
-       iks_md5_hash (md5, (const unsigned char*)":", 1, 0);
-       iks_md5_hash (md5, (const unsigned char*)nonce, iks_strlen (nonce), 0);
-       iks_md5_hash (md5, (const unsigned char*)":", 1, 0);
-       iks_md5_hash (md5, (const unsigned char*)cnonce, iks_strlen (cnonce), 1);
-       iks_md5_print (md5, (char*)a1);
-
-       iks_md5_reset (md5);
-       iks_md5_hash (md5, (const unsigned char*)"AUTHENTICATE:xmpp/", 18, 0);
-       iks_md5_hash (md5, (const unsigned char*)data->server, iks_strlen (data->server), 1);
-       iks_md5_print (md5, (char*)a2);
-
-       iks_md5_reset (md5);
-       iks_md5_hash (md5, (const unsigned char*)a1, 32, 0);
-       iks_md5_hash (md5, (const unsigned char*)":", 1, 0);
-       iks_md5_hash (md5, (const unsigned char*)nonce, iks_strlen (nonce), 0);
-       iks_md5_hash (md5, (const unsigned char*)":00000001:", 10, 0);
-       iks_md5_hash (md5, (const unsigned char*)cnonce, iks_strlen (cnonce), 0);
-       iks_md5_hash (md5, (const unsigned char*)":auth:", 6, 0);
-       iks_md5_hash (md5, (const unsigned char*)a2, 32, 1);
-       iks_md5_print (md5, (char*)response_value);
-
-       iks_md5_delete (md5);
-
-       i = iks_strlen (data->auth_username) + iks_strlen (realm) +
-               iks_strlen (nonce) + iks_strlen (data->server) +
-               CNONCE_LEN*8 + 136;
-       response = iks_malloc (i);
-       if (!response) return NULL;
-
-       sprintf (response, "username=\"%s\",realm=\"%s\",nonce=\"%s\""
-               ",cnonce=\"%s\",nc=00000001,qop=auth,digest-uri=\""
-               "xmpp/%s\",response=%s,charset=utf-8",
-               data->auth_username, realm, nonce, cnonce,
-               data->server, response_value);
-
-       response_coded = iks_base64_encode (response, 0);
-       if (response_coded) {
-               x = iks_new ("response");
-               iks_insert_cdata (x, response_coded, 0);
-               iks_free (response_coded);
-       }
-       iks_free (response);
-
-       return x;
-}
-
-static void
-iks_sasl_challenge (struct stream_data *data, iks *challenge)
-{
-       char *message;
-       iks *x;
-       char *tmp;
-
-       tmp = iks_cdata (iks_child (challenge));
-       if (!tmp) return;
-
-       /* decode received blob */
-       message = iks_base64_decode (tmp);
-       if (!message) return;
-
-       /* reply the challenge */
-       if (strstr (message, "rspauth")) {
-               x = iks_new ("response");
-       } else {
-               x = make_sasl_response (data, message);
-       }
-       if (x) {
-               iks_insert_attrib (x, "xmlns", IKS_NS_XMPP_SASL);
-               iks_send (data->prs, x);
-               iks_delete (x);
-       }
-       iks_free (message);
-}
-
-static int
-tagHook (struct stream_data *data, char *name, char **atts, int type)
-{
-       iks *x;
-       int err;
-
-       switch (type) {
-               case IKS_OPEN:
-               case IKS_SINGLE:
-#ifdef HAVE_GNUTLS
-                       if (data->flags & SF_TRY_SECURE) {
-                               if (strcmp (name, "proceed") == 0) {
-                                       err = handshake (data);
-                                       return err;
-                               } else if (strcmp (name, "failure") == 0){
-                                       return IKS_NET_TLSFAIL;
-                               }
-                       }
-#elif HAVE_SSL
-                       if (data->flags & SF_TRY_SECURE) {
-                               if (strcmp (name, "proceed") == 0) {
-                                       err = handshake (data);
-                                       return err;
-                               } else if (strcmp (name, "failure") == 0){
-                                       return IKS_NET_TLSFAIL;
-                               }
-                       }
-#endif
-                       if (data->current) {
-                               x = iks_insert (data->current, name);
-                               insert_attribs (x, atts);
-                       } else {
-                               x = iks_new (name);
-                               insert_attribs (x, atts);
-                               if (iks_strcmp (name, "stream:stream") == 0) {
-                                       err = data->streamHook (data->user_data, IKS_NODE_START, x);
-                                       if (err != IKS_OK) return err;
-                                       break;
-                               }
-                       }
-                       data->current = x;
-                       if (IKS_OPEN == type) break;
-               case IKS_CLOSE:
-                       x = data->current;
-                       if (NULL == x) {
-                               err = data->streamHook (data->user_data, IKS_NODE_STOP, NULL);
-                               if (err != IKS_OK) return err;
-                               break;
-                       }
-                       if (NULL == iks_parent (x)) {
-                               data->current = NULL;
-                               if (iks_strcmp (name, "challenge") == 0)
-                                       iks_sasl_challenge(data, x);
-                               else if (iks_strcmp (name, "stream:error") == 0) {
-                                       err = data->streamHook (data->user_data, IKS_NODE_ERROR, x);
-                                       if (err != IKS_OK) return err;
-                               } else {
-                                       err = data->streamHook (data->user_data, IKS_NODE_NORMAL, x);
-                                       if (err != IKS_OK) return err;
-                               }
-                               break;
-                       }
-                       data->current = iks_parent (x);
-       }
-       return IKS_OK;
-}
-
-static int
-cdataHook (struct stream_data *data, char *cdata, size_t len)
-{
-       if (data->current) iks_insert_cdata (data->current, cdata, len);
-       return IKS_OK;
-}
-
-static void
-deleteHook (struct stream_data *data)
-{
-#ifdef HAVE_GNUTLS
-       if (data->flags & SF_SECURE) {
-               gnutls_bye (data->sess, GNUTLS_SHUT_WR);
-               gnutls_deinit (data->sess);
-               gnutls_certificate_free_credentials (data->cred);
-       }
-#elif HAVE_SSL
-       if (data->flags & SF_SECURE) {
-               if( SSL_shutdown(data->ssl) == 0 ) SSL_shutdown(data->ssl);
-               SSL_free(data->ssl);
-       }
-#endif
-       if (data->trans) data->trans->close (data->sock);
-       data->trans = NULL;
-       if (data->current) iks_delete (data->current);
-       data->current = NULL;
-       data->flags = 0;
-}
-
-iksparser *
-iks_stream_new (char *name_space, void *user_data, iksStreamHook *streamHook)
-{
-       ikstack *s;
-       struct stream_data *data;
-
-       s = iks_stack_new (DEFAULT_STREAM_CHUNK_SIZE, 0);
-       if (NULL == s) return NULL;
-       data = iks_stack_alloc (s, sizeof (struct stream_data));
-       memset (data, 0, sizeof (struct stream_data));
-       data->s = s;
-       data->prs = iks_sax_extend (s, data, (iksTagHook *)tagHook, (iksCDataHook *)cdataHook, (iksDeleteHook *)deleteHook);
-       data->name_space = name_space;
-       data->user_data = user_data;
-       data->streamHook = streamHook;
-       return data->prs;
-}
-
-void *
-iks_stream_user_data (iksparser *prs)
-{
-       struct stream_data *data = iks_user_data (prs);
-
-       return data->user_data;
-}
-
-void
-iks_set_log_hook (iksparser *prs, iksLogHook *logHook)
-{
-       struct stream_data *data = iks_user_data (prs);
-
-       data->logHook = logHook;
-}
-
-int
-iks_connect_tcp (iksparser *prs, const char *server, int port)
-{
-#ifdef USE_DEFAULT_IO
-       return iks_connect_with (prs, server, port, server, &iks_default_transport);
-#else
-       return IKS_NET_NOTSUPP;
-#endif
-}
-
-int
-iks_connect_via (iksparser *prs, const char *server, int port, const char *server_name)
-{
-#ifdef USE_DEFAULT_IO
-       return iks_connect_with (prs, server, port, server_name, &iks_default_transport);
-#else
-       return IKS_NET_NOTSUPP;
-#endif
-}
-
-int
-iks_connect_with (iksparser *prs, const char *server, int port, const char *server_name, ikstransport *trans)
-{
-       struct stream_data *data = iks_user_data (prs);
-       int ret;
-
-       if (!trans->connect) return IKS_NET_NOTSUPP;
-
-       if (!data->buf) {
-               data->buf = iks_stack_alloc (data->s, NET_IO_BUF_SIZE);
-               if (NULL == data->buf) return IKS_NOMEM;
-       }
-
-       ret = trans->connect (prs, &data->sock, server, port);
-       if (ret) return ret;
-
-       data->trans = trans;
-
-       return iks_send_header (prs, server_name);
-}
-
-int
-iks_connect_async (iksparser *prs, const char *server, int port, void *notify_data, iksAsyncNotify *notify_func)
-{
-#ifdef USE_DEFAULT_IO
-       return iks_connect_async_with (prs, server, port, server, &iks_default_transport, notify_data, notify_func);
-#else
-       return IKS_NET_NOTSUPP;
-#endif
-}
-
-int
-iks_connect_async_with (iksparser *prs, const char *server, int port, const char *server_name, ikstransport *trans, void *notify_data, iksAsyncNotify *notify_func)
-{
-       struct stream_data *data = iks_user_data (prs);
-       int ret;
-
-       if (NULL == trans->connect_async)
-               return IKS_NET_NOTSUPP;
-
-       if (!data->buf) {
-               data->buf = iks_stack_alloc (data->s, NET_IO_BUF_SIZE);
-               if (NULL == data->buf) return IKS_NOMEM;
-       }
-
-       ret = trans->connect_async (prs, &data->sock, server, server_name, port, notify_data, notify_func);
-       if (ret) return ret;
-
-       data->trans = trans;
-       data->server = server_name;
-
-       return IKS_OK;
-}
-
-int
-iks_connect_fd (iksparser *prs, int fd)
-{
-#ifdef USE_DEFAULT_IO
-       struct stream_data *data = iks_user_data (prs);
-
-       if (!data->buf) {
-               data->buf = iks_stack_alloc (data->s, NET_IO_BUF_SIZE);
-               if (NULL == data->buf) return IKS_NOMEM;
-       }
-
-       data->sock = (void *) (intptr_t) fd;
-       data->flags |= SF_FOREIGN;
-       data->trans = &iks_default_transport;
-
-       return IKS_OK;
-#else
-       return IKS_NET_NOTSUPP;
-#endif
-}
-
-int
-iks_fd (iksparser *prs)
-{
-       struct stream_data *data;
-
-       if (prs) {
-               data = iks_user_data (prs);
-               if (data) {
-                       return (int)(intptr_t) data->sock;
-               }
-       }
-       return -1;
-}
-
-int
-iks_recv (iksparser *prs, int timeout)
-{
-       struct stream_data *data = iks_user_data (prs);
-       int len, ret;
-       
-#ifdef HAVE_SSL
-       int   err;
-#endif
-
-       while (1) {
-#ifdef HAVE_GNUTLS
-               if (data->flags & SF_SECURE) {
-                       len = gnutls_record_recv (data->sess, data->buf, NET_IO_BUF_SIZE - 1);
-                       if (len > 0 && len < 5) {
-                               len += gnutls_record_recv (data->sess, data->buf + len, NET_IO_BUF_SIZE - 1 - len);
-                       } else if (len == 0) len = -1;
-               } else
-#elif HAVE_SSL
-               if (data->flags & SF_SECURE) {
-                       ret = sock_ready(data, timeout*1000, WANT_READ);
-
-                       if (ret == -1) {
-                               return IKS_NET_TLSFAIL;
-                       } else if( ret == 0 ) {
-                               return IKS_OK;
-                       } else {
-                               len = SSL_read(data->ssl, data->buf, NET_IO_BUF_SIZE - 1);
-                               if (len > 0 && len < 5) {
-                                       len += SSL_read(data->ssl, data->buf + len, NET_IO_BUF_SIZE - 1 - len);
-                               }
-                       }
-                       
-                       if( len <= 0 ) 
-                       {
-                               switch( err = SSL_get_error(data->ssl, len) ) 
-                               {
-                                       case SSL_ERROR_WANT_READ:
-                                       case SSL_ERROR_WANT_WRITE:
-                                               return IKS_OK;
-                                               break;
-                                       default:
-                                               if(data->logHook)
-                                                       data->logHook(data->user_data, ERR_error_string(err, NULL), strlen(ERR_error_string(err, NULL)), 1); 
-                                               return IKS_NET_TLSFAIL;
-                                               break;
-                               }
-                       }
-               } else
-#endif
-               {
-                       len = data->trans->recv (data->sock, data->buf, NET_IO_BUF_SIZE - 1, timeout);
-               }
-               if (len < 0) return IKS_NET_RWERR;
-               if (len == 0) break;
-               data->buf[len] = '\0';
-               if (data->logHook) data->logHook (data->user_data, data->buf, len, 1);
-               ret = iks_parse (prs, data->buf, len, 0);
-
-               if (ret != IKS_OK) return ret;
-               if (!data->trans) {
-                       /* stream hook called iks_disconnect */
-                       return IKS_NET_NOCONN;
-               }
-               timeout = 0;
-       }
-       return IKS_OK;
-}
-
-int
-iks_send_header (iksparser *prs, const char *to)
-{
-       struct stream_data *data = iks_user_data (prs);
-       char *msg;
-       int len, err;
-
-       len = 91 + strlen (data->name_space) + 6 + strlen (to) + 16 + 1;
-       msg = iks_malloc (len);
-       if (!msg) return IKS_NOMEM;
-       sprintf (msg, "<?xml version='1.0'?>"
-               "<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='"
-               "%s' to='%s' version='1.0'>", data->name_space, to);
-       err = iks_send_raw (prs, msg);
-       iks_free (msg);
-       if (err) return err;
-       data->server = to;
-       return IKS_OK;
-}
-
-int
-iks_send (iksparser *prs, iks *x)
-{
-       return iks_send_raw (prs, iks_string (iks_stack (x), x));
-}
-
-int
-iks_send_raw (iksparser *prs, const char *xmlstr)
-{
-       struct stream_data *data = iks_user_data (prs);
-       int ret;
-
-#ifdef HAVE_GNUTLS
-       if (data->flags & SF_SECURE) {
-               if (gnutls_record_send (data->sess, xmlstr, strlen (xmlstr)) < 0) return IKS_NET_RWERR;
-       } else
-#elif HAVE_SSL
-       if (data->flags & SF_SECURE) {
-               int r;
-
-               do {
-                       r = SSL_write(data->ssl, xmlstr, strlen (xmlstr));
-               } while (r == -1 && SSL_get_error(data->ssl, r) == SSL_ERROR_WANT_WRITE);
-               
-               if (r < 0) {
-                       return IKS_NET_RWERR;
-               }
-
-       } else
-#endif
-       {
-               ret = data->trans->send (data->sock, xmlstr, strlen (xmlstr));
-               if (ret) return ret;
-       }
-       if (data->logHook) data->logHook (data->user_data, xmlstr, strlen (xmlstr), 0);
-       return IKS_OK;
-}
-
-void
-iks_disconnect (iksparser *prs)
-{
-       iks_parser_reset (prs);
-}
-
-/*****  tls api  *****/
-
-int
-iks_has_tls (void)
-{
-#ifdef HAVE_GNUTLS
-       return 1;
-#elif HAVE_SSL
-       return 1;
-#else
-       return 0;
-#endif
-}
-
-int
-iks_is_secure (iksparser *prs)
-{
-#ifdef HAVE_GNUTLS
-       struct stream_data *data = iks_user_data (prs);
-
-       return data->flags & SF_SECURE;
-#elif HAVE_SSL
-       struct stream_data *data = iks_user_data (prs);
-       
-       return data->flags & SF_SECURE;
-#else
-       return 0;
-#endif
-}
-#ifdef HAVE_GNUTLS
-
-
-int
-iks_init(void)
-{
-       int ok = 0;
-       
-#ifndef WIN32
-       gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
-#endif
-
-       if (gnutls_global_init () != 0)
-               return IKS_NOMEM;
-
-       return ok;
-
-}
-#else
-int
-iks_init(void)
-{
-       return 0;
-}
-#endif
-
-
-int
-iks_start_tls (iksparser *prs)
-{
-#ifdef HAVE_GNUTLS
-       int ret;
-       struct stream_data *data = iks_user_data (prs);
-
-       ret = iks_send_raw (prs, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
-       if (ret) return ret;
-       data->flags |= SF_TRY_SECURE;
-       return IKS_OK;
-#elif HAVE_SSL
-       int ret;
-       struct stream_data *data = iks_user_data (prs);
-       
-       ret = iks_send_raw (prs, "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
-       if (ret) return ret;
-       data->flags |= SF_TRY_SECURE;
-       return IKS_OK;
-#else
-       return IKS_NET_NOTSUPP;
-#endif
-}
-
-int
-iks_proceed_tls (iksparser *prs, const char *cert_file, const char *key_file)
-{
-#ifdef HAVE_GNUTLS
-       int ret;
-       struct stream_data *data = iks_user_data (prs);
-
-       ret = iks_send_raw (prs, "<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
-       if (ret) return ret;
-       data->cert_file = iks_stack_strdup(data->s, cert_file, 0);
-       data->key_file = iks_stack_strdup(data->s, key_file, 0);
-       data->flags |= SF_TRY_SECURE | SF_SERVER;
-       return handshake (data);
-#elif HAVE_SSL
-       int ret;
-       struct stream_data *data = iks_user_data (prs);
-
-       ret = iks_send_raw (prs, "<proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
-       if (ret) return ret;
-       data->cert_file = iks_stack_strdup(data->s, cert_file, 0);
-       data->key_file = iks_stack_strdup(data->s, key_file, 0);
-       data->flags |= SF_TRY_SECURE | SF_SERVER;
-       return handshake (data);
-#else
-       return IKS_NET_NOTSUPP;
-#endif
-}
-
-/*****  sasl  *****/
-
-int
-iks_start_sasl (iksparser *prs, enum ikssasltype type, char *username, char *pass)
-{
-       iks *x;
-
-       x = iks_new ("auth");
-       iks_insert_attrib (x, "xmlns", IKS_NS_XMPP_SASL);
-       switch (type) {
-               case IKS_SASL_PLAIN: {
-                       int len = iks_strlen (username) + iks_strlen (pass) + 2;
-                       char *s = iks_malloc (80+len);
-                       char *base64;
-
-                       iks_insert_attrib (x, "mechanism", "PLAIN");
-                       sprintf (s, "%c%s%c%s", 0, username, 0, pass);
-                       base64 = iks_base64_encode (s, len);
-                       iks_insert_cdata (x, base64, 0);
-                       iks_free (base64);
-                       iks_free (s);
-                       break;
-               }
-               case IKS_SASL_DIGEST_MD5: {
-                       struct stream_data *data = iks_user_data (prs);
-
-                       iks_insert_attrib (x, "mechanism", "DIGEST-MD5");
-                       data->auth_username = username;
-                       data->auth_pass = pass;
-                       break;
-               }
-               default:
-                       iks_delete (x);
-                       return IKS_NET_NOTSUPP;
-       }
-       iks_send (prs, x);
-       iks_delete (x);
-       return IKS_OK;
-}
diff --git a/libs/iksemel/src/utility.c b/libs/iksemel/src/utility.c
deleted file mode 100644 (file)
index 5653bb5..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-/*****  malloc wrapper  *****/
-
-static void *(*my_malloc_func)(size_t size);
-static void (*my_free_func)(void *ptr);
-
-void *
-iks_malloc (size_t size)
-{
-       if (my_malloc_func)
-               return my_malloc_func (size);
-       else
-               return malloc (size);
-}
-
-void
-iks_real_free (void *ptr)
-{
-       if (my_free_func)
-               my_free_func (ptr);
-       else
-               free (ptr);
-}
-
-void
-iks_set_mem_funcs (void *(*malloc_func)(size_t size), void (*free_func)(void *ptr))
-{
-       my_malloc_func = malloc_func;
-       my_free_func = free_func;
-}
-
-/*****  NULL-safe Functions  *****/
-
-char *
-iks_strdup (const char *src)
-{
-       if (src) return strdup(src);
-       return NULL;
-}
-
-char *
-iks_strcat (char *dest, const char *src)
-{
-       size_t len;
-
-       if (!src) return dest;
-
-       len = strlen (src);
-       memcpy (dest, src, len);
-       dest[len] = '\0';
-       return dest + len;
-}
-
-int
-iks_strcmp (const char *a, const char *b)
-{
-       if (!a || !b) return -1;
-       return strcmp (a, b);
-}
-
-int
-iks_strcasecmp (const char *a, const char *b)
-{
-       if (!a || !b) return -1;
-       return strcasecmp (a, b);
-}
-
-int
-iks_strncmp (const char *a, const char *b, size_t n)
-{
-       if (!a || !b) return -1;
-       return strncmp (a, b, n);
-}
-
-int
-iks_strncasecmp (const char *a, const char *b, size_t n)
-{
-       if (!a || !b) return -1;
-       return strncasecmp (a, b, n);
-}
-
-size_t
-iks_strlen (const char *src)
-{
-       if (!src) return 0;
-       return strlen (src);
-}
-
-/*****  XML Escaping  *****/
-
-char *
-iks_escape (ikstack *s, char *src, size_t len)
-{
-       char *ret;
-       int i, j, nlen;
-
-       if (!src || !s) return NULL;
-       if (len == -1) len = strlen (src);
-
-       nlen = len;
-       for (i=0; i<len; i++) {
-               switch (src[i]) {
-               case '&': nlen += 4; break;
-               case '<': nlen += 3; break;
-               case '>': nlen += 3; break;
-               case '\'': nlen += 5; break;
-               case '"': nlen += 5; break;
-               }
-       }
-       if (len == nlen) return src;
-
-       ret = iks_stack_alloc (s, nlen + 1);
-       if (!ret) return NULL;
-
-       for (i=j=0; i<len; i++) {
-               switch (src[i]) {
-               case '&': memcpy (&ret[j], "&amp;", 5); j += 5; break;
-               case '\'': memcpy (&ret[j], "&apos;", 6); j += 6; break;
-               case '"': memcpy (&ret[j], "&quot;", 6); j += 6; break;
-               case '<': memcpy (&ret[j], "&lt;", 4); j += 4; break;
-               case '>': memcpy (&ret[j], "&gt;", 4); j += 4; break;
-               default: ret[j++] = src[i];
-               }
-       }
-       ret[j] = '\0';
-
-       return ret;
-}
-
-char *
-iks_unescape (ikstack *s, char *src, size_t len)
-{
-       int i,j;
-       char *ret;
-
-       if (!s || !src) return NULL;
-       if (!strchr (src, '&')) return src;
-       if (len == -1) len = strlen (src);
-
-       ret = iks_stack_alloc (s, len + 1);
-       if (!ret) return NULL;
-
-       for (i=j=0; i<len; i++) {
-               if (src[i] == '&') {
-                       i++;
-                       if (strncmp (&src[i], "amp;", 4) == 0) {
-                               ret[j] = '&';
-                               i += 3;
-                       } else if (strncmp (&src[i], "quot;", 5) == 0) {
-                               ret[j] = '"';
-                               i += 4;
-                       } else if (strncmp (&src[i], "apos;", 5) == 0) {
-                               ret[j] = '\'';
-                               i += 4;
-                       } else if (strncmp (&src[i], "lt;", 3) == 0) {
-                               ret[j] = '<';
-                               i += 2;
-                       } else if (strncmp (&src[i], "gt;", 3) == 0) {
-                               ret[j] = '>';
-                               i += 2;
-                       } else {
-                               ret[j] = src[--i];
-                       }
-               } else {
-                       ret[j] = src[i];
-               }
-               j++;
-       }
-       ret[j] = '\0';
-
-       return ret;
-}
diff --git a/libs/iksemel/test/Makefile.am b/libs/iksemel/test/Makefile.am
deleted file mode 100644 (file)
index 27b05f0..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-##
-## Process this file with automake to produce Makefile.in
-##
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-TESTS = tst-ikstack tst-iks tst-sax tst-dom tst-sha tst-md5 tst-filter tst-jid
-
-noinst_PROGRAMS = tst-ikstack tst-iks tst-sax tst-dom tst-sha tst-md5 tst-filter tst-jid
-
-tst_ikstack_LDADD = $(top_builddir)/src/libiksemel.la
-tst_ikstack_SOURCES = tst-ikstack.c
-
-tst_iks_LDADD = $(top_builddir)/src/libiksemel.la
-tst_iks_SOURCES = tst-iks.c
-
-tst_sax_LDADD = $(top_builddir)/src/libiksemel.la
-tst_sax_SOURCES = tst-sax.c
-
-tst_dom_LDADD = $(top_builddir)/src/libiksemel.la
-tst_dom_SOURCES = tst-dom.c
-
-tst_sha_LDADD = $(top_builddir)/src/libiksemel.la
-tst_sha_SOURCES = tst-sha.c
-
-tst_md5_LDADD = $(top_builddir)/src/libiksemel.la
-tst_md5_SOURCES = tst-md5.c
-
-tst_filter_LDADD = $(top_builddir)/src/libiksemel.la
-tst_filter_SOURCES = tst-filter.c
-
-tst_jid_LDADD = $(top_builddir)/src/libiksemel.la
-tst_jid_SOURCES = tst-jid.c
diff --git a/libs/iksemel/test/tst-dom.c b/libs/iksemel/test/tst-dom.c
deleted file mode 100644 (file)
index 693509e..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#include "iksemel.h"
-
-iks *my_x;
-int nr_tests;
-
-#define PR_TEST printf ("DOM test %d:\n", nr_tests)
-
-void
-document (char *xml)
-{
-       enum ikserror err;
-       iksparser *p;
-
-       nr_tests++;
-       if (my_x) iks_delete (my_x);
-       p = iks_dom_new (&my_x);
-       err = iks_parse (p, xml, 0, 1);
-       switch (err) {
-               case IKS_OK:
-                       break;
-               case IKS_NOMEM:
-                       PR_TEST;
-                       puts ("Not enough memory.");
-                       exit (1);
-               case IKS_BADXML:
-                       PR_TEST;
-                       printf ("Invalid xml at byte %ld in\n[%s]\n", iks_nr_bytes (p), xml);
-                       exit (1);
-               case IKS_HOOK:
-                       PR_TEST;
-                       puts ("Hook.");
-       }
-       iks_parser_delete (p);
-}
-
-void
-tag (char *name, ...)
-{
-       iks *x;
-       va_list ap;
-
-       x = my_x;
-       va_start (ap, name);
-       while (1) {
-               char *name = iks_name (x);
-               char *tmp = va_arg (ap, char*);
-               if (NULL == tmp) break;
-               x = iks_find (x, tmp);
-               if (!x) {
-                       PR_TEST;
-                       printf ("Tag <%s> is not a child of tag <%s>\n", tmp, name);
-                       exit (1);
-               }
-       }
-       if (!x || NULL == iks_find (x, name)) {
-               PR_TEST;
-               printf ("Tag <%s> is not a child of tag <%s>\n", name, iks_name (x));
-               exit (1);
-       }
-       va_end (ap);
-}
-
-void
-cdata (char *data, ...)
-{
-       iks *x;
-       va_list ap;
-
-       x = my_x;
-       va_start (ap, data);
-       while (1) {
-               char *name = iks_name (x);
-               char *tmp = va_arg (ap, char*);
-               if (NULL == tmp) break;
-               x = iks_find (x, tmp);
-               if (!x) {
-                       PR_TEST;
-                       printf ("Tag <%s> is not a child of tag <%s>\n", tmp, name);
-                       exit (1);
-               }
-       }
-       if (iks_strcmp ( iks_cdata (iks_child (x)), data) != 0) {
-               PR_TEST;
-               printf ("CDATA [%s] not found.\n", data);
-               exit (1);
-       }
-       va_end (ap);
-}
-
-void
-attrib (char *att, char *val, ...)
-{
-       iks *x;
-       va_list ap;
-
-       x = my_x;
-       va_start (ap, val);
-       while (1) {
-               char *name = iks_name (x);
-               char *tmp = va_arg (ap, char*);
-               if (NULL == tmp) break;
-               x = iks_find (x, tmp);
-               if (!x) {
-                       PR_TEST;
-                       printf ("Tag <%s> is not a child of tag <%s>\n", tmp, name);
-                       exit (1);
-               }
-       }
-       if (iks_strcmp (val, iks_find_attrib (x, att)) != 0) {
-               PR_TEST;
-               printf ("Attribute '%s' not found.\n", att);
-               exit (1);
-       }
-       va_end (ap);
-}
-
-void
-string (char *xml)
-{
-       char *tmp;
-
-       tmp = iks_string (iks_stack (my_x), my_x);
-       if (iks_strcmp (tmp, xml) != 0) {
-               PR_TEST;
-               printf ("Result:   %s\n", tmp);
-               printf ("Expected: %s\n", xml);
-               exit (1);
-       }
-}
-
-static char buf[] =
-       "<presence id='JCOM_11' to='lala@j.org' type='available'><status>"
-       "&quot; &lt;online&amp;dangerous&gt; &quot;</status>meow<a><b c='d'/>"
-       "</a><test/></presence>";
-
-int main (int argc, char *argv[])
-{
-       document ("<atag></atag>");
-       string ("<atag/>");
-
-       document ("<test>lala<b>bold</b>blablabla<a><c/></a></test>");
-       tag ("b", 0);
-       tag ("c", "a", 0);
-       string ("<test>lala<b>bold</b>blablabla<a><c/></a></test>");
-
-       document (buf);
-       cdata ("\" <online&dangerous> \"", "status", 0);
-       attrib ("c", "d", "a", "b", 0);
-       tag ("test", 0);
-       string (buf);
-
-       return 0;
-}
diff --git a/libs/iksemel/test/tst-filter.c b/libs/iksemel/test/tst-filter.c
deleted file mode 100644 (file)
index 64adbd1..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <locale.h>
-#include <assert.h>
-
-#include "iksemel.h"
-
-struct {
-       iksfilter *f;
-       char *xml;
-       int nr;
-       iksFilterHook *hook[20];
-       int nr_hook;
-       iksFilterHook *call[20];
-       int nr_call;
-} tester;
-
-void
-document (char *xml)
-{
-       tester.nr++;
-       tester.xml = xml;
-       tester.nr_hook = 0;
-}
-
-void
-hook (iksFilterHook *hk)
-{
-       tester.hook[tester.nr_hook++] = hk;
-}
-
-void
-debug (void)
-{
-       int i;
-
-       printf ("Filter test %d:\n", tester.nr);
-       if (tester.nr_hook) {
-               puts ("Expected hook order:");
-               for (i = 0; i < tester.nr_hook; i++) {
-                       printf (" ");
-                       tester.hook[i] (NULL, NULL);
-               }
-       } else {
-               puts("No hooks expected.");
-       }
-       if (tester.nr_call) {
-               puts ("Hook order:");
-               for (i = 0; i < tester.nr_call; i++) {
-                       printf (" ");
-                       tester.call[i] (NULL, NULL);
-               }
-       } else {
-               puts("No hooks called.");
-       }
-       exit (1);
-}
-
-void
-test (void)
-{
-       iksparser *prs;
-       iks *x;
-       int i;
-
-       tester.nr_call = 0;
-
-       prs = iks_dom_new (&x);
-       iks_parse (prs, tester.xml, strlen (tester.xml), 1);
-       iks_parser_delete (prs);
-       iks_filter_packet (tester.f, iks_packet (x));
-       iks_delete (x);
-
-       if (tester.nr_call != tester.nr_hook) debug ();
-       for (i = 0; i < tester.nr_hook; i++) {
-               if (tester.call[i] != tester.hook[i]) debug ();
-       }
-}
-
-#define DEBUG(x) if (NULL == pak) { puts ( (x) ); return IKS_FILTER_PASS; }
-
-int
-on_msg (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_msg");
-       assert (IKS_PAK_MESSAGE == pak->type);
-       tester.call[tester.nr_call++] = on_msg;
-       return IKS_FILTER_PASS;
-}
-
-int
-on_iq (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_iq");
-       assert (IKS_PAK_IQ == pak->type);
-       tester.call[tester.nr_call++] = on_iq;
-       return IKS_FILTER_PASS;
-}
-
-int
-on_iq_result (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_iq_result");
-       assert (IKS_PAK_IQ == pak->type);
-       assert (IKS_TYPE_RESULT == pak->subtype);
-       tester.call[tester.nr_call++] = on_iq_result;
-       return IKS_FILTER_PASS;
-}
-
-int
-on_iq_result_id_auth (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_iq_result_id_auth");
-       assert (IKS_PAK_IQ == pak->type);
-       assert (IKS_TYPE_RESULT == pak->subtype);
-       assert (iks_strcmp (pak->id, "auth") == 0);
-       tester.call[tester.nr_call++] = on_iq_result_id_auth;
-       return IKS_FILTER_PASS;
-}
-
-int
-on_id_auth (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_id_auth");
-       assert (iks_strcmp (pak->id, "auth") == 0);
-       tester.call[tester.nr_call++] = on_id_auth;
-       return IKS_FILTER_PASS;
-}
-
-int
-on_from_patrician (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_from_patrician");
-       assert (iks_strcmp (pak->from->partial, "patrician@morpork.gov") == 0);
-       tester.call[tester.nr_call++] = on_from_patrician;
-       return IKS_FILTER_PASS;
-}
-
-int
-on_msg_chat_from_patrician (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_msg_chat_from_patrician");
-       assert (pak->type == IKS_PAK_MESSAGE);
-       assert (pak->subtype == IKS_TYPE_CHAT);
-       assert (iks_strcmp (pak->from->partial, "patrician@morpork.gov") == 0);
-       tester.call[tester.nr_call++] = on_msg_chat_from_patrician;
-       return IKS_FILTER_PASS;
-}
-
-int
-on_id_albatros (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_id_albatros");
-       assert (iks_strcmp (pak->id, "albatros") == 0);
-       tester.call[tester.nr_call++] = on_id_albatros;
-       return IKS_FILTER_PASS;
-}
-
-int
-on_from_dean (void *user_data, ikspak *pak)
-{
-       DEBUG ("on_from_dean");
-       assert (iks_strcmp (pak->from->partial, "dean@unseen.edu") == 0);
-       tester.call[tester.nr_call++] = on_from_dean;
-       return IKS_FILTER_PASS;
-}
-
-int
-main (int argc, char *argv[])
-{
-       tester.f = iks_filter_new ();
-       iks_filter_add_rule (tester.f, on_msg, 0,
-               IKS_RULE_TYPE, IKS_PAK_MESSAGE,
-               IKS_RULE_DONE);
-       iks_filter_add_rule (tester.f, on_iq, 0,
-               IKS_RULE_TYPE, IKS_PAK_IQ,
-               IKS_RULE_DONE);
-       iks_filter_add_rule (tester.f, on_iq_result, 0,
-               IKS_RULE_TYPE, IKS_PAK_IQ,
-               IKS_RULE_SUBTYPE, IKS_TYPE_RESULT,
-               IKS_RULE_DONE);
-       iks_filter_add_rule (tester.f, on_iq_result_id_auth, 0,
-               IKS_RULE_TYPE, IKS_PAK_IQ,
-               IKS_RULE_SUBTYPE, IKS_TYPE_RESULT,
-               IKS_RULE_ID, "auth",
-               IKS_RULE_DONE);
-       iks_filter_add_rule (tester.f, on_id_auth, 0,
-               IKS_RULE_ID, "auth",
-               IKS_RULE_DONE);
-       iks_filter_add_rule (tester.f, on_from_dean, 0,
-               IKS_RULE_FROM_PARTIAL, "dean@unseen.edu",
-               IKS_RULE_DONE);
-       iks_filter_add_rule (tester.f, on_from_patrician, 0,
-               IKS_RULE_FROM_PARTIAL, "patrician@morpork.gov",
-               IKS_RULE_DONE);
-       iks_filter_add_rule (tester.f, on_msg_chat_from_patrician, 0,
-               IKS_RULE_TYPE, IKS_PAK_MESSAGE,
-               IKS_RULE_SUBTYPE, IKS_TYPE_CHAT,
-               IKS_RULE_FROM_PARTIAL, "patrician@morpork.gov",
-               IKS_RULE_DONE);
-       iks_filter_add_rule (tester.f, on_id_albatros, 0,
-               IKS_RULE_ID, "albatros",
-               IKS_RULE_DONE);
-
-       document ("<message from='dean@unseen.edu' id='1234'><body>Born to Rune.</body></message>");
-       hook (on_from_dean);
-       hook (on_msg);
-       test ();
-
-       document ("<presence from='librarian@unseen.edu' show='away'/>");
-       test ();
-
-       document ("<message from='rincewind@unseen.edu' type='chat' id='albatros'><body>yaaargh</body></message>");
-       hook (on_id_albatros);
-       hook (on_msg);
-       test ();
-
-       document ("<iq type='get' from='rincewind@unseen.edu'><query xmlns='jabber:time'/></iq>");
-       hook (on_iq);
-       test ();
-
-       document ("<message from='patrician@morpork.gov'><body>so you admit it?</body></message>");
-       hook (on_from_patrician);
-       hook (on_msg);
-       test ();
-
-       document ("<iq type='result' from='rincewind@unseen.edu'><query xmlns='jabber:version'><name>cabbar</name><version>1.0</version></query></iq>");
-       hook (on_iq_result);
-       hook (on_iq);
-       test ();
-
-       document ("<presence from='dean@unseen.edu/psi' type='unavailable'/>");
-       hook (on_from_dean);
-       test ();
-
-       document ("<message from='patrician@morpork.gov' type='chat' id='albatros'><body>hmm</body></message>");
-       hook (on_id_albatros);
-       hook (on_msg_chat_from_patrician);
-       hook (on_from_patrician);
-       hook (on_msg);
-       test ();
-
-       document ("<iq type='result' id='auth'/>");
-       hook (on_iq_result_id_auth);
-       hook (on_id_auth);
-       hook (on_iq_result);
-       hook (on_iq);
-       test ();
-
-       iks_filter_delete (tester.f);
-
-       return 0;
-}
diff --git a/libs/iksemel/test/tst-iks.c b/libs/iksemel/test/tst-iks.c
deleted file mode 100644 (file)
index 5573b07..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <locale.h>
-
-#include "iksemel.h"
-
-int main (int argc, char *argv[])
-{
-       static char xml[] =
-               "<iq type='result' to='ydobon@jabber.org'><query xmlns='jabber:iq:version'>"
-               "<name>TestClient</name><os>SuxOS 2000</os><version><stable solidity='rock'/>"
-               "1.2.0 patchlevel 2</version></query></iq>";
-       static char xml2[] =
-               "<Ni><C/>lala<br/><A/>Hello World<B/></Ni>";
-       iks *x, *y, *z;
-       char *t;
-
-       setlocale (LC_ALL, "");
-
-       x = iks_new ("iq");
-       iks_insert_attrib (x, "type", "resultypo");
-       iks_insert_attrib (x, "type", "result");
-       iks_insert_attrib (x, "to", "ydobon@jabber.org");
-       y = iks_new_within ("query", iks_stack (x));
-       iks_insert_cdata (iks_insert (y, "name"), "TestClient", 10);
-       iks_insert_cdata (iks_insert (y, "os"), "SuxOS", 0);
-       z = iks_insert (y, "version");
-       iks_insert (z, "stable");
-       iks_insert_cdata (z, "1.2", 3);
-       iks_insert_cdata (z, ".0 patchlevel 2", 0);
-       iks_insert_node (x, y);
-       z = iks_find (y, "os");
-       iks_insert_attrib (z, "error", "yes");
-       iks_insert_attrib (z, "error", NULL);
-       iks_insert_cdata (z, " 2000", 5);
-       z = iks_next (z);
-       z = iks_find (z, "stable");
-       iks_insert_attrib (z, "solidity", "rock");
-       z = iks_parent (iks_parent (z));
-       iks_insert_attrib (z, "xmlns", "jabber:iq:version");
-
-       t = iks_string (iks_stack (x), x);
-       if(!t || strcmp(t, xml) != 0) {
-               printf("Result:   %s\n", t);
-               printf("Expected: %s\n", xml);
-               return 1;
-       }
-       iks_delete(x);
-
-
-       x = iks_new ("Ni");
-       y = iks_insert (x, "br");
-       z = iks_prepend_cdata (y, "lala", 4);
-       iks_prepend (z, "C");
-       z = iks_insert_cdata (x, "Hello", 5);
-       y = iks_append (z, "B");
-       iks_prepend (z, "A");
-       iks_append_cdata (z, " ", 1);
-       iks_prepend_cdata (y, "World", 5);
-
-       t = iks_string (iks_stack (x), x);
-       if(!t || strcmp(t, xml2) != 0) {
-               printf("Result:   %s\n", t);
-               printf("Expected: %s\n", xml2);
-               return 1;
-       }
-       iks_delete(x);
-
-       return 0;
-}
diff --git a/libs/iksemel/test/tst-ikstack.c b/libs/iksemel/test/tst-ikstack.c
deleted file mode 100644 (file)
index d123e20..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2004 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "iksemel.h"
-
-struct align_test { char a; double b; };
-#define DEFAULT_ALIGNMENT  ((size_t) ((char *) &((struct align_test *) 0)->b - (char *) 0))
-#define ALIGN_MASK ( DEFAULT_ALIGNMENT - 1 )
-
-const char buf[] = "1234567890abcdefghijklmnopqrstuv";
-
-void
-test_stack (int cs)
-{
-       ikstack *s;
-       char *mem, *old;
-       int i;
-
-       s = iks_stack_new (cs, cs);
-       old = NULL;
-       for (i = 0; i < strlen (buf); i++) {
-               iks_stack_strdup (s, buf, i);
-               mem = iks_stack_alloc (s, i);
-               if (((unsigned long) mem) & ALIGN_MASK) {
-                       printf ("ikstack bug, addr %p should be a multiply of %d\n",
-                               mem, DEFAULT_ALIGNMENT);
-                       exit (1);
-               }
-               memset (mem, 'x', i);
-               old = iks_stack_strcat (s, old, 0, buf + i, 1);
-       }
-       if (old && strcmp (old, buf) != 0) {
-               printf ("ikstack strcat bug:\nExpected: %s\n  Result: %s\n", buf, old);
-               exit (1);
-       }
-       iks_stack_delete (&s);
-}
-
-int main (int argc, char *argv[])
-{
-       test_stack (0);
-       test_stack (16);
-       test_stack (237);
-       test_stack (1024);
-
-       return 0;
-}
diff --git a/libs/iksemel/test/tst-jid.c b/libs/iksemel/test/tst-jid.c
deleted file mode 100644 (file)
index a3899db..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <locale.h>
-
-#include "iksemel.h"
-
-ikstack *my_stack;
-
-void
-print_id (iksid *id)
-{
-       printf (" Full: [%s]\n Partial: [%s]\n User: [%s]\n Server: [%s]\n Resource: [%s]\n",
-               id->full, id->partial, id->user, id->server, id->resource);
-}
-
-#define BUG(x) { print_id ( (x) ); exit (1); }
-
-void
-test_id (char *id, char *partial, char *user, char *server, char *resource)
-{
-       iksid *a;
-
-       a = iks_id_new (my_stack, id);
-       if ((a->partial || partial) && iks_strcmp (a->partial, partial) != 0) BUG(a);
-       if ((a->user || user) && iks_strcmp (a->user, user) != 0) BUG(a);
-       if ((a->server || server) && iks_strcmp (a->server, server) != 0) BUG(a);
-       if ((a->resource || resource) && iks_strcmp (a->resource, resource) != 0) BUG(a);
-}
-
-void
-test_cmp (char *stra, char *strb, int parts, int diff)
-{
-       iksid *a, *b;
-
-       a = iks_id_new (my_stack, stra);
-       b = iks_id_new (my_stack, strb);
-       if (diff != iks_id_cmp (a, b, parts)) exit (1);
-}
-
-int main (int argc, char *argv[])
-{
-       my_stack = iks_stack_new (1024, 1024);
-
-       test_id ("jabber:madcat@jabber.org/cabbar", "madcat@jabber.org", "madcat", "jabber.org", "cabbar");
-       test_id ("bob@silent.org", "bob@silent.org", "bob", "silent.org", NULL);
-
-       test_cmp ("dante@jabber.org/hell", "dante@jabber.org/heaven", IKS_ID_PARTIAL, 0);
-       test_cmp ("madcat@jabber.org/cabbar", "madcat@jabber.org/jabberx", IKS_ID_FULL, IKS_ID_RESOURCE);
-       test_cmp ("dean@unseen.edu/pda", "librarian@unseen.edu/jabberx", IKS_ID_FULL, IKS_ID_USER | IKS_ID_RESOURCE);
-       test_cmp ("patrician@morpork.gov/gabber", "cohen@guild.org/gsm", IKS_ID_FULL, IKS_ID_FULL);
-       test_cmp ("peter@family.com", "peter@family.com/clam", IKS_ID_PARTIAL, 0);
-
-       iks_stack_delete (&my_stack);
-
-       return 0;
-}
diff --git a/libs/iksemel/test/tst-md5.c b/libs/iksemel/test/tst-md5.c
deleted file mode 100644 (file)
index 82584ae..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2004 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "iksemel.h"
-
-int main (int argc, char *argv[])
-{
-       struct lala {
-               char *str;
-               char *hash;
-       } known_hashes[] = {
-               { "abc", "900150983cd24fb0d6963f7d28e17f72" },
-               { "12345678901234567890123456789012345678901234567890123456789012345678901234567890",
-                 "57edf4a22be3c955ac49da2e2107b67a" },
-               { NULL, NULL }
-       };
-       int i = 0;
-       char buf[33];
-
-       while (known_hashes[i].str) {
-               iks_md5 (known_hashes[i].str, buf);
-               if (strcmp (buf, known_hashes[i].hash) != 0) {
-                       printf("MD5 hash of \"%s\"\n", known_hashes[i].str);
-                       printf(" Result:   %s\n", buf);
-                       printf(" Expected: %s\n", known_hashes[i].hash);
-                       return 1;
-               }
-               i++;
-       }
-       return 0;
-}
diff --git a/libs/iksemel/test/tst-sax.c b/libs/iksemel/test/tst-sax.c
deleted file mode 100644 (file)
index c0a041a..0000000
+++ /dev/null
@@ -1,384 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#include "iksemel.h"
-
-struct element_s {
-       struct element_s *next;
-       enum ikstype type;
-
-       enum ikstagtype tag;
-       char *name;
-       int nr_atts;
-       char *atts[10];
-       char *vals[10];
-
-       char *cdata;
-       int len;
-};
-
-struct {
-       char *doc;
-       int len;
-       struct element_s *elements;
-       struct element_s *last_element;
-       struct element_s *cur;
-       int nr_tests;
-       int nr_cur;
-       int blocksize;
-} tester;
-
-void
-document (char *xml)
-{
-       if (tester.elements) {
-               struct element_s *tmp;
-               for (; tester.elements; tester.elements = tmp) {
-                       tmp = tester.elements->next;
-                       free (tester.elements);
-               }
-       }
-       tester.doc = xml;
-       tester.len = strlen (xml);
-       tester.elements = NULL;
-       tester.last_element = NULL;
-       tester.nr_tests++;
-}
-
-void
-element (enum ikstype type, ...)
-{
-       struct element_s *el;
-       va_list ap;
-       char *tmp;
-
-       el = malloc (sizeof (struct element_s));
-       memset (el, 0, sizeof (struct element_s));
-       el->type = type;
-
-       va_start (ap, type);
-       switch (type) {
-               case IKS_TAG:
-                       el->tag = va_arg (ap, int);
-                       el->name = va_arg (ap, char*);
-                       if (IKS_CLOSE == el->tag) break;
-                       while (1) {
-                               tmp = va_arg (ap, char*);
-                               if (tmp) {
-                                       el->atts[el->nr_atts] = tmp;
-                                       el->vals[el->nr_atts] = va_arg (ap, char*);
-                                       el->nr_atts++;
-                               } else {
-                                       break;
-                               }
-                       }
-                       break;
-               case IKS_CDATA:
-                       tmp = va_arg (ap, char*);
-                       el->cdata = tmp;
-                       el->len = strlen (tmp);
-                       break;
-               case IKS_NONE:
-               case IKS_ATTRIBUTE:
-                       puts ("invalid element() call");
-                       exit (1);
-       }
-       va_end (ap);
-
-       if (NULL == tester.elements) tester.elements = el;
-       if (tester.last_element) tester.last_element->next = el;
-       tester.last_element = el;
-}
-
-#define PRINT_TEST     printf ("Sax test %d, blocksize %d, element %d:\n", tester.nr_tests, tester.blocksize, tester.nr_cur)
-#define NEXT_ELEM { tester.cur = tester.cur->next; tester.nr_cur++; }
-
-void
-debug_tag (enum ikstagtype type, char *name, char **atts)
-{
-       int i;
-
-       PRINT_TEST;
-       if (tester.cur && tester.cur->type == IKS_TAG) {
-               switch (tester.cur->tag) {
-                       case IKS_OPEN:
-                               printf ("  Expecting tag <%s>\n", tester.cur->name);
-                               break;
-                       case IKS_CLOSE:
-                               printf ("  Expecting tag </%s>\n", tester.cur->name);
-                               break;
-                       case IKS_SINGLE:
-                               printf ("  Expecting tag <%s/>\n", tester.cur->name);
-                               break;
-               }
-               for (i = 0; i < tester.cur->nr_atts; i++) {
-                       printf ("    %s='%s'\n", tester.cur->atts[i], tester.cur->vals[i]);
-               }
-       } else {
-               printf ("  Not expecting a tag here.\n");
-       }
-       switch (type) {
-               case IKS_OPEN:
-                       printf ("  Got tag <%s>\n", name);
-                       break;
-               case IKS_CLOSE:
-                       printf ("  Got tag </%s>\n", name);
-                       break;
-               case IKS_SINGLE:
-                       printf ("  Got tag <%s/>\n", name);
-                       break;
-       }
-       i = 0;
-       while (atts && atts[i]) {
-               printf ("    %s='%s'\n", atts[i], atts[i+1]);
-               i += 2;
-       }
-}
-
-#define TAG_FAIL { debug_tag (type,name,atts); exit (1); }
-
-int
-tagHook (void *udata, char *name, char **atts, int type)
-{
-       int nr, i, flag;
-
-       if (!tester.cur) TAG_FAIL;
-       if (tester.cur->type != IKS_TAG) TAG_FAIL;
-       if (tester.cur->tag != type) TAG_FAIL;
-       if (iks_strcmp (tester.cur->name, name) != 0) TAG_FAIL;
-       if (!atts && tester.cur->nr_atts > 0) TAG_FAIL;
-       if (atts && tester.cur->nr_atts == 0) TAG_FAIL;
-
-       nr = tester.cur->nr_atts;
-       while (nr) {
-               flag = 0;
-               for (i = 0;atts&&atts[i]; i+= 2) {
-                       if (iks_strcmp (atts[i], tester.cur->atts[nr-1]) == 0 && iks_strcmp (atts[i+1], tester.cur->vals[nr-1]) == 0) {
-                               flag = 1;
-                               break;
-                       }
-               }
-               if (flag == 0) TAG_FAIL;
-               nr--;
-       }
-
-       NEXT_ELEM;
-       return IKS_OK;
-}
-
-void
-debug_cdata (char *data, size_t len, int pos)
-{
-       int i;
-
-       PRINT_TEST;
-       if (tester.cur && tester.cur->type == IKS_CDATA)
-               printf ("  Expecting cdata [%s]\n", tester.cur->cdata);
-       else
-               printf ("  Not expecting cdata here\n");
-       printf ("  Got cdata [");
-       for (i = 0; i < len; i++) putchar (data[i]);
-       printf ("] at the pos %d.\n", pos);
-}
-
-#define CDATA_FAIL { debug_cdata (data, len, pos); exit (1); }
-
-int
-cdataHook (void *udata, char *data, size_t len)
-{
-       static int pos = 0;
-
-       if (!tester.cur) CDATA_FAIL;
-       if (tester.cur->type != IKS_CDATA) CDATA_FAIL;
-       if (iks_strncmp (tester.cur->cdata + pos, data, len) != 0) CDATA_FAIL;
-       pos += len;
-       if (pos > tester.cur->len) CDATA_FAIL;
-       if (pos == tester.cur->len) {
-               pos = 0;
-               NEXT_ELEM;
-       }
-       return IKS_OK;
-}
-
-void
-test_size (int blocksize)
-{
-       enum ikserror err;
-       iksparser *prs;
-       int i, len;
-
-       tester.cur = tester.elements;
-       tester.nr_cur = 1;
-       tester.blocksize = blocksize;
-       len = tester.len;
-
-       prs = iks_sax_new (NULL, tagHook, cdataHook);
-       i = 0;
-       if (0 == blocksize) blocksize = len;
-       while (i < len) {
-               if (i + blocksize > len) blocksize = len - i;
-               err = iks_parse (prs, tester.doc + i, blocksize, 0);
-               switch (err) {
-                       case IKS_OK:
-                               break;
-                       case IKS_NOMEM:
-                               exit (1);
-                       case IKS_BADXML:
-                               PRINT_TEST;
-                               printf ("Invalid xml at byte %ld in\n[%s]\n", iks_nr_bytes (prs), tester.doc);
-                               exit (1);
-                       case IKS_HOOK:
-                               exit (1);
-               }
-               i += blocksize;
-       }
-       if (tester.cur) exit (1);
-       iks_parser_delete (prs);
-}
-
-void
-test (void)
-{
-       int i;
-
-       for (i = 0; i < tester.len; i++) {
-               test_size (i);
-       }
-}
-
-void
-test_bad (int badbyte)
-{
-       iksparser *p;
-       enum ikserror err;
-
-       p = iks_sax_new (NULL, NULL, NULL);
-       err = iks_parse (p, tester.doc, tester.len, 1);
-       switch (err) {
-               case IKS_OK:
-                       break;
-               case IKS_NOMEM:
-                       exit (1);
-               case IKS_BADXML:
-                       if (iks_nr_bytes (p) == badbyte) return;
-                       break;
-               case IKS_HOOK:
-                       exit (1);
-       }
-       printf ("Sax test %d:\n", tester.nr_tests);
-       printf ("Expected bad byte %d, got %ld in\n[%s]\n", badbyte, iks_nr_bytes (p), tester.doc);
-       exit (1);
-}
-
-int
-main (int argc, char *argv[])
-{
-       document ("<lonely/>");
-       element (IKS_TAG, IKS_SINGLE, "lonely", 0);
-       test ();
-
-       document ("<?xml version='1.0'?><parent><child/><child/>child</parent>");
-       element (IKS_TAG, IKS_OPEN, "parent", 0);
-       element (IKS_TAG, IKS_SINGLE, "child", 0);
-       element (IKS_TAG, IKS_SINGLE, "child", 0);
-       element (IKS_CDATA, "child");
-       element (IKS_TAG, IKS_CLOSE, "parent");
-       test ();
-
-       document ("<mytag abc='123' id=\"XC72\"></mytag>");
-       element (IKS_TAG, IKS_OPEN, "mytag", "abc", "123", "id", "XC72", 0);
-       element (IKS_TAG, IKS_CLOSE, "mytag");
-       test ();
-
-       document ("<body>I&apos;m fixing parser&amp;tester for &quot;&lt;&quot; and &quot;&gt;&quot; chars.</body>");
-       element (IKS_TAG, IKS_OPEN, "body", 0);
-       element (IKS_CDATA, "I'm fixing parser&tester for \"<\" and \">\" chars.");
-       element (IKS_TAG, IKS_CLOSE, "body");
-       test ();
-
-       document ("<tag a='1' b='2' c='3' d='4' e='5' f='6' g='7' id='xyz9'><sub></sub></tag>");
-       element (IKS_TAG, IKS_OPEN, "tag", "a", "1", "b", "2", "c", "3", "d", "4", "e", "5", "f", "6", "g", "7", "id", "xyz9", 0);
-       element (IKS_TAG, IKS_OPEN, "sub", 0);
-       element (IKS_TAG, IKS_CLOSE, "sub");
-       element (IKS_TAG, IKS_CLOSE, "tag");
-       test ();
-
-       document ("<item url='http://jabber.org'><!-- little comment -->Jabber Site</item>");
-       element (IKS_TAG, IKS_OPEN, "item", "url", "http://jabber.org", 0);
-       element (IKS_CDATA, "Jabber Site");
-       element (IKS_TAG, IKS_CLOSE, "item");
-       test ();
-
-       document ("<index><!-- <item> - tag has no childs --><item name='lala' page='42'/></index>");
-       element (IKS_TAG, IKS_OPEN, "index", 0);
-       element (IKS_TAG, IKS_SINGLE, "item", "name", "lala", "page", "42", 0);
-       element (IKS_TAG, IKS_CLOSE, "index");
-       test ();
-
-       document ("<ka>1234<![CDATA[ <ka> lala ] ]] ]]] ]]>4321</ka>");
-       element (IKS_TAG, IKS_OPEN, "ka", 0);
-       element (IKS_CDATA, "1234 <ka> lala ] ]] ]]] 4321");
-       element (IKS_TAG, IKS_CLOSE, "ka");
-       test ();
-
-       document ("<test><standalone be='happy'/>abcd<br/>&lt;escape&gt;</test>");
-       element (IKS_TAG, IKS_OPEN, "test", 0);
-       element (IKS_TAG, IKS_SINGLE, "standalone", "be", "happy", 0);
-       element (IKS_CDATA, "abcd");
-       element (IKS_TAG, IKS_SINGLE, "br", 0);
-       element (IKS_CDATA, "<escape>");
-       element (IKS_TAG, IKS_CLOSE, "test");
-       test ();
-
-       document ("<a><b>john&amp;mary<c><d e='f' g='123456' h='madcat' klm='nop'/></c></b></a>");
-       element (IKS_TAG, IKS_OPEN, "a", 0);
-       element (IKS_TAG, IKS_OPEN, "b", 0);
-       element (IKS_CDATA, "john&mary");
-       element (IKS_TAG, IKS_OPEN, "c", 0);
-       element (IKS_TAG, IKS_SINGLE, "d", "e", "f", "g", "123456", "h", "madcat", "klm", "nop", 0);
-       element (IKS_TAG, IKS_CLOSE, "c", 0);
-       element (IKS_TAG, IKS_CLOSE, "b", 0);
-       element (IKS_TAG, IKS_CLOSE, "a", 0);
-       test ();
-
-       document ("<test>\xFF</test>");
-       test_bad (6);
-
-       document ("<t\0></t>");
-       tester.len = 8;
-       test_bad (2);
-
-       document ("<a><b/><c></c/></a>");
-       test_bad (13);
-
-       document ("<e><!-- -- --></e>");
-       test_bad (10);
-
-       document ("<g><test a='123'/ b='lala'></g>");
-       test_bad (17);
-
-       document ("<ha><!-- <lala> --><!- comment -></ha>");
-       test_bad (22);
-
-       document ("<lol>&lt;<&gt;</lol>");
-       test_bad (16);
-
-       document ("<a>\xC0\x80</a>");
-       test_bad (3);
-
-       document ("<\x8F\x85></\x8F\x85>");
-       test_bad (1);
-
-       document ("<utf8>\xC1\x80<br/>\xED\x95\x9C\xEA\xB5\xAD\xEC\x96\xB4<err>\xC1\x65</err></utf8>");
-       test_bad (28);
-
-       return 0;
-}
diff --git a/libs/iksemel/test/tst-sha.c b/libs/iksemel/test/tst-sha.c
deleted file mode 100644 (file)
index ff6b3e3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "iksemel.h"
-
-int main (int argc, char *argv[])
-{
-       struct lala {
-               char *str;
-               char *hash;
-       } known_hashes[] = {
-               { "abc", "a9993e364706816aba3e25717850c26c9cd0d89d" },
-               { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-                 "84983e441c3bd26ebaae4aa1f95129e5e54670f1" },
-               { NULL, NULL }
-       };
-       int i = 0;
-       char buf[42];
-
-       while (known_hashes[i].str) {
-               iks_sha (known_hashes[i].str, buf);
-               if (strcmp (buf, known_hashes[i].hash) != 0) {
-                       printf("SHA1 hash of \"%s\"\n", known_hashes[i].str);
-                       printf(" Result:   %s\n", buf);
-                       printf(" Expected: %s\n", known_hashes[i].hash);
-                       return 1;
-               }
-               i++;
-       }
-       return 0;
-}
diff --git a/libs/iksemel/tools/Makefile.am b/libs/iksemel/tools/Makefile.am
deleted file mode 100644 (file)
index e9e71bf..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-##
-## Process this file with automake to produce Makefile.in
-##
-
-AM_CPPFLAGS = -I$(top_srcdir)/include
-
-bin_PROGRAMS = ikslint iksroster iksperf
-
-noinst_HEADERS = perf.h
-
-ikslint_LDADD = $(top_builddir)/src/libiksemel.la @SUNCFLAGS@
-ikslint_SOURCES = ikslint.c hash.c
-
-iksroster_LDADD = $(top_builddir)/src/libiksemel.la @SUNCFLAGS@
-iksroster_SOURCES = iksroster.c
-
-iksperf_LDADD = $(top_builddir)/src/libiksemel.la @SUNCFLAGS@
-iksperf_SOURCES = iksperf.c perf.c
diff --git a/libs/iksemel/tools/hash.c b/libs/iksemel/tools/hash.c
deleted file mode 100644 (file)
index c4b1179..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-static unsigned int
-hash_str (const char *str)
-{
-       const char *p;
-       unsigned int h = 0;
-
-       for (p = str; *p != '\0'; p++) {
-               h = ( h << 5 ) - h + *p;
-       }
-       return h;
-}
-
-struct item {
-       char *name;
-       unsigned int count;
-       struct item *next;
-};
-
-struct hash_s {
-       struct item **table;
-       unsigned int size;
-       unsigned int count;
-       ikstack *s;
-};
-
-typedef struct hash_s hash;
-
-hash *
-hash_new (unsigned int table_size)
-{
-       hash *h;
-
-       h = malloc (sizeof (struct hash_s));
-       if (!h) return NULL;
-       h->table = calloc (sizeof (struct item *), table_size);
-       if (!h->table) {
-               free (h);
-               return NULL;
-       }
-       h->s = iks_stack_new (sizeof (hash) * 128, 8192);
-       if (!h->s) {
-               free (h->table);
-               free (h);
-               return NULL;
-       }
-       h->size = table_size;
-       h->count = 0;
-
-       return h;
-}
-
-char *
-hash_insert (hash *h, const char *name)
-{
-       struct item *t, *p;
-       unsigned int val;
-
-       val = hash_str (name) % h->size;
-       h->count++;
-
-       for (t = h->table[val]; t; t = t->next) {
-               if (strcmp (t->name, name) == 0)
-                       break;
-       }
-       if (NULL == t) {
-               t = iks_stack_alloc (h->s, sizeof (struct item));
-               if (!t) return NULL;
-               t->name = iks_stack_strdup (h->s, name, 0);
-               t->count = 0;
-               t->next = NULL;
-               p = h->table[val];
-               if (!p) {
-                       h->table[val] = t;
-               } else {
-                       while (1) {
-                               if (p->next == NULL) {
-                                       p->next = t;
-                                       break;
-                               }
-                               p = p->next;
-                       }
-               }
-       }
-       t->count++;
-
-       return t->name;
-}
-
-static int
-my_cmp (const void *a, const void *b)
-{
-       unsigned int c1, c2;
-
-       c1 = (*(struct item **)a)->count;
-       c2 = (*(struct item **)b)->count;
-
-       if (c1 > c2)
-               return -1;
-       else if (c1 == c2)
-               return 0;
-       else
-               return 1;
-}
-
-void
-hash_print (hash *h, char *title_fmt, char *line_fmt)
-{
-       struct item **tags, *t;
-       unsigned int i = 0, pos = 0;
-
-       tags = calloc (sizeof (struct item *), h->count);
-
-       for (; i < h->size; i ++) {
-               for (t = h->table[i]; t; t = t->next) {
-                       tags[pos++] = t;
-               }
-       }
-
-       qsort (tags, pos, sizeof (struct item *), my_cmp);
-
-       printf (title_fmt, pos);
-       for (i = 0; i < pos; i++) {
-               printf (line_fmt, tags[i]->name, tags[i]->count);
-       }
-
-       free (tags);
-}
-
-void
-hash_delete (hash *h)
-{
-       iks_stack_delete (h->s);
-       free (h->table);
-       free (h);
-}
diff --git a/libs/iksemel/tools/ikslint.c b/libs/iksemel/tools/ikslint.c
deleted file mode 100644 (file)
index 0b655d2..0000000
+++ /dev/null
@@ -1,283 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-struct hash_s;
-typedef struct hash_s hash;
-
-hash *hash_new (unsigned int table_size);
-char *hash_insert (hash *table, const char *name);
-void hash_print (hash *h, char *title_fmt, char *line_fmt);
-void hash_delete (hash *table);
-
-#include <sys/stat.h>
-
-#ifdef HAVE_GETOPT_LONG
-#include <getopt.h>
-#endif
-
-#ifdef HAVE_GETOPT_LONG
-static struct option longopts[] = {
-       { "stats", 0, 0, 's' },
-       { "histogram", 0, 0, 't' },
-       { "help", 0, 0, 'h' },
-       { "version", 0, 0, 'V' },
-       { 0, 0, 0, 0 }
-};
-#endif
-
-static char *shortopts = "sthV";
-
-static void
-print_usage (void)
-{
-       puts ("Usage: ikslint [OPTIONS] FILE\n"
-               "This tool checks the well-formedness of an XML document.\n"
-               " -s, --stats      Print statistics.\n"
-               " -t, --histogram  Print tag histogram.\n"
-               " -h, --help       Print this text and exit.\n"
-               " -V, --version    Print version and exit.\n"
-#ifndef HAVE_GETOPT_LONG
-               "(long options are not supported on your system)\n"
-#endif
-               "Report bugs to <iksemel-dev@jabberstudio.org>.");
-}
-
-/* calculate and print statistics */
-int lint_pr_stats = 0;
-
-/* print tag histogram */
-int lint_pr_hist = 0;
-
-hash *tag_table;
-
-char **tag_list;
-int tag_size, tag_pos;
-
-void
-tag_push (const char *name)
-{
-       if (!tag_list) {
-               tag_size = 128;
-               tag_list = malloc (sizeof (char *) * tag_size);
-               if (!tag_list) exit (2);
-       }
-       tag_list[tag_pos] = hash_insert (tag_table, name);
-       if (!tag_list[tag_pos]) exit (2);
-       tag_pos++;
-       if (tag_pos == tag_size) {
-               char **tmp;
-               tmp = malloc (sizeof (char *) * tag_size * 2);
-               if (!tmp) exit (2);
-               memcpy (tmp, tag_list, sizeof (char *) * tag_size);
-               free (tag_list);
-               tag_list = tmp;
-               tag_size *= 2;
-       }
-}
-
-char *
-tag_pull (void)
-{
-       tag_pos--;
-       return tag_list[tag_pos];
-}
-
-struct stats {
-       unsigned int level;
-       unsigned int max_depth;
-       unsigned int nr_tags;
-       unsigned int nr_stags;
-       unsigned int cdata_size;
-};
-
-int
-tagHook (void *udata, char *name, char **atts, int type)
-{
-       struct stats *st = (struct stats *) udata;
-       char *tmp;
-
-       switch (type) {
-               case IKS_OPEN:
-                       tag_push (name);
-                       st->level++;
-                       if (st->level > st->max_depth) st->max_depth = st->level;
-                       break;
-               case IKS_CLOSE:
-                       tmp = tag_pull ();
-                       if (iks_strcmp (tmp, name) != 0) {
-                               fprintf (stderr, "Tag mismatch, expecting '%s', got '%s'.\n",
-                                       tmp, name);
-                               return IKS_HOOK;
-                       }
-                       st->level--;
-                       st->nr_tags++;
-                       break;
-               case IKS_SINGLE:
-                       if (NULL == hash_insert (tag_table, name)) exit (2);
-                       st->nr_stags++;
-                       break;
-       }
-       return IKS_OK;
-}
-
-int
-cdataHook (void *udata, char *data, size_t len)
-{
-       struct stats *st = (struct stats *) udata;
-
-       st->cdata_size += len;
-       return IKS_OK;
-}
-
-void
-check_file (char *fname)
-{
-       iksparser *prs;
-       struct stats st;
-       FILE *f;
-       char *buf;
-       struct stat fs;
-       size_t sz, blk, ret, pos;
-       enum ikserror err;
-       int done;
-
-       memset (&st, 0, sizeof (struct stats));
-       prs = iks_sax_new (&st, tagHook, cdataHook);
-       if (NULL == prs) exit (2);
-
-       if (fname) {
-               if (stat (fname, &fs) != 0) {
-                       fprintf (stderr, "Cannot access file '%s'.\n", fname);
-                       exit (1);
-               }
-               sz = fs.st_size;
-#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
-               blk = fs.st_blksize;
-#else
-               blk = 4096;
-#endif
-               f = fopen (fname, "r");
-               if (!f) {
-                       fprintf (stderr, "Cannot open file '%s'.\n", fname);
-                       exit (1);
-               }
-               buf = malloc (blk);
-               if (!buf) {
-                       fclose (f);
-                       fprintf (stderr, "Cannot allocate %d bytes.\n", blk);
-                       exit (2);
-               }
-       } else {
-               f = stdin;
-               blk = 4096;
-               sz = 0;
-               buf = malloc (blk);
-               if (!buf) exit (2);
-       }
-
-       tag_table = hash_new (367);
-       if (!tag_table) exit (2);
-
-       pos = 0;
-       done = 0;
-       while (0 == done) {
-               ret = fread (buf, 1, blk, f);
-               pos += ret;
-               if (feof (f)) {
-                       done = 1;
-               } else {
-                       if (ret != blk) {
-                               if (fname)
-                                       fprintf (stderr, "Read error in file '%s'.\n", fname);
-                               else
-                                       fprintf (stderr, "Read error in stream.\n");
-                               exit (1);
-                       }
-               }
-               err = iks_parse (prs, buf, ret, done);
-               switch (err) {
-                       case IKS_OK:
-                               break;
-                       case IKS_NOMEM:
-                               exit (2);
-                       case IKS_BADXML:
-                               if (fname)
-                                       fprintf (stderr, "Invalid xml at byte %ld, line %ld in file '%s'.\n",
-                                               iks_nr_bytes (prs), iks_nr_lines (prs), fname);
-                               else
-                                       fprintf (stderr, "Invalid xml at byte %ld, line %ld in stream.\n",
-                                               iks_nr_bytes (prs), iks_nr_lines (prs));
-                               exit (1);
-                       case IKS_HOOK:
-                               if (fname)
-                                       fprintf (stderr, "Byte %ld, line %ld in file '%s'.\n",
-                                               iks_nr_bytes (prs), iks_nr_lines (prs), fname);
-                               else
-                                       fprintf (stderr, "Byte %ld, line %ld in stream.\n",
-                                               iks_nr_bytes (prs), iks_nr_lines (prs));
-                               exit (1);
-               }
-       }
-
-       free (buf);
-       if (fname) fclose (f);
-
-       if (fname && (lint_pr_stats || lint_pr_hist)) {
-               printf ("File '%s' (%d bytes):\n", fname, sz);
-       }
-       if (lint_pr_stats) {
-               printf ("Tags: %d pairs, %d single, %d max depth.\n", st.nr_tags, st.nr_stags, st.max_depth);
-               printf ("Total size of character data: %d bytes.\n", st.cdata_size);
-       }
-       if (lint_pr_hist) {
-               hash_print (tag_table,
-                       "Histogram of %d unique tags:\n",
-                       "<%s> %d times.\n");
-       }
-       hash_delete (tag_table);
-
-       iks_parser_delete (prs);
-}
-
-int
-main (int argc, char *argv[])
-{
-       int c;
-
-#ifdef HAVE_GETOPT_LONG
-       int i;
-       while ((c = getopt_long (argc, argv, shortopts, longopts, &i)) != -1) {
-#else
-       while ((c = getopt (argc, argv, shortopts)) != -1) {
-#endif
-               switch (c) {
-                       case 's':
-                               lint_pr_stats = 1;
-                               break;
-                       case 't':
-                               lint_pr_hist = 1;
-                               break;
-                       case 'h':
-                               print_usage ();
-                               exit (0);
-                       case 'V':
-                               puts ("ikslint (iksemel) "VERSION);
-                               exit (0);
-               }
-       }
-       if (!argv[optind]) {
-               check_file (NULL);
-       } else {
-               for (; optind < argc; optind++) {
-                       check_file (argv[optind]);
-               }
-       }
-
-       return 0;
-}
diff --git a/libs/iksemel/tools/iksperf.c b/libs/iksemel/tools/iksperf.c
deleted file mode 100644 (file)
index 4bcd4b3..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-#include "perf.h"
-
-#include <sys/stat.h>
-
-#ifdef HAVE_GETOPT_LONG
-#include <getopt.h>
-#endif
-
-#ifdef HAVE_GETOPT_LONG
-static struct option longopts[] = {
-       { "all", 0, 0, 'a' },
-       { "sax", 0, 0, 's' },
-       { "dom", 0, 0, 'd' },
-       { "serialize", 0, 0, 'e' },
-       { "sha1", 0, 0, '1' },
-       { "block", required_argument, 0, 'b' },
-       { "memdbg", 0, 0, 'm' },
-       { "help", 0, 0, 'h' },
-       { "version", 0, 0, 'V' },
-       { 0, 0, 0, 0 }
-};
-#endif
-
-static char *shortopts = "asde1b:mhV";
-
-static void
-print_usage (void)
-{
-       puts ("Usage: iksperf [OPTIONS] FILE\n"
-               "This tool measures the performance of the iksemel library.\n"
-               " -a, --all         Make all tests.\n"
-               " -s, --sax         Sax test.\n"
-               " -d, --dom         Tree generating test.\n"
-               " -e, --serialize   Tree serializing test.\n"
-               " -1, --sha1        SHA1 hashing test.\n"
-               " -b, --block SIZE  Parse the file in SIZE byte blocks.\n"
-               " -m, --memdbg      Trace malloc and free calls.\n"
-               " -h, --help        Print this text and exit.\n"
-               " -V, --version     Print version and exit.\n"
-#ifndef HAVE_GETOPT_LONG
-               "(long options are not supported on your system)\n"
-#endif
-               "Report bugs to <iksemel-dev@jabberstudio.org>.");
-}
-
-/* if not 0, file is parsed in block_size byte blocks */
-int block_size;
-
-char *load_file (const char *fname, int *sizeptr)
-{
-       FILE *f;
-       char *buf;
-       struct stat fs;
-       size_t size, ret;
-
-       if (stat (fname, &fs) != 0) {
-               fprintf (stderr, "Cannot access file '%s'.\n", fname);
-               exit (1);
-       }
-       size = fs.st_size;
-
-       printf ("Test file '%s' (%d bytes):\n", fname, size);
-
-       f = fopen (fname, "rb");
-       if (!f) {
-               fprintf (stderr, "Cannot open file.\n");
-               exit (1);
-       }
-
-       buf = malloc (size);
-       if (!buf) {
-               fclose (f);
-               fprintf (stderr, "Cannot allocate %d bytes for buffer.\n", size);
-               exit (2);
-       }
-
-       ret = fread (buf, 1, size, f);
-       if (ret < size) {
-               fprintf (stderr, "Read error in file.\n");
-               exit (1);
-       }
-
-       *sizeptr = size;
-       fclose (f);
-       return buf;
-}
-
-/* stats */
-int sax_tag;
-int sax_cdata;
-
-int
-tagHook (void *udata, char *name, char **atts, int type)
-{
-       ++sax_tag;
-       return IKS_OK;
-}
-
-int
-cdataHook (void *udata, char *data, size_t len)
-{
-       ++sax_cdata;
-       return IKS_OK;
-}
-
-void
-sax_test (char *buf, int len)
-{
-       unsigned long time;
-       iksparser *prs;
-       int bs, i, err;
-
-       bs = block_size;
-       if (0 == bs) bs = len;
-       sax_tag = 0;
-       sax_cdata = 0;
-
-       t_reset ();
-
-       prs = iks_sax_new (NULL, tagHook, cdataHook);
-       i = 0;
-       while (i < len) {
-               if (i + bs > len) bs = len - i;
-               err = iks_parse (prs, buf + i, bs, 0);
-               switch (err) {
-                       case IKS_OK:
-                               break;
-                       case IKS_NOMEM:
-                               exit (2);
-                       case IKS_BADXML:
-                               fprintf (stderr, "Invalid xml at byte %ld, line %ld\n",
-                                       iks_nr_bytes (prs), iks_nr_lines (prs));
-                               exit (1);
-                       case IKS_HOOK:
-                               exit (1);
-               }
-               i += bs;
-       }
-
-       time = t_elapsed ();
-
-       printf ("SAX: parsing took %ld milliseconds.\n", time);
-       printf ("SAX: tag hook called %d, cdata hook called %d times.\n", sax_tag, sax_cdata);
-
-       iks_parser_delete (prs);
-}
-
-void dom_test (char *buf, int len)
-{
-       int bs, i, err;
-       iksparser *prs;
-       unsigned long time;
-       iks *x;
-       size_t allocated, used;
-
-       bs = block_size;
-       if (0 == bs) bs = len;
-
-       t_reset ();
-
-       prs = iks_dom_new (&x);
-       iks_set_size_hint (prs, len);
-       i = 0;
-       while (i < len) {
-               if (i + bs > len) bs = len - i;
-               err = iks_parse (prs, buf + i, bs, 0);
-               switch (err) {
-                       case IKS_OK:
-                               break;
-                       case IKS_NOMEM:
-                               exit (2);
-                       case IKS_BADXML:
-                               fprintf (stderr, "Invalid xml at byte %ld, line %ld\n",
-                                       iks_nr_bytes (prs), iks_nr_lines (prs));
-                               exit (1);
-                       case IKS_HOOK:
-                               exit (1);
-               }
-               i += bs;
-       }
-
-       time = t_elapsed ();
-       iks_stack_stat (iks_stack (x), &allocated, &used);
-
-       printf ("DOM: parsing and building the tree took %ld milliseconds.\n", time);
-       printf ("DOM: ikstack: %d bytes allocated, %d bytes used.\n", allocated, used);
-
-       t_reset ();
-       iks_delete (x);
-       time = t_elapsed ();
-       printf ("DOM: deleting the tree took %ld milliseconds.\n", time);
-
-       iks_parser_delete (prs);
-}
-
-void
-serialize_test (char *buf, int len)
-{
-       unsigned long time;
-       iks *x;
-       iksparser *prs;
-       int err;
-
-       prs = iks_dom_new (&x);
-       err = iks_parse (prs, buf, len, 1);
-       switch (err) {
-               case IKS_OK:
-                       break;
-               case IKS_NOMEM:
-                       exit (2);
-               case IKS_BADXML:
-                       fprintf (stderr, "Invalid xml at byte %ld, line %ld\n",
-                               iks_nr_bytes (prs), iks_nr_lines (prs));
-                       exit (1);
-               case IKS_HOOK:
-                       exit (1);
-       }
-       iks_parser_delete (prs);
-
-       t_reset ();
-
-       iks_string (iks_stack (x), x);
-
-       time = t_elapsed ();
-
-       printf ("Serialize: serializing the tree took %ld milliseconds.\n", time);
-
-       iks_delete (x);
-}
-
-void
-sha_test (char *buf, int len)
-{
-       unsigned long time;
-       iksha *s;
-       char out[41];
-
-       t_reset ();
-
-       s = iks_sha_new ();
-       iks_sha_hash (s, buf, len, 1);
-       iks_sha_print (s, out);
-       out[40] = '\0';
-       iks_sha_delete (s);
-
-       time = t_elapsed ();
-
-       printf ("SHA: hashing took %ld milliseconds.\n", time);
-       printf ("SHA: hash [%s]\n", out);
-}
-
-int
-main (int argc, char *argv[])
-{
-       int test_type = 0;
-       int c;
-
-#ifdef HAVE_GETOPT_LONG
-       int i;
-       while ((c = getopt_long (argc, argv, shortopts, longopts, &i)) != -1) {
-#else
-       while ((c = getopt (argc, argv, shortopts)) != -1) {
-#endif
-               switch (c) {
-                       case 'a':
-                               test_type = 0xffff;
-                               break;
-                       case 's':
-                               test_type |= 1;
-                               break;
-                       case 'd':
-                               test_type |= 2;
-                               break;
-                       case 'e':
-                               test_type |= 4;
-                               break;
-                       case '1':
-                               test_type |= 8;
-                               break;
-                       case 'b':
-                               block_size = atoi (optarg);
-                               break;
-                       case 'm':
-                               m_trace ();
-                               break;
-                       case 'h':
-                               print_usage ();
-                               exit (0);
-                       case 'V':
-                               puts ("iksperf (iksemel) "VERSION);
-                               exit (0);
-               }
-       }
-       for (; optind < argc; optind++) {
-               char *buf;
-               int len;
-
-               buf = load_file (argv[optind], &len);
-               if (test_type & 1) sax_test (buf, len);
-               if (test_type == 0 || test_type & 2) dom_test (buf, len);
-               if (test_type & 4) serialize_test (buf, len);
-               if (test_type & 8) sha_test (buf, len);
-               free (buf);
-       }
-
-       return 0;
-}
diff --git a/libs/iksemel/tools/iksroster.c b/libs/iksemel/tools/iksroster.c
deleted file mode 100644 (file)
index 7123797..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2004 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include "common.h"
-#include "iksemel.h"
-
-#ifdef HAVE_GETOPT_LONG
-#include <getopt.h>
-#endif
-
-#ifdef _WIN32
-#include <winsock.h>
-#endif
-
-#ifdef HAVE_GETOPT_LONG
-static struct option longopts[] = {
-       { "backup", required_argument, 0, 'b' },
-       { "restore", required_argument, 0, 'r' },
-       { "file", required_argument, 0, 'f' },
-       { "timeout", required_argument, 0, 't' },
-       { "secure", 0, 0, 's' },
-       { "sasl", 0, 0, 'a' },
-       { "log", 0, 0, 'l' },
-       { "help", 0, 0, 'h' },
-       { "version", 0, 0, 'V' },
-       { 0, 0, 0, 0 }
-};
-#endif
-
-static char *shortopts = "b:r:f:t:salhV";
-
-static void
-print_usage (void)
-{
-       puts ("Usage: iksroster [OPTIONS]\n"
-               "This is a backup tool for your jabber roster.\n"
-               " -b, --backup=JID    Download roster from the server.\n"
-               " -r, --restore=JID   Upload roster to the server.\n"
-               " -f, --file=FILE     Load/Save roster to this file.\n"
-               " -t, --timeout=SECS  Set network timeout.\n"
-               " -s, --secure        Use encrypted connection.\n"
-               " -a, --sasl          Use SASL authentication.\n"
-               " -l, --log           Print exchanged xml data.\n"
-               " -h, --help          Print this text and exit.\n"
-               " -V, --version       Print version and exit.\n"
-#ifndef HAVE_GETOPT_LONG
-               "(long options are not supported on your system)\n"
-#endif
-#ifndef HAVE_GNUTLS
-               "(secure connections are not supported on your system)\n"
-#endif
-               "Report bugs to <iksemel-dev@jabberstudio.org>.");
-}
-
-/* stuff we keep per session */
-struct session {
-       iksparser *prs;
-       iksid *acc;
-       char *pass;
-       int features;
-       int authorized;
-       int counter;
-       int set_roster;
-       int job_done;
-};
-
-/* precious roster we'll deal with */
-iks *my_roster;
-
-/* out packet filter */
-iksfilter *my_filter;
-
-/* connection time outs if nothing comes for this much seconds */
-int opt_timeout = 30;
-
-/* connection flags */
-int opt_use_tls;
-int opt_use_sasl;
-int opt_log;
-
-void
-j_error (char *msg)
-{
-       fprintf (stderr, "iksroster: %s\n", msg);
-       exit (2);
-}
-
-int
-on_result (struct session *sess, ikspak *pak)
-{
-       iks *x;
-
-       if (sess->set_roster == 0) {
-               x = iks_make_iq (IKS_TYPE_GET, IKS_NS_ROSTER);
-               iks_insert_attrib (x, "id", "roster");
-               iks_send (sess->prs, x);
-               iks_delete (x);
-       } else {
-               iks_insert_attrib (my_roster, "type", "set");
-               iks_send (sess->prs, my_roster);
-       }
-       return IKS_FILTER_EAT;
-}
-
-int
-on_stream (struct session *sess, int type, iks *node)
-{
-       sess->counter = opt_timeout;
-
-       switch (type) {
-               case IKS_NODE_START:
-                       if (opt_use_tls && !iks_is_secure (sess->prs)) {
-                               iks_start_tls (sess->prs);
-                               break;
-                       }
-                       if (!opt_use_sasl) {
-                               iks *x;
-
-                               x = iks_make_auth (sess->acc, sess->pass, iks_find_attrib (node, "id"));
-                               iks_insert_attrib (x, "id", "auth");
-                               iks_send (sess->prs, x);
-                               iks_delete (x);
-                       }
-                       break;
-
-               case IKS_NODE_NORMAL:
-                       if (strcmp ("stream:features", iks_name (node)) == 0) {
-                               sess->features = iks_stream_features (node);
-                               if (opt_use_sasl) {
-                                       if (opt_use_tls && !iks_is_secure (sess->prs)) break;
-                                       if (sess->authorized) {
-                                               iks *t;
-                                               if (sess->features & IKS_STREAM_BIND) {
-                                                       t = iks_make_resource_bind (sess->acc);
-                                                       iks_send (sess->prs, t);
-                                                       iks_delete (t);
-                                               }
-                                               if (sess->features & IKS_STREAM_SESSION) {
-                                                       t = iks_make_session ();
-                                                       iks_insert_attrib (t, "id", "auth");
-                                                       iks_send (sess->prs, t);
-                                                       iks_delete (t);
-                                               }
-                                       } else {
-                                               if (sess->features & IKS_STREAM_SASL_MD5)
-                                                       iks_start_sasl (sess->prs, IKS_SASL_DIGEST_MD5, sess->acc->user, sess->pass);
-                                               else if (sess->features & IKS_STREAM_SASL_PLAIN)
-                                                       iks_start_sasl (sess->prs, IKS_SASL_PLAIN, sess->acc->user, sess->pass);
-                                       }
-                               }
-                       } else if (strcmp ("failure", iks_name (node)) == 0) {
-                               j_error ("sasl authentication failed");
-                       } else if (strcmp ("success", iks_name (node)) == 0) {
-                               sess->authorized = 1;
-                               iks_send_header (sess->prs, sess->acc->server);
-                       } else {
-                               ikspak *pak;
-
-                               pak = iks_packet (node);
-                               iks_filter_packet (my_filter, pak);
-                               if (sess->job_done == 1) return IKS_HOOK;
-                       }
-                       break;
-
-               case IKS_NODE_STOP:
-                       j_error ("server disconnected");
-
-               case IKS_NODE_ERROR:
-                       j_error ("stream error");
-       }
-
-       if (node) iks_delete (node);
-       return IKS_OK;
-}
-
-int
-on_error (void *user_data, ikspak *pak)
-{
-       j_error ("authorization failed");
-       return IKS_FILTER_EAT;
-}
-
-int
-on_roster (struct session *sess, ikspak *pak)
-{
-       my_roster = pak->x;
-       sess->job_done = 1;
-       return IKS_FILTER_EAT;
-}
-
-void
-on_log (struct session *sess, const char *data, size_t size, int is_incoming)
-{
-       if (iks_is_secure (sess->prs)) fprintf (stderr, "Sec");
-       if (is_incoming) fprintf (stderr, "RECV"); else fprintf (stderr, "SEND");
-       fprintf (stderr, "[%s]\n", data);
-}
-
-void
-j_setup_filter (struct session *sess)
-{
-       if (my_filter) iks_filter_delete (my_filter);
-       my_filter = iks_filter_new ();
-       iks_filter_add_rule (my_filter, (iksFilterHook *) on_result, sess,
-               IKS_RULE_TYPE, IKS_PAK_IQ,
-               IKS_RULE_SUBTYPE, IKS_TYPE_RESULT,
-               IKS_RULE_ID, "auth",
-               IKS_RULE_DONE);
-       iks_filter_add_rule (my_filter, on_error, sess,
-               IKS_RULE_TYPE, IKS_PAK_IQ,
-               IKS_RULE_SUBTYPE, IKS_TYPE_ERROR,
-               IKS_RULE_ID, "auth",
-               IKS_RULE_DONE);
-       iks_filter_add_rule (my_filter, (iksFilterHook *) on_roster, sess,
-               IKS_RULE_TYPE, IKS_PAK_IQ,
-               IKS_RULE_SUBTYPE, IKS_TYPE_RESULT,
-               IKS_RULE_ID, "roster",
-               IKS_RULE_DONE);
-}
-
-void
-j_connect (char *jabber_id, char *pass, int set_roster)
-{
-       struct session sess;
-       int e;
-
-       memset (&sess, 0, sizeof (sess));
-       sess.prs = iks_stream_new (IKS_NS_CLIENT, &sess, (iksStreamHook *) on_stream);
-       if (opt_log) iks_set_log_hook (sess.prs, (iksLogHook *) on_log);
-       sess.acc = iks_id_new (iks_parser_stack (sess.prs), jabber_id);
-       if (NULL == sess.acc->resource) {
-               /* user gave no resource name, use the default */
-               char *tmp;
-               tmp = iks_malloc (strlen (sess.acc->user) + strlen (sess.acc->server) + 9 + 3);
-               sprintf (tmp, "%s@%s/%s", sess.acc->user, sess.acc->server, "iksroster");
-               sess.acc = iks_id_new (iks_parser_stack (sess.prs), tmp);
-               iks_free (tmp);
-       }
-       sess.pass = pass;
-       sess.set_roster = set_roster;
-
-       j_setup_filter (&sess);
-
-       e = iks_connect_tcp (sess.prs, sess.acc->server, IKS_JABBER_PORT);
-       switch (e) {
-               case IKS_OK:
-                       break;
-               case IKS_NET_NODNS:
-                       j_error ("hostname lookup failed");
-               case IKS_NET_NOCONN:
-                       j_error ("connection failed");
-               default:
-                       j_error ("io error");
-       }
-
-       sess.counter = opt_timeout;
-       while (1) {
-               e = iks_recv (sess.prs, 1);
-               if (IKS_HOOK == e) break;
-               if (IKS_NET_TLSFAIL == e) j_error ("tls handshake failed");
-               if (IKS_OK != e) j_error ("io error");
-               sess.counter--;
-               if (sess.counter == 0) j_error ("network timeout");
-       }
-       iks_parser_delete (sess.prs);
-}
-
-int
-main (int argc, char *argv[])
-{
-       char *from = NULL;
-       char *to = NULL;
-       char *file = NULL;
-       char from_pw[128], to_pw[128];
-       int c;
-#ifdef HAVE_GETOPT_LONG
-       int i;
-
-       while ((c = getopt_long (argc, argv, shortopts, longopts, &i)) != -1) {
-#else
-       while ((c = getopt (argc, argv, shortopts)) != -1) {
-#endif
-               switch (c) {
-                       case 'b':
-                               from = optarg;
-                               printf ("Password for %s: ", optarg);
-                               fflush (stdout);
-                               fgets (from_pw, 127, stdin);
-                               strtok (from_pw, "\r\n");
-                               break;
-                       case 'r':
-                               to = optarg;
-                               printf ("Password for %s: ", optarg);
-                               fflush (stdout);
-                               fgets (to_pw, 127, stdin);
-                               strtok (to_pw, "\r\n");
-                               break;
-                       case 'f':
-                               if (file) free(file);
-                               file = strdup (optarg);
-                               break;
-                       case 't':
-                               opt_timeout = atoi (optarg);
-                               if (opt_timeout < 10) opt_timeout = 10;
-                               break;
-                       case 's':
-                               if (!iks_has_tls ()) {
-                                       puts ("Cannot make encrypted connections.");
-                                       puts ("iksemel library is not compiled with GnuTLS support.");
-                                       exit (1);
-                               }
-                               opt_use_tls = 1;
-                               break;
-                       case 'a':
-                               opt_use_sasl = 1;
-                               break;
-                       case 'l':
-                               opt_log = 1;
-                               break;
-                       case 'h':
-                               print_usage ();
-                               exit (0);
-                       case 'V':
-                               puts ("iksroster (iksemel) "VERSION);
-                               exit (0);
-               }
-       }
-       if (from == NULL && to == NULL) {
-               puts ("What I'm supposed to do?");
-               print_usage ();
-               exit (1);
-       }
-       if (to && (from == NULL && file == NULL)) {
-               puts ("Store which roster?");
-               print_usage ();
-               exit (1);
-       }
-
-#ifdef _WIN32
-       WSADATA wsaData;
-       WSAStartup (MAKEWORD (1,1), &wsaData);
-#endif
-
-       if (from) {
-               j_connect (from, from_pw, 0);
-               if (file) {
-                       switch (iks_save (file, my_roster)) {
-                               case IKS_OK:
-                                       break;
-                               case IKS_FILE_NOACCESS:
-                                       j_error ("cannot write to file");
-                               default:
-                                       j_error ("file io error");
-                       }
-               }
-       } else {
-               switch (iks_load (file, &my_roster)) {
-                       case IKS_OK:
-                               break;
-                       case IKS_FILE_NOFILE:
-                               j_error ("file not found");
-                       case IKS_FILE_NOACCESS:
-                               j_error ("cannot read file");
-                       default:
-                               j_error ("file io error");
-               }
-       }
-       if (to) {
-               j_connect (to, to_pw, 1);
-       }
-
-#ifdef _WIN32
-       WSACleanup ();
-#endif
-       if (file) free(file);
-       return 0;
-}
diff --git a/libs/iksemel/tools/perf.c b/libs/iksemel/tools/perf.c
deleted file mode 100644 (file)
index ac5a848..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#ifdef _WIN32
-#include <windows.h>
-#include <limits.h>
-#else
-#include <sys/time.h>
-#endif
-
-#include "iksemel.h"
-
-/* timing functions */
-
-#ifdef _WIN32
-static DWORD start_tv;
-
-void
-t_reset (void)
-{
-       start_tv = GetTickCount ();
-}
-
-unsigned long
-t_elapsed (void)
-{
-       DWORD end_tv;
-
-       end_tv = GetTickCount ();
-       if (end_tv < start_tv)
-               return UINT_MAX - (start_tv - end_tv - 1);
-       else
-               return end_tv - start_tv;
-}
-
-#else
-static struct timeval start_tv;
-
-void
-t_reset (void)
-{
-       gettimeofday (&start_tv, NULL);
-}
-
-unsigned long
-t_elapsed (void)
-{
-       unsigned long msec;
-       struct timeval cur_tv;
-
-       gettimeofday (&cur_tv, NULL);
-       msec = (cur_tv.tv_sec * 1000) + (cur_tv.tv_usec / 1000);
-       msec -= (start_tv.tv_sec * 1000) + (start_tv.tv_usec / 1000);
-       return msec;
-}
-#endif
-
-/* memory functions */
-
-static void *
-m_malloc (size_t size)
-{
-       void *ptr = malloc (size);
-       printf ("MEM: malloc (%d) => %p\n", size, ptr);
-       return ptr;
-}
-
-static void
-m_free (void *ptr)
-{
-       printf ("MEM: free (%p)\n", ptr);
-}
-
-void
-m_trace (void)
-{
-       iks_set_mem_funcs (m_malloc, m_free);
-}
diff --git a/libs/iksemel/tools/perf.h b/libs/iksemel/tools/perf.h
deleted file mode 100644 (file)
index 04f1638..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-/* iksemel (XML parser for Jabber)
-** Copyright (C) 2000-2003 Gurer Ozen <madcat@e-kolay.net>
-** This code is free software; you can redistribute it and/or
-** modify it under the terms of GNU Lesser General Public License.
-*/
-
-void t_reset (void);
-unsigned long t_elapsed (void);
-
-void m_trace (void);
diff --git a/libs/win32/iksemel/cleancount b/libs/win32/iksemel/cleancount
deleted file mode 100644 (file)
index 56a6051..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1
\ No newline at end of file
diff --git a/libs/win32/iksemel/config.h b/libs/win32/iksemel/config.h
deleted file mode 100644 (file)
index cf035d9..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/* include/config.h.  Generated by configure.  */
-/* include/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-
-#define strcasecmp stricmp
-#define strncasecmp strnicmp
-
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <errno.h> header file. */
-#define HAVE_ERRNO_H 1
-
-/* Define to 1 if you have the `getaddrinfo' function. */
-//#define HAVE_GETADDRINFO 1
-
-/* Define to 1 if you have the `getopt_long' function. */
-//#define HAVE_GETOPT_LONG 1
-
-/* "Use libgnutls" */
-//#define HAVE_GNUTLS 
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the `wsock32' library (-lwsock32). */
-/* #undef HAVE_LIBWSOCK32 */
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if `st_blksize' is member of `struct stat'. */
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-//#define HAVE_UNISTD_H 1
-
-/* Name of package */
-#define PACKAGE "iksemel"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT ""
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME ""
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING ""
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME ""
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION ""
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define this is you want default transport */
-#define USE_DEFAULT_IO 1
-
-/* Version number of package */
-#define VERSION "1.3"
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
-   calls it, or to nothing if 'inline' is not supported under any name.  */
-#ifndef __cplusplus
-/* #undef inline */
-#endif
-
-/* Define to `unsigned' if <sys/types.h> does not define. */
-/* #undef size_t */
diff --git a/libs/win32/iksemel/iksemel.2017.vcxproj b/libs/win32/iksemel/iksemel.2017.vcxproj
deleted file mode 100644 (file)
index 38f4e4d..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectName>iksemel</ProjectName>
-    <ProjectGuid>{E727E8F6-935D-46FE-8B0E-37834748A0E3}</ProjectGuid>
-    <RootNamespace>iksemel</RootNamespace>
-    <Keyword>Win32Proj</Keyword>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>StaticLibrary</ConfigurationType>
-    <CharacterSet>Unicode</CharacterSet>
-    <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <Import Project="..\..\..\w32\openssl.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="..\..\..\w32\extlib.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="..\..\..\w32\extlib.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="..\..\..\w32\extlib.props" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-    <Import Project="..\..\..\w32\extlib.props" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup>
-    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\iksemel\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;HAVE_SSL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <WarningLevel>TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <AdditionalIncludeDirectories>..\..\iksemel\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;HAVE_SSL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <WarningLevel>TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <Midl>
-      <TargetEnvironment>X64</TargetEnvironment>
-    </Midl>
-    <ClCompile>
-      <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>..\..\iksemel\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H;HAVE_SSL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
-      <WarningLevel>TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <Midl>
-      <TargetEnvironment>X64</TargetEnvironment>
-    </Midl>
-    <ClCompile>
-      <AdditionalIncludeDirectories>..\..\iksemel\include;.;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H;HAVE_SSL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
-      <WarningLevel>TurnOffAllWarnings</WarningLevel>
-    </ClCompile>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <ClCompile Include="..\..\iksemel\src\base64.c" />
-    <ClCompile Include="..\..\iksemel\src\dom.c" />
-    <ClCompile Include="..\..\iksemel\src\filter.c" />
-    <ClCompile Include="..\..\iksemel\src\iks.c" />
-    <ClCompile Include="..\..\iksemel\src\ikstack.c" />
-    <ClCompile Include="..\..\iksemel\src\io-posix.c" />
-    <ClCompile Include="..\..\iksemel\src\jabber.c" />
-    <ClCompile Include="..\..\iksemel\src\md5.c" />
-    <ClCompile Include="..\..\iksemel\src\sax.c" />
-    <ClCompile Include="..\..\iksemel\src\sha.c" />
-    <ClCompile Include="..\..\iksemel\src\stream.c" />
-    <ClCompile Include="..\..\iksemel\src\utility.c" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="..\..\iksemel\include\common.h" />
-    <ClInclude Include="..\..\iksemel\include\config.h" />
-    <ClInclude Include="..\..\iksemel\include\finetune.h" />
-    <ClInclude Include="..\..\iksemel\include\iksemel.h" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>
\ No newline at end of file
index cecb1289bc35aff86f5427582c1a6dafe7de038b..e5a4ba2deaaaed6a5cc284e73f67a2c82be1f120 100755 (executable)
@@ -126,11 +126,6 @@ set_fs_ver () {
   sed -e "s|\(%define nonparsedversion \).*|\1$rpm_version|"  \
        freeswitch.spec > freeswitch.spec.$$
   mv freeswitch.spec.$$ freeswitch.spec
-
-  sed -e "s|\(%define nonparsedversion \).*|\1$rpm_version|"  \
-       freeswitch-config-rayo.spec > freeswitch-config-rayo.spec.$$
-  mv freeswitch-config-rayo.spec.$$ freeswitch-config-rayo.spec
-
 #%define version 1.5.16
 
 }
@@ -141,10 +136,6 @@ set_fs_release () {
     sed -e "s|\(%define release \).*|\1$release|"  \
          freeswitch.spec > freeswitch.spec.$$
     mv freeswitch.spec.$$ freeswitch.spec
-
-    sed -e "s|\(%define release \).*|\1$release|"  \
-         freeswitch-config-rayo.spec > freeswitch-config-rayo.spec.$$
-    mv freeswitch-config-rayo.spec.$$ freeswitch-config-rayo.spec
   fi
 }
 
diff --git a/scripts/ci/config-rayo.sh b/scripts/ci/config-rayo.sh
deleted file mode 100755 (executable)
index 54b77f8..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/bin/sh
-##### -*- mode:shell-script; indent-tabs-mode:nil; sh-basic-offset:2 -*-
-
-sdir="."
-[ -n "${0%/*}" ] && sdir="${0%/*}"
-. $sdir/common.sh
-
-check_pwd
-check_input_ver_build $@
-eval $(parse_version "$1")
-
-if [ -n "$rev" ]; then
-  dst_name="freeswitch-$cmajor.$cminor.$cmicro.$rev"
-else
-  dst_name="freeswitch-$cmajor.$cminor.$cmicro"
-fi
-dst_parent="/tmp/"
-dst_dir="/tmp/$dst_name"
-release="1"
-if [ $# -gt 1 ]; then
-  release="$2"
-fi
-
-(mkdir -p rpmbuild && cd rpmbuild && mkdir -p SOURCES BUILD BUILDROOT i386 x86_64 SPECS)
-
-cd $src_repo
-cp -a src_dist/*.spec rpmbuild/SPECS/ || true
-cp -a src_dist/* rpmbuild/SOURCES/ || true
-cd rpmbuild/SPECS
-set_fs_release "$release"
-cd ../../
-
-rpmbuild --define "_topdir %(pwd)/rpmbuild" \
-  --define "_rpmdir %{_topdir}" \
-  --define "_srcrpmdir %{_topdir}" \
-  -ba rpmbuild/SPECS/freeswitch-config-rayo.spec
-
-mkdir -p $src_repo/RPMS
-mv $src_repo/rpmbuild/*/freeswitch-config-rayo*.rpm $src_repo/RPMS/.
-
-cat 1>&2 <<EOF
-----------------------------------------------------------------------
-The Rayo configuration RPMs have been rolled
-----------------------------------------------------------------------
-EOF
-
index 2cc2b382e1d662de743d45e63039cb88c4d4f11b..c2c6ed70cf88ba8b8eaf1a8aec1f242411e23e75 100755 (executable)
@@ -58,7 +58,6 @@ mkdir -p ${src_repo}/../src_dist
 mv -f ${dst_name}.tar.* ${src_repo}/../src_dist
 mv -f $dst_name.zip ${src_repo}/../src_dist
 cp -f ${dst_dir}/freeswitch.spec ${src_repo}/../src_dist
-cp -f ${dst_dir}/freeswitch-config-rayo.spec ${src_repo}/../src_dist
 
 rm -rf ${dst_name}.tar $dst_dir
 
index 90608ed1edffec73a60e93187f0bf8b4134984ff..8dd8c44d4c12cb7fd2cca4d7d66fd1dd164862c4 100644 (file)
@@ -80,8 +80,6 @@ directories/mod_ldap/Win32/
 languages/mod_managed/Win32/
 /applications/mod_av/test/Makefile
 /applications/mod_av/test/Makefile.in
-/event_handlers/mod_rayo/test/Makefile
-/event_handlers/mod_rayo/test/Makefile.in
 /applications/mod_av/test/test_avformat
 /applications/mod_av/test/test_mod_av
 /languages/mod_lua/test/Makefile
index 325e8e81d74e315470770d66d70c191e234bc5c8..02ecb52ddd8226805a14c0f3a89b6896f653f192 100644 (file)
@@ -9,8 +9,6 @@ check: $(OUR_CHECK_MODULES)
 
 mod_skypopen-all: mod_gsmopen-all
 mod_gsmopen-all: mod_spandsp-all
-mod_rayo-all: mod_ssml-all
-mod_ssml-all: mod_rayo-all
 
 $(OUR_MODULES) $(OUR_CLEAN_MODULES) $(OUR_INSTALL_MODULES) $(OUR_UNINSTALL_MODULES) $(OUR_DISABLED_MODULES) $(OUR_DISABLED_CLEAN_MODULES) $(OUR_DISABLED_INSTALL_MODULES) $(OUR_DISABLED_UNINSTALL_MODULES) $(OUR_TEST_MODULES) $(OUR_CHECK_MODULES):
        @set fnord $$MAKEFLAGS; amf=$$2; \
index ce76dc66f5d0197da76fa7d277ca9617b13e9cce..8fd583d4e65e136be643829bdf7551c2f7665a5a 100644 (file)
@@ -7,7 +7,6 @@
         <load module="mod_sndfile"/>
         <load module="mod_loopback"/>
         <load module="mod_dptools"/>
-        <load module="mod_ssml"/>
         <load module="mod_tone_stream"/>
         <load module="mod_conference"/>
         <load module="mod_commands"/>
diff --git a/src/mod/event_handlers/mod_rayo/Makefile.am b/src/mod/event_handlers/mod_rayo/Makefile.am
deleted file mode 100644 (file)
index a9ca95d..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-include $(top_srcdir)/build/modmake.rulesam
-MODNAME=mod_rayo
-
-IKS_DIR=$(switch_srcdir)/libs/iksemel
-IKS_BUILDDIR=$(switch_builddir)/libs/iksemel
-IKS_LA=$(IKS_BUILDDIR)/src/libiksemel.la
-
-noinst_LTLIBRARIES = librayomod.la
-librayomod_la_SOURCES = mod_rayo.c iks_helpers.c nlsml.c rayo_components.c rayo_cpa_component.c rayo_cpa_detector.c rayo_elements.c rayo_fax_components.c
-librayomod_la_SOURCES += rayo_input_component.c rayo_output_component.c rayo_prompt_component.c rayo_record_component.c sasl.c srgs.c xmpp_streams.c rayo_exec_component.c
-librayomod_la_CFLAGS = $(AM_CFLAGS) -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS)
-
-mod_LTLIBRARIES = mod_rayo.la
-mod_rayo_la_SOURCES  = 
-mod_rayo_la_CFLAGS   = $(AM_CFLAGS) -I$(IKS_DIR)/include $(PCRE_CFLAGS)
-mod_rayo_la_LIBADD   = $(switch_builddir)/libfreeswitch.la $(IKS_LA) $(PCRE_LIBS) librayomod.la
-mod_rayo_la_LDFLAGS  = -avoid-version -module -no-undefined -shared
-
-BUILT_SOURCES=$(IKS_LA)
-
-$(IKS_LA): $(IKS_BUILDDIR) $(IKS_DIR) $(IKS_DIR)/.update
-       @cd $(IKS_BUILDDIR) && $(MAKE)
-       @$(TOUCH_TARGET)
-
-noinst_PROGRAMS = test/test_iks test/test_nlsml test/test_srgs
-
-test_test_iks_SOURCES = test/test_iks.c
-test_test_iks_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
-test_test_iks_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
-test_test_iks_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS) $(switch_builddir)/libfreeswitch.la
-
-test_test_nlsml_SOURCES = test/test_nlsml.c
-test_test_nlsml_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
-test_test_nlsml_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
-test_test_nlsml_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS) $(switch_builddir)/libfreeswitch.la
-
-test_test_srgs_SOURCES = test/test_srgs.c
-test_test_srgs_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
-test_test_srgs_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
-test_test_srgs_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS) $(switch_builddir)/libfreeswitch.la
-
-
-TESTS = $(noinst_PROGRAMS)
-
diff --git a/src/mod/event_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml b/src/mod/event_handlers/mod_rayo/conf/autoload_configs/rayo.conf.xml
deleted file mode 100644 (file)
index 9f525c5..0000000
+++ /dev/null
@@ -1,315 +0,0 @@
-<configuration name="rayo.conf" description="Rayo server config">
-
-       <!-- rayo params -->
-       <settings>
-               <!-- ends idle calls : unbridged calls that have not been controlled by client in some time -->
-               <param name="max-idle-sec" value="300"/>
-               <!-- conference profile to use for mixers- sla = shared line appearance / conference /w no audio -->
-               <param name="mixer-conf-profile" value="sla"/>
-               <!-- if true, to attribute in offer uses URI instead of name/number -->
-               <param name="offer-uri" value="true"/>
-               <!-- how offers are distributed to clients (all, first, random). -->
-               <param name="offer-algorithm" value="all"/>
-               <!-- If offer is not answered after timeout, next client is offered (based on algorithm picked).
-                    If no other clients are available, the call is rejected.  Set to 0 to disable -->
-               <param name="offer-timeout-ms" value="5000"/>
-               <!-- if true, channel variables are added to rayo client offer -->
-               <param name="add-variables-to-offer" value="false"/>
-                <!-- if true, channel variables are added to offer, ringing, answered, and end events sent to rayo clients -->
-               <param name="add-variables-to-events" value="false"/>
-       </settings>
-
-       <!-- record component params -->
-       <record>
-               <param name="record-file-prefix" value="$${recordings_dir}/"/>
-       </record>
-
-       <!-- input component params -->
-       <input>
-               <param name="default-recognizer" value="pocketsphinx"/>
-       </input>
-
-       <!-- send/receivefax component params -->
-       <fax>
-               <!-- where to store incoming faxes -->
-               <param name="receivefax-file-prefix" value="/tmp/"/>
-       </fax>
-
-       <!-- Call progress analysis configuration -->
-       <!-- Define CPA detectors.  These are sources for Rayo CPA signal events -->
-       <!-- Detectors must fire an event that can be translated by mod_rayo into a CPA signal event -->
-       <cpa>
-               <!-- map DTMF events to CPA -->
-               <detector name="core_dtmf_event">
-                       <event class="DTMF" value-header="DTMF-Digit" duration-header="DTMF-Duration">
-                               <signal-type value="dtmf"/>
-                       </event>
-               </detector>
-
-               <!-- map mod_spandsp fax detector to the Rayo CPA events. Fires DETECTED_FAX_* event once and quits. -->
-               <detector name="mod_spandsp_fax_ced">
-                       <start application="spandsp_start_fax_detect" data="event 'Event-Name=CUSTOM,Event-Subclass=DETECTED_FAX_CED' 500 ced"/>
-                       <stop application="spandsp_stop_fax_detect" data=""/>
-                       <event class="CUSTOM" subclass="DETECTED_FAX_CED">
-                               <signal-type value="fax-ced"/>
-                       </event>
-               </detector>
-
-               <detector name="mod_spandsp_fax_cng">
-                       <start application="spandsp_start_fax_detect" data="event 'Event-Name=CUSTOM,Event-Subclass=DETECTED_FAX_CNG' 500"/>
-                       <stop application="spandsp_stop_fax_detect" data=""/>
-                       <event class="CUSTOM" subclass="DETECTED_FAX_CNG">
-                               <signal-type value="fax-cng"/>
-                       </event>
-               </detector>
-
-               <!-- map mod_spandsp call progress tone detector to Rayo CPA signal events.  Fires DETECTED_TONE events until stopped. -->
-               <detector name="mod_spandsp_tone">
-                       <start application="spandsp_start_tone_detect" data="1"/>
-                       <stop application="spandsp_stop_tone_detect" data=""/>
-                       <!-- map tone events to Rayo CPA signal type -->
-                       <event class="DETECTED_TONE" type-header="Detected-Tone">
-                               <signal-type header-value="SIT" value="sit"/>
-                               <signal-type header-value="BUSY_TONE" value="busy"/>
-                               <signal-type header-value="REORDER_TONE" value="congestion"/>
-                               <signal-type header-value="RING_TONE" value="ring"/>
-                       </event>
-               </detector>
-
-               <!-- map mod_avmd detector to Rayo CPA beep event.  Fires avmd::beep event once. -->
-               <detector name="mod_avmd">
-                       <start application="avmd" data=""/>
-                       <stop application="avmd" data="stop"/>
-                       <event class="CUSTOM" subclass="avmd::beep">
-                               <signal-type value="beep"/>
-                       </event>
-               </detector>
-
-               <!-- Alternative beep detector using mod_vmd.  Fires vmd::beep events until stopped. -->
-               <!--detector name="mod_vmd">
-                       <start application="vmd" data=""/>
-                       <stop application="vmd" data="stop"/>
-                       <event class="CUSTOM" subclass="vmd::beep">
-                               <signal-type value="beep"/>
-                       </event>
-               </detector-->
-       </cpa>
-
-       <!-- XMPP server domain -->
-       <domain name="$${rayo_domain_name}" shared-secret="ClueCon">
-       <!-- use this instead if you want secure XMPP client to server connections.  Put .crt and .key file in freeswitch/certs -->
-       <!--domain name="$${rayo_domain_name}" shared-secret="ClueCon" cert="$${base_dir}/certs/$${rayo_domain_name}.crt" key="$${base_dir}/certs/$${rayo_domain_name}.key"-->
-
-               <!-- Listeners for new Rayo client connections -->
-               <!--listen type="c2s" port="5222" address="$${local_ip_v4}" acl="rayo-clients"/-->
-               <listen type="c2s" port="5222" address="$${rayo_ip}" acl=""/>
-
-               <!-- Listeners for new server connections -->
-               <!--listen type="s2s" port="5269" address="$${local_ip_v4}" acl="rayo-servers"/-->
-
-               <!-- servers to connect to -->
-               <!--connect port="5269" address="node.example.com" domain="example.com"/-->
-
-               <!-- Authorized users -->
-               <users>
-                       <user name="usera" password="1"/>
-               </users>
-       </domain>
-
-       <!-- URI mapping to endpoint / gateway -->
-       <dial-gateways>
-               <dial-gateway uriprefix="default" dialprefix="sofia/gateway/outbound/" strip="0"/>
-               <dial-gateway uriprefix="sip:" dialprefix="sofia/external/" strip="0"/>
-               <dial-gateway uriprefix="tel:" dialprefix="sofia/gateway/outbound/" strip="4"/>
-               <!-- pass through user and sofia unaltered -->
-               <dial-gateway uriprefix="user/" dialprefix="" strip=""/>
-               <dial-gateway uriprefix="sofia/" dialprefix="" strip=""/>
-               <dial-gateway uriprefix="loopback/" dialprefix="" strip=""/>
-       </dial-gateways>
-
-       <!-- IQ request aliases.  Used mainly for testing purposes or for controlling a rayo call via the console -->
-       <aliases>
-               <alias name="detect" target="call" args="1"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:$1:1"/></input>]]></alias>
-               <alias name="detect-once" target="call" args="1"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:$1:1?terminate=true"/></input>]]></alias>
-               <alias name="detect-tones" target="call"><![CDATA[<input xmlns="urn:xmpp:rayo:input:1" mode="cpa"><grammar url="urn:xmpp:rayo:cpa:busy:1"/><grammar url="urn:xmpp:rayo:cpa:congestion:1"/><grammar url="urn:xmpp:rayo:cpa:sit:1"/></input>]]></alias>
-               <alias name="ping" target="external"><![CDATA[<iq type="get"><ping xmlns="urn:xmpp:ping"/></iq>]]></alias>
-               <alias name="dial" target="server" args="2"><![CDATA[<dial xmlns="urn:xmpp:rayo:1" from="$1" to="$2"/>]]></alias>
-               <alias name="answer" target="call"><![CDATA[<answer xmlns="urn:xmpp:rayo:1"/>]]></alias>
-               <alias name="hangup" target="call"><![CDATA[<hangup xmlns="urn:xmpp:rayo:1"/>]]></alias>
-               <alias name="join" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" call-uri="xmpp:$1"/>]]></alias>
-               <alias name="join_mixer_duplex" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="duplex"/>]]></alias>
-               <alias name="join_mixer_send" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="send"/>]]></alias>
-               <alias name="join_mixer_recv" target="call" args="1"><![CDATA[<join xmlns="urn:xmpp:rayo:1" mixer-name="$1" direction="recv"/>]]></alias>
-               <alias name="unjoin_mixer" target="call" args="1"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1" mixer-name="$1"/>]]></alias>
-               <alias name="unjoin" target="call"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1"/>]]></alias>
-               <alias name="unjoin_call" target="call" args="1"><![CDATA[<unjoin xmlns="urn:xmpp:rayo:1" call-uri="xmpp:$1"/>]]></alias>
-               <alias name="stop" target="component"><![CDATA[<stop xmlns="urn:xmpp:rayo:ext:1"/>]]></alias>
-               <alias name="output_bad" target="call"><![CDATA[<output xmlns="urn:xmpp:rayo:output:1" repeat-time="100"></output>]]></alias>
-               <alias name="pause" target="output"><![CDATA[<pause xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="resume" target="output"><![CDATA[<resume xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="speed-up" target="output"><![CDATA[<speed-up xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="speed-down" target="output"><![CDATA[<speed-down xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="volume-up" target="output"><![CDATA[<volume-up xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="volume-down" target="output"><![CDATA[<volume-down xmlns="urn:xmpp:rayo:output:1"/>]]></alias>
-               <alias name="receivefax" target="call"><![CDATA[<receivefax xmlns="urn:xmpp:rayo:fax:1"/>]]></alias>
-               <alias name="sendfax" target="call" args="1"><![CDATA[<sendfax xmlns="urn:xmpp:rayo:fax:1"><document xmlns="urn:xmpp:rayo:fax:1" url="$1"/></sendfax>]]></alias>
-               <alias name="record" target="call"><![CDATA[<record xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
-               <alias name="record_pause" target="record"><![CDATA[<pause xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
-               <alias name="record_resume" target="record"><![CDATA[<resume xmlns="urn:xmpp:rayo:record:1"/>]]></alias>
-               <alias name="prompt_barge" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="5">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_no_barge" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="false">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="5">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_long" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_multi_digit" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_terminator" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_input_bad" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-times="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="prompt_output_bad" target="call">
-                       <![CDATA[
-                               <prompt xmlns="urn:xmpp:rayo:prompt:1" barge-in="true">
-                                       <output xmlns="urn:xmpp:rayo:output:1" repeat-time="100">
-                                               <document content-type="application/ssml+xml">
-                                                       <![CDATA[<speak><p>Please press a digit.</p></speak>]]]]><![CDATA[>
-                                               </document>
-                                       </output>
-                                       <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000" terminator="#">
-                                               <grammar content-type="application/srgs+xml">
-                                                       <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><item repeat="1-4"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></item></rule></grammar>]]]]><![CDATA[>
-                                               </grammar>
-                                       </input>
-                               </prompt>
-                       ]]>
-               </alias>
-               <alias name="input" target="call">
-                       <![CDATA[
-                               <input xmlns="urn:xmpp:rayo:input:1" mode="dtmf" initial-timeout="5000" inter-digit-timeout="3000">
-                                       <grammar content-type="application/srgs+xml">
-                                               <![CDATA[<grammar mode="dtmf"><rule id="digit" scope="public"><one-of><item>0</item><item>1</item><item>2</item><item>3</item><item>4</item><item>5</item><item>6</item><item>7</item><item>8</item><item>9</item></one-of></rule></grammar>]]]]><![CDATA[>
-                                       </grammar>
-                               </input>
-                       ]]>
-               </alias>
-
-               <alias name="input_voice_yesno_pocketsphinx" target="call">
-                       <![CDATA[
-                               <input xmlns="urn:xmpp:rayo:input:1" mode="voice" recognizer="pocketsphinx" max-silence="5000" initial-timeout="5000">
-                                       <grammar content-type="application/srgs+xml>
-                                       <![CDATA[
-                                               <grammar xmlns="http://www.w3.org/2001/06/grammar"
-                                                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                                                       xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
-                                                       xml:lang="en-US" version="1.0">
-                                                               <rule id="yesno"><one-of><item>yes</item><item>no</item></one-of></rule></grammar>
-                                       ]]]]><![CDATA[>
-                                       </grammar>
-                               </input>
-                       ]]>
-               </alias>
-
-               <alias name="input_voice_yesno_default" target="call">
-                       <![CDATA[
-                               <input xmlns="urn:xmpp:rayo:input:1" mode="voice" max-silence="5000" initial-timeout="5000">
-                                       <grammar content-type="application/srgs+xml>
-                                       <![CDATA[
-                                               <grammar xmlns="http://www.w3.org/2001/06/grammar"
-                                                       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-                                                       xsi:schemaLocation="http://www.w3.org/2001/06/grammar http://www.w3.org/TR/speech-grammar/grammar.xsd"
-                                                       xml:lang="en-US" version="1.0">
-                                                               <rule id="yesno"><one-of><item>yes</item><item>no</item></one-of></rule></grammar>
-                                       ]]]]><![CDATA[>
-                                       </grammar>
-                               </input>
-                       ]]>
-               </alias>
-
-       </aliases>
-
-</configuration>
diff --git a/src/mod/event_handlers/mod_rayo/gateway/README b/src/mod/event_handlers/mod_rayo/gateway/README
deleted file mode 100644 (file)
index 18c4f4b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-# Still a work in progress...
-
-# Compile on CentOS 6.4
-erlc -I /usr/lib64/ejabberd/include mod_rayo_gateway.erl
-
-# Install in ejabberd
-cp mod_rayo_gateway.beam /usr/lib64/ejabberd/ebin/
-
-vi /etc/ejabberd/ejabberd.cfg
-      %%
-      %% Modules enabled in all ejabberd virtual hosts
-      %%
-      {modules,
-       [
-        ...
-       {mod_rayo_gateway,[]},
-        ...
-       ]}.
-
-ejabberdctl debug
-(ejabberd@jabber)1> l(mod_rayo_gateway).
-{module,mod_rayo_gateway}
-(ejabberd@jabber)2>
-
diff --git a/src/mod/event_handlers/mod_rayo/gateway/mod_rayo_gateway.erl b/src/mod/event_handlers/mod_rayo/gateway/mod_rayo_gateway.erl
deleted file mode 100644 (file)
index 72bcd48..0000000
+++ /dev/null
@@ -1,759 +0,0 @@
-%%
-%% Copyright (c) 2013 Grasshopper
-%%
-%% Permission is hereby granted, free of charge, to any person obtaining a copy
-%% of this software and associated documentation files (the "Software"), to deal
-%% in the Software without restriction, including without limitation the rights
-%% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-%% copies of the Software, and to permit persons to whom the Software is
-%% furnished to do so, subject to the following conditions:
-%% 
-%% The above copyright notice and this permission notice shall be included in
-%% all copies or substantial portions of the Software.
-%% 
-%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-%% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-%% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-%% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-%% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-%% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-%% THE SOFTWARE.
-%%
-%% Contributors:
-%%   Chris Rienzo <chris.rienzo@grasshopper.com>
-%%
-%% Maintainer: Chris Rienzo <chris.rienzo@grasshopper.com>
-%%
-%% mod_rayo_gateway.erl -- ejabberd Rayo gateway module
-%%
--module(mod_rayo_gateway).
-
--include("ejabberd.hrl").
--include("jlib.hrl").
-
--behavior(gen_server).
--behavior(gen_mod).
-
-%%  JID mappings
-%%
-%%  Entity          Internal JID                     Mapped JID
-%%  ======          ===============                  ===============
-%%  Client          user@domain/resource             gateway@internal_domain/gw-resource
-%%  Node            node_domain                      external_domain
-%%  Call            uuid@node_domain                 node_domain|uuid@external_domain
-%%  Call Resource   uuid@node_domain/resource        node_domain|uuid@external_domain/resource
-%%  Mixer           name@node_domain                 node_domain|name@external_domain
-%%  Mixer Resource  name@node_domain/resource        node_domain|name@external_domain/resource
-
-%% TODO don't allow nodes to act as clients
-%% TODO don't allow clients to act as nodes
-
--export([
-       start_link/2,
-       start/2,
-       stop/1,
-       init/1,
-       handle_call/3,
-       handle_cast/2,
-       handle_info/2,
-       terminate/2,
-       code_change/3,
-       route_internal/3,
-       route_external/3
-]).
-
--define(PROCNAME, ejabberd_mod_rayo_gateway).
--define(NS_RAYO, "urn:xmpp:rayo:1").
--define(NS_PING, "urn:xmpp:ping").
-
--record(rayo_config, {name, value}).
--record(rayo_clients, {jid, status}).
--record(rayo_nodes, {jid, status}).
--record(rayo_entities, {external_jid, internal_jid, dcp_jid, type}).
-
-start_link(Host, Opts) ->
-       Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
-       gen_server:start_link({local, Proc}, ?MODULE, [Host, Opts], []).
-
-% Start the module process
-start(Host, Opts) ->
-       Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
-       ChildSpec = {Proc,
-               {?MODULE, start_link, [Host, Opts]},
-               temporary,
-               1000,
-               worker,
-               [?MODULE]},
-       supervisor:start_child(ejabberd_sup, ChildSpec).
-
-% Shutdown the module
-stop(Host) ->
-       Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
-       gen_server:call(Proc, stop),
-       supervisor:terminate_child(ejabberd_sup, Proc),
-       supervisor:delete_child(ejabberd_sup, Proc).
-
-% Initialize the module
-init([Host, Opts]) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: Starting", []),
-
-       mnesia:delete_table(rayo_clients),
-       mnesia:create_table(rayo_clients, [{attributes, record_info(fields, rayo_clients)}]),
-       mnesia:delete_table(rayo_nodes),
-       mnesia:create_table(rayo_nodes, [{attributes, record_info(fields, rayo_nodes)}]),
-       mnesia:delete_table(rayo_entities),
-       mnesia:create_table(rayo_entities, [{attributes, record_info(fields, rayo_entities)}, {index, [internal_jid]}]),
-       mnesia:delete_table(rayo_config),
-       mnesia:create_table(rayo_config, [{attributes, record_info(fields, rayo_config)}]),
-
-       {A1,A2,A3} = now(),
-       random:seed(A1, A2, A3),
-
-       % create virtual domains
-       InternalDomain = gen_mod:get_opt_host(Host, Opts, "rayo-int.@HOST@"),
-       ExternalDomain = gen_mod:get_opt_host(Host, Opts, "rayo.@HOST@"),
-       {ok, Hostname} = inet:gethostname(),
-       InternalClient = "gateway@" ++ InternalDomain ++ "/" ++ Hostname ++ "-" ++ integer_to_list(random:uniform(65535)),
-       ?DEBUG("MOD_RAYO_GATEWAY: InternalDomain = ~p, ExternalDomain = ~p, InternalClient = ~p", [InternalDomain, ExternalDomain, InternalClient]),
-       mnesia:transaction(
-               fun() ->
-                       mnesia:write(#rayo_config{name = "internal_domain", value = InternalDomain}),
-                       mnesia:write(#rayo_config{name = "internal_client", value = InternalClient}),
-                       mnesia:write(#rayo_config{name = "external_domain", value = ExternalDomain})
-               end
-       ),
-
-       % set up routes to virtual domains
-       ejabberd_router:register_route(InternalDomain, {apply, ?MODULE, route_internal}),
-       ejabberd_router:register_route(ExternalDomain, {apply, ?MODULE, route_external}),
-       {ok, Host}.
-
-handle_call(stop, _From, Host) ->
-       {stop, normal, ok, Host}.
-
-handle_cast(_Msg, Host) ->
-       {noreply, Host}.
-
-handle_info(_Msg, Host) ->
-       {noreply, Host}.
-
-terminate(_Reason, Host) ->
-       ejabberd_router:unregister_route(Host),
-       ok.
-
-code_change(_OldVsn, Host, _Extra) ->
-       {ok, Host}.
-
-register_rayo_node(Jid) ->
-       Write = fun() ->
-               mnesia:write(#rayo_nodes{jid = Jid, status = "online" })
-       end,
-       Result = mnesia:transaction(Write),
-       ?DEBUG("MOD_RAYO_GATEWAY: register node: ~p, result = ~p, ~p nodes total", [jlib:jid_to_string(Jid), Result, num_rayo_nodes()]),
-       case num_clients() >= 1 of
-               true ->
-                       ejabberd_router:route(internal_client(), Jid, online_presence());
-               _ ->
-                       ok
-       end,
-       ok.
-
-% TODO call this when s2s connection is dropped
-unregister_rayo_node(Jid) ->
-       Delete = fun() ->
-               mnesia:delete({rayo_nodes, Jid})
-       end,
-       Result = mnesia:transaction(Delete),
-       Size = mnesia:table_info(rayo_nodes, size),
-       ?DEBUG("MOD_RAYO_GATEWAY: unregister node: ~p, result = ~p, ~p nodes total", [jlib:jid_to_string(Jid), Result, Size]),
-       ok.
-
-% Add client
-register_rayo_client(Jid) ->
-       Write = fun() ->
-               mnesia:write(#rayo_clients{jid = Jid, status = "online" })
-       end,
-       Result = mnesia:transaction(Write),
-       Size = num_clients(),
-       ?DEBUG("MOD_RAYO_GATEWAY: register client: ~p, result = ~p, ~p clients total", [jlib:jid_to_string(Jid), Result, Size]),
-       case Size of
-               1 ->
-                       route_to_list(internal_client(), all_rayo_nodes(), online_presence());
-               _ ->
-                       ok
-       end,
-       ok.
-
-% Remove client
-% TODO call this when c2s connection is dropped
-unregister_rayo_client(Jid) ->
-       Delete = fun() ->
-               mnesia:delete({rayo_clients, Jid})
-       end,
-       Result = mnesia:transaction(Delete),
-       Size = num_clients(),
-       ?DEBUG("MOD_RAYO_GATEWAY: unregister client: ~p, result = ~p, ~p clients total", [jlib:jid_to_string(Jid), Result, Size]),
-       case Size of
-               0 ->
-                       route_to_list(internal_client(), all_rayo_nodes(), offline_presence());
-               _ ->
-                       ok
-       end,
-       ok.
-
-% Add node entity
-register_rayo_node_entity(ExtJid, IntJid, DcpJid, Type) ->
-       Write = fun() ->
-               mnesia:write(#rayo_entities{external_jid = ExtJid, internal_jid = IntJid, dcp_jid = DcpJid, type = Type})
-       end,
-       Result = mnesia:transaction(Write),
-       Size = mnesia:table_info(rayo_entities, size),
-       ?DEBUG("MOD_RAYO_GATEWAY: register entity: ~p, result = ~p, ~p entities total", [jlib:jid_to_string(ExtJid), Result, Size]),
-       ok.
-
-% Remove node entity
-unregister_rayo_node_entity(ExtJid) ->
-       Delete = fun() ->
-               mnesia:delete({rayo_entities, ExtJid})
-       end,
-       Result = mnesia:transaction(Delete),
-       Size = mnesia:table_info(rayo_entities, size),
-       ?DEBUG("MOD_RAYO_GATEWAY: unregister entity: ~p, result = ~p, ~p entities total", [jlib:jid_to_string(ExtJid), Result, Size]),
-       ok.
-
-% find node entity given enitity's (or its component's) internal JID
-find_rayo_node_entity_by_int_jid(IntJid) ->
-       % remove resource from JID to find component's parent call/mixer
-       case mnesia:dirty_index_read(rayo_entities, jlib:jid_remove_resource(IntJid), #rayo_entities.internal_jid) of
-               [Entity | _] ->
-                       Entity;
-               _ ->
-                       none
-       end.
-
-% find node entity given enitity's (or its component's) external JID
-find_rayo_node_entity_by_ext_jid(ExtJid) ->
-       % remove resource from JID to find component's parent call/mixer
-       case mnesia:dirty_read(rayo_entities, jlib:jid_remove_resource(ExtJid)) of
-               [Entity | _] ->
-                       Entity;
-               _ ->
-                       none
-       end.
-
-% find entity Definitive Controlling Party JID given entity external JID
-find_rayo_node_entity_dcp_by_ext_jid(ExtJid) ->
-       case find_rayo_node_entity_by_ext_jid(ExtJid) of
-               {rayo_entities, _, _, DcpJid, _} ->
-                       DcpJid;
-               _ ->
-                       none
-       end.
-
-% find entity Definitive Controlling Party JID given entity internal JID
-find_rayo_node_entity_dcp_by_int_jid(IntJid) ->
-       case find_rayo_node_entity_by_int_jid(IntJid) of
-               {rayo_entities, _, _, DcpJid, _} ->
-                       DcpJid;
-               _ ->
-                       none
-       end.
-
-% create External JID from Internal JID
-% intnode@intdomain/resource -> intdomain-intnode@extdomain/resource
-create_external_jid({jid, Node, Domain, Resource, _, _, _}) ->
-       jlib:make_jid(Domain ++ "|" ++ Node, jlib:jid_to_string(external_domain()), Resource).
-
-% create Internal JID from External JID
-% intdomain-intnode@extdomain/resource -> intnode@intdomain/resource
-create_internal_jid({jid, Node, _Domain, Resource, _, _, _}) ->
-       % TODO use rayo_entities to lookup node... it's safer
-       Idx = string:str(Node, "|"),
-       case Idx > 0 of
-               true ->
-                       jlib:make_jid(string:substr(Node, Idx + 1), string:substr(Node, 1, Idx - 1), Resource);
-               false ->
-                       none
-       end.
-
-% Take control of entity
-% Return {true, internal entity JID} if successful
-set_entity_dcp(PcpJid, EntityJid) ->
-       SetDcp = fun() ->
-               case mnesia:wread(rayo_entities, EntityJid) of
-                       [{rayo_entities, EntityJid, InternalJid, none, Type}] ->
-                               % take control
-                               case mnesia:write(#rayo_entities{external_jid = EntityJid, internal_jid = InternalJid, dcp_jid = PcpJid, type = Type}) of
-                                       ok ->
-                                               {true, InternalJid};
-                                       Else ->
-                                               {error, Else}
-                               end;
-                       _ ->
-                               {false, []}
-               end
-       end,
-       {_, Result} = mnesia:transaction(SetDcp),
-       Result.
-
-% Check if PCP has control of entity
-% Return {true, internal entity JID} if true
-is_entity_dcp(PcpJid, EntityJid) ->
-       % quick check first
-       case mnesia:dirty_read(rayo_entities, EntityJid) of
-               [{rayo_entities, EntityJid, _, none, _}] ->
-                       % take control
-                       set_entity_dcp(PcpJid, EntityJid);
-               [{rayo_entities, EntityJid, InternalJid, PcpJid, _}] ->
-                       {true, InternalJid};
-               [{rayo_entities, EntityJid, InternalJid, _, _}] ->
-                       {false, InternalJid};
-               [] ->
-                       ?DEBUG("MOD_RAYO_GATEWAY: no match for EntityJid ~p", [EntityJid]),
-                       {false, none}
-       end.
-
-% Handle presence to external domain
-route_external(From, {jid, [], _Domain, [], [], _LDomain, []} = To, {xmlelement, "presence", _Attrs, _Els} = Presence) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got client presence ~n~p", [Presence]),
-       route_client_presence(From, To, Presence),
-       ok;
-
-% Handle presence to external domain resource
-route_external(From, To, {xmlelement, "presence", _Attrs, _Els} = Presence) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got client presence to mixer ~n~p", [Presence]),
-       % TODO check if actually being sent to mixer...
-       route_client_presence_to_mixer(From, To, Presence),
-       ok;
-
-% Handle <message> to external domain
-route_external(_From, _To, {xmlelement, "message", _Attrs, _Els} = Message) ->
-       % ignore
-       ?DEBUG("MOD_RAYO_GATEWAY: got client message ~n~p", [Message]),
-       ok;
-
-% Handle <iq> to external domain
-route_external(From, {jid, [], _Domain, [], [], _LDomain, []} = To, {xmlelement, "iq", _Attrs, _Els} = IQ) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got client iq to gateway ~n~p", [IQ]),
-       case get_attribute_as_list(IQ, "type", "") of
-               "get" ->
-                       case get_element(IQ, ?NS_PING, "ping") of
-                               undefined ->
-                                       route_error_reply(To, From, IQ, ?ERR_BAD_REQUEST);
-                               _ ->
-                                       route_result_reply(To, From, IQ)
-                       end;
-               "set" ->
-                       case get_element(IQ, ?NS_RAYO, "dial") of
-                               undefined->
-                                       route_error_reply(To, From, IQ, ?ERR_BAD_REQUEST);
-                               _ ->
-                                       route_dial_call(To, From, IQ)
-                       end;
-               "" ->
-                       route_error_reply(To, From, IQ, ?ERR_BAD_REQUEST)
-       end,
-       ok;
-
-% Handle <iq> to external domain resource
-route_external(From, To, {xmlelement, "iq", _Attrs, _Els} = IQ) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got client iq ~n~p", [IQ]),
-       case is_entity_dcp(From, To) of
-               {true, _} ->
-                       IntFrom = internal_client(),
-                       IntTo = create_internal_jid(To),
-                       route_iq_request(IntFrom, IntTo, IQ, fun(IQReply) -> route_iq_response(From, To, IQ, IQReply) end);
-               {false, _} ->
-                       route_error_reply(To, From, IQ, ?ERR_CONFLICT);
-               _ ->
-                       route_error_reply(To, From, IQ, ?ERR_BAD_REQUEST)
-       end,
-       ok.
-
-% Handle <presence> to internal domain
-route_internal(From, {jid, [], _Domain, [], [], _LDomain, []} = To, {xmlelement, "presence", _Attrs, _Els} = Presence) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got node presence to internal domain ~n~p", [Presence]),
-       route_server_presence(From, To, Presence),
-       ok;
-
-% Handle <presence> to internal domain resource
-route_internal(From, To, {xmlelement, "presence", _Attrs, _Els} = Presence) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got node presence to internal domain ~n~p", [Presence]),
-       case To =:= internal_client() of
-               true ->
-                       route_server_presence(From, To, Presence);
-               false ->
-                       % TODO implement
-                       ok
-       end,
-       ok;
-
-% Handle <message> to internal domain
-route_internal(_From, _To, {xmlelement, "message", _Attrs, _Els} = Message) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got node message ~n~p", [Message]),
-       % ignore
-       ok;
-
-% Handle <iq> to internal domain.
-route_internal(From, {jid, [], _Domain, [], [], _LDomain, []} = To, {xmlelement, "iq", _Attrs, _Els} = IQ) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got node iq ~n~p", [IQ]),
-       case get_attribute_as_list(IQ, "type", "") of
-               "get" ->
-                       case get_element(IQ, ?NS_PING, "ping") of
-                               undefined ->
-                                       route_error_reply(To, From, IQ, ?ERR_BAD_REQUEST);
-                               _ ->
-                                       route_result_reply(To, From, IQ)
-                       end;
-               "result" ->
-                       ejabberd_local:process_iq_reply(From, To, jlib:iq_query_or_response_info(IQ));
-               "error" ->
-                       ejabberd_local:process_iq_reply(From, To, jlib:iq_query_or_response_info(IQ));
-               "" ->
-                       % don't allow get/set from nodes
-                       route_error_reply(To, From, IQ, ?ERR_BAD_REQUEST)
-       end,
-       ok;
-
-% Handle <iq> to internal domain resource.
-route_internal(From, To, {xmlelement, "iq", _Attrs, _Els} = IQ) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: got node iq ~n~p", [IQ]),
-       case get_attribute_as_list(IQ, "type", "") of
-               "result" ->
-                       ejabberd_local:process_iq_reply(From, To, jlib:iq_query_or_response_info(IQ));
-               "error" ->
-                       ejabberd_local:process_iq_reply(From, To, jlib:iq_query_or_response_info(IQ));
-               _ ->
-                       % Don't allow get/set from nodes
-                       route_error_reply(To, From, IQ, ?ERR_BAD_REQUEST)
-       end,
-       ok.
-
-% Process presence message from rayo node
-route_rayo_node_presence(From, _To, Presence) ->
-       case get_attribute_as_list(Presence, "type", "") of
-               "" ->
-                       case get_element(Presence, "show") of
-                               undefined ->
-                                       ?DEBUG("MOD_RAYO_GATEWAY: ignoring empty presence", []);
-                               Show ->
-                                       case get_cdata_as_list(Show) of
-                                               "chat" ->
-                                                       register_rayo_node(From);
-                                               "dnd" ->
-                                                       unregister_rayo_node(From);
-                                               "xa" ->
-                                                       unregister_rayo_node(From);
-                                               "" ->
-                                                       unregister_rayo_node(From)
-                                       end
-                       end;
-               "unavailable" ->
-                       %TODO broadcast end instead?
-                       unregister_rayo_node(From)
-       end,
-       ok.
-
-% Process presence from call
-route_call_presence(From, _To, Presence) ->
-       %TODO join/unjoin mixer events
-       case get_attribute_as_list(Presence, "type", "") of
-               "" ->
-                       case get_element(Presence, ?NS_RAYO, "offer") of
-                               undefined ->
-                                       route_rayo_entity_stanza(From, Presence);
-                               _ ->
-                                       route_offer_call(From, Presence)
-                       end;
-               "unavailable" ->
-                       case get_element(Presence, ?NS_RAYO, "end") of
-                               undefined ->
-                                       route_rayo_entity_stanza(From, Presence);
-                               _ ->
-                                       route_rayo_entity_stanza(From, Presence),
-                                       unregister_rayo_node_entity(create_external_jid(From))
-                       end
-       end,
-       ok.
-
-% presence from node
-route_server_presence({jid, [], _Domain, [], [], _LDomain, []} = From, To, Presence) ->
-       route_rayo_node_presence(From, To, Presence),
-       ok;
-
-% presence from call/mixer
-route_server_presence(From, To, Presence) ->
-       % TODO mixer
-       route_call_presence(From, To, Presence),
-       ok.
-
-% presence from Rayo Client
-route_client_presence(From, _To, Presence) ->
-       case get_attribute_as_list(Presence, "type", "") of
-               "" ->
-                       case get_element(Presence, "show") of
-                               undefined ->
-                                       ?DEBUG("MOD_RAYO_GATEWAY: ignoring empty presence", []);
-                               Show ->
-                                       case get_cdata_as_list(Show) of
-                                               "chat" ->
-                                                       register_rayo_client(From);
-                                               "dnd" ->
-                                                       unregister_rayo_client(From);
-                                               _ ->
-                                                       unregister_rayo_client(From)
-                                       end
-                       end;
-               "unavailable" ->
-                       unregister_rayo_client(From);
-               _ ->
-                       ok
-       end,
-       ok.
-
-% route client directed presence to mixer
-route_client_presence_to_mixer(_From, _To, _Presence) ->
-       % TODO
-       ok.
-
-% Handle offer to client
-route_offer_call(From, Offer) ->
-       % Any clients available?
-       case pick_client() of
-               none ->
-                       % TODO reject?
-                       ok;
-               ClientDcp ->
-                       % Remember call
-                       ExtFrom = create_external_jid(From),
-                       register_rayo_node_entity(ExtFrom, From, ClientDcp, call),
-                       ejabberd_router:route(ExtFrom, ClientDcp, Offer)
-       end,
-       ok.
-
-% convert URI to a JID
-uri_to_jid(Uri) ->
-       JidString = case string:str(Uri, "xmpp:") of
-               1 ->
-                       string:substr(Uri, 6);
-               _ ->
-                       Uri
-       end,
-       jlib:string_to_jid(JidString).
-
-% convert internal IQ reply to an external reply
-create_external_iq_reply(OrigIQ, {xmlelement, _, _, Els} = IQReply) ->
-       IQId = get_attribute_as_list(OrigIQ, "id", ""),
-       IQType = get_attribute_as_list(IQReply, "type", ""),
-       {xmlelement, "iq", [{"id", IQId}, {"type", IQType}], Els}.
-
-% Process dial response
-route_dial_call_response(OrigFrom, OrigTo, OrigIQ, timeout) ->
-       % TODO retry on different node?
-       route_iq_response(OrigFrom, OrigTo, OrigIQ, timeout);
-
-route_dial_call_response(OrigFrom, OrigTo, OrigIQ, IQReply) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: IQ response for ~p", [OrigIQ]),
-       IQReplyPacket = jlib:iq_to_xml(IQReply),
-       case get_element(IQReplyPacket, "error") of
-               undefined ->
-                       case get_element(IQReplyPacket, "ref") of
-                               undefined ->
-                                       ok;
-                               Ref ->
-                                       IntJid = uri_to_jid(get_attribute_as_list(Ref, "uri", "")),
-                                       register_rayo_node_entity(create_external_jid(IntJid), IntJid, OrigFrom, call)
-                       end;
-               _ ->
-                       ok
-       end,
-       ejabberd_router:route(OrigTo, OrigFrom, create_external_iq_reply(OrigIQ, IQReplyPacket)),
-       ok.
-
-% Forward dial to node
-route_dial_call(From, To, Dial) ->
-       % any nodes available?
-       case num_rayo_nodes() > 0 of
-               true ->
-                       IntFrom = internal_client(),
-                       case pick_rayo_node() of
-                               none ->
-                                       route_error_reply(To, From, Dial, ?ERR_SERVICE_UNAVAILABLE);
-                               NodeJid ->
-                                       route_iq_request(IntFrom, NodeJid, Dial, fun(IQReply) -> route_dial_call_response(From, To, Dial, IQReply) end)
-                       end;
-               _ ->
-                       route_error_reply(To, From, Dial, ?ERR_RESOURCE_CONSTRAINT)
-       end.
-
-% return configuration value given name
-config_value(Name) ->
-       case catch mnesia:dirty_read(rayo_config, Name) of
-               [{rayo_config, Name, Value}] ->
-                       Value;
-               _ ->
-                       ""
-       end.
-
-% return internal client name
-internal_client() ->
-       jlib:string_to_jid(config_value("internal_client")).
-
-% return internal domain name
-internal_domain() ->
-       jlib:string_to_jid(config_value("internal_domain")).
-
-% return external domain name
-external_domain() ->
-       jlib:string_to_jid(config_value("external_domain")).
-
-% return number of registered clients
-num_clients() ->
-       mnesia:table_info(rayo_clients, size).
-
-% return all registered client JIDs
-all_clients() ->
-       case mnesia:transaction(fun() -> mnesia:all_keys(rayo_clients) end) of
-               {atomic, Keys} ->
-                       Keys;
-               _ ->
-                       []
-       end.
-
-% pick a registered client
-pick_client() ->
-       % pick at random for now...
-       case all_clients() of
-               [] ->
-                       none;
-               AllClients ->
-                       lists:nth(random:uniform(length(AllClients)), AllClients)
-       end.
-
-% pick a registered node
-pick_rayo_node() ->
-       % pick at random for now...
-       case all_rayo_nodes() of
-               [] ->
-                       none;
-               AllNodes ->
-                       lists:nth(random:uniform(length(AllNodes)), AllNodes)
-       end.
-
-% return number of registered rayo nodes
-num_rayo_nodes() ->
-       mnesia:table_info(rayo_nodes, size).
-
-% return all rayo node JIDs
-all_rayo_nodes() ->
-       case mnesia:transaction(fun() -> mnesia:all_keys(rayo_nodes) end) of
-               {atomic, Keys} ->
-                       Keys;
-               _ ->
-                       []
-       end.
-
-presence(Status) ->
-       {xmlelement, "presence", [], [
-               {xmlelement, "show", [], [
-                       {xmlcdata, Status}
-               ]}
-       ]}.
-
-online_presence() ->
-       presence(<<"chat">>).
-
-offline_presence() ->
-       presence(<<"dnd">>).
-
-route_to_list(From, ToList, Stanza) ->
-       lists:map(fun(To) -> ejabberd_router:route(From, To, Stanza) end, ToList),
-       ok.
-
-% route stanza from entity
-route_rayo_entity_stanza(From, Stanza) ->
-       case find_rayo_node_entity_dcp_by_int_jid(From) of
-               none ->
-                       ?DEBUG("MOD_RAYO_GATEWAY: Failed to find DCP for ~p", [From]),
-                       ok;
-               DcpJid ->
-                       ejabberd_router:route(create_external_jid(From), DcpJid, Stanza)
-       end,
-       ok.
-
-% route IQ response from node to client
-route_iq_response(OrigFrom, OrigTo, OrigIQ, timeout) ->
-       route_error_reply(OrigTo, OrigFrom, OrigIQ, ?ERR_REMOTE_SERVER_TIMEOUT),
-       ok;
-
-route_iq_response(OrigFrom, OrigTo, OrigIQ, IQReply) ->
-       ?DEBUG("MOD_RAYO_GATEWAY: IQ response for ~p", [OrigIQ]),
-       ejabberd_router:route(OrigTo, OrigFrom, create_external_iq_reply(OrigIQ, jlib:iq_to_xml(IQReply))),
-       ok.
-
-% route IQ from client to node
-route_iq_request(From, To, {xmlelement, "iq", _Atts, Els}, ResponseCallback) ->
-       ejabberd_local:route_iq(From, To, #iq{type = set, sub_el = Els}, ResponseCallback),
-       ok.
-
-% route IQ error given request
-route_error_reply(From, To, IQ, Reason) ->
-       ejabberd_router:route(From, To, jlib:make_error_reply(IQ, Reason)),
-       ok.
-
-% route IQ result given request
-route_result_reply(From, To, IQ) ->
-       ejabberd_router:route(From, To, jlib:make_result_iq_reply(IQ)),
-       ok.
-
-% XML parsing helpers
-
-get_element(Element, Name) ->
-       case xml:get_subtag(Element, Name) of
-               false ->
-                       undefined;
-               Subtag ->
-                       Subtag
-       end.
-
-get_element(Element, NS, Name) ->
-       case get_element(Element, Name) of
-               undefined ->
-                       undefined;
-               Subtag ->
-                       case get_attribute_as_list(Subtag, "xmlns", "") of
-                               "" ->
-                                       undefined;
-                               NS ->
-                                       Subtag
-                       end
-       end.
-
-get_cdata_as_list(undefined) ->
-       "";
-
-get_cdata_as_list(Element) ->
-       xml:get_tag_cdata(Element).
-
-get_element_cdata_as_list(Element, Name) ->
-       get_cdata_as_list(get_element(Element, Name)).
-
-get_element_cdata_as_list(Element, NS, Name) ->
-       get_cdata_as_list(get_element(Element, NS, Name)).
-
-get_element_attribute_as_list(Element, Name, AttrName, Default) ->
-       get_attribute_as_list(get_element(Element, Name), AttrName, Default).
-
-get_element_attribute_as_list(Element, NS, Name, AttrName, Default) ->
-       get_attribute_as_list(get_element(Element, NS, Name), AttrName, Default).
-
-get_attribute_as_list(undefined, _Name, _Default) ->
-       undefined;
-
-get_attribute_as_list(Element, Name, Default) ->
-       case xml:get_tag_attr_s(Name, Element) of
-               "" ->
-                       Default;
-               Attr ->
-                       Attr
-       end.
diff --git a/src/mod/event_handlers/mod_rayo/iks_helpers.c b/src/mod/event_handlers/mod_rayo/iks_helpers.c
deleted file mode 100644 (file)
index 2f293aa..0000000
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2014, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * iks_helpers.c -- iksemel helpers
- *
- */
-#include "iks_helpers.h"
-#include <switch.h>
-#include <openssl/hmac.h>
-#include <openssl/sha.h>
-
-#undef XMPP_ERROR
-#define XMPP_ERROR(def_name, name, type) \
-       const struct xmpp_error def_name##_val = { name, type }; \
-       const struct xmpp_error *def_name = &def_name##_val;
-#include "xmpp_errors.def"
-
-/**
- * Create a <presence> event
- * @param name the event name
- * @param namespace the event namespace
- * @param from
- * @param to
- * @return the event XML node
- */
-iks *iks_new_presence(const char *name, const char *namespace, const char *from, const char *to)
-{
-       iks *event = iks_new("presence");
-       iks *x;
-       /* iks makes copies of attrib name and value */
-       iks_insert_attrib(event, "from", from);
-       iks_insert_attrib(event, "to", to);
-       x = iks_insert(event, name);
-       if (!zstr(namespace)) {
-               iks_insert_attrib(x, "xmlns", namespace);
-       }
-       return event;
-}
-
-/**
- * Create error response from request
- * @param req the request
- * @param from
- * @param to
- * @param err the XMPP stanza error
- * @return the error response
- */
-iks *iks_new_error(iks *req, const struct xmpp_error *err)
-{
-       iks *response = iks_copy(req);
-       iks *x;
-
-       /* <iq> */
-       iks_insert_attrib(response, "from", iks_find_attrib(req, "to"));
-       iks_insert_attrib(response, "to", iks_find_attrib(req, "from"));
-       iks_insert_attrib(response, "type", "error");
-
-       /* <error> */
-       x = iks_insert(response, "error");
-       iks_insert_attrib(x, "type", err->type);
-
-       /* e.g. <feature-not-implemented> */
-       x = iks_insert(x, err->name);
-       iks_insert_attrib(x, "xmlns", IKS_NS_XMPP_STANZAS);
-
-       return response;
-}
-
-/**
- * Create error response from request
- * @param req the request
- * @param from
- * @param to
- * @param err the XMPP stanza error
- * @param detail_text optional text to include in message
- * @return the <iq> error response
- */
-iks *iks_new_error_detailed(iks *req, const struct xmpp_error *err, const char *detail_text)
-{
-       iks *reply = iks_new_error(req, err);
-       if (!zstr(detail_text)) {
-               iks *error = iks_find(reply, "error");
-               iks *text = iks_insert(error, "text");
-               iks_insert_attrib(text, "xml:lang", "en");
-               iks_insert_attrib(text, "xmlns", IKS_NS_XMPP_STANZAS);
-               iks_insert_cdata(text, detail_text, strlen(detail_text));
-       }
-       return reply;
-}
-
-/**
- * Create error response from request
- * @param req the request
- * @param from
- * @param to
- * @param err the XMPP stanza error
- * @param detail_text_format format string
- * @param ...
- * @return the error response
- */
-iks *iks_new_error_detailed_printf(iks *req, const struct xmpp_error *err, const char *detail_text_format, ...)
-{
-       iks *reply = NULL;
-       char *data;
-       va_list ap;
-       int ret;
-
-       va_start(ap, detail_text_format);
-       ret = switch_vasprintf(&data, detail_text_format, ap);
-       va_end(ap);
-
-       if (ret == -1) {
-               return NULL;
-       }
-       reply = iks_new_error_detailed(req, err, data);
-       free(data);
-       return reply;
-}
-
-/**
- * Create <iq> result response from request
- * @param iq the request
- * @return the result response
- */
-iks *iks_new_iq_result(iks *iq)
-{
-       iks *response = iks_new("iq");
-       iks_insert_attrib(response, "from", iks_find_attrib(iq, "to"));
-       iks_insert_attrib(response, "to", iks_find_attrib(iq, "from"));
-       iks_insert_attrib(response, "type", "result");
-       iks_insert_attrib(response, "id", iks_find_attrib(iq, "id"));
-       return response;
-}
-
-/**
- * Get attribute value of node, returning empty string if non-existent or not set.
- * @param xml the XML node to search
- * @param attrib the Attribute name
- * @return the attribute value
- */
-const char *iks_find_attrib_soft(iks *xml, const char *attrib)
-{
-       char *value = iks_find_attrib(xml, attrib);
-       return zstr(value) ? "" : value;
-}
-
-/**
- * Get attribute value of node, returning default value if missing.  The default value
- * is set in the node if missing.
- * @param xml the XML node to search
- * @param attrib the Attribute name
- * @return the attribute value
- */
-const char *iks_find_attrib_default(iks *xml, const char *attrib, const char *def)
-{
-       char *value = iks_find_attrib(xml, attrib);
-       if (!value) {
-               iks_insert_attrib(xml, attrib, def);
-               return def;
-       }
-       return value;
-}
-
-/**
- * Get attribute integer value of node
- * @param xml the XML node to search
- * @param attrib the Attribute name
- * @return the attribute value
- */
-int iks_find_int_attrib(iks *xml, const char *attrib)
-{
-       return atoi(iks_find_attrib_soft(xml, attrib));
-}
-
-/**
- * Get attribute boolean value of node
- * @param xml the XML node to search
- * @param attrib the Attribute name
- * @return the attribute value
- */
-int iks_find_bool_attrib(iks *xml, const char *attrib)
-{
-       return switch_true(iks_find_attrib_soft(xml, attrib));
-}
-
-/**
- * Get attribute double value of node
- * @param xml the XML node to search
- * @param attrib the Attribute name
- * @return the attribute value
- */
-double iks_find_decimal_attrib(iks *xml, const char *attrib)
-{
-       return atof(iks_find_attrib_soft(xml, attrib));
-}
-
-/**
- * Get attribute character value of node
- * @param xml the XML node to search
- * @param attrib the Attribute name
- * @return the attribute value
- */
-char iks_find_char_attrib(iks *xml, const char *attrib)
-{
-       return iks_find_attrib_soft(xml, attrib)[0];
-}
-
-/**
- * Convert iksemel XML node type to string
- * @param type the XML node type
- * @return the string value of type or "UNKNOWN"
- */
-const char *iks_node_type_to_string(int type)
-{
-       switch(type) {
-               case IKS_NODE_START: return "NODE_START";
-               case IKS_NODE_NORMAL: return "NODE_NORMAL";
-               case IKS_NODE_ERROR: return "NODE_ERROR";
-               case IKS_NODE_STOP: return "NODE_START";
-               default: return "NODE_UNKNOWN";
-       }
-}
-
-/**
- * Convert iksemel error code to string
- * @param err the iksemel error code
- * @return the string value of error or "UNKNOWN"
- */
-const char *iks_net_error_to_string(int err)
-{
-       switch (err) {
-               case IKS_OK: return "OK";
-               case IKS_NOMEM: return "NOMEM";
-               case IKS_BADXML: return "BADXML";
-               case IKS_HOOK: return "HOOK";
-               case IKS_NET_NODNS: return "NET_NODNS";
-               case IKS_NET_NOSOCK: return "NET_NOSOCK";
-               case IKS_NET_NOCONN: return "NET_NOCONN";
-               case IKS_NET_RWERR: return "NET_RWERR";
-               case IKS_NET_NOTSUPP: return "NET_NOTSUPP";
-               case IKS_NET_TLSFAIL: return "NET_TLSFAIL";
-               case IKS_NET_DROPPED: return "NET_DROPPED";
-               case IKS_NET_UNKNOWN: return "NET_UNKNOWN";
-               default: return "UNKNOWN";
-       }
-}
-
-/**
- * Insert attribute using format string
- * @param xml node to insert attribute into
- * @param name of attribute
- * @param fmt format string
- * @param ... format string args
- */
-iks *iks_insert_attrib_printf(iks *xml, const char *name, const char *fmt, ...)
-{
-       iks *node;
-       char *data;
-       va_list ap;
-       int ret;
-
-       va_start(ap, fmt);
-       ret = switch_vasprintf(&data, fmt, ap);
-       va_end(ap);
-
-       if (ret == -1) {
-               return NULL;
-       }
-       node = iks_insert_attrib(xml, name, data);
-       free(data);
-
-       return node;
-}
-
-/**
- * @param value to match
- * @param rule to check
- * @return true if value is one of the comma-separated values in rule
- */
-int value_matches(const char *value, const char *rule)
-{
-       if (rule && *rule && value && *value && !strchr(value, ',')) {
-               const char *begin = strstr(rule, value);
-               const char *end = begin + strlen(value);
-               if (!begin) {
-                       return 0;
-               }
-               if ((begin == rule || *(begin - 1) == ',') && (*end == ',' || *end == '\0')) {
-                               return 1;
-               }
-               /* substring matched... try farther down the string */
-               return value_matches(value, end);
-       }
-       return 0;
-}
-
-/**
- * Validate boolean
- * @param value
- * @return SWTICH_TRUE if boolean
- */
-int iks_attrib_is_bool(const char *value)
-{
-       if (value && *value && (!strcasecmp("true", value) || !strcasecmp("false", value))) {
-               return SWITCH_TRUE;
-       }
-       return SWITCH_FALSE;
-}
-
-/**
- * Validate integer
- * @param value
- * @return SWTICH_TRUE if not negative
- */
-int iks_attrib_is_not_negative(const char *value)
-{
-       if (value && *value && switch_is_number(value)) {
-               int value_i = atoi(value);
-               if (value_i >= 0) {
-                       return SWITCH_TRUE;
-               }
-       }
-       return SWITCH_FALSE;
-}
-
-/**
- * Validate integer
- * @param value
- * @return SWTICH_TRUE if positive
- */
-int iks_attrib_is_positive(const char *value)
-{
-       if (value && *value && switch_is_number(value)) {
-               int value_i = atoi(value);
-               if (value_i > 0) {
-                       return SWITCH_TRUE;
-               }
-       }
-       return SWITCH_FALSE;
-}
-
-/**
- * Validate integer
- * @param value
- * @return SWTICH_TRUE if positive or -1
- */
-int iks_attrib_is_positive_or_neg_one(const char *value)
-{
-       if (value && *value && switch_is_number(value)) {
-               int value_i = atoi(value);
-               if (value_i == -1 || value_i > 0) {
-                       return SWITCH_TRUE;
-               }
-       }
-       return SWITCH_FALSE;
-}
-
-/**
- * Validate string
- * @param value
- * @return SWTICH_TRUE
- */
-int iks_attrib_is_any(const char *value)
-{
-       return SWITCH_TRUE;
-}
-
-/**
- * Validate decimal
- * @param value
- * @return SWTICH_TRUE if 0.0 <= x <= 1.0
- */
-int iks_attrib_is_decimal_between_zero_and_one(const char *value)
-{
-       if (value && *value && switch_is_number(value)) {
-               double value_d = atof(value);
-               if (value_d >= 0.0 && value_d <= 1.0) {
-                       return SWITCH_TRUE;
-               }
-       }
-       return SWITCH_FALSE;
-}
-
-/**
- * Validate dtmf digit
- * @param value
- * @return SWITCH_TRUE if 0-9,a,b,c,d,A,B,C,D,*,#
- */
-int iks_attrib_is_dtmf_digit(const char *value)
-{
-       if (value && *value && strlen(value) == 1) {
-               switch (*value) {
-                       case '0':
-                       case '1':
-                       case '2':
-                       case '3':
-                       case '4':
-                       case '5':
-                       case '6':
-                       case '7':
-                       case '8':
-                       case '9':
-                       case 'A':
-                       case 'a':
-                       case 'B':
-                       case 'b':
-                       case 'C':
-                       case 'c':
-                       case 'D':
-                       case 'd':
-                       case '*':
-                       case '#':
-                               return SWITCH_TRUE;
-               }
-       }
-       return SWITCH_FALSE;
-}
-
-/**
- * @param fn to evaluate attribute
- * @param attrib to evaluate
- * @return true if not set or is valid
- */
-int validate_optional_attrib(iks_attrib_validation_function fn, const char *attrib)
-{
-       if (!attrib || !*attrib) {
-               return SWITCH_TRUE;
-       }
-       return fn(attrib);
-}
-
-#define IKS_SHA256_HEX_DIGEST_LENGTH ((SHA256_DIGEST_LENGTH * 2) + 1)
-
-/**
- * Convert hash to a hex string.
- * @param hash hash to convert
- * @param str buffer to store hash - this buffer must be hashlen * 2 + 1 in size.
- */
-static void iks_hash_to_hex_string(unsigned char *hash, int hashlen, unsigned char *str)
-{
-       static const char *HEX = "0123456789abcdef";
-       int i;
-
-       /* convert to hex string with in-place algorithm */
-       for (i = hashlen - 1; i >= 0; i--) {
-               str[i * 2 + 1] = HEX[hash[i] & 0x0f];
-               str[i * 2] = HEX[(hash[i] >> 4) & 0x0f];
-       }
-       str[hashlen * 2] = '\0';
-}
-
-/**
- * Generate SHA-256 hash of value as hex string
- * @param data to hash
- * @param datalen length of data to hash
- * @return hash as a hex string
- */
-static void iks_sha256_hex_string(const unsigned char *data, int datalen, unsigned char *hash)
-{
-       /* hash data */
-       SHA256(data, datalen, hash);
-       iks_hash_to_hex_string(hash, SHA256_DIGEST_LENGTH, hash);
-}
-
-/**
- * Generate HMAC SHA-256
- * @param key the key
- * @param keylen length of key
- * @param message the message
- * @param messagelen length of message
- * @param hash buffer to store the hash - must be IKS_SHA256_HEX_DIGEST_LENGTH
- */
-static void iks_hmac_sha256_hex_string(const unsigned char *key, int keylen, const unsigned char *message, int messagelen, unsigned char *hash)
-{
-       unsigned int hash_len = SHA256_DIGEST_LENGTH;
-       HMAC(EVP_sha256(), key, keylen, message, messagelen, hash, &hash_len);
-       iks_hash_to_hex_string(hash, SHA256_DIGEST_LENGTH, hash);
-}
-
-/**
- * Generate server dialback key.  free() the returned value
- * @param secret originating server shared secret
- * @param receiving_server domain
- * @param originating_server domain
- * @param stream_id stream ID
- * @return the dialback key
- */
-char *iks_server_dialback_key(const char *secret, const char *receiving_server, const char *originating_server, const char *stream_id)
-{
-       if (!zstr(secret) && !zstr(receiving_server) && !zstr(originating_server) && !zstr(stream_id)) {
-               unsigned char secret_hash[IKS_SHA256_HEX_DIGEST_LENGTH];
-               unsigned char *message = NULL;
-               unsigned char *dialback_key = malloc(sizeof(unsigned char) * IKS_SHA256_HEX_DIGEST_LENGTH);
-               iks_sha256_hex_string((unsigned char *)secret, strlen(secret), secret_hash);
-               message = (unsigned char *)switch_mprintf("%s %s %s", receiving_server, originating_server, stream_id);
-               iks_hmac_sha256_hex_string(secret_hash, strlen((char *)secret_hash), message, strlen((char *)message), dialback_key);
-               free(message);
-               return (char *)dialback_key;
-       }
-       return NULL;
-}
-
-/**
- * Print base 64 encoded SHA-1 hash
- * @param sha hash to print
- * @param buf to store baes 64 encoded hash
- */
-void iks_sha_print_base64(iksha *sha, char *buf)
-{
-       int i;
-       char hex_digit[3] = { 0 };
-       char hex_buf[SHA_1_HASH_BUF_SIZE];
-       unsigned char bin_buf[SHA_1_HASH_BUF_SIZE / 2];
-       iks_sha_print(sha, hex_buf);
-
-       /* convert hex string to octets */
-       for (i = 0; i < SHA_1_HASH_BUF_SIZE; i += 2) {
-               hex_digit[0] = hex_buf[i];
-               hex_digit[1] = hex_buf[i + 1];
-               bin_buf[i / 2] = strtol(hex_digit, NULL, 16);
-       }
-
-       switch_b64_encode(bin_buf, SHA_1_HASH_BUF_SIZE / 2, (unsigned char *)buf, SHA_1_HASH_BUF_SIZE);
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/iks_helpers.h b/src/mod/event_handlers/mod_rayo/iks_helpers.h
deleted file mode 100644 (file)
index b98dbf5..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * iks_helpers.h -- iksemel constants and helpers
- *
- */
-#ifndef IKS_EXT_H
-#define IKS_EXT_H
-
-#include <iksemel.h>
-#include <switch.h>
-
-#define SHA_1_HASH_BUF_SIZE 40
-
-#define IKS_JABBER_SERVER_PORT 5269
-
-#define IKS_NS_XMPP_DISCO "http://jabber.org/protocol/disco#info"
-#define IKS_NS_XMPP_PING "urn:xmpp:ping"
-#define IKS_NS_XMPP_STANZAS "urn:ietf:params:xml:ns:xmpp-stanzas"
-#define IKS_NS_XMPP_STREAMS "http://etherx.jabber.org/streams"
-#define IKS_NS_XMPP_DIALBACK "jabber:server:dialback"
-#define IKS_NS_XMPP_TLS "urn:ietf:params:xml:ns:xmpp-tls"
-#define IKS_NS_XMPP_ENTITY_CAPABILITIES "http://jabber.org/protocol/caps"
-
-struct xmpp_error {
-       const char *name;
-       const char *type;
-};
-
-#undef XMPP_ERROR
-#define XMPP_ERROR(def_name, name, type) \
-       extern const struct xmpp_error *def_name;
-#include "xmpp_errors.def"
-
-/* See RFC-3920 XMPP core for error definitions */
-SWITCH_DECLARE(iks *) iks_new_presence(const char *name, const char *namespace, const char *from, const char *to);
-SWITCH_DECLARE(iks *) iks_new_error(iks *iq, const struct xmpp_error *err);
-SWITCH_DECLARE(iks *) iks_new_error_detailed(iks *iq, const struct xmpp_error *err, const char *detail_text);
-SWITCH_DECLARE(iks *) iks_new_error_detailed_printf(iks *iq, const struct xmpp_error *err, const char *detail_text_format, ...);
-SWITCH_DECLARE(iks *) iks_new_iq_result(iks *iq);
-SWITCH_DECLARE(const char *) iks_find_attrib_soft(iks *xml, const char *attrib);
-SWITCH_DECLARE(const char *) iks_find_attrib_default(iks *xml, const char *attrib, const char *def);
-SWITCH_DECLARE(int) iks_find_bool_attrib(iks *xml, const char *attrib);
-SWITCH_DECLARE(int) iks_find_int_attrib(iks *xml, const char *attrib);
-SWITCH_DECLARE(char) iks_find_char_attrib(iks *xml, const char *attrib);
-SWITCH_DECLARE(double) iks_find_decimal_attrib(iks *xml, const char *attrib);
-SWITCH_DECLARE(const char *) iks_node_type_to_string(int type);
-SWITCH_DECLARE(const char *) iks_net_error_to_string(int err);
-SWITCH_DECLARE(iks *) iks_insert_attrib_printf(iks *xml, const char *name, const char *fmt, ...);
-
-SWITCH_DECLARE(char *) iks_server_dialback_key(const char *secret, const char *receiving_server, const char *originating_server, const char *stream_id);
-SWITCH_DECLARE(void) iks_sha_print_base64(iksha *sha, char *buf);
-
-/** A function to validate attribute value */
-typedef int (*iks_attrib_validation_function)(const char *);
-
-SWITCH_DECLARE(int) validate_optional_attrib(iks_attrib_validation_function fn, const char *attrib);
-
-#define ELEMENT_DECL(name) SWITCH_DECLARE(int) VALIDATE_##name(iks *node);
-#define ELEMENT(name) int VALIDATE_##name(iks *node) { int result = 1; if (!node) return 0;
-#define ATTRIB(name, def, rule) result &= iks_attrib_is_##rule(iks_find_attrib_default(node, #name, #def));
-#define OPTIONAL_ATTRIB(name, def, rule) result &= validate_optional_attrib(iks_attrib_is_##rule, iks_find_attrib_default(node, #name, #def));
-#define STRING_ATTRIB(name, def, rule) result &= value_matches(iks_find_attrib_default(node, #name, #def), rule);
-#define ELEMENT_END return result; }
-
-SWITCH_DECLARE(int) value_matches(const char *value, const char *rule);
-
-SWITCH_DECLARE(int) iks_attrib_is_bool(const char *value);
-SWITCH_DECLARE(int) iks_attrib_is_not_negative(const char *value);
-SWITCH_DECLARE(int) iks_attrib_is_positive(const char *value);
-SWITCH_DECLARE(int) iks_attrib_is_positive_or_neg_one(const char *value);
-SWITCH_DECLARE(int) iks_attrib_is_any(const char *value);
-SWITCH_DECLARE(int) iks_attrib_is_decimal_between_zero_and_one(const char *value);
-SWITCH_DECLARE(int) iks_attrib_is_dtmf_digit(const char *value);
-
-#endif
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/mod_rayo.c b/src/mod/event_handlers/mod_rayo/mod_rayo.c
deleted file mode 100644 (file)
index 228e89b..0000000
+++ /dev/null
@@ -1,5411 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * mod_rayo.c -- Rayo server / node implementation.  Allows MxN clustering of FreeSWITCH and Rayo Clients (like Adhearsion)
- *
- */
-#include <switch.h>
-#include <iksemel.h>
-
-#include "mod_rayo.h"
-#include "rayo_components.h"
-#include "rayo_elements.h"
-#include "xmpp_streams.h"
-
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_rayo_shutdown);
-SWITCH_MODULE_LOAD_FUNCTION(mod_rayo_load);
-SWITCH_MODULE_RUNTIME_FUNCTION(mod_rayo_runtime);
-SWITCH_MODULE_DEFINITION(mod_rayo, mod_rayo_load, mod_rayo_shutdown, mod_rayo_runtime);
-
-#define RAYO_CAUSE_HANGUP SWITCH_CAUSE_NORMAL_CLEARING
-#define RAYO_CAUSE_DECLINE SWITCH_CAUSE_CALL_REJECTED
-#define RAYO_CAUSE_BUSY SWITCH_CAUSE_USER_BUSY
-#define RAYO_CAUSE_ERROR SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE
-
-#define RAYO_END_REASON_HANGUP "hungup"
-#define RAYO_END_REASON_HANGUP_LOCAL "hangup-command"
-#define RAYO_END_REASON_TIMEOUT "timeout"
-#define RAYO_END_REASON_BUSY "busy"
-#define RAYO_END_REASON_REJECT "rejected"
-#define RAYO_END_REASON_ERROR "error"
-
-#define RAYO_SIP_REQUEST_HEADER "sip_h_"
-#define RAYO_SIP_RESPONSE_HEADER "sip_rh_"
-#define RAYO_SIP_PROVISIONAL_RESPONSE_HEADER "sip_ph_"
-#define RAYO_SIP_BYE_RESPONSE_HEADER "sip_bye_h_"
-
-#define RAYO_CONFIG_FILE "rayo.conf"
-
-#define JOINED_CALL 1
-#define JOINED_MIXER 2
-
-#define OFFER_ALL 0
-#define OFFER_FIRST 1
-#define OFFER_RANDOM 2
-
-struct rayo_actor;
-struct rayo_client;
-struct rayo_call;
-
-#define rayo_call_get_uuid(call) RAYO_ID(call)
-
-/**
- * Function pointer wrapper for the handlers hash
- */
-struct rayo_xmpp_handler {
-       const char *from_type;
-       const char *from_subtype;
-       const char *to_type;
-       const char *to_subtype;
-       rayo_actor_xmpp_handler fn;
-};
-
-/**
- * Client availability
- */
-enum presence_status {
-       PS_UNKNOWN = -1,
-       PS_OFFLINE = 0,
-       PS_ONLINE = 1
-};
-
-/**
- * A xmpp peer server that routes messages to/from clients
- */
-struct rayo_peer_server {
-       /** base class */
-       struct rayo_actor base;
-       /** clients connected via this server */
-       switch_hash_t *clients;
-};
-#define RAYO_PEER_SERVER(x) ((struct rayo_peer_server *)x)
-
-/**
- * A Rayo client that controls calls
- */
-struct rayo_client {
-       /** base class */
-       struct rayo_actor base;
-       /** availability */
-       enum presence_status availability;
-       /** set if reachable via s2s */
-       struct rayo_peer_server *peer_server;
-       /** domain or full JID to route to */
-       const char *route;
-       /** time when last probe was sent */
-       switch_time_t last_probe;
-};
-#define RAYO_CLIENT(x) ((struct rayo_client *)x)
-
-/**
- * A call controlled by a Rayo client
- */
-struct rayo_call {
-       /** actor base class */
-       struct rayo_actor base;
-       /** Definitive controlling party JID */
-       char *dcp_jid;
-       /** Potential controlling parties (have sent offers to) */
-       switch_hash_t *pcps;
-       /** Available controlling parties (not sent offers to) */
-       switch_hash_t *acps;
-       /** Number of available controlling parties */
-       int num_acps;
-       /** current idle start time */
-       switch_time_t idle_start_time;
-       /** true if fax is in progress */
-       int faxing;
-       /** 1 if joined to call, 2 if joined to mixer */
-       int joined;
-       /** pending join */
-       iks *pending_join_request;
-       /** ID of joined party TODO this will be many mixers / calls */
-       const char *joined_id;
-       /** set if response needs to be sent to IQ request */
-       const char *dial_request_id;
-       /** channel destroy event */
-       switch_event_t *end_event;
-       /** True if ringing event sent to client */
-       int ringing_sent;
-       /** true if rayo app has started */
-       int rayo_app_started;
-       /** delayed delivery of answer event because rayo APP wasn't started yet */
-       switch_event_t *answer_event;
-       /** True if request to create this call failed */
-       int dial_request_failed;
-};
-
-/**
- * A conference
- */
-struct rayo_mixer {
-       /** actor base class */
-       struct rayo_actor base;
-       /** member JIDs */
-       switch_hash_t *members;
-       /** subscriber JIDs */
-       switch_hash_t *subscribers;
-};
-
-/**
- * A member of a mixer
- */
-struct rayo_mixer_member {
-       /** JID of member */
-       const char *jid;
-       /** Controlling party JID */
-       const char *dcp_jid;
-};
-
-/**
- * A subscriber to mixer events
- */
-struct rayo_mixer_subscriber {
-       /** JID of client */
-       const char *jid;
-       /** Number of client's calls in mixer */
-       int ref_count;
-};
-
-/**
- * Module state
- */
-static struct {
-       /** module memory pool */
-       switch_memory_pool_t *pool;
-       /** Rayo <iq> set commands mapped to functions */
-       switch_hash_t *command_handlers;
-       /** Rayo <presence> events mapped to functions */
-       switch_hash_t *event_handlers;
-       /** Active Rayo actors mapped by JID */
-       switch_hash_t *actors;
-       /** Rayo actors pending destruction */
-       switch_hash_t *destroy_actors;
-       /** Active Rayo actors mapped by internal ID */
-       switch_hash_t *actors_by_id;
-       /** synchronizes access to actors */
-       switch_mutex_t *actors_mutex;
-       /** map of DCP JID to client */
-       switch_hash_t *clients_roster;
-       /** synchronizes access to available clients */
-       switch_mutex_t *clients_mutex;
-       /** server for calls/mixers/etc */
-       struct rayo_actor *server;
-       /** Maximum idle time before call is considered abandoned */
-       int max_idle_ms;
-       /** Conference profile to use for mixers */
-       char *mixer_conf_profile;
-       /** to URI prefixes mapped to gateways */
-       switch_hash_t *dial_gateways;
-       /** synchronizes access to dial gateways */
-       switch_mutex_t *dial_gateways_mutex;
-       /** console command aliases */
-       switch_hash_t *cmd_aliases;
-       /** global console */
-       struct rayo_client *console;
-       /** XMPP context */
-       struct xmpp_stream_context *xmpp_context;
-       /** number of message threads */
-       int num_message_threads;
-       /** message delivery queue */
-       switch_queue_t *msg_queue;
-       /** in progress offer queue */
-       switch_queue_t *offer_queue;
-       /** shutdown flag */
-       int shutdown;
-       /** prevents context shutdown until all threads are finished */
-       switch_thread_rwlock_t *shutdown_rwlock;
-       /** if true, URI is put in from/to of offer if available */
-       int offer_uri;
-       /** if true, pause inbound calling if all clients are offline */
-       int pause_when_offline;
-       /** flag to reduce log noise */
-       int offline_logged;
-       /** if true, channel variables are added to offer */
-       int add_variables_to_offer;
-       /** if true, channel variables are added to answered, ringing, end events */
-       int add_variables_to_events;
-       /** How to distribute offers to clients */
-       int offer_algorithm;
-       /** How long to wait for offer response before retrying */
-       int offer_timeout_us;
-} globals;
-
-/**
- * An outbound dial gateway
- */
-struct dial_gateway {
-       /** URI prefix to match */
-       const char *uri_prefix;
-       /** dial prefix to match */
-       const char *dial_prefix;
-       /** number of digits to strip from dialstring */
-       int strip;
-};
-
-static void rayo_call_send(struct rayo_actor *call, struct rayo_message *msg);
-static void rayo_server_send(struct rayo_actor *server, struct rayo_message *msg);
-static void rayo_mixer_send(struct rayo_actor *mixer, struct rayo_message *msg);
-static void rayo_component_send(struct rayo_actor *component, struct rayo_message *msg);
-static void rayo_client_send(struct rayo_actor *client, struct rayo_message *msg);
-static void rayo_console_client_send(struct rayo_actor *client, struct rayo_message *msg);
-
-static void on_client_presence(struct rayo_client *rclient, iks *node);
-
-typedef switch_bool_t (* rayo_actor_match_fn)(struct rayo_actor *);
-
-static switch_bool_t is_call_actor(struct rayo_actor *actor);
-
-static void rayo_call_send_end(struct rayo_call *call, switch_event_t *event, int local_hangup, const char *cause_str, const char *cause_q850_str);
-
-
-/**
- * Entity features returned by service discovery
- */
-struct entity_identity {
-       /** identity category */
-       const char *category;
-       /** identity type */
-       const char *type;
-};
-
-static struct entity_identity rayo_server_identity = { "server", "im" };
-static const char *rayo_server_features[] = { IKS_NS_XMPP_ENTITY_CAPABILITIES, IKS_NS_XMPP_DISCO, RAYO_NS, RAYO_CPA_NS, RAYO_FAX_NS, 0 };
-
-static struct entity_identity rayo_mixer_identity = { "client", "rayo_mixer" };
-static const char *rayo_mixer_features[] = { 0 };
-
-static struct entity_identity rayo_call_identity = { "client", "rayo_call" };
-static const char *rayo_call_features[] = { 0 };
-
-/**
- * Calculate SHA-1 hash of entity capabilities
- * @param identity of entity
- * @param features of identity (NULL terminated)
- * @return base64 hash (free when done)
- */
-static char *calculate_entity_sha1_ver(struct entity_identity *identity, const char **features)
-{
-       int i;
-       const char *feature;
-       char ver[SHA_1_HASH_BUF_SIZE + 1] = { 0 };
-       iksha *sha;
-
-       sha = iks_sha_new();
-       iks_sha_hash(sha, (const unsigned char *)identity->category, strlen(identity->category), 0);
-       iks_sha_hash(sha, (const unsigned char *)"/", 1, 0);
-       iks_sha_hash(sha, (const unsigned char *)identity->type, strlen(identity->type), 0);
-       iks_sha_hash(sha, (const unsigned char *)"//", 2, 0);
-       i = 0;
-       while ((feature = features[i++])) {
-               iks_sha_hash(sha, (const unsigned char *)"<", 1, 0);
-               iks_sha_hash(sha, (const unsigned char *)feature, strlen(feature), 0);
-       }
-       iks_sha_hash(sha, (const unsigned char *)"<", 1, 1);
-       iks_sha_print_base64(sha, ver);
-       iks_sha_delete(sha);
-
-       return strdup(ver);
-}
-
-/**
- * @param msg to check
- * @return true if message was sent by admin client (console)
- */
-static int is_admin_client_message(struct rayo_message *msg)
-{
-       return !zstr(msg->from_jid) && !strcmp(RAYO_JID(globals.console), msg->from_jid);
-}
-
-/**
- * @param msg to check
- * @return true if from/to bare JIDs match
- */
-static int is_internal_message(struct rayo_message *msg)
-{
-       return msg->from && msg->to && (iks_id_cmp(msg->from, msg->to, IKS_ID_PARTIAL) == 0);
-}
-
-/**
- * Presence status
- * @param status the presence status
- * @return the string value of status
- */
-static const char *presence_status_to_string(enum presence_status status)
-{
-       switch(status) {
-               case PS_OFFLINE: return "OFFLINE";
-               case PS_ONLINE: return "ONLINE";
-               case PS_UNKNOWN: return "UNKNOWN";
-       }
-       return "UNKNOWN";
-}
-
-/**
- * Get rayo cause code from FS hangup cause
- * @param cause FS hangup cause
- * @return rayo end cause
- */
-static const char *switch_cause_to_rayo_cause(switch_call_cause_t cause)
-{
-       switch (cause) {
-               case SWITCH_CAUSE_NONE:
-               case SWITCH_CAUSE_NORMAL_CLEARING:
-                       return RAYO_END_REASON_HANGUP;
-
-               case SWITCH_CAUSE_UNALLOCATED_NUMBER:
-               case SWITCH_CAUSE_NO_ROUTE_TRANSIT_NET:
-               case SWITCH_CAUSE_NO_ROUTE_DESTINATION:
-               case SWITCH_CAUSE_CHANNEL_UNACCEPTABLE:
-                       return RAYO_END_REASON_ERROR;
-
-               case SWITCH_CAUSE_CALL_AWARDED_DELIVERED:
-                       return RAYO_END_REASON_HANGUP;
-
-               case SWITCH_CAUSE_USER_BUSY:
-                       return RAYO_END_REASON_BUSY;
-
-               case SWITCH_CAUSE_NO_USER_RESPONSE:
-               case SWITCH_CAUSE_NO_ANSWER:
-                       return RAYO_END_REASON_TIMEOUT;
-
-               case SWITCH_CAUSE_SUBSCRIBER_ABSENT:
-                       return RAYO_END_REASON_ERROR;
-
-               case SWITCH_CAUSE_CALL_REJECTED:
-                       return RAYO_END_REASON_REJECT;
-
-               case SWITCH_CAUSE_NUMBER_CHANGED:
-               case SWITCH_CAUSE_REDIRECTION_TO_NEW_DESTINATION:
-               case SWITCH_CAUSE_EXCHANGE_ROUTING_ERROR:
-               case SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER:
-               case SWITCH_CAUSE_INVALID_NUMBER_FORMAT:
-                       return RAYO_END_REASON_ERROR;
-
-               case SWITCH_CAUSE_FACILITY_REJECTED:
-                       return RAYO_END_REASON_REJECT;
-
-               case SWITCH_CAUSE_RESPONSE_TO_STATUS_ENQUIRY:
-               case SWITCH_CAUSE_NORMAL_UNSPECIFIED:
-                       return RAYO_END_REASON_HANGUP;
-
-               case SWITCH_CAUSE_NORMAL_CIRCUIT_CONGESTION:
-               case SWITCH_CAUSE_NETWORK_OUT_OF_ORDER:
-               case SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE:
-               case SWITCH_CAUSE_SWITCH_CONGESTION:
-               case SWITCH_CAUSE_ACCESS_INFO_DISCARDED:
-               case SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL:
-               case SWITCH_CAUSE_PRE_EMPTED:
-               case SWITCH_CAUSE_FACILITY_NOT_SUBSCRIBED:
-               case SWITCH_CAUSE_OUTGOING_CALL_BARRED:
-               case SWITCH_CAUSE_INCOMING_CALL_BARRED:
-               case SWITCH_CAUSE_BEARERCAPABILITY_NOTAUTH:
-               case SWITCH_CAUSE_BEARERCAPABILITY_NOTAVAIL:
-               case SWITCH_CAUSE_SERVICE_UNAVAILABLE:
-               case SWITCH_CAUSE_BEARERCAPABILITY_NOTIMPL:
-               case SWITCH_CAUSE_CHAN_NOT_IMPLEMENTED:
-               case SWITCH_CAUSE_FACILITY_NOT_IMPLEMENTED:
-               case SWITCH_CAUSE_SERVICE_NOT_IMPLEMENTED:
-               case SWITCH_CAUSE_INVALID_CALL_REFERENCE:
-               case SWITCH_CAUSE_INCOMPATIBLE_DESTINATION:
-               case SWITCH_CAUSE_INVALID_MSG_UNSPECIFIED:
-               case SWITCH_CAUSE_MANDATORY_IE_MISSING:
-                       return RAYO_END_REASON_ERROR;
-
-               case SWITCH_CAUSE_MESSAGE_TYPE_NONEXIST:
-               case SWITCH_CAUSE_WRONG_MESSAGE:
-               case SWITCH_CAUSE_IE_NONEXIST:
-               case SWITCH_CAUSE_INVALID_IE_CONTENTS:
-               case SWITCH_CAUSE_WRONG_CALL_STATE:
-               case SWITCH_CAUSE_RECOVERY_ON_TIMER_EXPIRE:
-               case SWITCH_CAUSE_MANDATORY_IE_LENGTH_ERROR:
-               case SWITCH_CAUSE_PROTOCOL_ERROR:
-                       return RAYO_END_REASON_ERROR;
-
-               case SWITCH_CAUSE_INTERWORKING:
-               case SWITCH_CAUSE_SUCCESS:
-               case SWITCH_CAUSE_ORIGINATOR_CANCEL:
-                       return RAYO_END_REASON_HANGUP;
-
-               case SWITCH_CAUSE_CRASH:
-               case SWITCH_CAUSE_SYSTEM_SHUTDOWN:
-               case SWITCH_CAUSE_LOSE_RACE:
-               case SWITCH_CAUSE_MANAGER_REQUEST:
-               case SWITCH_CAUSE_BLIND_TRANSFER:
-               case SWITCH_CAUSE_ATTENDED_TRANSFER:
-               case SWITCH_CAUSE_ALLOTTED_TIMEOUT:
-               case SWITCH_CAUSE_USER_CHALLENGE:
-               case SWITCH_CAUSE_MEDIA_TIMEOUT:
-               case SWITCH_CAUSE_PICKED_OFF:
-               case SWITCH_CAUSE_USER_NOT_REGISTERED:
-               case SWITCH_CAUSE_PROGRESS_TIMEOUT:
-               case SWITCH_CAUSE_INVALID_GATEWAY:
-               case SWITCH_CAUSE_GATEWAY_DOWN:
-               case SWITCH_CAUSE_INVALID_URL:
-               case SWITCH_CAUSE_INVALID_PROFILE:
-               case SWITCH_CAUSE_NO_PICKUP:
-               case SWITCH_CAUSE_SRTP_READ_ERROR:
-                       return RAYO_END_REASON_ERROR;
-               default:
-                       break;
-       }
-       return RAYO_END_REASON_HANGUP;
-}
-
-/**
- * Add <header> to node
- * @param node to add <header> to
- * @param name of header
- * @param value of header
- */
-static void add_header(iks *node, const char *name, const char *value)
-{
-       if (!zstr(name) && !zstr(value)) {
-               iks *header = iks_insert(node, "header");
-               iks_insert_attrib(header, "name", name);
-               iks_insert_attrib(header, "value", value);
-       }
-}
-
-/**
- * Add SIP <header>s to node
- * @param node to add <header> to
- * @param event source
- * @param add_variables true if channel variables should be added
- */
-static void add_headers_to_event(iks *node, switch_event_t *event, int add_variables)
-{
-       switch_event_header_t *header;
-       /* get all variables prefixed with sip_h_ */
-       for (header = event->headers; header; header = header->next) {
-               if (!strncmp("variable_sip_h_", header->name, 15)) {
-                       if (!zstr(header->name)) {
-                               add_header(node, header->name + 15, header->value);
-                       }
-               } else if (add_variables && !strncmp("variable_", header->name, 9)) {
-                       if (!zstr(header->name)) {
-                               char header_name[1024];
-                               snprintf(header_name, 1024, "variable-%s", header->name + 9);
-                               add_header(node, header_name, header->value);
-                       }
-               }
-       }
-}
-
-/**
- * Add SIP <header>s to node
- * @param node to add <header> to
- * @param add_variables true if channel variables should be added
- */
-static void add_channel_headers_to_event(iks *node, switch_channel_t *channel, int add_variables)
-{
-       switch_event_header_t *var;
-
-       /* add all SIP header variables and (if configured) all other variables */
-       for (var = switch_channel_variable_first(channel); var; var = var->next) {
-               if (!strncmp("sip_h_", var->name, 6)) {
-                       add_header(node, var->name + 6, var->value);
-               }
-               if (add_variables) {
-                       char var_name[1024];
-                       snprintf(var_name, 1024, "variable-%s", var->name);
-                       add_header(node, var_name, var->value);
-               }
-       }
-       switch_channel_variable_last(channel);
-}
-
-static void pause_inbound_calling(void)
-{
-       int32_t arg = 1;
-       switch_mutex_lock(globals.clients_mutex);
-       switch_core_session_ctl(SCSC_PAUSE_INBOUND, &arg);
-       if (!globals.offline_logged) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Pausing inbound calling\n");
-               globals.offline_logged = 1;
-       }
-       switch_mutex_unlock(globals.clients_mutex);
-}
-
-static void resume_inbound_calling(void)
-{
-       int32_t arg = 0;
-       switch_mutex_lock(globals.clients_mutex);
-       switch_core_session_ctl(SCSC_PAUSE_INBOUND, &arg);
-       if (globals.offline_logged) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Resuming inbound calling\n");
-               globals.offline_logged = 0;
-       }
-       switch_mutex_unlock(globals.clients_mutex);
-}
-
-/**
- * Check online status of rayo client(s) and pause/resume the server
- */
-static void pause_when_offline(void)
-{
-       if (globals.pause_when_offline) {
-               int is_online = 0;
-               switch_hash_index_t *hi;
-
-               switch_mutex_lock(globals.clients_mutex);
-
-               for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(&hi)) {
-                       const void *key;
-                       void *client;
-                       switch_core_hash_this(hi, &key, NULL, &client);
-                       switch_assert(client);
-                       if (RAYO_CLIENT(client)->availability == PS_ONLINE) {
-                               is_online = 1;
-                               break;
-                       }
-               }
-               switch_safe_free(hi);
-
-               if (is_online) {
-                       resume_inbound_calling();
-               } else {
-                       pause_inbound_calling();
-               }
-
-               switch_mutex_unlock(globals.clients_mutex);
-       }
-}
-
-/**
- * Send event to clients
- * @param from event sender
- * @param rayo_event the event to send
- * @param online_only only send to online clients
- */
-static void broadcast_event(struct rayo_actor *from, iks *rayo_event, int online_only)
-{
-       switch_hash_index_t *hi = NULL;
-       switch_mutex_lock(globals.clients_mutex);
-       for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(&hi)) {
-               struct rayo_client *rclient;
-               const void *key;
-               void *val;
-               switch_core_hash_this(hi, &key, NULL, &val);
-               rclient = (struct rayo_client *)val;
-               switch_assert(rclient);
-
-               if (!online_only || rclient->availability == PS_ONLINE) {
-                       iks_insert_attrib(rayo_event, "to", RAYO_JID(rclient));
-                       RAYO_SEND_MESSAGE_DUP(from, RAYO_JID(rclient), rayo_event);
-               }
-       }
-       switch_mutex_unlock(globals.clients_mutex);
-}
-
-/**
- * Add an outbound dialing gateway
- * @param uri_prefix to match
- * @param dial_prefix to use
- * @param strip number of digits to strip from dialstring
- */
-static void dial_gateway_add(const char *uri_prefix, const char *dial_prefix, int strip)
-{
-       struct dial_gateway *gateway = switch_core_alloc(globals.pool, sizeof(*gateway));
-       gateway->uri_prefix = uri_prefix ? switch_core_strdup(globals.pool, uri_prefix) : "";
-       gateway->dial_prefix = dial_prefix ? switch_core_strdup(globals.pool, dial_prefix) : "";
-       gateway->strip = strip > 0 ? strip : 0;
-       switch_core_hash_insert(globals.dial_gateways, uri_prefix, gateway);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "dial-gateway uriprefix = %s, dialprefix = %s, strip = %i\n", uri_prefix, dial_prefix, strip);
-}
-
-/**
- * Find outbound dial gateway for the specified dialstring
- */
-static struct dial_gateway *dial_gateway_find(const char *uri)
-{
-       switch_hash_index_t *hi = NULL;
-       int match_len = 0;
-       struct dial_gateway *gateway = (struct dial_gateway *)switch_core_hash_find(globals.dial_gateways, "default");
-
-       /* find longest prefix match */
-       switch_mutex_lock(globals.dial_gateways_mutex);
-       for (hi = switch_core_hash_first(globals.dial_gateways); hi; hi = switch_core_hash_next(&hi)) {
-               struct dial_gateway *candidate = NULL;
-               const void *prefix;
-               int prefix_len = 0;
-               void *val;
-               switch_core_hash_this(hi, &prefix, NULL, &val);
-               candidate = (struct dial_gateway *)val;
-               switch_assert(candidate);
-
-               prefix_len = strlen(prefix);
-               if (!zstr(prefix) && !strncmp(prefix, uri, prefix_len) && prefix_len > match_len) {
-                       match_len = prefix_len;
-                       gateway = candidate;
-               }
-       }
-       switch_mutex_unlock(globals.dial_gateways_mutex);
-       return gateway;
-}
-
-/**
- * Add command handler function
- * @param name the command name
- * @param handler the command handler function
- */
-static void rayo_command_handler_add(const char *name, struct rayo_xmpp_handler *handler)
-{
-       char full_name[1024];
-       full_name[1023] = '\0';
-       snprintf(full_name, sizeof(full_name) - 1, "%s:%s:%s", handler->to_type, handler->to_subtype, name);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding command: %s\n", full_name);
-       switch_core_hash_insert(globals.command_handlers, full_name, handler);
-}
-
-/**
- * Add command handler function
- * @param type the actor type
- * @param subtype the actor subtype
- * @param name the command name
- * @param fn the command callback function
- */
-void rayo_actor_command_handler_add(const char *type, const char *subtype, const char *name, rayo_actor_xmpp_handler fn)
-{
-       struct rayo_xmpp_handler *handler = switch_core_alloc(globals.pool, sizeof (*handler));
-       handler->to_type = zstr(type) ? "" : switch_core_strdup(globals.pool, type);
-       handler->to_subtype = zstr(subtype) ? "" : switch_core_strdup(globals.pool, subtype);
-       handler->fn = fn;
-       rayo_command_handler_add(name, handler);
-}
-
-/**
- * Get command handler function from hash
- * @param hash the hash to search
- * @param msg the command
- * @return the command handler function or NULL
- */
-rayo_actor_xmpp_handler rayo_actor_command_handler_find(struct rayo_actor *actor, struct rayo_message *msg)
-{
-       iks *iq = msg->payload;
-       const char *iq_type = iks_find_attrib_soft(iq, "type");
-       iks *command = iks_first_tag(iq);
-       const char *name = "";
-       const char *namespace = "";
-       struct rayo_xmpp_handler *handler = NULL;
-       char full_name[1024];
-
-       full_name[1023] = '\0';
-       if (command) {
-               name = iks_name(command);
-               namespace = iks_find_attrib_soft(command, "xmlns");
-               if (zstr(name)) {
-                       name = "";
-               }
-       }
-
-       snprintf(full_name, sizeof(full_name) - 1, "%s:%s:%s:%s:%s", actor->type, actor->subtype, iq_type, namespace, name);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, looking for %s command\n", RAYO_JID(actor), full_name);
-       handler = (struct rayo_xmpp_handler *)switch_core_hash_find(globals.command_handlers, full_name);
-       if (handler) {
-               return handler->fn;
-       }
-
-       return NULL;
-}
-
-/**
- * Add event handler function
- * @param name the event name
- * @param handler the event handler function
- */
-static void rayo_event_handler_add(const char *name, struct rayo_xmpp_handler *handler)
-{
-       char full_name[1024];
-       full_name[1023] = '\0';
-       snprintf(full_name, sizeof(full_name) - 1, "%s:%s:%s:%s:%s", handler->from_type, handler->from_subtype, handler->to_type, handler->to_subtype, name);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding event: %s\n", full_name);
-       switch_core_hash_insert(globals.event_handlers, full_name, handler);
-}
-
-/**
- * Add event handler function
- * @param from_type the source actor type
- * @param from_subtype the source actor subtype
- * @param to_type the destination actor type
- * @param to_subtype the destination actor subtype
- * @param name the event name
- * @param fn the event callback function
- */
-void rayo_actor_event_handler_add(const char *from_type, const char *from_subtype, const char *to_type, const char *to_subtype, const char *name, rayo_actor_xmpp_handler fn)
-{
-       struct rayo_xmpp_handler *handler = switch_core_alloc(globals.pool, sizeof (*handler));
-       handler->from_type = zstr(from_type) ? "" : switch_core_strdup(globals.pool, from_type);
-       handler->from_subtype = zstr(from_subtype) ? "" : switch_core_strdup(globals.pool, from_subtype);
-       handler->to_type = zstr(to_type) ? "" : switch_core_strdup(globals.pool, to_type);
-       handler->to_subtype = zstr(to_subtype) ? "" : switch_core_strdup(globals.pool, to_subtype);
-       handler->fn = fn;
-       rayo_event_handler_add(name, handler);
-}
-
-/**
- * Get event handler function from hash
- * @param actor the event destination
- * @param msg the event
- * @return the event handler function or NULL
- */
-rayo_actor_xmpp_handler rayo_actor_event_handler_find(struct rayo_actor *actor, struct rayo_message *msg)
-{
-       iks *presence = msg->payload;
-       iks *event = iks_first_tag(presence);
-       if (event) {
-               struct rayo_xmpp_handler *handler = NULL;
-               const char *presence_type = iks_find_attrib_soft(presence, "type");
-               const char *event_name = iks_name(event);
-               const char *event_namespace = iks_find_attrib_soft(event, "xmlns");
-               char full_name[1024];
-               full_name[1023] = '\0';
-               if (zstr(event_name)) {
-                       return NULL;
-               }
-               snprintf(full_name, sizeof(full_name) - 1, "%s:%s:%s:%s:%s:%s:%s", msg->from_type, msg->from_subtype, actor->type, actor->subtype, presence_type, event_namespace, event_name);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s => %s, looking for %s event handler\n", msg->from_jid, RAYO_JID(actor), full_name);
-               handler = (struct rayo_xmpp_handler *)switch_core_hash_find(globals.event_handlers, full_name);
-               if (handler) {
-                       return handler->fn;
-               }
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s => %s, event missing child element\n", msg->from_jid, RAYO_JID(actor));
-       }
-       return NULL;
-}
-
-/**
- * Clean up a message
- * @param msg to destroy
- */
-void rayo_message_destroy(struct rayo_message *msg)
-{
-       if (msg) {
-               if (msg->payload) {
-                       iks_delete(msg->payload);
-               }
-               switch_safe_free(msg->to_jid);
-               switch_safe_free(msg->from_jid);
-               switch_safe_free(msg->from_type);
-               switch_safe_free(msg->from_subtype);
-               switch_safe_free(msg->file);
-               free(msg);
-       }
-}
-
-/**
- * Remove payload from message
- */
-iks *rayo_message_remove_payload(struct rayo_message *msg)
-{
-       iks *payload = msg->payload;
-       msg->payload = NULL;
-       msg->from = NULL;
-       msg->to = NULL;
-       return payload;
-}
-
-/**
- * Thread that delivers internal XMPP messages
- * @param thread this thread
- * @param obj unused
- * @return NULL
- */
-static void *SWITCH_THREAD_FUNC deliver_message_thread(switch_thread_t *thread, void *obj)
-{
-       struct rayo_message *msg = NULL;
-       switch_thread_rwlock_rdlock(globals.shutdown_rwlock);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "New message delivery thread\n");
-       while (!globals.shutdown) {
-               if (switch_queue_pop(globals.msg_queue, (void *)&msg) == SWITCH_STATUS_SUCCESS) {
-                       struct rayo_actor *actor = RAYO_LOCATE(msg->to_jid);
-                       if (actor) {
-                               /* deliver to actor */
-                               switch_mutex_lock(actor->mutex);
-                               switch_log_printf(SWITCH_CHANNEL_ID_LOG, msg->file, "", msg->line, "", SWITCH_LOG_DEBUG, "Deliver %s => %s %s\n", msg->from_jid, msg->to_jid, iks_string(iks_stack(msg->payload), msg->payload));
-                               actor->send_fn(actor, msg);
-                               switch_mutex_unlock(actor->mutex);
-                               RAYO_RELEASE(actor);
-                       } else if (!msg->is_reply) {
-                               /* unknown actor */
-                               RAYO_SEND_REPLY(globals.server, msg->from_jid, iks_new_error(msg->payload, STANZA_ERROR_ITEM_NOT_FOUND));
-                       }
-                       rayo_message_destroy(msg);
-               }
-       }
-
-       /* clean up remaining messages */
-       while(switch_queue_trypop(globals.msg_queue, (void *)&msg) == SWITCH_STATUS_SUCCESS) {
-               rayo_message_destroy(msg);
-       }
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Message delivery thread finished\n");
-       switch_thread_rwlock_unlock(globals.shutdown_rwlock);
-       return NULL;
-}
-
-/**
- * Create a new message thread
- * @param pool to use
- */
-static void start_deliver_message_thread(switch_memory_pool_t *pool)
-{
-       switch_thread_t *thread;
-       switch_threadattr_t *thd_attr = NULL;
-       switch_threadattr_create(&thd_attr, pool);
-       switch_threadattr_detach_set(thd_attr, 1);
-       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-       switch_thread_create(&thread, thd_attr, deliver_message_thread, NULL, pool);
-}
-
-/**
- * Stop all threads
- */
-static void stop_all_threads(void)
-{
-       globals.shutdown = 1;
-       if (globals.msg_queue) {
-               switch_queue_interrupt_all(globals.msg_queue);
-       }
-       if (globals.offer_queue) {
-               switch_queue_interrupt_all(globals.offer_queue);
-       }
-       if (globals.shutdown_rwlock) {
-               switch_thread_rwlock_wrlock(globals.shutdown_rwlock);
-       }
-}
-
-/**
- * Send message to actor addressed by JID
- * @param from actor sending the message
- * @param to destination JID
- * @param payload the message payload to deliver
- * @param dup true if payload is to be copied
- * @param reply true if a reply
- * @param file file name
- * @param line line number
- */
-void rayo_message_send(struct rayo_actor *from, const char *to, iks *payload, int dup, int reply, const char *file, int line)
-{
-       const char *msg_name;
-       struct rayo_message *msg = malloc(sizeof(*msg));
-       switch_assert(msg);
-       if (dup) {
-               msg->payload = iks_copy(payload);
-       } else {
-               msg->payload = payload;
-       }
-       msg->is_reply = reply;
-       msg->to_jid = strdup(zstr(to) ? "" : to);
-       if (!zstr(msg->to_jid)) {
-               msg->to = iks_id_new(iks_stack(msg->payload), msg->to_jid);
-       }
-       msg->from_jid = strdup(RAYO_JID(from));
-       if (!zstr(msg->from_jid)) {
-               msg->from = iks_id_new(iks_stack(msg->payload), msg->from_jid);
-       }
-       msg->from_type = strdup(zstr(from->type) ? "" : from->type);
-       msg->from_subtype = strdup(zstr(from->subtype) ? "" : from->subtype);
-       msg->file = strdup(file);
-       msg->line = line;
-
-       /* add timestamp to presence events */
-       msg_name = iks_name(msg->payload);
-       if (!zstr(msg_name) && !strcmp("presence", msg_name)) {
-               /* don't add timestamp if there already is one */
-               iks *delay = iks_find(msg->payload, "delay");
-               if (!delay || strcmp("urn:xmpp:delay", iks_find_attrib_soft(delay, "xmlns"))) {
-                       switch_time_exp_t tm;
-                       char timestamp[80];
-                       switch_size_t retsize;
-                       delay = iks_insert(msg->payload, "delay");
-                       iks_insert_attrib(delay, "xmlns", "urn:xmpp:delay");
-                       switch_time_exp_tz(&tm, switch_time_now(), 0);
-                       switch_strftime_nocheck(timestamp, &retsize, sizeof(timestamp), "%Y-%m-%dT%TZ", &tm);
-                       iks_insert_attrib_printf(delay, "stamp", "%s", timestamp);
-               }
-       }
-
-       if (switch_queue_trypush(globals.msg_queue, msg) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "failed to queue message!\n");
-               rayo_message_destroy(msg);
-       }
-}
-
-/**
- * Get access to Rayo actor with JID.
- * @param jid the JID
- * @return the actor or NULL.  Call RAYO_RELEASE() when done with pointer.
- */
-struct rayo_actor *rayo_actor_locate(const char *jid, const char *file, int line)
-{
-       struct rayo_actor *actor = NULL;
-       switch_mutex_lock(globals.actors_mutex);
-       if (!strncmp("xmpp:", jid, 5)) {
-               jid = jid + 5;
-       }
-       actor = (struct rayo_actor *)switch_core_hash_find(globals.actors, jid);
-       if (actor) {
-               if (!actor->destroy) {
-                       actor->ref_count++;
-                       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Locate (jid) %s: ref count = %i\n", RAYO_JID(actor), actor->ref_count);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_WARNING, "Locate (jid) %s: already marked for destruction!\n", jid);
-                       actor = NULL;
-               }
-       }
-       switch_mutex_unlock(globals.actors_mutex);
-       return actor;
-}
-
-/**
- * Get exclusive access to Rayo actor with internal ID
- * @param id the internal ID
- * @return the actor or NULL.  Call RAYO_RELEASE() when done with pointer.
- */
-struct rayo_actor *rayo_actor_locate_by_id(const char *id, const char *file, int line)
-{
-       struct rayo_actor *actor = NULL;
-       if (!zstr(id)) {
-               switch_mutex_lock(globals.actors_mutex);
-               actor = (struct rayo_actor *)switch_core_hash_find(globals.actors_by_id, id);
-               if (actor) {
-                       if (!actor->destroy) {
-                               actor->ref_count++;
-                               switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Locate (id) %s: ref count = %i\n", RAYO_JID(actor), actor->ref_count);
-                       } else {
-                               switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_WARNING, "Locate (id) %s: already marked for destruction!\n", id);
-                               actor = NULL;
-                       }
-               }
-               switch_mutex_unlock(globals.actors_mutex);
-       }
-       return actor;
-}
-
-/**
- * Destroy a rayo actor
- */
-void rayo_actor_destroy(struct rayo_actor *actor, const char *file, int line)
-{
-       switch_memory_pool_t *pool = actor->pool;
-       switch_mutex_lock(globals.actors_mutex);
-       if (!actor->destroy) {
-               switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Destroy %s requested: ref_count = %i\n", RAYO_JID(actor), actor->ref_count);
-               switch_core_hash_delete(globals.actors, RAYO_JID(actor));
-               if (!zstr(actor->id)) {
-                       switch_core_hash_delete(globals.actors_by_id, actor->id);
-               }
-       }
-       actor->destroy = 1;
-       if (actor->ref_count <= 0) {
-               if (actor->ref_count < 0) {
-                       /* too many unlocks detected! */
-                       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_WARNING, "Destroying %s, ref_count = %i\n", RAYO_JID(actor), actor->ref_count);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Destroying %s\n", RAYO_JID(actor));
-               }
-               switch_core_hash_delete(globals.destroy_actors, RAYO_JID(actor));
-               switch_mutex_unlock(globals.actors_mutex);
-               /* safe to destroy parent now */
-               if (actor->cleanup_fn) {
-                       actor->cleanup_fn(actor);
-               }
-               if (actor->parent) {
-                       RAYO_RELEASE(actor->parent);
-               }
-               switch_core_destroy_memory_pool(&pool);
-       } else {
-               switch_core_hash_insert(globals.destroy_actors, RAYO_JID(actor), actor);
-               switch_mutex_unlock(globals.actors_mutex);
-       }
-}
-
-/**
- * Increment actor ref count - locks from destruction.
- */
-void rayo_actor_retain(struct rayo_actor *actor, const char *file, int line)
-{
-       if (actor) {
-               switch_mutex_lock(globals.actors_mutex);
-               actor->ref_count++;
-               switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Lock %s: ref count = %i\n", RAYO_JID(actor), actor->ref_count);
-               switch_mutex_unlock(globals.actors_mutex);
-       }
-}
-
-/**
- * Release rayo actor reference
- */
-void rayo_actor_release(struct rayo_actor *actor, const char *file, int line)
-{
-       if (actor) {
-               switch_mutex_lock(globals.actors_mutex);
-               actor->ref_count--;
-               if (actor->ref_count < 0) {
-                       /* too many unlocks detected! */
-                       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_WARNING, "Release %s: ref count = %i\n", RAYO_JID(actor), actor->ref_count);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Release %s: ref count = %i\n", RAYO_JID(actor), actor->ref_count);
-               }
-               if (actor->ref_count <= 0 && actor->destroy) {
-                       rayo_actor_destroy(actor, file, line);
-               }
-               switch_mutex_unlock(globals.actors_mutex);
-       }
-}
-
-/**
- * Get next number in sequence
- */
-int rayo_actor_seq_next(struct rayo_actor *actor)
-{
-       int seq;
-       switch_mutex_lock(actor->mutex);
-       seq = actor->seq++;
-       switch_mutex_unlock(actor->mutex);
-       return seq;
-}
-
-#define RAYO_CALL_LOCATE(call_uri) rayo_call_locate(call_uri, __FILE__, __LINE__)
-/**
- * Get access to Rayo call data.  Use to access call data outside channel thread.
- * @param call_uri the Rayo XMPP URI
- * @return the call or NULL.
- */
-static struct rayo_call *rayo_call_locate(const char *call_uri, const char *file, int line)
-{
-       struct rayo_actor *actor = rayo_actor_locate(call_uri, file, line);
-       if (actor && is_call_actor(actor)) {
-               return RAYO_CALL(actor);
-       } else if (actor) {
-               RAYO_RELEASE(actor);
-       }
-       return NULL;
-}
-
-#define RAYO_CALL_LOCATE_BY_ID(call_uuid) rayo_call_locate_by_id(call_uuid, __FILE__, __LINE__)
-/**
- * Get access to Rayo call data.  Use to access call data outside channel thread.
- * @param call_uuid the FreeSWITCH call UUID
- * @return the call or NULL.
- */
-static struct rayo_call *rayo_call_locate_by_id(const char *call_uuid, const char *file, int line)
-{
-       struct rayo_actor *actor = rayo_actor_locate_by_id(call_uuid, file, line);
-       if (actor && is_call_actor(actor)) {
-               return RAYO_CALL(actor);
-       } else if (actor) {
-               RAYO_RELEASE(actor);
-       }
-       return NULL;
-}
-
-/**
- * Send <end> event to DCP and PCPs
- */
-static void rayo_call_send_end(struct rayo_call *call, switch_event_t *event, int local_hangup, const char *cause_str, const char *cause_q850_str)
-{
-       int no_offered_clients = 1;
-       switch_hash_index_t *hi = NULL;
-       iks *revent;
-       iks *end;
-       const char *dcp_jid = rayo_call_get_dcp_jid(call);
-
-       /* build call end event */
-       revent = iks_new_presence("end", RAYO_NS, RAYO_JID(call), "foo");
-       iks_insert_attrib(revent, "type", "unavailable");
-       end = iks_find(revent, "end");
-
-       if (local_hangup) {
-               iks_insert(end, RAYO_END_REASON_HANGUP_LOCAL);
-       } else {
-               /* remote hangup... translate to specific rayo reason */
-               iks *reason;
-               switch_call_cause_t cause = SWITCH_CAUSE_NONE;
-               if (!zstr(cause_str)) {
-                       cause = switch_channel_str2cause(cause_str);
-               }
-               reason = iks_insert(end, switch_cause_to_rayo_cause(cause));
-               if (!zstr(cause_q850_str)) {
-                       iks_insert_attrib(reason, "platform-code", cause_q850_str);
-               }
-       }
-
-       #if 0
-       if (event) {
-               char *event_str;
-               if (switch_event_serialize(event, &event_str, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "%s\n", event_str);
-                       switch_safe_free(event_str);
-               }
-       }
-       #endif
-
-       /* add signaling headers */
-       if (event) {
-               add_headers_to_event(end, event, globals.add_variables_to_events);
-       }
-
-       /* send <end> to all offered clients */
-       for (hi = switch_core_hash_first(call->pcps); hi; hi = switch_core_hash_next(&hi)) {
-               const void *key;
-               void *val;
-               const char *client_jid = NULL;
-               switch_core_hash_this(hi, &key, NULL, &val);
-               client_jid = (const char *)key;
-               switch_assert(client_jid);
-               iks_insert_attrib(revent, "to", client_jid);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "Sending <end> to offered client %s\n", client_jid);
-               RAYO_SEND_MESSAGE_DUP(call, client_jid, revent);
-               no_offered_clients = 0;
-       }
-
-       if (no_offered_clients && !zstr(dcp_jid)) {
-               /* send to DCP only */
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "Sending <end> to DCP %s\n", dcp_jid);
-               iks_insert_attrib(revent, "to", dcp_jid);
-               RAYO_SEND_MESSAGE_DUP(call, dcp_jid, revent);
-       }
-
-       iks_delete(revent);
-}
-
-/**
- * Fire <end> event when call is cleaned up completely
- */
-static void rayo_call_cleanup(struct rayo_actor *actor)
-{
-       struct rayo_call *call = RAYO_CALL(actor);
-       switch_event_t *event = call->end_event;
-       const char *dcp_jid = rayo_call_get_dcp_jid(call);
-
-       if (!event || call->dial_request_failed) {
-               /* destroyed before FS session was created (in originate, for example) */
-               goto done;
-       }
-
-       /* send call unjoined event, if not already sent */
-       if (call->joined && call->joined_id) {
-               if (!zstr(dcp_jid)) {
-                       iks *unjoined;
-                       iks *uevent = iks_new_presence("unjoined", RAYO_NS, RAYO_JID(call), dcp_jid);
-                       unjoined = iks_find(uevent, "unjoined");
-                       iks_insert_attrib_printf(unjoined, "call-uri", "%s", call->joined_id);
-                       RAYO_SEND_MESSAGE(call, dcp_jid, uevent);
-               }
-       }
-
-       rayo_call_send_end(call,
-               event,
-               switch_true(switch_event_get_header(event, "variable_rayo_local_hangup")),
-               switch_event_get_header(event, "variable_hangup_cause"),
-               switch_event_get_header(event, "variable_hangup_cause_q850"));
-
-done:
-
-       /* lost the race: pending join failed... send IQ result to client now. */
-       if (call->pending_join_request) {
-               iks *request = call->pending_join_request;
-               iks *result = iks_new_error_detailed(request, STANZA_ERROR_ITEM_NOT_FOUND, "call ended");
-               call->pending_join_request = NULL;
-               RAYO_SEND_REPLY(call, iks_find_attrib_soft(request, "from"), result);
-               iks_delete(call->pending_join_request);
-       }
-
-       if (event) {
-               switch_event_destroy(&event);
-       }
-       if (call->answer_event) {
-               switch_event_destroy(&call->answer_event);
-       }
-       switch_core_hash_destroy(&call->pcps);
-       switch_core_hash_destroy(&call->acps);
-}
-
-/**
- * @param call the Rayo call
- * @return the Rayo call DCP JID
- */
-const char *rayo_call_get_dcp_jid(struct rayo_call *call)
-{
-       return call->dcp_jid;
-}
-
-/**
- * @param call the Rayo call
- * @return true if joined (or a join is in progress)
- */
-int rayo_call_is_joined(struct rayo_call *call)
-{
-       return call->joined || call->pending_join_request;
-}
-
-/**
- * @param call to check if faxing
- * @return true if faxing is in progress
- */
-int rayo_call_is_faxing(struct rayo_call *call)
-{
-       return call->faxing;
-}
-
-/**
- * Set faxing flag
- * @param call the call to flag
- * @param faxing true if faxing is in progress
- */
-void rayo_call_set_faxing(struct rayo_call *call, int faxing)
-{
-       call->faxing = faxing;
-}
-
-#define RAYO_MIXER_LOCATE(mixer_name) rayo_mixer_locate(mixer_name, __FILE__, __LINE__)
-/**
- * Get access to Rayo mixer data.
- * @param mixer_name the mixer name
- * @return the mixer or NULL. Call RAYO_RELEASE() when done with mixer pointer.
- */
-static struct rayo_mixer *rayo_mixer_locate(const char *mixer_name, const char *file, int line)
-{
-       struct rayo_actor *actor = rayo_actor_locate_by_id(mixer_name, file, line);
-       if (actor && !strcmp(RAT_MIXER, actor->type)) {
-               return RAYO_MIXER(actor);
-       } else if (actor) {
-               RAYO_RELEASE(actor);
-       }
-       return NULL;
-}
-
-/**
- * Default message handler - drops messages
- */
-void rayo_actor_send_ignore(struct rayo_actor *to, struct rayo_message *msg)
-{
-       switch_log_printf(SWITCH_CHANNEL_ID_LOG, msg->file, "", msg->line, "", SWITCH_LOG_WARNING, "%s, dropping unexpected message to %s.\n", msg->from_jid, RAYO_JID(to));
-}
-
-#define RAYO_ACTOR_INIT(actor, pool, type, subtype, id, jid, cleanup, send) rayo_actor_init(actor, pool, type, subtype, id, jid, cleanup, send, NULL, __FILE__, __LINE__)
-#define RAYO_ACTOR_INIT_PARENT(actor, pool, type, subtype, id, jid, cleanup, send, parent) rayo_actor_init(actor, pool, type, subtype, id, jid, cleanup, send, parent, __FILE__, __LINE__)
-
-/**
- * Initialize a rayo actor
- * @param actor to initialize
- * @param pool to use
- * @param type of actor (MIXER, CALL, SERVER, COMPONENT)
- * @param subtype of actor (input/output/prompt)
- * @param id internal ID
- * @param jid external ID
- * @param cleanup function
- * @param send sent message handler
- * @param parent of actor
- * @param file that called this function
- * @param line that called this function
- * @return the actor or NULL if JID conflict
- */
-static struct rayo_actor *rayo_actor_init(struct rayo_actor *actor, switch_memory_pool_t *pool, const char *type, const char *subtype, const char *id, const char *jid, rayo_actor_cleanup_fn cleanup, rayo_actor_send_fn send, struct rayo_actor *parent, const char *file, int line)
-{
-       char *domain;
-       actor->type = switch_core_strdup(pool, type);
-       actor->subtype = switch_core_strdup(pool, subtype);
-       actor->pool = pool;
-       if (!zstr(id)) {
-               actor->id = switch_core_strdup(pool, id);
-       }
-       /* TODO validate JID with regex */
-       if (!zstr(jid)) {
-               RAYO_JID(actor) = switch_core_strdup(pool, jid);
-               if (!(domain = strrchr(RAYO_JID(actor), '@'))) {
-                       RAYO_DOMAIN(actor) = RAYO_JID(actor);
-               } else if (!zstr(++domain)) {
-                       RAYO_DOMAIN(actor) = switch_core_strdup(pool, domain);
-                       /* strip resource from domain if it exists */
-                       domain = strrchr(RAYO_DOMAIN(actor), '/');
-                       if (domain) {
-                               *domain = '\0';
-                       }
-               }
-       }
-       actor->seq = 1;
-       actor->ref_count = 1;
-       actor->destroy = 0;
-       actor->cleanup_fn = cleanup;
-       if (send == NULL) {
-               actor->send_fn = rayo_actor_send_ignore;
-       } else {
-               actor->send_fn = send;
-       }
-
-       actor->parent = parent;
-       if (!actor->parent) {
-               switch_mutex_init(&actor->mutex, SWITCH_MUTEX_NESTED, pool);
-       } else {
-               /* inherit mutex from parent */
-               actor->mutex = actor->parent->mutex;
-
-               /* prevent parent destruction */
-               RAYO_RETAIN(actor->parent);
-       }
-
-       /* add to hash of actors, so commands can route to call */
-       switch_mutex_lock(globals.actors_mutex);
-       if (!zstr(jid)) {
-               if (switch_core_hash_find(globals.actors, RAYO_JID(actor))) {
-                       /* duplicate JID, give up! */
-                       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_NOTICE, "JID conflict! %s\n", RAYO_JID(actor));
-                       switch_mutex_unlock(globals.actors_mutex);
-                       if (actor->parent) {
-                               /* unlink from parent */
-                               RAYO_RELEASE(actor->parent);
-                               actor->parent = NULL;
-                       }
-                       return NULL;
-               }
-               switch_core_hash_insert(globals.actors, RAYO_JID(actor), actor);
-       }
-       if (!zstr(id)) {
-               if (switch_core_hash_find(globals.actors_by_id, actor->id)) {
-                       /* duplicate ID - only log for now... */
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "ID conflict! %s\n", actor->id);
-               }
-               switch_core_hash_insert(globals.actors_by_id, actor->id, actor);
-       }
-       switch_mutex_unlock(globals.actors_mutex);
-
-       switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, "", line, "", SWITCH_LOG_DEBUG, "Init %s\n", RAYO_JID(actor));
-
-       return actor;
-}
-
-/**
- * Initialize rayo call
- * @return the call or NULL if JID conflict
- */
-static struct rayo_call *rayo_call_init(struct rayo_call *call, switch_memory_pool_t *pool, const char *uuid, const char *file, int line)
-{
-       char *call_jid;
-       char uuid_id_buf[SWITCH_UUID_FORMATTED_LENGTH + 1];
-
-       if (zstr(uuid)) {
-               switch_uuid_str(uuid_id_buf, sizeof(uuid_id_buf));
-               uuid = uuid_id_buf;
-       }
-       call_jid = switch_mprintf("%s@%s", uuid, RAYO_JID(globals.server));
-
-       call = RAYO_CALL(rayo_actor_init(RAYO_ACTOR(call), pool, RAT_CALL, "", uuid, call_jid, rayo_call_cleanup, rayo_call_send, NULL, file, line));
-       if (call) {
-               call->dcp_jid = "";
-               call->idle_start_time = switch_micro_time_now();
-               call->joined = 0;
-               call->joined_id = NULL;
-               call->ringing_sent = 0;
-               call->pending_join_request = NULL;
-               call->dial_request_id = NULL;
-               call->end_event = NULL;
-               call->dial_request_failed = 0;
-               call->rayo_app_started = 0;
-               call->answer_event = NULL;
-               switch_core_hash_init(&call->pcps);
-               switch_core_hash_init(&call->acps);
-               call->num_acps = 0;
-       }
-
-       switch_safe_free(call_jid);
-
-       return call;
-}
-
-#define rayo_call_create(uuid) _rayo_call_create(uuid, __FILE__, __LINE__)
-/**
- * Create Rayo call
- * @param uuid uuid to assign call, if NULL one is picked
- * @param file file that called this function
- * @param line number of file that called this function
- * @return the call, or NULL if JID conflict
- */
-static struct rayo_call *_rayo_call_create(const char *uuid, const char *file, int line)
-{
-       switch_memory_pool_t *pool;
-       struct rayo_call *call;
-       switch_core_new_memory_pool(&pool);
-       call = switch_core_alloc(pool, sizeof(*call));
-       call = rayo_call_init(call, pool, uuid, file, line);
-       if (!call) {
-               switch_core_destroy_memory_pool(&pool);
-       }
-       return call;
-}
-
-/**
- * Mixer destructor
- */
-static void rayo_mixer_cleanup(struct rayo_actor *actor)
-{
-       struct rayo_mixer *mixer = RAYO_MIXER(actor);
-       switch_core_hash_destroy(&mixer->members);
-       switch_core_hash_destroy(&mixer->subscribers);
-}
-
-/**
- * Initialize mixer
- * @return the mixer or NULL if JID conflict
- */
-static struct rayo_mixer *rayo_mixer_init(struct rayo_mixer *mixer, switch_memory_pool_t *pool, const char *name, const char *file, int line)
-{
-       char *mixer_jid = switch_mprintf("%s@%s", name, RAYO_JID(globals.server));
-       mixer = RAYO_MIXER(rayo_actor_init(RAYO_ACTOR(mixer), pool, RAT_MIXER, "", name, mixer_jid, rayo_mixer_cleanup, rayo_mixer_send, NULL, file, line));
-       if (mixer) {
-               switch_core_hash_init(&mixer->members);
-               switch_core_hash_init(&mixer->subscribers);
-       }
-       switch_safe_free(mixer_jid);
-       return mixer;
-}
-
-#define rayo_mixer_create(name) _rayo_mixer_create(name, __FILE__, __LINE__)
-/**
- * Create Rayo mixer
- * @param name of this mixer
- * @return the mixer or NULL if JID conflict
- */
-static struct rayo_mixer *_rayo_mixer_create(const char *name, const char *file, int line)
-{
-       switch_memory_pool_t *pool;
-       struct rayo_mixer *mixer = NULL;
-       switch_core_new_memory_pool(&pool);
-       mixer = rayo_mixer_init(switch_core_alloc(pool, sizeof(*mixer)), pool, name, file, line);
-       if (!mixer) {
-               switch_core_destroy_memory_pool(&pool);
-       }
-       return mixer;
-}
-
-/**
- * Initialize Rayo component
- * @param type of this component
- * @param subtype of this component
- * @param id internal ID of this component
- * @param parent the parent that owns this component
- * @param client_jid the client that created this component
- * @param cleanup optional cleanup function
- * @param file file that called this function
- * @param line line number that called this function
- * @return the component or NULL if JID conflict
- */
-struct rayo_component *_rayo_component_init(struct rayo_component *component, switch_memory_pool_t *pool, const char *type, const char *subtype, const char *id, struct rayo_actor *parent, const char *client_jid, rayo_actor_cleanup_fn cleanup, const char *file, int line)
-{
-       char *ref = switch_mprintf("%s-%d", subtype, rayo_actor_seq_next(parent));
-       char *jid = switch_mprintf("%s/%s", RAYO_JID(parent), ref);
-       if (zstr(id)) {
-               id = jid;
-       }
-
-       component = RAYO_COMPONENT(rayo_actor_init(RAYO_ACTOR(component), pool, type, subtype, id, jid, cleanup, rayo_component_send, parent, file, line));
-       if (component) {
-               component->client_jid = switch_core_strdup(pool, client_jid);
-               component->ref = switch_core_strdup(pool, ref);
-       }
-
-       switch_safe_free(ref);
-       switch_safe_free(jid);
-       return component;
-}
-
-/**
- * Send XMPP message to client
- */
-void rayo_client_send(struct rayo_actor *client, struct rayo_message *msg)
-{
-       xmpp_stream_context_send(globals.xmpp_context, RAYO_CLIENT(client)->route, msg->payload);
-}
-
-/**
- * Cleanup rayo client
- */
-static void rayo_client_cleanup(struct rayo_actor *actor)
-{
-       /* remove session from map */
-       switch_mutex_lock(globals.clients_mutex);
-       if (!zstr(RAYO_JID(actor))) {
-               switch_core_hash_delete(globals.clients_roster, RAYO_JID(actor));
-               if (RAYO_CLIENT(actor)->peer_server) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Removing %s from peer server %s\n", RAYO_JID(actor), RAYO_JID(RAYO_CLIENT(actor)->peer_server));
-                       switch_core_hash_delete(RAYO_CLIENT(actor)->peer_server->clients, RAYO_JID(actor));
-               }
-       }
-       switch_mutex_unlock(globals.clients_mutex);
-
-       pause_when_offline();
-}
-
-/**
- * Initialize rayo client
- * @param pool the memory pool for this client
- * @param jid for this client
- * @param route to this client
- * @param availability of client
- * @param send message transmission function
- * @param peer_server NULL if locally connected client
- * @return the new client or NULL if JID conflict
- */
-static struct rayo_client *rayo_client_init(struct rayo_client *client, switch_memory_pool_t *pool, const char *jid, const char *route, enum presence_status availability, rayo_actor_send_fn send, struct rayo_peer_server *peer_server)
-{
-       client = RAYO_CLIENT(RAYO_ACTOR_INIT(RAYO_ACTOR(client), pool, RAT_CLIENT, "", jid, jid, rayo_client_cleanup, send));
-       if (client) {
-               client->availability = availability;
-               client->peer_server = peer_server;
-               client->last_probe = 0;
-               if (route) {
-                       client->route = switch_core_strdup(pool, route);
-               }
-
-               /* make client available for offers */
-               switch_mutex_lock(globals.clients_mutex);
-               switch_core_hash_insert(globals.clients_roster, RAYO_JID(client), client);
-               if (peer_server) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Adding %s to peer server %s\n", RAYO_JID(client), RAYO_JID(peer_server));
-                       switch_core_hash_insert(peer_server->clients, RAYO_JID(client), client);
-               }
-               switch_mutex_unlock(globals.clients_mutex);
-       }
-
-       pause_when_offline();
-
-       return client;
-}
-
-/**
- * Create a new Rayo client
- * @param jid for this client
- * @param route to this client
- * @param availability of client
- * @param send message transmission function
- * @param peer_server NULL if locally connected client
- * @return the new client or NULL
- */
-static struct rayo_client *rayo_client_create(const char *jid, const char *route, enum presence_status availability, rayo_actor_send_fn send, struct rayo_peer_server *peer_server)
-{
-       switch_memory_pool_t *pool;
-       struct rayo_client *rclient = NULL;
-
-       switch_core_new_memory_pool(&pool);
-       if (!(rclient = switch_core_alloc(pool, sizeof(*rclient)))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error\n");
-               return NULL;
-       }
-       rclient = rayo_client_init(rclient, pool, jid, route, availability, send, peer_server);
-       if (!rclient) {
-               switch_core_destroy_memory_pool(&pool);
-       }
-       return rclient;
-}
-
-/**
- * Send XMPP message to peer server
- */
-void rayo_peer_server_send(struct rayo_actor *server, struct rayo_message *msg)
-{
-       xmpp_stream_context_send(globals.xmpp_context, RAYO_JID(server), msg->payload);
-}
-
-/**
- * Destroy peer server and its associated clients
- */
-static void rayo_peer_server_cleanup(struct rayo_actor *actor)
-{
-       switch_hash_index_t *hi = NULL;
-       struct rayo_peer_server *rserver = RAYO_PEER_SERVER(actor);
-
-       /* a little messy... client will remove itself from the peer server when it is destroyed,
-        * however, there is no guarantee the client will actually be destroyed now so
-        * the server must remove the client.
-        */
-       switch_mutex_lock(globals.clients_mutex);
-       while ((hi = switch_core_hash_first_iter(rserver->clients, hi))) {
-               const void *key;
-               void *client;
-               switch_core_hash_this(hi, &key, NULL, &client);
-               switch_assert(client);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Removing %s from peer server %s\n", RAYO_JID(client), RAYO_JID(rserver));
-               switch_core_hash_delete(rserver->clients, key);
-               RAYO_CLIENT(client)->peer_server = NULL;
-               RAYO_RELEASE(client);
-               RAYO_DESTROY(client);
-       }
-       switch_core_hash_destroy(&rserver->clients);
-       switch_mutex_unlock(globals.clients_mutex);
-}
-
-/**
- * Create a new Rayo peer server
- * @param jid of this server
- * @return the peer server
- */
-static struct rayo_peer_server *rayo_peer_server_create(const char *jid)
-{
-       switch_memory_pool_t *pool;
-       struct rayo_peer_server *rserver = NULL;
-
-       switch_core_new_memory_pool(&pool);
-       if (!(rserver = switch_core_alloc(pool, sizeof(*rserver)))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error\n");
-               return NULL;
-       }
-       rserver = RAYO_PEER_SERVER(RAYO_ACTOR_INIT(RAYO_ACTOR(rserver), pool, RAT_PEER_SERVER, "", jid, jid, rayo_peer_server_cleanup, rayo_peer_server_send));
-       if (rserver) {
-               switch_core_hash_init(&rserver->clients);
-       } else {
-               switch_core_destroy_memory_pool(&pool);
-       }
-       return rserver;
-}
-
-/**
- * Check if message sender has control of offered call.
- * @param call the Rayo call
- * @param msg the message
- * @return 1 if sender has call control, 0 if sender does not have control
- */
-static int has_call_control(struct rayo_call *call, struct rayo_message *msg)
-{
-       return (!strcmp(rayo_call_get_dcp_jid(call), msg->from_jid) || is_internal_message(msg) || is_admin_client_message(msg));
-}
-
-/**
- * Check if message sender has control of offered call. Take control if nobody else does.
- * @param call the Rayo call
- * @param session the session
- * @param msg the message
- * @return 1 if sender has call control
- */
-static int take_call_control(struct rayo_call *call, switch_core_session_t *session, struct rayo_message *msg)
-{
-       int control = 0;
-
-       /* nobody in charge */
-       if (zstr(call->dcp_jid)) {
-               /* was offered to this session? */
-               if (!zstr(msg->from_jid) && switch_core_hash_find(call->pcps, msg->from_jid)) {
-                       /* take charge */
-                       call->dcp_jid = switch_core_strdup(RAYO_POOL(call), msg->from_jid);
-                       switch_channel_set_variable(switch_core_session_get_channel(session), "rayo_dcp_jid", rayo_call_get_dcp_jid(call));
-                       control = 1;
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_INFO, "%s has control of call\n", rayo_call_get_dcp_jid(call));
-               }
-       } else if (has_call_control(call, msg)) {
-               control = 1;
-       }
-
-       if (!control) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_INFO, "%s does not have control of call\n", msg->from_jid);
-       }
-
-       return control;
-}
-
-/**
- * Check Rayo server command for errors.
- * @param server the server
- * @param msg the command
- * @return 1 if OK
- */
-static iks *rayo_server_command_ok(struct rayo_actor *server, struct rayo_message *msg)
-{
-       iks *node = msg->payload;
-       iks *response = NULL;
-       int bad = zstr(iks_find_attrib(node, "id"));
-
-       if (bad) {
-               response = iks_new_error(node, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       return response;
-}
-
-/**
- * Check Rayo call command for errors.
- * @param call the Rayo call
- * @param session the session
- * @param msg the command
- * @return 1 if OK
- */
-static iks *rayo_call_command_ok(struct rayo_call *call, switch_core_session_t *session, struct rayo_message *msg)
-{
-       iks *node = msg->payload;
-       iks *response = NULL;
-       int bad = zstr(iks_find_attrib(node, "id"));
-
-       if (bad) {
-               response = iks_new_error(node, STANZA_ERROR_BAD_REQUEST);
-       } else if (!take_call_control(call, session, msg)) {
-               response = iks_new_error(node, STANZA_ERROR_CONFLICT);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, %s conflict\n", msg->from_jid, RAYO_JID(call));
-       }
-
-       return response;
-}
-
-/**
- * Check Rayo component command for errors.
- * @param component the component
- * @param msg the command
- * @return 0 if error
- */
-static iks *rayo_component_command_ok(struct rayo_component *component, struct rayo_message *msg)
-{
-       iks *node = msg->payload;
-       iks *response = NULL;
-       char *from = iks_find_attrib(node, "from");
-       int bad = zstr(iks_find_attrib(node, "id"));
-
-       if (bad) {
-               response = iks_new_error(node, STANZA_ERROR_BAD_REQUEST);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, %s bad request\n", msg->from_jid, RAYO_JID(component));
-       } else if (strcmp(component->client_jid, from) && !is_admin_client_message(msg) && !is_internal_message(msg)) {
-               /* does not have control of this component */
-               response = iks_new_error(node, STANZA_ERROR_CONFLICT);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, %s conflict\n", msg->from_jid, RAYO_JID(component));
-       }
-
-       return response;
-}
-
-/**
- * Handle server message
- */
-void rayo_server_send(struct rayo_actor *server, struct rayo_message *msg)
-{
-       iks *response = NULL;
-       rayo_actor_xmpp_handler handler = NULL;
-       iks *iq = msg->payload;
-
-       if (!strcmp("presence", iks_name(iq))) {
-               /* this is a hack - message from internal console */
-               struct rayo_actor *client = RAYO_LOCATE(msg->from_jid);
-               if (client) {
-                       if (!strcmp(RAT_CLIENT, client->type)) {
-                               on_client_presence(RAYO_CLIENT(client), iq);
-                       }
-                       RAYO_RELEASE(client);
-               }
-               return;
-       }
-
-       /* is this a command a server supports? */
-       handler = rayo_actor_command_handler_find(server, msg);
-       if (!handler) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, no handler function for command to %s\n", msg->from_jid, RAYO_JID(server));
-               if (!msg->is_reply) {
-                       RAYO_SEND_REPLY(server, msg->from_jid, iks_new_error(iq, STANZA_ERROR_FEATURE_NOT_IMPLEMENTED));
-               }
-               return;
-       }
-
-       /* is the command valid? */
-       if (!(response = rayo_server_command_ok(server, msg))) {
-               response = handler(server, msg, NULL);
-       }
-
-       if (response) {
-               if (!msg->is_reply) {
-                       RAYO_SEND_REPLY(server, msg->from_jid, response);
-               } else {
-                       iks_delete(response);
-               }
-       }
-}
-
-/**
- * Handle call message
- */
-void rayo_call_send(struct rayo_actor *call, struct rayo_message *msg)
-{
-       rayo_actor_xmpp_handler handler = NULL;
-       iks *stanza = msg->payload;
-       switch_core_session_t *session;
-       iks *response = NULL;
-
-       if (!strcmp("message", iks_name(stanza))) {
-               const char *type = iks_find_attrib_soft(stanza, "type");
-
-               if (!strcmp("normal", type)) {
-                       const char *body = iks_find_cdata(stanza, "body");
-                       if (!zstr(body)) {
-                               switch_event_t *event;
-                               if (switch_event_create(&event, SWITCH_EVENT_SEND_MESSAGE) == SWITCH_STATUS_SUCCESS) {
-                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "content-type", "text/plain");
-                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "uuid", rayo_call_get_uuid(RAYO_CALL(call)));
-                                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", iks_find_cdata(stanza, "subject"));
-                                       switch_event_add_body(event, "%s", body);
-                                       switch_event_fire(&event);
-                               }
-                       } else if (!msg->is_reply) {
-                               RAYO_SEND_REPLY(call, msg->from_jid, iks_new_error_detailed(stanza, STANZA_ERROR_BAD_REQUEST, "missing body"));
-                       }
-               } else if (!msg->is_reply) {
-                       RAYO_SEND_REPLY(call, msg->from_jid, iks_new_error(stanza, STANZA_ERROR_FEATURE_NOT_IMPLEMENTED));
-               }
-               return;
-       }
-
-       /* is this a command a call supports? */
-       handler = rayo_actor_command_handler_find(call, msg);
-       if (!handler) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, no handler function for command\n", RAYO_JID(call));
-               if (!msg->is_reply) {
-                       RAYO_SEND_REPLY(call, msg->from_jid, iks_new_error(stanza, STANZA_ERROR_FEATURE_NOT_IMPLEMENTED));
-               }
-               return;
-       }
-
-       /* is the session still available? */
-       session = switch_core_session_locate(rayo_call_get_uuid(RAYO_CALL(call)));
-       if (!session) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, session not found\n", RAYO_JID(call));
-               if (!msg->is_reply) {
-                       RAYO_SEND_REPLY(call, msg->from_jid, iks_new_error(stanza, STANZA_ERROR_ITEM_NOT_FOUND));
-               }
-               return;
-       }
-
-       /* is the command valid? */
-       if (!(response = rayo_call_command_ok(RAYO_CALL(call), session, msg))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, executing command\n", RAYO_JID(call));
-               response = handler(call, msg, session);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, done executing command\n", RAYO_JID(call));
-       }
-       switch_core_session_rwunlock(session);
-
-       if (response) {
-               if (!msg->is_reply) {
-                       RAYO_SEND_REPLY(call, msg->from_jid, response);
-               } else {
-                       iks_delete(response);
-               }
-       }
-}
-
-/**
- * Handle mixer message
- */
-void rayo_mixer_send(struct rayo_actor *mixer, struct rayo_message *msg)
-{
-       rayo_actor_xmpp_handler handler = NULL;
-       iks *iq = msg->payload;
-       iks *response = NULL;
-
-       /* is this a command a mixer supports? */
-       handler = rayo_actor_command_handler_find(mixer, msg);
-       if (!handler) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, no handler function for command\n", RAYO_JID(mixer));
-               if (!msg->is_reply) {
-                       RAYO_SEND_REPLY(mixer, msg->from_jid, iks_new_error(iq, STANZA_ERROR_FEATURE_NOT_IMPLEMENTED));
-               }
-               return;
-       }
-
-       /* execute the command */
-       response = handler(mixer, msg, NULL);
-       if (response) {
-               if (!msg->is_reply) {
-                       RAYO_SEND_REPLY(mixer, msg->from_jid, response);
-               } else {
-                       iks_delete(response);
-               }
-       }
-}
-
-/**
- * Handle mixer message
- */
-void rayo_component_send(struct rayo_actor *component, struct rayo_message *msg)
-{
-       rayo_actor_xmpp_handler handler = NULL;
-       iks *xml_msg = msg->payload;
-       iks *response = NULL;
-
-       if (!strcmp("iq", iks_name(xml_msg))) {
-               /* is this a command a component supports? */
-               handler = rayo_actor_command_handler_find(component, msg);
-               if (!handler) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, no component handler function for command\n", RAYO_JID(component));
-                       if (!msg->is_reply) {
-                               RAYO_SEND_REPLY(component, msg->from_jid, iks_new_error(xml_msg, STANZA_ERROR_FEATURE_NOT_IMPLEMENTED));
-                       }
-                       return;
-               }
-
-               /* is the command valid? */
-               if (!(response = rayo_component_command_ok(RAYO_COMPONENT(component), msg))) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, executing command\n", RAYO_JID(component));
-                       response = handler(component, msg, NULL);
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, done executing command\n", RAYO_JID(component));
-               }
-
-               if (response) {
-                       if (!msg->is_reply) {
-                               RAYO_SEND_REPLY(component, msg->from_jid, response);
-                       } else {
-                               iks_delete(response);
-                       }
-                       return;
-               }
-       } else if (!strcmp("presence", iks_name(xml_msg))) {
-               /* is this an event the component wants? */
-               handler = rayo_actor_event_handler_find(component, msg);
-               if (!handler) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, no component handler function for event\n", RAYO_JID(component));
-                       return;
-               }
-
-               /* forward the event */
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, forwarding event\n", RAYO_JID(component));
-               response = handler(component, msg, NULL);
-               if (response) {
-                       if (!msg->is_reply) {
-                               RAYO_SEND_REPLY(component, msg->from_jid, response);
-                       } else {
-                               iks_delete(response);
-                       }
-               }
-       }
-}
-
-/**
- * Add signaling headers to channel -- only works on SIP
- * @param session the channel
- * @param iq_cmd the request containing <header>
- * @param type header type
- */
-static void add_signaling_headers(switch_core_session_t *session, iks *iq_cmd, const char *type)
-{
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       iks *header = NULL;
-       for (header = iks_find(iq_cmd, "header"); header; header = iks_next_tag(header)) {
-               if (!strcmp("header", iks_name(header))) {
-                       const char *name = iks_find_attrib_soft(header, "name");
-                       const char *value = iks_find_attrib_soft(header, "value");
-                       if (!zstr(name) && !zstr(value)) {
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Adding header: %s: %s\n", name, value);
-                               switch_channel_set_variable_name_printf(channel, value, "%s%s", type, name);
-                       }
-               }
-       }
-}
-
-/**
- * Handle <iq><accept> request
- * @param call the Rayo call
- * @param session the session
- * @param node the <iq> node
- */
-static iks *on_rayo_accept(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *node = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       iks *response = NULL;
-
-       /* send ringing */
-       add_signaling_headers(session, iks_find(node, "accept"), RAYO_SIP_RESPONSE_HEADER);
-       switch_channel_pre_answer(switch_core_session_get_channel(session));
-       response = iks_new_iq_result(node);
-       return response;
-}
-
-/**
- * Handle <iq><answer> request
- * @param call the Rayo call
- * @param session the session
- * @param node the <iq> node
- */
-static iks *on_rayo_answer(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *node = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       iks *response = NULL;
-
-       /* send answer to call */
-       add_signaling_headers(session, iks_find(node, "answer"), RAYO_SIP_RESPONSE_HEADER);
-       switch_channel_answer(switch_core_session_get_channel(session));
-       response = iks_new_iq_result(node);
-       return response;
-}
-
-/**
- * Handle <iq><redirect> request
- * @param call the Rayo call
- * @param session the session
- * @param node the <iq> node
- */
-static iks *on_rayo_redirect(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *node = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       iks *response = NULL;
-       iks *redirect = iks_find(node, "redirect");
-       char *redirect_to = iks_find_attrib(redirect, "to");
-
-       if (zstr(redirect_to)) {
-               response = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "Missing redirect to attrib");
-       } else if (switch_channel_test_flag(channel, CF_ANSWERED)) {
-               /* call is answered- must deflect */
-               switch_core_session_message_t msg = { 0 };
-               add_signaling_headers(session, redirect, RAYO_SIP_REQUEST_HEADER);
-               msg.from = __FILE__;
-               msg.string_arg = switch_core_session_strdup(session, redirect_to);
-               msg.message_id = SWITCH_MESSAGE_INDICATE_DEFLECT;
-               switch_core_session_receive_message(session, &msg);
-               response = iks_new_iq_result(node);
-       } else if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND) {
-               /* Inbound call not answered - redirect */
-               switch_core_session_message_t msg = { 0 };
-               add_signaling_headers(session, redirect, RAYO_SIP_RESPONSE_HEADER);
-               msg.from = __FILE__;
-               msg.string_arg = switch_core_session_strdup(session, redirect_to);
-               msg.message_id = SWITCH_MESSAGE_INDICATE_REDIRECT;
-               switch_core_session_receive_message(session, &msg);
-               response = iks_new_iq_result(node);
-       } else {
-               response = iks_new_error_detailed(node, STANZA_ERROR_UNEXPECTED_REQUEST, "Call must be answered");
-       }
-       return response;
-}
-
-/**
- * Handle <iq><hangup> or <iq><reject> request
- * @param call the Rayo call
- * @param session the session
- * @param node the <iq> node
- */
-static iks *on_rayo_hangup(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *node = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       iks *response = NULL;
-       iks *hangup = iks_first_tag(node);
-       iks *reason = iks_first_tag(hangup);
-       int hangup_cause = RAYO_CAUSE_HANGUP;
-
-       /* get hangup cause */
-       if (!reason && !strcmp("hangup", iks_name(hangup))) {
-               /* no reason in <hangup> */
-               hangup_cause = RAYO_CAUSE_HANGUP;
-       } else if (reason && !strcmp("reject", iks_name(hangup))) {
-               char *reason_name = iks_name(reason);
-               /* reason required for <reject> */
-               if (!strcmp("busy", reason_name)) {
-                       hangup_cause = RAYO_CAUSE_BUSY;
-               } else if (!strcmp("decline", reason_name)) {
-                       hangup_cause = RAYO_CAUSE_DECLINE;
-               } else if (!strcmp("error", reason_name)) {
-                       hangup_cause = RAYO_CAUSE_ERROR;
-               } else {
-                       response = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "invalid reject reason");
-               }
-       } else {
-               response = iks_new_error(node, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       /* do hangup */
-       if (!response) {
-               switch_channel_set_variable(switch_core_session_get_channel(session), "rayo_local_hangup", "true");
-               add_signaling_headers(session, hangup, RAYO_SIP_REQUEST_HEADER);
-               add_signaling_headers(session, hangup, RAYO_SIP_RESPONSE_HEADER);
-               switch_ivr_kill_uuid(rayo_call_get_uuid(call), hangup_cause);
-               response = iks_new_iq_result(node);
-       }
-
-       return response;
-}
-
-/**
- * Join calls together
- * @param call the call that joins
- * @param session the session
- * @param msg the rayo join message
- * @param call_uri to join
- * @param media mode (direct/bridge)
- * @return the response
- */
-static iks *join_call(struct rayo_call *call, switch_core_session_t *session, struct rayo_message *msg, const char *call_uri, const char *media)
-{
-       iks *node = msg->payload;
-       iks *response = NULL;
-       /* take call out of media path if media = "direct" */
-       int do_direct = !strcmp("direct", media);
-
-       /* check if joining to rayo call */
-       struct rayo_call *b_call = RAYO_CALL_LOCATE(call_uri);
-       if (b_call) {
-               if (!call->rayo_app_started) {
-                       /* A-leg not under rayo control yet */
-                       response = iks_new_error_detailed(node, STANZA_ERROR_UNEXPECTED_REQUEST, "a-leg is not ready to join");
-               } else if (!b_call->rayo_app_started) {
-                       /* B-leg not under rayo control yet */
-                       response = iks_new_error_detailed(node, STANZA_ERROR_UNEXPECTED_REQUEST, "b-leg is not ready to join");
-               } else if (!has_call_control(b_call, msg)) {
-                       /* not allowed to join to this call */
-                       response = iks_new_error(node, STANZA_ERROR_NOT_ALLOWED);
-               } else if (b_call->joined) {
-                       /* don't support multiple joined calls */
-                       response = iks_new_error_detailed(node, STANZA_ERROR_CONFLICT, "multiple joined calls not supported");
-               } else {
-                       /* bridge this call to call-uri */
-                       if (do_direct) {
-                               switch_channel_set_flag(switch_core_session_get_channel(session), CF_BYPASS_MEDIA_AFTER_BRIDGE);
-                       } else {
-                               switch_channel_clear_flag(switch_core_session_get_channel(session), CF_BYPASS_MEDIA_AFTER_BRIDGE);
-                               switch_channel_pre_answer(switch_core_session_get_channel(session));
-                       }
-                       call->pending_join_request = iks_copy(node);
-                       if (switch_ivr_uuid_bridge(rayo_call_get_uuid(call), rayo_call_get_uuid(b_call)) != SWITCH_STATUS_SUCCESS) {
-                               iks *request = call->pending_join_request;
-                               iks *result = iks_new_error(request, STANZA_ERROR_SERVICE_UNAVAILABLE);
-                               call->pending_join_request = NULL;
-                               RAYO_SEND_REPLY(call, iks_find_attrib_soft(request, "from"), result);
-                               iks_delete(call->pending_join_request);
-                       }
-               }
-               RAYO_RELEASE(b_call);
-       } else {
-               /* not a rayo call */
-               response = iks_new_error_detailed(node, STANZA_ERROR_SERVICE_UNAVAILABLE, "b-leg is gone");
-       }
-       return response;
-}
-
-/**
- * Execute command on session's conference
- * @param session to execute conference API on
- * @param conf_name of conference
- * @param command to send to conference
- * @param node IQ request
- * @return response on failure
- */
-static iks *exec_conference_api(switch_core_session_t *session, const char *conf_name, const char *command, iks *node)
-{
-       iks *response = NULL;
-       switch_stream_handle_t stream = { 0 };
-       const char *conf_member_id = switch_channel_get_variable(switch_core_session_get_channel(session), "conference_member_id");
-       SWITCH_STANDARD_STREAM(stream);
-       switch_api_execute("conference", switch_core_session_sprintf(session, "%s %s %s", conf_name, command, conf_member_id), NULL, &stream);
-       if (!zstr(stream.data) && strncmp("+OK", stream.data, 3)) {
-               response = iks_new_error_detailed_printf(node, STANZA_ERROR_SERVICE_UNAVAILABLE, "%s", stream.data);
-       }
-       switch_safe_free(stream.data);
-       return response;
-}
-
-/**
- * Execute conference app on session
- * @param session to execute conference API on
- * @param command to send to conference (conference name, member flags, etc)
- * @param node IQ request
- * @return response on failure
- */
-static iks *exec_conference_app(switch_core_session_t *session, const char *command, iks *node)
-{
-       iks *response = NULL;
-       switch_event_t *execute_event = NULL;
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-
-       /* conference requires local media on channel */
-       if (!switch_channel_media_ready(channel) && switch_channel_pre_answer(channel) != SWITCH_STATUS_SUCCESS) {
-               /* shit */
-               response = iks_new_error_detailed(node, STANZA_ERROR_INTERNAL_SERVER_ERROR, "failed to start media");
-               return response;
-       }
-
-       /* send execute conference event to session */
-       if (switch_event_create(&execute_event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "call-command", "execute");
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-name", "conference");
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", command);
-               //switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "event_uuid", uuid);
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "event-lock", "true");
-               if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) {
-                       switch_channel_set_flag(channel, CF_BLOCK_BROADCAST_UNTIL_MEDIA);
-               }
-
-               if (switch_core_session_queue_private_event(session, &execute_event, SWITCH_FALSE) != SWITCH_STATUS_SUCCESS) {
-                       response = iks_new_error_detailed(node, STANZA_ERROR_INTERNAL_SERVER_ERROR, "failed to join mixer (queue event failed)");
-                       if (execute_event) {
-                               switch_event_destroy(&execute_event);
-                       }
-                       return response;
-               }
-       }
-       return response;
-}
-
-/**
- * Join call to a mixer
- * @param call the call that joins
- * @param session the session
- * @param msg the join request
- * @param mixer_name the mixer to join
- * @param direction the media direction
- * @return the response
- */
-static iks *join_mixer(struct rayo_call *call, switch_core_session_t *session, struct rayo_message *msg, const char *mixer_name, const char *direction)
-{
-       iks *node = msg->payload;
-       iks *response = NULL;
-
-       if (!call->rayo_app_started) {
-               /* A-leg not under rayo control yet */
-               response = iks_new_error_detailed(node, STANZA_ERROR_UNEXPECTED_REQUEST, "call is not ready to join");
-       } else if (call->joined_id) {
-               /* adjust join conference params */
-               if (!strcmp("duplex", direction)) {
-                       if ((response = exec_conference_api(session, mixer_name, "unmute", node)) ||
-                               (response = exec_conference_api(session, mixer_name, "undeaf", node))) {
-                               return response;
-                       }
-               } else if (!strcmp("recv", direction)) {
-                       if ((response = exec_conference_api(session, mixer_name, "mute", node)) ||
-                               (response = exec_conference_api(session, mixer_name, "undeaf", node))) {
-                               return response;
-                       }
-               } else {
-                       if ((response = exec_conference_api(session, mixer_name, "unmute", node)) ||
-                               (response = exec_conference_api(session, mixer_name, "deaf", node))) {
-                               return response;
-                       }
-               }
-               response = iks_new_iq_result(node);
-       } else {
-               /* join new conference */
-               const char *conf_args = switch_core_session_sprintf(session, "%s@%s", mixer_name, globals.mixer_conf_profile);
-               if (!strcmp("send", direction)) {
-                       conf_args = switch_core_session_sprintf(session, "%s+flags{deaf}", conf_args);
-               } else if (!strcmp("recv", direction)) {
-                       conf_args = switch_core_session_sprintf(session, "%s+flags{mute}", conf_args);
-               }
-
-               call->pending_join_request = iks_copy(node);
-               response = exec_conference_app(session, conf_args, node);
-               if (response) {
-                       iks_delete(call->pending_join_request);
-                       call->pending_join_request = NULL;
-               }
-       }
-       return response;
-}
-
-/**
- * Handle <iq><join> request
- * @param call the Rayo call
- * @param session the session
- * @param msg the rayo join message
- */
-static iks *on_rayo_join(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       iks *response = NULL;
-       iks *join = iks_find(msg->payload, "join");
-       const char *join_id;
-       const char *mixer_name;
-       const char *call_uri;
-
-       /* validate input attributes */
-       if (!VALIDATE_RAYO_JOIN(join)) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Bad join attrib\n");
-               response = iks_new_error(msg->payload, STANZA_ERROR_BAD_REQUEST);
-               goto done;
-       }
-       mixer_name = iks_find_attrib(join, "mixer-name");
-       call_uri = iks_find_attrib(join, "call-uri");
-
-       if (!zstr(mixer_name)) {
-               join_id = mixer_name;
-       } else {
-               join_id = call_uri;
-       }
-
-       /* can't join both mixer and call */
-       if (!zstr(mixer_name) && !zstr(call_uri)) {
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_BAD_REQUEST, "mixer-name and call-uri are mutually exclusive");
-               goto done;
-       }
-
-       /* need to join *something* */
-       if (zstr(mixer_name) && zstr(call_uri)) {
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_BAD_REQUEST, "mixer-name or call-uri is required");
-               goto done;
-       }
-
-       if ((RAYO_CALL(call)->joined == JOINED_CALL) ||
-               (RAYO_CALL(call)->joined == JOINED_MIXER && strcmp(RAYO_CALL(call)->joined_id, join_id))) {
-               /* already joined */
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_CONFLICT, "call is already joined");
-               goto done;
-       }
-
-       if (rayo_call_is_faxing(RAYO_CALL(call))) {
-               /* can't join a call while it's faxing */
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_UNEXPECTED_REQUEST, "fax is in progress");
-               goto done;
-       }
-
-       if (RAYO_CALL(call)->pending_join_request) {
-               /* don't allow concurrent join requests */
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_UNEXPECTED_REQUEST, "(un)join request is pending");
-               goto done;
-       }
-
-       if (!zstr(mixer_name)) {
-               /* join conference */
-               response = join_mixer(RAYO_CALL(call), session, msg, mixer_name, iks_find_attrib(join, "direction"));
-       } else {
-               /* bridge calls */
-               response = join_call(RAYO_CALL(call), session, msg, call_uri, iks_find_attrib(join, "media"));
-       }
-
-done:
-       return response;
-}
-
-/**
- * unjoin call to a bridge
- * @param call the call that unjoined
- * @param session the session
- * @param msg the unjoin request
- * @param call_uri the b-leg xmpp URI
- * @return the response
- */
-static iks *unjoin_call(struct rayo_call *call, switch_core_session_t *session, struct rayo_message *msg, const char *call_uri)
-{
-       iks *node = msg->payload;
-       iks *response = NULL;
-
-       if (!strcmp(call_uri, call->joined_id)) {
-               /* unbridge call */
-               call->pending_join_request = iks_copy(node);
-               switch_ivr_park_session(session);
-       } else {
-               /* not bridged or wrong b-leg URI */
-               response = iks_new_error_detailed_printf(node, STANZA_ERROR_SERVICE_UNAVAILABLE, "expected URI: %s", call->joined_id);
-       }
-
-       return response;
-}
-
-/**
- * unjoin call to a mixer
- * @param call the call that unjoined
- * @param session the session
- * @param msg the unjoin request
- * @param mixer_name the mixer name
- * @return the response
- */
-static iks *unjoin_mixer(struct rayo_call *call, switch_core_session_t *session, struct rayo_message *msg, const char *mixer_name)
-{
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       const char *conf_member_id = switch_channel_get_variable(channel, "conference_member_id");
-       const char *conf_name = switch_channel_get_variable(channel, "conference_name");
-       iks *node = msg->payload;
-       iks *response = NULL;
-
-       /* not conferenced, or wrong conference */
-       if (zstr(conf_name) || strcmp(mixer_name, conf_name)) {
-               response = iks_new_error_detailed_printf(node, STANZA_ERROR_SERVICE_UNAVAILABLE, "not joined to %s", mixer_name);
-               goto done;
-       } else if (zstr(conf_member_id)) {
-               /* shouldn't happen */
-               response = iks_new_error_detailed(node, STANZA_ERROR_SERVICE_UNAVAILABLE, "channel doesn't have conference member ID");
-               goto done;
-       }
-
-       /* kick the member */
-       response = exec_conference_api(session, mixer_name, "hup", node);
-       if (!response) {
-               /* ack command */
-               response = iks_new_iq_result(node);
-       }
-
-done:
-
-       return response;
-}
-
-/**
- * Handle <iq><unjoin> request
- * @param call the Rayo call
- * @param session the session
- * @param node the <iq> node
- */
-static iks *on_rayo_unjoin(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       iks *response = NULL;
-       iks *unjoin = iks_find(msg->payload, "unjoin");
-       const char *call_uri = iks_find_attrib(unjoin, "call-uri");
-       const char *mixer_name = iks_find_attrib(unjoin, "mixer-name");
-
-       if (!zstr(call_uri) && !zstr(mixer_name)) {
-               response = iks_new_error(msg->payload, STANZA_ERROR_BAD_REQUEST);
-       } else if (RAYO_CALL(call)->pending_join_request) {
-               /* need to let pending request finish first */
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_UNEXPECTED_REQUEST, "(un)join request is pending");
-       } else if (!RAYO_CALL(call)->joined) {
-               /* not joined to anything */
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_SERVICE_UNAVAILABLE, "not joined to anything");
-       } else if (RAYO_CALL(call)->joined == JOINED_MIXER && !zstr(call_uri)) {
-               /* joined to mixer, not call */
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_SERVICE_UNAVAILABLE, "not joined to call");
-       } else if (RAYO_CALL(call)->joined == JOINED_CALL && !zstr(mixer_name)) {
-               /* joined to call, not mixer */
-               response = iks_new_error_detailed(msg->payload, STANZA_ERROR_SERVICE_UNAVAILABLE, "not joined to mixer");
-       } else if (!zstr(call_uri)) {
-               response = unjoin_call(RAYO_CALL(call), session, msg, call_uri);
-       } else if (!zstr(mixer_name)) {
-               response = unjoin_mixer(RAYO_CALL(call), session, msg, mixer_name);
-       } else {
-               /* unjoin everything */
-               if (RAYO_CALL(call)->joined == JOINED_MIXER) {
-                       response = unjoin_mixer(RAYO_CALL(call), session, msg, RAYO_CALL(call)->joined_id);
-               } else if (RAYO_CALL(call)->joined == JOINED_CALL) {
-                       response = unjoin_call(RAYO_CALL(call), session, msg, RAYO_CALL(call)->joined_id);
-               } else {
-                       /* shouldn't happen */
-                       response = iks_new_error(msg->payload, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-               }
-       }
-
-       return response;
-}
-
-/**
- * @return 1 if display name is valid
- */
-static int is_valid_display_name(char *display)
-{
-       if (zstr(display)) {
-               return 0;
-       }
-       return 1;
-}
-
-/**
- * @return 1 if SIP URI is valid
- */
-static int is_valid_sip_uri(char *uri)
-{
-       /* just some basic checks to prevent failure when passing URI as caller ID */
-       if (zstr(uri) || strchr(uri, '<') || strchr(uri, '>')) {
-               return 0;
-       }
-       return 1;
-}
-
-#define RAYO_URI_SCHEME_UNKNOWN 0
-#define RAYO_URI_SCHEME_TEL 1
-#define RAYO_URI_SCHEME_SIP 2
-
-/**
- * Parse dial "from" parameter
- * @param pool to use
- * @param from the parameter to parse
- * @param uri the URI
- * @param display the display name
- * @return scheme
- */
-static int parse_dial_from(switch_memory_pool_t *pool, const char *from, char **uri, char **display)
-{
-       if (!zstr(from)) {
-               char *l_display = switch_core_strdup(pool, from);
-               char *l_uri;
-
-               *display = NULL;
-               *uri = NULL;
-
-               /* TODO regex would be better */
-
-               /* split display-name and URI */
-               l_uri = strrchr(l_display, ' ');
-               if (l_uri) {
-                       *l_uri++ = '\0';
-                       if (!zstr(l_display)) {
-                               /* remove "" from display-name */
-                               if (l_display[0] == '"') {
-                                       int len;
-                                       *l_display++ = '\0';
-                                       len = strlen(l_display);
-                                       if (len < 2 || l_display[len - 1] != '"') {
-                                               return RAYO_URI_SCHEME_UNKNOWN;
-                                       }
-                                       l_display[len - 1] = '\0';
-                               }
-                               if (!is_valid_display_name(l_display)) {
-                                       return RAYO_URI_SCHEME_UNKNOWN;
-                               }
-                               *display = l_display;
-                       }
-               } else {
-                       l_uri = l_display;
-               }
-               if (zstr(l_uri)) {
-                       return RAYO_URI_SCHEME_UNKNOWN;
-               }
-
-               /* remove <> from URI */
-               if (l_uri[0] == '<') {
-                       int len;
-                       *l_uri++ = '\0';
-                       len = strlen(l_uri);
-                       if (len < 2 || l_uri[len - 1] != '>') {
-                               return RAYO_URI_SCHEME_UNKNOWN;
-                       }
-                       l_uri[len - 1] = '\0';
-                       if (zstr(l_uri)) {
-                               return RAYO_URI_SCHEME_UNKNOWN;
-                       }
-               }
-               *uri = l_uri;
-
-               /* figure out URI scheme and validate it */
-               if (!strncmp("sip:", l_uri, 4) || !strncmp("sips:", l_uri, 5)) {
-                       /* validate SIP URI */
-                       if (is_valid_sip_uri(l_uri)) {
-                               return RAYO_URI_SCHEME_SIP;
-                       }
-               } else if (!strncmp("tel:", l_uri, 4)) {
-                       l_uri += 4;
-                       *uri = l_uri;
-               }
-               if (!zstr(l_uri)) {
-                       return RAYO_URI_SCHEME_TEL;
-               }
-       }
-       return RAYO_URI_SCHEME_UNKNOWN;
-}
-
-struct dial_thread_data {
-       switch_memory_pool_t *pool;
-       iks *node;
-};
-
-
-/**
- * Thread that handles originating new calls
- * @param thread this thread
- * @param obj the Rayo client
- * @return NULL
- */
-static void *SWITCH_THREAD_FUNC rayo_dial_thread(switch_thread_t *thread, void *user)
-{
-       struct dial_thread_data *dtdata = (struct dial_thread_data *)user;
-       iks *iq = dtdata->node;
-       iks *dial = iks_find(iq, "dial");
-       iks *response = NULL;
-       const char *dcp_jid = iks_find_attrib(iq, "from");
-       const char *dial_to = iks_find_attrib(dial, "to");
-       char *dial_to_dup = NULL;
-       const char *dial_from = iks_find_attrib(dial, "from");
-       const char *dial_timeout_ms = iks_find_attrib(dial, "timeout");
-       const char *requested_call_uri = iks_find_attrib(dial, "uri");
-       const char *uuid = NULL;
-       switch_event_t *originate_vars = NULL;
-       struct dial_gateway *gateway = NULL;
-       struct rayo_call *call = NULL;
-       uint32_t dial_timeout_sec = 0;
-
-       /* TODO dial_to needs validation */
-
-       /* Check if optional URI is valid. */
-       if (!zstr(requested_call_uri)) {
-
-               /* Split node and domain from URI */
-               char *requested_call_uri_dup = switch_core_strdup(dtdata->pool, requested_call_uri);
-               char *requested_call_uri_domain = strchr(requested_call_uri_dup, '@');
-               if (requested_call_uri_domain) {
-                       *requested_call_uri_domain = '\0';
-                       requested_call_uri_domain++;
-               }
-
-               /* is domain missing */
-               if (zstr(requested_call_uri_domain)) {
-                       response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Bad uri");
-                       goto done;
-               }
-
-               /* is domain correct? */
-               if (strcmp(requested_call_uri_domain, RAYO_JID(globals.server))) {
-                       response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Bad uri (invalid domain)");
-                       goto done;
-               }
-
-               /* is node identifier missing? */
-               if (zstr(requested_call_uri_dup)) {
-                       response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Bad uri (missing node)");
-                       goto done;
-               }
-
-               /* strip optional xmpp: from node identifier */
-               if (!strncasecmp("xmpp:", requested_call_uri_dup, 5)) {
-                       requested_call_uri_dup += 5;
-                       if (zstr(requested_call_uri_dup)) {
-                               response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Bad uri (missing node)");
-                               goto done;
-                       }
-               }
-
-               /* success! */
-               uuid = requested_call_uri_dup;
-       }
-
-       /* create call and link to DCP */
-       call = rayo_call_create(uuid);
-       if (!call) {
-               response = iks_new_error(iq, STANZA_ERROR_CONFLICT);
-               goto done;
-       }
-       call->dcp_jid = switch_core_strdup(RAYO_POOL(call), dcp_jid);
-       call->dial_request_id = switch_core_strdup(RAYO_POOL(call), iks_find_attrib_soft(iq, "id"));
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_INFO, "%s has control of call\n", dcp_jid);
-       uuid = switch_core_strdup(dtdata->pool, rayo_call_get_uuid(call));
-
-       /* create container for origination variables */
-       if (switch_event_create_plain(&originate_vars, SWITCH_EVENT_CHANNEL_DATA) != SWITCH_STATUS_SUCCESS) {
-               abort();
-       }
-
-       /* add dialstring vars to origination variables */
-       if (*dial_to == '{') {
-               dial_to_dup = switch_core_strdup(dtdata->pool, dial_to);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "dial: parsing dialstring channel variables\n");
-               switch_event_create_brackets(dial_to_dup, '{', '}', ',', &originate_vars, (char **)&dial_to, SWITCH_FALSE);
-       }
-
-       /* set originate channel variables */
-       switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, "origination_uuid", rayo_call_get_uuid(call));
-       switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, "rayo_dcp_jid", dcp_jid);
-       switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, "rayo_call_jid", RAYO_JID(call));
-
-       if (!zstr(dial_from)) {
-               char *from_uri = NULL;
-               char *from_display;
-               int scheme = parse_dial_from(dtdata->pool, dial_from, &from_uri, &from_display);
-               if (scheme == RAYO_URI_SCHEME_UNKNOWN) {
-                       response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Bad from URI");
-                       goto done;
-               } else if (scheme == RAYO_URI_SCHEME_SIP) {
-                       /* SIP URI */
-                       if (!zstr(from_uri)) {
-                               switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, "sip_from_uri", from_uri);
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "dial: sip_from_uri=%s\n", from_uri);
-                       }
-                       if (!zstr(from_display)) {
-                               switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, "sip_from_display", from_display);
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "dial: sip_from_display=%s\n", from_display);
-                       }
-               }
-               if (!zstr(from_uri)) {
-                       switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, "origination_caller_id_number", from_uri);
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "dial: origination_caller_id_number=%s\n", from_uri);
-               }
-               if (!zstr(from_display)) {
-                       switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, "origination_caller_id_name", from_display);
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "dial: origination_caller_id_name=%s\n", from_display);
-               } else if (scheme == RAYO_URI_SCHEME_TEL && !zstr(from_uri)) {
-                       /* set caller ID name to same as number if telephone number and a name wasn't specified */
-                       switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, "origination_caller_id_name", from_uri);
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "dial: origination_caller_id_name=%s\n", from_uri);
-               }
-       }
-       if (!zstr(dial_timeout_ms) && switch_is_number(dial_timeout_ms)) {
-               dial_timeout_sec = round((double)atoi(dial_timeout_ms) / 1000.0);
-       }
-
-       /* set outbound signaling headers - only works on SIP */
-       {
-               iks *header = NULL;
-               for (header = iks_find(dial, "header"); header; header = iks_next_tag(header)) {
-                       if (!strcmp("header", iks_name(header))) {
-                               const char *name = iks_find_attrib_soft(header, "name");
-                               const char *value = iks_find_attrib_soft(header, "value");
-                               if (!zstr(name) && !zstr(value)) {
-                                       char *header_name = switch_core_sprintf(dtdata->pool, "%s%s", RAYO_SIP_REQUEST_HEADER, name);
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "dial: Adding SIP header: %s: %s\n", name, value);
-                                       switch_event_add_header_string(originate_vars, SWITCH_STACK_BOTTOM, header_name, value);
-                               }
-                       }
-               }
-       }
-
-       /* build dialstring and dial call */
-       gateway = dial_gateway_find(dial_to);
-       if (gateway) {
-               iks *join = iks_find(dial, "join");
-               const char *dial_to_stripped = dial_to + gateway->strip;
-               switch_core_session_t *called_session = NULL;
-               switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
-               const char *dialstring = NULL;
-
-               if (join) {
-                       /* check join args */
-                       const char *call_uri = iks_find_attrib(join, "call-uri");
-                       const char *mixer_name = iks_find_attrib(join, "mixer-name");
-
-                       if (!zstr(call_uri) && !zstr(mixer_name)) {
-                               /* can't join both */
-                               response = iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-                               goto done;
-                       } else if (zstr(call_uri) && zstr(mixer_name)) {
-                               /* nobody to join to? */
-                               response = iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-                               goto done;
-                       } else if (!zstr(call_uri)) {
-                               /* bridge */
-                               struct rayo_call *peer_call = RAYO_CALL_LOCATE(call_uri);
-                               /* is peer call available? */
-                               if (!peer_call) {
-                                       response = iks_new_error_detailed(iq, STANZA_ERROR_SERVICE_UNAVAILABLE, "peer call not found");
-                                       goto done;
-                               } else if (peer_call->joined) {
-                                       response = iks_new_error_detailed(iq, STANZA_ERROR_SERVICE_UNAVAILABLE, "peer call already joined");
-                                       RAYO_RELEASE(peer_call);
-                                       goto done;
-                               }
-                               switch_event_add_header(originate_vars, SWITCH_STACK_BOTTOM, "rayo_origination_args", "bridge %s", rayo_call_get_uuid(peer_call));
-                               RAYO_RELEASE(peer_call);
-                       } else {
-                               /* conference */
-                               switch_event_add_header(originate_vars, SWITCH_STACK_BOTTOM, "rayo_origination_args", "conference %s@%s", mixer_name, globals.mixer_conf_profile);
-                       }
-               }
-
-               dialstring = switch_core_sprintf(dtdata->pool, "%s%s", gateway->dial_prefix, dial_to_stripped);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "dial: Using dialstring: %s\n", dialstring);
-
-               /* <iq><ref> response will be sent when originate event is received- otherwise error is returned */
-               if (switch_ivr_originate(NULL, &called_session, &cause, dialstring, dial_timeout_sec, NULL, NULL, NULL, NULL, originate_vars, SOF_NONE, NULL, NULL) == SWITCH_STATUS_SUCCESS && called_session) {
-                       /* start APP */
-                       switch_caller_extension_t *extension = NULL;
-                       switch_channel_t *called_channel = switch_core_session_get_channel(called_session);
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "dial: Call originated\n");
-                       if ((extension = switch_caller_extension_new(called_session, "rayo", NULL)) == 0) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_CRIT, "Memory Error!\n");
-                               abort();
-                       }
-                       switch_caller_extension_add_application(called_session, extension, "rayo", NULL);
-                       switch_channel_set_caller_extension(called_channel, extension);
-                       switch_channel_set_state(called_channel, CS_EXECUTE);
-                       switch_core_session_rwunlock(called_session);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "dial: Failed to originate call: %s\n", switch_channel_cause2str(cause));
-                       switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-                       if (!zstr(call->dial_request_id)) {
-                               call->dial_request_failed = 1;
-                               call->dial_request_id = NULL;
-
-                               /* map failure reason to iq error */
-                               switch (cause) {
-                                       case SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER:
-                                               /* out of sessions, typically */
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_RESOURCE_CONSTRAINT, "DESTINATION_OUT_OF_ORDER");
-                                               break;
-                                       case SWITCH_CAUSE_SUBSCRIBER_ABSENT:
-                                       case SWITCH_CAUSE_USER_NOT_REGISTERED: {
-                                               /* call session was never created, so we must fake it so that a call error is sent and
-                                                  not a dial error */
-                                               /* send ref response to DCP immediately followed with failure */
-                                               iks *ref;
-                                               iks *ref_response = iks_new("iq");
-                                               iks_insert_attrib(ref_response, "from", RAYO_JID(globals.server));
-                                               iks_insert_attrib(ref_response, "to", dcp_jid);
-                                               iks_insert_attrib(ref_response, "id", iks_find_attrib_soft(iq, "id"));
-                                               iks_insert_attrib(ref_response, "type", "result");
-                                               ref = iks_insert(ref_response, "ref");
-                                               iks_insert_attrib(ref, "xmlns", RAYO_NS);
-                                               iks_insert_attrib_printf(ref, "uri", "xmpp:%s", RAYO_JID(call));
-                                               RAYO_SEND_MESSAGE(globals.server, dcp_jid, ref_response);
-
-                                               /* send subscriber-absent call hangup reason */
-                                               rayo_call_send_end(call, NULL, 0, "SUBSCRIBER_ABSENT", "20");
-
-                                               /* destroy call */
-                                               RAYO_DESTROY(call);
-                                               RAYO_RELEASE(call);
-                                               break;
-                                       }
-                                       case SWITCH_CAUSE_EXCHANGE_ROUTING_ERROR:
-                                               /* max forwards */
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_RESOURCE_CONSTRAINT, "EXCHANGE_ROUTING_ERROR");
-                                               break;
-                                       case SWITCH_CAUSE_CHAN_NOT_IMPLEMENTED:
-                                               /* unsupported endpoint type */
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "CHAN_NOT_IMPLEMENTED");
-                                               break;
-                                       case SWITCH_CAUSE_INVALID_URL:
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "INVALID_URL");
-                                               break;
-                                       case SWITCH_CAUSE_INVALID_GATEWAY:
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "INVALID_GATEWAY");
-                                               break;
-                                       case SWITCH_CAUSE_INVALID_PROFILE:
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "INVALID_PROFILE");
-                                               break;
-                                       case SWITCH_CAUSE_SYSTEM_SHUTDOWN:
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_RESOURCE_CONSTRAINT, "SYSTEM_SHUTDOWN");
-                                               break;
-                                       case SWITCH_CAUSE_GATEWAY_DOWN:
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_RESOURCE_CONSTRAINT, "GATEWAY_DOWN");
-                                               break;
-                                       case SWITCH_CAUSE_INVALID_NUMBER_FORMAT:
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_RESOURCE_CONSTRAINT, "INVALID_NUMBER_FORMAT");
-                                               break;
-                                       default:
-                                               response = iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, switch_channel_cause2str(cause));
-                                               break;
-                               }
-                       }
-                       switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-               }
-       } else {
-               /* will only happen if misconfigured */
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_CRIT, "dial: No dial gateway found for %s!\n", dial_to);
-               call->dial_request_failed = 1;
-               call->dial_request_id = NULL;
-               response = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "dial: No dial gateway found for %s!\n", dial_to);
-               goto done;
-       }
-
-done:
-
-       /* response when error */
-       if (response) {
-               /* send response to client */
-               RAYO_SEND_REPLY(globals.server, iks_find_attrib(response, "to"), response);
-
-               /* destroy call */
-               if (call) {
-                       RAYO_DESTROY(call);
-                       RAYO_RELEASE(call);
-               }
-       }
-
-       iks_delete(iq);
-
-       if (originate_vars) {
-               switch_event_destroy(&originate_vars);
-       }
-
-       {
-               switch_memory_pool_t *pool = dtdata->pool;
-               switch_core_destroy_memory_pool(&pool);
-       }
-
-       return NULL;
-}
-
-/**
- * Dial a new call
- * @param server handling the call
- * @param msg the request
- */
-static iks *on_rayo_dial(struct rayo_actor *server, struct rayo_message *msg, void *data)
-{
-       iks *node = msg->payload;
-       switch_thread_t *thread;
-       switch_threadattr_t *thd_attr = NULL;
-       iks *dial = iks_find(node, "dial");
-       iks *response = NULL;
-       const char *dial_to = iks_find_attrib(dial, "to");
-
-       if (zstr(dial_to)) {
-               response = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "missing dial to attribute");
-       } else if (strchr(dial_to, ' ')) {
-               response = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "malformed dial string");
-       } else {
-               switch_memory_pool_t *pool;
-               struct dial_thread_data *dtdata = NULL;
-               switch_core_new_memory_pool(&pool);
-               dtdata = switch_core_alloc(pool, sizeof(*dtdata));
-               dtdata->pool = pool;
-               dtdata->node = iks_copy(node);
-
-               iks_insert_attrib(dtdata->node, "from", msg->from_jid); /* save DCP jid in case it isn't specified */
-
-               /* start dial thread */
-               switch_threadattr_create(&thd_attr, pool);
-               switch_threadattr_detach_set(thd_attr, 1);
-               switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-               switch_thread_create(&thread, thd_attr, rayo_dial_thread, dtdata, pool);
-       }
-
-       return response;
-}
-
-struct exec_thread_data {
-       switch_memory_pool_t *pool;
-       iks *node;
-};
-
-/**
- * Thread that handles executing server APIs
- * @param thread this thread
- * @param user the API request
- * @return NULL
- */
-static void *SWITCH_THREAD_FUNC rayo_exec_thread(switch_thread_t *thread, void *user)
-{
-       struct exec_thread_data *etdata = (struct exec_thread_data *)user;
-       iks *response = NULL;
-       iks *exec = iks_find(etdata->node, "exec");
-       const char *api = iks_find_attrib(exec, "api");
-       const char *args = iks_find_attrib_soft(exec, "args");
-       switch_stream_handle_t stream = { 0 };
-       SWITCH_STANDARD_STREAM(stream);
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BGAPI EXEC: %s %s\n", api, args);
-       if (switch_api_execute(api, args, NULL, &stream) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BGAPI EXEC FAILURE\n");
-               response = iks_new_error_detailed(etdata->node, STANZA_ERROR_BAD_REQUEST, "Failed to execute API");
-       } else {
-               iks *api_result = NULL;
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BGAPI EXEC RESULT: %s\n", (char *)stream.data);
-               response = iks_new_iq_result(etdata->node);
-               api_result = iks_insert(response, "response");
-               iks_insert_attrib(api_result, "xmlns", RAYO_NS);
-               iks_insert_attrib(api_result, "response", zstr((char *)stream.data) ? "" : (char *)stream.data);
-       }
-
-       RAYO_SEND_REPLY(globals.server, iks_find_attrib(response, "to"), response);
-
-       switch_safe_free(stream.data);
-       {
-               switch_memory_pool_t *pool = etdata->pool;
-               switch_core_destroy_memory_pool(&pool);
-       }
-       return NULL;
-}
-
-/**
- * Execute an API on the server
- * @param server handling the call
- * @param msg the request
- */
-static iks *on_rayo_exec(struct rayo_actor *server, struct rayo_message *msg, void *data)
-{
-       iks *node = msg->payload;
-       switch_thread_t *thread;
-       switch_threadattr_t *thd_attr = NULL;
-       iks *exec = iks_find(node, "exec");
-       iks *response = NULL;
-       const char *api = iks_find_attrib_soft(exec, "api");
-
-       if (zstr(api)) {
-               response = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "missing <exec> api attribute");
-       } else {
-               struct exec_thread_data *etdata = NULL;
-               switch_memory_pool_t *pool = NULL;
-               switch_core_new_memory_pool(&pool);
-               etdata = switch_core_alloc(pool, sizeof(*etdata));
-               etdata->pool = pool;
-               etdata->node = iks_copy(node);
-
-               /* start exec thread */
-               switch_threadattr_create(&thd_attr, pool);
-               switch_threadattr_detach_set(thd_attr, 1);
-               switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-               switch_thread_create(&thread, thd_attr, rayo_exec_thread, etdata, pool);
-       }
-       return response;
-}
-
-/**
- * Handle <iq><ping> request
- * @param rclient the Rayo client
- * @param server the Rayo server
- * @param node the <iq> node
- * @return NULL
- */
-static iks *on_iq_xmpp_ping(struct rayo_actor *server, struct rayo_message *msg, void *data)
-{
-       iks *node = msg->payload;
-       iks *pong = iks_new("iq");
-       char *from = iks_find_attrib(node, "from");
-       char *to = iks_find_attrib(node, "to");
-
-       if (zstr(from)) {
-               from = msg->from_jid;
-       }
-
-       if (zstr(to)) {
-               to = RAYO_JID(server);
-       }
-
-       iks_insert_attrib(pong, "type", "result");
-       iks_insert_attrib(pong, "from", to);
-       iks_insert_attrib(pong, "to", from);
-       iks_insert_attrib(pong, "id", iks_find_attrib(node, "id"));
-
-       return pong;
-}
-
-/**
- * Handle service discovery request
- * @param rclient the Rayo client
- * @param server the Rayo server
- * @param node the <iq> node
- * @return NULL
- */
-static iks *on_iq_get_xmpp_disco(struct rayo_actor *server, struct rayo_message *msg, void *data)
-{
-       iks *node = msg->payload;
-       iks *response = NULL;
-       iks *x;
-       iks *feature;
-       iks *identity;
-       int i = 0;
-       const char *feature_string;
-       response = iks_new_iq_result(node);
-       x = iks_insert(response, "query");
-       iks_insert_attrib(x, "xmlns", IKS_NS_XMPP_DISCO);
-       identity = iks_insert(x, "identity");
-       iks_insert_attrib(identity, "category", rayo_server_identity.category);
-       iks_insert_attrib(identity, "type", rayo_server_identity.type);
-       i = 0;
-       while((feature_string = rayo_server_features[i++])) {
-               feature = iks_insert(x, "feature");
-               iks_insert_attrib(feature, "var", feature_string);
-       }
-
-       /* TODO The response MUST also include features for the application formats and transport methods supported by
-        * the responding entity, as described in the relevant specifications.
-        */
-
-       return response;
-}
-
-/**
- * Handle message from client
- * @param rclient that sent the command
- * @param message the message
- */
-static void on_client_message(struct rayo_client *rclient, iks *message)
-{
-       const char *to = iks_find_attrib(message, "to");
-
-       /* must be directed to a client */
-       if (zstr(to)) {
-               return;
-       }
-
-       /* assume client source */
-       if (zstr(iks_find_attrib(message, "from"))) {
-               iks_insert_attrib(message, "from", RAYO_JID(rclient));
-       }
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, recv message, availability = %s\n", RAYO_JID(rclient), presence_status_to_string(rclient->availability));
-
-       RAYO_SEND_MESSAGE_DUP(rclient, to, message);
-}
-
-/**
- * Handle <presence> message from a client
- * @param rclient the client
- * @param node the presence message
- */
-static void on_client_presence(struct rayo_client *rclient, iks *node)
-{
-       char *type = iks_find_attrib(node, "type");
-       enum presence_status status = PS_UNKNOWN;
-
-       /*
-          From RFC-6121:
-          Entity is available when <presence/> received.
-          Entity is unavailable when <presence type='unavailable'/> is received.
-
-          From Rayo-XEP:
-          Entity is available when <presence to='foo' from='bar'><show>chat</show></presence> is received.
-          Entity is unavailable when <presence to='foo' from='bar'><show>dnd</show></presence> is received.
-       */
-
-       /* figure out if online/offline */
-       if (zstr(type)) {
-               /* <presence><show>chat</show></presence> */
-               char *status_str = iks_find_cdata(node, "show");
-               if (!zstr(status_str)) {
-                       if (!strcmp("chat", status_str)) {
-                               status = PS_ONLINE;
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s got chat presence\n", RAYO_JID(rclient));
-                       } else if (!strcmp("dnd", status_str)) {
-                               status = PS_OFFLINE;
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s got dnd presence\n", RAYO_JID(rclient));
-                       }
-               } else {
-                       /* <presence/> */
-                       status = PS_ONLINE;
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s got empty presence\n", RAYO_JID(rclient));
-               }
-       } else if (!strcmp("unavailable", type)) {
-               status = PS_OFFLINE;
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s got unavailable presence\n", RAYO_JID(rclient));
-       } else if (!strcmp("error", type)) {
-               /* TODO presence error */
-       } else if (!strcmp("probe", type)) {
-               /* TODO presence probe */
-       } else if (!strcmp("subscribe", type)) {
-               /* TODO presence subscribe */
-       } else if (!strcmp("subscribed", type)) {
-               /* TODO presence subscribed */
-       } else if (!strcmp("unsubscribe", type)) {
-               /* TODO presence unsubscribe */
-       } else if (!strcmp("unsubscribed", type)) {
-               /* TODO presence unsubscribed */
-       }
-
-       if (status == PS_ONLINE && rclient->availability != PS_ONLINE) {
-               rclient->availability = PS_ONLINE;
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s is ONLINE\n", RAYO_JID(rclient));
-       } else if (status == PS_OFFLINE && rclient->availability != PS_OFFLINE) {
-               rclient->availability = PS_OFFLINE;
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s is OFFLINE\n", RAYO_JID(rclient));
-       }
-
-       /* destroy if not a local client (connected via peer_server) and is OFFLINE */
-       if (rclient->peer_server && rclient->availability == PS_OFFLINE) {
-               RAYO_DESTROY(rclient);
-               RAYO_RELEASE(rclient);
-       }
-
-       pause_when_offline();
-}
-
-/**
- * Handle command from client
- * @param rclient that sent the command
- * @param iq the command
- */
-static void rayo_client_command_recv(struct rayo_client *rclient, iks *iq)
-{
-       iks *command = iks_first_tag(iq);
-       const char *to = iks_find_attrib(iq, "to");
-
-       /* assume server destination */
-       if (zstr(to)) {
-               to = RAYO_JID(globals.server);
-               iks_insert_attrib(iq, "to", to);
-       }
-
-       /* assume client source */
-       if (zstr(iks_find_attrib(iq, "from"))) {
-               iks_insert_attrib(iq, "from", RAYO_JID(rclient));
-       }
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, recv iq, availability = %s\n", RAYO_JID(rclient), presence_status_to_string(rclient->availability));
-
-       if (command) {
-               RAYO_SEND_MESSAGE_DUP(rclient, to, iq);
-       } else {
-               const char *type = iks_find_attrib_soft(iq, "type");
-               if (strcmp("error", type) && strcmp("result", type)) {
-                       RAYO_SEND_REPLY(globals.server, RAYO_JID(rclient), iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "empty IQ request"));
-               }
-       }
-}
-
-/**
- * Send event to mixer subscribers
- * @param mixer the mixer
- * @param rayo_event the event to send
- */
-static void broadcast_mixer_event(struct rayo_mixer *mixer, iks *rayo_event)
-{
-       switch_hash_index_t *hi = NULL;
-       switch_mutex_lock(RAYO_ACTOR(mixer)->mutex);
-       for (hi = switch_core_hash_first(mixer->subscribers); hi; hi = switch_core_hash_next(&hi)) {
-               const void *key;
-               void *val;
-               struct rayo_mixer_subscriber *subscriber;
-               switch_core_hash_this(hi, &key, NULL, &val);
-               subscriber = (struct rayo_mixer_subscriber *)val;
-               switch_assert(subscriber);
-               iks_insert_attrib(rayo_event, "to", subscriber->jid);
-               RAYO_SEND_MESSAGE_DUP(mixer, subscriber->jid, rayo_event);
-       }
-       switch_mutex_unlock(RAYO_ACTOR(mixer)->mutex);
-}
-
-/**
- * Handle mixer delete member event
- */
-static void on_mixer_delete_member_event(struct rayo_mixer *mixer, switch_event_t *event)
-{
-       iks *delete_member_event, *x;
-       const char *uuid = switch_event_get_header(event, "Unique-ID");
-       struct rayo_call *call;
-       struct rayo_mixer_member *member;
-       struct rayo_mixer_subscriber *subscriber;
-
-       /* not a rayo mixer */
-       if (!mixer) {
-               return;
-       }
-
-       /* remove member from mixer */
-       switch_mutex_lock(RAYO_ACTOR(mixer)->mutex);
-       member = (struct rayo_mixer_member *)switch_core_hash_find(mixer->members, uuid);
-       if (!member) {
-               /* not a member */
-               switch_mutex_unlock(RAYO_ACTOR(mixer)->mutex);
-               return;
-       }
-       switch_core_hash_delete(mixer->members, uuid);
-       switch_mutex_unlock(RAYO_ACTOR(mixer)->mutex);
-
-       /* flag call as available to join another mixer */
-       call = RAYO_CALL_LOCATE_BY_ID(uuid);
-       if (call) {
-               switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-               call->joined = 0;
-               call->joined_id = NULL;
-               switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-               RAYO_RELEASE(call);
-       }
-
-       /* send mixer unjoined event to member DCP */
-       delete_member_event = iks_new_presence("unjoined", RAYO_NS, member->jid, member->dcp_jid);
-       x = iks_find(delete_member_event, "unjoined");
-       iks_insert_attrib(x, "mixer-name", rayo_mixer_get_name(mixer));
-       RAYO_SEND_MESSAGE(mixer, member->dcp_jid, delete_member_event);
-
-       /* broadcast member unjoined event to subscribers */
-       delete_member_event = iks_new_presence("unjoined", RAYO_NS, RAYO_JID(mixer), "");
-       x = iks_find(delete_member_event, "unjoined");
-       iks_insert_attrib_printf(x, "call-uri", "xmpp:%s@%s", uuid, RAYO_JID(globals.server));
-       broadcast_mixer_event(mixer, delete_member_event);
-       iks_delete(delete_member_event);
-
-       /* remove member DCP as subscriber to mixer */
-       switch_mutex_lock(RAYO_ACTOR(mixer)->mutex);
-       subscriber = (struct rayo_mixer_subscriber *)switch_core_hash_find(mixer->subscribers, member->dcp_jid);
-       if (subscriber) {
-               subscriber->ref_count--;
-               if (subscriber->ref_count <= 0) {
-                       switch_core_hash_delete(mixer->subscribers, member->dcp_jid);
-               }
-       }
-       switch_mutex_unlock(RAYO_ACTOR(mixer)->mutex);
-}
-
-/**
- * Handle mixer destroy event
- */
-static void on_mixer_destroy_event(struct rayo_mixer *mixer, switch_event_t *event)
-{
-       if (mixer) {
-               iks *presence;
-
-               /* notify online clients of mixer destruction */
-               presence = iks_new("presence");
-               iks_insert_attrib(presence, "from", RAYO_JID(mixer));
-               iks_insert_attrib(presence, "type", "unavailable");
-               broadcast_event(RAYO_ACTOR(mixer), presence, 1);
-               iks_delete(presence);
-
-               /* remove from hash and destroy */
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, destroying mixer: %s\n", RAYO_JID(mixer), rayo_mixer_get_name(mixer));
-               RAYO_RELEASE(mixer); /* release original lock */
-               RAYO_DESTROY(mixer);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "destroy: NULL mixer\n");
-       }
-}
-
-/**
- * Handle mixer add member event
- */
-static void on_mixer_add_member_event(struct rayo_mixer *mixer, switch_event_t *event)
-{
-       iks *add_member_event = NULL, *x;
-       const char *uuid = switch_event_get_header(event, "Unique-ID");
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(uuid);
-       struct rayo_mixer *lmixer = NULL;
-
-       if (!mixer) {
-               char *ver;
-               iks *presence, *c;
-
-               /* new mixer */
-               const char *mixer_name = switch_event_get_header(event, "Conference-Name");
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "creating mixer: %s\n", mixer_name);
-               mixer = rayo_mixer_create(mixer_name);
-               if (mixer) {
-                       /* notify online clients of mixer presence */
-                       ver = calculate_entity_sha1_ver(&rayo_mixer_identity, rayo_mixer_features);
-
-                       presence = iks_new_presence("c", IKS_NS_XMPP_ENTITY_CAPABILITIES, RAYO_JID(mixer), "");
-                       c = iks_find(presence, "c");
-                       iks_insert_attrib(c, "hash", "sha-1");
-                       iks_insert_attrib(c, "node", RAYO_MIXER_NS);
-                       iks_insert_attrib(c, "ver", ver);
-                       free(ver);
-
-                       broadcast_event(RAYO_ACTOR(mixer), presence, 1);
-               } else {
-                       /* must have lost the race to another add member event...  there should be a mixer with mixer_name already */
-                       mixer = lmixer = RAYO_MIXER_LOCATE(mixer_name);
-                       if (!mixer) {
-                               /* this is unexpected */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "failed to find mixer: %s\n", mixer_name);
-                               return;
-                       }
-               }
-       }
-
-       if (call) {
-               struct rayo_mixer_member *member = NULL;
-               /* add member DCP as subscriber to mixer */
-               struct rayo_mixer_subscriber *subscriber;
-               switch_mutex_lock(RAYO_ACTOR(mixer)->mutex);
-               subscriber = (struct rayo_mixer_subscriber *)switch_core_hash_find(mixer->subscribers, call->dcp_jid);
-               if (!subscriber) {
-                       subscriber = switch_core_alloc(RAYO_POOL(mixer), sizeof(*subscriber));
-                       subscriber->ref_count = 0;
-                       subscriber->jid = switch_core_strdup(RAYO_POOL(mixer), call->dcp_jid);
-                       switch_core_hash_insert(mixer->subscribers, call->dcp_jid, subscriber);
-               }
-               subscriber->ref_count++;
-
-               /* add call as member of mixer */
-               member = switch_core_alloc(RAYO_POOL(mixer), sizeof(*member));
-               member->jid = switch_core_strdup(RAYO_POOL(mixer), RAYO_JID(call));
-               member->dcp_jid = subscriber->jid;
-               switch_core_hash_insert(mixer->members, uuid, member);
-
-               switch_mutex_unlock(RAYO_ACTOR(mixer)->mutex);
-
-               switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-               call->joined = JOINED_MIXER;
-               call->joined_id = switch_core_strdup(RAYO_POOL(call), rayo_mixer_get_name(mixer));
-
-               /* send IQ result to client now. */
-               if (call->pending_join_request) {
-                       iks *request = call->pending_join_request;
-                       iks *result = iks_new_iq_result(request);
-                       iks *ref = iks_insert(result, "ref");
-                       iks_insert_attrib(ref, "xmlns", RAYO_NS);
-                       iks_insert_attrib_printf(ref, "uri", "xmpp:%s", RAYO_JID(mixer));
-                       call->pending_join_request = NULL;
-                       RAYO_SEND_REPLY(call, iks_find_attrib_soft(request, "from"), result);
-                       iks_delete(request);
-               }
-               switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-
-               /* send mixer joined event to member DCP */
-               add_member_event = iks_new_presence("joined", RAYO_NS, RAYO_JID(call), call->dcp_jid);
-               x = iks_find(add_member_event, "joined");
-               iks_insert_attrib(x, "mixer-name", rayo_mixer_get_name(mixer));
-               RAYO_SEND_MESSAGE(call, call->dcp_jid, add_member_event);
-
-               RAYO_RELEASE(call);
-       }
-
-       /* broadcast member joined event to subscribers */
-       add_member_event = iks_new_presence("joined", RAYO_NS, RAYO_JID(mixer), "");
-       x = iks_find(add_member_event, "joined");
-       iks_insert_attrib_printf(x, "call-uri", "xmpp:%s@%s", uuid, RAYO_JID(globals.server));
-       broadcast_mixer_event(mixer, add_member_event);
-       iks_delete(add_member_event);
-
-       if (lmixer) {
-               RAYO_RELEASE(lmixer);
-       }
-}
-
-/**
- * Receives mixer events from FreeSWITCH core and routes them to the proper Rayo client(s).
- * @param event received from FreeSWITCH core.  It will be destroyed by the core after this function returns.
- */
-static void route_mixer_event(switch_event_t *event)
-{
-       const char *action = switch_event_get_header(event, "Action");
-       const char *profile = switch_event_get_header(event, "Conference-Profile-Name");
-       const char *mixer_name = switch_event_get_header(event, "Conference-Name");
-       struct rayo_mixer *mixer = NULL;
-
-       if (strcmp(profile, globals.mixer_conf_profile)) {
-               /* don't care about other conferences */
-               goto done;
-       }
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "looking for mixer: %s\n", mixer_name);
-       mixer = RAYO_MIXER_LOCATE(mixer_name);
-
-       if (!strcmp("add-member", action)) {
-               on_mixer_add_member_event(mixer, event);
-       } else if (!strcmp("conference-destroy", action)) {
-               on_mixer_destroy_event(mixer, event);
-       } else if (!strcmp("del-member", action)) {
-               on_mixer_delete_member_event(mixer, event);
-       }
-       /* TODO speaking events */
-
-done:
-       RAYO_RELEASE(mixer);
-}
-
-/**
- * Handle call originate event - create rayo call and send <iq><ref> to client.
- * @param rclient The Rayo client
- * @param event the originate event
- */
-static void on_call_originate_event(struct rayo_client *rclient, switch_event_t *event)
-{
-       const char *uuid = switch_event_get_header(event, "Unique-ID");
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(uuid);
-
-       if (call) {
-               iks *response, *ref;
-
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(RAYO_ID(call)), SWITCH_LOG_DEBUG, "Got originate event\n");
-
-               switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-               if (!zstr(call->dial_request_id)) {
-                       /* send response to DCP */
-                       response = iks_new("iq");
-                       iks_insert_attrib(response, "from", RAYO_JID(globals.server));
-                       iks_insert_attrib(response, "to", rayo_call_get_dcp_jid(call));
-                       iks_insert_attrib(response, "id", call->dial_request_id);
-                       iks_insert_attrib(response, "type", "result");
-                       ref = iks_insert(response, "ref");
-                       iks_insert_attrib(ref, "xmlns", RAYO_NS);
-
-                       iks_insert_attrib_printf(ref, "uri", "xmpp:%s", RAYO_JID(call));
-                       RAYO_SEND_MESSAGE(call, RAYO_JID(rclient), response);
-                       call->dial_request_id = NULL;
-               }
-               switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-       }
-       RAYO_RELEASE(call);
-}
-
-/**
- * Handle call end event
- * @param event the hangup event
- */
-static void on_call_end_event(switch_event_t *event)
-{
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(switch_event_get_header(event, "Unique-ID"));
-
-       if (call) {
-#if 0
-               char *event_str;
-               if (switch_event_serialize(event, &event_str, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rayo_call_get_uuid(call)), SWITCH_LOG_DEBUG, "%s\n", event_str);
-                       switch_safe_free(event_str);
-               }
-#endif
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(RAYO_ID(call)), SWITCH_LOG_DEBUG, "Got channel destroy event\n");
-
-               switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-               if (zstr(call->dial_request_id) && !call->dial_request_failed) {
-                       switch_event_dup(&call->end_event, event);
-                       RAYO_DESTROY(call);
-                       RAYO_RELEASE(call); /* decrement ref from creation */
-               }
-               switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-               RAYO_RELEASE(call); /* decrement this ref */
-       }
-}
-
-/**
- * Handle call answer event
- * @param rclient the Rayo client
- * @param event the answer event
- */
-static void on_call_answer_event(struct rayo_client *rclient, switch_event_t *event)
-{
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(switch_event_get_header(event, "Unique-ID"));
-       if (call) {
-               switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-               if (call->rayo_app_started) {
-                       iks *revent = iks_new_presence("answered", RAYO_NS,
-                               switch_event_get_header(event, "variable_rayo_call_jid"),
-                               switch_event_get_header(event, "variable_rayo_dcp_jid"));
-                       add_headers_to_event(iks_find(revent, "answered"), event, globals.add_variables_to_events);
-                       RAYO_SEND_MESSAGE(call, RAYO_JID(rclient), revent);
-               } else if (!call->answer_event) {
-                       /* delay sending this event until the rayo APP has started */
-                       switch_event_dup(&call->answer_event, event);
-               }
-               switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-               RAYO_RELEASE(call);
-       }
-}
-
-/**
- * Handle call ringing event
- * @param rclient the Rayo client
- * @param event the ringing event
- */
-static void on_call_ringing_event(struct rayo_client *rclient, switch_event_t *event)
-{
-       const char *call_direction = switch_event_get_header(event, "Call-Direction");
-       if (call_direction && !strcmp(call_direction, "outbound")) {
-               struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(switch_event_get_header(event, "Unique-ID"));
-               if (call) {
-                       switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-                       if (!call->ringing_sent) {
-                               iks *revent = iks_new_presence("ringing", RAYO_NS,
-                                       switch_event_get_header(event, "variable_rayo_call_jid"),
-                                       switch_event_get_header(event, "variable_rayo_dcp_jid"));
-                               add_headers_to_event(iks_find(revent, "ringing"), event, globals.add_variables_to_events);
-                               call->ringing_sent = 1;
-                               RAYO_SEND_MESSAGE(call, RAYO_JID(rclient), revent);
-                       }
-                       switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-                       RAYO_RELEASE(call);
-               }
-       }
-}
-
-/**
- * Handle call bridge event
- * @param rclient the Rayo client
- * @param event the bridge event
- */
-static void on_call_bridge_event(struct rayo_client *rclient, switch_event_t *event)
-{
-       const char *a_uuid = switch_event_get_header(event, "Unique-ID");
-       const char *b_uuid = switch_event_get_header(event, "Bridge-B-Unique-ID");
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(a_uuid);
-       struct rayo_call *b_call;
-
-       if (call) {
-               iks *revent;
-               iks *joined;
-
-               call->joined = JOINED_CALL;
-               call->joined_id = switch_core_sprintf(RAYO_POOL(call), "xmpp:%s@%s", b_uuid, RAYO_JID(globals.server));
-
-               /* send IQ result to client now. */
-               if (call->pending_join_request) {
-                       iks *request = call->pending_join_request;
-                       iks *result = iks_new_iq_result(request);
-                       call->pending_join_request = NULL;
-                       RAYO_SEND_REPLY(call, iks_find_attrib_soft(request, "from"), result);
-                       iks_delete(request);
-               }
-
-               b_call = RAYO_CALL_LOCATE_BY_ID(b_uuid);
-               if (b_call) {
-                       b_call->joined = JOINED_CALL;
-                       b_call->joined_id = switch_core_sprintf(RAYO_POOL(b_call), "xmpp:%s@%s", a_uuid, RAYO_JID(globals.server));
-
-                       /* send IQ result to client now. */
-                       if (b_call->pending_join_request) {
-                               iks *request = b_call->pending_join_request;
-                               iks *result = iks_new_iq_result(request);
-                               b_call->pending_join_request = NULL;
-                               RAYO_SEND_REPLY(call, iks_find_attrib_soft(request, "from"), result);
-                               iks_delete(request);
-                       }
-
-                       /* send B-leg event */
-                       revent = iks_new_presence("joined", RAYO_NS, RAYO_JID(b_call), rayo_call_get_dcp_jid(b_call));
-                       joined = iks_find(revent, "joined");
-                       iks_insert_attrib_printf(joined, "call-uri", "%s", b_call->joined_id);
-
-                       RAYO_SEND_MESSAGE(b_call, rayo_call_get_dcp_jid(b_call), revent);
-                       RAYO_RELEASE(b_call);
-               }
-
-               /* send A-leg event */
-               revent = iks_new_presence("joined", RAYO_NS,
-                       switch_event_get_header(event, "variable_rayo_call_jid"),
-                       switch_event_get_header(event, "variable_rayo_dcp_jid"));
-               joined = iks_find(revent, "joined");
-               iks_insert_attrib_printf(joined, "call-uri", "%s", call->joined_id);
-
-               RAYO_SEND_MESSAGE(call, RAYO_JID(rclient), revent);
-
-               RAYO_RELEASE(call);
-       }
-}
-
-/**
- * Handle call park event - this is fired after unjoining a call
- * @param rclient the Rayo client
- * @param event the unbridge event
- */
-static void on_call_park_event(struct rayo_client *rclient, switch_event_t *event)
-{
-       const char *a_uuid = switch_event_get_header(event, "Unique-ID");
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(a_uuid);
-
-       if (call) {
-               if (call->joined) {
-                       iks *revent;
-                       iks *unjoined;
-                       const char *joined_id = call->joined_id;
-
-                       call->joined = 0;
-                       call->joined_id = NULL;
-
-                       /* send IQ result to client now. */
-                       if (call->pending_join_request) {
-                               iks *request = call->pending_join_request;
-                               iks *result = iks_new_iq_result(request);
-                               call->pending_join_request = NULL;
-                               RAYO_SEND_REPLY(call, iks_find_attrib_soft(request, "from"), result);
-                               iks_delete(request);
-                       }
-
-                       /* send A-leg event */
-                       revent = iks_new_presence("unjoined", RAYO_NS,
-                               switch_event_get_header(event, "variable_rayo_call_jid"),
-                               switch_event_get_header(event, "variable_rayo_dcp_jid"));
-                       unjoined = iks_find(revent, "unjoined");
-                       iks_insert_attrib_printf(unjoined, "call-uri", "%s", joined_id);
-                       RAYO_SEND_MESSAGE(call, RAYO_JID(rclient), revent);
-               }
-               RAYO_RELEASE(call);
-       }
-}
-
-/**
- * Handle call execute application event
- * @param rclient the Rayo client
- * @param event the execute event
- */
-static void on_call_execute_event(struct rayo_client *rclient, switch_event_t *event)
-{
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(switch_event_get_header(event, "Unique-ID"));
-       if (call) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(RAYO_ID(call)), SWITCH_LOG_DEBUG, "Application %s execute\n", switch_event_get_header(event, "Application"));
-               RAYO_RELEASE(call);
-       }
-}
-
-/**
- * Handle call execute application complete event
- * @param rclient the Rayo client
- * @param event the execute complete event
- */
-static void on_call_execute_complete_event(struct rayo_client *rclient, switch_event_t *event)
-{
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(switch_event_get_header(event, "Unique-ID"));
-       if (call) {
-               const char *app = switch_event_get_header(event, "Application");
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(RAYO_ID(call)), SWITCH_LOG_DEBUG, "Application %s execute complete: %s \n",
-                       app,
-                       switch_event_get_header(event, "Application-Response"));
-               RAYO_RELEASE(call);
-       }
-}
-
-/**
- * Handle events to deliver to client connection
- * @param rclient the Rayo client connection to receive the event
- * @param event the event.
- */
-static void rayo_client_handle_event(struct rayo_client *rclient, switch_event_t *event)
-{
-       if (event) {
-               switch (event->event_id) {
-               case SWITCH_EVENT_CHANNEL_ORIGINATE:
-                       on_call_originate_event(rclient, event);
-                       break;
-               case SWITCH_EVENT_CHANNEL_PROGRESS:
-               case SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA:
-                       on_call_ringing_event(rclient, event);
-                       break;
-               case SWITCH_EVENT_CHANNEL_ANSWER:
-                       on_call_answer_event(rclient, event);
-                       break;
-               case SWITCH_EVENT_CHANNEL_BRIDGE:
-                       on_call_bridge_event(rclient, event);
-                       break;
-               case SWITCH_EVENT_CHANNEL_PARK:
-                       on_call_park_event(rclient, event);
-                       break;
-               case SWITCH_EVENT_CHANNEL_EXECUTE:
-                       on_call_execute_event(rclient, event);
-                       break;
-               case SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE:
-                       on_call_execute_complete_event(rclient, event);
-                       break;
-               default:
-                       /* don't care */
-                       break;
-               }
-       }
-}
-
-/**
- * Receives events from FreeSWITCH core and routes them to the proper Rayo client.
- * @param event received from FreeSWITCH core.  It will be destroyed by the core after this function returns.
- */
-static void route_call_event(switch_event_t *event)
-{
-       char *uuid = switch_event_get_header(event, "unique-id");
-       char *dcp_jid = switch_event_get_header(event, "variable_rayo_dcp_jid");
-       char *event_subclass = switch_event_get_header(event, "Event-Subclass");
-
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "got event %s %s\n", switch_event_name(event->event_id), zstr(event_subclass) ? "" : event_subclass);
-
-       /* this event is for a rayo client */
-       if (!zstr(dcp_jid)) {
-               struct rayo_actor *actor;
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "%s rayo event %s\n", dcp_jid, switch_event_name(event->event_id));
-
-               actor = RAYO_LOCATE(dcp_jid);
-               if (actor && !strcmp(RAT_CLIENT, actor->type)) {
-                       /* route to client */
-                       rayo_client_handle_event(RAYO_CLIENT(actor), event);
-               } else {
-                       /* TODO orphaned call... maybe allow events to queue so they can be delivered on reconnect? */
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Orphaned call event %s to %s\n", switch_event_name(event->event_id), dcp_jid);
-               }
-               RAYO_RELEASE(actor);
-       }
-}
-
-/**
- * Create server.
- * @param domain the domain name
- * @return the domain
- */
-static struct rayo_actor *rayo_server_create(const char *domain)
-{
-       switch_memory_pool_t *pool;
-       struct rayo_actor *new_server = NULL;
-
-       switch_core_new_memory_pool(&pool);
-       new_server = switch_core_alloc(pool, sizeof(*new_server));
-       RAYO_ACTOR_INIT(RAYO_ACTOR(new_server), pool, RAT_SERVER, "", domain, domain, NULL, rayo_server_send);
-
-       return new_server;
-}
-
-/**
- * Create an offer for a call
- * @param call the call
- * @param session the session
- * @return the offer
- */
-static iks *rayo_create_offer(struct rayo_call *call, switch_core_session_t *session)
-{
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       switch_caller_profile_t *profile = switch_channel_get_caller_profile(channel);
-       iks *presence = iks_new("presence");
-       iks *c = iks_insert(presence, "c");
-       iks *offer = iks_insert(presence, "offer");
-       const char *val;
-       char *ver;
-
-       /* <presence> */
-       iks_insert_attrib(presence, "from", RAYO_JID(call));
-
-       /* <c> */
-       ver = calculate_entity_sha1_ver(&rayo_call_identity, rayo_call_features);
-       iks_insert_attrib(c, "xmlns", IKS_NS_XMPP_ENTITY_CAPABILITIES);
-       iks_insert_attrib(c, "hash", "sha-1");
-       iks_insert_attrib(c, "node", RAYO_CALL_NS);
-       iks_insert_attrib(c, "ver", ver);
-       free(ver);
-
-       /* <offer> */
-       iks_insert_attrib(offer, "xmlns", RAYO_NS);
-       if (globals.offer_uri && (val = switch_channel_get_variable(channel, "sip_from_uri"))) {
-               /* is a SIP call - pass the URI */
-               if (!strchr(val, ':')) {
-                       iks_insert_attrib_printf(offer, "from", "sip:%s", val);
-               } else {
-                       iks_insert_attrib(offer, "from", val);
-               }
-       } else {
-               /* pass caller ID */
-               iks_insert_attrib(offer, "from", profile->caller_id_number);
-       }
-
-       if (globals.offer_uri && (val = switch_channel_get_variable(channel, "sip_to_uri"))) {
-               /* is a SIP call - pass the URI */
-               if (!strchr(val, ':')) {
-                       iks_insert_attrib_printf(offer, "to", "sip:%s", val);
-               } else {
-                       iks_insert_attrib(offer, "to", val);
-               }
-       } else {
-               /* pass dialed number */
-               iks_insert_attrib(offer, "to", profile->destination_number);
-       }
-
-       add_header(offer, "from", switch_channel_get_variable(channel, "sip_full_from"));
-       add_header(offer, "to", switch_channel_get_variable(channel, "sip_full_to"));
-       add_header(offer, "via", switch_channel_get_variable(channel, "sip_full_via"));
-       add_channel_headers_to_event(offer, channel, globals.add_variables_to_offer);
-
-       return presence;
-}
-
-/**
- * Monitor rayo call activity - detect idle
- */
-static switch_status_t rayo_call_on_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int i)
-{
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       struct rayo_call *call = (struct rayo_call *)switch_channel_get_private(channel, "rayo_call_private");
-       if (call) {
-               switch_time_t now = switch_micro_time_now();
-               switch_time_t idle_start = call->idle_start_time;
-               int idle_duration_ms = (now - idle_start) / 1000;
-               /* detect idle session (rayo-client has stopped controlling call) and terminate call */
-               if (rayo_call_is_joined(call) || rayo_call_is_faxing(call) || RAYO_ACTOR(call)->ref_count > 1) {
-                       call->idle_start_time = now;
-               } else if (idle_duration_ms > globals.max_idle_ms) {
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Ending abandoned call.  idle_duration_ms = %i ms\n", idle_duration_ms);
-                       switch_channel_hangup(channel, RAYO_CAUSE_HANGUP);
-               }
-       }
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * @param rclient to check
- * @param offer_filters optional list of username or username@server to match with client JID.
- * @param offer_filter_count
- * @return 1 if client is online and optional filter(s) match the client.  0 otherwise.
- */
-static int should_offer_to_client(struct rayo_client *rclient, char **offer_filters, int offer_filter_count)
-{
-       if (rclient->availability != PS_ONLINE) {
-               return 0;
-       }
-
-       if (offer_filter_count == 0) {
-               /* online and no filters to match */
-               return 1;
-       } else {
-               /* check if one of the filters matches the client */
-               int i;
-               const char *client_jid = RAYO_JID(rclient);
-               size_t client_jid_len = strlen(client_jid);
-               for (i = 0; i < offer_filter_count; i++) {
-                       char *offer_filter = offer_filters[i];
-                       if (!zstr(offer_filter)) {
-                               size_t offer_filter_len = strlen(offer_filter);
-                               if (strchr(offer_filter, '@')) {
-                                       if (offer_filter_len <= client_jid_len && !strncmp(offer_filter, client_jid, offer_filter_len)) {
-                                               /* username + server match */
-                                               return 1;
-                                       }
-                               } else if (offer_filter_len < client_jid_len && !strncmp(offer_filter, client_jid, offer_filter_len) && client_jid[offer_filter_len] == '@') {
-                                       /* username match */
-                                       return 1;
-                               }
-                       }
-               }
-       }
-       return 0;
-}
-
-/**
- * Offered call information
- */
-struct offered_call_info {
-       /** Call JID */
-       char *call_jid;
-       /** Time this offer expires */
-       switch_time_t offer_time;
-};
-
-/**
- * Deliver offer message to next available client(s)
- */
-static int send_offer_to_clients(struct rayo_call *from_call, switch_core_session_t *session)
-{
-       int i = 0;
-       int selection = 0;
-       int sent = 0;
-       switch_hash_index_t *hi = NULL;
-       iks *offer = NULL;
-
-       if (from_call->num_acps <= 0) {
-               return 0;
-       }
-
-       if (globals.offer_algorithm == OFFER_RANDOM) {
-               /* pick client at (not really) random */
-               selection = rand() % from_call->num_acps;
-       } else if (globals.offer_algorithm == OFFER_FIRST) {
-               /* send to first client */
-               selection = 0;
-       } else {
-               /* send to all clients */
-               selection = -1;
-       }
-
-       for (hi = switch_core_hash_first(from_call->acps); hi; hi = switch_core_hash_next(&hi)) {
-               if (i++ == selection || selection == -1) {
-                       const char *to_client_jid = NULL;
-                       const void *key;
-                       void *val;
-
-                       /* get client jid to send to */
-                       switch_core_hash_this(hi, &key, NULL, &val);
-                       to_client_jid = (const char *)key;
-                       switch_assert(to_client_jid);
-
-                       /* send offer to client, remembering jid as PCP */
-                       if (!offer) {
-                               offer = rayo_create_offer(from_call, session);
-                       }
-                       switch_core_hash_insert(from_call->pcps, to_client_jid, "1");
-                       iks_insert_attrib(offer, "to", to_client_jid);
-                       RAYO_SEND_MESSAGE_DUP(from_call, to_client_jid, offer);
-
-                       sent = 1;
-                       from_call->num_acps--;
-
-                       if (selection != -1) {
-                               break;
-                       }
-               }
-       }
-       switch_safe_free(hi);
-
-       if (sent) {
-               /* remove offered client JID(s) from list of available clients */
-               hi = NULL;
-               for (hi = switch_core_hash_first(from_call->pcps); hi; hi = switch_core_hash_next(&hi)) {
-                       const char *to_client_jid = NULL;
-                       const void *key;
-                       void *val;
-
-                       /* get client jid that was sent offer */
-                       switch_core_hash_this(hi, &key, NULL, &val);
-                       to_client_jid = (const char *)key;
-                       switch_assert(to_client_jid);
-
-                       /* remove client jid from available controlling parties */
-                       switch_core_hash_delete(from_call->acps, to_client_jid);
-               }
-               switch_safe_free(hi);
-
-               /* remember when offer was sent for this call to track timeouts */
-               if (globals.offer_timeout_us > 0) {
-                       struct offered_call_info *offered_call;
-                       switch_zmalloc(offered_call, sizeof(*offered_call));
-                       offered_call->offer_time = switch_micro_time_now();
-                       offered_call->call_jid = strdup(RAYO_JID(from_call));
-                       if (switch_queue_trypush(globals.offer_queue, offered_call) != SWITCH_STATUS_SUCCESS) {
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Failed to queue offered call info!  Offer timeout won't work on this call\n");
-                               switch_safe_free(offered_call->call_jid);
-                               switch_safe_free(offered_call);
-                       }
-               }
-       }
-
-       if (offer) {
-               iks_delete(offer);
-       }
-
-       return sent;
-}
-
-/**
- * Thread that monitors for timed out offers
- * @param thread this thread
- * @param obj unused
- * @return NULL
- */
-static void *SWITCH_THREAD_FUNC offer_timeout_thread(switch_thread_t *thread, void *obj)
-{
-       struct offered_call_info *next_offer;
-       switch_thread_rwlock_rdlock(globals.shutdown_rwlock);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "New offer timeout thread\n");
-       while (!globals.shutdown) {
-               if (switch_queue_pop(globals.offer_queue, (void *)&next_offer) == SWITCH_STATUS_SUCCESS) {
-                       switch_time_t now = switch_micro_time_now();
-                       switch_time_t offer_timeout = next_offer->offer_time + globals.offer_timeout_us;
-
-                       /* wait for timeout */
-                       while (offer_timeout > now && !globals.shutdown) {
-                               switch_time_t remain = offer_timeout - now;
-                               remain = remain > 500000 ? 500000 : remain;
-                               switch_sleep(remain);
-                               now = switch_micro_time_now();
-                       }
-
-                       /* check if offer was accepted - it is accepted if the call has a DCP (definitive controlling party) */
-                       if (!globals.shutdown) {
-                               struct rayo_call *call = RAYO_CALL_LOCATE(next_offer->call_jid);
-                               if (call) {
-                                       switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-                                       if (zstr(rayo_call_get_dcp_jid(call))) {
-                                               switch_core_session_t *session = switch_core_session_locate(rayo_call_get_uuid(call));
-                                               if (session) {
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, offer timeout\n", RAYO_JID(call));
-                                                       if (!send_offer_to_clients(call, session)) {
-                                                               /* nobody to offer to, end call */
-                                                               switch_channel_t *channel = switch_core_session_get_channel(session);
-                                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, no more clients to offer, ending call\n", RAYO_JID(call));
-                                                               switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE);
-                                                       }
-                                                       switch_core_session_rwunlock(session);
-                                               }
-                                       }
-                                       switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-                                       RAYO_RELEASE(call);
-                               }
-                       }
-
-                       switch_safe_free(next_offer->call_jid);
-                       switch_safe_free(next_offer);
-               }
-       }
-
-       /* clean up queue */
-       while(switch_queue_trypop(globals.offer_queue, (void *)&next_offer) == SWITCH_STATUS_SUCCESS) {
-               switch_safe_free(next_offer->call_jid);
-               switch_safe_free(next_offer);
-       }
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Offer timeout thread finished\n");
-       switch_thread_rwlock_unlock(globals.shutdown_rwlock);
-
-       return NULL;
-}
-
-/**
- * Create a new offer timeout thread
- * @param pool to use
- */
-static void start_offer_timeout_thread(switch_memory_pool_t *pool)
-{
-       switch_thread_t *thread;
-       switch_threadattr_t *thd_attr = NULL;
-       switch_threadattr_create(&thd_attr, pool);
-       switch_threadattr_detach_set(thd_attr, 1);
-       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-       switch_thread_create(&thread, thd_attr, offer_timeout_thread, NULL, pool);
-}
-
-#define RAYO_USAGE "[client username 1,client username n]"
-/**
- * Offer call and park channel
- */
-SWITCH_STANDARD_APP(rayo_app)
-{
-       int ok = 0;
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       struct rayo_call *call = RAYO_CALL_LOCATE_BY_ID(switch_core_session_get_uuid(session));
-       const char *app = ""; /* optional app to execute */
-       const char *app_args = ""; /* app args */
-
-       /* don't need to keep call reference count incremented in session- call is destroyed after all apps finish */
-       if (call) {
-               RAYO_RELEASE(call);
-       }
-
-       /* is outbound call already under control? */
-       if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
-               const char *origination_args = switch_channel_get_variable(channel, "rayo_origination_args");
-               /* check origination args */
-               if (!zstr(origination_args)) {
-                       char *argv[2] = { 0 };
-                       char *args = switch_core_session_strdup(session, origination_args);
-                       int argc = switch_separate_string(args, ' ', argv, sizeof(argv) / sizeof(argv[0]));
-                       if (argc) {
-                               if (!strcmp("conference", argv[0])) {
-                                       app = "conference";
-                                       app_args = argv[1];
-                               } else if (!strcmp("bridge", argv[0])) {
-                                       app = "intercept";
-                                       app_args = argv[1];
-                               } else {
-                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Invalid rayo args: %s\n", data);
-                                       goto done;
-                               }
-                       }
-               }
-               if (!call) {
-                       /* this scenario can only happen if a call was originated through a mechanism other than <dial>
-                          and then the rayo APP was executed to offer control */
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Outbound call that wasn't created with <dial>, will try to offer control\n");
-               }
-               ok = 1;
-       }
-
-       if (!call) {
-               /* offer control */
-               switch_hash_index_t *hi = NULL;
-               char *clients_to_offer[16] = { 0 };
-               int clients_to_offer_count = 0;
-
-               call = rayo_call_create(switch_core_session_get_uuid(session));
-               if (!call) {
-                       /* nothing that can be done to recover... */
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Failed to create call entity!\n");
-                       switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE);
-                       return;
-               }
-
-               switch_channel_set_variable(switch_core_session_get_channel(session), "rayo_call_jid", RAYO_JID(call));
-
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Offering call for Rayo 3PCC\n");
-
-               if (!zstr(data)) {
-                       char *data_dup = switch_core_session_strdup(session, data);
-                       clients_to_offer_count = switch_separate_string(data_dup, ',', clients_to_offer, sizeof(clients_to_offer) / sizeof(clients_to_offer[0]));
-               }
-
-               /* It is now safe for inbound call to be fully controlled by rayo client */
-               if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_INBOUND) {
-                       switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-                       call->rayo_app_started = 1;
-                       switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-               }
-
-               /* Offer call to all (or specified) ONLINE clients */
-               switch_mutex_lock(globals.clients_mutex);
-               for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(&hi)) {
-                       struct rayo_client *rclient;
-                       const void *key;
-                       void *val;
-                       switch_core_hash_this(hi, &key, NULL, &val);
-                       rclient = (struct rayo_client *)val;
-                       switch_assert(rclient);
-
-                       /* find clients available to take calls */
-                       if (should_offer_to_client(rclient, clients_to_offer, clients_to_offer_count)) {
-                               switch_core_hash_insert(call->acps, RAYO_JID(rclient), "1");
-                               call->num_acps++;
-                       }
-               }
-               ok = send_offer_to_clients(call, session);
-
-               switch_mutex_unlock(globals.clients_mutex);
-
-               /* nobody to offer to */
-               if (!ok) {
-                       pause_when_offline();
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_NOTICE, "Rejecting rayo call - there are no online rayo clients to offer call to\n");
-                       switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE);
-               }
-       }
-
-done:
-
-       if (ok) {
-               switch_channel_set_private(switch_core_session_get_channel(session), "rayo_call_private", call);
-               switch_channel_set_variable(channel, "hangup_after_bridge", "false");
-               switch_channel_set_variable(channel, "transfer_after_bridge", "");
-               switch_channel_set_variable(channel, "park_after_bridge", "true");
-               switch_channel_set_variable(channel, "hold_hangup_xfer_exten", "park:inline:");
-               switch_channel_set_variable(channel, SWITCH_SEND_SILENCE_WHEN_IDLE_VARIABLE, "-1"); /* required so that output mixing works */
-               switch_core_event_hook_add_read_frame(session, rayo_call_on_read_frame);
-
-               if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
-                       /* At this point, this outbound call might already be under control of a rayo client that is waiting for answer before sending
-                         commands.  The answered event might have been sent before we are ready to execute commands, so we delayed sending
-                         those events if the rayo APP hadn't started yet.  This delay would have only been a few milliseconds.
-                       */
-                       switch_mutex_lock(RAYO_ACTOR(call)->mutex);
-                       call->rayo_app_started = 1;
-                       if (call->answer_event) {
-                               struct rayo_client *rclient = RAYO_CLIENT(RAYO_LOCATE(rayo_call_get_dcp_jid(call)));
-                               if (rclient) {
-                                       on_call_answer_event(rclient, call->answer_event);
-                                       switch_event_destroy(&call->answer_event);
-                                       RAYO_RELEASE(rclient);
-                               }
-                       }
-                       switch_mutex_unlock(RAYO_ACTOR(call)->mutex);
-
-                       /* Outbound calls might have a nested join to another call or conference - do that now */
-                       if (!zstr(app)) {
-                               switch_core_session_execute_application(session, app, app_args);
-                       }
-               }
-
-               /* Ready for remote control */
-               switch_ivr_park(session, NULL);
-       }
-}
-
-/**
- * Stream locates client
- */
-static struct rayo_actor *xmpp_stream_client_locate(struct xmpp_stream *stream, const char *jid)
-{
-       struct rayo_actor *actor = NULL;
-       if (xmpp_stream_is_s2s(stream)) {
-               actor = RAYO_LOCATE(jid);
-               if (!actor) {
-                       /* previously unknown client - add it */
-                       struct rayo_peer_server *rserver = RAYO_PEER_SERVER(xmpp_stream_get_private(stream));
-                       actor = RAYO_ACTOR(rayo_client_create(jid, xmpp_stream_get_jid(stream), PS_UNKNOWN, rayo_client_send, rserver));
-                       RAYO_RETAIN(actor);
-               } else if (strcmp(RAT_CLIENT, actor->type)) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, not a client: %s\n", xmpp_stream_get_jid(stream), jid);
-                       RAYO_RELEASE(actor);
-                       actor = NULL;
-               }
-       } else {
-               actor = RAYO_ACTOR(xmpp_stream_get_private(stream));
-               RAYO_RETAIN(actor);
-       }
-       return actor;
-}
-
-/**
- * Handle stream resource binding
- * @param stream the new stream
- */
-static int on_xmpp_stream_bind(struct xmpp_stream *stream)
-{
-       if (!xmpp_stream_is_s2s(stream)) {
-               /* client belongs to stream */
-               struct rayo_client *client = rayo_client_create(xmpp_stream_get_jid(stream), xmpp_stream_get_jid(stream), PS_OFFLINE, rayo_client_send, NULL);
-               if (client) {
-                       xmpp_stream_set_private(stream, client);
-               } else {
-                       /* this went really bad... */
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "failed to create client entity!\n");
-                       return 0;
-               }
-       }
-       return 1;
-}
-
-/**
- * Handle new stream creation
- * @param stream the new stream
- */
-static int on_xmpp_stream_ready(struct xmpp_stream *stream)
-{
-       if (xmpp_stream_is_s2s(stream)) {
-               if (xmpp_stream_is_incoming(stream)) {
-                       /* peer server belongs to a s2s inbound stream */
-                       struct rayo_peer_server *peer = rayo_peer_server_create(xmpp_stream_get_jid(stream));
-                       if (peer) {
-                               xmpp_stream_set_private(stream, peer);
-                       } else {
-                               /* this went really bad... */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "failed to create peer server entity!\n");
-                               return 0;
-                       }
-               } else {
-                       /* send directed presence to domain */
-                       iks *presence = iks_new("presence");
-                       iks *x;
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "sending server presence\n");
-
-                       iks_insert_attrib(presence, "from", RAYO_JID(globals.server));
-                       iks_insert_attrib(presence, "to", xmpp_stream_get_jid(stream));
-                       x = iks_insert(presence, "show");
-                       iks_insert_cdata(x, "chat", 4);
-                       RAYO_SEND_MESSAGE(globals.server, xmpp_stream_get_jid(stream), presence);
-               }
-       }
-       return 1;
-}
-
-/**
- * Checks client availability.  If unknown, client presence is probed.
- * @param rclient to check
- */
-static void rayo_client_presence_check(struct rayo_client *rclient)
-{
-       if (rclient->availability == PS_UNKNOWN) {
-               /* for now, set online */
-               rclient->availability = PS_ONLINE;
-       }
-}
-
-/**
- * Handle stream stanza
- * @param stream the stream
- * @param stanza the stanza to process
- */
-static void on_xmpp_stream_recv(struct xmpp_stream *stream, iks *stanza)
-{
-       const char *name = iks_name(stanza);
-       if (!strcmp("iq", name)) {
-               const char *from = iks_find_attrib_soft(stanza, "from");
-               struct rayo_actor *actor = xmpp_stream_client_locate(stream, from);
-               if (actor) {
-                       rayo_client_presence_check(RAYO_CLIENT(actor));
-                       rayo_client_command_recv(RAYO_CLIENT(actor), stanza);
-                       RAYO_RELEASE(actor);
-               }
-       } else if (!strcmp("presence", name)) {
-               const char *from = iks_find_attrib_soft(stanza, "from");
-               struct rayo_actor *actor = xmpp_stream_client_locate(stream, from);
-               if (actor) {
-                       on_client_presence(RAYO_CLIENT(actor), stanza);
-                       RAYO_RELEASE(actor);
-               }
-       } else if (!strcmp("message", name)) {
-               const char *from = iks_find_attrib_soft(stanza, "from");
-               struct rayo_actor *actor = xmpp_stream_client_locate(stream, from);
-               if (actor) {
-                       rayo_client_presence_check(RAYO_CLIENT(actor));
-                       on_client_message(RAYO_CLIENT(actor), stanza);
-                       RAYO_RELEASE(actor);
-               }
-       }
-}
-
-/**
- * Handle stream destruction
- */
-static void on_xmpp_stream_destroy(struct xmpp_stream *stream)
-{
-       /* destroy peer server / client associated with this stream */
-       void *actor = xmpp_stream_get_private(stream);
-       if (actor) {
-               RAYO_RELEASE(actor);
-               RAYO_DESTROY(actor);
-       }
-}
-
-/**
- * A command alias
- */
-struct rayo_cmd_alias {
-       /** number of additional arguments for alias */
-       int args;
-       /** the alias template */
-       const char *cmd;
-};
-
-/**
- * Add an alias to an API command
- * @param alias_name
- * @param alias_target
- * @param alias_cmd
- * @param alias_args
- */
-static void rayo_add_cmd_alias(const char *alias_name, const char *alias_target, const char *alias_cmd, const char *alias_args)
-{
-       struct rayo_cmd_alias *alias = switch_core_alloc(globals.pool, sizeof(*alias));
-       alias->args = 0;
-       if (switch_is_number(alias_args)) {
-               alias->args = atoi(alias_args);
-               if (alias->args < 0) {
-                       alias->args = 0;
-               }
-       }
-       alias->cmd = alias_cmd;
-       switch_core_hash_insert(globals.cmd_aliases, alias_name, alias);
-
-       /* set up autocomplete of alias */
-       if (zstr(alias_target)) {
-               alias_target = "all";
-       }
-       switch_console_set_complete(switch_core_sprintf(globals.pool, "add rayo %s ::rayo::list_%s", alias_name, alias_target));
-}
-
-/**
- * Process module XML configuration
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS on successful configuration
- */
-static switch_status_t do_config(switch_memory_pool_t *pool, const char *config_file)
-{
-       switch_xml_t cfg, xml;
-       switch_status_t status = SWITCH_STATUS_SUCCESS;
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Configuring module\n");
-       if (!(xml = switch_xml_open_cfg(config_file, &cfg, NULL))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", config_file);
-               return SWITCH_STATUS_TERM;
-       }
-
-       /* set defaults */
-       globals.max_idle_ms = 30000;
-       globals.mixer_conf_profile = "sla";
-       globals.num_message_threads = 8;
-       globals.offer_uri = 1;
-       globals.pause_when_offline = 0;
-       globals.add_variables_to_offer = 0;
-       globals.add_variables_to_events = 0;
-       globals.offer_timeout_us = 5000000;
-       globals.offer_algorithm = OFFER_ALL;
-
-       /* get params */
-       {
-               switch_xml_t settings = switch_xml_child(cfg, "settings");
-               if (settings) {
-                       switch_xml_t param;
-                       for (param = switch_xml_child(settings, "param"); param; param = param->next) {
-                               const char *var = switch_xml_attr_soft(param, "name");
-                               const char *val = switch_xml_attr_soft(param, "value");
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "param: %s = %s\n", var, val);
-                               if (!strcasecmp(var, "max-idle-sec")) {
-                                       if (switch_is_number(val)) {
-                                               int max_idle_sec = atoi(val);
-                                               if (max_idle_sec > 0) {
-                                                       globals.max_idle_ms = max_idle_sec * 1000;
-                                               }
-                                       }
-                               } else if (!strcasecmp(var, "mixer-conf-profile")) {
-                                       if (!zstr(val)) {
-                                               globals.mixer_conf_profile = switch_core_strdup(pool, val);
-                                       }
-                               } else if (!strcasecmp(var, "message-threads")) {
-                                       if (switch_is_number(val)) {
-                                               int num_message_threads = atoi(val);
-                                               if (num_message_threads > 0) {
-                                                       globals.num_message_threads = num_message_threads;
-                                               }
-                                       }
-                               } else if (!strcasecmp(var, "offer-uri")) {
-                                       if (switch_false(val)) {
-                                               globals.offer_uri = 0;
-                                       }
-                               } else if (!strcasecmp(var, "pause-when-offline")) {
-                                       if (switch_true(val)) {
-                                               globals.pause_when_offline = 1;
-                                       }
-                               } else if (!strcasecmp(var, "add-variables-to-offer")) {
-                                       if (switch_true(val)) {
-                                               globals.add_variables_to_offer = 1;
-                                       }
-                               } else if (!strcasecmp(var, "add-variables-to-events")) {
-                                       if (switch_true(val)) {
-                                               globals.add_variables_to_offer = 1;
-                                               globals.add_variables_to_events = 1;
-                                       }
-                               } else if (!strcasecmp(var, "offer-timeout-ms")) {
-                                       int offer_timeout_ms = 0;
-                                       if (switch_is_number(val) && (offer_timeout_ms = atoi(val)) >= 0  && offer_timeout_ms < 120000) {
-                                               globals.offer_timeout_us = offer_timeout_ms * 1000;
-                                       } else {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Ignoring invalid value for offer-timeout-ms \"%s\"\n", val);
-                                       }
-                               } else if (!strcasecmp(var, "offer-algorithm")) {
-                                       if (zstr(val)) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "No value for offer-algorithm\n");
-                                       } else if (!strcasecmp(val, "all")) {
-                                               globals.offer_algorithm = OFFER_ALL;
-                                       } else if (!strcasecmp(val, "first")) {
-                                               globals.offer_algorithm = OFFER_FIRST;
-                                       } else if (!strcasecmp(val, "random")) {
-                                               globals.offer_algorithm = OFFER_RANDOM;
-                                       } else {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Ignoring invalid value for offer-algorithm \"%s\"\n", val);
-                                       }
-                               } else {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unsupported param: %s\n", var);
-                               }
-                       }
-               }
-       }
-
-       /* configure dial gateways */
-       {
-               switch_xml_t dial_gateways = switch_xml_child(cfg, "dial-gateways");
-
-               /* set defaults */
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setting default dial-gateways\n");
-               dial_gateway_add("default", "sofia/gateway/outbound/", 0);
-               dial_gateway_add("tel:", "sofia/gateway/outbound/", 4);
-               dial_gateway_add("user", "", 0);
-               dial_gateway_add("sofia", "", 0);
-
-               if (dial_gateways) {
-                       switch_xml_t dg;
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setting configured dial-gateways\n");
-                       for (dg = switch_xml_child(dial_gateways, "dial-gateway"); dg; dg = dg->next) {
-                               const char *uri_prefix = switch_xml_attr_soft(dg, "uriprefix");
-                               const char *dial_prefix = switch_xml_attr_soft(dg, "dialprefix");
-                               const char *strip_str = switch_xml_attr_soft(dg, "strip");
-                               int strip = 0;
-
-                               if (!zstr(strip_str) && switch_is_number(strip_str)) {
-                                       strip = atoi(strip_str);
-                                       if (strip < 0) {
-                                               strip = 0;
-                                       }
-                               }
-                               if (!zstr(uri_prefix)) {
-                                       dial_gateway_add(uri_prefix, dial_prefix, strip);
-                               }
-                       }
-               }
-       }
-
-       /* configure domain */
-       {
-               switch_xml_t domain = switch_xml_child(cfg, "domain");
-               if (domain) {
-                       switch_xml_t l;
-                       const char *shared_secret = switch_xml_attr_soft(domain, "shared-secret");
-                       const char *name = switch_xml_attr_soft(domain, "name");
-                       const char *cert = switch_xml_attr_soft(domain, "cert");
-                       const char *key = switch_xml_attr_soft(domain, "key");
-                       if (zstr(name)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing <domain name=\"... failed to configure rayo server\n");
-                               status = SWITCH_STATUS_FALSE;
-                               goto done;
-                       }
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Rayo domain set to %s\n", name);
-
-                       if (zstr(shared_secret)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Missing shared secret for %s domain.  Server dialback will not work\n", name);
-                       }
-
-                       globals.xmpp_context = xmpp_stream_context_create(name, shared_secret, on_xmpp_stream_bind, on_xmpp_stream_ready, on_xmpp_stream_recv, on_xmpp_stream_destroy);
-                       globals.server = rayo_server_create(name);
-
-                       /* set up TLS */
-                       if (!zstr(cert)) {
-                               xmpp_stream_context_add_cert(globals.xmpp_context, cert);
-                       }
-                       if (!zstr(key)) {
-                               xmpp_stream_context_add_key(globals.xmpp_context, key);
-                       }
-
-                       /* configure authorized users for this domain */
-                       l = switch_xml_child(domain, "users");
-                       if (l) {
-                               switch_xml_t u;
-                               for (u = switch_xml_child(l, "user"); u; u = u->next) {
-                                       const char *user = switch_xml_attr_soft(u, "name");
-                                       const char *password = switch_xml_attr_soft(u, "password");
-                                       xmpp_stream_context_add_user(globals.xmpp_context, user, password);
-                               }
-                       }
-
-                       /* get listeners for this domain */
-                       for (l = switch_xml_child(domain, "listen"); l; l = l->next) {
-                               const char *address = switch_xml_attr_soft(l, "address");
-                               const char *port = switch_xml_attr_soft(l, "port");
-                               const char *type = switch_xml_attr_soft(l, "type");
-                               const char *acl = switch_xml_attr_soft(l, "acl");
-                               int is_s2s = 0;
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s listener: %s:%s\n", type, address, port);
-                               is_s2s = !strcmp("s2s", type);
-                               if (!is_s2s && strcmp("c2s", type)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Type must be \"c2s\" or \"s2s\"!\n");
-                                       status = SWITCH_STATUS_FALSE;
-                                       goto done;
-                               }
-                               if (zstr(address)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Missing address!\n");
-                                       status = SWITCH_STATUS_FALSE;
-                                       goto done;
-                               }
-                               if (!zstr(port) && !switch_is_number(port)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Port must be an integer!\n");
-                                       status = SWITCH_STATUS_FALSE;
-                                       goto done;
-                               }
-                               if (xmpp_stream_context_listen(globals.xmpp_context, address, atoi(port), is_s2s, acl) != SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to create %s listener: %s:%s\n", type, address, port);
-                               }
-                       }
-
-                       /* get outbound server connections */
-                       for (l = switch_xml_child(domain, "connect"); l; l = l->next) {
-                               const char *domain = switch_xml_attr_soft(l, "domain");
-                               const char *address = switch_xml_attr_soft(l, "address");
-                               const char *port = switch_xml_attr_soft(l, "port");
-                               if (!zstr(port) && !switch_is_number(port)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Outbound server port must be an integer!\n");
-                                       status = SWITCH_STATUS_FALSE;
-                                       goto done;
-                               }
-                               if (zstr(address) && zstr(domain)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Missing outbound server address!\n");
-                                       status = SWITCH_STATUS_FALSE;
-                                       goto done;
-                               }
-                               xmpp_stream_context_connect(globals.xmpp_context, domain, address, atoi(port));
-                       }
-               }
-       }
-
-       /* get aliases */
-       {
-               switch_xml_t aliases = switch_xml_child(cfg, "aliases");
-               if (aliases) {
-                       switch_xml_t alias;
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setting configured aliases\n");
-                       for (alias = switch_xml_child(aliases, "alias"); alias; alias = alias->next) {
-                               const char *alias_name = switch_xml_attr_soft(alias, "name");
-                               const char *alias_target = switch_xml_attr_soft(alias, "target");
-                               const char *alias_args = switch_xml_attr_soft(alias, "args");
-                               if (!zstr(alias_name) && !zstr(alias->txt)) {
-                                       rayo_add_cmd_alias(alias_name, switch_core_strdup(pool, alias_target), switch_core_strdup(pool, alias->txt), switch_core_strdup(pool, alias_args));
-                               }
-                       }
-               }
-       }
-
-done:
-       switch_xml_free(xml);
-
-       return status;
-}
-
-/**
- * Dump rayo actor stats
- */
-static void rayo_actor_dump(struct rayo_actor *actor, switch_stream_handle_t *stream)
-{
-       if (!strcmp(RAT_CLIENT, actor->type)) {
-               stream->write_function(stream, "TYPE='%s',SUBTYPE='%s',ID='%s',JID='%s',DOMAIN='%s',REFS=%i,STATUS='%s'", actor->type, actor->subtype, actor->id, RAYO_JID(actor), RAYO_DOMAIN(actor), actor->ref_count, presence_status_to_string(RAYO_CLIENT(actor)->availability));
-       } else {
-               stream->write_function(stream, "TYPE='%s',SUBTYPE='%s',ID='%s',JID='%s',DOMAIN='%s',REFS=%i", actor->type, actor->subtype, actor->id, RAYO_JID(actor), RAYO_DOMAIN(actor), actor->ref_count);
-       }
-}
-
-/**
- * Dump rayo actors
- */
-static int dump_api(const char *cmd, switch_stream_handle_t *stream)
-{
-       switch_hash_index_t *hi;
-       if (!zstr(cmd)) {
-               return 0;
-       }
-
-       stream->write_function(stream, "\nENTITIES\n");
-       switch_mutex_lock(globals.actors_mutex);
-       for (hi = switch_core_hash_first(globals.actors); hi; hi = switch_core_hash_next(&hi)) {
-               struct rayo_actor *actor = NULL;
-               const void *key;
-               void *val;
-               switch_core_hash_this(hi, &key, NULL, &val);
-               actor = (struct rayo_actor *)val;
-               switch_assert(actor);
-               stream->write_function(stream, "        ");
-               rayo_actor_dump(actor, stream);
-               stream->write_function(stream, "\n");
-       }
-
-       for (hi = switch_core_hash_first(globals.destroy_actors); hi; hi = switch_core_hash_next(&hi)) {
-               struct rayo_actor *actor = NULL;
-               const void *key;
-               void *val;
-               switch_core_hash_this(hi, &key, NULL, &val);
-               actor = (struct rayo_actor *)val;
-               switch_assert(actor);
-               stream->write_function(stream, "(DEAD)  ");
-               rayo_actor_dump(actor, stream);
-               stream->write_function(stream, "\n");
-       }
-       switch_mutex_unlock(globals.actors_mutex);
-
-       xmpp_stream_context_dump(globals.xmpp_context, stream);
-
-       return 1;
-}
-
-/**
- * Process response to console command_api
- */
-void rayo_console_client_send(struct rayo_actor *actor, struct rayo_message *msg)
-{
-       iks *response = msg->payload;
-
-       if (response) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nRECV: from %s, %s\n", msg->from_jid, iks_string(iks_stack(response), response));
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nRECV: (null) from %s\n", msg->from_jid);
-       }
-}
-
-/**
- * Create a new Rayo console client
- * @return the new client or NULL
- */
-static struct rayo_client *rayo_console_client_create(void)
-{
-       struct rayo_client *client = NULL;
-       char *jid = NULL;
-       char id[SWITCH_UUID_FORMATTED_LENGTH + 1] = { 0 };
-       switch_uuid_str(id, sizeof(id));
-       jid = switch_mprintf("%s@%s/console", id, RAYO_JID(globals.server));
-       client = rayo_client_create(jid, NULL, PS_OFFLINE, rayo_console_client_send, NULL);
-       free(jid);
-       return client;
-}
-
-/**
- * Send command from console
- */
-static void send_console_command(struct rayo_client *client, const char *to, const char *command_str)
-{
-       iks *command = NULL;
-       iksparser *p = iks_dom_new(&command);
-
-       if (p && iks_parse(p, command_str, 0, 1) == IKS_OK && command) {
-               char *str;
-               iks *iq = NULL;
-
-               /* is command already wrapped in IQ? */
-               if (!strcmp(iks_name(command), "iq")) {
-                       /* command already IQ */
-                       iq = command;
-               } else {
-                       /* create IQ to wrap command */
-                       iq = iks_new_within("iq", iks_stack(command));
-                       iks_insert_node(iq, command);
-               }
-
-               /* fill in command attribs */
-               iks_insert_attrib(iq, "to", to);
-               if (!iks_find_attrib(iq, "type")) {
-                       iks_insert_attrib(iq, "type", "set");
-               }
-
-               if (!iks_find_attrib(iq, "id")) {
-                       iks_insert_attrib_printf(iq, "id", "console-%i", RAYO_SEQ_NEXT(client));
-               }
-
-               iks_insert_attrib(iq, "from", RAYO_JID(client));
-
-               /* send command */
-               str = iks_string(iks_stack(iq), iq);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nSEND: to %s, %s\n", to, str);
-               rayo_client_command_recv(client, iq);
-               iks_delete(command);
-               iks_parser_delete(p);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "bad request xml\n");
-               if (p) {
-                       iks_parser_delete(p);
-               }
-       }
-}
-
-/**
- * Send command to rayo actor
- */
-static int command_api(char *cmd, switch_stream_handle_t *stream)
-{
-       char *argv[2] = { 0 };
-       if (!zstr(cmd)) {
-               int argc = switch_separate_string(cmd, ' ', argv, sizeof(argv) / sizeof(argv[0]));
-               if (argc != 2) {
-                       return 0;
-               }
-       } else {
-               return 0;
-       }
-
-       /* send command */
-       send_console_command(globals.console, argv[0], argv[1]);
-       stream->write_function(stream, "+OK\n");
-
-       return 1;
-}
-
-/**
- * Send command to rayo actor
- */
-static int alias_api(struct rayo_cmd_alias *alias, char *args, switch_stream_handle_t *stream)
-{
-       char *argv[10] = { 0 };
-       int argc, i;
-       char *cmd;
-       char *jid;
-
-       if (zstr(alias->cmd)) {
-               stream->write_function(stream, "-ERR missing alias template.  Check configuration.\n");
-       }
-
-       if (zstr(args)) {
-               stream->write_function(stream, "-ERR no args\n");
-               return 1;
-       }
-
-       /* check args */
-       argc = switch_separate_string(args, ' ', argv, sizeof(argv) / sizeof(argv[0]));
-       if (argc != alias->args + 1) {
-               stream->write_function(stream, "-ERR wrong number of args (%i/%i)\n", argc, alias->args + 1);
-               return 1;
-       }
-
-       jid = argv[0];
-
-       /* build command from args */
-       cmd = strdup(alias->cmd);
-       for (i = 1; i < argc; i++) {
-               char *cmd_new;
-               char to_replace[12] = { 0 };
-               sprintf(to_replace, "$%i", i);
-               cmd_new = switch_string_replace(cmd, to_replace, argv[i]);
-               free(cmd);
-               cmd = cmd_new;
-       }
-
-       /* send command */
-       send_console_command(globals.console, jid, cmd);
-       stream->write_function(stream, "+OK\n");
-       free(cmd);
-
-       return 1;
-}
-
-/**
- * Send message from console
- */
-static void send_console_message(struct rayo_client *client, const char *to, const char *type, const char *message_str)
-{
-       iks *message = NULL, *x;
-       message = iks_new("message");
-       iks_insert_attrib(message, "to", to);
-       iks_insert_attrib(message, "from", RAYO_JID(client));
-       iks_insert_attrib_printf(message, "id", "console-%i", RAYO_SEQ_NEXT(client));
-       iks_insert_attrib(message, "type", type);
-       x = iks_insert(message, "body");
-       iks_insert_cdata(x, message_str, strlen(message_str));
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nSEND: to %s, %s\n", to, iks_string(iks_stack(message), message));
-       RAYO_SEND_MESSAGE(client, to, message);
-}
-
-/**
- * Send message to rayo actor
- */
-static int message_api(char *cmd, switch_stream_handle_t *stream)
-{
-       char *argv[3] = { 0 };
-       if (!zstr(cmd)) {
-               int argc = switch_separate_string(cmd, ' ', argv, sizeof(argv) / sizeof(argv[0]));
-               if (argc != 3) {
-                       return 0;
-               }
-       } else {
-               return 0;
-       }
-
-       /* send message */
-       send_console_message(globals.console, argv[0], argv[1], argv[2]);
-       stream->write_function(stream, "+OK\n");
-
-       return 1;
-}
-
-/**
- * Send presence from console
- */
-static void send_console_presence(struct rayo_client *client, const char *to, int is_online)
-{
-       iks *presence = NULL, *x;
-       presence = iks_new("presence");
-       iks_insert_attrib(presence, "to", to);
-       iks_insert_attrib(presence, "from", RAYO_JID(client));
-       iks_insert_attrib_printf(presence, "id", "console-%i", RAYO_SEQ_NEXT(client));
-       if (!is_online) {
-               iks_insert_attrib(presence, "type", "unavailable");
-       }
-       x = iks_insert(presence, "show");
-       iks_insert_cdata(x, is_online ? "chat" : "dnd", 0);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "\nSEND: to %s, %s\n", to, iks_string(iks_stack(presence), presence));
-       RAYO_SEND_MESSAGE(client, to, presence);
-}
-
-/**
- * Send console presence
- */
-static int presence_api(char *cmd, switch_stream_handle_t *stream)
-{
-       int is_online = 0;
-       char *argv[2] = { 0 };
-       if (!zstr(cmd)) {
-               int argc = switch_separate_string(cmd, ' ', argv, sizeof(argv) / sizeof(argv[0]));
-               if (argc != 2) {
-                       return 0;
-               }
-       } else {
-               return 0;
-       }
-
-       if (!strcmp("online", argv[1])) {
-               is_online = 1;
-       } else if (strcmp("offline", argv[1])) {
-               return 0;
-       }
-
-       /* send presence */
-       send_console_presence(globals.console, argv[0], is_online);
-       stream->write_function(stream, "+OK\n");
-       return 1;
-}
-
-#define RAYO_API_SYNTAX "status | (<alias> <jid>) | (cmd <jid> <command>) | (msg <jid> <message text>) | (presence <jid> <online|offline>)"
-SWITCH_STANDARD_API(rayo_api)
-{
-       struct rayo_cmd_alias *alias;
-       char *cmd_dup = NULL;
-       char *argv[2] = { 0 };
-       int success = 0;
-
-       if (zstr(cmd) ) {
-               goto done;
-       }
-
-       cmd_dup = strdup(cmd);
-       switch_separate_string(cmd_dup, ' ', argv, sizeof(argv) / sizeof(argv[0]));
-
-       /* check if a command alias */
-       alias = switch_core_hash_find(globals.cmd_aliases, argv[0]);
-
-       if (alias) {
-               success = alias_api(alias, argv[1], stream);
-       } else if (!strcmp("cmd", argv[0])) {
-               success = command_api(argv[1], stream);
-       } else if (!strcmp("status", argv[0])) {
-               success = dump_api(argv[1], stream);
-       } else if (!strcmp("msg", argv[0])) {
-               success = message_api(argv[1], stream);
-       } else if (!strcmp("presence", argv[0])) {
-               success = presence_api(argv[1], stream);
-       }
-
-done:
-       if (!success) {
-               stream->write_function(stream, "-ERR: USAGE %s\n", RAYO_API_SYNTAX);
-       }
-
-       switch_safe_free(cmd_dup);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Console auto-completion for actors given validation function
- */
-static switch_status_t list_actors(const char *line, const char *cursor, switch_console_callback_match_t **matches, rayo_actor_match_fn match)
-{
-       switch_hash_index_t *hi;
-       void *val;
-       const void *vvar;
-       switch_console_callback_match_t *my_matches = NULL;
-       switch_status_t status = SWITCH_STATUS_FALSE;
-       struct rayo_actor *actor;
-
-       switch_mutex_lock(globals.actors_mutex);
-       for (hi = switch_core_hash_first(globals.actors); hi; hi = switch_core_hash_next(&hi)) {
-               switch_core_hash_this(hi, &vvar, NULL, &val);
-
-               actor = (struct rayo_actor *) val;
-               if (match(actor)) {
-                       switch_console_push_match(&my_matches, (const char *) vvar);
-               }
-       }
-       switch_mutex_unlock(globals.actors_mutex);
-
-       if (my_matches) {
-               *matches = my_matches;
-               status = SWITCH_STATUS_SUCCESS;
-       }
-
-       return status;
-}
-
-/**
- * @return true if internal actor
- */
-static switch_bool_t is_internal_actor(struct rayo_actor *actor)
-{
-       return strcmp(RAT_CLIENT, actor->type) && strcmp(RAT_PEER_SERVER, actor->type);
-}
-
-/**
- * Console auto-completion for all internal actors
- */
-static switch_status_t list_internal(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_internal_actor);
-}
-
-/**
- * @return true if external actor
- */
-static switch_bool_t is_external_actor(struct rayo_actor *actor)
-{
-       return !strcmp(RAT_CLIENT, actor->type) || !strcmp(RAT_PEER_SERVER, actor->type);
-}
-
-/**
- * Console auto-completion for all external actors
- */
-static switch_status_t list_external(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_external_actor);
-}
-
-/**
- * @return true
- */
-static switch_bool_t is_any_actor(struct rayo_actor *actor)
-{
-       return SWITCH_TRUE;
-}
-
-/**
- * Console auto-completion for all actors
- */
-static switch_status_t list_all(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_any_actor);
-}
-
-/**
- * @return true if a server
- */
-static switch_bool_t is_server_actor(struct rayo_actor *actor)
-{
-       return !strcmp(RAT_SERVER, actor->type);
-}
-
-/**
- * Console auto-completion for all servers
- */
-static switch_status_t list_server(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_server_actor);
-}
-
-/**
- * @return true if a call
- */
-static switch_bool_t is_call_actor(struct rayo_actor *actor)
-{
-       return !strcmp(RAT_CALL, actor->type);
-}
-
-/**
- * Console auto-completion for all calls
- */
-static switch_status_t list_call(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_call_actor);
-}
-
-/**
- * @return true if a component
- */
-switch_bool_t is_component_actor(struct rayo_actor *actor)
-{
-       return !strncmp(RAT_COMPONENT, actor->type, strlen(RAT_COMPONENT));
-}
-
-/**
- * Console auto-completion for all components
- */
-static switch_status_t list_component(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_component_actor);
-}
-
-/**
- * @return true if a record component
- */
-static switch_bool_t is_record_actor(struct rayo_actor *actor)
-{
-       return is_component_actor(actor) && !strcmp(actor->subtype, "record");
-}
-
-/**
- * Console auto-completion for all components
- */
-static switch_status_t list_record(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_record_actor);
-}
-
-/**
- * @return true if an output component
- */
-static switch_bool_t is_output_actor(struct rayo_actor *actor)
-{
-       return is_component_actor(actor) && !strcmp(actor->subtype, "output");
-}
-
-/**
- * Console auto-completion for all components
- */
-static switch_status_t list_output(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_output_actor);
-}
-
-/**
- * @return true if an input component
- */
-static switch_bool_t is_input_actor(struct rayo_actor *actor)
-{
-       return is_component_actor(actor) && !strcmp(actor->subtype, "input");
-}
-
-/**
- * Console auto-completion for all components
- */
-static switch_status_t list_input(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       return list_actors(line, cursor, matches, is_input_actor);
-}
-
-/**
- * Shutdown module on load failure or shutdown from FreeSWITCH core
- */
-static switch_status_t do_shutdown(void)
-{
-       switch_console_del_complete_func("::rayo::list_all");
-       switch_console_del_complete_func("::rayo::list_internal");
-       switch_console_del_complete_func("::rayo::list_external");
-       switch_console_del_complete_func("::rayo::list_server");
-       switch_console_del_complete_func("::rayo::list_call");
-       switch_console_del_complete_func("::rayo::list_component");
-       switch_console_del_complete_func("::rayo::list_record");
-       switch_console_del_complete_func("::rayo::list_output");
-       switch_console_del_complete_func("::rayo::list_input");
-       switch_console_set_complete("del rayo");
-
-       /* stop XMPP streams */
-       if (globals.xmpp_context) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Waiting for XMPP threads to stop\n");
-               xmpp_stream_context_destroy(globals.xmpp_context);
-       }
-
-       /* stop threads */
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Waiting for message and offer timeout threads to stop\n");
-       stop_all_threads();
-
-       if (globals.console) {
-               RAYO_RELEASE(globals.console);
-               RAYO_DESTROY(globals.console);
-               globals.console = NULL;
-       }
-
-       if (globals.server) {
-               RAYO_RELEASE(globals.server);
-               RAYO_DESTROY(globals.server);
-               globals.server = NULL;
-       }
-
-       rayo_components_shutdown();
-
-       switch_event_unbind_callback(route_call_event);
-       switch_event_unbind_callback(on_call_end_event);
-       switch_event_unbind_callback(route_mixer_event);
-
-       if (globals.command_handlers) {
-               switch_core_hash_destroy(&globals.command_handlers);
-       }
-       if (globals.event_handlers) {
-               switch_core_hash_destroy(&globals.event_handlers);
-       }
-       if (globals.clients_roster) {
-               switch_core_hash_destroy(&globals.clients_roster);
-       }
-       if (globals.actors) {
-               switch_core_hash_destroy(&globals.actors);
-       }
-       if (globals.destroy_actors) {
-               switch_core_hash_destroy(&globals.destroy_actors);
-       }
-       if (globals.actors_by_id) {
-               switch_core_hash_destroy(&globals.actors_by_id);
-       }
-       if (globals.dial_gateways) {
-               switch_core_hash_destroy(&globals.dial_gateways);
-       }
-       if (globals.cmd_aliases) {
-               switch_core_hash_destroy(&globals.cmd_aliases);
-       }
-
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Load module
- */
-SWITCH_MODULE_LOAD_FUNCTION(mod_rayo_load)
-{
-       switch_api_interface_t *api_interface;
-       switch_application_interface_t *app_interface;
-
-
-       if (switch_event_reserve_subclass("rayo::cpa") != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", "rayo::cpa");
-               return SWITCH_STATUS_TERM;
-       }
-
-
-       *module_interface = switch_loadable_module_create_module_interface(pool, modname);
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Loading module\n");
-
-       memset(&globals, 0, sizeof(globals));
-       globals.pool = pool;
-       switch_core_hash_init(&globals.command_handlers);
-       switch_core_hash_init(&globals.event_handlers);
-       switch_core_hash_init(&globals.clients_roster);
-       switch_mutex_init(&globals.clients_mutex, SWITCH_MUTEX_NESTED, pool);
-       switch_core_hash_init(&globals.actors);
-       switch_core_hash_init(&globals.destroy_actors);
-       switch_core_hash_init(&globals.actors_by_id);
-       switch_mutex_init(&globals.actors_mutex, SWITCH_MUTEX_NESTED, pool);
-       switch_core_hash_init(&globals.dial_gateways);
-       switch_mutex_init(&globals.dial_gateways_mutex, SWITCH_MUTEX_NESTED, pool);
-       switch_core_hash_init(&globals.cmd_aliases);
-       switch_thread_rwlock_create(&globals.shutdown_rwlock, pool);
-       switch_queue_create(&globals.msg_queue, 25000, pool);
-       switch_queue_create(&globals.offer_queue, 25000, pool);
-       globals.offline_logged = 1;
-
-       /* server commands */
-       rayo_actor_command_handler_add(RAT_SERVER, "", "get:"IKS_NS_XMPP_PING":ping", on_iq_xmpp_ping);
-       rayo_actor_command_handler_add(RAT_SERVER, "", "get:"IKS_NS_XMPP_DISCO":query", on_iq_get_xmpp_disco);
-       rayo_actor_command_handler_add(RAT_SERVER, "", "set:"RAYO_NS":dial", on_rayo_dial);
-       rayo_actor_command_handler_add(RAT_SERVER, "", "set:"RAYO_NS":exec", on_rayo_exec);
-
-       /* Rayo call commands */
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_NS":accept", on_rayo_accept);
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_NS":answer", on_rayo_answer);
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_NS":redirect", on_rayo_redirect);
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_NS":reject", on_rayo_hangup); /* handles both reject and hangup */
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_NS":hangup", on_rayo_hangup); /* handles both reject and hangup */
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_NS":join", on_rayo_join);
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_NS":unjoin", on_rayo_unjoin);
-
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_ORIGINATE, NULL, route_call_event, NULL);
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_PROGRESS_MEDIA, NULL, route_call_event, NULL);
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_PROGRESS, NULL, route_call_event, NULL);
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_ANSWER, NULL, route_call_event, NULL);
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_BRIDGE, NULL, route_call_event, NULL);
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_PARK, NULL, route_call_event, NULL);
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_EXECUTE, NULL, route_call_event, NULL);
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE, NULL, route_call_event, NULL);
-
-       switch_event_bind(modname, SWITCH_EVENT_CHANNEL_DESTROY, NULL, on_call_end_event, NULL);
-
-       switch_event_bind(modname, SWITCH_EVENT_CUSTOM, "conference::maintenance", route_mixer_event, NULL);
-
-       SWITCH_ADD_APP(app_interface, "rayo", "Offer call control to Rayo client(s)", "", rayo_app, RAYO_USAGE, SAF_SUPPORT_NOMEDIA);
-       SWITCH_ADD_API(api_interface, "rayo", "Query rayo status", rayo_api, RAYO_API_SYNTAX);
-
-       /* set up rayo components */
-       if (rayo_components_load(module_interface, pool, RAYO_CONFIG_FILE) != SWITCH_STATUS_SUCCESS) {
-               goto error;
-       }
-
-       /* configure / open sockets */
-       if(do_config(globals.pool, RAYO_CONFIG_FILE) != SWITCH_STATUS_SUCCESS) {
-               goto error;
-       }
-
-       /* create admin client */
-       globals.console = rayo_console_client_create();
-       if (!globals.console) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Failed to create console client entity!\n");
-               goto error;
-       }
-
-       /* start up message threads */
-       {
-               int i;
-               for (i = 0; i < globals.num_message_threads; i++) {
-                       start_deliver_message_thread(pool);
-               }
-       }
-       start_offer_timeout_thread(pool);
-
-       switch_console_set_complete("add rayo status");
-       switch_console_set_complete("add rayo msg ::rayo::list_all");
-       switch_console_set_complete("add rayo msg ::rayo::list_all chat");
-       switch_console_set_complete("add rayo msg ::rayo::list_all groupchat");
-       switch_console_set_complete("add rayo msg ::rayo::list_all headline");
-       switch_console_set_complete("add rayo msg ::rayo::list_all normal");
-       switch_console_set_complete("add rayo presence ::rayo::list_server online");
-       switch_console_set_complete("add rayo presence ::rayo::list_server offline");
-       switch_console_add_complete_func("::rayo::list_all", list_all);
-       switch_console_add_complete_func("::rayo::list_internal", list_internal);
-       switch_console_add_complete_func("::rayo::list_external", list_external);
-       switch_console_add_complete_func("::rayo::list_server", list_server);
-       switch_console_add_complete_func("::rayo::list_call", list_call);
-       switch_console_add_complete_func("::rayo::list_component", list_component);
-       switch_console_add_complete_func("::rayo::list_record", list_record);
-       switch_console_add_complete_func("::rayo::list_output", list_output);
-       switch_console_add_complete_func("::rayo::list_input", list_input);
-
-       return SWITCH_STATUS_SUCCESS;
-
- error:
-       switch_event_free_subclass("rayo::cpa");
-       do_shutdown();
-       return SWITCH_STATUS_TERM;
-
-}
-
-/**
- * Shutdown module.  Notifies threads to stop.
- */
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_rayo_shutdown)
-{
-       switch_status_t result;
-
-       switch_event_free_subclass("rayo::cpa");
-       result = do_shutdown();
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Module shutdown\n");
-       return result;
-}
-
-/**
- * Checks status of connected clients
- */
-SWITCH_MODULE_RUNTIME_FUNCTION(mod_rayo_runtime)
-{
-       if (globals.pause_when_offline) {
-               switch_thread_rwlock_rdlock(globals.shutdown_rwlock);
-               while (!globals.shutdown) {
-                       switch_sleep(1000 * 1000); /* 1 second */
-                       pause_when_offline();
-               }
-               switch_thread_rwlock_unlock(globals.shutdown_rwlock);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Runtime thread is done\n");
-       }
-       return SWITCH_STATUS_TERM;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/mod_rayo.h b/src/mod/event_handlers/mod_rayo/mod_rayo.h
deleted file mode 100644 (file)
index 2d066c4..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * mod_rayo.h -- Rayo server / node implementation.  Allows MxN clustering of FreeSWITCH and Rayo Clients (like Adhearsion)
- *
- */
-#ifndef MOD_RAYO_H
-#define MOD_RAYO_H
-
-#include <switch.h>
-#include <iksemel.h>
-
-#include "iks_helpers.h"
-
-#define RAYO_VERSION "1"
-#define RAYO_BASE "urn:xmpp:rayo:"
-
-#define RAYO_NS RAYO_BASE RAYO_VERSION
-#define RAYO_CLIENT_NS RAYO_BASE "client:" RAYO_VERSION
-#define RAYO_CALL_NS RAYO_BASE "call:" RAYO_VERSION
-#define RAYO_MIXER_NS RAYO_BASE "mixer:" RAYO_VERSION
-
-#define RAYO_CPA_BASE RAYO_BASE "cpa:"
-#define RAYO_CPA_NS RAYO_CPA_BASE RAYO_VERSION
-
-#define RAT_CALL "CALL"
-#define RAT_COMPONENT "COMPONENT"
-#define RAT_CALL_COMPONENT RAT_COMPONENT"_CALL"
-#define RAT_MIXER "MIXER"
-#define RAT_MIXER_COMPONENT RAT_COMPONENT"_MIXER"
-#define RAT_SERVER "SERVER"
-#define RAT_PEER_SERVER "PEER_SERVER"
-#define RAT_CLIENT "CLIENT"
-
-struct rayo_actor;
-struct rayo_call;
-struct rayo_mixer;
-struct rayo_component;
-
-/**
- * A message sent to an actor
- */
-struct rayo_message {
-       iks *payload;
-       char *to_jid;
-       iksid *to;
-       char *from_jid;
-       iksid *from;
-       char *from_type;
-       char *from_subtype;
-       int is_reply;
-       char *file;
-       int line;
-};
-
-typedef void (* rayo_actor_cleanup_fn)(struct rayo_actor *);
-typedef void (* rayo_actor_send_fn)(struct rayo_actor *, struct rayo_message *);
-
-/**
- * A rayo actor - this is an entity that can be controlled by a rayo client
- */
-struct rayo_actor {
-       /** Type of actor */
-       char *type;
-       /** Sub-type of actor */
-       char *subtype;
-       /** domain part of JID */
-       char *domain;
-       /** Internal ID */
-       char *id;
-       /** actor JID */
-       char *jid;
-       /** Actor pool */
-       switch_memory_pool_t *pool;
-       /** synchronizes access to this actor */
-       switch_mutex_t *mutex;
-       /** an atomically incrementing sequence for this actor */
-       int seq;
-       /** number of users of this actor */
-       int ref_count;
-       /** destroy flag */
-       int destroy;
-       /** XMPP message handling function */
-       rayo_actor_send_fn send_fn;
-       /** optional cleanup */
-       rayo_actor_cleanup_fn cleanup_fn;
-       /** optional parent */
-       struct rayo_actor *parent;
-};
-
-/**
- * A Rayo component
- */
-struct rayo_component {
-       /** base actor class */
-       struct rayo_actor base;
-       /** owning client JID */
-       const char *client_jid;
-       /** external ref */
-       const char *ref;
-       /** true if component has completed */
-       int complete;
-};
-
-#define RAYO_ACTOR(x) ((struct rayo_actor *)x)
-#define RAYO_COMPONENT(x) ((struct rayo_component *)x)
-#define RAYO_CALL(x) ((struct rayo_call *)x)
-#define RAYO_MIXER(x) ((struct rayo_mixer *)x)
-
-SWITCH_DECLARE(void) rayo_message_send(struct rayo_actor *from, const char *to, iks *payload, int dup, int reply, const char *file, int line);
-SWITCH_DECLARE(void) rayo_message_destroy(struct rayo_message *msg);
-SWITCH_DECLARE(iks *) rayo_message_remove_payload(struct rayo_message *msg);
-#define RAYO_SEND_MESSAGE(from, to, payload) rayo_message_send(RAYO_ACTOR(from), to, payload, 0, 0, __FILE__, __LINE__)
-#define RAYO_SEND_MESSAGE_DUP(from, to, payload) rayo_message_send(RAYO_ACTOR(from), to, payload, 1, 0, __FILE__, __LINE__)
-#define RAYO_SEND_REPLY(from, to, payload) rayo_message_send(RAYO_ACTOR(from), to, payload, 0, 1, __FILE__, __LINE__)
-#define RAYO_SEND_REPLY_DUP(from, to, payload) rayo_message_send(RAYO_ACTOR(from), to, payload, 1, 1, __FILE__, __LINE__)
-
-SWITCH_DECLARE(struct rayo_actor *) rayo_actor_locate(const char *jid, const char *file, int line);
-SWITCH_DECLARE(struct rayo_actor *) rayo_actor_locate_by_id(const char *id, const char *file, int line);
-SWITCH_DECLARE(int) rayo_actor_seq_next(struct rayo_actor *actor);
-SWITCH_DECLARE(void) rayo_actor_retain(struct rayo_actor *actor, const char *file, int line);
-SWITCH_DECLARE(void) rayo_actor_release(struct rayo_actor *actor, const char *file, int line);
-SWITCH_DECLARE(void) rayo_actor_destroy(struct rayo_actor *actor, const char *file, int line);
-
-#define RAYO_LOCATE(jid) rayo_actor_locate(jid, __FILE__, __LINE__)
-#define RAYO_LOCATE_BY_ID(id) rayo_actor_locate_by_id(id, __FILE__, __LINE__)
-#define RAYO_SET_EVENT_FN(actor, event) rayo_actor_set_event_fn(RAYO_ACTOR(actor), event)
-#define RAYO_DOMAIN(x) RAYO_ACTOR(x)->domain
-#define RAYO_JID(x) RAYO_ACTOR(x)->jid
-#define RAYO_ID(x) RAYO_ACTOR(x)->id
-#define RAYO_POOL(x) RAYO_ACTOR(x)->pool
-#define RAYO_RETAIN(x) rayo_actor_retain(RAYO_ACTOR(x), __FILE__, __LINE__)
-#define RAYO_RELEASE(x) rayo_actor_release(RAYO_ACTOR(x), __FILE__, __LINE__)
-#define RAYO_DESTROY(x) rayo_actor_destroy(RAYO_ACTOR(x), __FILE__, __LINE__)
-#define RAYO_SEQ_NEXT(x) rayo_actor_seq_next(RAYO_ACTOR(x))
-
-SWITCH_DECLARE(int) rayo_call_is_joined(struct rayo_call *call);
-SWITCH_DECLARE(int) rayo_call_is_faxing(struct rayo_call *call);
-SWITCH_DECLARE(void) rayo_call_set_faxing(struct rayo_call *call, int faxing);
-SWITCH_DECLARE(const char *) rayo_call_get_dcp_jid(struct rayo_call *call);
-
-#define rayo_mixer_get_name(mixer) RAYO_ID(mixer)
-
-#define rayo_component_init(component, pool, type, subtype, id, parent, client_jid) _rayo_component_init(component, pool, type, subtype, id, parent, client_jid, NULL, __FILE__, __LINE__)
-#define rayo_component_init_cleanup(component, pool, type, subtype, id, parent, client_jid, cleanup) _rayo_component_init(component, pool, type, subtype, id, parent, client_jid, cleanup, __FILE__, __LINE__)
-SWITCH_DECLARE(struct rayo_component *) _rayo_component_init(struct rayo_component *component, switch_memory_pool_t *pool, const char *type, const char *subtype, const char *id, struct rayo_actor *parent, const char *client_jid, rayo_actor_cleanup_fn cleanup, const char *file, int line);
-SWITCH_DECLARE(switch_bool_t) is_component_actor(struct rayo_actor *);
-
-typedef iks *(*rayo_actor_xmpp_handler)(struct rayo_actor *, struct rayo_message *, void *);
-SWITCH_DECLARE(void) rayo_actor_command_handler_add(const char *type, const char *subtype, const char *name, rayo_actor_xmpp_handler fn);
-SWITCH_DECLARE(void) rayo_actor_event_handler_add(const char *from_type, const char *from_subtype, const char *to_type, const char *to_subtype, const char *name, rayo_actor_xmpp_handler fn);
-
-#endif
-
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/nlsml.c b/src/mod/event_handlers/mod_rayo/nlsml.c
deleted file mode 100644 (file)
index 6173012..0000000
+++ /dev/null
@@ -1,539 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * nlsml.c -- Parses / creates NLSML results
- *
- */
-#include <switch.h>
-#include <iksemel.h>
-
-#include "nlsml.h"
-#include "iks_helpers.h"
-
-struct nlsml_parser;
-
-/** function to handle tag attributes */
-typedef int (* tag_attribs_fn)(struct nlsml_parser *, char **);
-/** function to handle tag CDATA */
-typedef int (* tag_cdata_fn)(struct nlsml_parser *, char *, size_t);
-
-/**
- * Tag definition
- */
-struct tag_def {
-       tag_attribs_fn attribs_fn;
-       tag_cdata_fn cdata_fn;
-       switch_bool_t is_root;
-       switch_hash_t *children_tags;
-};
-
-/**
- * library configuration
- */
-typedef struct {
-       /** true if initialized */
-       switch_bool_t init;
-       /** Mapping of tag name to definition */
-       switch_hash_t *tag_defs;
-       /** library memory pool */
-       switch_memory_pool_t *pool;
-} nlsml_globals;
-static nlsml_globals globals = { 0 };
-
-/**
- * The node in the XML tree
- */
-struct nlsml_node {
-       /** tag name */
-       const char *name;
-       /** tag definition */
-       struct tag_def *tag_def;
-       /** parent to this node */
-       struct nlsml_node *parent;
-};
-
-/**
- * The SAX parser state
- */
-struct nlsml_parser {
-       /** current node */
-       struct nlsml_node *cur;
-       /** optional UUID for logging */
-       const char *uuid;
-       /** true if a match exists */
-       int match;
-       /** true if noinput */
-       int noinput;
-       /** true if nomatch */
-       int nomatch;
-};
-
-/**
- * Tag def destructor
- */
-static void destroy_tag_def(void *ptr)
-{
-    struct tag_def *tag = (struct tag_def *) ptr;
-       if (tag->children_tags) {
-               switch_core_hash_destroy(&tag->children_tags);
-       }
-}
-
-/**
- * Add a definition for a tag
- * @param tag the name
- * @param attribs_fn the function to handle the tag attributes
- * @param cdata_fn the function to handler the tag CDATA
- * @param children_tags comma-separated list of valid child tag names
- * @return the definition
- */
-static struct tag_def *add_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
-{
-       struct tag_def *def = switch_core_alloc(globals.pool, sizeof(*def));
-       switch_core_hash_init(&def->children_tags);
-       if (!zstr(children_tags)) {
-               char *children_tags_dup = switch_core_strdup(globals.pool, children_tags);
-               char *tags[32] = { 0 };
-               int tag_count = switch_separate_string(children_tags_dup, ',', tags, sizeof(tags) / sizeof(tags[0]));
-               if (tag_count) {
-                       int i;
-                       for (i = 0; i < tag_count; i++) {
-                               switch_core_hash_insert(def->children_tags, tags[i], tags[i]);
-                       }
-               }
-       }
-       def->attribs_fn = attribs_fn;
-       def->cdata_fn = cdata_fn;
-       def->is_root = SWITCH_FALSE;
-       switch_core_hash_insert_destructor(globals.tag_defs, tag, def, destroy_tag_def);
-       return def;
-}
-
-/**
- * Add a definition for a root tag
- * @param tag the name
- * @param attribs_fn the function to handle the tag attributes
- * @param cdata_fn the function to handler the tag CDATA
- * @param children_tags comma-separated list of valid child tag names
- * @return the definition
- */
-static struct tag_def *add_root_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
-{
-       struct tag_def *def = add_tag_def(tag, attribs_fn, cdata_fn, children_tags);
-       def->is_root = SWITCH_TRUE;
-       return def;
-}
-
-/**
- * Handle tag attributes
- * @param parser the parser
- * @param name the tag name
- * @param atts the attributes
- * @return IKS_OK if OK IKS_BADXML on parse failure
- */
-static int process_tag(struct nlsml_parser *parser, const char *name, char **atts)
-{
-       struct nlsml_node *cur = parser->cur;
-       if (cur->tag_def->is_root && cur->parent == NULL) {
-               /* no parent for ROOT tags */
-               return cur->tag_def->attribs_fn(parser, atts);
-       } else if (!cur->tag_def->is_root && cur->parent) {
-               /* check if this child is allowed by parent node */
-               struct tag_def *parent_def = cur->parent->tag_def;
-               if (switch_core_hash_find(parent_def->children_tags, "ANY") ||
-                       switch_core_hash_find(parent_def->children_tags, name)) {
-                       return cur->tag_def->attribs_fn(parser, atts);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_INFO, "<%s> cannot be a child of <%s>\n", name, cur->parent->name);
-               }
-       } else if (cur->tag_def->is_root && cur->parent != NULL) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_INFO, "<%s> must be the root element\n", name);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_INFO, "<%s> cannot be a root element\n", name);
-       }
-       return IKS_BADXML;
-}
-
-/**
- * Handle tag attributes that are ignored
- * @param parser the parser
- * @param atts the attributes
- * @return IKS_OK
- */
-static int process_attribs_ignore(struct nlsml_parser *parser, char **atts)
-{
-       return IKS_OK;
-}
-
-/**
- * Handle CDATA that is ignored
- * @param parser the parser
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_OK
- */
-static int process_cdata_ignore(struct nlsml_parser *parser, char *data, size_t len)
-{
-       return IKS_OK;
-}
-
-/**
- * Handle CDATA that is not allowed
- * @param parser the parser
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_BADXML if any printable characters
- */
-static int process_cdata_bad(struct nlsml_parser *parser, char *data, size_t len)
-{
-       int i;
-       for (i = 0; i < len; i++) {
-               if (isgraph(data[i])) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_INFO, "Unexpected CDATA for <%s>\n", parser->cur->name);
-                       return IKS_BADXML;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Handle CDATA with match text
- * @param parser the parser
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_OK
- */
-static int process_cdata_match(struct nlsml_parser *parser, char *data, size_t len)
-{
-       int i;
-       for (i = 0; i < len; i++) {
-               if (isgraph(data[i])) {
-                       parser->match++;
-                       return IKS_OK;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Handle nomatch
- * @param parser the parser
- * @param atts the attributes
- * @return IKS_OK
- */
-static int process_nomatch(struct nlsml_parser *parser, char **atts)
-{
-       parser->nomatch++;
-       return IKS_OK;
-}
-
-/**
- * Handle noinput
- * @param parser the parser
- * @param atts the attributes
- * @return IKS_OK
- */
-static int process_noinput(struct nlsml_parser *parser, char **atts)
-{
-       parser->noinput++;
-       return IKS_OK;
-}
-
-/**
- * Process a tag
- */
-static int tag_hook(void *user_data, char *name, char **atts, int type)
-{
-       int result = IKS_OK;
-       struct nlsml_parser *parser = (struct nlsml_parser *)user_data;
-
-       if (type == IKS_OPEN || type == IKS_SINGLE) {
-               struct nlsml_node *child_node = malloc(sizeof(*child_node));
-               switch_assert(child_node);
-               child_node->name = name;
-               child_node->tag_def = switch_core_hash_find(globals.tag_defs, name);
-               if (!child_node->tag_def) {
-                       child_node->tag_def = switch_core_hash_find(globals.tag_defs, "ANY");
-               }
-               child_node->parent = parser->cur;
-               parser->cur = child_node;
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_DEBUG1, "<%s>\n", name);
-               result = process_tag(parser, name, atts);
-       }
-
-       if (type == IKS_CLOSE || type == IKS_SINGLE) {
-               struct nlsml_node *node = parser->cur;
-               parser->cur = node->parent;
-               free(node);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_DEBUG1, "</%s>\n", name);
-       }
-
-       return result;
-}
-
-/**
- * Process cdata
- * @param user_data the parser
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_OK
- */
-static int cdata_hook(void *user_data, char *data, size_t len)
-{
-       struct nlsml_parser *parser = (struct nlsml_parser *)user_data;
-       if (!parser) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Missing parser\n");
-               return IKS_BADXML;
-       }
-       if (parser->cur) {
-               struct tag_def *def = parser->cur->tag_def;
-               if (def) {
-                       return def->cdata_fn(parser, data, len);
-               }
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_INFO, "Missing definition for <%s>\n", parser->cur->name);
-               return IKS_BADXML;
-       }
-       return IKS_OK;
-}
-
-/**
- * Parse the result, looking for noinput/nomatch/match
- * @param nlsml_result the NLSML result to parse
- * @param uuid optional UUID for logging
- * @return true if successful
- */
-enum nlsml_match_type nlsml_parse(const char *nlsml_result, const char *uuid)
-{
-       struct nlsml_parser parser = { 0 };
-       int result = NMT_BAD_XML;
-       iksparser *p = NULL;
-       parser.uuid = uuid;
-
-       if (!zstr(nlsml_result)) {
-               p = iks_sax_new(&parser, tag_hook, cdata_hook);
-               if (iks_parse(p, nlsml_result, 0, 1) == IKS_OK) {
-                       /* check result */
-                       if (parser.match) {
-                               result = NMT_MATCH;
-                               goto end;
-                       }
-                       if (parser.nomatch) {
-                               result = NMT_NOMATCH;
-                               goto end;
-                       }
-                       if (parser.noinput) {
-                               result = NMT_NOINPUT;
-                               goto end;
-                       }
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser.uuid), SWITCH_LOG_INFO, "NLSML result does not have match/noinput/nomatch!\n");
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser.uuid), SWITCH_LOG_INFO, "Failed to parse NLSML!\n");
-               }
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser.uuid), SWITCH_LOG_INFO, "Missing NLSML result\n");
-       }
- end:
-
-       while (parser.cur) {
-               struct nlsml_node *node = parser.cur;
-               parser.cur = node->parent;
-               free(node);
-       }
-
-       if ( p ) {
-               iks_parser_delete(p);
-       }
-       return result;
-}
-
-#define NLSML_NS "http://www.ietf.org/xml/ns/mrcpv2"
-
-/**
- * Makes NLSML result to conform to mrcpv2
- * @param result the potentially non-conforming result
- * @return the conforming result
- */
-iks *nlsml_normalize(const char *result)
-{
-       iks *result_xml = NULL;
-       iksparser *p = iks_dom_new(&result_xml);
-       if (iks_parse(p, result, 0, 1) == IKS_OK && result_xml) {
-               /* for now, all that is needed is to set the proper namespace */
-               iks_insert_attrib(result_xml, "xmlns", NLSML_NS);
-       } else {
-               /* unexpected ... */
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Failed to normalize NLSML result: %s\n", result);
-               if (result_xml) {
-                       iks_delete(result_xml);
-               }
-       }
-       iks_parser_delete(p);
-       return result_xml;
-}
-
-/**
- * @return true if digit is a DTMF
- */
-static int isdtmf(const char digit)
-{
-       switch(digit) {
-       case '0':
-       case '1':
-       case '2':
-       case '3':
-       case '4':
-       case '5':
-       case '6':
-       case '7':
-       case '8':
-       case '9':
-       case '*':
-       case '#':
-       case 'a':
-       case 'A':
-       case 'b':
-       case 'B':
-       case 'c':
-       case 'C':
-       case 'd':
-       case 'D':
-               return 1;
-       }
-       return 0;
-}
-
-/**
- * Construct an NLSML result for match
- * @param match the matching digits or text
- * @param interpretation the optional digit interpretation
- * @param mode dtmf or speech
- * @param confidence 0-100
- * @return the NLSML <result>
- */
-iks *nlsml_create_match(const char *match, const char *interpretation, const char *mode, int confidence)
-{
-       iks *result = iks_new("result");
-       iks_insert_attrib(result, "xmlns", NLSML_NS);
-       iks_insert_attrib(result, "xmlns:xf", "http://www.w3.org/2000/xforms");
-       if (!zstr(match)) {
-               iks *interpretation_node = iks_insert(result, "interpretation");
-               iks *input_node = iks_insert(interpretation_node, "input");
-               iks *instance_node = iks_insert(interpretation_node, "instance");
-               iks_insert_attrib(input_node, "mode", mode);
-               iks_insert_attrib_printf(input_node, "confidence", "%d", confidence);
-               iks_insert_cdata(input_node, match, strlen(match));
-               if (zstr(interpretation)) {
-                       iks_insert_cdata(instance_node, match, strlen(match));
-               } else {
-                       iks_insert_cdata(instance_node, interpretation, strlen(interpretation));
-               }
-       }
-       return result;
-}
-
-/**
- * Construct an NLSML result for match
- * @param match the matching digits or text
- * @param interpretation the optional digit interpretation
- * @return the NLSML <result>
- */
-iks *nlsml_create_dtmf_match(const char *digits, const char *interpretation)
-{
-       iks *result = NULL;
-       int first = 1;
-       int i;
-       int num_digits = strlen(digits);
-       switch_stream_handle_t stream = { 0 };
-       SWITCH_STANDARD_STREAM(stream);
-       for (i = 0; i < num_digits; i++) {
-               if (isdtmf(digits[i])) {
-                       if (first) {
-                               stream.write_function(&stream, "%c", digits[i]);
-                               first = 0;
-                       } else {
-                               stream.write_function(&stream, " %c", digits[i]);
-                       }
-               }
-       }
-       result = nlsml_create_match((const char *)stream.data, interpretation, "dtmf", 100);
-       switch_safe_free(stream.data);
-       return result;
-}
-
-/**
- * Initialize NLSML parser.  This function is not thread safe.
- */
-int nlsml_init(void)
-{
-       if (globals.init) {
-               return 1;
-       }
-
-       globals.init = SWITCH_TRUE;
-       switch_core_new_memory_pool(&globals.pool);
-       switch_core_hash_init(&globals.tag_defs);
-
-       add_root_tag_def("result", process_attribs_ignore, process_cdata_ignore, "interpretation");
-       add_tag_def("interpretation", process_attribs_ignore, process_cdata_ignore, "input,model,xf:model,instance,xf:instance");
-       add_tag_def("input", process_attribs_ignore, process_cdata_match, "input,nomatch,noinput");
-       add_tag_def("noinput", process_noinput, process_cdata_bad, "");
-       add_tag_def("nomatch", process_nomatch, process_cdata_ignore, "");
-       add_tag_def("model", process_attribs_ignore, process_cdata_ignore, "ANY");
-       add_tag_def("xf:model", process_attribs_ignore, process_cdata_ignore, "ANY");
-       add_tag_def("instance", process_attribs_ignore, process_cdata_ignore, "ANY");
-       add_tag_def("xf:instance", process_attribs_ignore, process_cdata_ignore, "ANY");
-       add_tag_def("ANY", process_attribs_ignore, process_cdata_ignore, "ANY");
-
-       return 1;
-}
-
-/**
- * Destruction of NLSML parser environment
- */
-void nlsml_destroy(void)
-{
-       if (globals.init) {
-               if (globals.tag_defs) {
-                       switch_core_hash_destroy(&globals.tag_defs);
-                       globals.tag_defs = NULL;
-               }
-               if (globals.pool) {
-                       switch_core_destroy_memory_pool(&globals.pool);
-                       globals.pool = NULL;
-               }
-               globals.init = SWITCH_FALSE;
-       }
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/nlsml.h b/src/mod/event_handlers/mod_rayo/nlsml.h
deleted file mode 100644 (file)
index 35f79ad..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * nlsml.h -- Parses / creates NLSML results
- *
- */
-#ifndef NLSML_H
-#define NLSML_H
-
-#include <iksemel.h>
-#include <switch.h>
-
-enum nlsml_match_type {
-       NMT_BAD_XML,
-       NMT_MATCH,
-       NMT_NOINPUT,
-       NMT_NOMATCH
-};
-
-SWITCH_DECLARE(int) nlsml_init(void);
-SWITCH_DECLARE(void) nlsml_destroy(void);
-SWITCH_DECLARE(enum nlsml_match_type) nlsml_parse(const char *result, const char *uuid);
-SWITCH_DECLARE(iks *) nlsml_normalize(const char *result);
-SWITCH_DECLARE(iks *) nlsml_create_dtmf_match(const char *digits, const char *interpretation);
-SWITCH_DECLARE(iks *) nlsml_create_match(const char *digits, const char *interpretation, const char *mode, int confidence);
-
-#endif
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/rayo_components.c b/src/mod/event_handlers/mod_rayo/rayo_components.c
deleted file mode 100644 (file)
index 2d303fe..0000000
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_components.c -- Rayo component interface
- *
- */
-#include "rayo_components.h"
-
-#include <switch.h>
-#include "mod_rayo.h"
-#include "iks_helpers.h"
-
-/**
- * Get access to Rayo component data.
- * @param id the component internal ID
- * @return the component or NULL. Call rayo_component_unlock() when done with component pointer.
- */
-struct rayo_component *rayo_component_locate(const char *id, const char *file, int line)
-{
-       struct rayo_actor *actor = rayo_actor_locate_by_id(id, file, line);
-       if (actor && is_component_actor(actor)) {
-               return RAYO_COMPONENT(actor);
-       } else if (actor) {
-                RAYO_RELEASE(actor);
-       }
-       return NULL;
-}
-
-/**
- * Send component start reply
- * @param component the component
- * @param iq the start request
- */
-void rayo_component_send_start(struct rayo_component *component, iks *iq)
-{
-       iks *response = iks_new_iq_result(iq);
-       iks *ref = iks_insert(response, "ref");
-       iks_insert_attrib(ref, "xmlns", RAYO_NS);
-       iks_insert_attrib_printf(ref, "uri", "xmpp:%s", RAYO_JID(component));
-       RAYO_SEND_REPLY(component, iks_find_attrib(response, "to"), response);
-}
-
-/**
- * Create component complete event
- * @param component the component
- * @param reason_str the completion reason
- * @param reason_namespace the completion reason namespace
- * @param meta metadata to add as child
- * @param child_of_complete if true metadata is child of complete instead of reason
- * @return the event
- */
-iks *rayo_component_create_complete_event_with_metadata(struct rayo_component *component, const char *reason_str, const char *reason_namespace, iks *meta, int child_of_complete)
-{
-       iks *response = iks_new("presence");
-       iks *complete;
-       iks *reason;
-       iks_insert_attrib(response, "from", RAYO_JID(component));
-       iks_insert_attrib(response, "to", component->client_jid);
-       iks_insert_attrib(response, "type", "unavailable");
-       complete = iks_insert(response, "complete");
-       iks_insert_attrib(complete, "xmlns", RAYO_EXT_NS);
-       reason = iks_insert(complete, reason_str);
-       iks_insert_attrib(reason, "xmlns", reason_namespace);
-       if (meta) {
-               meta = iks_copy_within(meta, iks_stack(response));
-               if (child_of_complete) {
-                       iks_insert_node(complete, meta);
-               } else {
-                       iks_insert_node(reason, meta);
-               }
-       }
-
-       return response;
-}
-
-/**
- * Create component complete event
- * @param component the component
- * @param reason the completion reason
- * @param reason_namespace the completion reason namespace
- * @return the event
- */
-iks *rayo_component_create_complete_event(struct rayo_component *component, const char *reason, const char *reason_namespace)
-{
-       return rayo_component_create_complete_event_with_metadata(component, reason, reason_namespace, NULL, 0);
-}
-
-/**
- * Send rayo component complete event
- */
-void rayo_component_send_complete_event(struct rayo_component *component, iks *response)
-{
-       component->complete = 1;
-       RAYO_SEND_REPLY(component, iks_find_attrib(response, "to"), response);
-       RAYO_RELEASE(component);
-       RAYO_DESTROY(component);
-}
-
-/**
- * Send rayo complete
- */
-void rayo_component_send_complete(struct rayo_component *component, const char *reason, const char *reason_namespace)
-{
-       rayo_component_send_complete_event(component, rayo_component_create_complete_event(component, reason, reason_namespace));
-}
-
-/**
- * Send rayo complete
- */
-void rayo_component_send_complete_with_metadata(struct rayo_component *component, const char *reason, const char *reason_namespace, iks *meta, int child_of_complete)
-{
-       rayo_component_send_complete_event(component, rayo_component_create_complete_event_with_metadata(component, reason, reason_namespace, meta, child_of_complete));
-}
-
-/**
- * Send rayo complete
- */
-void rayo_component_send_complete_with_metadata_string(struct rayo_component *component, const char *reason, const char *reason_namespace, const char *meta, int child_of_complete)
-{
-       iks *meta_xml = NULL;
-       iksparser *p = iks_dom_new(&meta_xml);
-       if (iks_parse(p, meta, 0, 1) != IKS_OK) {
-               /* unexpected ... */
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "%s Failed to parse metadata for complete event: %s\n",
-                       RAYO_JID(component), meta);
-               /* send without... */
-               rayo_component_send_complete(component, reason, reason_namespace);
-       } else {
-               rayo_component_send_complete_with_metadata(component, reason, reason_namespace, meta_xml, child_of_complete);
-       }
-       if (meta_xml) {
-               iks_delete(meta_xml);
-       }
-       iks_parser_delete(p);
-}
-
-/**
- * Background API data
- */
-struct component_bg_api_cmd {
-       const char *cmd;
-       const char *args;
-       switch_memory_pool_t *pool;
-       struct rayo_component *component;
-};
-
-/**
- * Thread that outputs to component
- * @param thread this thread
- * @param obj the Rayo mixer context
- * @return NULL
- */
-static void *SWITCH_THREAD_FUNC component_bg_api_thread(switch_thread_t *thread, void *obj)
-{
-       struct component_bg_api_cmd *cmd = (struct component_bg_api_cmd *)obj;
-       switch_stream_handle_t stream = { 0 };
-       switch_memory_pool_t *pool = cmd->pool;
-       SWITCH_STANDARD_STREAM(stream);
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BGAPI EXEC: %s %s\n", cmd->cmd, cmd->args);
-       if (switch_api_execute(cmd->cmd, cmd->args, NULL, &stream) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BGAPI EXEC FAILURE\n");
-               rayo_component_send_complete(cmd->component, COMPONENT_COMPLETE_ERROR);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "BGAPI EXEC RESULT: %s\n", (char *)stream.data);
-       }
-       switch_safe_free(stream.data);
-       switch_core_destroy_memory_pool(&pool);
-       return NULL;
-}
-
-/**
- * Run a background API command
- * @param cmd API command
- * @param args API args
- */
-void rayo_component_api_execute_async(struct rayo_component *component, const char *cmd, const char *args)
-{
-       switch_thread_t *thread;
-       switch_threadattr_t *thd_attr = NULL;
-       struct component_bg_api_cmd *bg_cmd = NULL;
-       switch_memory_pool_t *pool;
-
-       /* set up command */
-       switch_core_new_memory_pool(&pool);
-       bg_cmd = switch_core_alloc(pool, sizeof(*bg_cmd));
-       bg_cmd->pool = pool;
-       bg_cmd->cmd = switch_core_strdup(pool, cmd);
-       bg_cmd->args = switch_core_strdup(pool, args);
-       bg_cmd->component = component;
-
-       /* create thread */
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s BGAPI START\n", RAYO_JID(component));
-       switch_threadattr_create(&thd_attr, pool);
-       switch_threadattr_detach_set(thd_attr, 1);
-       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-       switch_thread_create(&thread, thd_attr, component_bg_api_thread, bg_cmd, pool);
-}
-
-/**
- * Handle configuration
- */
-switch_status_t rayo_components_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       if (rayo_input_component_load(module_interface, pool, config_file) != SWITCH_STATUS_SUCCESS ||
-               rayo_output_component_load(module_interface, pool, config_file) != SWITCH_STATUS_SUCCESS ||
-               rayo_prompt_component_load(module_interface, pool, config_file) != SWITCH_STATUS_SUCCESS ||
-               rayo_record_component_load(module_interface, pool, config_file) != SWITCH_STATUS_SUCCESS ||
-               rayo_fax_components_load(module_interface, pool, config_file) != SWITCH_STATUS_SUCCESS ||
-               rayo_exec_component_load(module_interface, pool, config_file) != SWITCH_STATUS_SUCCESS) {
-               return SWITCH_STATUS_TERM;
-       }
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Handle shutdown
- */
-switch_status_t rayo_components_shutdown(void)
-{
-       rayo_input_component_shutdown();
-       rayo_output_component_shutdown();
-       rayo_prompt_component_shutdown();
-       rayo_record_component_shutdown();
-       rayo_fax_components_shutdown();
-       rayo_exec_component_shutdown();
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/rayo_components.h b/src/mod/event_handlers/mod_rayo/rayo_components.h
deleted file mode 100644 (file)
index 9be7881..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * components.c -- Rayo component implementations
- *
- */
-#ifndef RAYO_COMPONENTS_H
-#define RAYO_COMPONENTS_H
-
-#include <switch.h>
-#include <iksemel.h>
-
-#include "mod_rayo.h"
-
-#define RAYO_EXT_NS RAYO_BASE "ext:" RAYO_VERSION
-#define RAYO_EXT_COMPLETE_NS RAYO_BASE "ext:complete:" RAYO_VERSION
-
-#define RAYO_OUTPUT_NS RAYO_BASE "output:" RAYO_VERSION
-#define RAYO_OUTPUT_COMPLETE_NS RAYO_BASE "output:complete:" RAYO_VERSION
-
-#define RAYO_INPUT_NS RAYO_BASE "input:" RAYO_VERSION
-#define RAYO_INPUT_COMPLETE_NS RAYO_BASE "input:complete:" RAYO_VERSION
-
-#define RAYO_RECORD_NS RAYO_BASE "record:" RAYO_VERSION
-#define RAYO_RECORD_COMPLETE_NS RAYO_BASE "record:complete:" RAYO_VERSION
-
-#define RAYO_PROMPT_NS RAYO_BASE "prompt:" RAYO_VERSION
-#define RAYO_PROMPT_COMPLETE_NS RAYO_BASE "prompt:complete:" RAYO_VERSION
-
-#define RAYO_FAX_NS RAYO_BASE "fax:" RAYO_VERSION
-#define RAYO_FAX_COMPLETE_NS RAYO_BASE "fax:complete:" RAYO_VERSION
-
-#define RAYO_EXEC_NS RAYO_BASE "exec:" RAYO_VERSION
-#define RAYO_EXEC_COMPLETE_NS RAYO_BASE "exec:complete:" RAYO_VERSION
-
-#define COMPONENT_COMPLETE_STOP "stop", RAYO_EXT_COMPLETE_NS
-#define COMPONENT_COMPLETE_ERROR "error", RAYO_EXT_COMPLETE_NS
-#define COMPONENT_COMPLETE_HANGUP "hangup", RAYO_EXT_COMPLETE_NS
-#define COMPONENT_COMPLETE_DONE "done", RAYO_EXT_COMPLETE_NS
-
-SWITCH_DECLARE(switch_status_t) rayo_components_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-SWITCH_DECLARE(switch_status_t) rayo_input_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-SWITCH_DECLARE(switch_status_t) rayo_output_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-SWITCH_DECLARE(switch_status_t) rayo_prompt_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-SWITCH_DECLARE(switch_status_t) rayo_record_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-SWITCH_DECLARE(switch_status_t) rayo_fax_components_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-SWITCH_DECLARE(switch_status_t) rayo_exec_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-
-SWITCH_DECLARE(switch_status_t) rayo_components_shutdown(void);
-SWITCH_DECLARE(switch_status_t) rayo_input_component_shutdown(void);
-SWITCH_DECLARE(switch_status_t) rayo_output_component_shutdown(void);
-SWITCH_DECLARE(switch_status_t) rayo_prompt_component_shutdown(void);
-SWITCH_DECLARE(switch_status_t) rayo_record_component_shutdown(void);
-SWITCH_DECLARE(switch_status_t) rayo_fax_components_shutdown(void);
-SWITCH_DECLARE(switch_status_t) rayo_exec_component_shutdown(void);
-
-SWITCH_DECLARE(void) rayo_component_send_start(struct rayo_component *component, iks *iq);
-SWITCH_DECLARE(void) rayo_component_send_iq_error(struct rayo_component *component, iks *iq, const char *error_name, const char *error_type);
-SWITCH_DECLARE(void) rayo_component_send_iq_error_detailed(struct rayo_component *component, iks *iq, const char *error_name, const char *error_type, const char *detail);
-SWITCH_DECLARE(void) rayo_component_send_complete(struct rayo_component *component, const char *reason, const char *reason_namespace);
-SWITCH_DECLARE(void) rayo_component_send_complete_event(struct rayo_component *component, iks *response);
-SWITCH_DECLARE(void) rayo_component_send_complete_with_metadata(struct rayo_component *component, const char *reason, const char *reason_namespace, iks *meta, int child_of_complete);
-SWITCH_DECLARE(void) rayo_component_send_complete_with_metadata_string(struct rayo_component *component, const char *reason, const char *reason_namespace, const char *meta, int child_of_complete);
-
-SWITCH_DECLARE(iks *) rayo_component_create_complete_event(struct rayo_component *component, const char *reason, const char *reason_namespace);
-SWITCH_DECLARE(iks *) rayo_component_create_complete_event_with_metadata(struct rayo_component *component, const char *reason, const char *reason_namespace, iks *meta, int child_of_complete);
-
-SWITCH_DECLARE(void) rayo_component_api_execute_async(struct rayo_component *component, const char *cmd, const char *args);
-
-#define RAYO_COMPONENT_LOCATE(id) rayo_component_locate(id, __FILE__, __LINE__)
-SWITCH_DECLARE(struct rayo_component *) rayo_component_locate(const char *id, const char *file, int line);
-
-#endif
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
-
diff --git a/src/mod/event_handlers/mod_rayo/rayo_cpa_component.c b/src/mod/event_handlers/mod_rayo/rayo_cpa_component.c
deleted file mode 100644 (file)
index 15dcd74..0000000
+++ /dev/null
@@ -1,408 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2014, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_cpa_component.c -- input component "cpa" mode implementation
- */
-#include <switch.h>
-
-#include "rayo_cpa_component.h"
-#include "mod_rayo.h"
-#include "rayo_components.h"
-#include "rayo_cpa_detector.h"
-
-/**
- * Module globals
- */
-static struct {
-       /** signal subscribers */
-       switch_hash_t *subscribers;
-       /** synchronizes access to subscribers */
-       switch_mutex_t *subscribers_mutex;
-       /** module pool */
-       switch_memory_pool_t *pool;
-} globals;
-
-/**
- * A CPA signal monitored by this component
- */
-struct cpa_signal {
-       /** name of this signal */
-       const char *name;
-       /** true if signal causes component termination */
-       int terminate;
-};
-
-/**
- * CPA component state
- */
-struct cpa_component {
-       /** component base class */
-       struct rayo_component base;
-       /** true if ready to forward detector events */
-       int ready;
-       /** signals this component wants */
-       switch_hash_t *signals;
-};
-
-#define CPA_COMPONENT(x) ((struct cpa_component *)x)
-
-typedef void (* subscriber_execute_fn)(const char *jid, void *user_data);
-
-/**
- * Request signals
- */
-static void subscribe(const char *uuid, const char *signal_type, const char *jid)
-{
-       char *key = switch_mprintf("%s:%s", uuid, signal_type);
-       switch_mutex_lock(globals.subscribers_mutex);
-       {
-               switch_hash_t *signal_subscribers = switch_core_hash_find(globals.subscribers, key);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Subscribe %s => %s\n", signal_type, jid);
-               if (!signal_subscribers) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Create %s subscriber hash\n", signal_type);
-                       switch_core_hash_init(&signal_subscribers);
-                       switch_core_hash_insert(globals.subscribers, key, signal_subscribers);
-               }
-               switch_core_hash_insert(signal_subscribers, jid, "1");
-       }
-       switch_mutex_unlock(globals.subscribers_mutex);
-       switch_safe_free(key);
-}
-
-/**
- * Stop receiving signals
- */
-static void unsubscribe(const char *uuid, const char *signal_type, const char *jid)
-{
-       char *key = switch_mprintf("%s:%s", uuid, signal_type);
-       switch_mutex_lock(globals.subscribers_mutex);
-       {
-               switch_hash_t *signal_subscribers = switch_core_hash_find(globals.subscribers, key);
-               if (signal_subscribers) {
-                       switch_core_hash_delete(signal_subscribers, jid);
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Unsubscribe %s => %s\n", signal_type, jid);
-
-                       /* clean up hash if empty */
-                       if (switch_core_hash_empty(signal_subscribers)) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Destroy %s subscriber hash\n", signal_type);
-                               switch_core_hash_destroy(&signal_subscribers);
-                               switch_core_hash_delete(globals.subscribers, key);
-                       }
-               }
-       }
-       switch_mutex_unlock(globals.subscribers_mutex);
-       switch_safe_free(key);
-}
-
-/**
- * Execute function for each subscriber
- */
-static void subscriber_execute(const char *uuid, const char *signal_type, subscriber_execute_fn callback, void *user_data)
-{
-       switch_event_t *subscriber_list = NULL;
-       switch_event_header_t *subscriber = NULL;
-
-       /* fetch list of subscribers */
-       char *key = switch_mprintf("%s:%s", uuid, signal_type);
-       switch_event_create_subclass(&subscriber_list, SWITCH_EVENT_CLONE, NULL);
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Subscriber execute %s\n", signal_type);
-       switch_mutex_lock(globals.subscribers_mutex);
-       {
-               switch_hash_index_t *hi = NULL;
-               switch_hash_t *signal_subscribers = switch_core_hash_find(globals.subscribers, key);
-               if (signal_subscribers) {
-                       for (hi = switch_core_hash_first(signal_subscribers); hi; hi = switch_core_hash_next(&hi)) {
-                               const void *jid;
-                               void *dont_care;
-                               switch_core_hash_this(hi, &jid, NULL, &dont_care);
-                               switch_event_add_header_string(subscriber_list, SWITCH_STACK_BOTTOM, "execute", (const char *)jid);
-                       }
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "No subscribers for %s\n", signal_type);
-               }
-       }
-       switch_mutex_unlock(globals.subscribers_mutex);
-       switch_safe_free(key);
-
-       /* execute function for each subscriber */
-       for (subscriber = subscriber_list->headers; subscriber; subscriber = subscriber->next) {
-               callback(subscriber->value, user_data);
-       }
-
-       switch_event_destroy(&subscriber_list);
-}
-
-/**
- * Stop all CPA detectors
- */
-static void stop_cpa_detectors(struct cpa_component *cpa)
-{
-       if (cpa->signals) {
-               switch_hash_index_t *hi = NULL;
-               for (hi = switch_core_hash_first(cpa->signals); hi; hi = switch_core_hash_next(&hi)) {
-                       const void *signal_type;
-                       void *cpa_signal = NULL;
-                       switch_core_hash_this(hi, &signal_type, NULL, &cpa_signal);
-                       if (cpa_signal) {
-                               rayo_cpa_detector_stop(RAYO_ACTOR(cpa)->parent->id, ((struct cpa_signal *)cpa_signal)->name);
-                               unsubscribe(RAYO_ACTOR(cpa)->parent->id, ((struct cpa_signal *)cpa_signal)->name, RAYO_JID(cpa));
-                       }
-               }
-               switch_core_hash_destroy(&cpa->signals);
-               cpa->signals = NULL;
-       }
-       unsubscribe(RAYO_ACTOR(cpa)->parent->id, "hangup", RAYO_JID(cpa));
-}
-
-/**
- * Stop execution of CPA component
- */
-static iks *stop_cpa_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       stop_cpa_detectors(CPA_COMPONENT(component));
-       rayo_component_send_complete(RAYO_COMPONENT(component), COMPONENT_COMPLETE_STOP);
-       return iks_new_iq_result(msg->payload);
-}
-
-/**
- * Forward CPA signal to client
- */
-static void rayo_cpa_detector_event(const char *jid, void *user_data)
-{
-       struct rayo_actor *component = RAYO_LOCATE(jid);
-       if (component) {
-               if (CPA_COMPONENT(component)->ready) {
-                       switch_event_t *event = (switch_event_t *)user_data;
-                       const char *signal_type = switch_event_get_header(event, "signal-type");
-                       struct cpa_signal *cpa_signal = switch_core_hash_find(CPA_COMPONENT(component)->signals, signal_type);
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(component->parent->id), SWITCH_LOG_DEBUG, "Handling CPA event\n");
-                       if (cpa_signal) {
-                               const char *value = switch_event_get_header(event, "value");
-                               const char *duration = switch_event_get_header(event, "duration");
-                               if (cpa_signal->terminate) {
-                                       iks *complete_event;
-                                       iks *signal_xml;
-
-                                       stop_cpa_detectors(CPA_COMPONENT(component));
-
-                                       /* send complete event to client */
-                                       complete_event = rayo_component_create_complete_event(RAYO_COMPONENT(component), "signal", RAYO_CPA_NS);
-                                       signal_xml = iks_find(complete_event, "complete");
-                                       signal_xml = iks_find(signal_xml, "signal");
-                                       iks_insert_attrib(signal_xml, "type", signal_type);
-                                       if (!zstr(value)) {
-                                               iks_insert_attrib(signal_xml, "value", value);
-                                       }
-                                       if (!zstr(duration)) {
-                                               iks_insert_attrib(signal_xml, "duration", duration);
-                                       }
-                                       rayo_component_send_complete_event(RAYO_COMPONENT(component), complete_event);
-                               } else {
-                                       /* send event to client */
-                                       iks *signal_event = iks_new_presence("signal", RAYO_CPA_NS, RAYO_JID(component), RAYO_COMPONENT(component)->client_jid);
-                                       iks *signal_xml = iks_find(signal_event, "signal");
-                                       iks_insert_attrib(signal_xml, "type", signal_type);
-                                       if (!zstr(value)) {
-                                               iks_insert_attrib(signal_xml, "value", value);
-                                       }
-                                       if (!zstr(duration)) {
-                                               iks_insert_attrib(signal_xml, "duration", duration);
-                                       }
-                                       RAYO_SEND_REPLY(component, RAYO_COMPONENT(component)->client_jid, signal_event);
-                               }
-                       }
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(component->parent->id), SWITCH_LOG_DEBUG, "Skipping CPA event\n");
-               }
-               RAYO_RELEASE(component);
-       }
-}
-
-/**
- * Handle CPA signal-type event
- */
-static void on_rayo_cpa_detector_event(switch_event_t *event)
-{
-       subscriber_execute(switch_event_get_header(event, "Unique-ID"), switch_event_get_header(event, "signal-type"), rayo_cpa_detector_event, event);
-}
-
-/**
- * Handle CPA completion because of hangup
- */
-static void rayo_cpa_component_hangup(const char *jid, void *user_data)
-{
-       struct rayo_actor *component = RAYO_LOCATE(jid);
-       if (component) {
-               stop_cpa_detectors(CPA_COMPONENT(component));
-               rayo_component_send_complete(RAYO_COMPONENT(component), COMPONENT_COMPLETE_HANGUP);
-               RAYO_RELEASE(component);
-       }
-}
-
-/**
- * Handle hungup call event
- */
-static void on_channel_hangup_complete_event(switch_event_t *event)
-{
-       subscriber_execute(switch_event_get_header(event, "Unique-ID"), "hangup", rayo_cpa_component_hangup, event);
-}
-
-/**
- * Start CPA
- */
-iks *rayo_cpa_component_start(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       iks *input = iks_find(iq, "input");
-       switch_memory_pool_t *pool = NULL;
-       struct cpa_component *component = NULL;
-       int have_grammar = 0;
-       iks *grammar = NULL;
-
-       /* create CPA component */
-       switch_core_new_memory_pool(&pool);
-       component = switch_core_alloc(pool, sizeof(*component));
-       component = CPA_COMPONENT(rayo_component_init((struct rayo_component *)component, pool, RAT_CALL_COMPONENT, "cpa", NULL, call, iks_find_attrib(iq, "from")));
-       if (!component) {
-               switch_core_destroy_memory_pool(&pool);
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create CPA entity");
-       }
-
-       switch_core_hash_init(&component->signals);
-
-       /* start CPA detectors */
-       for (grammar = iks_find(input, "grammar"); grammar; grammar = iks_next_tag(grammar)) {
-               if (!strcmp("grammar", iks_name(grammar))) {
-                       const char *error_str = "";
-                       const char *url = iks_find_attrib_soft(grammar, "url");
-                       char *url_dup;
-                       char *url_params;
-
-                       if (zstr(url)) {
-                               stop_cpa_detectors(component);
-                               RAYO_RELEASE(component);
-                               RAYO_DESTROY(component);
-                               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Missing grammar URL");
-                       }
-                       have_grammar = 1;
-
-                       url_dup = strdup(url);
-                       switch_assert(url_dup);
-                       if ((url_params = strchr(url_dup, '?'))) {
-                               *url_params = '\0';
-                               url_params++;
-                       }
-
-                       if (switch_core_hash_find(component->signals, url)) {
-                               free(url_dup);
-                               stop_cpa_detectors(component);
-                               RAYO_RELEASE(component);
-                               RAYO_DESTROY(component);
-                               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Duplicate URL");
-                       }
-
-                       /* start detector */
-                       /* TODO return better reasons... */
-                       if (rayo_cpa_detector_start(switch_core_session_get_uuid(session), url_dup, &error_str)) {
-                               struct cpa_signal *cpa_signal = switch_core_alloc(pool, sizeof(*cpa_signal));
-                               cpa_signal->terminate = !zstr(url_params) && strstr(url_params, "terminate=true");
-                               cpa_signal->name = switch_core_strdup(pool, url_dup);
-                               switch_core_hash_insert(component->signals, cpa_signal->name, cpa_signal);
-                               subscribe(switch_core_session_get_uuid(session), cpa_signal->name, RAYO_JID(component));
-                       } else {
-                               free(url_dup);
-                               stop_cpa_detectors(component);
-                               RAYO_RELEASE(component);
-                               RAYO_DESTROY(component);
-                               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, error_str);
-                       }
-
-                       free(url_dup);
-               }
-       }
-
-       if (!have_grammar) {
-               stop_cpa_detectors(component);
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "No grammar defined");
-       }
-
-       /* acknowledge command */
-       rayo_component_send_start(RAYO_COMPONENT(component), iq);
-
-       /* TODO hangup race condition */
-       subscribe(switch_core_session_get_uuid(session), "hangup", RAYO_JID(component));
-
-       /* ready to forward detector events */
-       component->ready = 1;
-
-       return NULL;
-}
-
-/**
- * Load input CPA
- * @param module_interface
- * @param pool memory pool
- * @param config_file
- * @return SWITCH_STATUS_SUCCESS if successfully loaded
- */
-switch_status_t rayo_cpa_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "cpa", "set:"RAYO_EXT_NS":stop", stop_cpa_component);
-       switch_event_bind("rayo_cpa_component", SWITCH_EVENT_CUSTOM, "rayo::cpa", on_rayo_cpa_detector_event, NULL);
-       switch_event_bind("rayo_cpa_component", SWITCH_EVENT_CHANNEL_HANGUP_COMPLETE, NULL, on_channel_hangup_complete_event, NULL);
-
-       globals.pool = pool;
-       switch_core_hash_init(&globals.subscribers);
-       switch_mutex_init(&globals.subscribers_mutex, SWITCH_MUTEX_NESTED, pool);
-
-       return rayo_cpa_detector_load(module_interface, pool, config_file);
-}
-
-/**
- * Stop input CPA
- */
-void rayo_cpa_component_shutdown(void)
-{
-       switch_event_unbind_callback(on_rayo_cpa_detector_event);
-       switch_event_unbind_callback(on_channel_hangup_complete_event);
-       rayo_cpa_detector_shutdown();
-       if (globals.subscribers) {
-               switch_core_hash_destroy(&globals.subscribers);
-       }
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/rayo_cpa_component.h b/src/mod/event_handlers/mod_rayo/rayo_cpa_component.h
deleted file mode 100644 (file)
index 442ec1f..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2014, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_cpa_component.h -- Rayo call progress analysis component
- *
- */
-#ifndef RAYO_CPA_COMPONENT_H
-#define RAYO_CPA_COMPONENT_H
-
-#include <switch.h>
-#include <iksemel.h>
-
-#include "mod_rayo.h"
-
-SWITCH_DECLARE(switch_status_t) rayo_cpa_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-SWITCH_DECLARE(void) rayo_cpa_component_shutdown(void);
-SWITCH_DECLARE(iks *) rayo_cpa_component_start(struct rayo_actor *call, struct rayo_message *msg, void *session_data);
-
-#endif
-
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/rayo_cpa_detector.c b/src/mod/event_handlers/mod_rayo/rayo_cpa_detector.c
deleted file mode 100644 (file)
index 6a85db5..0000000
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2014-2015, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_cpa_detector.c -- Glue to normalize events from and to allow multiple instantiation of various detectors in FreeSWITCH
- */
-
-#include "rayo_cpa_detector.h"
-
-static struct {
-       /** detectors supported by this module mapped by signal-type */
-       switch_hash_t *detectors;
-       /** synchronizes access to detectors */
-       switch_mutex_t *detectors_mutex;
-} globals;
-
-struct rayo_cpa_detector;
-
-/**
- * Detector definition
- */
-struct rayo_cpa_detector {
-       /** unique internal name of this detector */
-       const char *name;
-       /** detector ID */
-       const char *uuid;
-       /** start detection APP */
-       const char *start_app;
-       /** args to pass to start detection app */
-       const char *start_app_args;
-       /** stop detection APP */
-       const char *stop_app;
-       /** args to pass to stop detection app */
-       const char *stop_app_args;
-       /** (optional) name of header to get the signal type from */
-       const char *signal_type_header;
-       /** (optional) where to get the signal value from the event */
-       const char *signal_value_header;
-       /** (optional) where to get the signal duration from the event */
-       const char *signal_duration_header;
-       /** detector event to signal type mapping */
-       switch_hash_t *signal_type_map;
-};
-
-/**
- * Detection state
- */
-struct rayo_cpa_detector_state {
-       /** reference count */
-       int refs;
-};
-
-/**
- * Start detecting
- * @param call_uuid call to detect signal on
- * @param signal_ns namespace of signal to detect
- * @param error_detail on failure, describes the error
- * @return 1 if successful, 0 if failed
- */
-int rayo_cpa_detector_start(const char *call_uuid, const char *signal_ns, const char **error_detail)
-{
-       struct rayo_cpa_detector *detector = switch_core_hash_find(globals.detectors, signal_ns);
-       switch_core_session_t *session;
-       if (detector) {
-               if (zstr(detector->start_app)) {
-                       /* nothing to do */
-                       return 1;
-               }
-               session = switch_core_session_locate(call_uuid);
-               if (session) {
-                       struct rayo_cpa_detector_state *detector_state = switch_channel_get_private(switch_core_session_get_channel(session), detector->uuid);
-                       if (detector_state) {
-                               /* detector is already running */
-                               detector_state->refs++;
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Start detector %s, refs = %d\n", detector->name, detector_state->refs);
-                               switch_core_session_rwunlock(session);
-                               return 1;
-                       }
-                       detector_state = switch_core_session_alloc(session, sizeof(*detector_state));
-                       detector_state->refs = 1;
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Starting detector %s, refs = 1\n", detector->name);
-                       switch_channel_set_private(switch_core_session_get_channel(session), detector->uuid, detector_state);
-                       switch_core_session_execute_application_async(session, detector->start_app, zstr(detector->start_app_args) ? NULL : detector->start_app_args);
-                       switch_core_session_rwunlock(session);
-                       return 1;
-               } else {
-                       *error_detail = "session gone";
-                       return 0;
-               }
-       }
-       *error_detail = "detector not supported";
-       return 0;
-}
-
-/**
- * Stop detecting
- * @param call_uuid call to stop detecting signal on
- * @param signal_ns name of signal to stop detecting
- */
-void rayo_cpa_detector_stop(const char *call_uuid, const char *signal_ns)
-{
-       struct rayo_cpa_detector *detector = switch_core_hash_find(globals.detectors, signal_ns);
-       switch_core_session_t *session;
-       if (detector) {
-               if (zstr(detector->stop_app)) {
-                       /* nothing to do */
-                       return;
-               }
-               session = switch_core_session_locate(call_uuid);
-               if (session) {
-                       struct rayo_cpa_detector_state *detector_state = switch_channel_get_private(switch_core_session_get_channel(session), detector->uuid);
-                       if (detector_state) {
-                               detector_state->refs--;
-                               if (detector_state->refs < 0) {
-                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Stop detector %s refs = %d\n", detector->name, detector_state->refs);
-                               } else {
-                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Stop detector %s refs = %d\n", detector->name, detector_state->refs);
-                               }
-                               if (detector_state->refs == 0) {
-                                       /* nobody interested in detector events- shut it down */
-                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Stopping detector %s\n", detector->name);
-                                       switch_core_session_execute_application_async(session, detector->stop_app, zstr(detector->stop_app_args) ? NULL : detector->stop_app_args);
-                                       switch_channel_set_private(switch_core_session_get_channel(session), detector->uuid, NULL);
-                               }
-                       } else {
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Detector %s is already stopped\n", detector->name);
-                       }
-                       switch_core_session_rwunlock(session);
-               }
-       }
-}
-
-/**
- * Handle event from detector
- */
-static void rayo_cpa_detector_event(switch_event_t *event)
-{
-       struct rayo_cpa_detector *detector = (struct rayo_cpa_detector *)event->bind_user_data;
-       if (detector) {
-               const char *signal_type = "rayo_default";
-               if (!zstr(detector->signal_type_header)) {
-                       signal_type = switch_event_get_header(event, detector->signal_type_header);
-               }
-               if (!zstr(signal_type)) {
-                       signal_type = switch_core_hash_find(detector->signal_type_map, signal_type);
-               }
-               if (!zstr(signal_type)) {
-                       switch_event_t *cpa_event;
-                       const char *uuid = switch_event_get_header(event, "Unique-ID");
-                       if (zstr(uuid)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Detector %s %s event is missing call UUID!\n", detector->name, signal_type);
-                               return;
-                       }
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Got Rayo CPA event %s\n", signal_type);
-                       if (switch_event_create_subclass(&cpa_event, SWITCH_EVENT_CUSTOM, "rayo::cpa") == SWITCH_STATUS_SUCCESS) {
-                               switch_event_add_header_string(cpa_event, SWITCH_STACK_BOTTOM, "Unique-ID", uuid);
-                               switch_event_add_header_string(cpa_event, SWITCH_STACK_BOTTOM, "detector-name", detector->name);
-                               switch_event_add_header_string(cpa_event, SWITCH_STACK_BOTTOM, "detector-uuid", detector->uuid);
-                               switch_event_add_header(cpa_event, SWITCH_STACK_BOTTOM, "signal-type", "%s%s:%s", RAYO_CPA_BASE, signal_type, RAYO_VERSION);
-                               if (!zstr(detector->signal_value_header)) {
-                                       const char *value = switch_event_get_header(event, detector->signal_value_header);
-                                       if (!zstr(value)) {
-                                               switch_event_add_header_string(cpa_event, SWITCH_STACK_BOTTOM, "value", value);
-                                       }
-                               }
-                               if (!zstr(detector->signal_duration_header)) {
-                                       const char *duration = switch_event_get_header(event, detector->signal_duration_header);
-                                       if (!zstr(duration)) {
-                                               switch_event_add_header_string(cpa_event, SWITCH_STACK_BOTTOM, "duration", duration);
-                                       }
-                               }
-                               switch_event_fire(&cpa_event);
-                       }
-               } else {
-                       /* couldn't map event to Rayo signal-type */
-                       const char *event_name = switch_event_get_header(event, "Event-Name");
-                       const char *event_subclass = switch_event_get_header(event, "Event-Subclass");
-                       if (zstr(event_subclass)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Failed to find Rayo signal-type for event %s\n", event_name);
-                       } else {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Failed to find Rayo signal-type for event %s %s\n", event_name, event_subclass);
-                       }
-               }
-       }
-}
-
-#define RAYO_CPA_DETECTOR_SYNTAX  "rayo_cpa <uuid> <signal-type> <start|stop>"
-SWITCH_STANDARD_API(rayo_cpa_detector_api)
-{
-       char *cmd_dup = NULL;
-       char *argv[4] = { 0 };
-       int argc = 0;
-
-       if (zstr(cmd)) {
-               stream->write_function(stream, "-ERR: USAGE %s\n", RAYO_CPA_DETECTOR_SYNTAX);
-               goto done;
-       }
-
-       cmd_dup = strdup(cmd);
-       argc = switch_separate_string(cmd_dup, ' ', argv, sizeof(argv) / sizeof(argv[0]));
-
-       if (argc != 3) {
-               stream->write_function(stream, "-ERR: USAGE %s\n", RAYO_CPA_DETECTOR_SYNTAX);
-       } else {
-               const char *err_reason = NULL;
-               if (!strcmp(argv[2], "stop")) {
-                       rayo_cpa_detector_stop(argv[0], argv[1]);
-                       stream->write_function(stream, "+OK\n");
-               } else if (!strcmp(argv[2], "start")) {
-                       if (!rayo_cpa_detector_start(argv[0], argv[1], &err_reason)) {
-                               if (err_reason) {
-                                       stream->write_function(stream, "-ERR: %s\n", err_reason);
-                               } else {
-                                       stream->write_function(stream, "-ERR\n");
-                               }
-                       } else {
-                               stream->write_function(stream, "+OK\n");
-                       }
-               } else {
-                       stream->write_function(stream, "-ERR: USAGE %s\n", RAYO_CPA_DETECTOR_SYNTAX);
-               }
-       }
-
-done:
-       switch_safe_free(cmd_dup);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Detector definition destructor
- */
-static void destroy_detector(void *ptr)
-{
-    struct rayo_cpa_detector *detector = (struct rayo_cpa_detector *) ptr;
-       if (detector->signal_type_map) {
-               switch_core_hash_destroy(&detector->signal_type_map);
-       }
-}
-
-/**
- * Configure CPA
- */
-static switch_status_t do_config(switch_memory_pool_t *pool, const char *config_file)
-{
-       switch_xml_t cfg, xml, cpa_xml;
-       switch_status_t status = SWITCH_STATUS_SUCCESS;
-       switch_hash_t *bound_events;
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Configuring CPA\n");
-       if (!(xml = switch_xml_open_cfg(config_file, &cfg, NULL))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", config_file);
-               return SWITCH_STATUS_TERM;
-       }
-
-       switch_core_hash_init(&bound_events);
-
-       cpa_xml = switch_xml_child(cfg, "cpa");
-       if (cpa_xml) {
-               switch_xml_t detector_xml;
-
-               for (detector_xml = switch_xml_child(cpa_xml, "detector"); detector_xml; detector_xml = detector_xml->next) {
-                       switch_xml_t start_xml, stop_xml, event_xml;
-                       struct rayo_cpa_detector *detector;
-                       char id[SWITCH_UUID_FORMATTED_LENGTH + 1] = { 0 };
-                       const char *name = switch_xml_attr_soft(detector_xml, "name");
-                       if (zstr(name)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Missing name of CPA detector!\n");
-                               status = SWITCH_STATUS_TERM;
-                               goto done;
-                       }
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CPA detector: %s\n", name);
-                       detector = switch_core_alloc(pool, sizeof(*detector));
-                       switch_core_hash_init(&detector->signal_type_map);
-                       detector->name = switch_core_strdup(pool, name);
-                       switch_uuid_str(id, sizeof(id));
-                       detector->uuid = switch_core_strdup(pool, id);
-
-                       start_xml = switch_xml_child(detector_xml, "start");
-                       if (start_xml) {
-                               detector->start_app = switch_core_strdup(pool, switch_xml_attr_soft(start_xml, "application"));
-                               detector->start_app_args = switch_core_strdup(pool, switch_xml_attr_soft(start_xml, "data"));
-                       }
-
-                       stop_xml = switch_xml_child(detector_xml, "stop");
-                       if (stop_xml) {
-                               detector->stop_app = switch_core_strdup(pool, switch_xml_attr_soft(stop_xml, "application"));
-                               detector->stop_app_args = switch_core_strdup(pool, switch_xml_attr_soft(stop_xml, "data"));
-                       }
-
-                       event_xml = switch_xml_child(detector_xml, "event");
-                       if (event_xml) {
-                               int event_ok = 0;
-                               switch_xml_t signal_type_xml;
-                               const char *event_class = switch_xml_attr_soft(event_xml, "class");
-                               const char *event_subclass = switch_xml_attr_soft(event_xml, "subclass");
-                               switch_event_types_t event_type;
-                               if (zstr(event_class)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Missing event class for CPA detector: %s\n", detector->name);
-                                       status = SWITCH_STATUS_TERM;
-                                       goto done;
-                               }
-
-                               if (switch_name_event(event_class, &event_type) != SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid event class %s for CPA detector: %s\n", event_class, detector->name);
-                                       status = SWITCH_STATUS_TERM;
-                                       goto done;
-                               }
-
-                               /* bind detector to event if not already done... */
-                               {
-                                       struct rayo_cpa_detector *bound_detector;
-                                       const char *event_name = switch_core_sprintf(pool, "%s %s", event_class, event_subclass);
-                                       if (!(bound_detector = switch_core_hash_find(bound_events, event_name))) {
-                                               /* not yet bound */
-                                               if (zstr(event_subclass)) {
-                                                       event_subclass = NULL;
-                                               }
-                                               switch_event_bind("rayo_cpa_detector", event_type, event_subclass, rayo_cpa_detector_event, detector);
-                                               switch_core_hash_insert(bound_events, event_name, detector); /* mark as bound */
-                                       } else if (bound_detector != detector) {
-                                               /* can't have multiple detectors generating the same event! */
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Detector %s attempted to bind to event %s that is already bound by %s\n", detector->name, event_name, bound_detector->name);
-                                               status = SWITCH_STATUS_TERM;
-                                               goto done;
-                                       }
-                               }
-
-                               /* configure native event -> rayo CPA event mapping */
-                               detector->signal_type_header = switch_core_strdup(pool, switch_xml_attr_soft(event_xml, "type-header"));
-                               detector->signal_value_header = switch_core_strdup(pool, switch_xml_attr_soft(event_xml, "value-header"));
-                               detector->signal_duration_header = switch_core_strdup(pool, switch_xml_attr_soft(event_xml, "duration-header"));
-
-                               /* configure native event type -> rayo CPA signal type mapping */
-                               for (signal_type_xml = switch_xml_child(event_xml, "signal-type"); signal_type_xml; signal_type_xml = signal_type_xml->next) {
-                                       const char *header_value = switch_core_strdup(pool, switch_xml_attr_soft(signal_type_xml, "header-value"));
-                                       const char *signal_type = switch_core_strdup(pool, switch_xml_attr_soft(signal_type_xml, "value"));
-                                       if (zstr(signal_type)) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Detector %s missing signal-type value!\n", detector->name);
-                                               status = SWITCH_STATUS_TERM;
-                                               goto done;
-                                       } else {
-                                               /* add signal-type to detector mapping if not already done for this detector */
-                                               const char *signal_type_ns = switch_core_sprintf(pool, "%s%s:%s", RAYO_CPA_BASE, signal_type, RAYO_VERSION);
-                                               struct rayo_cpa_detector *bound_detector = switch_core_hash_find(globals.detectors, signal_type_ns);
-                                               if (!bound_detector) {
-                                                       switch_core_hash_insert_destructor(globals.detectors, signal_type_ns, detector, destroy_detector);
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding CPA %s => %s\n", signal_type_ns, detector->name);
-                                                       event_ok = 1;
-                                               } else if (bound_detector == detector) {
-                                                       /* detector has multiple signal-type configs w/ same value */
-                                                       event_ok = 1;
-                                               } else {
-                                                       /* multiple detectors with same signal-type value */
-                                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Detector %s configured to handle signal-type %s that is already handled by %s\n", detector->name, signal_type, bound_detector->name);
-                                                       status = SWITCH_STATUS_TERM;
-                                                       goto done;
-                                               }
-                                       }
-
-                                       /* map event value to signal-type */
-                                       if (zstr(header_value)) {
-                                               switch_core_hash_insert(detector->signal_type_map, "rayo_default", signal_type);
-                                       } else {
-                                               switch_core_hash_insert(detector->signal_type_map, header_value, signal_type);
-                                       }
-                               }
-
-                               if (!event_ok) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Detector %s is missing Rayo signal-type for event\n", detector->name);
-                                       status = SWITCH_STATUS_TERM;
-                                       goto done;
-                               }
-                       }
-               }
-       }
-
-done:
-       switch_core_hash_destroy(&bound_events);
-       switch_xml_free(xml);
-
-       return status;
-}
-
-/**
- * Console auto-completion for signal types
- */
-static switch_status_t rayo_cpa_detector_signal_types(const char *line, const char *cursor, switch_console_callback_match_t **matches)
-{
-       switch_status_t status = SWITCH_STATUS_FALSE;
-       switch_hash_index_t *hi;
-       void *val;
-       const void *vvar;
-       switch_console_callback_match_t *my_matches = NULL;
-
-       switch_mutex_lock(globals.detectors_mutex);
-       for (hi = switch_core_hash_first(globals.detectors); hi; hi = switch_core_hash_next(&hi)) {
-               switch_core_hash_this(hi, &vvar, NULL, &val);
-               switch_console_push_match(&my_matches, (const char *) vvar);
-       }
-       switch_mutex_unlock(globals.detectors_mutex);
-
-       if (my_matches) {
-               *matches = my_matches;
-               status = SWITCH_STATUS_SUCCESS;
-       }
-
-       return status;
-}
-
-/**
- * Load CPA signal detection features
- * @param module_interface
- * @param pool memory pool
- * @param config_file
- * @return SWITCH_STATUS_SUCCESS if successfully loaded
- */
-switch_status_t rayo_cpa_detector_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       switch_api_interface_t *api_interface;
-
-       switch_core_hash_init(&globals.detectors);
-       switch_mutex_init(&globals.detectors_mutex, SWITCH_MUTEX_NESTED, pool);
-
-       if (do_config(pool, config_file) != SWITCH_STATUS_SUCCESS) {
-               return SWITCH_STATUS_TERM;
-       }
-
-       SWITCH_ADD_API(api_interface, "rayo_cpa", "Query rayo status", rayo_cpa_detector_api, RAYO_CPA_DETECTOR_SYNTAX);
-
-       switch_console_set_complete("add rayo_cpa ::console::list_uuid ::rayo_cpa::list_signal_types start");
-       switch_console_set_complete("add rayo_cpa ::console::list_uuid ::rayo_cpa::list_signal_types stop");
-       switch_console_add_complete_func("::rayo_cpa::list_signal_types", rayo_cpa_detector_signal_types);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Disable CPA signal detection features
- */
-void rayo_cpa_detector_shutdown(void)
-{
-       switch_console_set_complete("del rayo_cpa");
-       switch_console_del_complete_func("::rayo_cpa::list_signal_types");
-       if (globals.detectors) {
-               switch_core_hash_destroy(&globals.detectors);
-       }
-       switch_event_unbind_callback(rayo_cpa_detector_event);
-}
-
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/rayo_cpa_detector.h b/src/mod/event_handlers/mod_rayo/rayo_cpa_detector.h
deleted file mode 100644 (file)
index fec720d..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2014, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_cpa_detector.h -- Rayo call progress analysis
- *
- */
-#ifndef RAYO_CPA_DETECTOR_H
-#define RAYO_CPA_DETECTOR_H
-
-#include <switch.h>
-
-#include "mod_rayo.h"
-
-SWITCH_DECLARE(switch_status_t) rayo_cpa_detector_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file);
-SWITCH_DECLARE(void) rayo_cpa_detector_shutdown(void);
-SWITCH_DECLARE(int) rayo_cpa_detector_start(const char *call_uuid, const char *signal_ns, const char **error_detail);
-SWITCH_DECLARE(void) rayo_cpa_detector_stop(const char *call_uuid, const char *signal_ns);
-
-#endif
-
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/rayo_elements.c b/src/mod/event_handlers/mod_rayo/rayo_elements.c
deleted file mode 100644 (file)
index 14e9c61..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_elements.c -- Rayo XML element definition
- *
- */
-#include "rayo_elements.h"
-
-/**
- * <input> component validation
- */
-ELEMENT(RAYO_INPUT)
-       ATTRIB(xmlns,, any)
-       STRING_ATTRIB(mode, any, "any,dtmf,voice,cpa")
-       OPTIONAL_ATTRIB(terminator,, dtmf_digit)
-       ATTRIB(recognizer,, any)
-       ATTRIB(language, en-US, any)
-       ATTRIB(initial-timeout, -1, positive_or_neg_one)
-       ATTRIB(inter-digit-timeout, -1, positive_or_neg_one)
-       ATTRIB(sensitivity, 0.5, decimal_between_zero_and_one)
-       ATTRIB(min-confidence, 0, decimal_between_zero_and_one)
-       ATTRIB(max-silence, -1, positive_or_neg_one)
-       STRING_ATTRIB(match-content-type, application/nlsml+xml, "application/nlsml+xml")
-       /* internal attribs for prompt support */
-       ATTRIB(barge-event, false, bool)
-       ATTRIB(start-timers, true, bool)
-ELEMENT_END
-
-/**
- * <join> command validation
- */
-ELEMENT(RAYO_JOIN)
-       ATTRIB(xmlns,, any)
-       STRING_ATTRIB(direction, duplex, "send,recv,duplex")
-       STRING_ATTRIB(media, bridge, "bridge,direct")
-       ATTRIB(call-uri,, any)
-       ATTRIB(mixer-name,, any)
-ELEMENT_END
-
-/**
- * <output> component validation
- */
-ELEMENT(RAYO_OUTPUT)
-       ATTRIB(xmlns,, any)
-       ATTRIB(start-offset, 0, not_negative)
-       ATTRIB(start-paused, false, bool)
-       ATTRIB(repeat-interval, 0, not_negative)
-       ATTRIB(repeat-times, 1, not_negative)
-       ATTRIB(max-time, -1, positive_or_neg_one)
-       ATTRIB(renderer,, any)
-       ATTRIB(voice,, any)
-       STRING_ATTRIB(direction, out, "out,in")
-ELEMENT_END
-
-/**
- * <output><seek> validation
- */
-ELEMENT(RAYO_OUTPUT_SEEK)
-       ATTRIB(xmlns,, any)
-       STRING_ATTRIB(direction,, "forward,back")
-       ATTRIB(amount,-1, positive)
-ELEMENT_END
-
-/**
- * <prompt> component validation
- */
-ELEMENT(RAYO_PROMPT)
-       ATTRIB(xmlns,, any)
-       ATTRIB(barge-in, true, bool)
-ELEMENT_END
-
-/**
- * <receivefax> command validation
- */
-ELEMENT(RAYO_RECEIVEFAX)
-       ATTRIB(xmlns,, any)
-ELEMENT_END
-
-/**
- * <record> component validation
- */
-ELEMENT(RAYO_RECORD)
-       ATTRIB(xmlns,, any)
-       ATTRIB(format, wav, any)
-       ATTRIB(start-beep, false, bool)
-       ATTRIB(stop-beep, false, bool)
-       ATTRIB(start-paused, false, bool)
-       ATTRIB(max-duration, -1, positive_or_neg_one)
-       ATTRIB(initial-timeout, -1, positive_or_neg_one)
-       ATTRIB(final-timeout, -1, positive_or_neg_one)
-       STRING_ATTRIB(direction, duplex, "duplex,send,recv")
-       ATTRIB(mix, false, bool)
-ELEMENT_END
-
-/**
- * <sendfax> command validation
- */
-ELEMENT(RAYO_SENDFAX)
-       ATTRIB(xmlns,, any)
-ELEMENT_END
-
-/**
- * <app> command validation
- */
-ELEMENT(RAYO_APP)
-       ATTRIB(xmlns,, any)
-       ATTRIB(app,, any)
-       OPTIONAL_ATTRIB(args,, any)
-ELEMENT_END
-
-
-
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
-
diff --git a/src/mod/event_handlers/mod_rayo/rayo_elements.h b/src/mod/event_handlers/mod_rayo/rayo_elements.h
deleted file mode 100644 (file)
index dc67a9f..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_elements.h -- Rayo XML elements
- *
- */
-#ifndef RAYO_ELEMENTS_H
-#define RAYO_ELEMENTS_H
-
-#include "iks_helpers.h"
-
-ELEMENT_DECL(RAYO_INPUT)
-ELEMENT_DECL(RAYO_JOIN)
-ELEMENT_DECL(RAYO_OUTPUT)
-ELEMENT_DECL(RAYO_OUTPUT_SEEK)
-ELEMENT_DECL(RAYO_PROMPT)
-ELEMENT_DECL(RAYO_RECEIVEFAX)
-ELEMENT_DECL(RAYO_RECORD)
-ELEMENT_DECL(RAYO_SENDFAX)
-ELEMENT_DECL(RAYO_APP)
-
-#endif
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
-
diff --git a/src/mod/event_handlers/mod_rayo/rayo_exec_component.c b/src/mod/event_handlers/mod_rayo/rayo_exec_component.c
deleted file mode 100644 (file)
index a918f01..0000000
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_exec_component.c -- Rayo call application execution component
- *
- */
-#include "rayo_components.h"
-#include "rayo_elements.h"
-
-
-/**
- * An exec component
- */
-struct exec_component {
-       /** component base class */
-       struct rayo_component base;
-       /** Dialplan app */
-       const char *app;
-       /** Dialplan app args */
-       char *args;
-};
-
-#define EXEC_COMPONENT(x) ((struct exec_component *)x)
-
-/**
- * Wrapper for executing dialplan app
- */
-SWITCH_STANDARD_APP(rayo_app_exec)
-{
-       if (!zstr(data)) {
-               struct rayo_component *component = RAYO_COMPONENT_LOCATE(data);
-               if (component) {
-                       switch_status_t status;
-                       switch_channel_set_variable(switch_core_session_get_channel(session), SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "");
-                       status = switch_core_session_execute_application(session, EXEC_COMPONENT(component)->app, EXEC_COMPONENT(component)->args);
-                       if (status != SWITCH_STATUS_SUCCESS) {
-                               rayo_component_send_complete(component, COMPONENT_COMPLETE_ERROR);
-                       } else {
-                               const char *resp = switch_channel_get_variable(switch_core_session_get_channel(session), SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE);
-                               if (zstr(resp)) {
-                                       rayo_component_send_complete(component, COMPONENT_COMPLETE_DONE);
-                               } else {
-                                       /* send complete event to client */
-                                       iks *response = iks_new("app");
-                                       iks_insert_attrib(response, "xmlns", RAYO_EXEC_COMPLETE_NS);
-                                       iks_insert_attrib(response, "response", resp);
-                                       rayo_component_send_complete_with_metadata(component, COMPONENT_COMPLETE_DONE, response, 1);
-                                       iks_delete(response);
-                               }
-                       }
-                       RAYO_RELEASE(component);
-               }
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Missing rayo exec component JID\n");
-       }
-       switch_channel_set_variable(switch_core_session_get_channel(session), SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, "");
-}
-
-/**
- * Create a record component
- */
-static struct rayo_component *exec_component_create(struct rayo_actor *call, const char *client_jid, iks *exec)
-{
-       switch_memory_pool_t *pool;
-       struct exec_component *exec_component = NULL;
-
-       switch_core_new_memory_pool(&pool);
-       exec_component = switch_core_alloc(pool, sizeof(*exec_component));
-       exec_component = EXEC_COMPONENT(rayo_component_init(RAYO_COMPONENT(exec_component), pool, RAT_CALL_COMPONENT, "exec", NULL, call, client_jid));
-       if (exec_component) {
-               exec_component->app = switch_core_strdup(pool, iks_find_attrib_soft(exec, "app"));
-               exec_component->args = switch_core_strdup(pool, iks_find_attrib_soft(exec, "args"));
-       } else {
-               switch_core_destroy_memory_pool(&pool);
-               return NULL;
-       }
-
-       return RAYO_COMPONENT(exec_component);
-}
-
-/**
- * Execute dialplan APP on rayo call
- */
-static iks *start_exec_app_component(struct rayo_actor *call, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *exec = iks_find(iq, "app");
-       struct rayo_component *exec_component = NULL;
-       switch_core_session_t *session = NULL;
-
-       /* validate record attributes */
-       if (!VALIDATE_RAYO_APP(exec)) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       exec_component = exec_component_create(call, iks_find_attrib(iq, "from"), exec);
-       if (!exec_component) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create exec entity");
-       }
-
-       session = switch_core_session_locate(call->id);
-       if (session) {
-               if (switch_core_session_execute_application_async(session, switch_core_session_strdup(session, "rayo-app-exec"), switch_core_session_strdup(session, RAYO_JID(exec_component))) != SWITCH_STATUS_SUCCESS) {
-                       switch_core_session_rwunlock(session);
-                       RAYO_RELEASE(exec_component);
-                       RAYO_DESTROY(exec_component);
-                       return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "failed to execute app");
-               }
-               switch_core_session_rwunlock(session);
-       } else {
-               RAYO_RELEASE(exec_component);
-               RAYO_DESTROY(exec_component);
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Call is gone");
-       }
-
-       rayo_component_send_start(exec_component, iq);
-
-       return NULL;
-}
-
-/**
- * Initialize exec component
- * @param module_interface
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_exec_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       switch_application_interface_t *app_interface;
-       SWITCH_ADD_APP(app_interface, "rayo-app-exec", "Wrapper dialplan app for internal use only", "", rayo_app_exec, "", SAF_SUPPORT_NOMEDIA | SAF_ZOMBIE_EXEC);
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_EXEC_NS":app", start_exec_app_component);
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Shutdown exec component
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_exec_component_shutdown(void)
-{
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/rayo_fax_components.c b/src/mod/event_handlers/mod_rayo/rayo_fax_components.c
deleted file mode 100644 (file)
index b605702..0000000
+++ /dev/null
@@ -1,561 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2014, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_fax_components.c -- Rayo receivefax and sendfax components implementation
- *
- */
-#include "rayo_components.h"
-#include "rayo_elements.h"
-
-/**
- * settings
- */
-static struct {
-       const char *file_prefix;
-} globals;
-
-struct fax_component {
-       /** component base class */
-       struct rayo_component base;
-       /** Flag to stop fax */
-       int stop;
-};
-
-#define FAX_COMPONENT(x) ((struct fax_component *)x)
-
-struct receivefax_component {
-       /** fax component base class */
-       struct fax_component base;
-       /** true if HTTP PUT needs to be done after fax is received */
-       int http_put_after_receive;
-       /** fax stored on local filesystem */
-       const char *local_filename;
-       /** fax final target (may be same as local filename) */
-       const char *filename;
-};
-
-#define RECEIVEFAX_COMPONENT(x) ((struct receivefax_component *)x)
-
-#define FAX_FINISH "finish", RAYO_FAX_COMPLETE_NS
-
-/**
- * Start execution of call sendfax component
- * @param call the call to send fax to
- * @param msg the original request
- * @param session_data the call's session
- */
-static iks *start_sendfax_component(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       struct fax_component *sendfax_component = NULL;
-       iks *sendfax = iks_find(iq, "sendfax");
-       iks *response = NULL;
-       switch_event_t *execute_event = NULL;
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       switch_memory_pool_t *pool;
-       iks *document;
-       const char *fax_document;
-       const char *fax_header;
-       const char *fax_identity;
-       const char *pages;
-
-       /* validate attributes */
-       if (!VALIDATE_RAYO_SENDFAX(sendfax)) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       /* fax is only allowed if the call is not currently joined */
-       if (rayo_call_is_joined(RAYO_CALL(call))) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "can't send fax on a joined call");
-       }
-
-       if (rayo_call_is_faxing(RAYO_CALL(call))) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "fax already in progress");
-       }
-
-       /* get fax document */
-       document = iks_find(sendfax, "document");
-       if (!document) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "missing document");
-       }
-       fax_document = iks_find_attrib_soft(document, "url");
-       if (zstr(fax_document)) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "missing document url");
-       }
-
-       /* is valid URL type? */
-       if (!strncasecmp(fax_document, "http://", 7) || !strncasecmp(fax_document, "https://", 8)) {
-               switch_stream_handle_t stream = { 0 };
-               SWITCH_STANDARD_STREAM(stream);
-               /* need to fetch document from server... */
-               switch_api_execute("http_get", fax_document, session, &stream);
-               if (!zstr(stream.data) && !strncmp(fax_document, SWITCH_PATH_SEPARATOR, strlen(SWITCH_PATH_SEPARATOR))) {
-                       fax_document = switch_core_session_strdup(session, stream.data);
-               } else {
-                       switch_safe_free(stream.data);
-                       return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "failed to fetch document");
-               }
-               switch_safe_free(stream.data);
-       } else if (!strncasecmp(fax_document, "file://", 7)) {
-               fax_document = fax_document + 7;
-               if (zstr(fax_document)) {
-                       return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "invalid file:// url");
-               }
-       } else if (strncasecmp(fax_document, SWITCH_PATH_SEPARATOR, strlen(SWITCH_PATH_SEPARATOR))) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "unsupported url type");
-       }
-
-       /* does document exist? */
-       if (switch_file_exists(fax_document, NULL) != SWITCH_STATUS_SUCCESS) {
-               return iks_new_error_detailed_printf(iq, STANZA_ERROR_BAD_REQUEST, "file not found: %s", fax_document);
-       }
-
-       /* get fax identity and header */
-       fax_identity = iks_find_attrib_soft(document, "identity");
-       if (!zstr(fax_identity)) {
-               switch_channel_set_variable(channel, "fax_ident", fax_identity);
-       } else {
-               switch_channel_set_variable(channel, "fax_ident", NULL);
-       }
-       fax_header = iks_find_attrib_soft(document, "header");
-       if (!zstr(fax_header)) {
-               switch_channel_set_variable(channel, "fax_header", fax_header);
-       } else {
-               switch_channel_set_variable(channel, "fax_header", NULL);
-       }
-
-       /* get pages to send */
-       pages = iks_find_attrib_soft(document, "pages");
-       if (!zstr(pages)) {
-               if (switch_regex_match(pages, "[1-9][0-9]*(-[1-9][0-9]*)?") == SWITCH_STATUS_FALSE) {
-                       return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "invalid pages value");
-               } else {
-                       int start = 0;
-                       int end = 0;
-                       char *pages_dup = switch_core_session_strdup(session, pages);
-                       char *sep = strchr(pages_dup, '-');
-                       if (sep) {
-                               *sep = '\0';
-                               sep++;
-                               end = atoi(sep);
-                       }
-                       start = atoi(pages_dup);
-                       if (end && end < start) {
-                               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "invalid pages value");
-                       }
-                       switch_channel_set_variable(channel, "fax_start_page", pages_dup);
-                       switch_channel_set_variable(channel, "fax_end_page", sep);
-               }
-       } else {
-               switch_channel_set_variable(channel, "fax_start_page", NULL);
-               switch_channel_set_variable(channel, "fax_end_page", NULL);
-       }
-
-       /* create sendfax component */
-       switch_core_new_memory_pool(&pool);
-       sendfax_component = switch_core_alloc(pool, sizeof(*sendfax_component));
-       sendfax_component = FAX_COMPONENT(rayo_component_init((struct rayo_component *)sendfax_component, pool, RAT_CALL_COMPONENT, "sendfax", NULL, call, iks_find_attrib(iq, "from")));
-       if (!sendfax_component) {
-               switch_core_destroy_memory_pool(&pool);
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create sendfax entity");
-       }
-
-       /* add channel variable so that fax component can be located from fax events */
-       switch_channel_set_variable(channel, "rayo_fax_jid", RAYO_JID(sendfax_component));
-
-       /* clear fax result variables */
-       switch_channel_set_variable(channel, "fax_success", NULL);
-       switch_channel_set_variable(channel, "fax_result_code", NULL);
-       switch_channel_set_variable(channel, "fax_result_text", NULL);
-       switch_channel_set_variable(channel, "fax_document_transferred_pages", NULL);
-       switch_channel_set_variable(channel, "fax_document_total_pages", NULL);
-       switch_channel_set_variable(channel, "fax_image_resolution", NULL);
-       switch_channel_set_variable(channel, "fax_image_size", NULL);
-       switch_channel_set_variable(channel, "fax_bad_rows", NULL);
-       switch_channel_set_variable(channel, "fax_transfer_rate", NULL);
-       switch_channel_set_variable(channel, "fax_ecm_used", NULL);
-       switch_channel_set_variable(channel, "fax_local_station_id", NULL);
-       switch_channel_set_variable(channel, "fax_remote_station_id", NULL);
-
-       rayo_call_set_faxing(RAYO_CALL(call), 1);
-
-       /* execute txfax APP */
-       if (switch_event_create(&execute_event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "call-command", "execute");
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-name", "txfax");
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", fax_document);
-               if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) {
-                       switch_channel_set_flag(channel, CF_BLOCK_BROADCAST_UNTIL_MEDIA);
-               }
-
-               if (switch_core_session_queue_private_event(session, &execute_event, SWITCH_FALSE) != SWITCH_STATUS_SUCCESS) {
-                       response = iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "failed to txfax (queue event failed)");
-                       if (execute_event) {
-                               switch_event_destroy(&execute_event);
-                       }
-                       rayo_call_set_faxing(RAYO_CALL(call), 0);
-                       RAYO_RELEASE(sendfax_component);
-               } else {
-                       /* component starting... */
-                       rayo_component_send_start(RAYO_COMPONENT(sendfax_component), iq);
-               }
-       } else {
-               response = iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "failed to create txfax event");
-               rayo_call_set_faxing(RAYO_CALL(call), 0);
-               RAYO_RELEASE(sendfax_component);
-       }
-
-       return response;
-}
-
-/**
- * Start execution of call receivefax component
- * @param call the call to receive fax from
- * @param msg the original request
- * @param session_data the call's session
- */
-static iks *start_receivefax_component(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       struct receivefax_component *receivefax_component = NULL;
-       iks *receivefax = iks_find(iq, "receivefax");
-       iks *response = NULL;
-       switch_event_t *execute_event = NULL;
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       switch_memory_pool_t *pool;
-       int file_no;
-
-       /* validate attributes */
-       if (!VALIDATE_RAYO_RECEIVEFAX(receivefax)) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       /* fax is only allowed if the call is not currently joined */
-       if (rayo_call_is_joined(RAYO_CALL(call))) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "can't receive fax on a joined call");
-       }
-
-       if (rayo_call_is_faxing(RAYO_CALL(call))) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "fax already in progress");
-       }
-
-       /* create receivefax component */
-       switch_core_new_memory_pool(&pool);
-       receivefax_component = switch_core_alloc(pool, sizeof(*receivefax_component));
-       receivefax_component = RECEIVEFAX_COMPONENT(rayo_component_init((struct rayo_component *)receivefax_component, pool, RAT_CALL_COMPONENT, "receivefax", NULL, call, iks_find_attrib(iq, "from")));
-       if (!receivefax_component) {
-               switch_core_destroy_memory_pool(&pool);
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create sendfax entity");
-       }
-       file_no = rayo_actor_seq_next(call);
-       receivefax_component->filename = switch_core_sprintf(pool, "%s%s%s-%d.tif",
-               globals.file_prefix, SWITCH_PATH_SEPARATOR, switch_core_session_get_uuid(session), file_no);
-       if (!strncmp(receivefax_component->filename, "http://", 7) || !strncmp(receivefax_component->filename, "https://", 8)) {
-               /* This is an HTTP URL, need to PUT after fax is received */
-               receivefax_component->local_filename = switch_core_sprintf(pool, "%s%s%s-%d",
-                       SWITCH_GLOBAL_dirs.temp_dir, SWITCH_PATH_SEPARATOR, switch_core_session_get_uuid(session), file_no);
-               receivefax_component->http_put_after_receive = 1;
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s save fax to HTTP URL\n", RAYO_JID(receivefax_component));
-       } else {
-               /* assume file.. */
-               receivefax_component->local_filename = receivefax_component->filename;
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s save fax to local file\n", RAYO_JID(receivefax_component));
-       }
-
-       /* add channel variable so that fax component can be located from fax events */
-       switch_channel_set_variable(channel, "rayo_fax_jid", RAYO_JID(receivefax_component));
-
-       /* clear fax result variables */
-       switch_channel_set_variable(channel, "fax_success", NULL);
-       switch_channel_set_variable(channel, "fax_result_code", NULL);
-       switch_channel_set_variable(channel, "fax_result_text", NULL);
-       switch_channel_set_variable(channel, "fax_document_transferred_pages", NULL);
-       switch_channel_set_variable(channel, "fax_document_total_pages", NULL);
-       switch_channel_set_variable(channel, "fax_image_resolution", NULL);
-       switch_channel_set_variable(channel, "fax_image_size", NULL);
-       switch_channel_set_variable(channel, "fax_bad_rows", NULL);
-       switch_channel_set_variable(channel, "fax_transfer_rate", NULL);
-       switch_channel_set_variable(channel, "fax_ecm_used", NULL);
-       switch_channel_set_variable(channel, "fax_local_station_id", NULL);
-       switch_channel_set_variable(channel, "fax_remote_station_id", NULL);
-
-       rayo_call_set_faxing(RAYO_CALL(call), 1);
-
-       /* execute rxfax APP */
-       if (switch_event_create(&execute_event, SWITCH_EVENT_COMMAND) == SWITCH_STATUS_SUCCESS) {
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "call-command", "execute");
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-name", "rxfax");
-               switch_event_add_header_string(execute_event, SWITCH_STACK_BOTTOM, "execute-app-arg", receivefax_component->local_filename);
-               if (!switch_channel_test_flag(channel, CF_PROXY_MODE)) {
-                       switch_channel_set_flag(channel, CF_BLOCK_BROADCAST_UNTIL_MEDIA);
-               }
-
-               if (switch_core_session_queue_private_event(session, &execute_event, SWITCH_FALSE) != SWITCH_STATUS_SUCCESS) {
-                       response = iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "failed to rxfax (queue event failed)");
-                       if (execute_event) {
-                               switch_event_destroy(&execute_event);
-                       }
-                       rayo_call_set_faxing(RAYO_CALL(call), 0);
-                       RAYO_RELEASE(receivefax_component);
-               } else {
-                       /* component starting... */
-                       rayo_component_send_start(RAYO_COMPONENT(receivefax_component), iq);
-               }
-       } else {
-               response = iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "failed to create rxfax event");
-               rayo_call_set_faxing(RAYO_CALL(call), 0);
-               RAYO_RELEASE(receivefax_component);
-       }
-
-       return response;
-}
-
-/**
- * Stop execution of fax component
- */
-static iks *stop_fax_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = switch_core_session_locate(component->parent->id);
-       FAX_COMPONENT(component)->stop = 1;
-       if (session) {
-               switch_core_session_execute_application_async(session, "stopfax", "");
-               switch_core_session_rwunlock(session);
-       }
-       return iks_new_iq_result(iq);
-}
-
-/**
- * Add fax metadata to result
- * @param event source of metadata
- * @param name of metadata
- * @param result to add metadata to
- */
-static void insert_fax_metadata(switch_event_t *event, const char *name, iks *result)
-{
-       char actual_name[256];
-       const char *value;
-       snprintf(actual_name, sizeof(actual_name), "variable_%s", name);
-       actual_name[sizeof(actual_name) - 1] = '\0';
-       value = switch_event_get_header(event, actual_name);
-       if (!zstr(value)) {
-               iks *metadata = iks_insert(result, "metadata");
-               iks_insert_attrib(metadata, "xmlns", RAYO_FAX_COMPLETE_NS);
-               iks_insert_attrib(metadata, "name", name);
-               iks_insert_attrib(metadata, "value", value);
-       }
-}
-
-/**
- * Handle fax completion event from FreeSWITCH core
- * @param event received from FreeSWITCH core.  It will be destroyed by the core after this function returns.
- */
-static void on_execute_complete_event(switch_event_t *event)
-{
-       const char *application = switch_event_get_header(event, "Application");
-
-       if (!zstr(application) && (!strcmp(application, "rxfax") || !strcmp(application, "txfax"))) {
-               int is_rxfax = !strcmp(application, "rxfax");
-               const char *uuid = switch_event_get_header(event, "Unique-ID");
-               const char *fax_jid = switch_event_get_header(event, "variable_rayo_fax_jid");
-               struct rayo_actor *component;
-               if (!zstr(fax_jid) && (component = RAYO_LOCATE(fax_jid))) {
-                       iks *result;
-                       iks *complete;
-                       iks *fax;
-                       int have_fax_document = 1;
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Got result for %s\n", fax_jid);
-
-                       /* RX only: transfer HTTP document and delete local copy */
-                       if (is_rxfax && RECEIVEFAX_COMPONENT(component)->http_put_after_receive && switch_file_exists(RECEIVEFAX_COMPONENT(component)->local_filename, RAYO_POOL(component)) == SWITCH_STATUS_SUCCESS) {
-                               char *cmd = switch_core_sprintf(RAYO_POOL(component), "%s %s", RECEIVEFAX_COMPONENT(component)->filename, RECEIVEFAX_COMPONENT(component)->local_filename);
-                               switch_stream_handle_t stream = { 0 };
-                               SWITCH_STANDARD_STREAM(stream);
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s PUT fax to %s\n", RAYO_JID(component), RECEIVEFAX_COMPONENT(component)->filename);
-                               switch_api_execute("http_put", cmd, NULL, &stream);
-                               /* check if successful */
-                               if (!zstr(stream.data) && strncmp(stream.data, "+OK", 3)) {
-                                       /* PUT failed */
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s PUT fax %s to %s failed: %s\n", RAYO_JID(component), RECEIVEFAX_COMPONENT(component)->local_filename, RECEIVEFAX_COMPONENT(component)->filename, (char *)stream.data);
-                                       have_fax_document = 0;
-                               }
-                               switch_safe_free(stream.data)
-                               switch_file_remove(RECEIVEFAX_COMPONENT(component)->local_filename, RAYO_POOL(component));
-                       }
-
-                       /* successful fax? */
-                       if (have_fax_document && switch_true(switch_event_get_header(event, "variable_fax_success"))) {
-                               result = rayo_component_create_complete_event(RAYO_COMPONENT(component), FAX_FINISH);
-                       } else if (have_fax_document && FAX_COMPONENT(component)->stop)  {
-                               result = rayo_component_create_complete_event(RAYO_COMPONENT(component), COMPONENT_COMPLETE_STOP);
-                       } else {
-                               result = rayo_component_create_complete_event(RAYO_COMPONENT(component), COMPONENT_COMPLETE_ERROR);
-                       }
-                       complete = iks_find(result, "complete");
-
-                       /* RX only: add fax document information */
-                       if (is_rxfax && have_fax_document) {
-                               const char *pages = switch_event_get_header(event, "variable_fax_document_transferred_pages");
-                               if (!zstr(pages) && switch_is_number(pages) && atoi(pages) > 0) {
-                                       const char *resolution = switch_event_get_header(event, "variable_fax_file_image_resolution");
-                                       const char *size = switch_event_get_header(event, "variable_fax_image_size");
-
-                                       fax = iks_insert(complete, "fax");
-                                       iks_insert_attrib(fax, "xmlns", RAYO_FAX_COMPLETE_NS);
-
-                                       if (RECEIVEFAX_COMPONENT(component)->http_put_after_receive) {
-                                               iks_insert_attrib(fax, "url", RECEIVEFAX_COMPONENT(component)->filename);
-                                       } else {
-                                               /* convert absolute path to file:// URI */
-                                               iks_insert_attrib_printf(fax, "url", "file://%s", RECEIVEFAX_COMPONENT(component)->filename);
-                                       }
-
-                                       if (!zstr(resolution)) {
-                                               iks_insert_attrib(fax, "resolution", resolution);
-                                       }
-                                       if (!zstr(size)) {
-                                               iks_insert_attrib(fax, "size", size);
-                                       }
-                                       iks_insert_attrib(fax, "pages", pages);
-                               }
-                       }
-
-                       /* add metadata from event */
-                       insert_fax_metadata(event, "fax_success", complete);
-                       insert_fax_metadata(event, "fax_result_code", complete);
-                       insert_fax_metadata(event, "fax_result_text", complete);
-                       insert_fax_metadata(event, "fax_document_transferred_pages", complete);
-                       insert_fax_metadata(event, "fax_document_total_pages", complete);
-                       insert_fax_metadata(event, "fax_image_resolution", complete);
-                       insert_fax_metadata(event, "fax_image_size", complete);
-                       insert_fax_metadata(event, "fax_bad_rows", complete);
-                       insert_fax_metadata(event, "fax_transfer_rate", complete);
-                       insert_fax_metadata(event, "fax_ecm_used", complete);
-                       insert_fax_metadata(event, "fax_local_station_id", complete);
-                       insert_fax_metadata(event, "fax_remote_station_id", complete);
-
-                       /* flag faxing as done */
-                       rayo_call_set_faxing(RAYO_CALL(component->parent), 0);
-
-                       rayo_component_send_complete_event(RAYO_COMPONENT(component), result);
-
-                       RAYO_RELEASE(component);
-               }
-       }
-}
-
-/**
- * Process module XML configuration
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS on successful configuration
- */
-static switch_status_t do_config(switch_memory_pool_t *pool, const char *config_file)
-{
-       switch_xml_t cfg, xml;
-
-       /* set defaults */
-       globals.file_prefix = switch_core_sprintf(pool, "%s%s", SWITCH_GLOBAL_dirs.recordings_dir, SWITCH_PATH_SEPARATOR);
-
-       if (!(xml = switch_xml_open_cfg(config_file, &cfg, NULL))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", config_file);
-               return SWITCH_STATUS_TERM;
-       }
-
-       /* get params */
-       {
-               switch_xml_t settings = switch_xml_child(cfg, "fax");
-               if (settings) {
-                       switch_xml_t param;
-                       for (param = switch_xml_child(settings, "param"); param; param = param->next) {
-                               const char *var = switch_xml_attr_soft(param, "name");
-                               const char *val = switch_xml_attr_soft(param, "value");
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "param: %s = %s\n", var, val);
-                               if (!strcasecmp(var, "receivefax-file-prefix")) {
-                                       if (!zstr(val)) {
-                                               globals.file_prefix = switch_core_strdup(pool, val);
-                                       }
-                               } else {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unsupported param: %s\n", var);
-                               }
-                       }
-               }
-       }
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "receivefax-file-prefix = %s\n", globals.file_prefix);
-
-       switch_xml_free(xml);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Initialize fax components
- * @param module_interface
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_fax_components_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       if (do_config(pool, config_file) != SWITCH_STATUS_SUCCESS) {
-               return SWITCH_STATUS_TERM;
-       }
-
-       switch_event_bind("rayo_fax_components", SWITCH_EVENT_CHANNEL_EXECUTE_COMPLETE, NULL, on_execute_complete_event, NULL);
-
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_FAX_NS":receivefax", start_receivefax_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "receivefax", "set:"RAYO_EXT_NS":stop", stop_fax_component);
-
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_FAX_NS":sendfax", start_sendfax_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "sendfax", "set:"RAYO_EXT_NS":stop", stop_fax_component);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Shutdown fax components
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_fax_components_shutdown(void)
-{
-       switch_event_unbind_callback(on_execute_complete_event);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
-
diff --git a/src/mod/event_handlers/mod_rayo/rayo_input_component.c b/src/mod/event_handlers/mod_rayo/rayo_input_component.c
deleted file mode 100644 (file)
index 84a8e74..0000000
+++ /dev/null
@@ -1,1160 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2015, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_input_component.c -- Rayo input component implementation
- *
- */
-#include "rayo_components.h"
-#include "rayo_cpa_component.h"
-#include "rayo_elements.h"
-#include "srgs.h"
-#include "nlsml.h"
-
-#define MAX_DTMF 256
-
-#define INPUT_MATCH_TAG "match"
-#define INPUT_MATCH INPUT_MATCH_TAG, RAYO_INPUT_COMPLETE_NS
-#define INPUT_NOINPUT "noinput", RAYO_INPUT_COMPLETE_NS
-#define INPUT_NOMATCH "nomatch", RAYO_INPUT_COMPLETE_NS
-
-#define RAYO_INPUT_COMPONENT_PRIVATE_VAR "__rayo_input_component"
-
-struct input_handler;
-
-static struct {
-       /** grammar parser */
-       struct srgs_parser *parser;
-       /** default recognizer to use if none specified */
-       const char *default_recognizer;
-} globals;
-
-/**
- * Input component state
- */
-struct input_component {
-       /** component base class */
-       struct rayo_component base;
-       /** true if speech detection */
-       int speech_mode;
-       /** Number of collected digits */
-       int num_digits;
-       /** Terminating digit */
-       char term_digit;
-       /** The collected digits */
-       char digits[MAX_DTMF + 1];
-       /** grammar to match */
-       struct srgs_grammar *grammar;
-       /** time when last digit was received */
-       switch_time_t last_digit_time;
-       /** timeout before first digit is received */
-       int initial_timeout;
-       /** maximum silence allowed */
-       int max_silence;
-       /** minimum speech detection confidence */
-       double min_confidence;
-       /** sensitivity to background noise */
-       double sensitivity;
-       /** timeout after first digit is received */
-       int inter_digit_timeout;
-       /** stop flag */
-       int stop;
-       /** true if input timers started */
-       int start_timers;
-       /** true if event fired for first digit / start of speech */
-       int barge_event;
-       /** optional language to use */
-       const char *language;
-       /** optional recognizer to use */
-       const char *recognizer;
-       /** global data */
-       struct input_handler *handler;
-};
-
-#define INPUT_COMPONENT(x) ((struct input_component *)x)
-
-/**
- * Call input state
- */
-struct input_handler {
-       /** media bug to monitor frames / control input lifecycle */
-       switch_media_bug_t *bug;
-       /** active voice input component */
-       struct input_component *voice_component;
-       /** active dtmf input components */
-       switch_hash_t *dtmf_components;
-       /** synchronizes media bug and dtmf callbacks */
-       switch_mutex_t *mutex;
-       /** last recognizer used */
-       const char *last_recognizer;
-};
-
-/**
- * @param digit1 to match
- * @param digit2 to match
- * @return true if matching
- */
-static int digit_test(char digit1, char digit2)
-{
-       return digit1 && digit2 && tolower(digit1) == tolower(digit2);
-}
-
-/**
- * Send match event to client
- */
-static void send_match_event(struct rayo_component *component, iks *result)
-{
-       iks *event = rayo_component_create_complete_event(RAYO_COMPONENT(component), INPUT_MATCH);
-       iks *match = iks_find(iks_find(event, "complete"), INPUT_MATCH_TAG);
-       iks_insert_attrib(match, "content-type", "application/nlsml+xml");
-       iks_insert_cdata(match, iks_string(iks_stack(result), result), 0);
-       rayo_component_send_complete_event(component, event);
-}
-
-/**
- * Send barge-in event to client
- */
-static void send_barge_event(struct rayo_component *component)
-{
-       iks *event = iks_new("presence");
-       iks *x;
-       iks_insert_attrib(event, "from", RAYO_JID(component));
-       iks_insert_attrib(event, "to", component->client_jid);
-       x = iks_insert(event, "start-of-input");
-       iks_insert_attrib(x, "xmlns", RAYO_INPUT_NS);
-       RAYO_SEND_REPLY(component, component->client_jid, event);
-}
-
-/**
- * Check if dtmf component has timed out
- */
-static switch_status_t dtmf_component_check_timeout(struct input_component *component, switch_core_session_t *session)
-{
-       /* check for stopped component */
-       if (component->stop) {
-               rayo_component_send_complete(RAYO_COMPONENT(component), COMPONENT_COMPLETE_STOP);
-
-               /* let handler know component is done */
-               return SWITCH_STATUS_FALSE;
-       }
-
-       /* check for timeout */
-       if (component->start_timers) {
-               int elapsed_ms = (switch_micro_time_now() - component->last_digit_time) / 1000;
-               if (component->num_digits && component->inter_digit_timeout > 0 && elapsed_ms > component->inter_digit_timeout) {
-                       enum srgs_match_type match;
-                       const char *interpretation = NULL;
-
-                       /* we got some input, check for match */
-                       match = srgs_grammar_match(component->grammar, component->digits, &interpretation);
-                       if (match == SMT_MATCH || match == SMT_MATCH_END) {
-                               iks *result = nlsml_create_dtmf_match(component->digits, interpretation);
-                               /* notify of match */
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "MATCH = %s\n", component->digits);
-                               send_match_event(RAYO_COMPONENT(component), result);
-                               iks_delete(result);
-                       } else {
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "inter-digit-timeout\n");
-                               rayo_component_send_complete(RAYO_COMPONENT(component), INPUT_NOMATCH);
-                       }
-
-                       /* let handler know component is done */
-                       return SWITCH_STATUS_FALSE;
-               } else if (!component->num_digits && component->initial_timeout > 0 && elapsed_ms > component->initial_timeout) {
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "initial-timeout\n");
-                       rayo_component_send_complete(RAYO_COMPONENT(component), INPUT_NOINPUT);
-
-                       /* let handler know component is done */
-                       return SWITCH_STATUS_FALSE;
-               }
-       }
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Process DTMF press for a specific component
- * @param component to receive DTMF
- * @param session
- * @param dtmf
- * @param direction
- * @return SWITCH_STATUS_FALSE if component is done
- */
-static switch_status_t dtmf_component_on_dtmf(struct input_component *component, switch_core_session_t *session, const switch_dtmf_t *dtmf, switch_dtmf_direction_t direction)
-{
-       int is_term_digit = 0;
-       enum srgs_match_type match;
-       const char *interpretation = NULL;
-
-       is_term_digit = digit_test(component->term_digit, dtmf->digit);
-
-       if (!is_term_digit) {
-               component->digits[component->num_digits] = dtmf->digit;
-               component->num_digits++;
-               component->digits[component->num_digits] = '\0';
-               component->last_digit_time = switch_micro_time_now();
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Collected digits = \"%s\"\n", component->digits);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Collected term digit = \"%c\"\n", dtmf->digit);
-       }
-
-       match = srgs_grammar_match(component->grammar, component->digits, &interpretation);
-
-       if (is_term_digit) {
-               /* finalize result if terminating digit was pressed */
-               if (match == SMT_MATCH_PARTIAL) {
-                       match = SMT_NO_MATCH;
-               } else if (match == SMT_MATCH) {
-                       match = SMT_MATCH_END;
-               }
-       } else if (component->num_digits >= MAX_DTMF) {
-               /* maximum digits collected and still not a definitive match */
-               if (match != SMT_MATCH_END) {
-                       match = SMT_NO_MATCH;
-               }
-       }
-
-       switch (match) {
-               case SMT_MATCH:
-               case SMT_MATCH_PARTIAL: {
-                       /* need more digits */
-                       if (component->num_digits == 1) {
-                               send_barge_event(RAYO_COMPONENT(component));
-                       }
-                       break;
-               }
-               case SMT_NO_MATCH: {
-                       /* notify of no-match and remove input component */
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "NO MATCH = %s\n", component->digits);
-                       rayo_component_send_complete(RAYO_COMPONENT(component), INPUT_NOMATCH);
-
-                       /* let handler know component is done */
-                       return SWITCH_STATUS_FALSE;
-               }
-               case SMT_MATCH_END: {
-                       iks *result = nlsml_create_dtmf_match(component->digits, interpretation);
-                       /* notify of match and remove input component */
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "MATCH = %s\n", component->digits);
-                       send_match_event(RAYO_COMPONENT(component), result);
-                       iks_delete(result);
-
-                       /* let handler know component is done */
-                       return SWITCH_STATUS_FALSE;
-               }
-       }
-
-       /* still need more input */
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Process DTMF press on call
- */
-static switch_status_t input_handler_on_dtmf(switch_core_session_t *session, const switch_dtmf_t *dtmf, switch_dtmf_direction_t direction)
-{
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       struct input_handler *handler = (struct input_handler *)switch_channel_get_private(channel, RAYO_INPUT_COMPONENT_PRIVATE_VAR);
-
-       if (handler) {
-               switch_event_t *components_to_remove = NULL;
-               switch_hash_index_t *hi;
-
-               switch_mutex_lock(handler->mutex);
-
-               /* check input on each component */
-               for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(&hi)) {
-                       const void *jid;
-                       void *component;
-                       switch_core_hash_this(hi, &jid, NULL, &component);
-                       if (dtmf_component_on_dtmf(INPUT_COMPONENT(component), session, dtmf, direction) != SWITCH_STATUS_SUCCESS) {
-                               if (!components_to_remove) {
-                                       switch_event_create_subclass(&components_to_remove, SWITCH_EVENT_CLONE, NULL);
-                               }
-                               switch_event_add_header_string(components_to_remove, SWITCH_STACK_BOTTOM, "done", RAYO_JID(component));
-                       }
-               }
-
-               /* remove any finished components */
-               if (components_to_remove) {
-                       switch_event_header_t *component_to_remove = NULL;
-                       for (component_to_remove = components_to_remove->headers; component_to_remove; component_to_remove = component_to_remove->next) {
-                               switch_core_hash_delete(handler->dtmf_components, component_to_remove->value);
-                       }
-                       switch_event_destroy(&components_to_remove);
-               }
-
-               switch_mutex_unlock(handler->mutex);
-       }
-    return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Monitor for input
- */
-static switch_bool_t input_handler_bug_callback(switch_media_bug_t *bug, void *user_data, switch_abc_type_t type)
-{
-       switch_core_session_t *session = switch_core_media_bug_get_session(bug);
-       struct input_handler *handler = (struct input_handler *)user_data;
-       switch_hash_index_t *hi;
-
-       switch_mutex_lock(handler->mutex);
-
-       switch(type) {
-               case SWITCH_ABC_TYPE_INIT: {
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Adding DTMF callback\n");
-                       switch_core_event_hook_add_recv_dtmf(session, input_handler_on_dtmf);
-                       break;
-               }
-               case SWITCH_ABC_TYPE_READ_REPLACE: {
-                       switch_frame_t *rframe = switch_core_media_bug_get_read_replace_frame(bug);
-                       switch_event_t *components_to_remove = NULL;
-
-                       /* check timeout/stop on each component */
-                       for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(&hi)) {
-                               const void *jid;
-                               void *component;
-                               switch_core_hash_this(hi, &jid, NULL, &component);
-                               if (dtmf_component_check_timeout(INPUT_COMPONENT(component), session) != SWITCH_STATUS_SUCCESS) {
-                                       if (!components_to_remove) {
-                                               switch_event_create_subclass(&components_to_remove, SWITCH_EVENT_CLONE, NULL);
-                                       }
-                                       switch_event_add_header_string(components_to_remove, SWITCH_STACK_BOTTOM, "done", RAYO_JID(component));
-                               }
-                       }
-
-                       /* remove any finished components */
-                       if (components_to_remove) {
-                               switch_event_header_t *component_to_remove = NULL;
-                               for (component_to_remove = components_to_remove->headers; component_to_remove; component_to_remove = component_to_remove->next) {
-                                       switch_core_hash_delete(handler->dtmf_components, component_to_remove->value);
-                               }
-                               switch_event_destroy(&components_to_remove);
-                       }
-
-                       switch_core_media_bug_set_read_replace_frame(bug, rframe);
-                       break;
-               }
-               case SWITCH_ABC_TYPE_CLOSE:
-                       /* complete all components */
-                       for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(&hi)) {
-                               const void *jid;
-                               void *component;
-                               switch_core_hash_this(hi, &jid, NULL, &component);
-                               rayo_component_send_complete(RAYO_COMPONENT(component), COMPONENT_COMPLETE_HANGUP);
-                       }
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Removing DTMF callback\n");
-                       switch_core_event_hook_remove_recv_dtmf(session, input_handler_on_dtmf);
-                       switch_core_hash_destroy(&handler->dtmf_components);
-                       break;
-               default:
-                       break;
-       }
-       switch_mutex_unlock(handler->mutex);
-       return SWITCH_TRUE;
-}
-
-/**
- * Validate input request
- * @param input request to validate
- * @param error message
- * @return 0 if error, 1 if valid
- */
-static int validate_call_input(iks *input, const char **error)
-{
-       iks *grammar;
-       const char *content_type;
-       int has_grammar = 0;
-       int use_mrcp = 0;
-
-       /* validate input attributes */
-       if (!VALIDATE_RAYO_INPUT(input)) {
-               *error = "Bad <input> attrib value";
-               return 0;
-       }
-
-       use_mrcp = !strncmp("unimrcp", iks_find_attrib(input, "recognizer") ? iks_find_attrib(input, "recognizer") : globals.default_recognizer, 7);
-
-       /* validate grammar elements */
-       for (grammar = iks_find(input, "grammar"); grammar; grammar = iks_next_tag(grammar)) {
-               /* is this a grammar? */
-               if (strcmp("grammar", iks_name(grammar))) {
-                       continue;
-               }
-               content_type = iks_find_attrib(grammar, "content-type");
-               if (zstr(content_type)) {
-                       /* grammar URL */
-                       if (zstr(iks_find_attrib(grammar, "url"))) {
-                               *error = "url or content-type must be set";
-                               return 0;
-                       } else if (!use_mrcp) {
-                               *error = "url only supported with unimrcp recognizer";
-                               return 0;
-                       }
-               } else {
-                       /* inline grammar / only support srgs */
-                       if (!zstr(iks_find_attrib(grammar, "url"))) {
-                               *error = "url not allowed with content-type";
-                               return 0;
-                       } else if (strcmp("application/srgs+xml", content_type) && strcmp("text/plain", content_type)) {
-                               *error = "Unsupported content type";
-                               return 0;
-                       }
-
-                       /* missing inline grammar body */
-                       if (zstr(iks_find_cdata(input, "grammar"))) {
-                               *error = "Grammar content is missing";
-                               return 0;
-                       }
-               }
-               has_grammar = 1;
-       }
-
-       if (!has_grammar) {
-               *error = "Missing <grammar>";
-               return 0;
-       }
-
-       return 1;
-}
-
-static char *setup_grammars_pocketsphinx(struct input_component *component, switch_core_session_t *session, iks *input, const struct xmpp_error **stanza_error, const char **error_detail)
-{
-       const char *jsgf_path;
-       switch_stream_handle_t grammar = { 0 };
-       SWITCH_STANDARD_STREAM(grammar);
-
-       /* transform SRGS grammar to JSGF */
-       if (!(component->grammar = srgs_parse(globals.parser, iks_find_cdata(input, "grammar")))) {
-               *stanza_error = STANZA_ERROR_BAD_REQUEST;
-               *error_detail = "Failed to parse grammar body";
-               switch_safe_free(grammar.data);
-               return NULL;
-       }
-
-       jsgf_path = srgs_grammar_to_jsgf_file(component->grammar, SWITCH_GLOBAL_dirs.grammar_dir, "gram");
-       if (!jsgf_path) {
-               *stanza_error = STANZA_ERROR_BAD_REQUEST;
-               *error_detail = "Grammar conversion to JSGF error";
-               switch_safe_free(grammar.data);
-               return NULL;
-       }
-
-       /* build pocketsphinx grammar string */
-       grammar.write_function(&grammar,
-               "{start-input-timers=%s,no-input-timeout=%d,speech-timeout=%d,confidence-threshold=%d}%s",
-               component->start_timers ? "true" : "false",
-               component->initial_timeout,
-               component->max_silence,
-               (int)ceil(component->min_confidence * 100.0),
-               jsgf_path);
-
-       return (char *)grammar.data;
-}
-
-static char *setup_grammars_unimrcp(struct input_component *component, switch_core_session_t *session, iks *input, const struct xmpp_error **stanza_error, const char **error_detail)
-{
-       iks *grammar_tag;
-       switch_asr_handle_t *ah;
-       switch_stream_handle_t grammar_uri_list = { 0 };
-       SWITCH_STANDARD_STREAM(grammar_uri_list);
-
-       /* unlock handler mutex, otherwise deadlock will happen when switch_ivr_detect_speech_init adds a new media bug */
-       switch_mutex_unlock(component->handler->mutex);
-       ah = switch_core_session_alloc(session, sizeof(*ah));
-       if (switch_ivr_detect_speech_init(session, component->recognizer, "", ah) != SWITCH_STATUS_SUCCESS) {
-               switch_mutex_lock(component->handler->mutex);
-               *stanza_error = STANZA_ERROR_INTERNAL_SERVER_ERROR;
-               *error_detail = "Failed to initialize recognizer";
-               switch_safe_free(grammar_uri_list.data);
-               return NULL;
-       }
-       switch_mutex_lock(component->handler->mutex);
-
-       /* handle input config */
-       switch_core_asr_text_param(ah, "start-input-timers", component->start_timers ? "true" : "false");
-       switch_core_asr_text_param(ah, "confidence-threshold", switch_core_sprintf(RAYO_POOL(component), "%f", component->min_confidence));
-       switch_core_asr_text_param(ah, "sensitivity-level", switch_core_sprintf(RAYO_POOL(component), "%f", component->sensitivity));
-       if (component->initial_timeout > 0) {
-               switch_core_asr_text_param(ah, "no-input-timeout", switch_core_sprintf(RAYO_POOL(component), "%d", component->initial_timeout));
-       }
-       if (component->max_silence > 0) {
-               switch_core_asr_text_param(ah, "speech-complete-timeout", switch_core_sprintf(RAYO_POOL(component), "%d", component->max_silence));
-               switch_core_asr_text_param(ah, "speech-incomplete-timeout", switch_core_sprintf(RAYO_POOL(component), "%d", component->max_silence));
-       }
-       if (!zstr(component->language)) {
-               switch_core_asr_text_param(ah, "speech-language", component->language);
-       }
-       if (!strcmp(iks_find_attrib_soft(input, "mode"), "any") || !strcmp(iks_find_attrib_soft(input, "mode"), "dtmf")) {
-               /* set dtmf params */
-               if (component->inter_digit_timeout > 0) {
-                       switch_core_asr_text_param(ah, "dtmf-interdigit-timeout", switch_core_sprintf(RAYO_POOL(component), "%d", component->inter_digit_timeout));
-               }
-               if (component->term_digit) {
-                       switch_core_asr_text_param(ah, "dtmf-term-char", switch_core_sprintf(RAYO_POOL(component), "%c", component->term_digit));
-               }
-       }
-
-       /* override input configs w/ custom headers */
-       {
-               iks *header = NULL;
-               for (header = iks_find(input, "header"); header; header = iks_next_tag(header)) {
-                       if (!strcmp("header", iks_name(header))) {
-                               const char *name = iks_find_attrib_soft(header, "name");
-                               const char *value = iks_find_attrib_soft(header, "value");
-                               if (!zstr(name) && !zstr(value)) {
-                                       switch_core_asr_text_param(ah, (char *)name, value);
-                               }
-                       }
-               }
-       }
-
-       switch_core_asr_text_param(ah, "start-recognize", "false");
-       switch_core_asr_text_param(ah, "define-grammar", "true");
-       for (grammar_tag = iks_find(input, "grammar"); grammar_tag; grammar_tag = iks_next_tag(grammar_tag)) {
-               const char *grammar_name;
-               iks *grammar_cdata;
-               const char *grammar;
-
-               /* is this a grammar? */
-               if (strcmp("grammar", iks_name(grammar_tag))) {
-                       continue;
-               }
-
-               if (!zstr(iks_find_attrib_soft(grammar_tag, "content-type"))) {
-                       /* get the srgs contained in this grammar */
-                       if (!(grammar_cdata = iks_child(grammar_tag)) || iks_type(grammar_cdata) != IKS_CDATA) {
-                               *stanza_error = STANZA_ERROR_BAD_REQUEST;
-                               *error_detail = "Missing grammar";
-                               switch_safe_free(grammar_uri_list.data);
-                               return NULL;
-                       }
-                       grammar = switch_core_sprintf(RAYO_POOL(component), "inline:%s", iks_cdata(grammar_cdata));
-               } else {
-                       /* Grammar is at a URL */
-                       grammar = iks_find_attrib_soft(grammar_tag, "url");
-                       if (zstr(grammar)) {
-                               *stanza_error = STANZA_ERROR_BAD_REQUEST;
-                               *error_detail = "Missing grammar";
-                               switch_safe_free(grammar_uri_list.data);
-                               return NULL;
-                       }
-                       if (strncasecmp(grammar, "http", 4) && strncasecmp(grammar, "file", 4)) {
-                               *stanza_error = STANZA_ERROR_BAD_REQUEST;
-                               *error_detail = "Bad URL";
-                               switch_safe_free(grammar_uri_list.data);
-                               return NULL;
-                       }
-               }
-               grammar_name = switch_core_sprintf(RAYO_POOL(component), "grammar-%d", rayo_actor_seq_next(RAYO_ACTOR(component)));
-
-               /* DEFINE-GRAMMAR */
-               /* unlock handler mutex, otherwise deadlock will happen if switch_ivr_detect_speech_load_grammar removes the media bug */
-               switch_mutex_unlock(component->handler->mutex);
-               if (switch_ivr_detect_speech_load_grammar(session, grammar, grammar_name) != SWITCH_STATUS_SUCCESS) {
-                       switch_mutex_lock(component->handler->mutex);
-                       *stanza_error = STANZA_ERROR_INTERNAL_SERVER_ERROR;
-                       *error_detail = "Failed to load grammar";
-                       switch_safe_free(grammar_uri_list.data);
-                       return NULL;
-               }
-               switch_mutex_lock(component->handler->mutex);
-
-               /* add grammar to uri-list */
-               grammar_uri_list.write_function(&grammar_uri_list, "session:%s\r\n", grammar_name);
-       }
-       switch_core_asr_text_param(ah, "start-recognize", "true");
-       switch_core_asr_text_param(ah, "define-grammar", "false");
-
-       return (char *)grammar_uri_list.data;
-}
-
-static char *setup_grammars_unknown(struct input_component *component, switch_core_session_t *session, iks *input, const struct xmpp_error **stanza_error, const char **error_detail)
-{
-       switch_stream_handle_t grammar = { 0 };
-       SWITCH_STANDARD_STREAM(grammar);
-       grammar.write_function(&grammar, "%s", iks_find_cdata(input, "grammar"));
-       return (char *)grammar.data;
-}
-
-/**
- * Start call input on voice resource
- */
-static iks *start_call_voice_input(struct input_component *component, switch_core_session_t *session, iks *input, iks *iq, int barge_in)
-{
-       struct input_handler *handler = component->handler;
-       char *grammar = NULL;
-       const struct xmpp_error *stanza_error = NULL;
-       const char *error_detail = NULL;
-
-       if (component->speech_mode && handler->voice_component) {
-               /* don't allow multi voice input */
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error_detailed(iq, STANZA_ERROR_CONFLICT, "Multiple voice input is not allowed");
-       }
-
-       handler->voice_component = component;
-
-       if (zstr(component->recognizer)) {
-               component->recognizer = globals.default_recognizer;
-       }
-
-       /* if recognition engine is different, we can't handle this request */
-       if (!zstr(handler->last_recognizer) && strcmp(component->recognizer, handler->last_recognizer)) {
-               handler->voice_component = NULL;
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Must use the same recognizer for the entire call");
-       } else if (zstr(handler->last_recognizer)) {
-               handler->last_recognizer = switch_core_session_strdup(session, component->recognizer);
-       }
-
-       if (!strcmp(component->recognizer, "pocketsphinx")) {
-               grammar = setup_grammars_pocketsphinx(component, session, input, &stanza_error, &error_detail);
-       } else if (!strncmp(component->recognizer, "unimrcp", strlen("unimrcp"))) {
-               grammar = setup_grammars_unimrcp(component, session, input, &stanza_error, &error_detail);
-       } else {
-               grammar = setup_grammars_unknown(component, session, input, &stanza_error, &error_detail);
-       }
-
-       if (!grammar) {
-               handler->voice_component = NULL;
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error_detailed(iq, stanza_error, error_detail);
-       }
-
-       /* acknowledge command */
-       rayo_component_send_start(RAYO_COMPONENT(component), iq);
-
-       /* start speech detection */
-       switch_channel_set_variable(switch_core_session_get_channel(session), "fire_asr_events", "true");
-       /* unlock handler mutex, otherwise deadlock will happen if switch_ivr_detect_speech adds a media bug */
-       switch_mutex_unlock(handler->mutex);
-       if (switch_ivr_detect_speech(session, component->recognizer, grammar, "mod_rayo_grammar", "", NULL) != SWITCH_STATUS_SUCCESS) {
-               switch_mutex_lock(handler->mutex);
-               handler->voice_component = NULL;
-               rayo_component_send_complete(RAYO_COMPONENT(component), COMPONENT_COMPLETE_ERROR);
-       } else {
-               switch_mutex_lock(handler->mutex);
-       }
-       switch_safe_free(grammar);
-
-       return NULL;
-}
-
-/**
- * Start call input on DTMF resource
- */
-static iks *start_call_dtmf_input(struct input_component *component, switch_core_session_t *session, iks *input, iks *iq, int barge_in)
-{
-       /* parse the grammar */
-       if (!(component->grammar = srgs_parse(globals.parser, iks_find_cdata(input, "grammar")))) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Failed to parse grammar body\n");
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Failed to parse grammar body");
-       }
-
-       component->last_digit_time = switch_micro_time_now();
-
-       /* acknowledge command */
-       rayo_component_send_start(RAYO_COMPONENT(component), iq);
-
-       /* start dtmf input detection */
-       switch_core_hash_insert(component->handler->dtmf_components, RAYO_JID(component), component);
-
-       return NULL;
-}
-
-/**
- * Start call input for the given component
- * @param component the input or prompt component
- * @param session the session
- * @param input the input request
- * @param iq the original input/prompt request
- */
-static iks *start_call_input(struct input_component *component, switch_core_session_t *session, iks *input, iks *iq, int barge_in)
-{
-       iks *result = NULL;
-
-       /* set up input component for new detection */
-       struct input_handler *handler = (struct input_handler *)switch_channel_get_private(switch_core_session_get_channel(session), RAYO_INPUT_COMPONENT_PRIVATE_VAR);
-       if (!handler) {
-               /* create input component */
-               handler = switch_core_session_alloc(session, sizeof(*handler));
-               switch_mutex_init(&handler->mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
-               switch_core_hash_init(&handler->dtmf_components);
-               switch_channel_set_private(switch_core_session_get_channel(session), RAYO_INPUT_COMPONENT_PRIVATE_VAR, handler);
-               handler->last_recognizer = "";
-
-               /* fire up media bug to monitor lifecycle */
-               if (switch_core_media_bug_add(session, "rayo_input_component", NULL, input_handler_bug_callback, handler, 0, SMBF_READ_REPLACE, &handler->bug) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Failed to create input handler media bug\n");
-                       RAYO_RELEASE(component);
-                       RAYO_DESTROY(component);
-                       return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create input handler media bug");
-               }
-       }
-
-       switch_mutex_lock(handler->mutex);
-
-       if (!handler->dtmf_components) {
-               /* handler bug was destroyed */
-               switch_mutex_unlock(handler->mutex);
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Input handler media bug is closed\n");
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Input handler media bug is closed\n");
-       }
-
-       component->grammar = NULL;
-       component->num_digits = 0;
-       component->digits[0] = '\0';
-       component->stop = 0;
-       component->initial_timeout = iks_find_int_attrib(input, "initial-timeout");
-       component->inter_digit_timeout = iks_find_int_attrib(input, "inter-digit-timeout");
-       component->max_silence = iks_find_int_attrib(input, "max-silence");
-       component->min_confidence = iks_find_decimal_attrib(input, "min-confidence");
-       component->sensitivity = iks_find_decimal_attrib(input, "sensitivity");
-       component->barge_event = iks_find_bool_attrib(input, "barge-event");
-       component->start_timers = iks_find_bool_attrib(input, "start-timers");
-       component->term_digit = iks_find_char_attrib(input, "terminator");
-       component->recognizer = switch_core_strdup(RAYO_POOL(component), iks_find_attrib_soft(input, "recognizer"));
-       component->language = switch_core_strdup(RAYO_POOL(component), iks_find_attrib_soft(input, "language"));
-       component->handler = handler;
-       component->speech_mode = strcmp(iks_find_attrib_soft(input, "mode"), "dtmf");
-
-       if (component->speech_mode) {
-               result = start_call_voice_input(component, session, input, iq, barge_in);
-       } else {
-               result = start_call_dtmf_input(component, session, input, iq, barge_in);
-       }
-
-       switch_mutex_unlock(handler->mutex);
-
-       return result;
-}
-
-/**
- * Create input component id for session.
- * @param session requesting component
- * @param input request
- * @return the ID
- */
-static char *create_input_component_id(switch_core_session_t *session, iks *input)
-{
-       const char *mode = "unk";
-       if (input) {
-               mode = iks_find_attrib_soft(input, "mode");
-               if (!strcmp(mode, "dtmf")) {
-                       return NULL;
-               }
-               if (!strcmp(mode, "any")) {
-                       mode = "voice";
-               }
-       }
-       return switch_core_session_sprintf(session, "%s-input-%s", switch_core_session_get_uuid(session), mode);
-}
-
-/**
- * Release any resources consumed by this input component
- */
-static void input_component_cleanup(struct rayo_actor *component)
-{
-       if (INPUT_COMPONENT(component)->speech_mode) {
-               switch_core_session_t *session = switch_core_session_locate(component->parent->id);
-               if (session) {
-                       switch_ivr_stop_detect_speech(session);
-                       switch_core_session_rwunlock(session);
-               }
-       }
-}
-
-/**
- * Start execution of input component
- */
-static iks *start_call_input_component(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       iks *input = iks_find(iq, "input");
-       char *component_id = create_input_component_id(session, input);
-       switch_memory_pool_t *pool = NULL;
-       struct input_component *input_component = NULL;
-       const char *error = NULL;
-
-       /* Start CPA */
-       if (!strcmp(iks_find_attrib_soft(input, "mode"), "cpa")) {
-               return rayo_cpa_component_start(call, msg, session_data);
-       }
-
-       /* start input */
-       if (!validate_call_input(input, &error)) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, error);
-       }
-
-       switch_core_new_memory_pool(&pool);
-       input_component = switch_core_alloc(pool, sizeof(*input_component));
-       input_component = INPUT_COMPONENT(rayo_component_init_cleanup(RAYO_COMPONENT(input_component), pool, RAT_CALL_COMPONENT, "input", component_id, call, iks_find_attrib(iq, "from"), input_component_cleanup));
-       if (!input_component) {
-               switch_core_destroy_memory_pool(&pool);
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create input entity");
-       }
-       return start_call_input(input_component, session, input, iq, 0);
-}
-
-/**
- * Stop execution of input component
- */
-static iks *stop_call_input_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       struct input_component *input_component = INPUT_COMPONENT(component);
-
-       if (input_component && !input_component->stop) {
-               switch_core_session_t *session = switch_core_session_locate(component->parent->id);
-               if (session) {
-                       switch_mutex_lock(input_component->handler->mutex);
-                       input_component->stop = 1;
-                       if (input_component->speech_mode) {
-                               switch_mutex_unlock(input_component->handler->mutex);
-                               switch_ivr_stop_detect_speech(session);
-                               switch_mutex_lock(input_component->handler->mutex);
-                               rayo_component_send_complete(RAYO_COMPONENT(component), COMPONENT_COMPLETE_STOP);
-                       }
-                       switch_mutex_unlock(input_component->handler->mutex);
-                       switch_core_session_rwunlock(session);
-               }
-       }
-       return iks_new_iq_result(iq);
-}
-
-/**
- * Start input component timers
- */
-static iks *start_timers_call_input_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       struct input_component *input_component = INPUT_COMPONENT(component);
-       if (input_component) {
-               switch_core_session_t *session = switch_core_session_locate(component->parent->id);
-               if (session) {
-                       switch_mutex_lock(input_component->handler->mutex);
-                       if (input_component->speech_mode) {
-                               switch_mutex_unlock(input_component->handler->mutex);
-                               switch_ivr_detect_speech_start_input_timers(session);
-                               switch_mutex_lock(input_component->handler->mutex);
-                       } else {
-                               input_component->last_digit_time = switch_micro_time_now();
-                               input_component->start_timers = 1;
-                       }
-                       switch_mutex_unlock(input_component->handler->mutex);
-                       switch_core_session_rwunlock(session);
-               }
-       }
-       return iks_new_iq_result(iq);
-}
-
-/**
- * Get text / error from result
- */
-static const char *get_detected_speech_result_text(cJSON *result_json, double *confidence, const char **error_text)
-{
-       const char *result_text = NULL;
-       const char *text = cJSON_GetObjectCstr(result_json, "text");
-       if (confidence) {
-               *confidence = 0.0;
-       }
-       if (!zstr(text)) {
-               cJSON *json_confidence = cJSON_GetObjectItem(result_json, "confidence");
-               if (json_confidence && json_confidence->valuedouble > 0.0) {
-                       *confidence = json_confidence->valuedouble;
-               } else {
-                       *confidence = 0.99;
-               }
-               result_text = text;
-       } else if (error_text) {
-               *error_text = cJSON_GetObjectCstr(result_json, "error");
-       }
-       return result_text;
-}
-
-/**
- * Handle speech detection event
- */
-static void on_detected_speech_event(switch_event_t *event)
-{
-       const char *speech_type = switch_event_get_header(event, "Speech-Type");
-       char *event_str = NULL;
-       const char *uuid = switch_event_get_header(event, "Unique-ID");
-       switch_event_serialize(event, &event_str, SWITCH_FALSE);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s\n", event_str);
-       if (!speech_type || !uuid) {
-               return;
-       }
-
-       if (!strcasecmp("detected-speech", speech_type)) {
-               char *component_id = switch_mprintf("%s-input-voice", uuid);
-               struct rayo_component *component = RAYO_COMPONENT_LOCATE(component_id);
-
-               switch_safe_free(component_id);
-               if (component) {
-                       const char *result = switch_event_get_body(event);
-
-                       switch_mutex_lock(INPUT_COMPONENT(component)->handler->mutex);
-                       INPUT_COMPONENT(component)->handler->voice_component = NULL;
-                       switch_mutex_unlock(INPUT_COMPONENT(component)->handler->mutex);
-
-                       if (zstr(result)) {
-                               rayo_component_send_complete(component, INPUT_NOMATCH);
-                       } else {
-                               if (result[0] == '{') {
-                                       // internal FS JSON format
-                                       cJSON *json_result = cJSON_Parse(result);
-                                       if (json_result) {
-                                               // examine result to determine what happened
-                                               double confidence = 0.0;
-                                               const char *error_text = NULL;
-                                               const char *result_text = NULL;
-                                               result_text = get_detected_speech_result_text(json_result, &confidence, &error_text);
-                                               if (!zstr(result_text)) {
-                                                       // got result... send as NLSML
-                                                       iks *result = nlsml_create_match(result_text, NULL, "speech", (int)(confidence * 100.0));
-                                                       /* notify of match */
-                                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "MATCH = %s\n", result_text);
-                                                       send_match_event(RAYO_COMPONENT(component), result);
-                                                       iks_delete(result);
-                                               } else if (zstr(error_text)) {
-                                                       // unknown error
-                                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_WARNING, "No matching text nor error in result: %s!\n", result);
-                                                       rayo_component_send_complete(component, INPUT_NOMATCH);
-                                               } else if (!strcmp(error_text, "no_input")) {
-                                                       // no input error
-                                                       rayo_component_send_complete(component, INPUT_NOINPUT);
-                                               } else if (!strcmp(error_text, "no_match")) {
-                                                       // no match error
-                                                       rayo_component_send_complete(component, INPUT_NOMATCH);
-                                               } else {
-                                                       // generic error
-                                                       iks *response = rayo_component_create_complete_event(component, COMPONENT_COMPLETE_ERROR);
-                                                       iks *error = NULL;
-                                                       if ((error = iks_find(response, "complete"))) {
-                                                               if ((error = iks_find(error, "error"))) {
-                                                                       iks_insert_cdata(error, error_text, strlen(error_text));
-                                                               }
-                                                       }
-                                                       rayo_component_send_complete_event(component, response);
-                                               }
-                                               cJSON_Delete(json_result);
-                                       } else {
-                                               // failed to parse JSON result
-                                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_WARNING, "Failed to parse JSON result: %s!\n", result);
-                                               rayo_component_send_complete(component, INPUT_NOMATCH);
-                                       }
-                               } else if (strchr(result, '<')) {
-                                       /* got an XML result */
-                                       enum nlsml_match_type match_type = nlsml_parse(result, uuid);
-                                       switch (match_type) {
-                                       case NMT_NOINPUT:
-                                               rayo_component_send_complete(component, INPUT_NOINPUT);
-                                               break;
-                                       case NMT_MATCH: {
-                                               iks *result_xml = nlsml_normalize(result);
-                                               send_match_event(RAYO_COMPONENT(component), result_xml);
-                                               iks_delete(result_xml);
-                                               break;
-                                       }
-                                       case NMT_BAD_XML:
-                                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_WARNING, "Failed to parse NLSML result: %s!\n", result);
-                                               rayo_component_send_complete(component, INPUT_NOMATCH);
-                                               break;
-                                       case NMT_NOMATCH:
-                                               rayo_component_send_complete(component, INPUT_NOMATCH);
-                                               break;
-                                       default:
-                                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_CRIT, "Unknown NLSML match type: %i, %s!\n", match_type, result);
-                                               rayo_component_send_complete(component, INPUT_NOMATCH);
-                                               break;
-                                       }
-                               } else if (strstr(result, "002")) {
-                                       /* Completion-Cause: 002 no-input-timeout */
-                                       rayo_component_send_complete(component, INPUT_NOINPUT);
-                               } else if (strstr(result, "004") || strstr(result, "005") || strstr(result, "006") || strstr(result, "009") || strstr(result, "010")) {
-                                       /* Completion-Cause: 004 gram-load-failure */
-                                       /* Completion-Cause: 005 gram-comp-failure */
-                                       /* Completion-Cause: 006 error */
-                                       /* Completion-Cause: 009 uri-failure */
-                                       /* Completion-Cause: 010 language-unsupported */
-                                       iks *response = rayo_component_create_complete_event(component, COMPONENT_COMPLETE_ERROR);
-                                       const char *error_reason = switch_event_get_header(event, "ASR-Completion-Reason");
-                                       if (!zstr(error_reason)) {
-                                               iks *error;
-                                               if ((error = iks_find(response, "complete"))) {
-                                                       if ((error = iks_find(error, "error"))) {
-                                                               iks_insert_cdata(error, error_reason, strlen(error_reason));
-                                                       }
-                                               }
-                                       }
-                                       rayo_component_send_complete_event(component, response);
-                               } else {
-                                       /* assume no match */
-                                       /* Completion-Cause: 001 no-match */
-                                       /* Completion-Cause: 003 recognition-timeout */
-                                       /* Completion-Cause: 007 speech-too-early */
-                                       /* Completion-Cause: 008 too-much-speech-timeout */
-                                       rayo_component_send_complete(component, INPUT_NOMATCH);
-                               }
-                       }
-                       RAYO_RELEASE(component);
-               }
-       } else if (!strcasecmp("begin-speaking", speech_type)) {
-               char *component_id = switch_mprintf("%s-input-voice", uuid);
-               struct rayo_component *component = RAYO_COMPONENT_LOCATE(component_id);
-               switch_safe_free(component_id);
-               if (component && INPUT_COMPONENT(component)->barge_event) {
-                       send_barge_event(component);
-               }
-               RAYO_RELEASE(component);
-       } else if (!strcasecmp("closed", speech_type)) {
-               char *component_id = switch_mprintf("%s-input-voice", uuid);
-               struct rayo_component *component = RAYO_COMPONENT_LOCATE(component_id);
-               switch_safe_free(component_id);
-               if (component) {
-                       char *channel_state = switch_event_get_header(event, "Channel-State");
-                       switch_mutex_lock(INPUT_COMPONENT(component)->handler->mutex);
-                       INPUT_COMPONENT(component)->handler->voice_component = NULL;
-                       switch_mutex_unlock(INPUT_COMPONENT(component)->handler->mutex);
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Recognizer closed\n");
-                       if (channel_state && !strcmp("CS_HANGUP", channel_state)) {
-                               rayo_component_send_complete(component, COMPONENT_COMPLETE_HANGUP);
-                       } else {
-                               /* shouldn't get here... */
-                               rayo_component_send_complete(component, COMPONENT_COMPLETE_ERROR);
-                       }
-                       RAYO_RELEASE(component);
-               }
-       }
-       switch_safe_free(event_str);
-}
-
-/**
- * Process module XML configuration
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS on successful configuration
- */
-static switch_status_t do_config(switch_memory_pool_t *pool, const char *config_file)
-{
-       switch_xml_t cfg, xml;
-
-       /* set defaults */
-       globals.default_recognizer = "pocketsphinx";
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Configuring module\n");
-       if (!(xml = switch_xml_open_cfg(config_file, &cfg, NULL))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", config_file);
-               return SWITCH_STATUS_TERM;
-       }
-
-       /* get params */
-       {
-               switch_xml_t settings = switch_xml_child(cfg, "input");
-               if (settings) {
-                       switch_xml_t param;
-                       for (param = switch_xml_child(settings, "param"); param; param = param->next) {
-                               const char *var = switch_xml_attr_soft(param, "name");
-                               const char *val = switch_xml_attr_soft(param, "value");
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "param: %s = %s\n", var, val);
-                               if (!strcasecmp(var, "default-recognizer")) {
-                                       if (!zstr(val)) {
-                                               globals.default_recognizer = switch_core_strdup(pool, val);
-                                       }
-                               } else {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unsupported param: %s\n", var);
-                               }
-                       }
-               }
-       }
-
-       switch_xml_free(xml);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Initialize input component
- * @param module_interface
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_input_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       if (do_config(pool, config_file) != SWITCH_STATUS_SUCCESS) {
-               return SWITCH_STATUS_TERM;
-       }
-
-       srgs_init();
-       nlsml_init();
-
-       globals.parser = srgs_parser_new(NULL);
-
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_INPUT_NS":input", start_call_input_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "input", "set:"RAYO_EXT_NS":stop", stop_call_input_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "input", "set:"RAYO_INPUT_NS":start-timers", start_timers_call_input_component);
-       switch_event_bind("rayo_input_component", SWITCH_EVENT_DETECTED_SPEECH, SWITCH_EVENT_SUBCLASS_ANY, on_detected_speech_event, NULL);
-
-       return rayo_cpa_component_load(module_interface, pool, config_file);
-}
-
-/**
- * Shutdown input component
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_input_component_shutdown(void)
-{
-       switch_event_unbind_callback(on_detected_speech_event);
-
-       if (globals.parser) {
-               srgs_parser_destroy(globals.parser);
-       }
-       srgs_destroy();
-       nlsml_destroy();
-
-       rayo_cpa_component_shutdown();
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
-
diff --git a/src/mod/event_handlers/mod_rayo/rayo_output_component.c b/src/mod/event_handlers/mod_rayo/rayo_output_component.c
deleted file mode 100644 (file)
index 6ea607e..0000000
+++ /dev/null
@@ -1,1410 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * output_component.c -- Rayo output component implementation
- *
- */
-#include "rayo_components.h"
-#include "rayo_elements.h"
-
-/**
- * An output component
- */
-struct output_component {
-       /** component base class */
-       struct rayo_component base;
-       /** document to play */
-       iks *document;
-       /** where to start playing in document */
-       int start_offset_ms;
-       /** maximum time to play */
-       int max_time_ms;
-       /** silence between repeats */
-       int repeat_interval_ms;
-       /** number of times to repeat */
-       int repeat_times;
-       /** true if started paused */
-       switch_bool_t start_paused;
-       /** true if stopped */
-       int stop;
-       /** output renderer to use */
-       const char *renderer;
-       /** optional headers to pass to renderer */
-       const char *headers;
-       /** audio direction */
-       const char *direction;
-};
-
-#define OUTPUT_FINISH "finish", RAYO_OUTPUT_COMPLETE_NS
-#define OUTPUT_MAX_TIME "max-time", RAYO_OUTPUT_COMPLETE_NS
-
-#define OUTPUT_COMPONENT(x) ((struct output_component *)x)
-
-/**
- * Create new output component
- */
-static struct rayo_component *create_output_component(struct rayo_actor *actor, const char *type, iks *output, const char *client_jid)
-{
-       switch_memory_pool_t *pool;
-       struct output_component *output_component = NULL;
-
-       switch_core_new_memory_pool(&pool);
-       output_component = switch_core_alloc(pool, sizeof(*output_component));
-       output_component = OUTPUT_COMPONENT(rayo_component_init((struct rayo_component *)output_component, pool, type, "output", NULL, actor, client_jid));
-       if (output_component) {
-               output_component->document = iks_copy(output);
-               output_component->start_offset_ms = iks_find_int_attrib(output, "start-offset");
-               output_component->repeat_interval_ms = iks_find_int_attrib(output, "repeat-interval");
-               output_component->repeat_times = iks_find_int_attrib(output, "repeat-times");
-               output_component->max_time_ms = iks_find_int_attrib(output, "max-time");
-               output_component->start_paused = iks_find_bool_attrib(output, "start-paused");
-               output_component->renderer = switch_core_strdup(RAYO_POOL(output_component), iks_find_attrib_soft(output, "renderer"));
-               output_component->direction = strcmp(iks_find_attrib_soft(output, "direction"), "in") ? "m" : "mr";
-               output_component->headers = NULL;
-               /* get custom headers */
-               {
-                       switch_stream_handle_t headers = { 0 };
-                       iks *header = NULL;
-                       int first = 1;
-                       SWITCH_STANDARD_STREAM(headers);
-                       for (header = iks_find(output, "header"); header; header = iks_next_tag(header)) {
-                               if (!strcmp("header", iks_name(header))) {
-                                       const char *name = iks_find_attrib_soft(header, "name");
-                                       const char *value = iks_find_attrib_soft(header, "value");
-                                       if (!zstr(name) && !zstr(value)) {
-                                               headers.write_function(&headers, "%s%s=%s", first ? "{" : ",", name, value);
-                                               first = 0;
-                                       }
-                               }
-                       }
-                       if (headers.data && !first) {
-                               headers.write_function(&headers, "}");
-                               output_component->headers = switch_core_strdup(RAYO_POOL(output_component), (char *)headers.data);
-                       }
-                       switch_safe_free(headers.data);
-               }
-       } else {
-               switch_core_destroy_memory_pool(&pool);
-       }
-
-       return RAYO_COMPONENT(output_component);
-}
-
-/**
- * Start execution of call output component
- * @param component to start
- * @param session the session to output to
- * @param output the output request
- * @param iq the original request
- */
-static iks *start_call_output(struct rayo_component *component, switch_core_session_t *session, iks *output, iks *iq)
-{
-       switch_stream_handle_t stream = { 0 };
-
-       /* acknowledge command */
-       rayo_component_send_start(component, iq);
-
-       /* build playback command */
-       SWITCH_STANDARD_STREAM(stream);
-       stream.write_function(&stream, "{id=%s,session=%s,pause=%s",
-               RAYO_JID(component), switch_core_session_get_uuid(session),
-               OUTPUT_COMPONENT(component)->start_paused ? "true" : "false");
-       if (OUTPUT_COMPONENT(component)->max_time_ms > 0) {
-               stream.write_function(&stream, ",timeout=%i", OUTPUT_COMPONENT(component)->max_time_ms);
-       }
-       if (OUTPUT_COMPONENT(component)->start_offset_ms > 0) {
-               stream.write_function(&stream, ",start_offset_ms=%i", OUTPUT_COMPONENT(component)->start_offset_ms);
-       }
-       stream.write_function(&stream, "}fileman://rayo://%s", RAYO_JID(component));
-
-       if (switch_ivr_displace_session(session, stream.data, 0, OUTPUT_COMPONENT(component)->direction) == SWITCH_STATUS_SUCCESS) {
-               RAYO_RELEASE(component);
-       } else {
-               if (component->complete) {
-                       /* component is already destroyed */
-                       RAYO_RELEASE(component);
-               } else {
-                       /* need to destroy component */
-                       if (OUTPUT_COMPONENT(component)->document) {
-                               iks_delete(OUTPUT_COMPONENT(component)->document);
-                       }
-                       if (switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-                               rayo_component_send_complete(component, COMPONENT_COMPLETE_HANGUP);
-                       } else {
-                               rayo_component_send_complete(component, COMPONENT_COMPLETE_ERROR);
-                       }
-               }
-       }
-       switch_safe_free(stream.data);
-       return NULL;
-}
-
-/**
- * Start execution of call output component
- */
-static iks *start_call_output_component(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       struct rayo_component *output_component = NULL;
-       iks *output = iks_find(iq, "output");
-       iks *document = NULL;
-
-       /* validate output attributes */
-       if (!VALIDATE_RAYO_OUTPUT(output)) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       /* check if <document> exists */
-       document = iks_find(output, "document");
-       if (!document) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       output_component = create_output_component(call, RAT_CALL_COMPONENT, output, iks_find_attrib(iq, "from"));
-       if (!output_component) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create output entity");
-       }
-       return start_call_output(output_component, session, output, iq);
-}
-
-/**
- * Start execution of mixer output component
- */
-static iks *start_mixer_output_component(struct rayo_actor *mixer, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       struct rayo_component *component = NULL;
-       iks *output = iks_find(iq, "output");
-       iks *document = NULL;
-       switch_stream_handle_t stream = { 0 };
-
-       /* validate output attributes */
-       if (!VALIDATE_RAYO_OUTPUT(output)) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       /* check if <document> exists */
-       document = iks_find(output, "document");
-       if (!document) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       component = create_output_component(mixer, RAT_MIXER_COMPONENT, output, iks_find_attrib(iq, "from"));
-       if (!component) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create output entity");
-       }
-
-       /* build conference command */
-       SWITCH_STANDARD_STREAM(stream);
-       stream.write_function(&stream, "%s play ", rayo_mixer_get_name(RAYO_MIXER(mixer)), RAYO_ID(component));
-
-       stream.write_function(&stream, "{id=%s,pause=%s",
-               RAYO_JID(component),
-               OUTPUT_COMPONENT(component)->start_paused ? "true" : "false");
-       if (OUTPUT_COMPONENT(component)->max_time_ms > 0) {
-               stream.write_function(&stream, ",timeout=%i", OUTPUT_COMPONENT(component)->max_time_ms);
-       }
-       if (OUTPUT_COMPONENT(component)->start_offset_ms > 0) {
-               stream.write_function(&stream, ",start_offset_ms=%i", OUTPUT_COMPONENT(component)->start_offset_ms);
-       }
-       stream.write_function(&stream, "}fileman://rayo://%s", RAYO_JID(component));
-
-       /* acknowledge command */
-       rayo_component_send_start(component, iq);
-
-       rayo_component_api_execute_async(component, "conference", stream.data);
-
-       switch_safe_free(stream.data);
-       RAYO_RELEASE(component);
-
-       return NULL;
-}
-
-/**
- * Stop execution of output component
- */
-static iks *stop_output_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *result = NULL;
-       switch_core_session_t *session = NULL;
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s stop", RAYO_JID(component));
-       SWITCH_STANDARD_STREAM(stream);
-       OUTPUT_COMPONENT(component)->stop = 1;
-       if (!strcmp(RAYO_ACTOR(component)->type, RAT_CALL_COMPONENT)) {
-               session = (switch_core_session_t *)data;
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s stopping\n", RAYO_JID(component));
-       switch_api_execute("fileman", command, NULL, &stream);
-       if (!zstr((char *)stream.data) && !strncmp((char *)stream.data, "+OK", 3)) {
-               result = iks_new_iq_result(iq);
-       } else if (session && switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-               result = iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "call has ended");
-       } else if (!zstr((char *)stream.data)) {
-               result = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "%s", (char *)stream.data);
-       } else {
-               result = iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-       return result;
-}
-
-/**
- * Pause execution of output component
- */
-static iks *pause_output_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *result = NULL;
-       switch_core_session_t *session = NULL;
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s pause", RAYO_JID(component));
-       SWITCH_STANDARD_STREAM(stream);
-       if (!strcmp(RAYO_ACTOR(component)->type, RAT_CALL_COMPONENT)) {
-               session = (switch_core_session_t *)data;
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s pausing\n", RAYO_JID(component));
-       switch_api_execute("fileman", command, NULL, &stream);
-       if (!zstr((char *)stream.data) && !strncmp((char *)stream.data, "+OK", 3)) {
-               result = iks_new_iq_result(iq);
-       } else if (session && switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-               result = iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "call has ended");
-       } else if (!zstr((char *)stream.data)) {
-               result = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "%s", (char *)stream.data);
-       } else {
-               result = iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-       return result;
-}
-
-/**
- * Resume execution of output component
- */
-static iks *resume_output_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *result = NULL;
-       switch_core_session_t *session = NULL;
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s resume", RAYO_JID(component));
-       SWITCH_STANDARD_STREAM(stream);
-       if (!strcmp(RAYO_ACTOR(component)->type, RAT_CALL_COMPONENT)) {
-               session = (switch_core_session_t *)data;
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s resuming\n", RAYO_JID(component));
-       switch_api_execute("fileman", command, NULL, &stream);
-       if (!zstr((char *)stream.data) && !strncmp((char *)stream.data, "+OK", 3)) {
-               result = iks_new_iq_result(iq);
-       } else if (session && switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-               result = iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "call has ended");
-       } else if (!zstr((char *)stream.data)) {
-               result = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "%s", (char *)stream.data);
-       } else {
-               result = iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-       return result;
-}
-
-/**
- * Speed up execution of output component
- */
-static iks *speed_up_output_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *result = NULL;
-       switch_core_session_t *session = NULL;
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s speed:+", RAYO_JID(component));
-       SWITCH_STANDARD_STREAM(stream);
-       if (!strcmp(RAYO_ACTOR(component)->type, RAT_CALL_COMPONENT)) {
-               session = (switch_core_session_t *)data;
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s speeding up\n", RAYO_JID(component));
-       switch_api_execute("fileman", command, NULL, &stream);
-       if (!zstr((char *)stream.data) && !strncmp((char *)stream.data, "+OK", 3)) {
-               result = iks_new_iq_result(iq);
-       } else if (session && switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-               result = iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "call has ended");
-       } else if (!zstr((char *)stream.data)) {
-               result = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "%s", (char *)stream.data);
-       } else {
-               result = iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-       return result;
-}
-
-/**
- * Slow down execution of output component
- */
-static iks *speed_down_output_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *result = NULL;
-       switch_core_session_t *session = NULL;
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s speed:-", RAYO_JID(component));
-       SWITCH_STANDARD_STREAM(stream);
-       if (!strcmp(RAYO_ACTOR(component)->type, RAT_CALL_COMPONENT)) {
-               session = (switch_core_session_t *)data;
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s slowing down\n", RAYO_JID(component));
-       switch_api_execute("fileman", command, NULL, &stream);
-       if (!zstr((char *)stream.data) && !strncmp((char *)stream.data, "+OK", 3)) {
-               result = iks_new_iq_result(iq);
-       } else if (session && switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-               result = iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "call has ended");
-       } else if (!zstr((char *)stream.data)) {
-               result = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "%s", (char *)stream.data);
-       } else {
-               result = iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-       return result;
-}
-
-/**
- * Increase volume of output component
- */
-static iks *volume_up_output_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *result = NULL;
-       switch_core_session_t *session = NULL;
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s volume:+", RAYO_JID(component));
-       SWITCH_STANDARD_STREAM(stream);
-       if (!strcmp(RAYO_ACTOR(component)->type, RAT_CALL_COMPONENT)) {
-               session = (switch_core_session_t *)data;
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s increasing volume\n", RAYO_JID(component));
-       switch_api_execute("fileman", command, NULL, &stream);
-       if (!zstr((char *)stream.data) && !strncmp((char *)stream.data, "+OK", 3)) {
-               result = iks_new_iq_result(iq);
-       } else if (session && switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-               result = iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "call has ended");
-       } else if (!zstr((char *)stream.data)) {
-               result = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "%s", (char *)stream.data);
-       } else {
-               result = iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-       return result;
-}
-
-/**
- * Lower volume of output component
- */
-static iks *volume_down_output_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *result = NULL;
-       switch_core_session_t *session = NULL;
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s volume:-", RAYO_JID(component));
-       SWITCH_STANDARD_STREAM(stream);
-       if (!strcmp(RAYO_ACTOR(component)->type, RAT_CALL_COMPONENT)) {
-               session = (switch_core_session_t *)data;
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s lowering volume\n", RAYO_JID(component));
-       switch_api_execute("fileman", command, NULL, &stream);
-       if (!zstr((char *)stream.data) && !strncmp((char *)stream.data, "+OK", 3)) {
-               result = iks_new_iq_result(iq);
-       } else if (session && switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-               result = iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "call has ended");
-       } else if (!zstr((char *)stream.data)) {
-               result = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "%s", (char *)stream.data);
-       } else {
-               result = iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-       return result;
-}
-
-/**
- * Seek output component
- */
-static iks *seek_output_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *seek = iks_find(iq, "seek");
-
-       if (VALIDATE_RAYO_OUTPUT_SEEK(seek)) {
-               iks *result = NULL;
-               switch_core_session_t *session = NULL;
-               int is_forward = !strcmp("forward", iks_find_attrib(seek, "direction"));
-               int amount_ms = iks_find_int_attrib(seek, "amount");
-               char *command = switch_mprintf("%s seek:%s%i", RAYO_JID(component),
-                       is_forward ? "+" : "-", amount_ms);
-               switch_stream_handle_t stream = { 0 };
-               SWITCH_STANDARD_STREAM(stream);
-               if (!strcmp(RAYO_ACTOR(component)->type, RAT_CALL_COMPONENT)) {
-                       session = (switch_core_session_t *)data;
-               }
-
-               switch_api_execute("fileman", command, NULL, &stream);
-               if (!zstr((char *)stream.data) && !strncmp((char *)stream.data, "+OK", 3)) {
-                       result = iks_new_iq_result(iq);
-               } else if (session && switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-                       result = iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "call has ended");
-               } else if (!zstr((char *)stream.data)) {
-                       result = iks_new_error_detailed_printf(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "%s", (char *)stream.data);
-               } else {
-                       result = iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-               }
-               switch_safe_free(stream.data);
-               switch_safe_free(command);
-
-               return result;
-       }
-       return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-}
-
-/**
- * Rayo document playback state
- */
-struct rayo_file_context {
-       /** handle to current file */
-       switch_file_handle_t fh;
-       /** current document being played */
-       iks *cur_doc;
-       /** current file string being played */
-       char *ssml;
-       /** The component */
-       struct rayo_component *component;
-       /** number of times played */
-       int play_count;
-       /** have any files successfully opened? */
-       int could_open;
-};
-
-/**
- * open next file for reading
- * @param handle the file handle
- */
-static switch_status_t next_file(switch_file_handle_t *handle)
-{
-       int loops = 0;
-       struct rayo_file_context *context = handle->private_info;
-       struct output_component *output = context->component ? OUTPUT_COMPONENT(context->component) : NULL;
-
-       if (!output) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing output component!\n");
-               return SWITCH_STATUS_FALSE;
-       }
-
-  top:
-
-       if (switch_test_flag((&context->fh), SWITCH_FILE_OPEN)) {
-               switch_core_file_close(&context->fh);
-       }
-
-       if (switch_test_flag(handle, SWITCH_FILE_FLAG_WRITE)) {
-               /* unsupported */
-               return SWITCH_STATUS_FALSE;
-       }
-
-       if (!context->cur_doc) {
-               context->cur_doc = iks_find(output->document, "document");
-               if (!context->cur_doc) {
-                       iks_delete(output->document);
-                       output->document = NULL;
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Missing <document>\n");
-                       return SWITCH_STATUS_FALSE;
-               }
-       } else {
-               context->cur_doc = iks_next_tag(context->cur_doc);
-       }
-
-       /* done? */
-       if (!context->cur_doc) {
-               if (context->could_open && ++loops < 2 && (output->repeat_times == 0 || ++context->play_count < output->repeat_times)) {
-                       /* repeat all document(s) */
-                       if (!output->repeat_interval_ms) {
-                               goto top;
-                       }
-               } else {
-                       /* no more files to play */
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Done playing\n");
-                       return SWITCH_STATUS_FALSE;
-               }
-       }
-
-       if (!context->cur_doc) {
-               /* play silence between repeats */
-               switch_safe_free(context->ssml);
-               context->ssml = switch_mprintf("silence_stream://%i", output->repeat_interval_ms);
-       } else {
-               /* play next document */
-               iks *speak = NULL;
-
-               switch_safe_free(context->ssml);
-               context->ssml = NULL;
-               speak = iks_find(context->cur_doc, "speak");
-               if (speak) {
-                       /* <speak> is child node */
-                       char *ssml_str = iks_string(NULL, speak);
-                       if (zstr(output->renderer)) {
-                               /* FS must parse the SSML */
-                               context->ssml = switch_mprintf("ssml://%s", ssml_str);
-                       } else {
-                               /* renderer will parse the SSML */
-                               if (!zstr(output->headers) && !strncmp("unimrcp", output->renderer, 7)) {
-                                       /* pass MRCP headers */
-                                       context->ssml = switch_mprintf("tts://%s||%s%s", output->renderer, output->headers, ssml_str);
-                               } else {
-                                       context->ssml = switch_mprintf("tts://%s||%s", output->renderer, ssml_str);
-                               }
-                       }
-                       iks_free(ssml_str);
-               } else if (iks_has_children(context->cur_doc)) {
-                       /* check if <speak> is in CDATA */
-                       const char *ssml_str = NULL;
-                       iks *ssml = iks_child(context->cur_doc);
-                       if (ssml && iks_type(ssml) == IKS_CDATA) {
-                               ssml_str = iks_cdata(ssml);
-                       }
-                       if (zstr(ssml_str)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Missing <document> CDATA\n");
-                               return SWITCH_STATUS_FALSE;
-                       }
-                       if (zstr(output->renderer)) {
-                               /* FS must parse the SSML */
-                               context->ssml = switch_mprintf("ssml://%s", ssml_str);
-                       } else {
-                               /* renderer will parse the SSML */
-                               if (!zstr(output->headers) && !strncmp("unimrcp", output->renderer, 7)) {
-                                       /* pass MRCP headers */
-                                       context->ssml = switch_mprintf("tts://%s||%s%s", output->renderer, output->headers, ssml_str);
-                               } else {
-                                       context->ssml = switch_mprintf("tts://%s||%s", output->renderer, ssml_str);
-                               }
-                       }
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Missing <speak>\n");
-                       return SWITCH_STATUS_FALSE;
-               }
-       }
-       if (switch_core_file_open(&context->fh, context->ssml, handle->channels, handle->samplerate, handle->flags, NULL) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Failed to open %s\n", context->ssml);
-               goto top;
-       } else {
-               context->could_open = 1;
-       }
-
-       handle->samples = context->fh.samples;
-       handle->format = context->fh.format;
-       handle->sections = context->fh.sections;
-       handle->seekable = context->fh.seekable;
-       handle->speed = context->fh.speed;
-       handle->vol = context->fh.vol;
-       handle->offset_pos = context->fh.offset_pos;
-       handle->interval = context->fh.interval;
-
-       if (switch_test_flag((&context->fh), SWITCH_FILE_NATIVE)) {
-               switch_set_flag_locked(handle, SWITCH_FILE_NATIVE);
-       } else {
-               switch_clear_flag_locked(handle, SWITCH_FILE_NATIVE);
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Transforms Rayo document into sub-format and opens file_string.
- * @param handle
- * @param path the inline Rayo document
- * @return SWITCH_STATUS_SUCCESS if opened
- */
-static switch_status_t rayo_file_open(switch_file_handle_t *handle, const char *path)
-{
-       switch_status_t status = SWITCH_STATUS_FALSE;
-       struct rayo_file_context *context = switch_core_alloc(handle->memory_pool, sizeof(*context));
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Got path %s\n", path);
-
-       context->component = RAYO_COMPONENT_LOCATE(path);
-
-       if (context->component) {
-               handle->private_info = context;
-               context->cur_doc = NULL;
-               context->play_count = 0;
-               context->could_open = 0;
-               status = next_file(handle);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "File error! %s\n", path);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       if (status != SWITCH_STATUS_SUCCESS && context->component) {
-               /* complete error event will be sent by calling thread */
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Status = %i\n", status);
-               RAYO_RELEASE(context->component);
-       }
-
-       return status;
-}
-
-/**
- * Close SSML document.
- * @param handle
- * @return SWITCH_STATUS_SUCCESS
- */
-static switch_status_t rayo_file_close(switch_file_handle_t *handle)
-{
-       struct rayo_file_context *context = (struct rayo_file_context *)handle->private_info;
-
-       if (context && context->component) {
-               struct output_component *output = OUTPUT_COMPONENT(context->component);
-
-               /* send completion and destroy */
-               if (!strcmp(RAYO_ACTOR(context->component)->type, RAT_CALL_COMPONENT)) {
-                       /* call output... check for hangup */
-                       switch_core_session_t *session = switch_core_session_locate(RAYO_ACTOR(context->component)->parent->id);
-                       if (session) {
-                               if (switch_channel_get_state(switch_core_session_get_channel(session)) >= CS_HANGUP) {
-                                       rayo_component_send_complete(context->component, COMPONENT_COMPLETE_HANGUP);
-                               } else if (output->stop) {
-                                       rayo_component_send_complete(context->component, COMPONENT_COMPLETE_STOP);
-                               } else {
-                                       rayo_component_send_complete(context->component, OUTPUT_FINISH);
-                               }
-                               switch_core_session_rwunlock(session);
-                       } else {
-                               /* session is gone */
-                               rayo_component_send_complete(context->component, COMPONENT_COMPLETE_HANGUP);
-                       }
-               } else if (output->stop) {
-                       rayo_component_send_complete(context->component, COMPONENT_COMPLETE_STOP);
-               } else {
-                       /* mixer output... finished */
-                       rayo_component_send_complete(context->component, OUTPUT_FINISH);
-               }
-               /* TODO timed out */
-
-               /* cleanup internals */
-               switch_safe_free(context->ssml);
-               context->ssml = NULL;
-               if (output->document) {
-                       iks_delete(output->document);
-                       output->document = NULL;
-               }
-
-               /* close SSML file */
-               if (switch_test_flag((&context->fh), SWITCH_FILE_OPEN)) {
-                       return switch_core_file_close(&context->fh);
-               }
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Read from SSML document
- * @param handle
- * @param data
- * @param len
- * @return
- */
-static switch_status_t rayo_file_read(switch_file_handle_t *handle, void *data, size_t *len)
-{
-       switch_status_t status;
-       struct rayo_file_context *context = (struct rayo_file_context *)handle->private_info;
-       size_t llen = *len;
-
-       if (OUTPUT_COMPONENT(context->component)->stop) {
-               return SWITCH_STATUS_FALSE;
-       } else {
-               status = switch_core_file_read(&context->fh, data, len);
-               if (status != SWITCH_STATUS_SUCCESS) {
-                       if ((status = next_file(handle)) != SWITCH_STATUS_SUCCESS) {
-                               return status;
-                       }
-                       *len = llen;
-                       status = switch_core_file_read(&context->fh, data, len);
-               }
-       }
-
-       return status;
-}
-
-/**
- * Seek file
- */
-static switch_status_t rayo_file_seek(switch_file_handle_t *handle, unsigned int *cur_sample, int64_t samples, int whence)
-{
-       struct rayo_file_context *context = handle->private_info;
-
-       if (samples == 0 && whence == SWITCH_SEEK_SET) {
-               /* restart from beginning */
-               context->cur_doc = NULL;
-               context->play_count = 0;
-               return next_file(handle);
-       }
-
-       if (!handle->seekable) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "File is not seekable\n");
-               return SWITCH_STATUS_NOTIMPL;
-       }
-
-       return switch_core_file_seek(&context->fh, cur_sample, samples, whence);
-}
-
-/**
- * Manages access to fileman controls
- */
-struct {
-       /** synchronizes access to fileman hash */
-       switch_mutex_t *mutex;
-       /** fileman mapped by id */
-       switch_hash_t *hash;
-} fileman_globals;
-
-#define FILE_STARTBYTES 1024 * 32
-#define FILE_BLOCKSIZE 1024 * 8
-#define FILE_BUFSIZE 1024 * 64
-
-/**
- * Fileman playback state
- */
-struct fileman_file_context {
-       /** handle to current file */
-       switch_file_handle_t fh;
-       /** file buffer */
-       int16_t *abuf;
-       /** end of file */
-       int eof;
-       /** maximum size of a packet in 2-byte samples */
-       switch_size_t max_frame_len;
-       /** optional session UUID */
-       const char *uuid;
-       /** fileman control ID */
-       const char *id;
-       /** done flag */
-       int done;
-};
-
-/**
- * Wraps file with interface that can be controlled by fileman flags
- * @param handle
- * @param path the file to play
- * @return SWITCH_STATUS_SUCCESS if opened
- */
-static switch_status_t fileman_file_open(switch_file_handle_t *handle, const char *path)
-{
-       int start_offset_ms = 0;
-       switch_status_t status = SWITCH_STATUS_FALSE;
-       struct fileman_file_context *context = switch_core_alloc(handle->memory_pool, sizeof(*context));
-       handle->private_info = context;
-
-       if (handle->params) {
-               const char *id = switch_event_get_header(handle->params, "id");
-               const char *uuid = switch_event_get_header(handle->params, "session");
-               const char *start_offset_ms_str = switch_event_get_header(handle->params, "start_offset_ms");
-               if (!zstr(id)) {
-                       context->id = switch_core_strdup(handle->memory_pool, id);
-               }
-               if (!zstr(uuid)) {
-                       context->uuid = switch_core_strdup(handle->memory_pool, uuid);
-               }
-               if (!zstr(start_offset_ms_str) && switch_is_number(start_offset_ms_str)) {
-                       start_offset_ms = atoi(start_offset_ms_str);
-                       if (start_offset_ms < 0) {
-                               start_offset_ms = 0;
-                       }
-               }
-       }
-
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Got path %s\n", path);
-
-       if ((status = switch_core_file_open(&context->fh, path, handle->channels, handle->samplerate, handle->flags, NULL)) != SWITCH_STATUS_SUCCESS) {
-               return status;
-       }
-
-       /* set up handle for external control */
-       if (!context->id) {
-               /* use filename as ID */
-               context->id = switch_core_strdup(handle->memory_pool, path);
-       }
-       switch_mutex_lock(fileman_globals.mutex);
-       if (!switch_core_hash_find(fileman_globals.hash, context->id)) {
-               switch_core_hash_insert(fileman_globals.hash, context->id, handle);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_WARNING, "Duplicate fileman ID: %s\n", context->id);
-               return SWITCH_STATUS_FALSE;
-       }
-       switch_mutex_unlock(fileman_globals.mutex);
-
-       context->max_frame_len = (handle->samplerate / 1000 * SWITCH_MAX_INTERVAL);
-       switch_zmalloc(context->abuf, FILE_STARTBYTES * sizeof(*context->abuf));
-
-       if (!context->fh.audio_buffer) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Create audio buffer\n");
-               switch_buffer_create_dynamic(&context->fh.audio_buffer, FILE_BLOCKSIZE, FILE_BUFSIZE, 0);
-               switch_assert(context->fh.audio_buffer);
-       }
-
-       handle->samples = context->fh.samples;
-       handle->format = context->fh.format;
-       handle->sections = context->fh.sections;
-       handle->seekable = context->fh.seekable;
-       handle->speed = context->fh.speed;
-       handle->vol = context->fh.vol;
-       handle->offset_pos = context->fh.offset_pos;
-       handle->interval = context->fh.interval;
-
-       if (switch_test_flag((&context->fh), SWITCH_FILE_NATIVE)) {
-               switch_set_flag_locked(handle, SWITCH_FILE_NATIVE);
-       } else {
-               switch_clear_flag_locked(handle, SWITCH_FILE_NATIVE);
-       }
-
-       if (handle->params && switch_true(switch_event_get_header(handle->params, "pause"))) {
-               switch_set_flag_locked(handle, SWITCH_FILE_PAUSE);
-       }
-
-       if (handle->seekable && start_offset_ms) {
-               unsigned int pos = 0;
-               int32_t target = start_offset_ms * (handle->samplerate / 1000);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "seek to position %d\n", target);
-               switch_core_file_seek(&context->fh, &pos, target, SEEK_SET);
-       }
-
-       return status;
-}
-
-/**
- * Close file.
- * @param handle
- * @return SWITCH_STATUS_SUCCESS
- */
-static switch_status_t fileman_file_close(switch_file_handle_t *handle)
-{
-       struct fileman_file_context *context = (struct fileman_file_context *)handle->private_info;
-       switch_file_handle_t *fh = &context->fh;
-
-       if (context->id) {
-               switch_mutex_lock(fileman_globals.mutex);
-               switch_core_hash_delete(fileman_globals.hash, context->id);
-               switch_mutex_unlock(fileman_globals.mutex);
-       }
-
-       if (switch_test_flag(fh, SWITCH_FILE_OPEN)) {
-               free(context->abuf);
-
-               if (fh->audio_buffer) {
-                       switch_buffer_destroy(&fh->audio_buffer);
-               }
-
-               if (fh->sp_audio_buffer) {
-                       switch_buffer_destroy(&fh->sp_audio_buffer);
-               }
-               return switch_core_file_close(fh);
-       }
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Write to file
- * @param handle
- * @param data
- * @param len
- * @return
- */
-static switch_status_t fileman_file_write(switch_file_handle_t *handle, void *data, size_t *len)
-{
-       struct fileman_file_context *context = (struct fileman_file_context *)handle->private_info;
-       switch_file_handle_t *fh = &context->fh;
-       if (!switch_test_flag(handle, SWITCH_FILE_PAUSE)) {
-               return switch_core_file_write(fh, data, len);
-       }
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Read from file
- * @param handle
- * @param data
- * @param len
- * @return
- */
-static switch_status_t fileman_file_read(switch_file_handle_t *handle, void *data, size_t *len)
-{
-       struct fileman_file_context *context = (struct fileman_file_context *)handle->private_info;
-       switch_file_handle_t *fh = &context->fh;
-       switch_status_t status = SWITCH_STATUS_SUCCESS;
-       switch_size_t o_len = 0;
-
-       /* anything called "_len" is measured in 2-byte samples */
-
-       if (switch_test_flag(fh, SWITCH_FILE_NATIVE)) {
-               return switch_core_file_read(fh, data, len);
-       }
-
-       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "len = %"SWITCH_SIZE_T_FMT"\n", *len);
-       if (*len > context->max_frame_len) {
-               *len = context->max_frame_len;
-       }
-
-       for (;;) {
-               int do_speed = 1;
-               size_t read_bytes = 0;
-
-               if (context->done) {
-                       /* done with this file */
-                       status = SWITCH_STATUS_FALSE;
-                       goto done;
-               } else if (switch_test_flag(handle, SWITCH_FILE_PAUSE)) {
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Read pause frame\n");
-                       memset(context->abuf, 255, *len * 2);
-                       do_speed = 0;
-                       o_len = *len;
-               } else if (fh->sp_audio_buffer && (context->eof || (switch_buffer_inuse(fh->sp_audio_buffer) > (switch_size_t) (*len * 2)))) {
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Read speed frame\n");
-                       /* get next speed frame */
-                       if (!(read_bytes = switch_buffer_read(fh->sp_audio_buffer, context->abuf, *len * 2))) {
-                               /* This is the reverse of what happens in switch_ivr_play_file... i think that implementation is wrong */
-                               if (context->eof) {
-                                       /* done with file */
-                                       status = SWITCH_STATUS_FALSE;
-                                       goto done;
-                               } else {
-                                       /* try again to fetch frame */
-                                       continue;
-                               }
-                       }
-
-                       /* pad short frame with silence */
-                       if (read_bytes < *len * 2) {
-                               //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Padding speed frame %"SWITCH_SIZE_T_FMT" bytes\n", (context->frame_len * 2) - read_bytes);
-                               memset(context->abuf + read_bytes, 255, (*len * 2) - read_bytes);
-                       }
-                       o_len = *len;
-                       do_speed = 0;
-               } else if (fh->audio_buffer && (context->eof || (switch_buffer_inuse(fh->audio_buffer) > (switch_size_t) (*len * 2)))) {
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "(2) Read audio frame\n");
-                       /* get next file frame */
-                       if (!(read_bytes = switch_buffer_read(fh->audio_buffer, context->abuf, *len * 2))) {
-                               if (context->eof) {
-                                       /* done with file */
-                                       status = SWITCH_STATUS_FALSE;
-                                       goto done;
-                               } else {
-                                       /* try again to fetch frame */
-                                       continue;
-                               }
-                       }
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "(2) Read audio frame %"SWITCH_SIZE_T_FMT" bytes\n", read_bytes);
-                       fh->offset_pos += read_bytes / 2;
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "(2) file pos = %i\n", fh->offset_pos);
-
-                       /* pad short frame with silence */
-                       if (read_bytes < (*len * 2)) {
-                               //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Padding audio frame %"SWITCH_SIZE_T_FMT" bytes\n", (context->frame_len * 2) - read_bytes);
-                               memset(context->abuf + read_bytes, 255, (*len * 2) - read_bytes);
-                       }
-
-                       o_len = *len;
-               } else {
-                       if (context->eof) {
-                               /* done with file */
-                               status = SWITCH_STATUS_FALSE;
-                               goto done;
-                       }
-                       o_len = FILE_STARTBYTES / 2;
-                       if (switch_core_file_read(fh, context->abuf, &o_len) != SWITCH_STATUS_SUCCESS) {
-                               context->eof++;
-                               /* at end of file... need to clear buffers before giving up */
-                               continue;
-                       }
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Read file %"SWITCH_SIZE_T_FMT" bytes\n", o_len * 2);
-
-                       /* add file data to audio bufer */
-                       switch_buffer_write(fh->audio_buffer, context->abuf, o_len * 2);
-
-                       read_bytes = switch_buffer_read(fh->audio_buffer, context->abuf, *len * 2);
-                       o_len = read_bytes / 2;
-                       fh->offset_pos += o_len;
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Read audio frame %"SWITCH_SIZE_T_FMT" bytes\n", read_bytes);
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "file pos = %i\n", fh->offset_pos);
-               }
-
-               if (o_len <= 0) {
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "o_len <= 0 (%"SWITCH_SIZE_T_FMT")\n", o_len);
-                       status = SWITCH_STATUS_FALSE;
-                       goto done;
-               }
-
-               /* limit speed... there is a .25 factor change in packet size relative to original packet size for each increment.
-                  Too many increments and we cause badness when (factor * speed * o_len) > o_len */
-               if (handle->speed > 2) {
-                       handle->speed = 2;
-               } else if (handle->speed < -2) {
-                       handle->speed = -2;
-               }
-
-               if (switch_test_flag(fh, SWITCH_FILE_SEEK)) {
-                       /* file position has changed flush the buffer */
-                       switch_buffer_zero(fh->audio_buffer);
-                       switch_clear_flag_locked(fh, SWITCH_FILE_SEEK);
-               }
-
-               /* generate speed frames */
-               if (handle->speed && do_speed) {
-                       float factor = 0.25f * abs(handle->speed);
-                       switch_size_t new_len, supplement_len, step_len;
-                       short *bp = context->abuf;
-                       switch_size_t wrote_len = 0;
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Generate speed frame (%i)\n", handle->speed);
-
-                       supplement_len = (int) (factor * o_len);
-                       if (!supplement_len) {
-                               supplement_len = 1;
-                       }
-                       new_len = (handle->speed > 0) ? o_len - supplement_len : o_len + supplement_len;
-
-                       step_len = (handle->speed > 0) ? (new_len / supplement_len) : (o_len / supplement_len);
-
-                       if (!fh->sp_audio_buffer) {
-                               switch_buffer_create_dynamic(&fh->sp_audio_buffer, 1024, 1024, 0);
-                       }
-
-                       while ((wrote_len + step_len) < new_len) {
-                               switch_buffer_write(fh->sp_audio_buffer, bp, step_len * 2);
-                               wrote_len += step_len;
-                               bp += step_len;
-                               if (handle->speed > 0) {
-                                       bp++;
-                               } else {
-                                       float f;
-                                       short s;
-                                       f = (float) (*bp + *(bp + 1) + *(bp - 1));
-                                       f /= 3;
-                                       s = (short) f;
-                                       switch_buffer_write(fh->sp_audio_buffer, &s, 2);
-                                       wrote_len++;
-                               }
-                       }
-                       if (wrote_len < new_len) {
-                               switch_size_t r_len = new_len - wrote_len;
-                               switch_buffer_write(fh->sp_audio_buffer, bp, r_len * 2);
-                       }
-                       continue;
-               }
-
-               /* adjust volume on frame */
-               if (handle->vol) {
-                       //switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Adjust volume to = %i\n", handle->vol);
-                       switch_change_sln_volume(context->abuf, *len, handle->vol);
-               }
-               break;
-       }
-
-done:
-
-       /* copy frame over to return to caller */
-       memcpy(data, context->abuf, *len * 2);
-       handle->offset_pos = context->fh.offset_pos;
-
-       return status;
-}
-
-/**
- * Seek file
- */
-static switch_status_t fileman_file_seek(switch_file_handle_t *handle, unsigned int *cur_sample, int64_t samples, int whence)
-{
-       struct fileman_file_context *context = handle->private_info;
-
-       if (!handle->seekable) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_WARNING, "File is not seekable\n");
-               return SWITCH_STATUS_NOTIMPL;
-       }
-       return switch_core_file_seek(&context->fh, cur_sample, samples, whence);
-}
-
-/**
- * Process fileman command
- */
-static switch_status_t fileman_process_cmd(const char *cmd, switch_file_handle_t *fhp)
-{
-       if (zstr(cmd)) {
-               return SWITCH_STATUS_SUCCESS;
-       }
-
-       if (fhp) {
-               struct fileman_file_context *context = (struct fileman_file_context *)fhp->private_info;
-               if (!switch_test_flag(fhp, SWITCH_FILE_OPEN)) {
-                       return SWITCH_STATUS_FALSE;
-               }
-
-               if (!strncasecmp(cmd, "speed", 5)) {
-                       char *p;
-
-                       if ((p = strchr(cmd, ':'))) {
-                               p++;
-                               if (*p == '+' || *p == '-') {
-                                       int step;
-                                       if (!(step = atoi(p))) {
-                                               if (*p == '+') {
-                                                       step = 1;
-                                               } else {
-                                                       step = -1;
-                                               }
-                                       }
-                                       fhp->speed += step;
-                               } else {
-                                       int speed = atoi(p);
-                                       fhp->speed = speed;
-                               }
-                               return SWITCH_STATUS_SUCCESS;
-                       }
-
-                       return SWITCH_STATUS_FALSE;
-
-               } else if (!strncasecmp(cmd, "volume", 6)) {
-                       char *p;
-
-                       if ((p = strchr(cmd, ':'))) {
-                               p++;
-                               if (*p == '+' || *p == '-') {
-                                       int step;
-                                       if (!(step = atoi(p))) {
-                                               if (*p == '+') {
-                                                       step = 1;
-                                               } else {
-                                                       step = -1;
-                                               }
-                                       }
-                                       fhp->vol += step;
-                               } else {
-                                       int vol = atoi(p);
-                                       fhp->vol = vol;
-                               }
-                               return SWITCH_STATUS_SUCCESS;
-                       }
-
-                       if (fhp->vol) {
-                               switch_normalize_volume(fhp->vol);
-                       }
-
-                       return SWITCH_STATUS_FALSE;
-               } else if (!strcasecmp(cmd, "pause")) {
-                       switch_set_flag_locked(fhp, SWITCH_FILE_PAUSE);
-                       return SWITCH_STATUS_SUCCESS;
-               } else if (!strcasecmp(cmd, "resume")) {
-                       switch_clear_flag_locked(fhp, SWITCH_FILE_PAUSE);
-                       return SWITCH_STATUS_SUCCESS;
-               } else if (!strcasecmp(cmd, "stop")) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "Stopping file\n");
-                       context->done = 1;
-                       switch_set_flag_locked(fhp, SWITCH_FILE_DONE);
-                       return SWITCH_STATUS_SUCCESS;
-               } else if (!strcasecmp(cmd, "truncate")) {
-                       switch_core_file_truncate(fhp, 0);
-               } else if (!strcasecmp(cmd, "restart")) {
-                       unsigned int pos = 0;
-                       fhp->speed = 0;
-                       switch_core_file_seek(fhp, &pos, 0, SEEK_SET);
-                       return SWITCH_STATUS_SUCCESS;
-               } else if (!strncasecmp(cmd, "seek", 4)) {
-                       unsigned int samps = 0;
-                       unsigned int pos = 0;
-                       char *p;
-
-                       if ((p = strchr(cmd, ':'))) {
-                               p++;
-                               if (*p == '+' || *p == '-') {
-                                       int step;
-                                       int32_t target;
-                                       if (!(step = atoi(p))) {
-                                               if (*p == '+') {
-                                                       step = 1000;
-                                               } else {
-                                                       step = -1000;
-                                               }
-                                       }
-
-                                       samps = step * (fhp->samplerate / 1000);
-                                       target = (int32_t)fhp->pos + samps;
-
-                                       if (target < 0) {
-                                               target = 0;
-                                       }
-
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "seek to position %d\n", target);
-                                       switch_core_file_seek(fhp, &pos, target, SEEK_SET);
-
-                               } else {
-                                       samps = switch_atoui(p) * (fhp->samplerate / 1000);
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(context->uuid), SWITCH_LOG_DEBUG, "seek to position %d\n", samps);
-                                       switch_core_file_seek(fhp, &pos, samps, SEEK_SET);
-                               }
-                       }
-
-                       return SWITCH_STATUS_SUCCESS;
-               }
-       }
-
-       if (!strcmp(cmd, "true") || !strcmp(cmd, "undefined")) {
-               return SWITCH_STATUS_SUCCESS;
-       }
-
-       return SWITCH_STATUS_FALSE;
-}
-
-#define FILEMAN_SYNTAX "<id> <cmd>:<val>"
-SWITCH_STANDARD_API(fileman_api)
-{
-       char *mycmd = NULL, *argv[4] = { 0 };
-       int argc = 0;
-
-       if (!zstr(cmd) && (mycmd = strdup(cmd))) {
-               argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
-               if (argc >= 2 && !zstr(argv[0])) {
-                       char *id = argv[0];
-                       char *cmd = argv[1];
-                       switch_file_handle_t *fh = NULL;
-                       switch_mutex_lock(fileman_globals.mutex);
-                       fh = (switch_file_handle_t *)switch_core_hash_find(fileman_globals.hash, id);
-                       if (fh) {
-                               if (fileman_process_cmd(cmd, fh) == SWITCH_STATUS_SUCCESS) {
-                                       stream->write_function(stream, "+OK\n");
-                               } else {
-                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "fileman API failed for file %s\n", zstr(fh->file_path) ? "<null>" : fh->file_path);
-                                       stream->write_function(stream, "-ERR API call failed");
-                               }
-                               switch_mutex_unlock(fileman_globals.mutex);
-                       } else {
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "fileman API failed for ID %s\n", zstr(id) ? "<null>" : id);
-                               switch_mutex_unlock(fileman_globals.mutex);
-                               stream->write_function(stream, "-ERR file handle not found\n");
-                       }
-                       goto done;
-               }
-       }
-
-       stream->write_function(stream, "-USAGE: %s\n", FILEMAN_SYNTAX);
-
-  done:
-       switch_safe_free(mycmd);
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static char *rayo_supported_formats[] = { "rayo", NULL };
-static char *fileman_supported_formats[] = { "fileman", NULL };
-
-/**
- * Initialize output component
- * @param module_interface
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_output_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       switch_api_interface_t *api_interface;
-       switch_file_interface_t *file_interface;
-
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_OUTPUT_NS":output", start_call_output_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "output", "set:"RAYO_EXT_NS":stop", stop_output_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":pause", pause_output_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":resume", resume_output_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":speed-up", speed_up_output_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":speed-down", speed_down_output_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":volume-up", volume_up_output_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":volume-down", volume_down_output_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":seek", seek_output_component);
-
-       rayo_actor_command_handler_add(RAT_MIXER, "", "set:"RAYO_OUTPUT_NS":output", start_mixer_output_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "output", "set:"RAYO_EXT_NS":stop", stop_output_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":pause", pause_output_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":resume", resume_output_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":speed-up", speed_up_output_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":speed-down", speed_down_output_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":volume-up", volume_up_output_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":volume-down", volume_down_output_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "output", "set:"RAYO_OUTPUT_NS":seek", seek_output_component);
-
-       file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
-       file_interface->interface_name = "mod_rayo";
-       file_interface->extens = rayo_supported_formats;
-       file_interface->file_open = rayo_file_open;
-       file_interface->file_close = rayo_file_close;
-       file_interface->file_read = rayo_file_read;
-       file_interface->file_seek = rayo_file_seek;
-
-       switch_mutex_init(&fileman_globals.mutex, SWITCH_MUTEX_NESTED, pool);
-       switch_core_hash_init(&fileman_globals.hash);
-
-       file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
-       file_interface->interface_name = "mod_rayo";
-       file_interface->extens = fileman_supported_formats;
-       file_interface->file_open = fileman_file_open;
-       file_interface->file_close = fileman_file_close;
-       file_interface->file_write = fileman_file_write;
-       file_interface->file_read = fileman_file_read;
-       file_interface->file_seek = fileman_file_seek;
-
-       SWITCH_ADD_API(api_interface, "fileman", "Manage file audio", fileman_api, FILEMAN_SYNTAX);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Shutdown output component
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_output_component_shutdown(void)
-{
-       if (fileman_globals.hash) {
-               switch_core_hash_destroy(&fileman_globals.hash);
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
-
diff --git a/src/mod/event_handlers/mod_rayo/rayo_prompt_component.c b/src/mod/event_handlers/mod_rayo/rayo_prompt_component.c
deleted file mode 100644 (file)
index 15add81..0000000
+++ /dev/null
@@ -1,731 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2015, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * rayo_prompt_component.c -- Rayo prompt component implementation
- *
- */
-#include "rayo_components.h"
-#include "rayo_elements.h"
-
-enum prompt_component_state {
-       /* initial state - no barge */
-       PCS_START_OUTPUT,
-       /* playing prompt */
-       PCS_OUTPUT,
-       /* start input - no barge */
-       PCS_START_INPUT,
-       /* input starting - start timers needed */
-       PCS_START_INPUT_TIMERS,
-       /* initial state - barge in */
-       PCS_START_OUTPUT_BARGE,
-       /* start input for barge-in */
-       PCS_START_INPUT_OUTPUT,
-       /* playing and detecting */
-       PCS_INPUT_OUTPUT,
-       /* barge in on output */
-       PCS_STOP_OUTPUT,
-       /* detecting */
-       PCS_INPUT,
-       /* finishing, stop output */
-       PCS_DONE_STOP_OUTPUT,
-       /* finished */
-       PCS_DONE
-};
-
-/**
- * Prompt state
- */
-struct prompt_component {
-       struct rayo_component base;
-       enum prompt_component_state state;
-       iks *iq;
-       iks *complete;
-       const char *input_jid;
-       const char *output_jid;
-       const char *start_timers_request_id;
-};
-
-#define PROMPT_COMPONENT(x) ((struct prompt_component *)x)
-
-static const char *prompt_component_state_to_string(enum prompt_component_state state)
-{
-       switch(state) {
-               case PCS_START_OUTPUT_BARGE: return "START_OUTPUT_BARGE";
-               case PCS_START_OUTPUT: return "START_OUTPUT";
-               case PCS_START_INPUT_OUTPUT: return "START_INPUT_OUTPUT";
-               case PCS_START_INPUT: return "START_INPUT";
-               case PCS_START_INPUT_TIMERS: return "START_INPUT_TIMERS";
-               case PCS_INPUT_OUTPUT: return "INPUT_OUTPUT";
-               case PCS_STOP_OUTPUT: return "STOP_OUTPUT";
-               case PCS_INPUT: return "INPUT";
-               case PCS_OUTPUT: return "OUTPUT";
-               case PCS_DONE_STOP_OUTPUT: return "DONE_STOP_OUTPUT";
-               case PCS_DONE: return "DONE";
-       }
-       return "UNKNOWN";
-}
-
-/**
- * Send input-timers-started event
- */
-void rayo_component_send_input_timers_started_event(struct rayo_component *component)
-{
-       iks *event = iks_new("presence");
-       iks *x;
-       iks_insert_attrib(event, "from", RAYO_JID(component));
-       iks_insert_attrib(event, "to", component->client_jid);
-       x = iks_insert(event, "input-timers-started");
-       iks_insert_attrib(x, "xmlns", RAYO_PROMPT_NS);
-       RAYO_SEND_REPLY(component, component->client_jid, event);
-}
-
-/**
- * Send stop to component
- */
-static void rayo_component_send_stop(struct rayo_actor *from, const char *to)
-{
-       iks *stop = iks_new("iq");
-       iks *x;
-       iks_insert_attrib(stop, "from", RAYO_JID(from));
-       iks_insert_attrib(stop, "to", to);
-       iks_insert_attrib(stop, "type", "set");
-       iks_insert_attrib_printf(stop, "id", "mod_rayo-prompt-%d", RAYO_SEQ_NEXT(from));
-       x = iks_insert(stop, "stop");
-       iks_insert_attrib(x, "xmlns", RAYO_EXT_NS);
-       RAYO_SEND_MESSAGE(from, to, stop);
-}
-
-/**
- * Start input component
- */
-static void start_input(struct prompt_component *prompt, int start_timers, int barge_event)
-{
-       iks *iq = iks_new("iq");
-       iks *input = iks_find(PROMPT_COMPONENT(prompt)->iq, "prompt");
-       input = iks_find(input, "input");
-       iks_insert_attrib(iq, "from", RAYO_JID(prompt));
-       iks_insert_attrib(iq, "to", RAYO_JID(RAYO_ACTOR(prompt)->parent));
-       iks_insert_attrib_printf(iq, "id", "mod_rayo-prompt-%d", RAYO_SEQ_NEXT(prompt));
-       iks_insert_attrib(iq, "type", "set");
-       input = iks_copy_within(input, iks_stack(iq));
-       iks_insert_attrib(input, "start-timers", start_timers ? "true" : "false");
-       iks_insert_attrib(input, "barge-event", barge_event ? "true" : "false");
-       iks_insert_node(iq, input);
-       RAYO_SEND_MESSAGE(prompt, RAYO_JID(RAYO_ACTOR(prompt)->parent), iq);
-}
-
-/**
- * Start input component timers
- */
-static void start_input_timers(struct prompt_component *prompt)
-{
-       iks *x;
-       iks *iq = iks_new("iq");
-       iks_insert_attrib(iq, "from", RAYO_JID(prompt));
-       iks_insert_attrib(iq, "to", prompt->input_jid);
-       iks_insert_attrib(iq, "type", "set");
-       prompt->start_timers_request_id = switch_core_sprintf(RAYO_POOL(prompt), "mod_rayo-prompt-%d", RAYO_SEQ_NEXT(prompt));
-       iks_insert_attrib(iq, "id", prompt->start_timers_request_id);
-       x = iks_insert(iq, "start-timers");
-       iks_insert_attrib(x, "xmlns", RAYO_INPUT_NS);
-       RAYO_SEND_MESSAGE(prompt, prompt->input_jid, iq);
-}
-
-/**
- * Handle start of output.
- */
-static iks *prompt_component_handle_output_start(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) output start\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_START_OUTPUT:
-                       PROMPT_COMPONENT(prompt)->output_jid = switch_core_strdup(RAYO_POOL(prompt), msg->from_jid);
-                       PROMPT_COMPONENT(prompt)->state = PCS_OUTPUT;
-                       /* send ref to client */
-                       rayo_component_send_start(RAYO_COMPONENT(prompt), PROMPT_COMPONENT(prompt)->iq);
-                       break;
-               case PCS_START_OUTPUT_BARGE:
-                       PROMPT_COMPONENT(prompt)->output_jid = switch_core_strdup(RAYO_POOL(prompt), msg->from_jid);
-                       PROMPT_COMPONENT(prompt)->state = PCS_START_INPUT_OUTPUT;
-                       /* start input without timers and with barge events */
-                       start_input(PROMPT_COMPONENT(prompt), 0, 1);
-                       break;
-               case PCS_OUTPUT:
-               case PCS_START_INPUT_OUTPUT:
-               case PCS_START_INPUT:
-               case PCS_START_INPUT_TIMERS:
-               case PCS_INPUT_OUTPUT:
-               case PCS_STOP_OUTPUT:
-               case PCS_INPUT:
-               case PCS_DONE_STOP_OUTPUT:
-               case PCS_DONE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, unexpected start output event\n", RAYO_JID(prompt));
-                       break;
-       }
-
-       return NULL;
-}
-
-/**
- * Handle start of input.
- */
-static iks *prompt_component_handle_input_start(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) input start\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_START_INPUT:
-                       PROMPT_COMPONENT(prompt)->input_jid = switch_core_strdup(RAYO_POOL(prompt), msg->from_jid);
-                       PROMPT_COMPONENT(prompt)->state = PCS_INPUT;
-                       rayo_component_send_input_timers_started_event(RAYO_COMPONENT(prompt));
-                       break;
-               case PCS_START_INPUT_OUTPUT:
-                       PROMPT_COMPONENT(prompt)->input_jid = switch_core_strdup(RAYO_POOL(prompt), msg->from_jid);
-                       PROMPT_COMPONENT(prompt)->state = PCS_INPUT_OUTPUT;
-                       /* send ref to client */
-                       rayo_component_send_start(RAYO_COMPONENT(prompt), PROMPT_COMPONENT(prompt)->iq);
-                       break;
-               case PCS_START_INPUT_TIMERS:
-                       PROMPT_COMPONENT(prompt)->input_jid = switch_core_strdup(RAYO_POOL(prompt), msg->from_jid);
-                       PROMPT_COMPONENT(prompt)->state = PCS_INPUT;
-                       /* send ref to client */
-                       rayo_component_send_start(RAYO_COMPONENT(prompt), PROMPT_COMPONENT(prompt)->iq);
-                       start_input_timers(PROMPT_COMPONENT(prompt));
-                       break;
-               case PCS_DONE:
-                       /* stopped by client */
-                       PROMPT_COMPONENT(prompt)->input_jid = switch_core_strdup(RAYO_POOL(prompt), msg->from_jid);
-                       rayo_component_send_stop(prompt, msg->from_jid);
-                       break;
-               case PCS_START_OUTPUT:
-               case PCS_START_OUTPUT_BARGE:
-               case PCS_INPUT_OUTPUT:
-               case PCS_INPUT:
-               case PCS_STOP_OUTPUT:
-               case PCS_OUTPUT:
-               case PCS_DONE_STOP_OUTPUT:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, unexpected start input event\n", RAYO_JID(prompt));
-                       break;
-       }
-       return NULL;
-}
-
-/**
- * Handle start of input/output.
- */
-static iks *prompt_component_handle_io_start(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, got <ref> from %s: %s\n",
-               RAYO_JID(prompt), msg->from_jid, iks_string(iks_stack(iq), iq));
-       if (!strcmp("input", msg->from_subtype)) {
-               return prompt_component_handle_input_start(prompt, msg, data);
-       } else if (!strcmp("output", msg->from_subtype)) {
-               return prompt_component_handle_output_start(prompt, msg, data);
-       }
-       return NULL;
-}
-
-/**
- * Handle failure to start timers
- */
-static iks *prompt_component_handle_input_start_timers_error(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       /* this is only expected if input component is gone */
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) start timers error\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       return NULL;
-}
-
-/**
- * Handle input failure.
- */
-static iks *prompt_component_handle_input_error(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *error = iks_find(iq, "error");
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) input error\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_START_INPUT_TIMERS:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, <input> error: %s\n", RAYO_JID(prompt), iks_string(iks_stack(iq), iq));
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE;
-
-                       /* forward IQ error to client */
-                       iq = PROMPT_COMPONENT(prompt)->iq;
-                       iks_insert_attrib(iq, "from", RAYO_JID(prompt->parent));
-                       iks_insert_attrib(iq, "to", RAYO_COMPONENT(prompt)->client_jid);
-                       iks_insert_attrib(iq, "type", "error");
-                       iks_insert_node(iq, iks_copy_within(error, iks_stack(iq)));
-                       RAYO_SEND_REPLY(prompt, RAYO_COMPONENT(prompt)->client_jid, iq);
-
-                       /* done */
-                       PROMPT_COMPONENT(prompt)->iq = NULL;
-                       RAYO_RELEASE(prompt);
-                       RAYO_DESTROY(prompt);
-
-                       break;
-
-               case PCS_START_INPUT:
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE;
-                       iks_delete(PROMPT_COMPONENT(prompt)->iq);
-                       if (iks_find(error, "item-not-found")) {
-                               /* call is gone (hangup) */
-                               rayo_component_send_complete(RAYO_COMPONENT(prompt), COMPONENT_COMPLETE_HANGUP);
-                       } else {
-                               /* send presence error to client */
-                               rayo_component_send_complete(RAYO_COMPONENT(prompt), COMPONENT_COMPLETE_ERROR);
-                       }
-                       break;
-               case PCS_START_INPUT_OUTPUT:
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE_STOP_OUTPUT;
-
-                       /* forward IQ error to client */
-                       iq = PROMPT_COMPONENT(prompt)->iq;
-                       iks_insert_attrib(iq, "from", RAYO_JID(prompt->parent));
-                       iks_insert_attrib(iq, "to", RAYO_COMPONENT(prompt)->client_jid);
-                       iks_insert_attrib(iq, "type", "error");
-                       iks_insert_node(iq, iks_copy_within(error, iks_stack(iq)));
-                       PROMPT_COMPONENT(prompt)->complete = iks_copy(iq);
-
-                       rayo_component_send_stop(prompt, PROMPT_COMPONENT(prompt)->output_jid);
-                       break;
-               case PCS_START_OUTPUT:
-               case PCS_START_OUTPUT_BARGE:
-               case PCS_INPUT_OUTPUT:
-               case PCS_STOP_OUTPUT:
-               case PCS_INPUT:
-               case PCS_OUTPUT:
-               case PCS_DONE_STOP_OUTPUT:
-               case PCS_DONE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, unexpected start input error event\n", RAYO_JID(prompt));
-                       break;
-       }
-
-       return NULL;
-}
-
-/**
- * Handle output failure.
- */
-static iks *prompt_component_handle_output_error(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *error = iks_find(iq, "error");
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) output error\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_START_OUTPUT:
-               case PCS_START_OUTPUT_BARGE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, <output> error: %s\n", RAYO_JID(prompt), iks_string(iks_stack(iq), iq));
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE;
-
-                       /* forward IQ error to client */
-                       iq = PROMPT_COMPONENT(prompt)->iq;
-                       iks_insert_attrib(iq, "from", RAYO_JID(prompt->parent));
-                       iks_insert_attrib(iq, "to", RAYO_COMPONENT(prompt)->client_jid);
-                       iks_insert_attrib(iq, "type", "error");
-                       iks_insert_node(iq, iks_copy_within(error, iks_stack(iq)));
-                       RAYO_SEND_REPLY(prompt, RAYO_COMPONENT(prompt)->client_jid, iq);
-
-                       /* done */
-                       PROMPT_COMPONENT(prompt)->iq = NULL;
-                       RAYO_RELEASE(prompt);
-                       RAYO_DESTROY(prompt);
-
-                       break;
-               case PCS_START_INPUT_OUTPUT:
-               case PCS_START_INPUT_TIMERS:
-               case PCS_START_INPUT:
-               case PCS_INPUT_OUTPUT:
-               case PCS_STOP_OUTPUT:
-               case PCS_INPUT:
-               case PCS_OUTPUT:
-               case PCS_DONE_STOP_OUTPUT:
-               case PCS_DONE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, unexpected start output error event\n", RAYO_JID(prompt));
-                       break;
-       }
-
-       return NULL;
-}
-
-/**
- * Handle barge event
- */
-static iks *prompt_component_handle_input_barge(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       iks *presence = msg->payload;
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) input barge\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_INPUT_OUTPUT:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, got <start-of-input> from %s: %s\n",
-                               RAYO_JID(prompt), msg->from_jid, iks_string(iks_stack(presence), presence));
-                       PROMPT_COMPONENT(prompt)->state = PCS_STOP_OUTPUT;
-                       rayo_component_send_stop(prompt, PROMPT_COMPONENT(prompt)->output_jid);
-                       break;
-               case PCS_STOP_OUTPUT:
-               case PCS_INPUT:
-                       /* don't care */
-                       break;
-               case PCS_OUTPUT:
-               case PCS_START_OUTPUT:
-               case PCS_START_OUTPUT_BARGE:
-               case PCS_START_INPUT:
-               case PCS_START_INPUT_OUTPUT:
-               case PCS_START_INPUT_TIMERS:
-               case PCS_DONE_STOP_OUTPUT:
-               case PCS_DONE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s, unexpected start output error event\n", RAYO_JID(prompt));
-                       break;
-       }
-       return NULL;
-}
-
-/**
- * Handle completion event
- */
-static iks *prompt_component_handle_input_complete(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       iks *presence = msg->payload;
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) input complete\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_INPUT_OUTPUT:
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE_STOP_OUTPUT;
-                       presence = iks_copy(presence);
-                       iks_insert_attrib(presence, "from", RAYO_JID(prompt));
-                       iks_insert_attrib(presence, "to", RAYO_COMPONENT(prompt)->client_jid);
-                       PROMPT_COMPONENT(prompt)->complete = presence;
-                       rayo_component_send_stop(prompt, PROMPT_COMPONENT(prompt)->output_jid);
-                       break;
-               case PCS_STOP_OUTPUT:
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE_STOP_OUTPUT;
-                       presence = iks_copy(presence);
-                       iks_insert_attrib(presence, "from", RAYO_JID(prompt));
-                       iks_insert_attrib(presence, "to", RAYO_COMPONENT(prompt)->client_jid);
-                       PROMPT_COMPONENT(prompt)->complete = presence;
-                       break;
-               case PCS_INPUT:
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE;
-                       /* pass through */
-               case PCS_DONE:
-                       presence = iks_copy(presence);
-                       iks_insert_attrib(presence, "from", RAYO_JID(prompt));
-                       iks_insert_attrib(presence, "to", RAYO_COMPONENT(prompt)->client_jid);
-                       iks_delete(PROMPT_COMPONENT(prompt)->iq);
-                       rayo_component_send_complete_event(RAYO_COMPONENT(prompt), presence);
-                       break;
-               case PCS_OUTPUT:
-               case PCS_START_OUTPUT:
-               case PCS_START_OUTPUT_BARGE:
-               case PCS_START_INPUT:
-               case PCS_START_INPUT_OUTPUT:
-               case PCS_START_INPUT_TIMERS:
-               case PCS_DONE_STOP_OUTPUT:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s, unexpected start output error event\n", RAYO_JID(prompt));
-                       break;
-       }
-
-       return NULL;
-}
-
-/**
- * Forward result
- */
-static iks *prompt_component_handle_result(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-
-       /* forward all results, except for internal ones... */
-       const char *id = iks_find_attrib_soft(iq, "id");
-       if (strncmp("mod_rayo-prompt", id, 15)) {
-               iks_insert_attrib(iq, "from", RAYO_JID(prompt));
-               iks_insert_attrib(iq, "to", RAYO_COMPONENT(prompt)->client_jid);
-               RAYO_SEND_REPLY_DUP(prompt, RAYO_COMPONENT(prompt)->client_jid, iq);
-       } else if (!zstr(PROMPT_COMPONENT(prompt)->start_timers_request_id) && !strcmp(PROMPT_COMPONENT(prompt)->start_timers_request_id, id)) {
-               rayo_component_send_input_timers_started_event(RAYO_COMPONENT(prompt));
-       }
-
-       return NULL;
-}
-
-/**
- * Handle completion event
- */
-static iks *prompt_component_handle_output_complete(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) output complete\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_OUTPUT:
-                       PROMPT_COMPONENT(prompt)->state = PCS_START_INPUT;
-                       /* start input with timers enabled and barge events disabled */
-                       start_input(PROMPT_COMPONENT(prompt), 1, 0);
-                       break;
-               case PCS_START_INPUT_OUTPUT:
-                       /* output finished before input started */
-                       PROMPT_COMPONENT(prompt)->state = PCS_START_INPUT_TIMERS;
-                       break;
-               case PCS_INPUT_OUTPUT:
-                       PROMPT_COMPONENT(prompt)->state = PCS_INPUT;
-                       start_input_timers(PROMPT_COMPONENT(prompt));
-                       break;
-               case PCS_STOP_OUTPUT:
-                       PROMPT_COMPONENT(prompt)->state = PCS_INPUT;
-                       start_input_timers(PROMPT_COMPONENT(prompt));
-                       break;
-               case PCS_DONE_STOP_OUTPUT:
-                       if (PROMPT_COMPONENT(prompt)->complete) {
-                               iks_delete(PROMPT_COMPONENT(prompt)->iq);
-                               rayo_component_send_complete_event(RAYO_COMPONENT(prompt), PROMPT_COMPONENT(prompt)->complete);
-                       }
-                       break;
-               case PCS_INPUT:
-                       break;
-               case PCS_START_OUTPUT:
-               case PCS_START_OUTPUT_BARGE:
-                       /* output most likely failed w/ error */
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s, prompt output finished way too quickly (possible failure), continuing w/ input\n", RAYO_JID(prompt));
-                       /* start input with timers enabled and barge events disabled */
-                       rayo_component_send_start(RAYO_COMPONENT(prompt), PROMPT_COMPONENT(prompt)->iq);
-                       PROMPT_COMPONENT(prompt)->state = PCS_START_INPUT;
-                       start_input(PROMPT_COMPONENT(prompt), 1, 0);
-                       break;
-               case PCS_START_INPUT:
-               case PCS_START_INPUT_TIMERS:
-               case PCS_DONE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s, unexpected start output complete event\n", RAYO_JID(prompt));
-                       break;
-       }
-
-       return NULL;
-}
-
-/**
- * Start execution of prompt component
- */
-static iks *start_call_prompt_component(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       switch_memory_pool_t *pool;
-       struct prompt_component *prompt_component = NULL;
-       iks *prompt = iks_find(iq, "prompt");
-       iks *input;
-       iks *output;
-       iks *cmd;
-
-       if (!VALIDATE_RAYO_PROMPT(prompt)) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Bad <prompt> attrib\n");
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Bad <prompt> attrib value");
-       }
-
-       output = iks_find(prompt, "output");
-       if (!output) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Missing <output>\n");
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Missing <output>");
-       }
-
-       input = iks_find(prompt, "input");
-       if (!input) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "Missing <input>\n");
-               return iks_new_error_detailed(iq, STANZA_ERROR_BAD_REQUEST, "Missing <input>");
-       }
-
-       /* create prompt component, linked to call */
-       switch_core_new_memory_pool(&pool);
-       prompt_component = switch_core_alloc(pool, sizeof(*prompt_component));
-       prompt_component = PROMPT_COMPONENT(rayo_component_init(RAYO_COMPONENT(prompt_component), pool, RAT_CALL_COMPONENT, "prompt", NULL, call, iks_find_attrib(iq, "from")));
-       if (!prompt_component) {
-               switch_core_destroy_memory_pool(&pool);
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create prompt entity");
-       }
-       prompt_component->iq = iks_copy(iq);
-
-       /* start output */
-       if (iks_find_bool_attrib(prompt, "barge-in")) {
-               prompt_component->state = PCS_START_OUTPUT_BARGE;
-       } else {
-               prompt_component->state = PCS_START_OUTPUT;
-       }
-       cmd = iks_new("iq");
-       iks_insert_attrib(cmd, "from", RAYO_JID(prompt_component));
-       iks_insert_attrib(cmd, "to", RAYO_JID(call));
-       iks_insert_attrib(cmd, "id", iks_find_attrib(iq, "id"));
-       iks_insert_attrib(cmd, "type", "set");
-       output = iks_copy_within(output, iks_stack(cmd));
-       iks_insert_node(cmd, output);
-       RAYO_SEND_MESSAGE(prompt_component, RAYO_JID(call), cmd);
-
-       return NULL;
-}
-
-/**
- * Stop execution of prompt component
- */
-static iks *stop_call_prompt_component(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       iks *reply = NULL;
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) stop prompt\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_OUTPUT:
-                       /* input hasn't started yet */
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE_STOP_OUTPUT;
-                       PROMPT_COMPONENT(prompt)->complete = rayo_component_create_complete_event(RAYO_COMPONENT(prompt), COMPONENT_COMPLETE_STOP);
-                       rayo_component_send_stop(prompt, PROMPT_COMPONENT(prompt)->output_jid);
-                       break;
-               case PCS_INPUT_OUTPUT:
-               case PCS_INPUT:
-               case PCS_STOP_OUTPUT:
-                       /* stopping input will trigger completion */
-                       rayo_component_send_stop(prompt, PROMPT_COMPONENT(prompt)->input_jid);
-                       break;
-               case PCS_START_INPUT:
-                       /* stop input as soon as it starts */
-                       PROMPT_COMPONENT(prompt)->state = PCS_DONE;
-                       break;
-               case PCS_DONE_STOP_OUTPUT:
-               case PCS_DONE:
-                       /* already done */
-                       break;
-               case PCS_START_OUTPUT:
-               case PCS_START_OUTPUT_BARGE:
-               case PCS_START_INPUT_OUTPUT:
-               case PCS_START_INPUT_TIMERS:
-                       /* ref hasn't been sent yet */
-                       reply = iks_new_error(iq, STANZA_ERROR_UNEXPECTED_REQUEST);
-                       break;
-       }
-
-       if (!reply) {
-               reply = iks_new_iq_result(iq);
-       }
-       return reply;
-}
-
-/**
- * Pass output component command
- */
-static iks *forward_output_component_request(struct rayo_actor *prompt, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s (%s) %s prompt\n",
-               RAYO_JID(prompt), prompt_component_state_to_string(PROMPT_COMPONENT(prompt)->state), iks_name(iks_first_tag(iq)));
-
-       switch (PROMPT_COMPONENT(prompt)->state) {
-               case PCS_OUTPUT:
-               case PCS_START_INPUT_OUTPUT:
-               case PCS_INPUT_OUTPUT: {
-                       /* forward request to output component */
-                       iks_insert_attrib(iq, "from", RAYO_JID(prompt));
-                       iks_insert_attrib(iq, "to", PROMPT_COMPONENT(prompt)->output_jid);
-                       RAYO_SEND_MESSAGE_DUP(prompt, PROMPT_COMPONENT(prompt)->output_jid, iq);
-                       return NULL;
-               }
-               case PCS_START_INPUT_TIMERS:
-               case PCS_START_OUTPUT:
-               case PCS_START_OUTPUT_BARGE:
-                       /* ref hasn't been sent yet */
-                       return iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "too soon");
-                       break;
-               case PCS_START_INPUT:
-               case PCS_STOP_OUTPUT:
-               case PCS_DONE_STOP_OUTPUT:
-               case PCS_INPUT:
-               case PCS_DONE:
-                       return iks_new_error_detailed(iq, STANZA_ERROR_UNEXPECTED_REQUEST, "output is finished");
-       }
-       return NULL;
-}
-
-/**
- * Initialize prompt component
- * @param module_interface
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_prompt_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       /* Prompt is a convenience component that wraps <input> and <output> */
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_PROMPT_NS":prompt", start_call_prompt_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "set:"RAYO_EXT_NS":stop", stop_call_prompt_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "result:"RAYO_NS":ref", prompt_component_handle_io_start);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "result::", prompt_component_handle_result);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "error:"RAYO_OUTPUT_NS":output", prompt_component_handle_output_error);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "error:"RAYO_INPUT_NS":input", prompt_component_handle_input_error);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "error:"RAYO_INPUT_NS":start-timers", prompt_component_handle_input_start_timers_error);
-       rayo_actor_event_handler_add(RAT_CALL_COMPONENT, "input", RAT_CALL_COMPONENT, "prompt", ":"RAYO_INPUT_NS":start-of-input", prompt_component_handle_input_barge);
-       rayo_actor_event_handler_add(RAT_CALL_COMPONENT, "input", RAT_CALL_COMPONENT, "prompt", "unavailable:"RAYO_EXT_NS":complete", prompt_component_handle_input_complete);
-       rayo_actor_event_handler_add(RAT_CALL_COMPONENT, "output", RAT_CALL_COMPONENT, "prompt", "unavailable:"RAYO_EXT_NS":complete", prompt_component_handle_output_complete);
-
-       /* wrap output commands */
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "set:"RAYO_OUTPUT_NS":pause", forward_output_component_request);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "set:"RAYO_OUTPUT_NS":resume", forward_output_component_request);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "set:"RAYO_OUTPUT_NS":speed-up", forward_output_component_request);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "set:"RAYO_OUTPUT_NS":speed-down", forward_output_component_request);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "set:"RAYO_OUTPUT_NS":volume-up", forward_output_component_request);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "set:"RAYO_OUTPUT_NS":volume-down", forward_output_component_request);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "prompt", "set:"RAYO_OUTPUT_NS":seek", forward_output_component_request);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Shutdown prompt component
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_prompt_component_shutdown(void)
-{
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
-
diff --git a/src/mod/event_handlers/mod_rayo/rayo_record_component.c b/src/mod/event_handlers/mod_rayo/rayo_record_component.c
deleted file mode 100644 (file)
index 82a36d7..0000000
+++ /dev/null
@@ -1,549 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2014, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * record_component.c -- Rayo record component implementation
- *
- */
-#include "rayo_components.h"
-#include "rayo_elements.h"
-
-/* TODO timeouts / durations are affected by pause/resume */
-
-/**
- * settings
- */
-static struct {
-       const char *record_file_prefix;
-       const char *record_file_format;
-} globals;
-
-/**
- * A record component
- */
-struct record_component {
-       /** component base class */
-       struct rayo_component base;
-       /** maximum duration allowed */
-       int max_duration;
-       /** timeout for total silence */
-       int initial_timeout;
-       /** timeout for silence after initial utterance */
-       int final_timeout;
-       /** duplex/send/recv */
-       const char *direction;
-       /** true if mixed (mono) */
-       int mix;
-       /** true if start beep to be played */
-       int start_beep;
-       /** true if stop beep to be played */
-       int stop_beep;
-       /** time recording started */
-       switch_time_t start_time;
-       /** duration of this recording */
-       int duration_ms;
-       /** path on local filesystem */
-       char *local_file_path;
-       /** true if recording was stopped */
-       int stop;
-};
-
-#define RECORD_COMPONENT(x) ((struct record_component *)x)
-
-/* 1000 Hz beep for 250ms */
-#define RECORD_BEEP "tone_stream://%(250,0,1000)"
-
-#define RECORD_COMPLETE_MAX_DURATION "max-duration", RAYO_RECORD_COMPLETE_NS
-#define RECORD_COMPLETE_INITIAL_TIMEOUT "initial-timeout", RAYO_RECORD_COMPLETE_NS
-#define RECORD_COMPLETE_FINAL_TIMEOUT "final-timeout", RAYO_RECORD_COMPLETE_NS
-
-/**
- * Notify completion of record component
- */
-static void complete_record(struct rayo_component *component, const char *reason, const char *reason_namespace)
-{
-       switch_core_session_t *session = NULL;
-       const char *uuid = RAYO_ACTOR(component)->parent->id;
-       const char *uri = RECORD_COMPONENT(component)->local_file_path;
-       iks *recording;
-       switch_size_t file_size = 0;
-
-       /* TODO this doesn't work with HTTP, improve core RECORD_STOP event so that file size and duration is reported */
-#if 0
-       switch_file_t *file;
-
-       if (switch_file_open(&file, uri, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD, RAYO_POOL(component)) == SWITCH_STATUS_SUCCESS) {
-               file_size = switch_file_get_size(file);
-               switch_file_close(file);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_INFO, "Failed to open %s.\n", uri);
-       }
-#endif
-
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(uuid), SWITCH_LOG_DEBUG, "Recording %s done.\n", uri);
-
-       if (RECORD_COMPONENT(component)->stop_beep && (session = switch_core_session_locate(uuid))) {
-               switch_ivr_displace_session(session, RECORD_BEEP, 0, "");
-               switch_core_session_rwunlock(session);
-       }
-
-       /* send complete event to client */
-       recording = iks_new("recording");
-       iks_insert_attrib(recording, "xmlns", RAYO_RECORD_COMPLETE_NS);
-       if (strlen(uri) > strlen(SWITCH_PATH_SEPARATOR) && !strncmp(uri, SWITCH_PATH_SEPARATOR, strlen(SWITCH_PATH_SEPARATOR))) {
-               /* convert absolute path to file:// URI */
-               iks_insert_attrib_printf(recording, "uri", "file://%s", uri);
-       } else {
-               /* is already a URI (hopefully) */
-               iks_insert_attrib(recording, "uri", uri);
-       }
-       iks_insert_attrib_printf(recording, "duration", "%i", RECORD_COMPONENT(component)->duration_ms);
-       iks_insert_attrib_printf(recording, "size", "%"SWITCH_SIZE_T_FMT, file_size);
-       rayo_component_send_complete_with_metadata(component, reason, reason_namespace, recording, 1);
-       iks_delete(recording);
-}
-
-/**
- * Handle RECORD_STOP event from FreeSWITCH.
- * @param event received from FreeSWITCH core.  It will be destroyed by the core after this function returns.
- */
-static void on_call_record_stop_event(switch_event_t *event)
-{
-       const char *file_path = switch_event_get_header(event, "Record-File-Path");
-       struct rayo_component *component = RAYO_COMPONENT_LOCATE(file_path);
-
-       if (component) {
-               const char *completion_cause = switch_event_get_header(event, "Record-Completion-Cause");
-               completion_cause = zstr(completion_cause) ? "" : completion_cause;
-               RECORD_COMPONENT(component)->duration_ms += (switch_micro_time_now() - RECORD_COMPONENT(component)->start_time) / 1000;
-               if (RECORD_COMPONENT(component)->stop) {
-                       complete_record(component, COMPONENT_COMPLETE_STOP);
-               } else if (!strcmp(completion_cause, "no-input-timeout")) {
-                       complete_record(component, RECORD_COMPLETE_INITIAL_TIMEOUT);
-               } else if (!strcmp(completion_cause, "success-maxtime")) {
-                       complete_record(component, RECORD_COMPLETE_MAX_DURATION);
-               } else {
-                       /* assume final timeout */
-                       complete_record(component, RECORD_COMPLETE_FINAL_TIMEOUT);
-               }
-               RAYO_RELEASE(component);
-       }
-}
-
-/**
- * Create a record component
- */
-static struct rayo_component *record_component_create(struct rayo_actor *actor, const char *type, const char *client_jid, iks *record)
-{
-       switch_memory_pool_t *pool;
-       struct record_component *record_component = NULL;
-       char *local_file_path;
-       char *fs_file_path;
-       switch_bool_t start_paused;
-
-       start_paused = iks_find_bool_attrib(record, "start-paused");
-
-       /* create record filename from session UUID and ref */
-       /* for example: prefix/1234-1234-1234-1234-30.wav */
-       local_file_path = switch_mprintf("%s%s-%i.%s",
-               globals.record_file_prefix,
-               actor->id, rayo_actor_seq_next(actor), iks_find_attrib(record, "format"));
-
-       fs_file_path = switch_mprintf("{pause=%s}fileman://%s",
-               start_paused ? "true" : "false",
-               local_file_path);
-
-       switch_core_new_memory_pool(&pool);
-       record_component = switch_core_alloc(pool, sizeof(*record_component));
-       record_component = RECORD_COMPONENT(rayo_component_init(RAYO_COMPONENT(record_component), pool, type, "record", fs_file_path, actor, client_jid));
-       if (record_component) {
-               record_component->max_duration = iks_find_int_attrib(record, "max-duration");
-               record_component->initial_timeout = iks_find_int_attrib(record, "initial-timeout");
-               record_component->final_timeout = iks_find_int_attrib(record, "final-timeout");
-               record_component->direction = switch_core_strdup(RAYO_POOL(record_component), iks_find_attrib_soft(record, "direction"));
-               record_component->mix = iks_find_bool_attrib(record, "mix");
-               record_component->start_beep = iks_find_bool_attrib(record, "start-beep");
-               record_component->stop_beep = iks_find_bool_attrib(record, "stop-beep");
-               record_component->start_time = start_paused ? 0 : switch_micro_time_now();
-               record_component->local_file_path = switch_core_strdup(RAYO_POOL(record_component), local_file_path);
-       } else {
-               switch_core_destroy_memory_pool(&pool);
-       }
-
-       switch_safe_free(local_file_path);
-       switch_safe_free(fs_file_path);
-
-       return RAYO_COMPONENT(record_component);
-}
-
-/**
- * Start recording call
- * @param session the session to record
- * @param record the record component
- */
-static int start_call_record(switch_core_session_t *session, struct rayo_component *component)
-{
-       struct record_component *record_component = RECORD_COMPONENT(component);
-       switch_channel_t *channel = switch_core_session_get_channel(session);
-       int max_duration_sec = 0;
-
-       switch_channel_set_variable(channel, "RECORD_HANGUP_ON_ERROR", "false");
-       switch_channel_set_variable(channel, "RECORD_TOGGLE_ON_REPEAT", "");
-       switch_channel_set_variable(channel, "RECORD_CHECK_BRIDGE", "");
-       switch_channel_set_variable(channel, "RECORD_MIN_SEC", "0");
-       switch_channel_set_variable(channel, "RECORD_STEREO", "");
-       switch_channel_set_variable(channel, "RECORD_READ_ONLY", "");
-       switch_channel_set_variable(channel, "RECORD_WRITE_ONLY", "");
-       switch_channel_set_variable(channel, "RECORD_APPEND", "");
-       switch_channel_set_variable(channel, "RECORD_WRITE_OVER", "true");
-       switch_channel_set_variable(channel, "RECORD_ANSWER_REQ", "");
-       switch_channel_set_variable(channel, "RECORD_SILENCE_THRESHOLD", "200");
-       if (record_component->initial_timeout > 0) {
-               switch_channel_set_variable_printf(channel, "RECORD_INITIAL_TIMEOUT_MS", "%i", record_component->initial_timeout);
-       } else {
-               switch_channel_set_variable(channel, "RECORD_INITIAL_TIMEOUT_MS", "");
-       }
-       if (record_component->final_timeout > 0) {
-               switch_channel_set_variable_printf(channel, "RECORD_FINAL_TIMEOUT_MS", "%i", record_component->final_timeout);
-       } else {
-               switch_channel_set_variable(channel, "RECORD_FINAL_TIMEOUT_MS", "");
-       }
-       /* allow dialplan override for these variables */
-       //switch_channel_set_variable(channel, "RECORD_PRE_BUFFER_FRAMES", "");
-       //switch_channel_set_variable(channel, "record_sample_rate", "");
-       //switch_channel_set_variable(channel, "enable_file_write_buffering", "");
-
-       /* max duration attribute is in milliseconds- convert to seconds */
-       if (record_component->max_duration > 0) {
-               max_duration_sec = ceil((double)(record_component->max_duration - record_component->duration_ms) / 1000.0);
-       }
-
-       if (!strcmp(record_component->direction, "duplex")) {
-               if (!record_component->mix) {
-                       /* STEREO */
-                       switch_channel_set_variable(channel, "RECORD_STEREO", "true");
-               } /* else MONO (default) */
-       } else if (!strcmp(record_component->direction, "send")) {
-               /* record audio sent from the caller */
-               switch_channel_set_variable(channel, "RECORD_READ_ONLY", "true");
-       } else if (!strcmp(record_component->direction, "recv")) {
-               /* record audio received by the caller */
-               switch_channel_set_variable(channel, "RECORD_WRITE_ONLY", "true");
-       };
-
-       if (record_component->start_beep) {
-               switch_ivr_displace_session(session, RECORD_BEEP, 0, "");
-               record_component->start_time = switch_micro_time_now();
-       }
-
-       if (switch_ivr_record_session(session, (char *)RAYO_ID(component), max_duration_sec, NULL) == SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Recording started: file = %s\n", RAYO_ID(component));
-               return 1;
-       }
-
-       return 0;
-}
-
-/**
- * Start execution of call record component
- */
-static iks *start_call_record_component(struct rayo_actor *call, struct rayo_message *msg, void *session_data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = (switch_core_session_t *)session_data;
-       struct rayo_component *component = NULL;
-       iks *record = iks_find(iq, "record");
-
-       /* validate record attributes */
-       if (!VALIDATE_RAYO_RECORD(record)) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       component = record_component_create(call, RAT_CALL_COMPONENT, iks_find_attrib(iq, "from"), record);
-       if (!component) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create record entity");
-       }
-
-       if (start_call_record(session, component)) {
-               rayo_component_send_start(component, iq);
-       } else {
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-
-       return NULL;
-}
-
-/**
- * Stop execution of record component
- */
-static iks *stop_call_record_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       switch_core_session_t *session = switch_core_session_locate(component->parent->id);
-       if (session) {
-               RECORD_COMPONENT(component)->stop = 1;
-               switch_ivr_stop_record_session(session, RAYO_ID(component));
-               switch_core_session_rwunlock(session);
-       }
-       return iks_new_iq_result(iq);
-}
-
-/**
- * Pause execution of record component
- */
-static iks *pause_record_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       struct record_component *record = RECORD_COMPONENT(component);
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s pause", record->local_file_path);
-       SWITCH_STANDARD_STREAM(stream);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s pausing\n", RAYO_ID(component));
-       if (record->start_time) {
-               record->duration_ms += (switch_micro_time_now() - record->start_time) / 1000;
-               record->start_time = 0;
-       }
-       switch_api_execute("fileman", command, NULL, &stream);
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-
-       return iks_new_iq_result(iq);
-}
-
-/**
- * Resume execution of record component
- */
-static iks *resume_record_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       struct record_component *record = RECORD_COMPONENT(component);
-       switch_stream_handle_t stream = { 0 };
-       char *command = switch_mprintf("%s resume", record->local_file_path);
-       SWITCH_STANDARD_STREAM(stream);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s resuming\n", RAYO_ID(component));
-       if (!record->start_time) {
-               record->start_time = switch_micro_time_now();
-       }
-       switch_api_execute("fileman", command, NULL, &stream);
-       switch_safe_free(stream.data);
-       switch_safe_free(command);
-
-       return iks_new_iq_result(iq);
-}
-
-/**
- * Handle conference events from FreeSWITCH.
- * @param event received from FreeSWITCH core.  It will be destroyed by the core after this function returns.
- */
-static void on_mixer_record_event(switch_event_t *event)
-{
-       const char *file_path = switch_event_get_header(event, "Path");
-       const char *action = switch_event_get_header(event, "Action");
-       struct rayo_component *component = RAYO_COMPONENT_LOCATE(file_path);
-
-       if (component) {
-               struct record_component *record = RECORD_COMPONENT(component);
-               if (!strcmp("stop-recording", action)) {
-                       record->duration_ms += (switch_micro_time_now() - record->start_time) / 1000;
-                       if (record->stop) {
-                               complete_record(component, COMPONENT_COMPLETE_STOP);
-                       } else {
-                               /* TODO assume final timeout, for now */
-                               complete_record(component, RECORD_COMPLETE_FINAL_TIMEOUT);
-                       }
-               }
-               RAYO_RELEASE(component);
-       }
-}
-
-/**
- * Start recording mixer
- * @param record the record component
- */
-static int start_mixer_record(struct rayo_component *component)
-{
-       switch_stream_handle_t stream = { 0 };
-       char *args;
-       SWITCH_STANDARD_STREAM(stream);
-
-       args = switch_mprintf("%s recording start %s", RAYO_ACTOR(component)->parent->id, RAYO_ID(component));
-       switch_api_execute("conference", args, NULL, &stream);
-       switch_safe_free(args);
-       switch_safe_free(stream.data);
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Recording started: file = %s\n", RAYO_ID(component));
-       return 1;
-}
-
-/**
- * Start execution of mixer record component
- */
-static iks *start_mixer_record_component(struct rayo_actor *mixer, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       struct rayo_component *component = NULL;
-       iks *record = iks_find(iq, "record");
-
-       /* validate record attributes */
-       if (!VALIDATE_RAYO_RECORD(record)) {
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       component = record_component_create(mixer, RAT_MIXER_COMPONENT, iks_find_attrib(iq, "from"), record);
-       if (!component) {
-               return iks_new_error_detailed(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR, "Failed to create record entity");
-       }
-
-       /* mixer doesn't allow "send" */
-       if (!strcmp("send", iks_find_attrib_soft(record, "direction"))) {
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error(iq, STANZA_ERROR_BAD_REQUEST);
-       }
-
-       if (start_mixer_record(component)) {
-               rayo_component_send_start(component, iq);
-       } else {
-               RAYO_RELEASE(component);
-               RAYO_DESTROY(component);
-               return iks_new_error(iq, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-       }
-
-       return NULL;
-}
-
-/**
- * Stop execution of record component
- */
-static iks *stop_mixer_record_component(struct rayo_actor *component, struct rayo_message *msg, void *data)
-{
-       iks *iq = msg->payload;
-       char *args;
-       switch_stream_handle_t stream = { 0 };
-       SWITCH_STANDARD_STREAM(stream);
-
-       RECORD_COMPONENT(component)->stop = 1;
-       args = switch_mprintf("%s recording stop %s", component->parent->id, RAYO_ID(component));
-       switch_api_execute("conference", args, NULL, &stream);
-       switch_safe_free(args);
-       switch_safe_free(stream.data);
-
-       return iks_new_iq_result(iq);
-}
-
-/**
- * Process module XML configuration
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS on successful configuration
- */
-static switch_status_t do_config(switch_memory_pool_t *pool, const char *config_file)
-{
-       switch_xml_t cfg, xml;
-
-       /* set defaults */
-       globals.record_file_prefix = switch_core_sprintf(pool, "%s%s", SWITCH_GLOBAL_dirs.recordings_dir, SWITCH_PATH_SEPARATOR);
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Configuring module\n");
-       if (!(xml = switch_xml_open_cfg(config_file, &cfg, NULL))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", config_file);
-               return SWITCH_STATUS_TERM;
-       }
-
-       /* get params */
-       {
-               switch_xml_t settings = switch_xml_child(cfg, "record");
-               if (settings) {
-                       switch_xml_t param;
-                       for (param = switch_xml_child(settings, "param"); param; param = param->next) {
-                               const char *var = switch_xml_attr_soft(param, "name");
-                               const char *val = switch_xml_attr_soft(param, "value");
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "param: %s = %s\n", var, val);
-                               if (!strcasecmp(var, "record-file-prefix")) {
-                                       if (!zstr(val)) {
-                                               globals.record_file_prefix = switch_core_strdup(pool, val);
-                                       }
-                               } else {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Unsupported param: %s\n", var);
-                               }
-                       }
-               }
-       }
-
-       switch_xml_free(xml);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Initialize record component
- * @param module_interface
- * @param pool memory pool to allocate from
- * @param config_file to use
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_record_component_load(switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool, const char *config_file)
-{
-       if (do_config(pool, config_file) != SWITCH_STATUS_SUCCESS) {
-               return SWITCH_STATUS_TERM;
-       }
-
-       switch_event_bind("rayo_record_component", SWITCH_EVENT_RECORD_STOP, NULL, on_call_record_stop_event, NULL);
-       rayo_actor_command_handler_add(RAT_CALL, "", "set:"RAYO_RECORD_NS":record", start_call_record_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "record", "set:"RAYO_RECORD_NS":pause", pause_record_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "record", "set:"RAYO_RECORD_NS":resume", resume_record_component);
-       rayo_actor_command_handler_add(RAT_CALL_COMPONENT, "record", "set:"RAYO_EXT_NS":stop", stop_call_record_component);
-
-       switch_event_bind("rayo_record_component", SWITCH_EVENT_CUSTOM, "conference::maintenance", on_mixer_record_event, NULL);
-       rayo_actor_command_handler_add(RAT_MIXER, "", "set:"RAYO_RECORD_NS":record", start_mixer_record_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "record", "set:"RAYO_RECORD_NS":pause", pause_record_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "record", "set:"RAYO_RECORD_NS":resume", resume_record_component);
-       rayo_actor_command_handler_add(RAT_MIXER_COMPONENT, "record", "set:"RAYO_EXT_NS":stop", stop_mixer_record_component);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Shutdown record component
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t rayo_record_component_shutdown(void)
-{
-       switch_event_unbind_callback(on_call_record_stop_event);
-       switch_event_unbind_callback(on_mixer_record_event);
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
-
diff --git a/src/mod/event_handlers/mod_rayo/sasl.c b/src/mod/event_handlers/mod_rayo/sasl.c
deleted file mode 100644 (file)
index 4277ea3..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * sasl.c -- SASL functions
- *
- */
-#include <switch.h>
-#include <iksemel.h>
-#include "sasl.h"
-
-/**
- * Parse authzid, authcid, and password tokens from base64 PLAIN auth message.
- * @param message the base-64 encoded authentication message
- * @param authzid the authorization id in the message - free this string when done with parsed message
- * @param authcid the authentication id in the message
- * @param password the password in the message
- */
-void parse_plain_auth_message(const char *message, char **authzid, char **authcid, char **password)
-{
-       char *decoded = iks_base64_decode(message);
-       int maxlen = strlen(message) * 6 / 8 + 1;
-       int pos = 0;
-       *authzid = NULL;
-       *authcid = NULL;
-       *password = NULL;
-       if (decoded == NULL) {
-               goto end;
-       }
-       pos = strlen(decoded) + 1;
-       if (pos >= maxlen) {
-               goto end;
-       }
-       *authcid = strdup(decoded + pos);
-       pos += strlen(*authcid) + 1;
-       if (pos >= maxlen) {
-               goto end;
-       }
-       *password = strdup(decoded + pos);
-       if (zstr(decoded)) {
-               *authzid = strdup(*authcid);
-       } else {
-               *authzid = strdup(decoded);
-       }
-
- end:
-       switch_safe_free(decoded);
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/sasl.h b/src/mod/event_handlers/mod_rayo/sasl.h
deleted file mode 100644 (file)
index 641bcfa..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * sasl.h -- SASL
- *
- */
-#ifndef SASL_H
-#define SASL_H
-
-SWITCH_DECLARE(void) parse_plain_auth_message(const char *message, char **authzid, char **authcid, char **password);
-
-#endif
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/srgs.c b/src/mod/event_handlers/mod_rayo/srgs.c
deleted file mode 100644 (file)
index 7981c24..0000000
+++ /dev/null
@@ -1,1683 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2015, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * srgs.c -- Parses / converts / matches SRGS grammars
- *
- */
-#include <switch.h>
-#include <iksemel.h>
-#include <pcre.h>
-
-#include "srgs.h"
-
-#define MAX_RECURSION 100
-#define MAX_TAGS 1024
-
-/** function to handle tag attributes */
-typedef int (* tag_attribs_fn)(struct srgs_grammar *, char **);
-/** function to handle tag CDATA */
-typedef int (* tag_cdata_fn)(struct srgs_grammar *, char *, size_t);
-
-/**
- * Tag definition
- */
-struct tag_def {
-       tag_attribs_fn attribs_fn;
-       tag_cdata_fn cdata_fn;
-       switch_bool_t is_root;
-       switch_hash_t *children_tags;
-};
-
-/**
- * library configuration
- */
-typedef struct {
-       /** true if initialized */
-       switch_bool_t init;
-       /** Mapping of tag name to definition */
-       switch_hash_t *tag_defs;
-       /** library memory pool */
-       switch_memory_pool_t *pool;
-} srgs_globals;
-static srgs_globals globals = { 0 };
-
-/**
- * SRGS node types
- */
-enum srgs_node_type {
-       /** anything */
-       SNT_ANY,
-       /** <grammar> */
-       SNT_GRAMMAR,
-       /** <rule> */
-       SNT_RULE,
-       /** <one-of> */
-       SNT_ONE_OF,
-       /** <item> */
-       SNT_ITEM,
-       /** <ruleref> unresolved reference to node */
-       SNT_UNRESOLVED_REF,
-       /** <ruleref> resolved reference to node */
-       SNT_REF,
-       /** <item> string */
-       SNT_STRING,
-       /** <tag> */
-       SNT_TAG,
-       /** <lexicon> */
-       SNT_LEXICON,
-       /** <example> */
-       SNT_EXAMPLE,
-       /** <token> */
-       SNT_TOKEN,
-       /** <meta> */
-       SNT_META,
-       /** <metadata> */
-       SNT_METADATA
-};
-
-/**
- * <rule> value
- */
-struct rule_value {
-       char is_public;
-       char *id;
-       char *regex;
-};
-
-/**
- * <item> value
- */
-struct item_value {
-       int repeat_min;
-       int repeat_max;
-       const char *weight;
-       int tag;
-};
-
-/**
- * <ruleref> value
- */
-union ref_value {
-       struct srgs_node *node;
-       char *uri;
-};
-
-/**
- * A node in the SRGS parse tree
- */
-struct srgs_node {
-       /** Name of node */
-       const char *name;
-       /** Type of node */
-       enum srgs_node_type type;
-       /** True if node has been inspected for loops */
-       char visited;
-       /** Node value */
-       union {
-               char *root;
-               const char *string;
-               union ref_value ref;
-               struct rule_value rule;
-               struct item_value item;
-       } value;
-       /** parent node */
-       struct srgs_node *parent;
-       /** child node */
-       struct srgs_node *child;
-       /** sibling node */
-       struct srgs_node *next;
-       /** number of child nodes */
-       int num_children;
-       /** tag handling data */
-       struct tag_def *tag_def;
-};
-
-/**
- * A parsed grammar
- */
-struct srgs_grammar {
-       /** grammar memory pool */
-       switch_memory_pool_t *pool;
-       /** current node being parsed */
-       struct srgs_node *cur;
-       /** rule names mapped to node */
-       switch_hash_t *rules;
-       /** possible matching tags */
-       const char *tags[MAX_TAGS + 1];
-       /** number of tags */
-       int tag_count;
-       /** grammar encoding */
-       char *encoding;
-       /** grammar language */
-       char *language;
-       /** true if digit grammar */
-       int digit_mode;
-       /** grammar parse tree root */
-       struct srgs_node *root;
-       /** root rule */
-       struct srgs_node *root_rule;
-       /** compiled grammar regex */
-       pcre *compiled_regex;
-       /** grammar in regex format */
-       char *regex;
-       /** grammar in JSGF format */
-       char *jsgf;
-       /** grammar as JSGF file */
-       char *jsgf_file_name;
-       /** synchronizes access to this grammar */
-       switch_mutex_t *mutex;
-       /** optional uuid for logging */
-       const char *uuid;
-};
-
-/**
- * The SRGS SAX parser
- */
-struct srgs_parser {
-       /** parser memory pool */
-       switch_memory_pool_t *pool;
-       /** grammar cache */
-       switch_hash_t *cache;
-       /** cache mutex */
-       switch_mutex_t *mutex;
-       /** optional uuid for logging */
-       const char *uuid;
-};
-
-/**
- * Convert entity name to node type
- * @param name of entity
- * @return the type or ANY
- */
-static enum srgs_node_type string_to_node_type(char *name)
-{
-       if (!strcmp("grammar", name)) {
-               return SNT_GRAMMAR;
-       }
-       if (!strcmp("item", name)) {
-               return SNT_ITEM;
-       }
-       if (!strcmp("one-of", name)) {
-               return SNT_ONE_OF;
-       }
-       if (!strcmp("ruleref", name)) {
-               return SNT_UNRESOLVED_REF;
-       }
-       if (!strcmp("rule", name)) {
-               return SNT_RULE;
-       }
-       if (!strcmp("tag", name)) {
-               return SNT_TAG;
-       }
-       if (!strcmp("lexicon", name)) {
-               return SNT_LEXICON;
-       }
-       if (!strcmp("example", name)) {
-               return SNT_EXAMPLE;
-       }
-       if (!strcmp("token", name)) {
-               return SNT_TOKEN;
-       }
-       if (!strcmp("meta", name)) {
-               return SNT_META;
-       }
-       if (!strcmp("metadata", name)) {
-               return SNT_METADATA;
-       }
-       return SNT_ANY;
-}
-
-/**
- * Log node
- */
-static void sn_log_node_open(struct srgs_node *node)
-{
-       switch (node->type) {
-               case SNT_ANY:
-               case SNT_METADATA:
-               case SNT_META:
-               case SNT_TOKEN:
-               case SNT_EXAMPLE:
-               case SNT_LEXICON:
-               case SNT_TAG:
-               case SNT_ONE_OF:
-               case SNT_GRAMMAR:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "<%s>\n", node->name);
-                       return;
-               case SNT_RULE:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "<rule id='%s' scope='%s'>\n", node->value.rule.id, node->value.rule.is_public ? "public" : "private");
-                       return;
-               case SNT_ITEM:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "<item repeat='%i'>\n", node->value.item.repeat_min);
-                       return;
-               case SNT_UNRESOLVED_REF:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "<ruleref (unresolved) uri='%s'\n", node->value.ref.uri);
-                       return;
-               case SNT_REF:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "<ruleref uri='#%s'>\n", node->value.ref.node->value.rule.id);
-                       return;
-               case SNT_STRING:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "%s\n", node->value.string);
-                       return;
-       }
-}
-
-/**
- * Log node
- */
-static void sn_log_node_close(struct srgs_node *node)
-{
-       switch (node->type) {
-               case SNT_GRAMMAR:
-               case SNT_RULE:
-               case SNT_ONE_OF:
-               case SNT_ITEM:
-               case SNT_REF:
-               case SNT_TAG:
-               case SNT_LEXICON:
-               case SNT_EXAMPLE:
-               case SNT_TOKEN:
-               case SNT_META:
-               case SNT_METADATA:
-               case SNT_ANY:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "</%s>\n", node->name);
-                       return;
-               case SNT_UNRESOLVED_REF:
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG1, "</ruleref (unresolved)>\n");
-                       return;
-               case SNT_STRING:
-                       return;
-       }
-}
-
-/**
- * Create a new node
- * @param pool to use
- * @param name of node
- * @param type of node
- * @return the node
- */
-static struct srgs_node *sn_new(switch_memory_pool_t *pool, const char *name, enum srgs_node_type type)
-{
-       struct srgs_node *node = switch_core_alloc(pool, sizeof(*node));
-       node->name = switch_core_strdup(pool, name);
-       node->type = type;
-       return node;
-}
-
-/**
- * @param node to search
- * @return the last sibling of node
- */
-static struct srgs_node *sn_find_last_sibling(struct srgs_node *node)
-{
-       if (node && node->next) {
-               return sn_find_last_sibling(node->next);
-       }
-       return node;
-}
-
-/**
- * Add child node
- * @param pool to use
- * @param parent node to add child to
- * @param name the child node name
- * @param type the child node type
- * @return the child node
- */
-static struct srgs_node *sn_insert(switch_memory_pool_t *pool, struct srgs_node *parent, const char *name, enum srgs_node_type type)
-{
-       struct srgs_node *sibling = parent ? sn_find_last_sibling(parent->child) : NULL;
-       struct srgs_node *child = sn_new(pool, name, type);
-       if (parent) {
-               parent->num_children++;
-               child->parent = parent;
-       }
-       if (sibling) {
-               sibling->next = child;
-       } else if (parent) {
-               parent->child = child;
-       }
-       return child;
-}
-
-/**
- * Add string child node
- * @param pool to use
- * @param parent node to add string to
- * @param string to add - this function does not copy the string
- * @return the string child node
- */
-static struct srgs_node *sn_insert_string(switch_memory_pool_t *pool, struct srgs_node *parent, char *string)
-{
-       struct srgs_node *child = sn_insert(pool, parent, string, SNT_STRING);
-       child->value.string = string;
-       return child;
-}
-
-/**
- * Tag def destructor
- */
-static void destroy_tag_def(void *ptr)
-{
-    struct tag_def *tag = (struct tag_def *) ptr;
-       if (tag->children_tags) {
-               switch_core_hash_destroy(&tag->children_tags);
-       }
-}
-
-/**
- * Add a definition for a tag
- * @param tag the name
- * @param attribs_fn the function to handle the tag attributes
- * @param cdata_fn the function to handler the tag CDATA
- * @param children_tags comma-separated list of valid child tag names
- * @return the definition
- */
-static struct tag_def *add_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
-{
-       struct tag_def *def = switch_core_alloc(globals.pool, sizeof(*def));
-       switch_core_hash_init(&def->children_tags);
-       if (!zstr(children_tags)) {
-               char *children_tags_dup = switch_core_strdup(globals.pool, children_tags);
-               char *tags[32] = { 0 };
-               int tag_count = switch_separate_string(children_tags_dup, ',', tags, sizeof(tags) / sizeof(tags[0]));
-               if (tag_count) {
-                       int i;
-                       for (i = 0; i < tag_count; i++) {
-                               switch_core_hash_insert(def->children_tags, tags[i], tags[i]);
-                       }
-               }
-       }
-       def->attribs_fn = attribs_fn;
-       def->cdata_fn = cdata_fn;
-       def->is_root = SWITCH_FALSE;
-       switch_core_hash_insert_destructor(globals.tag_defs, tag, def, destroy_tag_def);
-       return def;
-}
-
-/**
- * Add a definition for a root tag
- * @param tag the name
- * @param attribs_fn the function to handle the tag attributes
- * @param cdata_fn the function to handler the tag CDATA
- * @param children_tags comma-separated list of valid child tag names
- * @return the definition
- */
-static struct tag_def *add_root_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
-{
-       struct tag_def *def = add_tag_def(tag, attribs_fn, cdata_fn, children_tags);
-       def->is_root = SWITCH_TRUE;
-       return def;
-}
-
-/**
- * Handle tag attributes
- * @param parser the parser
- * @param name the tag name
- * @param atts the attributes
- * @return IKS_OK if OK IKS_BADXML on parse failure
- */
-static int process_tag(struct srgs_grammar *grammar, const char *name, char **atts)
-{
-       struct srgs_node *cur = grammar->cur;
-       if (cur->tag_def->is_root && cur->parent == NULL) {
-               /* no parent for ROOT tags */
-               return cur->tag_def->attribs_fn(grammar, atts);
-       } else if (!cur->tag_def->is_root && cur->parent) {
-               /* check if this child is allowed by parent node */
-               struct tag_def *parent_def = cur->parent->tag_def;
-               if (switch_core_hash_find(parent_def->children_tags, "ANY") ||
-                       switch_core_hash_find(parent_def->children_tags, name)) {
-                       return cur->tag_def->attribs_fn(grammar, atts);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<%s> cannot be a child of <%s>\n", name, cur->parent->name);
-               }
-       } else if (cur->tag_def->is_root && cur->parent != NULL) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<%s> must be the root element\n", name);
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<%s> cannot be a root element\n", name);
-       }
-       return IKS_BADXML;
-}
-
-/**
- * Handle tag attributes that are ignored
- * @param grammar the grammar
- * @param atts the attributes
- * @return IKS_OK
- */
-static int process_attribs_ignore(struct srgs_grammar *grammar, char **atts)
-{
-       return IKS_OK;
-}
-
-/**
- * Handle CDATA that is ignored
- * @param grammar the grammar
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_OK
- */
-static int process_cdata_ignore(struct srgs_grammar *grammar, char *data, size_t len)
-{
-       return IKS_OK;
-}
-
-/**
- * Handle CDATA that is not allowed
- * @param grammar the grammar
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_BADXML if any printable characters
- */
-static int process_cdata_bad(struct srgs_grammar *grammar, char *data, size_t len)
-{
-       int i;
-       for (i = 0; i < len; i++) {
-               if (isgraph(data[i])) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Unexpected CDATA for <%s>\n", grammar->cur->name);
-                       return IKS_BADXML;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process <rule> attributes
- * @param grammar the grammar state
- * @param atts the attributes
- * @return IKS_OK if ok
- */
-static int process_rule(struct srgs_grammar *grammar, char **atts)
-{
-       struct srgs_node *rule = grammar->cur;
-       rule->value.rule.is_public = 0;
-       rule->value.rule.id = NULL;
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("scope", atts[i])) {
-                               rule->value.rule.is_public = !zstr(atts[i + 1]) && !strcmp("public", atts[i + 1]);
-                       } else if (!strcmp("id", atts[i])) {
-                               if (!zstr(atts[i + 1])) {
-                                       rule->value.rule.id = switch_core_strdup(grammar->pool, atts[i + 1]);
-                               }
-                       }
-                       i += 2;
-               }
-       }
-
-       if (zstr(rule->value.rule.id)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Missing rule ID: %s\n", rule->value.rule.id);
-               return IKS_BADXML;
-       }
-
-       if (switch_core_hash_find(grammar->rules, rule->value.rule.id)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Duplicate rule ID: %s\n", rule->value.rule.id);
-               return IKS_BADXML;
-       }
-       switch_core_hash_insert(grammar->rules, rule->value.rule.id, rule);
-
-       return IKS_OK;
-}
-
-/**
- * Process <ruleref> attributes
- * @param grammar the grammar state
- * @param atts the attributes
- * @return IKS_OK if ok
- */
-static int process_ruleref(struct srgs_grammar *grammar, char **atts)
-{
-       struct srgs_node *ruleref = grammar->cur;
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("uri", atts[i])) {
-                               char *uri = atts[i + 1];
-                               if (zstr(uri)) {
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Empty <ruleref> uri\n");
-                                       return IKS_BADXML;
-                               }
-                               /* only allow local reference */
-                               if (uri[0] != '#' || strlen(uri) < 2) {
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Only local rule refs allowed\n");
-                                       return IKS_BADXML;
-                               }
-                               ruleref->value.ref.uri = switch_core_strdup(grammar->pool, uri);
-                               return IKS_OK;
-                       }
-                       i += 2;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process <item> attributes
- * @param grammar the grammar state
- * @param atts the attributes
- * @return IKS_OK if ok
- */
-static int process_item(struct srgs_grammar *grammar, char **atts)
-{
-       struct srgs_node *item = grammar->cur;
-       item->value.item.repeat_min = 1;
-       item->value.item.repeat_max = 1;
-       item->value.item.weight = NULL;
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("repeat", atts[i])) {
-                               /* repeats of 0 are not supported by this code */
-                               char *repeat = atts[i + 1];
-                               if (zstr(repeat)) {
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Empty <item> repeat atribute\n");
-                                       return IKS_BADXML;
-                               }
-                               if (switch_is_number(repeat)) {
-                                       /* single number */
-                                       int repeat_val = atoi(repeat);
-                                       if (repeat_val < 1) {
-                                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<item> repeat must be >= 0\n");
-                                               return IKS_BADXML;
-                                       }
-                                       item->value.item.repeat_min = repeat_val;
-                                       item->value.item.repeat_max = repeat_val;
-                               } else {
-                                       /* range */
-                                       char *min = switch_core_strdup(grammar->pool, repeat);
-                                       char *max = strchr(min, '-');
-                                       if (max) {
-                                               *max = '\0';
-                                               max++;
-                                       } else {
-                                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<item> repeat must be a number or range\n");
-                                               return IKS_BADXML;
-                                       }
-                                       if (switch_is_number(min) && (switch_is_number(max) || zstr(max))) {
-                                               int min_val = atoi(min);
-                                               int max_val = zstr(max) ? INT_MAX : atoi(max);
-                                               /* max must be >= min and > 0
-                                                  min must be >= 0 */
-                                               if ((max_val <= 0) || (max_val < min_val) || (min_val < 0)) {
-                                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<item> repeat range invalid\n");
-                                                       return IKS_BADXML;
-                                               }
-                                               item->value.item.repeat_min = min_val;
-                                               item->value.item.repeat_max = max_val;
-                                       } else {
-                                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<item> repeat range is not a number\n");
-                                               return IKS_BADXML;
-                                       }
-                               }
-                       } else if (!strcmp("weight", atts[i])) {
-                               const char *weight = atts[i + 1];
-                               if (zstr(weight) || !switch_is_number(weight) || atof(weight) < 0) {
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<item> weight is not a number >= 0\n");
-                                       return IKS_BADXML;
-                               }
-                               item->value.item.weight = switch_core_strdup(grammar->pool, weight);
-                       }
-                       i += 2;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process <grammar> attributes
- * @param grammar the grammar state
- * @param atts the attributes
- * @return IKS_OK if ok
- */
-static int process_grammar(struct srgs_grammar *grammar, char **atts)
-{
-       if (grammar->root) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Only one <grammar> tag allowed\n");
-               return IKS_BADXML;
-       }
-       grammar->root = grammar->cur;
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("mode", atts[i])) {
-                               char *mode = atts[i + 1];
-                               if (zstr(mode)) {
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<grammar> mode is missing\n");
-                                       return IKS_BADXML;
-                               }
-                               grammar->digit_mode = !strcasecmp(mode, "dtmf");
-                       } else if(!strcmp("encoding", atts[i])) {
-                               char *encoding = atts[i + 1];
-                               if (zstr(encoding)) {
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<grammar> encoding is empty\n");
-                                       return IKS_BADXML;
-                               }
-                               grammar->encoding = switch_core_strdup(grammar->pool, encoding);
-                       } else if (!strcmp("language", atts[i])) {
-                               char *language = atts[i + 1];
-                               if (zstr(language)) {
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<grammar> language is empty\n");
-                                       return IKS_BADXML;
-                               }
-                               grammar->language = switch_core_strdup(grammar->pool, language);
-                       } else if (!strcmp("root", atts[i])) {
-                               char *root = atts[i + 1];
-                               if (zstr(root)) {
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "<grammar> root is empty\n");
-                                       return IKS_BADXML;
-                               }
-                               grammar->cur->value.root = switch_core_strdup(grammar->pool, root);
-                       }
-                       i += 2;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process a tag
- */
-static int tag_hook(void *user_data, char *name, char **atts, int type)
-{
-       int result = IKS_OK;
-       struct srgs_grammar *grammar = (struct srgs_grammar *)user_data;
-
-       if (type == IKS_OPEN || type == IKS_SINGLE) {
-               enum srgs_node_type ntype = string_to_node_type(name);
-               grammar->cur = sn_insert(grammar->pool, grammar->cur, name, ntype);
-               grammar->cur->tag_def = switch_core_hash_find(globals.tag_defs, name);
-               if (!grammar->cur->tag_def) {
-                       grammar->cur->tag_def = switch_core_hash_find(globals.tag_defs, "ANY");
-               }
-               result = process_tag(grammar, name, atts);
-               sn_log_node_open(grammar->cur);
-       }
-
-       if (type == IKS_CLOSE || type == IKS_SINGLE) {
-               sn_log_node_close(grammar->cur);
-               grammar->cur = grammar->cur->parent;
-       }
-
-       return result;
-}
-
-/**
- * Process <tag> CDATA
- * @param grammar the grammar
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_OK
- */
-static int process_cdata_tag(struct srgs_grammar *grammar, char *data, size_t len)
-{
-       struct srgs_node *item = grammar->cur->parent;
-       if (item && item->type == SNT_ITEM) {
-               if (grammar->tag_count < MAX_TAGS) {
-                       /* grammar gets the tag name, item gets the unique tag number */
-                       char *tag = switch_core_alloc(grammar->pool, sizeof(char) * (len + 1));
-                       tag[len] = '\0';
-                       strncpy(tag, data, len);
-                       grammar->tags[++grammar->tag_count] = tag;
-                       item->value.item.tag = grammar->tag_count;
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "too many <tag>s\n");
-                       return IKS_BADXML;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process CDATA grammar tokens
- * @param grammar the grammar
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_OK
- */
-static int process_cdata_tokens(struct srgs_grammar *grammar, char *data, size_t len)
-{
-       struct srgs_node *string = grammar->cur;
-       int i;
-       if (grammar->digit_mode) {
-               for (i = 0; i < len; i++) {
-                       if (isdigit(data[i]) || data[i] == '#' || data[i] == '*') {
-                               char *digit = switch_core_alloc(grammar->pool, sizeof(char) * 2);
-                               digit[0] = data[i];
-                               digit[1] = '\0';
-                               string = sn_insert_string(grammar->pool, string, digit);
-                               sn_log_node_open(string);
-                       }
-               }
-       } else {
-               char *data_dup = switch_core_alloc(grammar->pool, sizeof(char) * (len + 1));
-               char *start = data_dup;
-               char *end = start + len - 1;
-               memcpy(data_dup, data, len);
-               /* remove start whitespace */
-               for (; start && *start && !isgraph(*start); start++) {
-               }
-               if (!zstr(start)) {
-                       /* remove end whitespace */
-                       for (; end != start && *end && !isgraph(*end); end--) {
-                               *end = '\0';
-                       }
-                       if (!zstr(start)) {
-                               sn_insert_string(grammar->pool, string, start);
-                       }
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process cdata
- * @param user_data the grammar
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_OK
- */
-static int cdata_hook(void *user_data, char *data, size_t len)
-{
-       struct srgs_grammar *grammar = (struct srgs_grammar *)user_data;
-       if (!grammar) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Missing grammar\n");
-               return IKS_BADXML;
-       }
-       if (grammar->cur) {
-               if (grammar->cur->tag_def) {
-                       return grammar->cur->tag_def->cdata_fn(grammar, data, len);
-               }
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Missing definition for <%s>\n", grammar->cur->name);
-               return IKS_BADXML;
-       }
-       return IKS_OK;
-}
-
-/**
- * Create a new parsed grammar
- * @param parser
- * @return the grammar
- */
-struct srgs_grammar *srgs_grammar_new(struct srgs_parser *parser)
-{
-       switch_memory_pool_t *pool = NULL;
-       struct srgs_grammar *grammar = NULL;
-       switch_core_new_memory_pool(&pool);
-       grammar = switch_core_alloc(pool, sizeof (*grammar));
-       grammar->pool = pool;
-       grammar->root = NULL;
-       grammar->cur = NULL;
-       grammar->uuid = (parser && !zstr(parser->uuid)) ? switch_core_strdup(pool, parser->uuid) : "";
-       switch_core_hash_init(&grammar->rules);
-       switch_mutex_init(&grammar->mutex, SWITCH_MUTEX_NESTED, pool);
-       return grammar;
-}
-
-/**
- * Destroy a parsed grammar
- * @param grammar the grammar
- */
-static void srgs_grammar_destroy(struct srgs_grammar *grammar)
-{
-       switch_memory_pool_t *pool = grammar->pool;
-       if (grammar->compiled_regex) {
-               pcre_free(grammar->compiled_regex);
-       }
-       if (grammar->jsgf_file_name) {
-               switch_file_remove(grammar->jsgf_file_name, pool);
-       }
-       switch_core_hash_destroy(&grammar->rules);
-       switch_core_destroy_memory_pool(&pool);
-}
-
-/**
- * Create a new parser.
- * @param uuid optional uuid for logging
- * @return the created parser
- */
-struct srgs_parser *srgs_parser_new(const char *uuid)
-{
-       switch_memory_pool_t *pool = NULL;
-       struct srgs_parser *parser = NULL;
-       switch_core_new_memory_pool(&pool);
-       if (pool) {
-               parser = switch_core_alloc(pool, sizeof(*parser));
-               parser->pool = pool;
-               parser->uuid = zstr(uuid) ? "" : switch_core_strdup(pool, uuid);
-               switch_core_hash_init(&parser->cache);
-               switch_mutex_init(&parser->mutex, SWITCH_MUTEX_NESTED, pool);
-       }
-       return parser;
-}
-
-/**
- * Destroy the parser.
- * @param parser to destroy
- */
-void srgs_parser_destroy(struct srgs_parser *parser)
-{
-       switch_memory_pool_t *pool = parser->pool;
-       switch_hash_index_t *hi = NULL;
-
-       if (parser->cache) {
-               /* clean up all cached grammars */
-               for (hi = switch_core_hash_first(parser->cache); hi; hi = switch_core_hash_next(&hi)) {
-                       struct srgs_grammar *grammar = NULL;
-                       const void *key;
-                       void *val;
-                       switch_core_hash_this(hi, &key, NULL, &val);
-                       grammar = (struct srgs_grammar *)val;
-                       switch_assert(grammar);
-                       srgs_grammar_destroy(grammar);
-               }
-               switch_core_hash_destroy(&parser->cache);
-       }
-       switch_core_destroy_memory_pool(&pool);
-}
-
-/**
- * Create regexes
- * @param grammar the grammar
- * @param node root node
- * @param stream set to NULL
- * @return 1 if successful
- */
-static int create_regexes(struct srgs_grammar *grammar, struct srgs_node *node, switch_stream_handle_t *stream)
-{
-       sn_log_node_open(node);
-       switch (node->type) {
-               case SNT_GRAMMAR:
-                       if (node->child) {
-                               int num_rules = 0;
-                               struct srgs_node *child = node->child;
-                               if (grammar->root_rule) {
-                                       if (!create_regexes(grammar, grammar->root_rule, NULL)) {
-                                               return 0;
-                                       }
-                                       grammar->regex = switch_core_sprintf(grammar->pool, "^%s$", grammar->root_rule->value.rule.regex);
-                               } else {
-                                       switch_stream_handle_t new_stream = { 0 };
-                                       SWITCH_STANDARD_STREAM(new_stream);
-                                       if (node->num_children > 1) {
-                                               new_stream.write_function(&new_stream, "%s", "^(?:");
-                                       } else {
-                                               new_stream.write_function(&new_stream, "%s", "^");
-                                       }
-                                       for (; child; child = child->next) {
-                                               if (!create_regexes(grammar, child, &new_stream)) {
-                                                       switch_safe_free(new_stream.data);
-                                                       return 0;
-                                               }
-                                               if (child->type == SNT_RULE && child->value.rule.is_public) {
-                                                       if (num_rules > 0) {
-                                                               new_stream.write_function(&new_stream, "%s", "|");
-                                                       }
-                                                       new_stream.write_function(&new_stream, "%s", child->value.rule.regex);
-                                                       num_rules++;
-                                               }
-                                       }
-                                       if (node->num_children > 1) {
-                                               new_stream.write_function(&new_stream, "%s", ")$");
-                                       } else {
-                                               new_stream.write_function(&new_stream, "%s", "$");
-                                       }
-                                       grammar->regex = switch_core_strdup(grammar->pool, new_stream.data);
-                                       switch_safe_free(new_stream.data);
-                               }
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_DEBUG, "document regex = %s\n", grammar->regex);
-                       }
-                       break;
-               case SNT_RULE:
-                       if (node->value.rule.regex) {
-                               return 1;
-                       } else if (node->child) {
-                               struct srgs_node *item = node->child;
-                               switch_stream_handle_t new_stream = { 0 };
-                               SWITCH_STANDARD_STREAM(new_stream);
-                               for (; item; item = item->next) {
-                                       if (!create_regexes(grammar, item, &new_stream)) {
-                                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_DEBUG, "%s regex failed = %s\n", node->value.rule.id, node->value.rule.regex);
-                                               switch_safe_free(new_stream.data);
-                                               return 0;
-                                       }
-                               }
-                               node->value.rule.regex = switch_core_strdup(grammar->pool, new_stream.data);
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_DEBUG, "%s regex = %s\n", node->value.rule.id, node->value.rule.regex);
-                               switch_safe_free(new_stream.data);
-                       }
-                       break;
-               case SNT_STRING: {
-                       int i;
-                       for (i = 0; i < strlen(node->value.string); i++) {
-                               switch (node->value.string[i]) {
-                                       case '[':
-                                       case '\\':
-                                       case '^':
-                                       case '$':
-                                       case '.':
-                                       case '|':
-                                       case '?':
-                                       case '*':
-                                       case '+':
-                                       case '(':
-                                       case ')':
-                                               /* escape special PCRE regex characters */
-                                               stream->write_function(stream, "\\%c", node->value.string[i]);
-                                               break;
-                                       default:
-                                               stream->write_function(stream, "%c", node->value.string[i]);
-                                               break;
-                               }
-                       }
-                       if (node->child) {
-                               if (!create_regexes(grammar, node->child, stream)) {
-                                       return 0;
-                               }
-                       }
-                       break;
-               }
-               case SNT_ITEM:
-                       if (node->child) {
-                               struct srgs_node *item = node->child;
-                               if (node->value.item.repeat_min != 1 || node->value.item.repeat_max != 1 || node->value.item.tag) {
-                                       if (node->value.item.tag) {
-                                               stream->write_function(stream, "(?P<tag%d>", node->value.item.tag);
-                                       } else {
-                                               stream->write_function(stream, "%s", "(?:");
-                                       }
-                               }
-                               for(; item; item = item->next) {
-                                       if (!create_regexes(grammar, item, stream)) {
-                                               return 0;
-                                       }
-                               }
-                               if (node->value.item.repeat_min != 1 || node->value.item.repeat_max != 1) {
-                                       if (node->value.item.repeat_min != node->value.item.repeat_max) {
-                                               if (node->value.item.repeat_min == 0 && node->value.item.repeat_max == INT_MAX) {
-                                                               stream->write_function(stream, ")*");
-                                               } else if (node->value.item.repeat_min == 0 && node->value.item.repeat_max == 1) {
-                                                               stream->write_function(stream, ")?");
-                                               } else if (node->value.item.repeat_min == 1 && node->value.item.repeat_max == INT_MAX) {
-                                                       stream->write_function(stream, ")+");
-                                               } else if (node->value.item.repeat_max == INT_MAX) {
-                                                       stream->write_function(stream, "){%i,1000}", node->value.item.repeat_min);
-                                               } else {
-                                                       stream->write_function(stream, "){%i,%i}", node->value.item.repeat_min, node->value.item.repeat_max);
-                                               }
-                                       } else {
-                                               stream->write_function(stream, "){%i}", node->value.item.repeat_min);
-                                       }
-                               } else if (node->value.item.tag) {
-                                       stream->write_function(stream, "%s", ")");
-                               }
-                       }
-                       break;
-               case SNT_ONE_OF:
-                       if (node->child) {
-                               struct srgs_node *item = node->child;
-                               if (node->num_children > 1) {
-                                       stream->write_function(stream, "%s", "(?:");
-                               }
-                               for (; item; item = item->next) {
-                                       if (item != node->child) {
-                                               stream->write_function(stream, "%s", "|");
-                                       }
-                                       if (!create_regexes(grammar, item, stream)) {
-                                               return 0;
-                                       }
-                               }
-                               if (node->num_children > 1) {
-                                       stream->write_function(stream, "%s", ")");
-                               }
-                       }
-                       break;
-               case SNT_REF: {
-                       struct srgs_node *rule = node->value.ref.node;
-                       if (!rule->value.rule.regex) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_DEBUG, "ruleref: create %s regex\n", rule->value.rule.id);
-                               if (!create_regexes(grammar, rule, NULL)) {
-                                       return 0;
-                               }
-                       }
-                       if (!rule->value.rule.regex) {
-                               return 0;
-                       }
-                       stream->write_function(stream, "%s", rule->value.rule.regex);
-                       break;
-               }
-               case SNT_ANY:
-               default:
-                       /* ignore */
-                       return 1;
-       }
-       sn_log_node_close(node);
-       return 1;
-}
-
-/**
- * Compile regex
- */
-static pcre *get_compiled_regex(struct srgs_grammar *grammar)
-{
-       int erroffset = 0;
-       const char *errptr = "";
-       int options = 0;
-       const char *regex;
-
-       if (!grammar) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "grammar is NULL!\n");
-               return NULL;
-       }
-
-       switch_mutex_lock(grammar->mutex);
-       if (!grammar->compiled_regex && (regex = srgs_grammar_to_regex(grammar))) {
-               if (!(grammar->compiled_regex = pcre_compile(regex, options, &errptr, &erroffset, NULL))) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_WARNING, "Failed to compile grammar regex: %s\n", regex);
-               }
-       }
-       switch_mutex_unlock(grammar->mutex);
-       return grammar->compiled_regex;
-}
-
-/**
- * Resolve all unresolved references and detect loops.
- * @param grammar the grammar
- * @param node the current node
- * @param level the recursion level
- */
-static int resolve_refs(struct srgs_grammar *grammar, struct srgs_node *node, int level)
-{
-       sn_log_node_open(node);
-       if (node->visited) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Loop detected.\n");
-               return 0;
-       }
-       node->visited = 1;
-
-       if (level > MAX_RECURSION) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Recursion too deep.\n");
-               return 0;
-       }
-
-       if (node->type == SNT_GRAMMAR && node->value.root) {
-               struct srgs_node *rule = (struct srgs_node *)switch_core_hash_find(grammar->rules, node->value.root);
-               if (!rule) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Root rule not found: %s\n", node->value.root);
-                       return 0;
-               }
-               grammar->root_rule = rule;
-       }
-
-       if (node->type == SNT_UNRESOLVED_REF) {
-               /* resolve reference to local rule- drop first character # from URI */
-               struct srgs_node *rule = (struct srgs_node *)switch_core_hash_find(grammar->rules, node->value.ref.uri + 1);
-               if (!rule) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(grammar->uuid), SWITCH_LOG_INFO, "Local rule not found: %s\n", node->value.ref.uri);
-                       return 0;
-               }
-
-               /* link to rule */
-               node->type = SNT_REF;
-               node->value.ref.node = rule;
-       }
-
-       /* travel through rule to detect loops */
-       if (node->type == SNT_REF) {
-               if (!resolve_refs(grammar, node->value.ref.node, level + 1)) {
-                       return 0;
-               }
-       }
-
-       /* resolve children refs */
-       if (node->child) {
-               struct srgs_node *child = node->child;
-               for (; child; child = child->next) {
-                       if (!resolve_refs(grammar, child, level + 1)) {
-                               return 0;
-                       }
-               }
-       }
-
-       node->visited = 0;
-       sn_log_node_close(node);
-       return 1;
-}
-
-/**
- * Parse the document into rules to match
- * @param parser the parser
- * @param document the document to parse
- * @return the parsed grammar if successful
- */
-struct srgs_grammar *srgs_parse(struct srgs_parser *parser, const char *document)
-{
-       struct srgs_grammar *grammar = NULL;
-       if (!parser) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "NULL parser!!\n");
-               return NULL;
-       }
-
-       if (zstr(document)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_INFO, "Missing grammar document\n");
-               return NULL;
-       }
-
-       /* check for cached grammar */
-       switch_mutex_lock(parser->mutex);
-       grammar = (struct srgs_grammar *)switch_core_hash_find(parser->cache, document);
-       if (!grammar) {
-               int result = 0;
-               iksparser *p;
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_DEBUG, "Parsing new grammar\n");
-               grammar = srgs_grammar_new(parser);
-               p = iks_sax_new(grammar, tag_hook, cdata_hook);
-               if (iks_parse(p, document, 0, 1) == IKS_OK) {
-                       if (grammar->root) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_DEBUG, "Resolving references\n");
-                               if (resolve_refs(grammar, grammar->root, 0)) {
-                                       result = 1;
-                               }
-                       } else {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_INFO, "Nothing to parse!\n");
-                       }
-               }
-               iks_parser_delete(p);
-               if (result) {
-                       switch_core_hash_insert(parser->cache, document, grammar);
-               } else {
-                       if (grammar) {
-                               srgs_grammar_destroy(grammar);
-                               grammar = NULL;
-                       }
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_INFO, "Failed to parse grammar\n");
-               }
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(parser->uuid), SWITCH_LOG_DEBUG, "Using cached grammar\n");
-       }
-       switch_mutex_unlock(parser->mutex);
-
-       return grammar;
-}
-
-#define MAX_INPUT_SIZE 128
-#define OVECTOR_SIZE MAX_TAGS
-#define WORKSPACE_SIZE 1024
-
-/**
- * Check if no more digits can be added to input and match
- * @param compiled_regex the regex used in the initial match
- * @param input the input to check
- * @return true if end of match (no more input can be added)
- */
-static int is_match_end(pcre *compiled_regex, const char *input)
-{
-       int ovector[OVECTOR_SIZE];
-       int input_size = strlen(input);
-       char search_input[MAX_INPUT_SIZE + 2];
-       const char *search_set = "0123456789#*ABCD";
-       const char *search = strchr(search_set, input[input_size - 1]); /* start with last digit in input */
-       int i = 0;
-
-       if (!search) {
-               return 0;
-       }
-
-       /* For each digit in search_set, check if input + search_set digit is a potential match.
-          If so, then this is not a match end.
-        */
-       sprintf(search_input, "%sZ", input);
-       for (i = 0; i < 16; i++) {
-               int result;
-               if (!*search) {
-                       search = search_set;
-               }
-               search_input[input_size] = *search++;
-               result = pcre_exec(compiled_regex, NULL, search_input, input_size + 1, 0, PCRE_PARTIAL,
-                       ovector, sizeof(ovector) / sizeof(ovector[0]));
-               if (result > 0) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "not match end\n");
-                       return 0;
-               }
-               if (result == PCRE_ERROR_PARTIAL) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "partial match possible - not match end\n");
-                       return 0;
-               }
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "is match end\n");
-       return 1;
-}
-
-/**
- * Find a match
- * @param grammar the grammar to match
- * @param input the input to compare
- * @param interpretation the (optional) interpretation of the input result
- * @return the match result
- */
-enum srgs_match_type srgs_grammar_match(struct srgs_grammar *grammar, const char *input, const char **interpretation)
-{
-       int result = 0;
-       int ovector[OVECTOR_SIZE];
-       pcre *compiled_regex;
-
-       *interpretation = NULL;
-
-       if (zstr(input)) {
-               return SMT_NO_MATCH;
-       }
-       if (strlen(input) > MAX_INPUT_SIZE) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "input too large: %s\n", input);
-               return SMT_NO_MATCH;
-       }
-
-       if (!(compiled_regex = get_compiled_regex(grammar))) {
-               return SMT_NO_MATCH;
-       }
-       result = pcre_exec(compiled_regex, NULL, input, strlen(input), 0, PCRE_PARTIAL,
-               ovector, OVECTOR_SIZE);
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "match = %i\n", result);
-       if (result > 0) {
-               int i;
-               char buffer[MAX_INPUT_SIZE + 1];
-               buffer[MAX_INPUT_SIZE] = '\0';
-
-               /* find matching instance... */
-               for (i = 1; i <= grammar->tag_count; i++) {
-                       char substring_name[16] = { 0 };
-                       buffer[0] = '\0';
-                       snprintf(substring_name, 16, "tag%d", i);
-                       if (pcre_copy_named_substring(compiled_regex, input, ovector, result, substring_name, buffer, MAX_INPUT_SIZE) != PCRE_ERROR_NOSUBSTRING && !zstr_buf(buffer)) {
-                               *interpretation = grammar->tags[i];
-                               break;
-                       }
-               }
-
-               if (is_match_end(compiled_regex, input)) {
-                       return SMT_MATCH_END;
-               }
-               return SMT_MATCH;
-       }
-       if (result == PCRE_ERROR_PARTIAL) {
-               return SMT_MATCH_PARTIAL;
-       }
-
-       return SMT_NO_MATCH;
-}
-
-/**
- * Generate regex from SRGS document.  Call this after parsing SRGS document.
- * @param parser the parser
- * @return the regex or NULL
- */
-const char *srgs_grammar_to_regex(struct srgs_grammar *grammar)
-{
-       if (!grammar) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "grammar is NULL!\n");
-               return NULL;
-       }
-       switch_mutex_lock(grammar->mutex);
-       if (!grammar->regex && !create_regexes(grammar, grammar->root, NULL)) {
-               switch_mutex_unlock(grammar->mutex);
-               return NULL;
-       }
-       switch_mutex_unlock(grammar->mutex);
-       return grammar->regex;
-}
-
-/**
- * Create JSGF grammar
- * @param parser the parser
- * @param node root node
- * @param stream set to NULL
- * @return 1 if successful
- */
-static int create_jsgf(struct srgs_grammar *grammar, struct srgs_node *node, switch_stream_handle_t *stream)
-{
-       sn_log_node_open(node);
-       switch (node->type) {
-               case SNT_GRAMMAR:
-                       if (node->child) {
-                               struct srgs_node *child;
-                               switch_stream_handle_t new_stream = { 0 };
-                               SWITCH_STANDARD_STREAM(new_stream);
-
-                               new_stream.write_function(&new_stream, "#JSGF V1.0");
-                               if (!zstr(grammar->encoding)) {
-                                       new_stream.write_function(&new_stream, " %s", grammar->encoding);
-                                       if (!zstr(grammar->language)) {
-                                               new_stream.write_function(&new_stream, " %s", grammar->language);
-                                       }
-                               }
-
-                               new_stream.write_function(&new_stream,
-                                       ";\ngrammar org.freeswitch.srgs_to_jsgf;\n"
-                                       "public ");
-
-                               /* output root rule */
-                               if (grammar->root_rule) {
-                                       if (!create_jsgf(grammar, grammar->root_rule, &new_stream)) {
-                                               switch_safe_free(new_stream.data);
-                                               return 0;
-                                       }
-                               } else {
-                                       int num_rules = 0;
-                                       int first = 1;
-
-                                       for (child = node->child; child; child = child->next) {
-                                               if (child->type == SNT_RULE && child->value.rule.is_public) {
-                                                       num_rules++;
-                                               }
-                                       }
-
-                                       if (num_rules > 1) {
-                                               new_stream.write_function(&new_stream, "<root> =");
-                                               for (child = node->child; child; child = child->next) {
-                                                       if (child->type == SNT_RULE && child->value.rule.is_public) {
-                                                               if (!first) {
-                                                                       new_stream.write_function(&new_stream, "%s", " |");
-                                                               }
-                                                               first = 0;
-                                                               new_stream.write_function(&new_stream, " <%s>", child->value.rule.id);
-                                                       }
-                                               }
-                                               new_stream.write_function(&new_stream, ";\n");
-                                       } else {
-                                               for (child = node->child; child; child = child->next) {
-                                                       if (child->type == SNT_RULE && child->value.rule.is_public) {
-                                                               grammar->root_rule = child;
-                                                               if (!create_jsgf(grammar, child, &new_stream)) {
-                                                                       switch_safe_free(new_stream.data);
-                                                                       return 0;
-                                                               } else {
-                                                                       break;
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               }
-
-                               /* output all rule definitions */
-                               for (child = node->child; child; child = child->next) {
-                                       if (child->type == SNT_RULE && child != grammar->root_rule) {
-                                               if (!create_jsgf(grammar, child, &new_stream)) {
-                                                       switch_safe_free(new_stream.data);
-                                                       return 0;
-                                               }
-                                       }
-                               }
-                               grammar->jsgf = switch_core_strdup(grammar->pool, new_stream.data);
-                               switch_safe_free(new_stream.data);
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "document jsgf = %s\n", grammar->jsgf);
-                       }
-                       break;
-               case SNT_RULE:
-                       if (node->child) {
-                               struct srgs_node *item = node->child;
-                               stream->write_function(stream, "<%s> =", node->value.rule.id);
-                               for (; item; item = item->next) {
-                                       if (!create_jsgf(grammar, item, stream)) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s jsgf rule failed\n", node->value.rule.id);
-                                               return 0;
-                                       }
-                               }
-                               stream->write_function(stream, ";\n");
-                       }
-                       break;
-               case SNT_STRING: {
-                       int len = strlen(node->value.string);
-                       int i;
-                       stream->write_function(stream, " ");
-                       for (i = 0; i < len; i++) {
-                               switch (node->value.string[i]) {
-                                       case '\\':
-                                       case '*':
-                                       case '+':
-                                       case '/':
-                                       case '(':
-                                       case ')':
-                                       case '[':
-                                       case ']':
-                                       case '{':
-                                       case '}':
-                                       case '=':
-                                       case '<':
-                                       case '>':
-                                       case ';':
-                                       case '|':
-                                               stream->write_function(stream, "\\");
-                                               break;
-                                       default:
-                                               break;
-                               }
-                               stream->write_function(stream, "%c", node->value.string[i]);
-                       }
-                       if (node->child) {
-                               if (!create_jsgf(grammar, node->child, stream)) {
-                                       return 0;
-                               }
-                       }
-                       break;
-               }
-               case SNT_ITEM:
-                       if (node->child) {
-                               struct srgs_node *item;
-                               if (node->value.item.repeat_min == 0 && node->value.item.repeat_max == 1) {
-                                       /* optional item */
-                                       stream->write_function(stream, " [");
-                                       for(item = node->child; item; item = item->next) {
-                                               if (!create_jsgf(grammar, item, stream)) {
-                                                       return 0;
-                                               }
-                                       }
-                                       stream->write_function(stream, " ]");
-                               } else {
-                                       /* minimum repeats */
-                                       int i;
-                                       for (i = 0; i < node->value.item.repeat_min; i++) {
-                                               if (node->value.item.repeat_min != 1 && node->value.item.repeat_max != 1) {
-                                                       stream->write_function(stream, " (");
-                                               }
-                                               for(item = node->child; item; item = item->next) {
-                                                       if (!create_jsgf(grammar, item, stream)) {
-                                                               return 0;
-                                                       }
-                                               }
-                                               if (node->value.item.repeat_min != 1 && node->value.item.repeat_max != 1) {
-                                                       stream->write_function(stream, " )");
-                                               }
-                                       }
-                                       if (node->value.item.repeat_max == INT_MAX) {
-                                               stream->write_function(stream, "*");
-                                       } else {
-                                               for (;i < node->value.item.repeat_max; i++) {
-                                                       stream->write_function(stream, " [");
-                                                       for(item = node->child; item; item = item->next) {
-                                                               if (!create_jsgf(grammar, item, stream)) {
-                                                                       return 0;
-                                                               }
-                                                       }
-                                                       stream->write_function(stream, " ]");
-                                               }
-                                       }
-                               }
-                       }
-                       break;
-               case SNT_ONE_OF:
-                       if (node->child) {
-                               struct srgs_node *item = node->child;
-                               if (node->num_children > 1) {
-                                       stream->write_function(stream, " (");
-                               }
-                               for (; item; item = item->next) {
-                                       if (item != node->child) {
-                                               stream->write_function(stream, " |");
-                                       }
-                                       stream->write_function(stream, " (");
-                                       if (!create_jsgf(grammar, item, stream)) {
-                                               return 0;
-                                       }
-                                       stream->write_function(stream, " )");
-                               }
-                               if (node->num_children > 1) {
-                                       stream->write_function(stream, " )");
-                               }
-                       }
-                       break;
-               case SNT_REF: {
-                       struct srgs_node *rule = node->value.ref.node;
-                       stream->write_function(stream, " <%s>", rule->value.rule.id);
-                       break;
-               }
-               case SNT_ANY:
-               default:
-                       /* ignore */
-                       return 1;
-       }
-       sn_log_node_close(node);
-       return 1;
-}
-
-/**
- * Generate JSGF from SRGS document.  Call this after parsing SRGS document.
- * @param grammar the grammar
- * @return the JSGF document or NULL
- */
-const char *srgs_grammar_to_jsgf(struct srgs_grammar *grammar)
-{
-       if (!grammar) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "grammar is NULL!\n");
-               return NULL;
-       }
-       switch_mutex_lock(grammar->mutex);
-       if (!grammar->jsgf && !create_jsgf(grammar, grammar->root, NULL)) {
-               switch_mutex_unlock(grammar->mutex);
-               return NULL;
-       }
-       switch_mutex_unlock(grammar->mutex);
-       return grammar->jsgf;
-}
-
-/**
- * Generate JSGF file from SRGS document.  Call this after parsing SRGS document.
- * @param grammar the grammar
- * @param basedir the base path to use if file does not already exist
- * @param ext the extension to use
- * @return the path or NULL
- */
-const char *srgs_grammar_to_jsgf_file(struct srgs_grammar *grammar, const char *basedir, const char *ext)
-{
-       if (!grammar) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "grammar is NULL!\n");
-               return NULL;
-       }
-       switch_mutex_lock(grammar->mutex);
-       if (!grammar->jsgf_file_name) {
-               char file_name_buf[SWITCH_UUID_FORMATTED_LENGTH + 1];
-               switch_file_t *file;
-               switch_size_t len;
-               const char *jsgf = srgs_grammar_to_jsgf(grammar);
-                switch_uuid_str(file_name_buf, sizeof(file_name_buf));
-               grammar->jsgf_file_name = switch_core_sprintf(grammar->pool, "%s%s%s.%s", basedir, SWITCH_PATH_SEPARATOR, file_name_buf, ext);
-               if (!jsgf) {
-                       switch_mutex_unlock(grammar->mutex);
-                       return NULL;
-               }
-
-               /* write grammar to file */
-               if (switch_file_open(&file, grammar->jsgf_file_name, SWITCH_FOPEN_WRITE | SWITCH_FOPEN_TRUNCATE | SWITCH_FOPEN_CREATE, SWITCH_FPROT_OS_DEFAULT, grammar->pool) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to create jsgf file: %s!\n", grammar->jsgf_file_name);
-                       grammar->jsgf_file_name = NULL;
-                       switch_mutex_unlock(grammar->mutex);
-                       return NULL;
-               }
-               len = strlen(jsgf);
-               switch_file_write(file, jsgf, &len);
-               switch_file_close(file);
-       }
-       switch_mutex_unlock(grammar->mutex);
-       return grammar->jsgf_file_name;
-}
-
-/**
- * Initialize SRGS parser.  This function is not thread safe.
- */
-int srgs_init(void)
-{
-       if (globals.init) {
-               return 1;
-       }
-
-       globals.init = SWITCH_TRUE;
-       switch_core_new_memory_pool(&globals.pool);
-       switch_core_hash_init(&globals.tag_defs);
-
-       add_root_tag_def("grammar", process_grammar, process_cdata_bad, "meta,metadata,lexicon,tag,rule");
-       add_tag_def("ruleref", process_ruleref, process_cdata_bad, "");
-       add_tag_def("token", process_attribs_ignore, process_cdata_ignore, "");
-       add_tag_def("tag", process_attribs_ignore, process_cdata_tag, "");
-       add_tag_def("one-of", process_attribs_ignore, process_cdata_tokens, "item");
-       add_tag_def("item", process_item, process_cdata_tokens, "token,ruleref,item,one-of,tag");
-       add_tag_def("rule", process_rule, process_cdata_tokens, "token,ruleref,item,one-of,tag,example");
-       add_tag_def("example", process_attribs_ignore, process_cdata_ignore, "");
-       add_tag_def("lexicon", process_attribs_ignore, process_cdata_bad, "");
-       add_tag_def("meta", process_attribs_ignore, process_cdata_bad, "");
-       add_tag_def("metadata", process_attribs_ignore, process_cdata_ignore, "ANY");
-       add_tag_def("ANY", process_attribs_ignore, process_cdata_ignore, "ANY");
-
-       return 1;
-}
-
-/**
- * Destruction of SRGS parser environment
- */
-void srgs_destroy(void)
-{
-       if (globals.init) {
-               if (globals.tag_defs) {
-                       switch_core_hash_destroy(&globals.tag_defs);
-                       globals.tag_defs = NULL;
-               }
-               if (globals.pool) {
-                       switch_core_destroy_memory_pool(&globals.pool);
-                       globals.pool = NULL;
-               }
-               globals.init = SWITCH_FALSE;
-       }
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/srgs.h b/src/mod/event_handlers/mod_rayo/srgs.h
deleted file mode 100644 (file)
index e32b522..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * srgs.h -- Transforms SRGS into regex rules
- *
- */
-#ifndef SRGS_H
-#define SRGS_H
-
-#include <switch.h>
-
-struct srgs_parser;
-struct srgs_grammar;
-
-enum srgs_match_type {
-       /** invalid input */
-       SMT_NO_MATCH,
-       /** matches, can accept more input */
-       SMT_MATCH,
-       /** not yet a match, but valid input so far */
-       SMT_MATCH_PARTIAL,
-       /** matches, cannot accept more input */
-       SMT_MATCH_END
-};
-
-SWITCH_DECLARE(int) srgs_init(void);
-SWITCH_DECLARE(void) srgs_destroy(void);
-SWITCH_DECLARE(struct srgs_parser *) srgs_parser_new(const char *uuid);
-SWITCH_DECLARE(struct srgs_grammar *) srgs_parse(struct srgs_parser *parser, const char *document);
-SWITCH_DECLARE(const char *) srgs_grammar_to_regex(struct srgs_grammar *grammar);
-SWITCH_DECLARE(const char *) srgs_grammar_to_jsgf(struct srgs_grammar *grammar);
-SWITCH_DECLARE(const char *) srgs_grammar_to_jsgf_file(struct srgs_grammar *grammar, const char *basedir, const char *ext);
-SWITCH_DECLARE(enum srgs_match_type) srgs_grammar_match(struct srgs_grammar *grammar, const char *input, const char **interpretation);
-SWITCH_DECLARE(void) srgs_parser_destroy(struct srgs_parser *parser);
-
-#endif
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/test/test_iks.c b/src/mod/event_handlers/mod_rayo/test/test_iks.c
deleted file mode 100644 (file)
index 29b424a..0000000
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
-#include <switch.h>
-#include <iksemel.h>
-#include <test/switch_test.h>
-#include <iks_helpers.h>
-
-static const char *voxeo_grammar =
-       "<iq id='8847' type='set' from='usera@192.168.1.10/voxeo3' to='e7632f74-8c55-11e2-84b0-e538fa88a1ef@192.168.1.10'><input xmlns='urn:xmpp:rayo:input:1' min-confidence='0.3' mode='DTMF' sensitivity='0.5'><grammar content-type='application/grammar+voxeo'><![CDATA[[1 DIGITS]]]></grammar></input></iq>";
-
-
-static const char *repeating_bracket =
-       "<iq id='8847' type='set' from='usera@192.168.1.10/voxeo3' to='e7632f74-8c55-11e2-84b0-e538fa88a1ef@192.168.1.10'><input xmlns='urn:xmpp:rayo:input:1' min-confidence='0.3' mode='DTMF' sensitivity='0.5'><grammar content-type='application/grammar+voxeo'><![CDATA[[1 DIGITS]>]]]]]]]]] ]] ]]></grammar></input></iq>";
-
-
-static const char *normal_cdata =
-       "<iq id='8847' type='set' from='usera@192.168.1.10/voxeo3' to='e7632f74-8c55-11e2-84b0-e538fa88a1ef@192.168.1.10'><input xmlns='urn:xmpp:rayo:input:1' min-confidence='0.3' mode='DTMF' sensitivity='0.5'><grammar content-type='application/grammar+voxeo'><![CDATA[1 DIGITS]]></grammar></input></iq>";
-
-
-static const char *empty_cdata =
-       "<iq id='8847' type='set' from='usera@192.168.1.10/voxeo3' to='e7632f74-8c55-11e2-84b0-e538fa88a1ef@192.168.1.10'><input xmlns='urn:xmpp:rayo:input:1' min-confidence='0.3' mode='DTMF' sensitivity='0.5'><grammar content-type='application/grammar+voxeo'><![CDATA[]]></grammar></input></iq>";
-
-static const char *rayo_test_srgs =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" root=\"MAINRULE\">\n"
-       "  <rule id=\"MAINRULE\">\n"
-       "    <one-of>\n"
-       "      <item>\n"
-       "        <item repeat=\"0-1\"> need a</item>\n"
-       "        <item repeat=\"0-1\"> i need a</item>\n"
-       "        <one-of>\n"
-       "          <item> clue </item>\n"
-       "        </one-of>\n"
-       "        <tag> out.concept = \"clue\";</tag>\n"
-       "      </item>\n"
-       "      <item>\n"
-       "        <item repeat=\"0-1\"> have an</item>\n"
-       "        <item repeat=\"0-1\"> i have an</item>\n"
-       "        <one-of>\n"
-       "          <item> answer </item>\n"
-       "        </one-of>\n"
-       "        <tag> out.concept = \"answer\";</tag>\n"
-       "      </item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>";
-
-
-#define MATCH 1
-#define NO_MATCH 0
-
-
-/**
- * main program
- */
-FST_BEGIN()
-
-FST_SUITE_BEGIN(iks)
-
-FST_SETUP_BEGIN()
-{
-}
-FST_SETUP_END()
-
-FST_TEARDOWN_BEGIN()
-{
-}
-FST_TEARDOWN_END()
-
-
-FST_TEST_BEGIN(iks_cdata_bug)
-{
-       iks *iq = NULL;
-       iks *input = NULL;
-       iksparser *p = iks_dom_new(&iq);
-       const char *cdata;
-       fst_check(IKS_OK == iks_parse(p, voxeo_grammar, 0, 1));
-       iks_parser_delete(p);
-       fst_check((input = iks_find(iq, "input")));
-       fst_check((cdata = iks_find_cdata(input, "grammar")));
-       fst_check_string_equals("[1 DIGITS]", cdata);
-       iks_delete(iq);
-}
-FST_TEST_END()
-
-FST_TEST_BEGIN(repeating_bracket)
-{
-       iks *iq = NULL;
-       iks *input = NULL;
-       iksparser *p = iks_dom_new(&iq);
-       const char *cdata;
-       fst_check(IKS_OK == iks_parse(p, repeating_bracket, 0, 1));
-       iks_parser_delete(p);
-       fst_check((input = iks_find(iq, "input")));
-       fst_check((cdata = iks_find_cdata(input, "grammar")));
-       fst_check_string_equals("[1 DIGITS]>]]]]]]]]] ]] ", cdata);
-       iks_delete(iq);
-}
-FST_TEST_END()
-
-FST_TEST_BEGIN(normal_cdata)
-{
-       iks *iq = NULL;
-       iks *input = NULL;
-       iksparser *p = iks_dom_new(&iq);
-       const char *cdata;
-       fst_check(IKS_OK == iks_parse(p, normal_cdata, 0, 1));
-       iks_parser_delete(p);
-       fst_check((input = iks_find(iq, "input")));
-       fst_check((cdata = iks_find_cdata(input, "grammar")));
-       fst_check_string_equals("1 DIGITS", cdata);
-       iks_delete(iq);
-}
-FST_TEST_END()
-
-FST_TEST_BEGIN(empty_cdata)
-{
-       iks *iq = NULL;
-       iks *input = NULL;
-       iksparser *p = iks_dom_new(&iq);
-       const char *cdata;
-       fst_check(IKS_OK == iks_parse(p, empty_cdata, 0, 1));
-       iks_parser_delete(p);
-       fst_check((input = iks_find(iq, "input")));
-       fst_check(NULL == (cdata = iks_find_cdata(input, "grammar")));
-       iks_delete(iq);
-}
-FST_TEST_END()
-
-
-FST_TEST_BEGIN(rayo_test_srgs)
-{
-       iks *grammar = NULL;
-       iksparser *p = iks_dom_new(&grammar);
-       fst_check(IKS_OK == iks_parse(p, rayo_test_srgs, 0, 1));
-       iks_parser_delete(p);
-       iks_delete(grammar);
-}
-FST_TEST_END()
-
-FST_TEST_BEGIN(iks_helper_value_matches)
-{
-       fst_check(MATCH == value_matches("1", "1,2,3"));
-       fst_check(MATCH == value_matches("2", "1,2,3"));
-       fst_check(MATCH == value_matches("3", "1,2,3"));
-       fst_check(NO_MATCH == value_matches("4", "1,2,3"));
-       fst_check(NO_MATCH == value_matches("1,2", "1,2,3"));
-       fst_check(NO_MATCH == value_matches(NULL, "1,2,3"));
-       fst_check(NO_MATCH == value_matches(NULL, NULL));
-       fst_check(NO_MATCH == value_matches("1", NULL));
-       fst_check(NO_MATCH == value_matches("", "1,2,3"));
-       fst_check(NO_MATCH == value_matches("", ""));
-       fst_check(NO_MATCH == value_matches("1", ""));
-       fst_check(MATCH == value_matches("duplex", "duplex,send,recv"));
-       fst_check(MATCH == value_matches("send", "duplex,send,recv"));
-       fst_check(MATCH == value_matches("recv", "duplex,send,recv"));
-       fst_check(NO_MATCH == value_matches("sendrecv", "duplex,send,recv"));
-       fst_check(MATCH == value_matches("duplex1", "duplex1,duplex2,duplex3"));
-       fst_check(MATCH == value_matches("duplex2", "duplex1,duplex2,duplex3"));
-       fst_check(MATCH == value_matches("duplex3", "duplex1,duplex2,duplex3"));
-       fst_check(NO_MATCH == value_matches("duplex4", "duplex1,duplex2,duplex3"));
-       fst_check(NO_MATCH == value_matches("duplex", "duplex1,duplex2,duplex3"));
-}
-FST_TEST_END()
-
-FST_TEST_BEGIN(dialback_key)
-{
-       char *dialback_key;
-
-       dialback_key = iks_server_dialback_key("s3cr3tf0rd14lb4ck", "xmpp.example.com", "example.org", "D60000229F");
-       fst_check_string_equals("37c69b1cf07a3f67c04a5ef5902fa5114f2c76fe4a2686482ba5b89323075643", dialback_key);
-       switch_safe_free(dialback_key);
-       fst_check(NULL == (dialback_key = iks_server_dialback_key("", "xmpp.example.com", "example.org", "D60000229F")));
-       switch_safe_free(dialback_key);
-       fst_check(NULL == (dialback_key = iks_server_dialback_key("s3cr3tf0rd14lb4ck", "", "example.org", "D60000229F")));
-       switch_safe_free(dialback_key);
-       fst_check(NULL == (dialback_key = iks_server_dialback_key("s3cr3tf0rd14lb4ck", "xmpp.example.com", "", "D60000229F")));
-       switch_safe_free(dialback_key);
-       fst_check(NULL == (dialback_key = iks_server_dialback_key("s3cr3tf0rd14lb4ck", "xmpp.example.com", "example.org", "")));
-       switch_safe_free(dialback_key);
-       fst_check(NULL == (dialback_key = iks_server_dialback_key(NULL, "xmpp.example.com", "example.org", "D60000229F")));
-       switch_safe_free(dialback_key);
-       fst_check(NULL == (dialback_key = iks_server_dialback_key("s3cr3tf0rd14lb4ck", NULL, "example.org", "D60000229F")));
-       switch_safe_free(dialback_key);
-       fst_check(NULL == (dialback_key = iks_server_dialback_key("s3cr3tf0rd14lb4ck", "xmpp.example.com", NULL, "D60000229F")));
-       switch_safe_free(dialback_key);
-       fst_check(NULL == (dialback_key = iks_server_dialback_key("s3cr3tf0rd14lb4ck", "xmpp.example.com", "example.org", NULL)));
-       switch_safe_free(dialback_key);
-}
-FST_TEST_END()
-
-FST_TEST_BEGIN(validate_dtmf)
-{
-       fst_check(SWITCH_TRUE == iks_attrib_is_dtmf_digit("1"));
-       fst_check(SWITCH_TRUE == iks_attrib_is_dtmf_digit("A"));
-       fst_check(SWITCH_TRUE == iks_attrib_is_dtmf_digit("a"));
-       fst_check(SWITCH_TRUE == iks_attrib_is_dtmf_digit("D"));
-       fst_check(SWITCH_TRUE == iks_attrib_is_dtmf_digit("d"));
-       fst_check(SWITCH_TRUE == iks_attrib_is_dtmf_digit("*"));
-       fst_check(SWITCH_TRUE == iks_attrib_is_dtmf_digit("#"));
-       fst_check(SWITCH_FALSE == iks_attrib_is_dtmf_digit("E"));
-       fst_check(SWITCH_FALSE == iks_attrib_is_dtmf_digit(NULL));
-       fst_check(SWITCH_FALSE == iks_attrib_is_dtmf_digit(""));
-       fst_check(SWITCH_FALSE == iks_attrib_is_dtmf_digit("11"));
-       fst_check(SWITCH_TRUE == validate_optional_attrib(iks_attrib_is_dtmf_digit, "A"));
-       fst_check(SWITCH_TRUE == validate_optional_attrib(iks_attrib_is_dtmf_digit, "1"));
-       fst_check(SWITCH_FALSE == validate_optional_attrib(iks_attrib_is_dtmf_digit, "Z"));
-       fst_check(SWITCH_FALSE == validate_optional_attrib(iks_attrib_is_dtmf_digit, "11"));
-       fst_check(SWITCH_TRUE == validate_optional_attrib(iks_attrib_is_dtmf_digit, NULL));
-       fst_check(SWITCH_TRUE == validate_optional_attrib(iks_attrib_is_dtmf_digit, ""));
-}
-FST_TEST_END()
-
-
-FST_SUITE_END()
-
-FST_END()
diff --git a/src/mod/event_handlers/mod_rayo/test/test_nlsml.c b/src/mod/event_handlers/mod_rayo/test/test_nlsml.c
deleted file mode 100644 (file)
index 7319a04..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-
-
-#include <switch.h>
-#include <test/switch_test.h>
-#include <nlsml.h>
-
-static const char *nlsml_good =
-       "<result x-model=\"http://theYesNoModel\""
-       " xmlns:xf=\"http://www.w3.org/2000/xforms\""
-       " grammar=\"http://theYesNoGrammar\">"
-       "<interpretation>"
-       "<xf:instance>"
-       "<myApp:yes_no>"
-       "<response>yes</response>"
-       "</myApp:yes_no>"
-       "</xf:instance>"
-       "<input>ok</input>"
-       "</interpretation>"
-       "</result>";
-
-static const char *nlsml_bad =
-       "<result grammar=\"http://grammar\" x-model=\"http://dataModel\"\n"
-       "xmlns:xf=\"http://www.w3.org/2000/xforms\"\n"
-       "  <interpretation/>\n"
-       "</result>\n";
-
-static const char *nlsml_match_with_model_instance =
-       "<result grammar=\"http://grammar\" x-model=\"http://dataModel\"\n"
-       " xmlns:xf=\"http://www.w3.org/2000/xforms\">\"\n"
-       "  <interpretation confidence=\"75\" grammar=\"http://grammar\"\n"
-       "    x-model=\"http://dataModel\"\n"
-       "    xmlns:xf=\"http://www.w3.org/2000/xforms\">\n"
-       "\n"
-       "    <model>\n"
-       "      <xf:group name=\"nameAddress\">\n"
-       "          <string name=\"name\"/>\n"
-       "          <string name=\"street\"/>\n"
-       "          <string name=\"city\"/>\n"
-       "          <string name=\"state\"/>\n"
-       "          <string name=\"zip\">\n"
-       "            <mask>ddddd</mask>\n"
-       "          </string>\n"
-       "      </xf:group>\n"
-       "    </model>\n"
-       "\n"
-       "    <xf:instance name=\"nameAddress\">\n"
-       "      <nameAddress>\n"
-       "          <street confidence=\"75\">123 Maple Street</street>\n"
-       "          <city>Mill Valley</city>\n"
-       "          <state>CA</state>\n"
-       "          <zip>90952</zip>\n"
-       "      </nameAddress>\n"
-       "    </xf:instance>\n"
-       "    <input>\n"
-       "      My address is 123 Maple Street,\n"
-       "      Mill Valley, California, 90952\n"
-       "    </input>n"
-       "  </interpretation>\n"
-       "</result>\n";
-
-static const char *nlsml_multi_input =
-       "<result grammar=\"http://grammar\" x-model=\"http://dataModel\"\n"
-       " xmlns:xf=\"http://www.w3.org/2000/xforms\">\"\n"
-       "  <interpretation confidence=\"75\" grammar=\"http://grammar\"\n"
-       "    x-model=\"http://dataModel\"\n"
-       "    xmlns:xf=\"http://www.w3.org/2000/xforms\">\n"
-       "\n"
-       "    <input>\n"
-       "       <input mode=\"speech\" confidence=\"50\"\n"
-       "         timestamp-start=\"2000-04-03T0:00:00\"\n"
-       "         timestamp-end=\"2000-04-03T0:00:00.2\">fried</input>\n"
-       "       <input mode=\"speech\" confidence=\"100\"\n"
-       "         timestamp-start=\"2000-04-03T0:00:00.25\"\n"
-       "         timestamp-end=\"2000-04-03T0:00:00.6\">onions</input>\n"
-       "    </input>\n"
-       "  </interpretation>\n"
-       "</result>\n";
-
-static const char *nlsml_no_input =
-       "<result grammar=\"http://grammar\" x-model=\"http://dataModel\"\n"
-       " xmlns:xf=\"http://www.w3.org/2000/xforms\">\"\n"
-       "  <interpretation confidence=\"100\" grammar=\"http://grammar\"\n"
-       "    x-model=\"http://dataModel\"\n"
-       "    xmlns:xf=\"http://www.w3.org/2000/xforms\">\n"
-       "\n"
-       "    <input>\n"
-       "       <noinput/>\n"
-       "    </input>\n"
-       "  </interpretation>\n"
-       "</result>\n";
-
-static const char *nlsml_multi_input_dtmf =
-       "<result grammar=\"http://grammar\" x-model=\"http://dataModel\"\n"
-       " xmlns:xf=\"http://www.w3.org/2000/xforms\">\"\n"
-       "  <interpretation confidence=\"100\" grammar=\"http://grammar\"\n"
-       "    x-model=\"http://dataModel\"\n"
-       "    xmlns:xf=\"http://www.w3.org/2000/xforms\">\n"
-       "\n"
-       "    <input>\n"
-       "     <input mode=\"speech\"><nomatch/></input>\n"
-       "     <input mode=\"dtmf\">1 2 3 4</input>\n"
-       "    </input>\n"
-       "  </interpretation>\n"
-       "</result>\n";
-
-static const char *nlsml_meta =
-       "<result grammar=\"http://grammar\" x-model=\"http://dataModel\"\n"
-       " xmlns:xf=\"http://www.w3.org/2000/xforms\">\n"
-       "<interpretation grammar=\"http://toppings\"\n"
-       " xmlns:xf=\"http://www.w3.org/2000/xforms\">\n"
-       "  <input mode=\"speech\">\n"
-       "    what toppings do you have?\n"
-       "  </input>\n"
-       "  <xf:model>\n"
-       "    <xf:group xf:name=\"question\">\n"
-       "      <xf:string xf:name=\"questioned_item\"/>\n"
-       "      <xf:string xf:name=\"questioned_property\"/>\n"
-       "    </xf:group>\n"
-       "  </xf:model>\n"
-       "  <xf:instance>\n"
-       "    <xf:question>\n"
-       "      <xf:questioned_item>toppings</xf:questioned_item>\n"
-       "      <xf:questioned_property>\n"
-       "    availability\n"
-       "      </xf:questioned_property>\n"
-       "    </xf:question>\n"
-       "  </xf:instance>\n"
-       "</interpretation>\n"
-       "</result>\n";
-
-static const char *nlsml_simple_ambiguity =
-       "<result xmlns:xf=\"http://www.w3.org/2000/xforms\"\n"
-       "   grammar=\"http://flight\">\n"
-       "  <interpretation confidence=\"60\">\n"
-       "    <input mode=\"speech\">\n"
-       "      I want to go to Pittsburgh\n"
-       "    </input>\n"
-       "    <xf:model>\n"
-       "      <group name=\"airline\">\n"
-       "        <string name=\"to_city\"/>\n"
-       "      </group>\n"
-       "    </xf:model>\n"
-       "    <xf:instance>\n"
-       "      <myApp:airline>\n"
-       "        <to_city>Pittsburgh</to_city>\n"
-       "      </myApp:airline>\n"
-       "    </xf:instance>\n"
-       "  </interpretation>\n"
-       "  <interpretation confidence=\"40\">\n"
-       "      <input>I want to go to Stockholm</input>\n"
-       "    <xf:model>\n"
-       "      <group name=\"airline\">\n"
-       "        <string name=\"to_city\"/>\n"
-       "      </group>\n"
-       "    </xf:model>\n"
-       "    <xf:instance>\n"
-       "      <myApp:airline>\n"
-       "        <to_city>Stockholm</to_city>\n"
-       "      </myApp:airline>\n"
-       "    </xf:instance>\n"
-       "  </interpretation>\n"
-       "</result>\n";
-
-const char *nlsml_mixed_initiative =
-       "<result xmlns:xf=\"http://www.w3.org/2000/xforms\"\n"
-       "   grammar=\"http://foodorder\">\n"
-       "  <interpretation confidence=\"100\" >\n"
-       "    <xf:model>\n"
-       "      <group name=\"order\">\n"
-       "        <group name=\"food_item\" maxOccurs=\"*\">\n"
-       "          <group name=\"pizza\" >\n"
-       "            <string name=\"ingredients\" maxOccurs=\"*\"/>\n"
-       "          </group>\n"
-       "          <group name=\"burger\">\n"
-       "            <string name=\"ingredients\" maxOccurs=\"*/\">\n"
-       "          </group>\n"
-       "        </group>\n"
-       "        <group name=\"drink_item\" maxOccurs=\"*\">\n"
-       "          <string name=\"size\">\n"
-       "          <string name=\"type\">\n"
-       "        </group>\n"
-       "        <string name=\"delivery_method\"/>\n"
-       "      </group>\n"
-       "    </xf:model>\n"
-       "    <xf:instance>\n"
-       "      <myApp:order>\n"
-       "        <food_item confidence=\"100\">\n"
-       "          <pizza>\n"
-       "            <xf:ingredients confidence=\"100\">\n"
-       "              pepperoni\n"
-       "            </xf:ingredients>\n"
-       "            <xf:ingredients confidence=\"100\">\n"
-       "              cheese\n"
-       "            </xf:ingredients>\n"
-       "          </pizza>\n"
-       "          <pizza>\n"
-       "            <ingredients>sausage</ingredients>\n"
-       "          </pizza>\n"
-       "        </food_item>\n"
-       "        <drink_item confidence=\"100\">\n"
-       "          <size>2-liter</size>\n"
-       "        </drink_item>\n"
-       "        <delivery_method>to go</delivery_method>\n"
-       "      </myApp:order>\n"
-       "    </xf:instance>\n"
-       "      <input mode=\"speech\">I would like 2 pizzas,\n"
-       "         one with pepperoni and cheese, one with sausage\n"
-       "         and a bottle of coke, to go.\n"
-       "      </input>\n"
-       "  </interpretation>\n"
-       "</result>\n";
-
-static const char *nlsml_no_match =
-       "<result grammar=\"http://grammar\" x-model=\"http://dataModel\"\n"
-       " xmlns:xf=\"http://www.w3.org/2000/xforms\">\"\n"
-       "  <interpretation confidence=\"100\" grammar=\"http://grammar\"\n"
-       "    x-model=\"http://dataModel\"\n"
-       "    xmlns:xf=\"http://www.w3.org/2000/xforms\">\n"
-       "\n"
-       "    <input>\n"
-       "     <input mode=\"speech\"><nomatch/></input>\n"
-       "     <input mode=\"dtmf\"><nomatch/></input>\n"
-       "    </input>\n"
-       "  </interpretation>\n"
-       "</result>\n";
-
-
-static const char *nlsml_dtmf_result =
-       "<result xmlns='http://www.ietf.org/xml/ns/mrcpv2' "
-       "xmlns:xf='http://www.w3.org/2000/xforms'><interpretation>"
-       "<input mode='dtmf' confidence='100'>1 2 3 4</input>"
-       "<instance>1 2 3 4</instance>"
-       "</interpretation></result>";
-
-
-static const char *nlsml_good_normalized =
-       "<result x-model='http://theYesNoModel'"
-       " xmlns:xf='http://www.w3.org/2000/xforms'"
-       " grammar='http://theYesNoGrammar'"
-       " xmlns='http://www.ietf.org/xml/ns/mrcpv2'>"
-       "<interpretation>"
-       "<xf:instance>"
-       "<myApp:yes_no>"
-       "<response>yes</response>"
-       "</myApp:yes_no>"
-       "</xf:instance>"
-       "<input>ok</input>"
-       "</interpretation>"
-       "</result>";
-
-
-static const char *nlsml_dtmf_instance_result =
-       "<result xmlns='http://www.ietf.org/xml/ns/mrcpv2' "
-       "xmlns:xf='http://www.w3.org/2000/xforms'><interpretation>"
-       "<input mode='dtmf' confidence='100'>1</input>"
-       "<instance>foo</instance>"
-       "</interpretation></result>";
-
-
-FST_BEGIN()
-
-FST_SUITE_BEGIN(nlsml)
-
-FST_SETUP_BEGIN()
-{
-       fst_requires(nlsml_init());
-}
-FST_SETUP_END()
-
-FST_TEARDOWN_BEGIN()
-{
-}
-FST_TEARDOWN_END()
-
-/**
- * Test parsing NLSML example results
- */
-FST_TEST_BEGIN(parse_nlsml_examples)
-{
-       fst_check(NMT_MATCH == nlsml_parse(nlsml_good, "1234"));
-       fst_check(NMT_BAD_XML == nlsml_parse(nlsml_bad, "1234"));
-       fst_check(NMT_MATCH == nlsml_parse(nlsml_match_with_model_instance, "1234"));
-       fst_check(NMT_MATCH == nlsml_parse(nlsml_multi_input, "1234"));
-       fst_check(NMT_NOINPUT == nlsml_parse(nlsml_no_input, "1234"));
-       fst_check(NMT_MATCH == nlsml_parse(nlsml_multi_input_dtmf, "1234"));
-       fst_check(NMT_MATCH == nlsml_parse(nlsml_meta, "1234"));
-       fst_check(NMT_MATCH == nlsml_parse(nlsml_simple_ambiguity, "1234"));
-       fst_check(NMT_MATCH == nlsml_parse(nlsml_mixed_initiative, "1234"));
-       fst_check(NMT_NOMATCH == nlsml_parse(nlsml_no_match, "1234"));
-}
-FST_TEST_END()
-
-/**
- * Test creating DTMF match result
- */
-FST_TEST_BEGIN(create_dtmf_match)
-{
-       iks *result = nlsml_create_dtmf_match("1234", NULL);
-       char *result_str;
-       fst_requires(result);
-       result_str = iks_string(NULL, result);
-       fst_check_string_equals(nlsml_dtmf_result, result_str);
-       iks_free(result_str);
-       iks_delete(result);
-}
-FST_TEST_END()
-
-
-/**
- * Test creating DTMF match result with instance interpretation
- */
-FST_TEST_BEGIN(create_dtmf_instance)
-{
-       iks *result = nlsml_create_dtmf_match("1", "foo");
-       char *result_str;
-       fst_requires(result);
-       result_str = iks_string(NULL, result);
-       fst_check_string_equals(nlsml_dtmf_instance_result, result_str);
-       iks_free(result_str);
-       iks_delete(result);
-}
-FST_TEST_END()
-
-/**
- * Test NLSML normalization
- */
-FST_TEST_BEGIN(normalize)
-{
-       iks *result = nlsml_normalize(nlsml_good);
-       char *result_str;
-
-       fst_requires(result);
-       result_str = iks_string(NULL, result);
-       fst_check_string_equals(nlsml_good_normalized, result_str);
-       iks_free(result_str);
-       iks_delete(result);
-}
-FST_TEST_END()
-
-
-FST_SUITE_END()
-
-FST_END()
diff --git a/src/mod/event_handlers/mod_rayo/test/test_srgs.c b/src/mod/event_handlers/mod_rayo/test/test_srgs.c
deleted file mode 100644 (file)
index 9bd6fc1..0000000
+++ /dev/null
@@ -1,1279 +0,0 @@
-
-
-#include <switch.h>
-#include <test/switch_test.h>
-#include <srgs.h>
-
-
-static const char *adhearsion_menu_grammar =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" version=\"1.0\" xml:lang=\"en-US\" mode=\"dtmf\" root=\"options\" tag-format=\"semantics/1.0-literals\">"
-       "  <rule id=\"options\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "      <item><tag>0</tag>1</item>\n"
-       "      <item><tag>1</tag>5</item>\n"
-       "      <item><tag>7</tag>7</item>\n"
-       "      <item><tag>3</tag>9</item>\n"
-       "      <item><tag>4</tag>715</item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>\n";
-
-static const char *adhearsion_large_menu_grammar =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" version=\"1.0\" xml:lang=\"en-US\" mode=\"dtmf\" root=\"options\" tag-format=\"semantics/1.0-literals\">"
-       "  <rule id=\"options\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "      <item><tag>0</tag>1</item>\n"
-       "      <item><tag>1</tag>5</item>\n"
-       "      <item><tag>2</tag>7</item>\n"
-       "      <item><tag>3</tag>9</item>\n"
-       "      <item><tag>4</tag>715</item>\n"
-       "      <item><tag>5</tag>716</item>\n"
-       "      <item><tag>6</tag>717</item>\n"
-       "      <item><tag>7</tag>718</item>\n"
-       "      <item><tag>8</tag>719</item>\n"
-       "      <item><tag>9</tag>720</item>\n"
-       "      <item><tag>10</tag>721</item>\n"
-       "      <item><tag>11</tag>722</item>\n"
-       "      <item><tag>12</tag>723</item>\n"
-       "      <item><tag>13</tag>724</item>\n"
-       "      <item><tag>14</tag>725</item>\n"
-       "      <item><tag>15</tag>726</item>\n"
-       "      <item><tag>16</tag>727</item>\n"
-       "      <item><tag>17</tag>728</item>\n"
-       "      <item><tag>18</tag>729</item>\n"
-       "      <item><tag>19</tag>730</item>\n"
-       "      <item><tag>20</tag>731</item>\n"
-       "      <item><tag>21</tag>732</item>\n"
-       "      <item><tag>22</tag>733</item>\n"
-       "      <item><tag>23</tag>734</item>\n"
-       "      <item><tag>24</tag>735</item>\n"
-       "      <item><tag>25</tag>736</item>\n"
-       "      <item><tag>26</tag>737</item>\n"
-       "      <item><tag>27</tag>738</item>\n"
-       "      <item><tag>28</tag>739</item>\n"
-       "      <item><tag>29</tag>740</item>\n"
-       "      <item><tag>30</tag>741</item>\n"
-       "      <item><tag>31</tag>742</item>\n"
-       "      <item><tag>32</tag>743</item>\n"
-       "      <item><tag>33</tag>744</item>\n"
-       "      <item><tag>34</tag>745</item>\n"
-       "      <item><tag>35</tag>746</item>\n"
-       "      <item><tag>36</tag>747</item>\n"
-       "      <item><tag>37</tag>748</item>\n"
-       "      <item><tag>38</tag>749</item>\n"
-       "      <item><tag>39</tag>750</item>\n"
-       "      <item><tag>40</tag>751</item>\n"
-       "      <item><tag>41</tag>752</item>\n"
-       "      <item><tag>42</tag>753</item>\n"
-       "      <item><tag>43</tag>754</item>\n"
-       "      <item><tag>44</tag>755</item>\n"
-       "      <item><tag>45</tag>756</item>\n"
-       "      <item><tag>46</tag>757</item>\n"
-       "      <item><tag>47</tag>758</item>\n"
-       "      <item><tag>48</tag>759</item>\n"
-       "      <item><tag>49</tag>760</item>\n"
-       "      <item><tag>50</tag>761</item>\n"
-       "      <item><tag>51</tag>762</item>\n"
-       "      <item><tag>52</tag>763</item>\n"
-       "      <item><tag>53</tag>764</item>\n"
-       "      <item><tag>54</tag>765</item>\n"
-       "      <item><tag>55</tag>766</item>\n"
-       "      <item><tag>56</tag>767</item>\n"
-       "      <item><tag>57</tag>768</item>\n"
-       "      <item><tag>58</tag>769</item>\n"
-       "      <item><tag>59</tag>770</item>\n"
-       "      <item><tag>60</tag>771</item>\n"
-       "      <item><tag>61</tag>772</item>\n"
-       "      <item><tag>62</tag>773</item>\n"
-       "      <item><tag>63</tag>774</item>\n"
-       "      <item><tag>64</tag>775</item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>\n";
-
-static const char *duplicate_tag_grammar =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" version=\"1.0\" xml:lang=\"en-US\" mode=\"dtmf\" root=\"options\" tag-format=\"semantics/1.0-literals\">"
-       "  <rule id=\"options\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "      <item><tag>2</tag>1</item>\n"
-       "      <item><tag>2</tag>5</item>\n"
-       "      <item><tag>4</tag>7</item>\n"
-       "      <item><tag>4</tag>9</item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>\n";
-
-
-static const char *adhearsion_ask_grammar =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" version=\"1.0\" xml:lang=\"en-US\" mode=\"dtmf\" root=\"inputdigits\">"
-       "  <rule id=\"inputdigits\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "      <item>0</item>\n"
-       "      <item>1</item>\n"
-       "      <item>2</item>\n"
-       "      <item>3</item>\n"
-       "      <item>4</item>\n"
-       "      <item>5</item>\n"
-       "      <item>6</item>\n"
-       "      <item>7</item>\n"
-       "      <item>8</item>\n"
-       "      <item>9</item>\n"
-       "      <item>#</item>\n"
-       "      <item>*</item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>\n";
-
-
-static const char *multi_digit_grammar =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" version=\"1.0\" xml:lang=\"en-US\" mode=\"dtmf\" root=\"misc\">"
-       "  <rule id=\"misc\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "      <item>01</item>\n"
-       "      <item>13</item>\n"
-       "      <item> 24</item>\n"
-       "      <item>36 </item>\n"
-       "      <item>223</item>\n"
-       "      <item>5 5</item>\n"
-       "      <item>63</item>\n"
-       "      <item>76</item>\n"
-       "      <item>8 8 0</item>\n"
-       "      <item>93</item>\n"
-       "      <item> # 2 </item>\n"
-       "      <item>*3</item>\n"
-       "      <item>  27</item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>\n";
-
-
-static const char *multi_rule_grammar =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" version=\"1.0\" xml:lang=\"en-US\" mode=\"dtmf\">"
-       "  <rule id=\"misc\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "      <item>01</item>\n"
-       "      <item>13</item>\n"
-       "      <item> 24</item>\n"
-       "      <item>36 </item>\n"
-       "      <item>5 5</item>\n"
-       "      <item>63</item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "  <rule id=\"misc2\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "      <item>76</item>\n"
-       "      <item>8 8 0</item>\n"
-       "      <item>93</item>\n"
-       "      <item> # 2 </item>\n"
-       "      <item>*3</item>\n"
-       "      <item>  27</item>\n"
-       "      <item>223</item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>\n";
-
-
-static const char *rayo_example_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "       <item>\n"
-       "         <item repeat=\"4\"><ruleref uri=\"#digit\"/></item>\n"
-       "           #\n"
-       "         </item>"
-       "       <item>"
-       "         * 9 \n"
-       "       </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *bad_ref_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "       <item>\n"
-       "         <item repeat=\"4\"><ruleref uri=\"#digi\"/></item>\n"
-       "           #\n"
-       "         </item>"
-       "       <item>"
-       "         * 9 \n"
-       "       </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *adhearsion_ask_grammar_bad =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" version=\"1.0\" xml:lang=\"en-US\" mode=\"dtmf\" root=\"inputdigits\">"
-       "  <rule id=\"inputdigits\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "      <item>0</item>\n"
-       "      <item>1</item\n"
-       "      <item>2</item>\n"
-       "      <item>3</item>\n"
-       "      <item>4</item>\n"
-       "      <item>5</item>\n"
-       "      <item>6</item>\n"
-       "      <item>7</item>\n"
-       "      <item>8</item>\n"
-       "      <item>9</item>\n"
-       "      <item>#</item>\n"
-       "      <item>*</item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>\n";
-
-
-static const char *repeat_item_grammar_bad =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "       <item>\n"
-       "         <item repeat=\"3-1\">4</item>\n"
-       "           #\n"
-       "       </item>"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_grammar_bad2 =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "       <item>\n"
-       "         <item repeat=\"-1\">4</item>\n"
-       "           #\n"
-       "       </item>"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_grammar_bad3 =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "       <item>\n"
-       "         <item repeat=\"1--1\">4</item>\n"
-       "           #\n"
-       "       </item>"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_grammar_bad4 =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "       <item>\n"
-       "         <item repeat=\"ABC\">4</item>\n"
-       "           #\n"
-       "       </item>"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_grammar_bad5 =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "       <item>\n"
-       "         <item repeat=\"\">4</item>\n"
-       "           #\n"
-       "       </item>"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_grammar_bad6 =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "       <item>\n"
-       "         <item repeat=\"1-Z\">4</item>\n"
-       "           #\n"
-       "       </item>"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "       <item>\n"
-       "         <item repeat=\"4-4\"><ruleref uri=\"#digit\"/></item>\n"
-       "           #\n"
-       "         </item>"
-       "       <item>"
-       "         * 9 \n"
-       "       </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_range_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "       <item>\n"
-       "         <item repeat=\"4-6\"><ruleref uri=\"#digit\"/></item>\n"
-       "           #\n"
-       "         </item>"
-       "       <item>"
-       "         * 9 \n"
-       "       </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_optional_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "       <item>\n"
-       "         <item repeat=\"0-1\"><ruleref uri=\"#digit\"/></item>\n"
-       "           #\n"
-       "         </item>"
-       "       <item>"
-       "         * 9 \n"
-       "       </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_star_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "       <item>\n"
-       "         <item repeat=\"0-\"><ruleref uri=\"#digit\"/></item>\n"
-       "           #\n"
-       "         </item>"
-       "       <item>"
-       "         * 9 \n"
-       "       </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *repeat_item_plus_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "    <one-of>\n"
-       "       <item>\n"
-       "         <item repeat=\"1-\"><ruleref uri=\"#digit\"/></item>\n"
-       "           #\n"
-       "         </item>"
-       "       <item>"
-       "         * 9 \n"
-       "       </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-
-static const char *repeat_item_range_ambiguous_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "         <item repeat=\"1-3\"><ruleref uri=\"#digit\"/></item>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-
-static const char *repeat_item_range_optional_pound_grammar =
-       "<grammar mode=\"dtmf\" version=\"1.0\""
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\""
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"digit\">\n"
-       "    <one-of>\n"
-       "       <item> 0 </item>\n"
-       "       <item> 1 </item>\n"
-       "       <item> 2 </item>\n"
-       "       <item> 3 </item>\n"
-       "       <item> 4 </item>\n"
-       "       <item> 5 </item>\n"
-       "       <item> 6 </item>\n"
-       "       <item> 7 </item>\n"
-       "       <item> 8 </item>\n"
-       "       <item> 9 </item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"pin\" scope=\"public\">\n"
-       "       <one-of>\n"
-       "         <item>\n"
-       "            <item repeat=\"1-2\"><ruleref uri=\"#digit\"/></item>\n"
-       "            <item repeat=\"0-1\">#</item>\n"
-       "         </item>\n"
-       "         <item repeat=\"3\"><ruleref uri=\"#digit\"/></item>\n"
-       "       </one-of>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-
-/*
-<polite> = please | kindly | oh mighty computer;
-public <command> = [ <polite> ] don't crash;
-*/
-static const char *voice_srgs1 =
-       "<grammar mode=\"voice\" version=\"1.0\"\n"
-       "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-       "    xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                        http://www.w3.org/TR/speech-grammar/grammar.xsd\"\n"
-       "    language\"en-US\"\n"
-       "    xmlns=\"http://www.w3.org/2001/06/grammar\">\n"
-       "\n"
-       "    <rule id=\"polite\">\n"
-       "    <one-of>\n"
-       "      <item>please</item>\n"
-       "      <item>kindly</item>\n"
-       "      <item> oh mighty computer</item>\n"
-       "    </one-of>\n"
-       "    </rule>\n"
-       "\n"
-       "    <rule id=\"command\" scope=\"public\">\n"
-       "       <item repeat=\"0-1\"><ruleref uri=\"#polite\"/></item>\n"
-       "       <item>don't crash</item>\n"
-       "    </rule>\n"
-       "</grammar>\n";
-
-static const char *voice_jsgf =
-       "#JSGF V1.0;\n"
-       "grammar org.freeswitch.srgs_to_jsgf;\n"
-       "public <command> = [ <polite> ] don't crash;\n"
-       "<polite> = ( ( please ) | ( kindly ) | ( oh mighty computer ) );\n";
-
-static const char *rayo_test_srgs =
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" root=\"MAINRULE\">\n"
-       "  <rule id=\"MAINRULE\">\n"
-       "    <one-of>\n"
-       "      <item>\n"
-       "        <item repeat=\"0-1\"> need a</item>\n"
-       "        <item repeat=\"0-1\"> i need a</item>\n"
-       "        <one-of>\n"
-       "          <item> clue </item>\n"
-       "        </one-of>\n"
-       "        <tag> out.concept = \"clue\";</tag>\n"
-       "      </item>\n"
-       "      <item>\n"
-       "        <item repeat=\"0-1\"> have an</item>\n"
-       "        <item repeat=\"0-1\"> i have an</item>\n"
-       "        <one-of>\n"
-       "          <item> answer </item>\n"
-       "        </one-of>\n"
-       "        <tag> out.concept = \"answer\";</tag>\n"
-       "      </item>\n"
-       "    </one-of>\n"
-       "  </rule>\n"
-       "</grammar>";
-
-
-/* removed the ruleref to URL from example */
-static const char *w3c_example_grammar =
-       "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-
-       "<!DOCTYPE grammar PUBLIC \"-//W3C//DTD GRAMMAR 1.0//EN\""
-       "                  \"http://www.w3.org/TR/speech-grammar/grammar.dtd\">\n"
-       "\n"
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" xml:lang=\"en\"\n"
-       "         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-       "         xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                             http://www.w3.org/TR/speech-grammar/grammar.xsd\"\n"
-       "         version=\"1.0\" mode=\"voice\" root=\"basicCmd\">\n"
-       "\n"
-       "<meta name=\"author\" content=\"Stephanie Williams\"/>\n"
-       "\n"
-       "<rule id=\"basicCmd\" scope=\"public\">\n"
-       "  <example> please move the window </example>\n"
-       "  <example> open a file </example>\n"
-       "\n"
-       "  <!--ruleref uri=\"http://grammar.example.com/politeness.grxml#startPolite\"/-->\n"
-       "\n"
-       "  <ruleref uri=\"#command\"/>\n"
-       "  <!--ruleref uri=\"http://grammar.example.com/politeness.grxml#endPolite\"/-->\n"
-       "\n"
-       "</rule>\n"
-       "\n"
-       "<rule id=\"command\">\n"
-       "  <ruleref uri=\"#action\"/> <ruleref uri=\"#object\"/>\n"
-       "</rule>\n"
-       "\n"
-       "<rule id=\"action\">\n"
-       "   <one-of>\n"
-       "      <item weight=\"10\"> open   <tag>TAG-CONTENT-1</tag> </item>\n"
-       "      <item weight=\"2\">  close  <tag>TAG-CONTENT-2</tag> </item>\n"
-       "      <item weight=\"1\">  delete <tag>TAG-CONTENT-3</tag> </item>\n"
-       "      <item weight=\"1\">  move   <tag>TAG-CONTENT-4</tag> </item>\n"
-       "    </one-of>\n"
-       "</rule>\n"
-       "\n"
-       "<rule id=\"object\">\n"
-       "  <item repeat=\"0-1\">\n"
-       "    <one-of>\n"
-       "      <item> the </item>\n"
-       "      <item> a </item>\n"
-       "    </one-of>\n"
-       "  </item>\n"
-       "\n"
-       "  <one-of>\n"
-       "      <item> window </item>\n"
-       "      <item> file </item>\n"
-       "      <item> menu </item>\n"
-       "  </one-of>\n"
-       "</rule>\n"
-       "\n"
-       "</grammar>";
-
-
-static const char *metadata_grammar =
-       "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
-
-       "<!DOCTYPE grammar PUBLIC \"-//W3C//DTD GRAMMAR 1.0//EN\""
-       "                  \"http://www.w3.org/TR/speech-grammar/grammar.dtd\">\n"
-       "\n"
-       "<grammar xmlns=\"http://www.w3.org/2001/06/grammar\" xml:lang=\"en\"\n"
-       "         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
-       "         xsi:schemaLocation=\"http://www.w3.org/2001/06/grammar\n"
-       "                             http://www.w3.org/TR/speech-grammar/grammar.xsd\"\n"
-       "         version=\"1.0\" mode=\"voice\" root=\"basicCmd\">\n"
-       "\n"
-       "<meta name=\"author\" content=\"Stephanie Williams\"/>\n"
-       "<metadata>\n"
-       "  <foo>\n"
-       "   <bar>\n"
-       "    <luser/>\n"
-       "   </bar>\n"
-       "  </foo>\n"
-       "</metadata>\n"
-       "\n"
-       "<rule id=\"basicCmd\" scope=\"public\">\n"
-       "  <example> please move the window </example>\n"
-       "  <example> open a file </example>\n"
-       "\n"
-       "  <!--ruleref uri=\"http://grammar.example.com/politeness.grxml#startPolite\"/-->\n"
-       "\n"
-       "  <ruleref uri=\"#command\"/>\n"
-       "  <!--ruleref uri=\"http://grammar.example.com/politeness.grxml#endPolite\"/-->\n"
-       "\n"
-       "</rule>\n"
-       "\n"
-       "<rule id=\"command\">\n"
-       "  <ruleref uri=\"#action\"/> <ruleref uri=\"#object\"/>\n"
-       "</rule>\n"
-       "\n"
-       "<rule id=\"action\">\n"
-       "   <one-of>\n"
-       "      <item weight=\"10\"> open   <tag>TAG-CONTENT-1</tag> </item>\n"
-       "      <item weight=\"2\">  close  <tag>TAG-CONTENT-2</tag> </item>\n"
-       "      <item weight=\"1\">  delete <tag>TAG-CONTENT-3</tag> </item>\n"
-       "      <item weight=\"1\">  move   <tag>TAG-CONTENT-4</tag> </item>\n"
-       "    </one-of>\n"
-       "</rule>\n"
-       "\n"
-       "<rule id=\"object\">\n"
-       "  <item repeat=\"0-1\">\n"
-       "    <one-of>\n"
-       "      <item> the </item>\n"
-       "      <item> a </item>\n"
-       "    </one-of>\n"
-       "  </item>\n"
-       "\n"
-       "  <one-of>\n"
-       "      <item> window </item>\n"
-       "      <item> file </item>\n"
-       "      <item> menu </item>\n"
-       "  </one-of>\n"
-       "</rule>\n"
-       "\n"
-       "</grammar>";
-
-
-FST_BEGIN()
-
-FST_SUITE_BEGIN(srgs)
-
-FST_SETUP_BEGIN()
-{
-       fst_requires(srgs_init());
-}
-FST_SETUP_END()
-
-FST_TEARDOWN_BEGIN()
-{
-}
-FST_TEARDOWN_END()
-
-/**
- * Test matching against adhearsion menu grammar
- */
-FST_TEST_BEGIN(match_adhearsion_menu_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, adhearsion_menu_grammar)));
-
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check_string_equals("0", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "2", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "3", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "4", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "5", &interpretation));
-       fst_check_string_equals("1", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "6", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH == srgs_grammar_match(grammar, "7", &interpretation));
-       fst_check_string_equals("7", interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "715", &interpretation));
-       fst_check_string_equals("4", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "8", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "9", &interpretation));
-       fst_check_string_equals("3", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "*", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "27", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "223", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0123456789*#", &interpretation));
-       fst_check(NULL == interpretation);
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-/**
- * Test matching against adhearsion menu grammar
- */
-FST_TEST_BEGIN(match_adhearsion_large_menu_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, adhearsion_large_menu_grammar)));
-
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check_string_equals("0", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "2", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "3", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "4", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "5", &interpretation));
-       fst_check_string_equals("1", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "6", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH == srgs_grammar_match(grammar, "7", &interpretation));
-       fst_check_string_equals("2", interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "715", &interpretation));
-       fst_check_string_equals("4", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "8", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "9", &interpretation));
-       fst_check_string_equals("3", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "*", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "27", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "223", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0123456789*#", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "761", &interpretation));
-       fst_check_string_equals("50", interpretation);
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-/**
- * Test matching with duplicate tags
- */
-FST_TEST_BEGIN(match_duplicate_tag_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, duplicate_tag_grammar)));
-
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check_string_equals("2", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "2", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "3", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "4", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "5", &interpretation));
-       fst_check_string_equals("2", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "6", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "7", &interpretation));
-       fst_check_string_equals("4", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "8", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "9", &interpretation));
-       fst_check_string_equals("4", interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "*", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "27", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "223", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0123456789*#", &interpretation));
-       fst_check(NULL == interpretation);
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-
-/**
- * Test matching against adhearsion ask grammar
- */
-FST_TEST_BEGIN(match_adhearsion_ask_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, adhearsion_ask_grammar)));
-
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "0", &interpretation));
-       fst_check(NULL == interpretation);
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "2", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "3", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "4", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "5", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "6", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "7", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "8", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "9", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "*", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "27", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "223", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0123456789*#", &interpretation));
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-/**
- * Test matching against grammar with multiple digits per item
- */
-FST_TEST_BEGIN(match_multi_digit_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, multi_digit_grammar)));
-
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "0", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "2", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "3", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "4", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "5", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "6", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "7", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "8", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "9", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "*", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "27", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "223", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0123456789*#", &interpretation));
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-FST_TEST_BEGIN(match_multi_rule_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, multi_rule_grammar)));
-
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "0", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "2", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "3", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "4", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "5", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "6", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "7", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "8", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "9", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "*", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "27", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "223", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0123456789*#", &interpretation));
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-FST_TEST_BEGIN(match_rayo_example_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, rayo_example_grammar)));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "0", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "2", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "3", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "4", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "5", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "6", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "7", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "8", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "9", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "*", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "*9", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1234#", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "2321#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "27", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "223", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "0123456789*#", &interpretation));
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-
-FST_TEST_BEGIN(parse_grammar)
-{
-       struct srgs_parser *parser;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-
-       fst_check(srgs_parse(parser, adhearsion_ask_grammar));
-       fst_check(NULL == srgs_parse(parser, adhearsion_ask_grammar_bad));
-       fst_check(NULL == srgs_parse(parser, NULL));
-       fst_check(NULL == srgs_parse(NULL, adhearsion_ask_grammar));
-       fst_check(NULL == srgs_parse(NULL, adhearsion_ask_grammar_bad));
-       fst_check(NULL == srgs_parse(parser, bad_ref_grammar));
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-FST_TEST_BEGIN(repeat_item_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_check(NULL == srgs_parse(parser, repeat_item_grammar_bad));
-       fst_check(NULL == srgs_parse(parser, repeat_item_grammar_bad2));
-       fst_check(NULL == srgs_parse(parser, repeat_item_grammar_bad3));
-       fst_check(NULL == srgs_parse(parser, repeat_item_grammar_bad4));
-       fst_check(NULL == srgs_parse(parser, repeat_item_grammar_bad5));
-       fst_check(NULL == srgs_parse(parser, repeat_item_grammar_bad6));
-       fst_requires((grammar = srgs_parse(parser, repeat_item_grammar)));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1111#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1111", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1234#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1234", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "11115#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "11115", &interpretation));
-       fst_requires((grammar = srgs_parse(parser, repeat_item_range_grammar)));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1111#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1111", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1234#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1234", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "11115#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "11115", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "111156#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "111156", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "1111567#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "1111567", &interpretation));
-       fst_requires((grammar = srgs_parse(parser, repeat_item_optional_grammar)));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "1111#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "1111", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "1234#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "1234", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "11115#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "11115", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "111156#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "111156", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "1111567#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "1111567", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_requires((grammar = srgs_parse(parser, repeat_item_plus_grammar)));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1111#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1111", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1234#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1234", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "11115#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "11115", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "111156#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "111156", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "111157#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "111157", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-       fst_requires((grammar = srgs_parse(parser, repeat_item_star_grammar)));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1111#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1111", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1234#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1234", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "11115#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "11115", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "111156#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "111156", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "111157#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "111157", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1#", &interpretation));
-       fst_check(SMT_MATCH_PARTIAL == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A#", &interpretation));
-       fst_check(SMT_NO_MATCH == srgs_grammar_match(grammar, "A", &interpretation));
-
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-FST_TEST_BEGIN(repeat_item_range_ambiguous_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, repeat_item_range_ambiguous_grammar)));
-       fst_check(SMT_MATCH == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_MATCH == srgs_grammar_match(grammar, "12", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "123", &interpretation));
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-FST_TEST_BEGIN(repeat_item_range_optional_pound_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *interpretation;
-
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-       fst_requires((grammar = srgs_parse(parser, repeat_item_range_optional_pound_grammar)));
-       fst_check(SMT_MATCH == srgs_grammar_match(grammar, "1", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "1#", &interpretation));
-       fst_check(SMT_MATCH == srgs_grammar_match(grammar, "12", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "12#", &interpretation));
-       fst_check(SMT_MATCH_END == srgs_grammar_match(grammar, "123", &interpretation));
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-FST_TEST_BEGIN(jsgf)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       const char *jsgf;
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-
-       fst_requires((grammar = srgs_parse(parser, adhearsion_ask_grammar)));
-       fst_check((jsgf = srgs_grammar_to_jsgf(grammar)));
-       fst_requires((grammar = srgs_parse(parser, voice_srgs1)));
-       fst_check((jsgf = srgs_grammar_to_jsgf(grammar)));
-       fst_check_string_equals(voice_jsgf, jsgf);
-       fst_requires((grammar = srgs_parse(parser, multi_rule_grammar)));
-       fst_check((jsgf = srgs_grammar_to_jsgf(grammar)));
-       fst_requires((grammar = srgs_parse(parser, rayo_test_srgs)));
-       fst_check((jsgf = srgs_grammar_to_jsgf(grammar)));
-       fst_check(NULL == srgs_grammar_to_jsgf(NULL));
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-FST_TEST_BEGIN(w3c_example_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-
-       fst_requires((grammar = srgs_parse(parser, w3c_example_grammar)));
-       fst_check(srgs_grammar_to_jsgf(grammar));
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-
-FST_TEST_BEGIN(metadata_grammar)
-{
-       struct srgs_parser *parser;
-       struct srgs_grammar *grammar;
-       parser = srgs_parser_new("1234");
-       fst_requires(parser);
-
-       fst_requires((grammar = srgs_parse(parser, metadata_grammar)));
-       fst_check(srgs_grammar_to_jsgf(grammar));
-       srgs_parser_destroy(parser);
-}
-FST_TEST_END()
-
-FST_SUITE_END()
-
-FST_END()
-
diff --git a/src/mod/event_handlers/mod_rayo/xmpp_errors.def b/src/mod/event_handlers/mod_rayo/xmpp_errors.def
deleted file mode 100644 (file)
index 83adcef..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-XMPP_ERROR(STANZA_ERROR_BAD_REQUEST, "bad-request", "modify")
-XMPP_ERROR(STANZA_ERROR_CONFLICT, "conflict", "cancel")
-XMPP_ERROR(STANZA_ERROR_FEATURE_NOT_IMPLEMENTED, "feature-not-implemented", "modify")
-XMPP_ERROR(STANZA_ERROR_FORBIDDEN, "forbidden", "auth")
-XMPP_ERROR(STANZA_ERROR_GONE, "gone", "modify")
-XMPP_ERROR(STANZA_ERROR_INTERNAL_SERVER_ERROR, "internal-server-error", "wait")
-XMPP_ERROR(STANZA_ERROR_ITEM_NOT_FOUND, "item-not-found", "cancel")
-XMPP_ERROR(STANZA_ERROR_JID_MALFORMED, "jid-malformed", "modify")
-XMPP_ERROR(STANZA_ERROR_NOT_ACCEPTABLE, "not-acceptable", "modify")
-XMPP_ERROR(STANZA_ERROR_NOT_ALLOWED, "not-allowed", "cancel")
-XMPP_ERROR(STANZA_ERROR_NOT_AUTHORIZED, "not-authorized", "auth")
-XMPP_ERROR(STANZA_ERROR_RECIPIENT_UNAVAILABLE, "recipient-unavailable", "wait")
-XMPP_ERROR(STANZA_ERROR_REDIRECT, "redirect", "modify")
-XMPP_ERROR(STANZA_ERROR_REGISTRATION_REQUIRED, "registration-required", "auth")
-XMPP_ERROR(STANZA_ERROR_REMOTE_SERVER_NOT_FOUND, "remote-server-not-found", "cancel")
-XMPP_ERROR(STANZA_ERROR_REMOTE_SERVER_TIMEOUT, "remote-server-timeout", "wait")
-XMPP_ERROR(STANZA_ERROR_RESOURCE_CONSTRAINT, "resource-constraint", "wait")
-XMPP_ERROR(STANZA_ERROR_SERVICE_UNAVAILABLE, "service-unavailable", "cancel")
-XMPP_ERROR(STANZA_ERROR_UNDEFINED_CONDITION, "undefined-condition", "wait")
-XMPP_ERROR(STANZA_ERROR_UNEXPECTED_REQUEST, "unexpected-request", "wait")
diff --git a/src/mod/event_handlers/mod_rayo/xmpp_streams.c b/src/mod/event_handlers/mod_rayo/xmpp_streams.c
deleted file mode 100644 (file)
index c78fff7..0000000
+++ /dev/null
@@ -1,1890 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2015, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * xmpp_streams.c -- XMPP s2s and c2s streams
- *
- */
-#include <switch.h>
-#include <iksemel.h>
-
-#include <openssl/ssl.h>
-
-#include "xmpp_streams.h"
-#include "iks_helpers.h"
-#include "sasl.h"
-
-#define MAX_QUEUE_LEN 25000
-
-/**
- * Context for all streams
- */
-struct xmpp_stream_context {
-       /** memory pool to use */
-       switch_memory_pool_t *pool;
-       /** domain for this context */
-       const char *domain;
-       /** synchronizes access to streams and routes hashes */
-       switch_mutex_t *streams_mutex;
-       /** map of stream JID to routable stream */
-       switch_hash_t *routes;
-       /** map of stream ID to stream */
-       switch_hash_t *streams;
-       /** map of user ID to password */
-       switch_hash_t *users;
-       /** shared secret for server dialback */
-       const char *dialback_secret;
-       /** callback when a new resource is bound */
-       xmpp_stream_bind_callback bind_callback;
-       /** callback when a new stream is ready */
-       xmpp_stream_ready_callback ready_callback;
-       /** callback when a stream is destroyed */
-       xmpp_stream_destroy_callback destroy_callback;
-       /** callback when a stanza is received */
-       xmpp_stream_recv_callback recv_callback;
-       /** context shutdown flag */
-       int shutdown;
-       /** prevents context shutdown until all threads are finished */
-       switch_thread_rwlock_t *shutdown_rwlock;
-       /** path to cert PEM file */
-       const char *cert_pem_file;
-       /** path to key PEM file */
-       const char *key_pem_file;
-};
-
-/**
- * State of a stream
- */
-enum xmpp_stream_state {
-       /** new connection */
-       XSS_CONNECT,
-       /** encrypted comms established */
-       XSS_SECURE,
-       /** remote party authenticated */
-       XSS_AUTHENTICATED,
-       /** client resource bound */
-       XSS_RESOURCE_BOUND,
-       /** ready to accept requests */
-       XSS_READY,
-       /** terminating stream */
-       XSS_SHUTDOWN,
-       /** unrecoverable error */
-       XSS_ERROR,
-       /** destroyed */
-       XSS_DESTROY
-};
-
-/**
- * A client/server stream connection
- */
-struct xmpp_stream {
-       /** stream state */
-       enum xmpp_stream_state state;
-       /** true if server-to-server connection */
-       int s2s;
-       /** true if incoming connection */
-       int incoming;
-       /** Jabber ID of remote party */
-       char *jid;
-       /** stream ID */
-       char *id;
-       /** stream pool */
-       switch_memory_pool_t *pool;
-       /** address of this stream */
-       const char *address;
-       /** port of this stream */
-       int port;
-       /** synchronizes access to this stream */
-       switch_mutex_t *mutex;
-       /** socket to remote party */
-       switch_socket_t *socket;
-       /** socket poll descriptor */
-       switch_pollfd_t *pollfd;
-       /** XML stream parser */
-       iksparser *parser;
-       /** outbound message queue */
-       switch_queue_t *msg_queue;
-       /** true if no activity last poll */
-       int idle;
-       /** context for this stream */
-       struct xmpp_stream_context *context;
-       /** user private data */
-       void *user_private;
-};
-
-/**
- * A socket listening for new connections
- */
-struct xmpp_listener {
-       /** listener pool */
-       switch_memory_pool_t *pool;
-       /** listen address */
-       char *addr;
-       /** listen port */
-       switch_port_t port;
-       /** access control list */
-       const char *acl;
-       /** listen socket */
-       switch_socket_t *socket;
-       /** pollset for listen socket */
-       switch_pollfd_t *read_pollfd;
-       /** true if server to server connections only */
-       int s2s;
-       /** context for new streams */
-       struct xmpp_stream_context *context;
-};
-
-static void xmpp_stream_new_id(struct xmpp_stream *stream);
-static void xmpp_stream_set_id(struct xmpp_stream *stream, const char *id);
-
-/**
- * Convert xmpp stream state to string
- * @param state the xmpp stream state
- * @return the string value of state or "UNKNOWN"
- */
-static const char *xmpp_stream_state_to_string(enum xmpp_stream_state state)
-{
-       switch(state) {
-               case XSS_CONNECT: return "CONNECT";
-               case XSS_SECURE: return "SECURE";
-               case XSS_AUTHENTICATED: return "AUTHENTICATED";
-               case XSS_RESOURCE_BOUND: return "RESOURCE_BOUND";
-               case XSS_READY: return "READY";
-               case XSS_SHUTDOWN: return "SHUTDOWN";
-               case XSS_ERROR: return "ERROR";
-               case XSS_DESTROY: return "DESTROY";
-       }
-       return "UNKNOWN";
-}
-
-/**
- * Handle XMPP stream logging callback
- * @param user_data the xmpp stream
- * @param data the log message
- * @param size of the log message
- * @param is_incoming true if this is a log for a received message
- */
-static void on_stream_log(void *user_data, const char *data, size_t size, int is_incoming)
-{
-       if (size > 0) {
-               struct xmpp_stream *stream = (struct xmpp_stream *)user_data;
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, %s_%s %s %s\n", stream->jid, stream->address, stream->port, stream->s2s ? "s2s" : "c2s",
-                       stream->incoming ? "in" : "out", is_incoming ? "RECV" : "SEND", data);
-       }
-}
-
-/**
- * Send stanza to stream.
- */
-static void xmpp_stream_stanza_send(struct xmpp_stream *stream, iks *msg)
-{
-       /* send directly if client or outbound s2s stream */
-       if (!stream->s2s || !stream->incoming) {
-               iks_send(stream->parser, msg);
-               iks_delete(msg);
-       } else {
-               /* route message to outbound server stream */
-               xmpp_stream_context_send(stream->context, stream->jid, msg);
-               iks_delete(msg);
-       }
-}
-
-/**
- * Attach stream to connected socket
- * @param stream the stream
- * @param socket the connected socket
- */
-static void xmpp_stream_set_socket(struct xmpp_stream *stream, switch_socket_t *socket)
-{
-       stream->socket = socket;
-       switch_socket_create_pollset(&stream->pollfd, stream->socket, SWITCH_POLLIN | SWITCH_POLLERR, stream->pool);
-
-       /* connect XMPP stream parser to socket */
-       {
-               switch_os_socket_t os_socket;
-               switch_os_sock_get(&os_socket, stream->socket);
-               iks_connect_fd(stream->parser, os_socket);
-               /* TODO connect error checking */
-       }
-}
-
-/**
- * Assign a new ID to the stream
- * @param stream the stream
- */
-static void xmpp_stream_new_id(struct xmpp_stream *stream)
-{
-       char id[SWITCH_UUID_FORMATTED_LENGTH + 1] = { 0 };
-       switch_uuid_str(id, sizeof(id));
-       xmpp_stream_set_id(stream, id);
-}
-
-/**
- * Send session reply to server <stream> after auth is done
- * @param stream the xmpp stream
- */
-static void xmpp_send_server_header_features(struct xmpp_stream *stream)
-{
-       struct xmpp_stream_context *context = stream->context;
-       char *header = switch_mprintf(
-               "<stream:stream xmlns='"IKS_NS_SERVER"' xmlns:db='"IKS_NS_XMPP_DIALBACK"'"
-               " from='%s' id='%s' xml:lang='en' version='1.0'"
-               " xmlns:stream='"IKS_NS_XMPP_STREAMS"'><stream:features>"
-               "</stream:features>", context->domain, stream->id);
-
-       iks_send_raw(stream->parser, header);
-       free(header);
-}
-
-/**
- * Send bind + session reply to client <stream>
- * @param stream the xmpp stream
- */
-static void xmpp_send_client_header_bind(struct xmpp_stream *stream)
-{
-       struct xmpp_stream_context *context = stream->context;
-       char *header = switch_mprintf(
-               "<stream:stream xmlns='"IKS_NS_CLIENT"' xmlns:db='"IKS_NS_XMPP_DIALBACK"'"
-               " from='%s' id='%s' xml:lang='en' version='1.0'"
-               " xmlns:stream='"IKS_NS_XMPP_STREAMS"'><stream:features>"
-               "<bind xmlns='"IKS_NS_XMPP_BIND"'/>"
-               "<session xmlns='"IKS_NS_XMPP_SESSION"'/>"
-               "</stream:features>", context->domain, stream->id);
-
-       iks_send_raw(stream->parser, header);
-       free(header);
-}
-
-/**
- * Handle <presence> message callback
- * @param stream the stream
- * @param node the presence message
- */
-static void on_stream_presence(struct xmpp_stream *stream, iks *node)
-{
-       struct xmpp_stream_context *context = stream->context;
-       const char *from = iks_find_attrib(node, "from");
-
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, presence, state = %s\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state));
-
-       if (!from) {
-               if (stream->s2s) {
-                       /* from is required in s2s connections */
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, no presence from JID\n", stream->jid, stream->address, stream->port);
-                       return;
-               }
-
-               /* use stream JID if a c2s connection */
-               from = stream->jid;
-               if (zstr(from)) {
-                       /* error */
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, no presence from JID\n", stream->jid, stream->address, stream->port);
-                       return;
-               }
-               iks_insert_attrib(node, "from", from);
-       }
-       if (context->recv_callback) {
-               context->recv_callback(stream, node);
-       }
-}
-
-/**
- * Send <success> reply to xmpp stream <auth>
- * @param stream the xmpp stream.
- */
-static void xmpp_send_auth_success(struct xmpp_stream *stream)
-{
-       iks_send_raw(stream->parser, "<success xmlns='"IKS_NS_XMPP_SASL"'/>");
-}
-
-/**
- * Send <failure> reply to xmpp client <auth>
- * @param stream the xmpp stream to use.
- * @param reason the reason for failure
- */
-static void xmpp_send_auth_failure(struct xmpp_stream *stream, const char *reason)
-{
-       char *reply = switch_mprintf("<failure xmlns='"IKS_NS_XMPP_SASL"'>"
-               "<%s/></failure>", reason);
-       iks_send_raw(stream->parser, reply);
-       free(reply);
-}
-
-/**
- * Validate username and password
- * @param authzid authorization id
- * @param authcid authentication id
- * @param password
- * @return 1 if authenticated
- */
-static int verify_plain_auth(struct xmpp_stream_context *context, const char *authzid, const char *authcid, const char *password)
-{
-       char *correct_password;
-       if (zstr(authzid) || zstr(authcid) || zstr(password)) {
-               return 0;
-       }
-       correct_password = switch_core_hash_find(context->users, authcid);
-       return !zstr(correct_password) && !strcmp(correct_password, password);
-}
-
-/**
- * Send sasl reply to xmpp <stream>
- * @param stream the xmpp stream
- */
-static void xmpp_send_client_header_auth(struct xmpp_stream *stream)
-{
-       struct xmpp_stream_context *context = stream->context;
-       char *header = switch_mprintf(
-               "<stream:stream xmlns='"IKS_NS_CLIENT"' xmlns:db='"IKS_NS_XMPP_DIALBACK"'"
-               " from='%s' id='%s' xml:lang='en' version='1.0'"
-               " xmlns:stream='"IKS_NS_XMPP_STREAMS"'><stream:features>"
-               "<mechanisms xmlns='"IKS_NS_XMPP_SASL"'>"
-               "<mechanism>PLAIN</mechanism>"
-               "</mechanisms></stream:features>", context->domain, stream->id);
-       iks_send_raw(stream->parser, header);
-       free(header);
-}
-
-/**
- * Send sasl + starttls reply to xmpp <stream>
- * @param stream the xmpp stream
- */
-static void xmpp_send_client_header_tls(struct xmpp_stream *stream)
-{
-       if (stream->context->key_pem_file && stream->context->cert_pem_file) {
-               struct xmpp_stream_context *context = stream->context;
-               char *header = switch_mprintf(
-                       "<stream:stream xmlns='"IKS_NS_CLIENT"' xmlns:db='"IKS_NS_XMPP_DIALBACK"'"
-                       " from='%s' id='%s' xml:lang='en' version='1.0'"
-                       " xmlns:stream='"IKS_NS_XMPP_STREAMS"'><stream:features>"
-                       "<starttls xmlns='"IKS_NS_XMPP_TLS"'><required/></starttls>"
-                       "<mechanisms xmlns='"IKS_NS_XMPP_SASL"'>"
-                       "<mechanism>PLAIN</mechanism>"
-                       "</mechanisms></stream:features>", context->domain, stream->id);
-               iks_send_raw(stream->parser, header);
-               free(header);
-       } else {
-               /* not set up for TLS, skip it */
-               stream->state = XSS_SECURE;
-               xmpp_send_client_header_auth(stream);
-       }
-}
-
-/**
- * Send sasl reply to xmpp <stream>
- * @param stream the xmpp stream
- */
-static void xmpp_send_server_header_auth(struct xmpp_stream *stream)
-{
-       struct xmpp_stream_context *context = stream->context;
-       char *header = switch_mprintf(
-               "<stream:stream xmlns='"IKS_NS_SERVER"' xmlns:db='"IKS_NS_XMPP_DIALBACK"'"
-               " from='%s' id='%s' xml:lang='en' version='1.0'"
-               " xmlns:stream='"IKS_NS_XMPP_STREAMS"'>"
-               "<stream:features>"
-               "</stream:features>",
-               context->domain, stream->id);
-       iks_send_raw(stream->parser, header);
-       free(header);
-}
-
-/**
- * Send dialback to receiving server
- */
-static void xmpp_send_dialback_key(struct xmpp_stream *stream)
-{
-       struct xmpp_stream_context *context = stream->context;
-       char *dialback_key = iks_server_dialback_key(context->dialback_secret, stream->jid, context->domain, stream->id);
-       if (dialback_key) {
-               char *dialback = switch_mprintf(
-                       "<db:result from='%s' to='%s'>%s</db:result>",
-                       context->domain, stream->jid,
-                       dialback_key);
-               iks_send_raw(stream->parser, dialback);
-               free(dialback);
-               free(dialback_key);
-       } else {
-               /* TODO missing shared secret */
-       }
-}
-
-/**
- * Send initial <stream> header to peer server
- * @param stream the xmpp stream
- */
-static void xmpp_send_outbound_server_header(struct xmpp_stream *stream)
-{
-       struct xmpp_stream_context *context = stream->context;
-       char *header = switch_mprintf(
-               "<stream:stream xmlns='"IKS_NS_SERVER"' xmlns:db='"IKS_NS_XMPP_DIALBACK"'"
-               " from='%s' to='%s' xml:lang='en' version='1.0'"
-               " xmlns:stream='"IKS_NS_XMPP_STREAMS"'>", context->domain, stream->jid);
-       iks_send_raw(stream->parser, header);
-       free(header);
-}
-
-/**
- * Handle <starttls> message.
- * @param the xmpp stream
- * @param node the <starttls> packet
- */
-static void on_stream_starttls(struct xmpp_stream *stream, iks *node)
-{
-       /* wait for handshake to start */
-       if (iks_proceed_tls(stream->parser, stream->context->cert_pem_file, stream->context->key_pem_file) == IKS_OK) {
-               stream->state = XSS_SECURE;
-       } else {
-               stream->state = XSS_ERROR;
-       }
-}
-
-/**
- * Handle <auth> message.  Only PLAIN supported.
- * @param stream the xmpp stream
- * @param node the <auth> packet
- */
-static void on_stream_auth(struct xmpp_stream *stream, iks *node)
-{
-       struct xmpp_stream_context *context = stream->context;
-       const char *xmlns, *mechanism;
-       iks *auth_body;
-
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, auth, state = %s\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state));
-
-       /* wrong state for authentication */
-       if (stream->state != XSS_SECURE) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_WARNING, "%s, %s:%i, auth UNEXPECTED, state = %s\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state));
-               /* on_auth unexpected error */
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       /* unsupported authentication type */
-       xmlns = iks_find_attrib_soft(node, "xmlns");
-       if (strcmp(IKS_NS_XMPP_SASL, xmlns)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_WARNING, "%s, %s:%i, auth, state = %s, unsupported namespace: %s!\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state), xmlns);
-               /* on_auth namespace error */
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       /* unsupported SASL authentication mechanism */
-       mechanism = iks_find_attrib_soft(node, "mechanism");
-       if (strcmp("PLAIN", mechanism)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_WARNING, "%s, %s:%i, auth, state = %s, unsupported SASL mechanism: %s!\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state), mechanism);
-               xmpp_send_auth_failure(stream, "invalid-mechanism");
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       if ((auth_body = iks_child(node)) && iks_type(auth_body) == IKS_CDATA) {
-               /* get user and password from auth */
-               char *message = iks_cdata(auth_body);
-               char *authzid = NULL, *authcid, *password;
-               /* TODO use library for SASL! */
-               parse_plain_auth_message(message, &authzid, &authcid, &password);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, auth, state = %s, SASL/PLAIN decoded authzid = \"%s\" authcid = \"%s\"\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state), authzid, authcid);
-               if (verify_plain_auth(context, authzid, authcid, password)) {
-                       stream->jid = switch_core_strdup(stream->pool, authzid);
-                       if (!stream->s2s && !strchr(stream->jid, '@')) {
-                               /* add missing domain on client stream */
-                               stream->jid = switch_core_sprintf(stream->pool, "%s@%s", stream->jid, context->domain);
-                       }
-
-                       xmpp_send_auth_success(stream);
-                       stream->state = XSS_AUTHENTICATED;
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_WARNING, "%s, %s:%i, auth, state = %s, invalid user or password!\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state));
-                       xmpp_send_auth_failure(stream, "not-authorized");
-                       stream->state = XSS_ERROR;
-               }
-               switch_safe_free(authzid);
-               switch_safe_free(authcid);
-               switch_safe_free(password);
-       } else {
-               /* missing message */
-               stream->state = XSS_ERROR;
-       }
-}
-
-/**
- * Handle <iq><session> request
- * @param stream the xmpp stream
- * @param node the <iq> node
- * @return NULL
- */
-static iks *on_iq_set_xmpp_session(struct xmpp_stream *stream, iks *node)
-{
-       struct xmpp_stream_context *context = stream->context;
-       iks *reply;
-
-       switch(stream->state) {
-               case XSS_RESOURCE_BOUND: {
-                       if (context->ready_callback && !context->ready_callback(stream)) {
-                               reply = iks_new_error(node, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-                               stream->state = XSS_ERROR;
-                       } else {
-                               reply = iks_new_iq_result(node);
-                               stream->state = XSS_READY;
-
-                               /* add to available streams */
-                               switch_mutex_lock(context->streams_mutex);
-                               switch_core_hash_insert(context->routes, stream->jid, stream);
-                               switch_mutex_unlock(context->streams_mutex);
-                       }
-
-                       break;
-               }
-               case XSS_AUTHENTICATED:
-               case XSS_READY:
-               default:
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_WARNING, "%s, %s:%i, iq UNEXPECTED <session>, state = %s\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state));
-                       reply = iks_new_error(node, STANZA_ERROR_SERVICE_UNAVAILABLE);
-                       break;
-       }
-
-       return reply;
-}
-
-/**
- * Handle <iq><bind> request
- * @param stream the xmpp stream
- * @param node the <iq> node
- */
-static iks *on_iq_set_xmpp_bind(struct xmpp_stream *stream, iks *node)
-{
-       iks *reply = NULL;
-
-       switch(stream->state) {
-               case XSS_AUTHENTICATED: {
-                       struct xmpp_stream_context *context = stream->context;
-                       iks *bind = iks_find(node, "bind");
-                       iks *x;
-                       /* get optional client resource ID */
-                       char *resource_id = iks_find_cdata(bind, "resource");
-
-                       /* generate resource ID for client if not already set */
-                       if (zstr(resource_id)) {
-                               char resource_id_buf[SWITCH_UUID_FORMATTED_LENGTH + 1];
-                               switch_uuid_str(resource_id_buf, sizeof(resource_id_buf));
-                               resource_id = switch_core_strdup(stream->pool, resource_id_buf);
-                       }
-
-                       stream->jid = switch_core_sprintf(stream->pool, "%s/%s", stream->jid, resource_id);
-                       if (context->bind_callback && !context->bind_callback(stream)) {
-                               stream->jid = NULL;
-                               reply = iks_new_error(node, STANZA_ERROR_CONFLICT);
-                       } else {
-                               stream->state = XSS_RESOURCE_BOUND;
-
-                               reply = iks_new_iq_result(node);
-                               x = iks_insert(reply, "bind");
-                               iks_insert_attrib(x, "xmlns", IKS_NS_XMPP_BIND);
-                               iks_insert_cdata(iks_insert(x, "jid"), stream->jid, strlen(stream->jid));
-                       }
-                       break;
-               }
-               default:
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_WARNING, "%s, %s:%i, iq UNEXPECTED <bind>\n", stream->jid, stream->address, stream->port);
-                       reply = iks_new_error(node, STANZA_ERROR_NOT_ALLOWED);
-                       break;
-       }
-
-       return reply;
-}
-
-/**
- * Handle <iq> message callback
- * @param stream the stream
- * @param iq the packet
- */
-static void on_stream_iq(struct xmpp_stream *stream, iks *iq)
-{
-       struct xmpp_stream_context *context = stream->context;
-       switch(stream->state) {
-               case XSS_CONNECT:
-               case XSS_SECURE: {
-                       iks *error = iks_new_error(iq, STANZA_ERROR_NOT_AUTHORIZED);
-                       xmpp_stream_stanza_send(stream, error);
-                       break;
-               }
-               case XSS_AUTHENTICATED: {
-                       iks *cmd = iks_first_tag(iq);
-                       if (cmd && !strcmp("bind", iks_name(cmd)) && !strcmp(IKS_NS_XMPP_BIND, iks_find_attrib_soft(cmd, "xmlns"))) {
-                               iks *reply = on_iq_set_xmpp_bind(stream, iq);
-                               xmpp_stream_stanza_send(stream, reply);
-                       } else {
-                               iks *error = iks_new_error(iq, STANZA_ERROR_SERVICE_UNAVAILABLE);
-                               xmpp_stream_stanza_send(stream, error);
-                       }
-                       break;
-               }
-               case XSS_RESOURCE_BOUND: {
-                       iks *cmd = iks_first_tag(iq);
-                       if (cmd && !strcmp("session", iks_name(cmd)) && !strcmp(IKS_NS_XMPP_SESSION, iks_find_attrib_soft(cmd, "xmlns"))) {
-                               iks *reply = on_iq_set_xmpp_session(stream, iq);
-                               xmpp_stream_stanza_send(stream, reply);
-                       } else {
-                               iks *error = iks_new_error(iq, STANZA_ERROR_SERVICE_UNAVAILABLE);
-                               xmpp_stream_stanza_send(stream, error);
-                       }
-                       break;
-               }
-               case XSS_READY: {
-                       /* client requests */
-                       if (context->recv_callback) {
-                               context->recv_callback(stream, iq);
-                       }
-                       break;
-               }
-               case XSS_SHUTDOWN:
-               case XSS_DESTROY:
-               case XSS_ERROR: {
-                       iks *error = iks_new_error(iq, STANZA_ERROR_UNEXPECTED_REQUEST);
-                       xmpp_stream_stanza_send(stream, error);
-                       break;
-               }
-       };
-}
-
-/**
- * Handle </stream>
- * @param stream the stream
- */
-static void on_stream_stop(struct xmpp_stream *stream)
-{
-       if (stream->state != XSS_SHUTDOWN) {
-               iks_send_raw(stream->parser, "</stream:stream>");
-       }
-       stream->state = XSS_DESTROY;
-}
-
-/**
- * Handle <stream> from a client
- * @param stream the stream
- * @param node the stream message
- */
-static void on_client_stream_start(struct xmpp_stream *stream, iks *node)
-{
-       struct xmpp_stream_context *context = stream->context;
-       const char *to = iks_find_attrib_soft(node, "to");
-       const char *xmlns = iks_find_attrib_soft(node, "xmlns");
-
-       /* to is optional, must be server domain if set */
-       if (!zstr(to) && strcmp(context->domain, to)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, wrong server domain!\n", stream->jid, stream->address, stream->port);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       /* xmlns = client */
-       if (zstr(xmlns) || strcmp(xmlns, IKS_NS_CLIENT)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, wrong stream namespace!\n", stream->jid, stream->address, stream->port);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       switch (stream->state) {
-               case XSS_CONNECT:
-                       xmpp_send_client_header_tls(stream);
-                       break;
-               case XSS_SECURE:
-                       xmpp_send_client_header_auth(stream);
-                       break;
-               case XSS_AUTHENTICATED:
-                       /* client bind required */
-                       xmpp_stream_new_id(stream);
-                       xmpp_send_client_header_bind(stream);
-                       break;
-               case XSS_SHUTDOWN:
-                       /* strange... I expect IKS_NODE_STOP, this is a workaround. */
-                       stream->state = XSS_DESTROY;
-                       break;
-               case XSS_RESOURCE_BOUND:
-               case XSS_READY:
-               case XSS_ERROR:
-               case XSS_DESTROY:
-                       /* bad state */
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, bad state!\n", stream->jid, stream->address, stream->port);
-                       stream->state = XSS_ERROR;
-                       break;
-       }
-}
-
-/**
- * Handle <db:result type='valid'>
- */
-static void on_stream_dialback_result_valid(struct xmpp_stream *stream, iks *node)
-{
-       struct xmpp_stream_context *context = stream->context;
-
-       /* TODO check domain pair and allow access if pending request exists */
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, valid dialback result\n", stream->jid, stream->address, stream->port);
-
-       if (context->ready_callback && !context->ready_callback(stream)) {
-               stream->state = XSS_ERROR;
-       } else {
-               /* this stream is routable */
-               stream->state = XSS_READY;
-
-               /* add to available streams */
-               switch_mutex_lock(context->streams_mutex);
-               switch_core_hash_insert(context->routes, stream->jid, stream);
-               switch_mutex_unlock(context->streams_mutex);
-       }
-}
-
-/**
- * Handle <db:result type='valid'>
- */
-static void on_stream_dialback_result_invalid(struct xmpp_stream *stream, iks *node)
-{
-       /* close stream */
-       stream->state = XSS_ERROR;
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, invalid dialback result!\n", stream->jid, stream->address, stream->port);
-}
-
-/**
- * Handle <db:result type='error'>
- */
-static void on_stream_dialback_result_error(struct xmpp_stream *stream, iks *node)
-{
-       /* close stream */
-       stream->state = XSS_ERROR;
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, error dialback result!\n", stream->jid, stream->address, stream->port);
-}
-
-/**
- * Handle <db:result>
- */
-static void on_stream_dialback_result_key(struct xmpp_stream *stream, iks *node)
-{
-       struct xmpp_stream_context *context = stream->context;
-       const char *from = iks_find_attrib_soft(node, "from");
-       const char *to = iks_find_attrib_soft(node, "to");
-       iks *cdata = iks_child(node);
-       iks *reply;
-       const char *dialback_key = NULL;
-
-       if (cdata && iks_type(cdata) == IKS_CDATA) {
-               dialback_key = iks_cdata(cdata);
-       }
-       if (zstr(dialback_key)) {
-               iks *error = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "Missing dialback key");
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, dialback result missing key!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       if (zstr(from)) {
-               iks *error = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "Missing from");
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, dialback result missing from!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       if (zstr(to)) {
-               iks *error = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "Missing to");
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, dialback result missing to!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       if (strcmp(context->domain, to)) {
-               iks *error = iks_new_error(node, STANZA_ERROR_ITEM_NOT_FOUND);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, invalid domain!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       /* this stream is not routable */
-       stream->state = XSS_READY;
-       stream->jid = switch_core_strdup(stream->pool, from);
-
-       if (context->ready_callback && !context->ready_callback(stream)) {
-               iks *error = iks_new_error(node, STANZA_ERROR_INTERNAL_SERVER_ERROR);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       /* TODO validate key */
-       reply = iks_new("db:result");
-       iks_insert_attrib(reply, "from", to);
-       iks_insert_attrib(reply, "to", from);
-       iks_insert_attrib(reply, "type", "valid");
-       iks_send(stream->parser, reply);
-       iks_delete(reply);
-}
-
-/**
- * Handle <db:result>
- */
-static void on_stream_dialback_result(struct xmpp_stream *stream, iks *node)
-{
-       const char *type = iks_find_attrib_soft(node, "type");
-
-       if (stream->state == XSS_ERROR || stream->state == XSS_DESTROY) {
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       if (zstr(type)) {
-               on_stream_dialback_result_key(stream, node);
-       } else if (!strcmp("valid", type)) {
-               on_stream_dialback_result_valid(stream, node);
-       } else if (!strcmp("invalid", type)) {
-               on_stream_dialback_result_invalid(stream, node);
-       } else if (!strcmp("error", type)) {
-               on_stream_dialback_result_error(stream, node);
-       }
-}
-
-/**
- * Handle <db:verify>
- */
-static void on_stream_dialback_verify(struct xmpp_stream *stream, iks *node)
-{
-       struct xmpp_stream_context *context = stream->context;
-       const char *from = iks_find_attrib_soft(node, "from");
-       const char *id = iks_find_attrib_soft(node, "id");
-       const char *to = iks_find_attrib_soft(node, "to");
-       iks *cdata = iks_child(node);
-       iks *reply;
-       const char *dialback_key = NULL;
-       char *expected_key = NULL;
-       int valid;
-
-       if (stream->state == XSS_ERROR || stream->state == XSS_DESTROY) {
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       if (cdata && iks_type(cdata) == IKS_CDATA) {
-               dialback_key = iks_cdata(cdata);
-       }
-       if (zstr(dialback_key)) {
-               iks *error = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "Missing dialback key");
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, dialback verify missing key!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               return;
-       }
-
-       if (zstr(id)) {
-               iks *error = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "Missing id");
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, dialback verify missing stream ID!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               return;
-       }
-
-       if (zstr(from)) {
-               iks *error = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "Missing from");
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, dialback verify missing from!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               return;
-       }
-
-       if (zstr(to)) {
-               iks *error = iks_new_error_detailed(node, STANZA_ERROR_BAD_REQUEST, "Missing to");
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, dialback verify missing to!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               return;
-       }
-
-       if (strcmp(context->domain, to)) {
-               iks *error = iks_new_error(node, STANZA_ERROR_ITEM_NOT_FOUND);
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, invalid domain!\n", stream->jid, stream->address, stream->port);
-               iks_send(stream->parser, error);
-               iks_delete(error);
-               return;
-       }
-
-       expected_key = iks_server_dialback_key(context->dialback_secret, from, to, id);
-       valid = expected_key && !strcmp(expected_key, dialback_key);
-
-       reply = iks_new("db:verify");
-       iks_insert_attrib(reply, "from", to);
-       iks_insert_attrib(reply, "to", from);
-       iks_insert_attrib(reply, "id", id);
-       iks_insert_attrib(reply, "type", valid ? "valid" : "invalid");
-       iks_send(stream->parser, reply);
-       iks_delete(reply);
-       free(expected_key);
-
-       if (!valid) {
-               /* close the stream */
-               stream->state = XSS_ERROR;
-       }
-}
-
-/**
- * Handle <stream> from an outbound peer server
- */
-static void on_outbound_server_stream_start(struct xmpp_stream *stream, iks *node)
-{
-       const char *xmlns = iks_find_attrib_soft(node, "xmlns");
-
-       /* xmlns = server */
-       if (zstr(xmlns) || strcmp(xmlns, IKS_NS_SERVER)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, wrong stream namespace!\n", stream->jid, stream->address, stream->port);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       switch (stream->state) {
-               case XSS_CONNECT: {
-                       /* get stream ID and send dialback */
-                       const char *id = iks_find_attrib_soft(node, "id");
-                       if (zstr(id)) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, missing stream ID!\n", stream->jid, stream->address, stream->port);
-                               stream->state = XSS_ERROR;
-                               return;
-                       }
-                       xmpp_stream_set_id(stream, id);
-
-                       /* send dialback */
-                       xmpp_send_dialback_key(stream);
-                       break;
-               }
-               case XSS_SHUTDOWN:
-                       /* strange... I expect IKS_NODE_STOP, this is a workaround. */
-                       stream->state = XSS_DESTROY;
-                       break;
-               case XSS_SECURE:
-               case XSS_AUTHENTICATED:
-               case XSS_RESOURCE_BOUND:
-               case XSS_READY:
-               case XSS_ERROR:
-               case XSS_DESTROY:
-                       /* bad state */
-                       stream->state = XSS_ERROR;
-                       break;
-       }
-}
-
-/**
- * Handle <stream> from an inbound peer server
- * @param stream the stream
- * @param node the stream message
- */
-static void on_inbound_server_stream_start(struct xmpp_stream *stream, iks *node)
-{
-       struct xmpp_stream_context *context = stream->context;
-       const char *to = iks_find_attrib_soft(node, "to");
-       const char *xmlns = iks_find_attrib_soft(node, "xmlns");
-
-       /* to is required, must be server domain */
-       if (zstr(to) || strcmp(context->domain, to)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, wrong server domain!\n", stream->jid, stream->address, stream->port);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       /* xmlns = server */
-       if (zstr(xmlns) || strcmp(xmlns, IKS_NS_SERVER)) {
-               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, wrong stream namespace!\n", stream->jid, stream->address, stream->port);
-               stream->state = XSS_ERROR;
-               return;
-       }
-
-       switch (stream->state) {
-               case XSS_CONNECT:
-                       xmpp_send_server_header_auth(stream);
-                       break;
-               case XSS_SECURE:
-                       break;
-               case XSS_AUTHENTICATED: {
-                       if (context->ready_callback && !context->ready_callback(stream)) {
-                               stream->state = XSS_ERROR;
-                               break;
-                       }
-
-                       /* all set */
-                       xmpp_send_server_header_features(stream);
-                       stream->state = XSS_READY;
-
-                       /* add to available streams */
-                       switch_mutex_lock(context->streams_mutex);
-                       switch_core_hash_insert(context->routes, stream->jid, stream);
-                       switch_mutex_unlock(context->streams_mutex);
-                       break;
-               }
-               case XSS_SHUTDOWN:
-                       /* strange... I expect IKS_NODE_STOP, this is a workaround. */
-                       stream->state = XSS_DESTROY;
-                       break;
-               case XSS_RESOURCE_BOUND:
-               case XSS_READY:
-               case XSS_ERROR:
-               case XSS_DESTROY:
-                       /* bad state */
-                       stream->state = XSS_ERROR;
-                       break;
-       }
-}
-
-/**
- * Handle XML stream callback
- * @param user_data the xmpp stream
- * @param type stream type (start/normal/stop/etc)
- * @param node optional XML node
- * @return IKS_OK
- */
-static int on_stream(void *user_data, int type, iks *node)
-{
-       struct xmpp_stream *stream = (struct xmpp_stream *)user_data;
-
-       stream->idle = 0;
-
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, state = %s, node type = %s\n", stream->jid, stream->address, stream->port, xmpp_stream_state_to_string(stream->state), iks_node_type_to_string(type));
-
-       switch(type) {
-               case IKS_NODE_START:
-                       /* <stream> */
-                       if (node) {
-                               if (stream->s2s) {
-                                       if (stream->incoming) {
-                                               on_inbound_server_stream_start(stream, node);
-                                       } else {
-                                               on_outbound_server_stream_start(stream, node);
-                                       }
-                               } else {
-                                       on_client_stream_start(stream, node);
-                               }
-                       } else {
-                               stream->state = XSS_ERROR;
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, missing node!\n", stream->jid, stream->address, stream->port);
-                       }
-                       break;
-               case IKS_NODE_NORMAL:
-                       /* stanza */
-                       if (node) {
-                               const char *name = iks_name(node);
-                               if (!strcmp("iq", name) || !strcmp("message", name)) {
-                                       on_stream_iq(stream, node);
-                               } else if (!strcmp("presence", name)) {
-                                       on_stream_presence(stream, node);
-                               } else if (!strcmp("auth", name)) {
-                                       on_stream_auth(stream, node);
-                               } else if (!strcmp("starttls", name)) {
-                                       on_stream_starttls(stream, node);
-                               } else if (!strcmp("db:result", name)) {
-                                       on_stream_dialback_result(stream, node);
-                               } else if (!strcmp("db:verify", name)) {
-                                       on_stream_dialback_verify(stream, node);
-                               } else {
-                                       /* unknown first-level element */
-                                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, unknown first-level element: %s\n", stream->jid, stream->address, stream->port, name);
-                               }
-                       }
-                       break;
-               case IKS_NODE_ERROR:
-                       /* <error> */
-                       break;
-               case IKS_NODE_STOP:
-                       on_stream_stop(stream);
-                       break;
-       }
-
-       if (node) {
-               iks_delete(node);
-       }
-
-       return IKS_OK;
-}
-
-/**
- * Cleanup xmpp stream
- */
-static void xmpp_stream_destroy(struct xmpp_stream *stream)
-{
-       struct xmpp_stream_context *context = stream->context;
-       switch_memory_pool_t *pool = stream->pool;
-       stream->state = XSS_DESTROY;
-
-       /* remove from available streams */
-       switch_mutex_lock(context->streams_mutex);
-       if (stream->jid) {
-               switch_core_hash_delete(context->routes, stream->jid);
-       }
-       if (stream->id) {
-               switch_core_hash_delete(context->streams, stream->id);
-       }
-       switch_mutex_unlock(context->streams_mutex);
-
-       /* close connection */
-       if (stream->parser) {
-               iks_disconnect(stream->parser);
-               iks_parser_delete(stream->parser);
-       }
-
-       if (stream->socket) {
-               switch_socket_shutdown(stream->socket, SWITCH_SHUTDOWN_READWRITE);
-               switch_socket_close(stream->socket);
-       }
-
-       /* flush pending messages */
-       if (stream->msg_queue) {
-               char *msg;
-               while (switch_queue_trypop(stream->msg_queue, (void *)&msg) == SWITCH_STATUS_SUCCESS) {
-                       iks_free(msg);
-               }
-       }
-
-       if (context->destroy_callback) {
-               context->destroy_callback(stream);
-       }
-
-       switch_core_destroy_memory_pool(&pool);
-}
-
-/**
- * @param stream the xmpp stream to check
- * @return 0 if stream is dead
- */
-static int xmpp_stream_ready(struct xmpp_stream *stream)
-{
-       return stream->state != XSS_ERROR && stream->state != XSS_DESTROY;
-}
-
-#define KEEP_ALIVE_INTERVAL_NS (60 * 1000 * 1000)
-
-/**
- * Thread that handles xmpp XML stream
- * @param thread this thread
- * @param obj the xmpp stream
- * @return NULL
- */
-static void *SWITCH_THREAD_FUNC xmpp_stream_thread(switch_thread_t *thread, void *obj)
-{
-       struct xmpp_stream *stream = (struct xmpp_stream *)obj;
-       struct xmpp_stream_context *context = stream->context;
-       int err_count = 0;
-       switch_time_t last_activity = 0;
-       int ping_id = 1;
-
-       if (stream->incoming) {
-               switch_thread_rwlock_rdlock(context->shutdown_rwlock);
-       }
-
-       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s:%i, New %s_%s stream\n", stream->address, stream->port, stream->s2s ? "s2s" : "c2s", stream->incoming ? "in" : "out");
-
-       if (stream->s2s && !stream->incoming) {
-               xmpp_send_outbound_server_header(stream);
-       }
-
-       while (xmpp_stream_ready(stream)) {
-               char *msg;
-               int result;
-               switch_time_t now = switch_micro_time_now();
-
-               /* read any messages from client */
-               stream->idle = 1;
-               result = iks_recv(stream->parser, 0);
-               switch (result) {
-               case IKS_OK:
-                       err_count = 0;
-                       break;
-               case IKS_NET_TLSFAIL:
-               case IKS_NET_RWERR:
-               case IKS_NET_NOCONN:
-               case IKS_NET_NOSOCK:
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, iks_recv() error = %s, ending session\n", stream->jid, stream->address, stream->port, iks_net_error_to_string(result));
-                       stream->state = XSS_ERROR;
-                       goto done;
-               default:
-                       if (err_count++ == 0) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, iks_recv() error = %s\n", stream->jid, stream->address, stream->port, iks_net_error_to_string(result));
-                       }
-                       if (err_count >= 50) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, too many iks_recv() error = %s, ending session\n", stream->jid, stream->address, stream->port, iks_net_error_to_string(result));
-                               stream->state = XSS_ERROR;
-                               goto done;
-                       }
-               }
-
-               /* send queued stanzas once stream is authorized for outbound stanzas */
-               if (!stream->s2s || stream->state == XSS_READY) {
-                       while (switch_queue_trypop(stream->msg_queue, (void *)&msg) == SWITCH_STATUS_SUCCESS) {
-                               if (!stream->s2s || !stream->incoming) {
-                                       iks_send_raw(stream->parser, msg);
-                               } else {
-                                       /* TODO sent out wrong stream! */
-                               }
-                               iks_free(msg);
-                               stream->idle = 0;
-                       }
-               }
-
-               /* check for shutdown */
-               if (stream->state != XSS_DESTROY && context->shutdown && stream->state != XSS_SHUTDOWN) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_INFO, "%s, %s:%i, detected shutdown\n", stream->jid, stream->address, stream->port);
-                       iks_send_raw(stream->parser, "</stream:stream>");
-                       stream->state = XSS_SHUTDOWN;
-                       stream->idle = 0;
-               }
-
-               if (stream->idle) {
-                       int fdr = 0;
-
-                       /* send keep-alive ping if idle for a long time */
-                       if (stream->s2s && !stream->incoming && stream->state == XSS_READY && now - last_activity > KEEP_ALIVE_INTERVAL_NS) {
-                               char *ping = switch_mprintf("<iq to=\"%s\" from=\"%s\" type=\"get\" id=\"internal-%d\"><ping xmlns=\""IKS_NS_XMPP_PING"\"/></iq>",
-                                       stream->jid, stream->context->domain, ping_id++);
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_DEBUG, "%s, %s:%i, keep alive\n", stream->jid, stream->address, stream->port);
-                               last_activity = now;
-                               iks_send_raw(stream->parser, ping);
-                               free(ping);
-                       }
-
-                       switch_poll(stream->pollfd, 1, &fdr, 20000);
-               } else {
-                       last_activity = now;
-                       switch_os_yield();
-               }
-       }
-
-  done:
-
-       if (stream->incoming) {
-               xmpp_stream_destroy(stream);
-               switch_thread_rwlock_unlock(context->shutdown_rwlock);
-       }
-
-       return NULL;
-}
-
-/**
- * Initialize the xmpp stream
- * @param context the stream context
- * @param stream the stream to initialize
- * @param pool for this stream
- * @param address remote address
- * @param port remote port
- * @param s2s true if a server-to-server stream
- * @param incoming true if incoming stream
- * @return the stream
- */
-static struct xmpp_stream *xmpp_stream_init(struct xmpp_stream_context *context, struct xmpp_stream *stream, switch_memory_pool_t *pool, const char *address, int port, int s2s, int incoming)
-{
-       stream->context = context;
-       stream->pool = pool;
-       if (incoming) {
-               xmpp_stream_new_id(stream);
-       }
-       switch_mutex_init(&stream->mutex, SWITCH_MUTEX_NESTED, pool);
-       if (!zstr(address)) {
-               stream->address = switch_core_strdup(pool, address);
-       }
-       if (port > 0) {
-               stream->port = port;
-       }
-       stream->s2s = s2s;
-       stream->incoming = incoming;
-       switch_queue_create(&stream->msg_queue, MAX_QUEUE_LEN, pool);
-
-       /* set up XMPP stream parser */
-       stream->parser = iks_stream_new(stream->s2s ? IKS_NS_SERVER : IKS_NS_CLIENT, stream, on_stream);
-
-       /* enable logging of XMPP stream */
-       iks_set_log_hook(stream->parser, on_stream_log);
-
-       return stream;
-}
-
-/**
- * Create a new xmpp stream
- * @param context the stream context
- * @param pool the memory pool for this stream
- * @param address remote address
- * @param port remote port
- * @param s2s true if server-to-server stream
- * @param incoming true if incoming stream
- * @return the new stream or NULL
- */
-static struct xmpp_stream *xmpp_stream_create(struct xmpp_stream_context *context, switch_memory_pool_t *pool, const char *address, int port, int s2s, int incoming)
-{
-       struct xmpp_stream *stream = NULL;
-       if (!(stream = switch_core_alloc(pool, sizeof(*stream)))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error\n");
-               return NULL;
-       }
-       return xmpp_stream_init(context, stream, pool, address, port, s2s, incoming);
-}
-
-/**
- * Thread that handles XMPP XML stream
- * @param thread this thread
- * @param obj the XMPP stream
- * @return NULL
- */
-static void *SWITCH_THREAD_FUNC xmpp_outbound_stream_thread(switch_thread_t *thread, void *obj)
-{
-       struct xmpp_stream *stream = (struct xmpp_stream *)obj;
-       struct xmpp_stream_context *context = stream->context;
-       switch_socket_t *socket;
-       int warned = 0;
-
-       switch_thread_rwlock_rdlock(context->shutdown_rwlock);
-
-       /* connect to server */
-       while (!context->shutdown) {
-               struct xmpp_stream *new_stream = NULL;
-               switch_memory_pool_t *pool;
-               switch_sockaddr_t *sa;
-
-               if (switch_sockaddr_info_get(&sa, stream->address, SWITCH_UNSPEC, stream->port, 0, stream->pool) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "%s:%i, failed to get sockaddr info!\n", stream->address, stream->port);
-                       goto fail;
-               }
-
-               if (switch_socket_create(&socket, switch_sockaddr_get_family(sa), SOCK_STREAM, SWITCH_PROTO_TCP, stream->pool) != SWITCH_STATUS_SUCCESS) {
-                       if (!warned) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_ERROR, "%s:%i, failed to create socket!\n", stream->address, stream->port);
-                       }
-                       goto sock_fail;
-               }
-
-               switch_socket_opt_set(socket, SWITCH_SO_KEEPALIVE, 1);
-               switch_socket_opt_set(socket, SWITCH_SO_TCP_NODELAY, 1);
-
-               if (switch_socket_connect(socket, sa) != SWITCH_STATUS_SUCCESS) {
-                       if (!warned) {
-                               switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_ERROR, "%s:%i, Socket Error!\n", stream->address, stream->port);
-                       }
-                       goto sock_fail;
-               }
-
-               if (warned) {
-                       switch_log_printf(SWITCH_CHANNEL_UUID_LOG(stream->id), SWITCH_LOG_ERROR, "%s:%i, connected!\n", stream->address, stream->port);
-                       warned = 0;
-               }
-
-               /* run the stream thread */
-               xmpp_stream_set_socket(stream, socket);
-               xmpp_stream_thread(thread, stream);
-
-               /* re-establish connection if not shutdown */
-               if (!context->shutdown) {
-                       /* create new stream for reconnection */
-                       switch_core_new_memory_pool(&pool);
-                       new_stream = xmpp_stream_create(stream->context, pool, stream->address, stream->port, 1, 0);
-                       new_stream->jid = switch_core_strdup(pool, stream->jid);
-                       xmpp_stream_destroy(stream);
-                       stream = new_stream;
-
-                       switch_yield(1000 * 1000); /* 1000 ms */
-                       continue;
-               }
-               break;
-
-   sock_fail:
-               if (socket) {
-                       switch_socket_close(socket);
-                       socket = NULL;
-               }
-               if (!warned) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error! Could not connect to %s:%i\n", stream->address, stream->port);
-                       warned = 1;
-               }
-               switch_yield(1000 * 1000); /* 1000 ms */
-       }
-
-  fail:
-
-       xmpp_stream_destroy(stream);
-
-       switch_thread_rwlock_unlock(context->shutdown_rwlock);
-       return NULL;
-}
-
-/**
- * Set the id for this stream
- * @param stream
- * @param id
- */
-static void xmpp_stream_set_id(struct xmpp_stream *stream, const char *id)
-{
-       struct xmpp_stream_context *context = stream->context;
-       if (!zstr(stream->id)) {
-               switch_mutex_lock(context->streams_mutex);
-               switch_core_hash_delete(context->streams, stream->id);
-               switch_mutex_unlock(context->streams_mutex);
-       }
-       if (!zstr(id)) {
-               stream->id = switch_core_strdup(stream->pool, id);
-               switch_mutex_lock(context->streams_mutex);
-               switch_core_hash_insert(context->streams, stream->id, stream);
-               switch_mutex_unlock(context->streams_mutex);
-       } else {
-               stream->id = NULL;
-       }
-}
-
-/**
- * Destroy the listener
- * @param server the server
- */
-static void xmpp_listener_destroy(struct xmpp_listener *listener)
-{
-       switch_memory_pool_t *pool = listener->pool;
-
-       /* shutdown socket */
-       if (listener->socket) {
-               switch_socket_shutdown(listener->socket, SWITCH_SHUTDOWN_READWRITE);
-               switch_socket_close(listener->socket);
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "xmpp listener %s:%u closed\n", listener->addr, listener->port);
-       switch_core_destroy_memory_pool(&pool);
-}
-
-/**
- * Open a new XMPP stream with a peer server
- * @param peer_domain of server - if not set, address is used
- * @param peer_address of server - if not set, domain is used
- * @param peer_port of server - if not set default port is used
- */
-switch_status_t xmpp_stream_context_connect(struct xmpp_stream_context *context, const char *peer_domain, const char *peer_address, int peer_port)
-{
-       struct xmpp_stream *stream;
-       switch_memory_pool_t *pool;
-       switch_thread_t *thread;
-       switch_threadattr_t *thd_attr = NULL;
-
-       if (peer_port <= 0) {
-               peer_port = IKS_JABBER_SERVER_PORT;
-       }
-
-       if (zstr(peer_address)) {
-               peer_address = peer_domain;
-       } else if (zstr(peer_domain)) {
-               peer_domain = peer_address;
-       }
-
-       /* start outbound stream thread */
-       switch_core_new_memory_pool(&pool);
-       stream = xmpp_stream_create(context, pool, peer_address, peer_port, 1, 0);
-       stream->jid = switch_core_strdup(pool, peer_domain);
-       switch_threadattr_create(&thd_attr, pool);
-                       switch_threadattr_detach_set(thd_attr, 1);
-                       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-                       switch_thread_create(&thread, thd_attr, xmpp_outbound_stream_thread, stream, pool);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Thread that listens for new XMPP connections
- * @param thread this thread
- * @param obj the listener
- * @return NULL
- */
-static void *SWITCH_THREAD_FUNC xmpp_listener_thread(switch_thread_t *thread, void *obj)
-{
-       struct xmpp_listener *listener = (struct xmpp_listener *)obj;
-       struct xmpp_stream_context *context = listener->context;
-       switch_memory_pool_t *pool = NULL;
-       uint32_t errs = 0;
-       int warned = 0;
-
-       switch_thread_rwlock_rdlock(context->shutdown_rwlock);
-
-       /* bind to XMPP port */
-       while (!context->shutdown) {
-               switch_status_t rv;
-               switch_sockaddr_t *sa;
-               rv = switch_sockaddr_info_get(&sa, listener->addr, SWITCH_UNSPEC, listener->port, 0, listener->pool);
-               if (rv)
-                       goto fail;
-               rv = switch_socket_create(&listener->socket, switch_sockaddr_get_family(sa), SOCK_STREAM, SWITCH_PROTO_TCP, listener->pool);
-               if (rv)
-                       goto sock_fail;
-               rv = switch_socket_opt_set(listener->socket, SWITCH_SO_REUSEADDR, 1);
-               if (rv)
-                       goto sock_fail;
-#ifdef WIN32
-               /* Enable dual-stack listening on Windows (if the listening address is IPv6), it's default on Linux */
-               if (switch_sockaddr_get_family(sa) == AF_INET6) {
-                       rv = switch_socket_opt_set(listener->socket, SWITCH_SO_IPV6_V6ONLY, 0);
-                       if (rv) goto sock_fail;
-               }
-#endif
-               rv = switch_socket_bind(listener->socket, sa);
-               if (rv)
-                       goto sock_fail;
-               rv = switch_socket_listen(listener->socket, 5);
-               if (rv)
-                       goto sock_fail;
-
-               rv = switch_socket_create_pollset(&listener->read_pollfd, listener->socket, SWITCH_POLLIN | SWITCH_POLLERR, listener->pool);
-               if (rv) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Create pollset for %s listener socket %s:%u error!\n", listener->s2s ? "s2s" : "c2s", listener->addr, listener->port);
-                       goto sock_fail;
-               }
-
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "xmpp %s listener bound to %s:%u\n", listener->s2s ? "s2s" : "c2s", listener->addr, listener->port);
-
-               break;
-   sock_fail:
-               if (listener->socket) {
-                       switch_socket_close(listener->socket);
-                       listener->socket = NULL;
-               }
-               if (!warned) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error! xmpp %s listener could not bind to %s:%u\n", listener->s2s ? "s2s" : "c2s", listener->addr, listener->port);
-                       warned = 1;
-               }
-               switch_yield(1000 * 100); /* 100 ms */
-       }
-
-       /* Listen for XMPP client connections */
-       while (!context->shutdown) {
-               switch_socket_t *socket = NULL;
-               switch_status_t rv;
-               int32_t fdr;
-
-               if (pool == NULL && switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to create memory pool for new client connection!\n");
-                       goto fail;
-               }
-
-               /* is there a new connection? */
-               rv = switch_poll(listener->read_pollfd, 1, &fdr, 1000 * 1000 /* 1000 ms */);
-               if (rv != SWITCH_STATUS_SUCCESS) {
-                       continue;
-               }
-
-               /* accept the connection */
-               if (switch_socket_accept(&socket, listener->socket, pool)) {
-                       if (context->shutdown) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Shutting down xmpp listener\n");
-                               goto end;
-                       } else {
-                               /* I wish we could use strerror_r here but its not defined everywhere =/ */
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Accept connection error [%s]\n", strerror(errno));
-                               if (++errs > 100) {
-                                       goto end;
-                               }
-                       }
-               } else { /* got a new connection */
-                       switch_thread_t *thread;
-                       switch_threadattr_t *thd_attr = NULL;
-                       struct xmpp_stream *stream;
-                       switch_sockaddr_t *sa = NULL;
-                       char remote_ip[50] = { 0 };
-                       int remote_port = 0;
-
-                       errs = 0;
-
-                       /* get remote address and port */
-                       if (switch_socket_addr_get(&sa, SWITCH_TRUE, socket) == SWITCH_STATUS_SUCCESS && sa) {
-                               switch_get_addr(remote_ip, sizeof(remote_ip), sa);
-                               remote_port = switch_sockaddr_get_port(sa);
-                       }
-
-                       if (zstr_buf(remote_ip)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Failed to get IP of incoming connection.\n");
-                               switch_socket_shutdown(socket, SWITCH_SHUTDOWN_READWRITE);
-                               switch_socket_close(socket);
-                               continue;
-                       }
-
-                       /* check if connection is allowed */
-                       if (listener->acl) {
-                               if (!switch_check_network_list_ip(remote_ip, listener->acl)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "ACL %s denies access to %s.\n", listener->acl, remote_ip);
-                                       switch_socket_shutdown(socket, SWITCH_SHUTDOWN_READWRITE);
-                                       switch_socket_close(socket);
-                                       continue;
-                               }
-                       }
-
-                       /* start connection thread */
-                       if (!(stream = xmpp_stream_create(context, pool, remote_ip, remote_port, listener->s2s, 1))) {
-                               switch_socket_shutdown(socket, SWITCH_SHUTDOWN_READWRITE);
-                               switch_socket_close(socket);
-                               break;
-                       }
-                       xmpp_stream_set_socket(stream, socket);
-                       pool = NULL; /* connection now owns the pool */
-                       switch_threadattr_create(&thd_attr, stream->pool);
-                       switch_threadattr_detach_set(thd_attr, 1);
-                       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-                       switch_thread_create(&thread, thd_attr, xmpp_stream_thread, stream, stream->pool);
-               }
-       }
-
-  end:
-
-       if (pool) {
-               switch_core_destroy_memory_pool(&pool);
-       }
-
-  fail:
-
-       xmpp_listener_destroy(listener);
-
-       switch_thread_rwlock_unlock(context->shutdown_rwlock);
-       return NULL;
-}
-
-/**
- * Add a new socket to listen for XMPP client/server connections.
- * @param context the XMPP context
- * @param addr the IP address
- * @param port the port
- * @param is_s2s true if s2s
- * @param acl name of optional access control list
- * @return SWITCH_STATUS_SUCCESS if successful
- */
-switch_status_t xmpp_stream_context_listen(struct xmpp_stream_context *context, const char *addr, int port, int is_s2s, const char *acl)
-{
-       switch_memory_pool_t *pool;
-       struct xmpp_listener *new_listener = NULL;
-       switch_thread_t *thread;
-       switch_threadattr_t *thd_attr = NULL;
-
-       if (zstr(addr)) {
-               return SWITCH_STATUS_FALSE;
-       }
-
-       switch_core_new_memory_pool(&pool);
-       new_listener = switch_core_alloc(pool, sizeof(*new_listener));
-       new_listener->pool = pool;
-       new_listener->addr = switch_core_strdup(pool, addr);
-       if (!zstr(acl)) {
-               new_listener->acl = switch_core_strdup(pool, acl);
-       }
-
-       new_listener->s2s = is_s2s;
-       if (port <= 0) {
-               new_listener->port = is_s2s ? IKS_JABBER_SERVER_PORT : IKS_JABBER_PORT;
-       } else {
-               new_listener->port = port;
-       }
-       new_listener->context = context;
-
-       /* start the server thread */
-       switch_threadattr_create(&thd_attr, pool);
-       switch_threadattr_detach_set(thd_attr, 1);
-       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-       switch_thread_create(&thread, thd_attr, xmpp_listener_thread, new_listener, pool);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Queue a message for delivery
- */
-void xmpp_stream_context_send(struct xmpp_stream_context *context, const char *jid, iks *msg)
-{
-       if (!zstr(jid)) {
-               if (msg) {
-                       struct xmpp_stream *stream;
-                       switch_mutex_lock(context->streams_mutex);
-                       stream = switch_core_hash_find(context->routes, jid);
-                       if (stream) {
-                               char *raw = iks_string(NULL, msg);
-                               if (switch_queue_trypush(stream->msg_queue, raw) != SWITCH_STATUS_SUCCESS) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "%s, %s:%i, failed to deliver outbound message via %s!\n", stream->jid, stream->address, stream->port, jid);
-                                       iks_free(raw);
-                               }
-                       } else {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s stream is gone\n", jid);
-                               /* TODO automatically open connection if valid domain JID? */
-                       }
-                       switch_mutex_unlock(context->streams_mutex);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "missing message\n");
-               }
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "missing stream JID\n");
-       }
-}
-
-/**
- * Dump xmpp stream stats
- */
-void xmpp_stream_context_dump(struct xmpp_stream_context *context, switch_stream_handle_t *stream)
-{
-       switch_hash_index_t *hi;
-       switch_mutex_lock(context->streams_mutex);
-       stream->write_function(stream, "\nACTIVE STREAMS\n");
-       for (hi = switch_core_hash_first(context->streams); hi; hi = switch_core_hash_next(&hi)) {
-               struct xmpp_stream *s = NULL;
-               const void *key;
-               void *val;
-               switch_core_hash_this(hi, &key, NULL, &val);
-               s = (struct xmpp_stream *)val;
-               switch_assert(s);
-               stream->write_function(stream, "        TYPE='%s_%s',ID='%s',JID='%s',REMOTE_ADDRESS='%s',REMOTE_PORT=%i,STATE='%s'\n", s->s2s ? "s2s" : "c2s", s->incoming ? "in" : "out", s->id, s->jid, s->address, s->port, xmpp_stream_state_to_string(s->state));
-       }
-       switch_mutex_unlock(context->streams_mutex);
-}
-
-/**
- * Create a new XMPP stream context
- * @param domain for new streams
- * @param domain_secret domain shared secret for server dialback
- * @param bind_cb callback function when a resource is bound to a new stream
- * @param ready callback function when new stream is ready
- * @param recv callback function when a new stanza is received
- * @param destroy callback function when a stream is destroyed
- * @return the context
- */
-struct xmpp_stream_context *xmpp_stream_context_create(const char *domain, const char *domain_secret, xmpp_stream_bind_callback bind_cb, xmpp_stream_ready_callback ready, xmpp_stream_recv_callback recv, xmpp_stream_destroy_callback destroy)
-{
-       switch_memory_pool_t *pool;
-       struct xmpp_stream_context *context;
-
-       switch_core_new_memory_pool(&pool);
-       context = switch_core_alloc(pool, sizeof(*context));
-       context->pool = pool;
-       switch_mutex_init(&context->streams_mutex, SWITCH_MUTEX_NESTED, context->pool);
-       switch_core_hash_init(&context->routes);
-       switch_core_hash_init(&context->streams);
-       context->dialback_secret = switch_core_strdup(context->pool, domain_secret);
-       context->bind_callback = bind_cb;
-       context->ready_callback = ready;
-       context->destroy_callback = destroy;
-       context->recv_callback = recv;
-       context->shutdown = 0;
-       context->domain = switch_core_strdup(context->pool, domain);
-       switch_thread_rwlock_create(&context->shutdown_rwlock, context->pool);
-       switch_core_hash_init(&context->users);
-
-       return context;
-}
-
-/**
- * Add an authorized user
- * @param context the context to add user to
- * @param user the username
- * @param password the password
- */
-void xmpp_stream_context_add_user(struct xmpp_stream_context *context, const char *user, const char *password)
-{
-       switch_core_hash_insert(context->users, user, switch_core_strdup(context->pool, password));
-}
-
-/**
- * Destroy an XMPP stream context.  All open streams are closed.
- * @param context to destroy
- */
-void xmpp_stream_context_destroy(struct xmpp_stream_context *context)
-{
-       switch_memory_pool_t *pool;
-       context->shutdown = 1;
-       /* wait for threads to finish */
-       switch_thread_rwlock_wrlock(context->shutdown_rwlock);
-       switch_core_hash_destroy(&context->routes);
-       switch_core_hash_destroy(&context->streams);
-       switch_core_hash_destroy(&context->users);
-       pool = context->pool;
-       switch_core_destroy_memory_pool(&pool);
-}
-
-/**
- * @param stream
- * @return true if server-to-server stream
- */
-int xmpp_stream_is_s2s(struct xmpp_stream *stream)
-{
-       return stream->s2s;
-}
-
-/**
- * @param stream
- * @return true if incoming stream
- */
-int xmpp_stream_is_incoming(struct xmpp_stream *stream)
-{
-       return stream->incoming;
-}
-
-/**
- * @param stream
- * @return the stream JID
- */
-const char *xmpp_stream_get_jid(struct xmpp_stream *stream)
-{
-       return stream->jid;
-}
-
-/**
- * Set private data for this stream
- */
-void xmpp_stream_set_private(struct xmpp_stream *stream, void *user_private)
-{
-       stream->user_private = user_private;
-}
-
-/**
- * Get private data for this stream
- */
-void *xmpp_stream_get_private(struct xmpp_stream *stream)
-{
-       return stream->user_private;
-}
-
-/**
- * Add PEM cert file to stream for new SSL connections
- */
-void xmpp_stream_context_add_cert(struct xmpp_stream_context *context, const char *cert_pem_file)
-{
-       context->cert_pem_file = switch_core_strdup(context->pool, cert_pem_file);
-}
-
-/**
- * Add PEM key file to stream for new SSL connections
- */
-void xmpp_stream_context_add_key(struct xmpp_stream_context *context, const char *key_pem_file)
-{
-       context->key_pem_file = switch_core_strdup(context->pool, key_pem_file);
-}
-
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/event_handlers/mod_rayo/xmpp_streams.h b/src/mod/event_handlers/mod_rayo/xmpp_streams.h
deleted file mode 100644 (file)
index b7ee043..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2018, Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_rayo for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * xmpp_streams.h -- XMPP in/out s2s and in c2s streams
- *
- */
-#ifndef XMPP_STREAMS_H
-#define XMPP_STREAMS_H
-
-struct xmpp_stream;
-struct xmpp_stream_context;
-
-typedef int (* xmpp_stream_bind_callback)(struct xmpp_stream *stream);
-typedef int (* xmpp_stream_ready_callback)(struct xmpp_stream *stream);
-typedef void (* xmpp_stream_recv_callback)(struct xmpp_stream *stream, iks *stanza);
-typedef void (* xmpp_stream_destroy_callback)(struct xmpp_stream *stream);
-
-SWITCH_DECLARE(struct xmpp_stream_context *) xmpp_stream_context_create(const char *domain, const char *domain_secret, xmpp_stream_bind_callback bind_cb, xmpp_stream_ready_callback ready, xmpp_stream_recv_callback recv, xmpp_stream_destroy_callback destroy);
-SWITCH_DECLARE(void) xmpp_stream_context_add_cert(struct xmpp_stream_context *context, const char *cert_pem_file);
-SWITCH_DECLARE(void) xmpp_stream_context_add_key(struct xmpp_stream_context *context, const char *key_pem_file);
-SWITCH_DECLARE(void) xmpp_stream_context_add_user(struct xmpp_stream_context *context, const char *user, const char *password);
-SWITCH_DECLARE(void) xmpp_stream_context_dump(struct xmpp_stream_context *context, switch_stream_handle_t *stream);
-SWITCH_DECLARE(void) xmpp_stream_context_destroy(struct xmpp_stream_context *context);
-SWITCH_DECLARE(void) xmpp_stream_context_send(struct xmpp_stream_context *context, const char *jid, iks *stanza);
-
-SWITCH_DECLARE(switch_status_t) xmpp_stream_context_listen(struct xmpp_stream_context *context, const char *addr, int port, int is_s2s, const char *acl);
-SWITCH_DECLARE(switch_status_t) xmpp_stream_context_connect(struct xmpp_stream_context *context, const char *peer_domain, const char *peer_address, int peer_port);
-
-SWITCH_DECLARE(int) xmpp_stream_is_s2s(struct xmpp_stream *stream);
-SWITCH_DECLARE(int) xmpp_stream_is_incoming(struct xmpp_stream *stream);
-SWITCH_DECLARE(const char *) xmpp_stream_get_jid(struct xmpp_stream *stream);
-SWITCH_DECLARE(void) xmpp_stream_set_private(struct xmpp_stream *stream, void *user_private);
-SWITCH_DECLARE(void *) xmpp_stream_get_private(struct xmpp_stream *stream);
-
-#endif
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
- */
diff --git a/src/mod/formats/mod_ssml/Makefile.am b/src/mod/formats/mod_ssml/Makefile.am
deleted file mode 100644 (file)
index 9da6a7c..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-include $(top_srcdir)/build/modmake.rulesam
-MODNAME=mod_ssml
-
-IKS_DIR=$(switch_srcdir)/libs/iksemel
-IKS_BUILDDIR=$(switch_builddir)/libs/iksemel
-IKS_LA=$(IKS_BUILDDIR)/src/libiksemel.la
-
-noinst_LTLIBRARIES = libssmlmod.la
-libssmlmod_la_SOURCES  = mod_ssml.c
-libssmlmod_la_CFLAGS   = $(AM_CFLAGS) -I$(IKS_DIR)/include
-
-mod_LTLIBRARIES = mod_ssml.la
-mod_ssml_la_SOURCES  = mod_ssml.c
-mod_ssml_la_CFLAGS   = $(AM_CFLAGS) -I$(IKS_DIR)/include
-mod_ssml_la_LIBADD   = $(switch_builddir)/libfreeswitch.la $(IKS_LA)
-mod_ssml_la_LDFLAGS  = -avoid-version -module -no-undefined -shared
-
-BUILT_SOURCES=$(IKS_LA)
-
-$(IKS_LA): $(IKS_BUILDDIR) $(IKS_DIR) $(IKS_DIR)/.update
-       @cd $(IKS_DIR) && $(MAKE)
-       @$(TOUCH_TARGET)
-
-deps: $(IKS_LA)
diff --git a/src/mod/formats/mod_ssml/conf/autoload_configs/ssml.conf.xml b/src/mod/formats/mod_ssml/conf/autoload_configs/ssml.conf.xml
deleted file mode 100644 (file)
index a3e732f..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<configuration name="ssml.conf" description="SSML parser config">
-
-       <!-- voices in order of preference -->
-       <tts-voices>
-               <voice name="slt" language="en-US" gender="female" prefix="tts://flite|slt|"/>
-               <voice name="kal" language="en-US" gender="male" prefix="tts://flite|kal|"/>
-               <voice name="rms" language="en-US" gender="male" prefix="tts://flite|rms|"/>
-               <voice name="awb" language="en-US" gender="male" prefix="tts://flite|awb|"/>
-       </tts-voices>
-
-       <!-- maps ISO language to say module -->
-       <language-map>
-               <language iso="en-US" say-module="en" language="en"/>
-       </language-map>
-
-       <!-- say voices in order of preference -->
-       <say-voices>
-               <voice name="callie" language="en-US" gender="female" prefix="$${sounds_dir}/en/us/callie/"/>
-       </say-voices>
-
-       <!-- map interpret-as to say macros -->
-       <macros>
-               <macro name="ordinal" type="number" method="counted"/>
-               <macro name="cardinal" type="number" method="pronounced"/>
-               <macro name="characters" type="name_spelled" method="pronounced"/>
-               <macro name="telephone" type="telephone_number" method="pronounced"/>
-       </macros>
-
-</configuration>
diff --git a/src/mod/formats/mod_ssml/mod_ssml.c b/src/mod/formats/mod_ssml/mod_ssml.c
deleted file mode 100644 (file)
index 0301162..0000000
+++ /dev/null
@@ -1,1132 +0,0 @@
-/*
- * mod_ssml for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2013-2014,2016 Grasshopper
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mod_ssml for FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is Grasshopper
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Chris Rienzo <chris.rienzo@grasshopper.com>
- *
- * mod_ssml.c -- SSML audio rendering format
- *
- */
-#include <switch.h>
-#include <iksemel.h>
-
-SWITCH_MODULE_LOAD_FUNCTION(mod_ssml_load);
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_ssml_shutdown);
-SWITCH_MODULE_DEFINITION(mod_ssml, mod_ssml_load, mod_ssml_shutdown, NULL);
-
-#define MAX_VOICE_FILES 256
-#define MAX_VOICE_PRIORITY 999
-#define VOICE_NAME_PRIORITY 1000
-#define VOICE_GENDER_PRIORITY 1000
-#define VOICE_LANG_PRIORITY 1000000
-
-struct ssml_parser;
-
-/** function to handle tag attributes */
-typedef int (* tag_attribs_fn)(struct ssml_parser *, char **);
-/** function to handle tag CDATA */
-typedef int (* tag_cdata_fn)(struct ssml_parser *, char *, size_t);
-
-/**
- * Tag definition
- */
-struct tag_def {
-       tag_attribs_fn attribs_fn;
-       tag_cdata_fn cdata_fn;
-       switch_bool_t is_root;
-       switch_hash_t *children_tags;
-};
-
-/**
- * Module configuration
- */
-static struct {
-       /** Mapping of mod-name-language-gender to voice */
-       switch_hash_t *voice_cache;
-       /** Mapping of voice names */
-       switch_hash_t *say_voice_map;
-       /** Synchronizes access to say_voice_map */
-       switch_mutex_t *say_voice_map_mutex;
-       /** Mapping of voice names */
-       switch_hash_t *tts_voice_map;
-       /** Synchronizes access to tts_voice_map */
-       switch_mutex_t *tts_voice_map_mutex;
-       /** Mapping of interpret-as value to macro */
-       switch_hash_t *interpret_as_map;
-       /** Mapping of ISO language code to say-module */
-       switch_hash_t *language_map;
-       /** Mapping of tag name to definition */
-       switch_hash_t *tag_defs;
-       /** module memory pool */
-       switch_memory_pool_t *pool;
-} globals;
-
-/**
- * A say language
- */
-struct language {
-       /** The ISO language code */
-       char *iso;
-       /** The FreeSWITCH language code */
-       char *language;
-       /** The say module name */
-       char *say_module;
-};
-
-/**
- * A say macro
- */
-struct macro {
-       /** interpret-as name (cardinal...) */
-       char *name;
-       /** language (en-US, en-UK, ...) */
-       char *language;
-       /** type (number, items, persons, messages...) */
-       char *type;
-       /** method (pronounced, counted, iterated...) */
-       char *method;
-};
-
-/**
- * A TTS voice
- */
-struct voice {
-       /** higher priority = more likely to pick */
-       int priority;
-       /** voice gender */
-       char *gender;
-       /** voice name / macro */
-       char *name;
-       /** voice language */
-       char *language;
-       /** internal file prefix */
-       char *prefix;
-};
-
-#define TAG_LEN 32
-#define NAME_LEN 128
-#define LANGUAGE_LEN 6
-#define GENDER_LEN 8
-
-/**
- * SSML voice state
- */
-struct ssml_node {
-       /** tag name */
-       char tag_name[TAG_LEN];
-       /** requested name */
-       char name[NAME_LEN];
-       /** requested language */
-       char language[LANGUAGE_LEN];
-       /** requested gender */
-       char gender[GENDER_LEN];
-       /** voice to use */
-       struct voice *tts_voice;
-       /** say macro to use */
-       struct macro *say_macro;
-       /** tag handling data */
-       struct tag_def *tag_def;
-       /** previous node */
-       struct ssml_node *parent_node;
-};
-
-/**
- * A file to play
- */
-struct ssml_file {
-       /** prefix to add to file handle */
-       char *prefix;
-       /** the file to play */
-       const char *name;
-};
-
-/**
- * SSML parser state
- */
-struct ssml_parser {
-       /** current attribs */
-       struct ssml_node *cur_node;
-       /** files to play */
-       struct ssml_file *files;
-       /** number of files */
-       int num_files;
-       /** max files to play */
-       int max_files;
-       /** memory pool to use */
-       switch_memory_pool_t *pool;
-       /** desired sample rate */
-       int sample_rate;
-};
-
-/**
- * SSML playback state
- */
-struct ssml_context {
-       /** handle to current file */
-       switch_file_handle_t fh;
-       /** files to play */
-       struct ssml_file *files;
-       /** number of files */
-       int num_files;
-       /** current file being played */
-       int index;
-};
-
-/**
- * Add a definition for a tag
- * @param tag the name
- * @param attribs_fn the function to handle the tag attributes
- * @param cdata_fn the function to handler the tag CDATA
- * @param children_tags comma-separated list of valid child tag names
- * @return the definition
- */
-static struct tag_def *add_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
-{
-       struct tag_def *def = switch_core_alloc(globals.pool, sizeof(*def));
-       switch_core_hash_init(&def->children_tags);
-       if (!zstr(children_tags)) {
-               char *children_tags_dup = switch_core_strdup(globals.pool, children_tags);
-               char *tags[32] = { 0 };
-               int tag_count = switch_separate_string(children_tags_dup, ',', tags, sizeof(tags) / sizeof(tags[0]));
-               if (tag_count) {
-                       int i;
-                       for (i = 0; i < tag_count; i++) {
-                               switch_core_hash_insert(def->children_tags, tags[i], tags[i]);
-                       }
-               }
-       }
-       def->attribs_fn = attribs_fn;
-       def->cdata_fn = cdata_fn;
-       def->is_root = SWITCH_FALSE;
-       switch_core_hash_insert(globals.tag_defs, tag, def);
-       return def;
-}
-
-/**
- * Add a definition for a root tag
- * @param tag the name
- * @param attribs_fn the function to handle the tag attributes
- * @param cdata_fn the function to handler the tag CDATA
- * @param children_tags comma-separated list of valid child tag names
- * @return the definition
- */
-static struct tag_def *add_root_tag_def(const char *tag, tag_attribs_fn attribs_fn, tag_cdata_fn cdata_fn, const char *children_tags)
-{
-       struct tag_def *def = add_tag_def(tag, attribs_fn, cdata_fn, children_tags);
-       def->is_root = SWITCH_TRUE;
-       return def;
-}
-
-/**
- * Handle tag attributes
- * @param parser the parser
- * @param name the tag name
- * @param atts the attributes
- * @return IKS_OK if OK IKS_BADXML on parse failure
- */
-static int process_tag(struct ssml_parser *parser, const char *name, char **atts)
-{
-       struct tag_def *def = switch_core_hash_find(globals.tag_defs, name);
-       if (def) {
-               parser->cur_node->tag_def = def;
-               if (def->is_root && parser->cur_node->parent_node == NULL) {
-                       /* no parent for ROOT tags */
-                       return def->attribs_fn(parser, atts);
-               } else if (!def->is_root && parser->cur_node->parent_node) {
-                       /* check if this child is allowed by parent node */
-                       struct tag_def *parent_def = parser->cur_node->parent_node->tag_def;
-                       if (switch_core_hash_find(parent_def->children_tags, "ANY") ||
-                               switch_core_hash_find(parent_def->children_tags, name)) {
-                               return def->attribs_fn(parser, atts);
-                       }
-               }
-       }
-       return IKS_BADXML;
-}
-
-/**
- * Handle CDATA that is ignored
- * @param parser the parser
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_OK
- */
-static int process_cdata_ignore(struct ssml_parser *parser, char *data, size_t len)
-{
-       return IKS_OK;
-}
-
-/**
- * Handle CDATA that is not allowed
- * @param parser the parser
- * @param data the CDATA
- * @param len the CDATA length
- * @return IKS_BADXML
- */
-static int process_cdata_bad(struct ssml_parser *parser, char *data, size_t len)
-{
-       int i;
-       for (i = 0; i < len; i++) {
-               if (isgraph(data[i])) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Unexpected CDATA for <%s>\n", parser->cur_node->tag_name);
-                       return IKS_BADXML;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Score the voice on how close it is to desired language, name, and gender
- * @param voice the voice to score
- * @param cur_node the desired voice attributes
- * @param lang_required if true, language must match
- * @return the score
- */
-static int score_voice(struct voice *voice, struct ssml_node *cur_node, int lang_required)
-{
-       /* language > gender,name > priority */
-       int score = voice->priority;
-       if (!zstr_buf(cur_node->gender) && !strcmp(cur_node->gender, voice->gender)) {
-               score += VOICE_GENDER_PRIORITY;
-       }
-       if (!zstr_buf(cur_node->name) && !strcmp(cur_node->name, voice->name)) {
-               score += VOICE_NAME_PRIORITY;
-       }
-       if (!zstr_buf(cur_node->language) && !strcmp(cur_node->language, voice->language)) {
-               score += VOICE_LANG_PRIORITY;
-       } else if (lang_required) {
-               score = 0;
-       }
-       return score;
-}
-
-/**
- * Search for best voice based on attributes
- * @param cur_node the desired voice attributes
- * @param map the map to search
- * @param type "say" or "tts"
- * @param lang_required if true, language must match
- * @return the voice or NULL
- */
-static struct voice *find_voice(struct ssml_node *cur_node, switch_hash_t *map, char *type, int lang_required)
-{
-       switch_hash_index_t *hi = NULL;
-       struct voice *voice = NULL;
-       char *lang_name_gender = NULL;
-       int best_score = 0;
-
-       /* check cache */
-       lang_name_gender = switch_mprintf("%s-%s-%s-%s", type, cur_node->language, cur_node->name, cur_node->gender);
-       voice = (struct voice *)switch_core_hash_find(globals.voice_cache, lang_name_gender);
-       if (voice) {
-               /* that was easy! */
-               goto done;
-       }
-
-       /* find best language, name, gender match */
-       for (hi = switch_core_hash_first(map); hi; hi = switch_core_hash_next(&hi)) {
-               const void *key;
-               void *val;
-               struct voice *candidate;
-               int candidate_score = 0;
-               switch_core_hash_this(hi, &key, NULL, &val);
-               candidate = (struct voice *)val;
-               candidate_score = score_voice(candidate, cur_node, lang_required);
-               if (candidate_score > 0 && candidate_score > best_score) {
-                       voice = candidate;
-                       best_score = candidate_score;
-               }
-       }
-
-       /* remember for next time */
-       if (voice) {
-               switch_core_hash_insert(globals.voice_cache, lang_name_gender, voice);
-       }
-
-done:
-       switch_safe_free(lang_name_gender);
-
-       return voice;
-}
-
-/**
- * Search for best voice based on attributes
- * @param cur_node the desired voice attributes
- * @return the voice or NULL
- */
-static struct voice *find_tts_voice(struct ssml_node *cur_node)
-{
-       struct voice *v;
-       switch_mutex_lock(globals.tts_voice_map_mutex);
-       v = find_voice(cur_node, globals.tts_voice_map, "tts", 0);
-       switch_mutex_unlock(globals.tts_voice_map_mutex);
-       return v;
-}
-
-/**
- * Search for best voice based on attributes
- * @param cur_node the desired voice attributes
- * @return the voice or NULL
- */
-static struct voice *find_say_voice(struct ssml_node *cur_node)
-{
-       struct voice *v;
-       switch_mutex_lock(globals.say_voice_map_mutex);
-       v = find_voice(cur_node, globals.say_voice_map, "say", 1);
-       switch_mutex_unlock(globals.say_voice_map_mutex);
-       return v;
-}
-
-/**
- * Handle tag attributes that are ignored
- * @param parser the parser
- * @param atts the attributes
- * @return IKS_OK
- */
-static int process_attribs_ignore(struct ssml_parser *parsed_data, char **atts)
-{
-       struct ssml_node *cur_node = parsed_data->cur_node;
-       cur_node->tts_voice = find_tts_voice(cur_node);
-       return IKS_OK;
-}
-
-/**
- * open next file for reading
- * @param handle the file handle
- */
-static switch_status_t next_file(switch_file_handle_t *handle)
-{
-       struct ssml_context *context = handle->private_info;
-       const char *file;
-
-  top:
-
-       context->index++;
-
-       if (switch_test_flag((&context->fh), SWITCH_FILE_OPEN)) {
-               switch_core_file_close(&context->fh);
-       }
-
-       if (context->index >= context->num_files) {
-               return SWITCH_STATUS_FALSE;
-       }
-
-
-       file = context->files[context->index].name;
-       context->fh.prefix = context->files[context->index].prefix;
-
-       if (switch_test_flag(handle, SWITCH_FILE_FLAG_WRITE)) {
-               /* unsupported */
-               return SWITCH_STATUS_FALSE;
-       }
-
-       if (switch_core_file_open(&context->fh, file, handle->channels, handle->samplerate, handle->flags, NULL) != SWITCH_STATUS_SUCCESS) {
-               goto top;
-       }
-
-       handle->samples = context->fh.samples;
-       handle->format = context->fh.format;
-       handle->sections = context->fh.sections;
-       handle->seekable = context->fh.seekable;
-       handle->speed = context->fh.speed;
-       handle->interval = context->fh.interval;
-
-       if (switch_test_flag((&context->fh), SWITCH_FILE_NATIVE)) {
-               switch_set_flag_locked(handle, SWITCH_FILE_NATIVE);
-       } else {
-               switch_clear_flag_locked(handle, SWITCH_FILE_NATIVE);
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Process xml:lang attribute
- */
-static int process_xml_lang(struct ssml_parser *parsed_data, char **atts)
-{
-       struct ssml_node *cur_node = parsed_data->cur_node;
-
-       /* only allow language change in <speak>, <p>, and <s> */
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("xml:lang", atts[i])) {
-                               if (!zstr(atts[i + 1])) {
-                                       snprintf(cur_node->language, LANGUAGE_LEN, "%s", atts[i + 1]);
-                               }
-                       }
-                       i += 2;
-               }
-       }
-       cur_node->tts_voice = find_tts_voice(cur_node);
-       return IKS_OK;
-}
-
-/**
- * Process <voice>
- */
-static int process_voice(struct ssml_parser *parsed_data, char **atts)
-{
-       struct ssml_node *cur_node = parsed_data->cur_node;
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("xml:lang", atts[i])) {
-                               if (!zstr(atts[i + 1])) {
-                                       snprintf(cur_node->language, LANGUAGE_LEN, "%s", atts[i + 1]);
-                               }
-                       } else if (!strcmp("name", atts[i])) {
-                               if (!zstr(atts[i + 1])) {
-                                       snprintf(cur_node->name, NAME_LEN, "%s", atts[i + 1]);
-                               }
-                       } else if (!strcmp("gender", atts[i])) {
-                               if (!zstr(atts[i + 1])) {
-                                       snprintf(cur_node->gender, GENDER_LEN, "%s", atts[i + 1]);
-                               }
-                       }
-                       i += 2;
-               }
-       }
-       cur_node->tts_voice = find_tts_voice(cur_node);
-       return IKS_OK;
-}
-
-/**
- * Process <say-as>
- */
-static int process_say_as(struct ssml_parser *parsed_data, char **atts)
-{
-       struct ssml_node *cur_node = parsed_data->cur_node;
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("interpret-as", atts[i])) {
-                               char *interpret_as = atts[i + 1];
-                               if (!zstr(interpret_as)) {
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "interpret-as: %s\n", atts[i + 1]);
-                                       cur_node->say_macro = (struct macro *)switch_core_hash_find(globals.interpret_as_map, interpret_as);
-                               }
-                               break;
-                       }
-                       i += 2;
-               }
-       }
-       cur_node->tts_voice = find_tts_voice(cur_node);
-       return IKS_OK;
-}
-
-/**
- * Process <break>- this is a period of silence
- */
-static int process_break(struct ssml_parser *parsed_data, char **atts)
-{
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("time", atts[i])) {
-                               char *t = atts[i + 1];
-                               if (!zstr(t) && parsed_data->num_files < parsed_data->max_files) {
-                                       int timeout_ms = 0;
-                                       char *unit;
-                                       if ((unit = strstr(t, "ms"))) {
-                                               *unit = '\0';
-                                               if (switch_is_number(t)) {
-                                                       timeout_ms = atoi(t);
-                                               }
-                                       } else if ((unit = strstr(t, "s"))) {
-                                               *unit = '\0';
-                                               if (switch_is_number(t)) {
-                                                       timeout_ms = atoi(t) * 1000;
-                                               }
-                                       }
-                                       if (timeout_ms > 0) {
-                                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding <break>: \"%s\"\n", t);
-                                               parsed_data->files[parsed_data->num_files].name = switch_core_sprintf(parsed_data->pool, "silence_stream://%i", timeout_ms);
-                                               parsed_data->files[parsed_data->num_files++].prefix = NULL;
-                                       }
-                               }
-                               return IKS_OK;
-                       }
-                       i += 2;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process <audio>- this is a URL to play
- */
-static int process_audio(struct ssml_parser *parsed_data, char **atts)
-{
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("src", atts[i])) {
-                               char *src = atts[i + 1];
-                               ikstack *stack = NULL;
-                               if (!zstr(src) && parsed_data->num_files < parsed_data->max_files) {
-                                       /* get the URI */
-                                       if (strchr(src, '&')) {
-                                               stack = iks_stack_new(256, 0);
-                                               src = iks_unescape(stack, src, strlen(src));
-                                       }
-                                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding <audio>: \"%s\"\n", src);
-                                       parsed_data->files[parsed_data->num_files].name = switch_core_strdup(parsed_data->pool, src);
-                                       parsed_data->files[parsed_data->num_files++].prefix = NULL;
-                                       if (stack) {
-                                               iks_stack_delete(&stack);
-                                       }
-                               }
-                               return IKS_OK;
-                       }
-                       i += 2;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process a tag
- */
-static int tag_hook(void *user_data, char *name, char **atts, int type)
-{
-       int result = IKS_OK;
-       struct ssml_parser *parsed_data = (struct ssml_parser *)user_data;
-       struct ssml_node *parent_node = parsed_data->cur_node;
-
-       if (type == IKS_OPEN || type == IKS_SINGLE) {
-               struct ssml_node *new_node = malloc(sizeof *new_node);
-               switch_assert(new_node);
-               if (parent_node) {
-                       /* inherit parent attribs */
-                       *new_node = *parent_node;
-                       new_node->parent_node = parent_node;
-               } else {
-                       new_node->name[0] = '\0';
-                       new_node->language[0] = '\0';
-                       new_node->gender[0] = '\0';
-                       new_node->parent_node = NULL;
-               }
-               new_node->tts_voice = NULL;
-               new_node->say_macro = NULL;
-               snprintf(new_node->tag_name, TAG_LEN, "%s", name);
-               parsed_data->cur_node = new_node;
-               result = process_tag(parsed_data, name, atts);
-       }
-
-       if (type == IKS_CLOSE || type == IKS_SINGLE) {
-               if (parsed_data->cur_node) {
-                       struct ssml_node *parent_node = parsed_data->cur_node->parent_node;
-                       free(parsed_data->cur_node);
-                       parsed_data->cur_node = parent_node;
-               }
-       }
-
-       return result;
-}
-
-/**
- * Try to get file(s) from say module
- * @param parsed_data
- * @param to_say
- * @return 1 if successful
- */
-static int get_file_from_macro(struct ssml_parser *parsed_data, char *to_say)
-{
-       struct ssml_node *cur_node = parsed_data->cur_node;
-       struct macro *say_macro = cur_node->say_macro;
-       struct voice *say_voice = find_say_voice(cur_node);
-       struct language *language;
-       char *file_string = NULL;
-       char *gender = NULL;
-       switch_say_interface_t *si;
-
-       /* voice is required */
-       if (!say_voice) {
-               return 0;
-       }
-
-       language = switch_core_hash_find(globals.language_map, say_voice->language);
-       /* language is required */
-       if (!language) {
-               return 0;
-       }
-
-       /* TODO need to_say gender, not voice gender */
-       gender = "neuter";
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Trying macro: %s, %s, %s, %s, %s\n", language->language, to_say, say_macro->type, say_macro->method, gender);
-
-       if ((si = switch_loadable_module_get_say_interface(language->say_module)) && si->say_string_function) {
-               switch_say_args_t say_args = {0};
-               say_args.type = switch_ivr_get_say_type_by_name(say_macro->type);
-               say_args.method = switch_ivr_get_say_method_by_name(say_macro->method);
-               say_args.gender = switch_ivr_get_say_gender_by_name(gender);
-               say_args.ext = "wav";
-               si->say_string_function(NULL, to_say, &say_args, &file_string);
-       }
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding macro: \"%s\", prefix=\"%s\"\n", file_string, say_voice->prefix);
-       if (!zstr(file_string)) {
-               parsed_data->files[parsed_data->num_files].name = switch_core_strdup(parsed_data->pool, file_string);
-               parsed_data->files[parsed_data->num_files++].prefix = switch_core_strdup(parsed_data->pool, say_voice->prefix);
-               return 1;
-       }
-       switch_safe_free(file_string);
-
-       return 0;
-}
-
-/**
- * Get TTS file for voice
- */
-static int get_file_from_voice(struct ssml_parser *parsed_data, char *to_say)
-{
-       struct ssml_node *cur_node = parsed_data->cur_node;
-       if (cur_node->tts_voice) {
-               char *file = switch_core_sprintf(parsed_data->pool, "%s%s", cur_node->tts_voice->prefix, to_say);
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Adding <%s>: \"%s\"\n", cur_node->tag_name, file);
-               parsed_data->files[parsed_data->num_files].name = file;
-               parsed_data->files[parsed_data->num_files++].prefix = NULL;
-               return 1;
-       }
-       return 0;
-}
-
-/**
- * Get TTS from CDATA
- */
-static int process_cdata_tts(struct ssml_parser *parsed_data, char *data, size_t len)
-{
-       struct ssml_node *cur_node = parsed_data->cur_node;
-       if (!len) {
-               return IKS_OK;
-       }
-       if (cur_node && parsed_data->num_files < parsed_data->max_files) {
-               int i = 0;
-               int empty = 1;
-               char *to_say;
-
-               /* is CDATA empty? */
-               for (i = 0; i < len && empty; i++) {
-                       empty &= !isgraph(data[i]);
-               }
-               if (empty) {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Skipping empty tts\n");
-                       return IKS_OK;
-               }
-
-               /* try macro */
-               to_say = malloc(len + 1);
-               switch_assert(to_say);
-               snprintf(to_say, len + 1, "%s", data);
-               if (!cur_node->say_macro || !get_file_from_macro(parsed_data, to_say)) {
-                       /* use voice instead */
-                       if (!get_file_from_voice(parsed_data, to_say)) {
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No TTS voices available to render text!\n");
-                       }
-               }
-               free(to_say);
-               return IKS_OK;
-       }
-       return IKS_BADXML;
-}
-
-/**
- * Process <sub>- this is an alias for text to speak
- */
-static int process_sub(struct ssml_parser *parsed_data, char **atts)
-{
-       if (atts) {
-               int i = 0;
-               while (atts[i]) {
-                       if (!strcmp("alias", atts[i])) {
-                               char *alias = atts[i + 1];
-                               if (!zstr(alias)) {
-                                       return process_cdata_tts(parsed_data, alias, strlen(alias));
-                               }
-                               return IKS_BADXML;
-                       }
-                       i += 2;
-               }
-       }
-       return IKS_OK;
-}
-
-/**
- * Process cdata
- */
-static int cdata_hook(void *user_data, char *data, size_t len)
-{
-       struct ssml_parser *parsed_data = (struct ssml_parser *)user_data;
-       if (!parsed_data) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Missing parser\n");
-               return IKS_BADXML;
-       }
-       if (parsed_data->cur_node) {
-               struct tag_def *handler = switch_core_hash_find(globals.tag_defs, parsed_data->cur_node->tag_name);
-               if (handler) {
-                       return handler->cdata_fn(parsed_data, data, len);
-               }
-               return IKS_BADXML;
-       }
-       return IKS_OK;
-}
-
-/**
- * Transforms SSML into file_string format and opens file_string.
- * @param handle
- * @param path the inline SSML
- * @return SWITCH_STATUS_SUCCESS if opened
- */
-static switch_status_t ssml_file_open(switch_file_handle_t *handle, const char *path)
-{
-       switch_status_t status = SWITCH_STATUS_FALSE;
-       struct ssml_context *context = switch_core_alloc(handle->memory_pool, sizeof(*context));
-       struct ssml_parser *parsed_data = switch_core_alloc(handle->memory_pool, sizeof(*parsed_data));
-       iksparser *parser = iks_sax_new(parsed_data, tag_hook, cdata_hook);
-
-       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Open: %s\n", path);
-
-       parsed_data->cur_node = NULL;
-       parsed_data->files = switch_core_alloc(handle->memory_pool, sizeof(struct ssml_file) * MAX_VOICE_FILES);
-       parsed_data->max_files = MAX_VOICE_FILES;
-       parsed_data->num_files = 0;
-       parsed_data->pool = handle->memory_pool;
-       parsed_data->sample_rate = handle->samplerate;
-
-       if (iks_parse(parser, path, 0, 1) == IKS_OK) {
-               if (parsed_data->num_files) {
-                       context->files = parsed_data->files;
-                       context->num_files = parsed_data->num_files;
-                       context->index = -1;
-                       handle->private_info = context;
-                       status = next_file(handle);
-               } else {
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "No files to play: %s\n", path);
-               }
-       } else {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Parse error: %s, num_files = %i\n", path, parsed_data->num_files);
-       }
-
-       iks_parser_delete(parser);
-
-       return status;
-}
-
-/**
- * Close SSML document.
- * @param handle
- * @return SWITCH_STATUS_SUCCESS
- */
-static switch_status_t ssml_file_close(switch_file_handle_t *handle)
-{
-       struct ssml_context *context = (struct ssml_context *)handle->private_info;
-       if (switch_test_flag((&context->fh), SWITCH_FILE_OPEN)) {
-               return switch_core_file_close(&context->fh);
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/**
- * Read from SSML document
- * @param handle
- * @param data
- * @param len
- * @return
- */
-static switch_status_t ssml_file_read(switch_file_handle_t *handle, void *data, size_t *len)
-{
-       switch_status_t status;
-       struct ssml_context *context = (struct ssml_context *)handle->private_info;
-       size_t llen = *len;
-
-       status = switch_core_file_read(&context->fh, data, len);
-       if (status != SWITCH_STATUS_SUCCESS) {
-               if ((status = next_file(handle)) != SWITCH_STATUS_SUCCESS) {
-                       return status;
-               }
-               *len = llen;
-               status = switch_core_file_read(&context->fh, data, len);
-       }
-       return status;
-}
-
-/**
- * Seek file
- */
-static switch_status_t ssml_file_seek(switch_file_handle_t *handle, unsigned int *cur_sample, int64_t samples, int whence)
-{
-       struct ssml_context *context = handle->private_info;
-
-       if (samples == 0 && whence == SWITCH_SEEK_SET) {
-               /* restart from beginning */
-               context->index = -1;
-               return next_file(handle);
-       }
-
-       if (!handle->seekable) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "File is not seekable\n");
-               return SWITCH_STATUS_NOTIMPL;
-       }
-
-       return switch_core_file_seek(&context->fh, cur_sample, samples, whence);
-}
-
-/**
- * Configure voices
- * @param pool memory pool to use
- * @param map voice map to load
- * @param type type of voices (for logging)
- */
-static void do_config_voices(switch_memory_pool_t *pool, switch_xml_t voices, switch_hash_t *map, const char *type)
-{
-       if (voices) {
-               int priority = MAX_VOICE_PRIORITY;
-               switch_xml_t voice;
-               for (voice = switch_xml_child(voices, "voice"); voice; voice = voice->next) {
-                       const char *name = switch_xml_attr_soft(voice, "name");
-                       const char *language = switch_xml_attr_soft(voice, "language");
-                       const char *gender = switch_xml_attr_soft(voice, "gender");
-                       const char *prefix = switch_xml_attr_soft(voice, "prefix");
-                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s map (%s, %s, %s) = %s\n", type, name, language, gender, prefix);
-                       if (!zstr(name) && !zstr(prefix)) {
-                               struct voice *v = (struct voice *)switch_core_alloc(pool, sizeof(*v));
-                               v->name = switch_core_strdup(pool, name);
-                               v->language = switch_core_strdup(pool, language);
-                               v->gender = switch_core_strdup(pool, gender);
-                               v->prefix = switch_core_strdup(pool, prefix);
-                               v->priority = priority--;
-                               switch_core_hash_insert(map, name, v);
-                       }
-               }
-       }
-}
-
-/**
- * Set default configuration when no XML configuration is present.
- * @param pool memory pool to use
- * @return SWITCH_STATUS_SUCCESS if module is configured
- */
-static switch_status_t do_default_config(switch_memory_pool_t *pool)
-{
-       struct voice *v = NULL;
-       struct language *l = NULL;
-       struct macro *m = NULL;
-       const char *sounds_dir = switch_core_get_variable("sounds_dir");
-
-       /* add TTS voice */
-       v = switch_core_alloc(pool, sizeof(*v));
-       v->name = "slt";
-       v->language = "en-US";
-       v->gender = "female";
-       v->prefix = "tts://flite|slt|";
-       v->priority = MAX_VOICE_PRIORITY;
-       switch_core_hash_insert(globals.tts_voice_map, "slt", v);
-
-       /* add Say voice */
-       v = switch_core_alloc(pool, sizeof(*v));
-       v->name = "callie";
-       v->language = "en-US";
-       v->gender = "female";
-       v->prefix = switch_core_sprintf(pool, "%s/en/us/callie/", sounds_dir ? sounds_dir : "");
-       switch_core_hash_insert(globals.say_voice_map, "callie", v);
-
-       /* Add ISO language to Say language mapping */
-       l = switch_core_alloc(pool, sizeof(*l));
-       l->iso = "en-US";
-       l->say_module = "en";
-       l->language = "en";
-       switch_core_hash_insert(globals.language_map, "en-US", l);
-
-       /* Map interpret-as to Say */
-       m = switch_core_alloc(pool, sizeof(*m));
-       m->name = "ordinal";
-       m->method = "counted";
-       m->type = "number";
-       switch_core_hash_insert(globals.interpret_as_map, "ordinal", m);
-
-       m = switch_core_alloc(pool, sizeof(*m));
-       m->name = "cardinal";
-       m->method = "pronounced";
-       m->type = "number";
-       switch_core_hash_insert(globals.interpret_as_map, "cardinal", m);
-
-       m = switch_core_alloc(pool, sizeof(*m));
-       m->name = "characters";
-       m->method = "pronounced";
-       m->type = "name_spelled";
-       switch_core_hash_insert(globals.interpret_as_map, "characters", m);
-
-       m = switch_core_alloc(pool, sizeof(*m));
-       m->name = "telephone";
-       m->method = "pronounced";
-       m->type = "telephone_number";
-       switch_core_hash_insert(globals.interpret_as_map, "telephone", m);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-
-/**
- * Configure module
- * @param pool memory pool to use
- * @return SWITCH_STATUS_SUCCESS if module is configured
- */
-static switch_status_t do_config(switch_memory_pool_t *pool)
-{
-       char *cf = "ssml.conf";
-       switch_xml_t cfg, xml;
-
-       if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "open of %s failed, using default configuration\n", cf);
-               return do_default_config(pool);
-       }
-
-       /* get voices */
-       do_config_voices(pool, switch_xml_child(cfg, "tts-voices"), globals.tts_voice_map, "tts");
-       do_config_voices(pool, switch_xml_child(cfg, "say-voices"), globals.say_voice_map, "say");
-
-       /* get languages */
-       {
-               switch_xml_t languages = switch_xml_child(cfg, "language-map");
-               if (languages) {
-                       switch_xml_t language;
-                       for (language = switch_xml_child(languages, "language"); language; language = language->next) {
-                               const char *iso = switch_xml_attr_soft(language, "iso");
-                               const char *say_module = switch_xml_attr_soft(language, "say-module");
-                               const char *lang = switch_xml_attr_soft(language, "language");
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "language map: %s = (%s, %s) \n", iso, say_module, lang);
-                               if (!zstr(iso) && !zstr(say_module) && !zstr(lang)) {
-                                       struct language *l = (struct language *)switch_core_alloc(pool, sizeof(*l));
-                                       l->iso = switch_core_strdup(pool, iso);
-                                       l->say_module = switch_core_strdup(pool, say_module);
-                                       l->language = switch_core_strdup(pool, lang);
-                                       switch_core_hash_insert(globals.language_map, iso, l);
-                               }
-                       }
-               }
-       }
-
-       /* get macros */
-       {
-               switch_xml_t macros = switch_xml_child(cfg, "macros");
-               if (macros) {
-                       switch_xml_t macro;
-                       for (macro = switch_xml_child(macros, "macro"); macro; macro = macro->next) {
-                               const char *name = switch_xml_attr_soft(macro, "name");
-                               const char *method = switch_xml_attr_soft(macro, "method");
-                               const char *type = switch_xml_attr_soft(macro, "type");
-                               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "macro: %s = (%s, %s) \n", name, method, type);
-                               if (!zstr(name) && !zstr(type)) {
-                                       struct macro *m = (struct macro *)switch_core_alloc(pool, sizeof(*m));
-                                       m->name = switch_core_strdup(pool, name);
-                                       m->method = switch_core_strdup(pool, method);
-                                       m->type = switch_core_strdup(pool, type);
-                                       switch_core_hash_insert(globals.interpret_as_map, name, m);
-                               }
-                       }
-               }
-       }
-
-       switch_xml_free(xml);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static char *ssml_supported_formats[] = { "ssml", NULL };
-
-SWITCH_MODULE_LOAD_FUNCTION(mod_ssml_load)
-{
-       switch_file_interface_t *file_interface;
-
-       *module_interface = switch_loadable_module_create_module_interface(pool, modname);
-       file_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_FILE_INTERFACE);
-       file_interface->interface_name = modname;
-       file_interface->extens = ssml_supported_formats;
-       file_interface->file_open = ssml_file_open;
-       file_interface->file_close = ssml_file_close;
-       file_interface->file_read = ssml_file_read;
-       file_interface->file_seek = ssml_file_seek;
-
-       globals.pool = pool;
-       switch_core_hash_init(&globals.voice_cache);
-       switch_core_hash_init(&globals.tts_voice_map);
-       switch_mutex_init(&globals.tts_voice_map_mutex, SWITCH_MUTEX_NESTED, pool);
-       switch_core_hash_init(&globals.say_voice_map);
-       switch_mutex_init(&globals.say_voice_map_mutex, SWITCH_MUTEX_NESTED, pool);
-       switch_core_hash_init(&globals.interpret_as_map);
-       switch_core_hash_init(&globals.language_map);
-       switch_core_hash_init(&globals.tag_defs);
-
-       add_root_tag_def("speak", process_xml_lang, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,p,s,lexicon,metadata,meta");
-       add_tag_def("p", process_xml_lang, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,s");
-       add_tag_def("s", process_xml_lang, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub");
-       add_tag_def("voice", process_voice, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,p,s");
-       add_tag_def("prosody", process_attribs_ignore, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,p,s");
-       add_tag_def("audio", process_audio, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub,p,s,desc");
-       add_tag_def("desc", process_attribs_ignore, process_cdata_ignore, "");
-       add_tag_def("emphasis", process_attribs_ignore, process_cdata_tts, "audio,break,emphasis,mark,phoneme,prosody,say-as,voice,sub");
-       add_tag_def("say-as", process_say_as, process_cdata_tts, "");
-       add_tag_def("sub", process_sub, process_cdata_ignore, "");
-       add_tag_def("phoneme", process_attribs_ignore, process_cdata_tts, "");
-       add_tag_def("break", process_break, process_cdata_bad, "");
-       add_tag_def("mark", process_attribs_ignore, process_cdata_bad, "");
-       add_tag_def("lexicon", process_attribs_ignore, process_cdata_bad, "");
-       add_tag_def("metadata", process_attribs_ignore, process_cdata_ignore, "ANY");
-       add_tag_def("meta", process_attribs_ignore, process_cdata_bad, "");
-
-       return do_config(pool);
-}
-
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_ssml_shutdown)
-{
-       switch_core_hash_destroy(&globals.voice_cache);
-       switch_core_hash_destroy(&globals.tts_voice_map);
-       switch_core_hash_destroy(&globals.say_voice_map);
-       switch_core_hash_destroy(&globals.interpret_as_map);
-       switch_core_hash_destroy(&globals.language_map);
-       {
-               switch_hash_index_t *hi = NULL;
-               for (hi = switch_core_hash_first(globals.tag_defs); hi; hi = switch_core_hash_next(&hi)) {
-                       const void *key;
-                       struct tag_def *def;
-                       switch_core_hash_this(hi, &key, NULL, (void *)&def);
-                       switch_core_hash_destroy(&def->children_tags);
-               }
-       }
-       switch_core_hash_destroy(&globals.tag_defs);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
- */