<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[Freeswitch-trunk][15701] </title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<div id="header">FreeSWITCH Subversion</div>
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://fisheye.freeswitch.org/changelog/FreeSWITCH?cs=15701">15701</a></dd>
<dt>Author</dt> <dd>joshrivers</dd>
<dt>Date</dt> <dd>2009-11-28 21:39:49 -0600 (Sat, 28 Nov 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Updating branch to HEAD.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchFreeswitch2008sln">freeswitch/branches/joshrivers/mod_managed_working_branch/Freeswitch.2008.sln</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchMakefileam">freeswitch/branches/joshrivers/mod_managed_working_branch/Makefile.am</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchconflangruvmsoundsxml">freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/vm/sounds.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchfreeswitchspec">freeswitch/branches/joshrivers/mod_managed_working_branch/freeswitch.spec</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchlibslibsndfileconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch/libs/libsndfile/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcincludeswitch_callerh">freeswitch/branches/joshrivers/mod_managed_working_branch/src/include/switch_caller.h</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcincludeswitch_coreh">freeswitch/branches/joshrivers/mod_managed_working_branch/src/include/switch_core.h</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_cidlookupmod_cidlookupc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_cidlookup/mod_cidlookup.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_commandsmod_commandsc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_commands/mod_commands.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_lcrmod_lcrc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_lcr/mod_lcr.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_limitmod_limitc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_limit/mod_limit.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_voicemailmod_voicemailc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_voicemail/mod_voicemail.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcmodendpointsmod_sofiasofia_gluec">freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/endpoints/mod_sofia/sofia_glue.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcmodevent_handlersmod_event_socketmod_event_socketc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/event_handlers/mod_event_socket/mod_event_socket.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcswitch_callerc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_caller.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcswitch_core_memoryc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_core_memory.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchsrcswitch_core_sqldbc">freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_core_sqldb.c</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/</li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirsoundsxml">freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/sounds.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirttsxml">freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/tts.xml</a></li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/dvarnes/</li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/dvarnes/java/</li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/dvarnes/java/esl-client/</li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/</li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfREADME">freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/README</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfemail2pdf">freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/email2pdf</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfheaderhtml">freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/header.html</a></li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/</li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupFreePBXurl">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FreePBX.url</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupFusionPBXurl">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FusionPBX.url</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_freepbxbat">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_freepbxsql">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.sql</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_fusionpbxbat">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_fusionpbxsql">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.sql</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupexpsoundbat">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/expsound.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreepbxico">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freepbx.ico</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitchico">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch.ico</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitch_104iss">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_1.0.4.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitch_freepbx_fusionpbxiss">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfsguiiss">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/fsgui.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupvcredist_x64exe">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/vcredist_x64.exe</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupvcredist_x86exe">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/vcredist_x86.exe</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirsoundsxml">freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/sounds.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirttsxml">freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/tts.xml</a></li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/dvarnes/java/</li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/dvarnes/java/esl-client/</li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfREADME">freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/README</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfemail2pdf">freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/email2pdf</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfheaderhtml">freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/header.html</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupFreePBXurl">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FreePBX.url</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupFusionPBXurl">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FusionPBX.url</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_freepbxbat">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_freepbxsql">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.sql</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_fusionpbxbat">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_fusionpbxsql">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.sql</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupexpsoundbat">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/expsound.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreepbxico">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freepbx.ico</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitchico">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch.ico</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitch_104iss">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_1.0.4.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitch_freepbx_fusionpbxiss">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfsguiiss">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/fsgui.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupvcredist_x64exe">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/vcredist_x64.exe</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupvcredist_x86exe">freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/vcredist_x86.exe</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchFreeswitch2008sln"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/Freeswitch.2008.sln (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/Freeswitch.2008.sln        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/Freeswitch.2008.sln        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -1022,6 +1022,9 @@
</span><span class="cx"> Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unimrcp", "unimrcp", "{62F27B1A-C919-4A70-8478-51F178F3B18F}"
</span><span class="cx"> EndProject
</span><span class="cx"> Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "aprtoolkit", "libs\unimrcp\libs\apr-toolkit\aprtoolkit.2008.vcproj", "{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}"
</span><ins>+        ProjectSection(ProjectDependencies) = postProject
+                {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+        EndProjectSection
</ins><span class="cx"> EndProject
</span><span class="cx"> Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpf", "libs\unimrcp\libs\mpf\mpf.2008.vcproj", "{B5A00BFA-6083-4FAE-A097-71642D6473B5}"
</span><span class="cx"> EndProject
</span><span class="lines">@@ -1036,6 +1039,9 @@
</span><span class="cx"> Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unirtsp", "libs\unimrcp\libs\uni-rtsp\unirtsp.2008.vcproj", "{504B3154-7A4F-459D-9877-B951021C3F1F}"
</span><span class="cx"> EndProject
</span><span class="cx"> Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpsofiasip", "libs\unimrcp\modules\mrcp-sofiasip\mrcpsofiasip.2008.vcproj", "{746F3632-5BB2-4570-9453-31D6D58A7D8E}"
</span><ins>+        ProjectSection(ProjectDependencies) = postProject
+                {70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {70A49BC2-7500-41D0-B75D-EDCC5BE987A0}
+        EndProjectSection
</ins><span class="cx"> EndProject
</span><span class="cx"> Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mrcpunirtsp", "libs\unimrcp\modules\mrcp-unirtsp\mrcpunirtsp.2008.vcproj", "{DEB01ACB-D65F-4A62-AED9-58C1054499E9}"
</span><span class="cx"> EndProject
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchMakefileam"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/Makefile.am (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/Makefile.am        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/Makefile.am        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -222,8 +222,8 @@
</span><span class="cx">
</span><span class="cx"> bin_SCRIPTS = scripts/gentls_cert scripts/fsxs
</span><span class="cx">
</span><del>-src/include/switch_swigable_cpp.h: src/include/switch_cpp.h
-        $(CC) -E src/include/switch_cpp.h -DSWITCH_DECLARE_CLASS= -DSWITCH_DECLARE\(x\)=x -DSWITCH_DECLARE_CONSTRUCTOR= -DSWITCH_DECLARE_NONSTD\(x\)=x 2>/dev/null | grep -v "^#" > src/include/switch_swigable_cpp.h
</del><ins>+src/include/switch_swigable_cpp.h: $(switch_srcdir)/src/include/switch_cpp.h
+        $(CC) -E $(switch_srcdir)/src/include/switch_cpp.h -DSWITCH_DECLARE_CLASS= -DSWITCH_DECLARE\(x\)=x -DSWITCH_DECLARE_CONSTRUCTOR= -DSWITCH_DECLARE_NONSTD\(x\)=x 2>/dev/null | grep -v "^#" > src/include/switch_swigable_cpp.h
</ins><span class="cx">
</span><span class="cx"> libs/libedit/src/.libs/libedit.a:
</span><span class="cx">         cd libs/libedit && $(MAKE)
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirfromrev15700freeswitchtrunkconflangrudir"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir (from rev 15700, freeswitch/trunk/conf/lang/ru/dir)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirsoundsxml"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/sounds.xml</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirsoundsxmlfromrev15700freeswitchtrunkconflangrudirsoundsxml"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/sounds.xml (from rev 15700, freeswitch/trunk/conf/lang/ru/dir/sounds.xml) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/sounds.xml         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/sounds.xml        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,121 @@
</span><ins>+<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_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><!--This line will be ignored it's here to validate the xml and is optional -->
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirttsxml"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/tts.xml</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchconflangrudirttsxmlfromrev15700freeswitchtrunkconflangrudirttsxml"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/tts.xml (from rev 15700, freeswitch/trunk/conf/lang/ru/dir/tts.xml) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/tts.xml         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/dir/tts.xml        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,96 @@
</span><ins>+<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="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><!--This line will be ignored it's here to validate the xml and is optional -->
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchconflangruvmsoundsxml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/vm/sounds.xml (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/vm/sounds.xml        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/conf/lang/ru/vm/sounds.xml        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">         <action function="say" data="$1" method="pronounced" type="MESSAGES"/>
</span><span class="cx">         <action function="play-file" data="voicemail/vm-$2.wav"/>
</span><span class="cx">         <action function="play-file" data="voicemail/vm-message.wav"/>
</span><del>-        <action function="play-file" data="voicemail/vm-in_folder.wav"/>
</del><ins>+<!--        <action function="play-file" data="voicemail/vm-in_folder.wav"/>-->
</ins><span class="cx"> </match>
</span><span class="cx"> </input>
</span><span class="cx"> <!-- от 10 до 19 и ноль --> <!-- от 5до 9 и больше 20-ти 25-29 -->
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">         <action function="say" data="$1" method="pronounced" type="MESSAGES"/>
</span><span class="cx">         <action function="play-file" data="voicemail/vm-$2x.wav"/>
</span><span class="cx">         <action function="play-file" data="voicemail/vm-messagex.wav"/>
</span><del>-        <action function="play-file" data="voicemail/vm-in_folder.wav"/>
</del><ins>+<!--        <action function="play-file" data="voicemail/vm-in_folder.wav"/>-->
</ins><span class="cx"> </match>
</span><span class="cx"> </input>
</span><span class="cx"> <input pattern="^(\d+[0,2-9][2-4]|[2-9][2-4]|[2-4]):(.*)$">
</span><span class="lines">@@ -193,26 +193,45 @@
</span><span class="cx"> </macro>
</span><span class="cx">
</span><span class="cx"> <macro name="voicemail_listen_file_check">
</span><ins>+ <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>
</ins><span class="cx"> <input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
</span><span class="cx"> <match>
</span><del>-        <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"/>
</del><ins>+ <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"/>
</ins><span class="cx"> </match>
</span><span class="cx"> </input>
</span><span class="cx"> </macro>
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribdvarnesfromrev15700freeswitchtrunkcontribdvarnes"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/dvarnes (from rev 15700, freeswitch/trunk/contrib/dvarnes)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribdvarnesjavafromrev15700freeswitchtrunkcontribdvarnesjava"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/dvarnes/java (from rev 15700, freeswitch/trunk/contrib/dvarnes/java)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribdvarnesjavaeslclientfromrev15700freeswitchtrunkcontribdvarnesjavaeslclient"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/dvarnes/java/esl-client (from rev 15700, freeswitch/trunk/contrib/dvarnes/java/esl-client)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdffromrev15700freeswitchtrunkcontribsathieuemail2pdf"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf (from rev 15700, freeswitch/trunk/contrib/sathieu/email2pdf)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfREADME"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/README</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfREADMEfromrev15700freeswitchtrunkcontribsathieuemail2pdfREADME"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/README (from rev 15700, freeswitch/trunk/contrib/sathieu/email2pdf/README) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/README         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/README        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+email2pdf - Render email as pdf
+
+Copyright (c) 2009 Mathieu Parent <math.parent@gmail.com>
+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, or
+(at your option) any later version.
+
+QUICK START GUIDE:
+
+ email2pdf uses the following modules:
+
+        Getopt::Long - required
+        Pod::Usage - required
+        File::Temp - required
+        Email::MIME - required
+        Email::MIME::ContentType - required
+        Template - required
+
+ email2pdf uses the following tools to convert parts:
+
+        html2ps - for html and plain
+        openoffice.org thru ooextract.py - for OpenDocument (Text, Spreadsheet, Presentation, Graphics)
+         for MS Word, Excel, PowerPoint
+         See <http://blogs.igalia.com/berto/2007/09/15/converting-office-documents-into-pdf-from-the-command-line/>
+        imagemagick's convert - for gif, jpeg, png and tiff
+
+Share and Enjoy!
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfemail2pdf"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/email2pdf</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfemail2pdffromrev15700freeswitchtrunkcontribsathieuemail2pdfemail2pdf"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/email2pdf (from rev 15700, freeswitch/trunk/contrib/sathieu/email2pdf/email2pdf) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/email2pdf         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/email2pdf        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,274 @@
</span><ins>+#!/usr/bin/perl
+=head1 NAME
+
+email2pdf - Render email as pdf
+
+=head1 SYNOPSIS
+
+B<email2pdf> [options] filein fileout
+
+=head1 ARGUMENTS
+
+=over 8
+
+=item I<filein>
+
+RFC2822 email. Use - for stdin.
+
+=item I<fileout>
+
+PDF file. Use - for stdout.
+
+=back
+
+=head1 OPTIONS
+
+=over 8
+
+=item B<--help>
+
+Print a brief help message and exits.
+
+=item B<--man>
+
+Prints the manual page and exits.
+
+=item B<--header>=header.html
+
+Set header file. This file will be processed using Template-Toolkit.
+
+=back
+
+=head1 COPYRIGHT AND AUTHORS
+
+Copyright (c) 2009 Mathieu Parent <math.parent@gmail.com>
+
+=head1 LICENSE
+
+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, 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 can view the GNU General Public License, online, at the GNU
+Project's homepage; see <http://www.gnu.org/licenses/gpl.html>.
+
+=cut
+
+
+use strict;
+use warnings;
+
+use Getopt::Long;
+use Pod::Usage;
+
+use File::Temp qw/tempdir tempfile/;
+use Email::MIME;
+use Email::MIME::ContentType;
+use Template;
+
+# =========================================================================== #
+# CONFIG
+
+my $mime_types = {
+        #plain and html
+        'text/plain' => 'plain',
+        'text/html' => 'html',
+        
+        #images
+        'image/gif' => 'gif',
+        'image/jpeg' => 'jpeg',
+        'image/png' => 'png',
+        'image/tiff' => 'tiff',
+
+        #OpenDocument
+        'application/vnd.oasis.opendocument.text' => 'opendoctext',
+        'application/vnd.oasis.opendocument.spreadsheet' => 'opendocspreadsheet',
+        'application/vnd.oasis.opendocument.presentation' => 'opendocpresentation',
+        'application/vnd.oasis.opendocument.graphics' => 'opendocgraphics',
+        
+        #MS office
+        'application/vnd.ms-excel' => 'msexcel',
+        'application/msexcel' => 'msexcel',
+        'application/x-msexcel' => 'msexcel',
+        'application/vnd.ms-powerpoint' => 'mspowerpoint',
+        'application/vnd.ms-word' => 'msword',
+        'application/msword' => 'msword',
+        
+        'application/pdf' => 'pdf',
+        
+};
+my $mime_drivers = {
+        #plain and html
+        'plain' => ['.txt', 'html2ps FILE | ps2pdf - -'],
+        'html' => ['.html', 'html2ps FILE | ps2pdf - -'],
+        
+        #images
+        'gif' => ['.gif', 'convert FILE pdf:-'],
+        'jpeg' => ['.jpeg', 'convert FILE pdf:-'],
+        'png' => ['.png', 'convert FILE pdf:-'],
+        'tiff' => ['.tiff', 'convert FILE pdf:-'],
+        
+        #OpenDocument
+        'opendoctext' => ['.odt', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'opendocspreadsheet' => ['.ods', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'opendocpresentation' => ['.odp', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'opendocgraphics' => ['.odg', 'python /root/ooextract.py --pdf --stdout FILE'],
+
+        #MS office
+        'msexcel' => ['.xls', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'mspowerpoint' => ['.ppt', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'msword' => ['.doc', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'pdf' => ['.pdf', 'cat FILE'],
+};
+# Template config
+my $tt_config = {
+};
+
+# =========================================================================== #
+# vars
+my @files;
+push @files, (0);
+
+my $email;
+my $output_dir;
+
+# options
+my $o_help = 0;
+my $o_man = 0;
+my $o_header = 'header.html';
+# =========================================================================== #
+sub process_raw
+{
+        my $filename = shift || 'noname';
+        my $content_type = shift;
+        my $raw = shift;
+        my $is_header = shift || 0;
+        if(defined($mime_types->{$content_type})) {
+                if(defined($mime_drivers->{$mime_types->{$content_type}})) {
+                        my @mime_driver = $mime_drivers->{$mime_types->{$content_type}};
+                        my $suffix = $mime_driver[0][0];
+                        my $command = $mime_driver[0][1];
+                        my ($fh_in, $filename_in) = tempfile( DIR => $output_dir, SUFFIX => $suffix );
+                        system("chmod +r $filename_in");
+                        print { $fh_in } $raw;
+                        close $fh_in or warn $! ? "Error closing sort pipe: $!" : "Exit status $? from sort";
+                        $command =~ s/FILE/$filename_in/;
+                        print STDERR "Processing '$filename' ($content_type). From '$filename_in'. ";
+                        my $out = `$command`;
+                        if(!$out) {
+                                print STDERR "Empty generated PDF.\n";
+                                return;
+                        }
+                        my ($fh_out, $filename_out) = tempfile( DIR => $output_dir, SUFFIX => '.pdf' );
+                        print STDERR "To '$filename_out'. ";
+                        print { $fh_out } $out;
+                        close $fh_out or warn $! ? "Error closing sort pipe: $!" : "Exit status $? from sort";
+                        if($is_header) {
+                                shift @files;
+                                unshift @files, ($filename_out);
+                        } else {
+                                push @files, ($filename_out);
+                        }
+                        print STDERR "\n";
+                } else {
+                        print STDERR "Undefined mime driver: $mime_types->{$content_type}\n";
+                }
+        } else {
+                print STDERR "Undefined mime type: $content_type\n";
+        }
+}
+
+sub process_header
+{
+        my $parsed = shift;
+        unshift @files, (0) if $files[0] != 0;
+        # define template variables for replacement
+        my $vars = {
+                body => '', #$parsed->body,
+                body_raw => $parsed->body_raw,
+                content_type => $parsed->content_type,
+                mail => $parsed,
+        };
+
+        # specify input filename, or file handle, text reference, etc.
+        my $content_type = `file --mime-type --brief header.html`;
+        $content_type =~ s/\s+$//; # trim end whitespace
+        my $header = '';
+
+        # create Template object
+        my $template = Template->new($tt_config);
+
+        # process input template, substituting variables
+        $template->process($o_header, $vars, \$header)
+                || die $template->error();
+        process_raw $parsed->filename, $content_type, $header, 1;
+}
+
+sub process_part
+{
+        my $part = shift;
+        my $parsed_content_type = parse_content_type($part->content_type);
+        my $content_type = $parsed_content_type->{'discrete'}.'/'.$parsed_content_type->{'composite'};
+        if($content_type eq 'multipart/alternative') {
+                my @subparts = $part->subparts;
+                foreach my $subpart (@subparts) {
+                        return if $subpart->parts > 1; # multipart
+                        my $parsed_subcontent_type = parse_content_type($subpart->content_type);
+                        my $subcontent_type = $parsed_subcontent_type->{'discrete'}.'/'.$parsed_subcontent_type->{'composite'};
+                        process_raw $subpart->filename, $subcontent_type, $subpart->body, 1;
+                }
+        } else {
+                process_raw $part->filename, $content_type, $part->body;
+        }
+}
+
+# =========================================================================== #
+my $result = GetOptions(
+ 'help|?' => \$o_help,
+ 'man' => \$o_man,
+ 'header=s' => \$o_header,
+ );
+
+pod2usage(-exitstatus => 0, -verbose => 2) if $o_man;
+pod2usage(-exitstatus => 0, -verbose => 1) if $o_help;
+
+my $file_in = shift @ARGV;
+if(!defined($file_in)) {
+        print "Missing argument: filein\n";
+        pod2usage(-exitstatus => 0, -verbose => 1);
+        exit 1;
+}
+my $file_out = shift @ARGV;
+if(!defined($file_out)) {
+        print "Missing argument: fileout\n";
+        pod2usage(-exitstatus => 0, -verbose => 1);
+        exit 1;
+}
+
+# =========================================================================== #
+# setup temp dir
+$output_dir = tempdir( CLEANUP => 1 );
+system("chmod +rwx $output_dir");
+
+# load mail
+if($file_in eq "-") {
+        $email = Email::MIME->new(join('',<>));
+} else {
+        open(FILEIN, '<', $file_in);
+        $email = Email::MIME->new(join('',<FILEIN>));
+        close(FILEIN);
+}
+
+my @parts = $email->subparts;
+foreach my $part (@parts) {
+        process_part $part;
+}
+process_header($email);
+print "Merging files: ".join(' ', @files)."\n";
+system('pdftk '.join(' ', @files)." cat output $file_out");
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfheaderhtml"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/header.html</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchcontribsathieuemail2pdfheaderhtmlfromrev15700freeswitchtrunkcontribsathieuemail2pdfheaderhtml"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/header.html (from rev 15700, freeswitch/trunk/contrib/sathieu/email2pdf/header.html) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/header.html         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/contrib/sathieu/email2pdf/header.html        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>[% mail.header('Subject') %]</title>
+ </head>
+ <body>
+ <h3>Fax</h3>
+From : [% mail.header('From') %]<br>
+Subject : [% mail.header('Subject') %]<br>
+[% body %]
+</body>
+</html>
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchfreeswitchspec"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/freeswitch.spec (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/freeswitch.spec        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/freeswitch.spec        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -315,18 +315,18 @@
</span><span class="cx"> PASSTHRU_CODEC_MODULES="codecs/mod_g729 codecs/mod_g723_1 codecs/mod_amr codecs/mod_amrwb"
</span><span class="cx"> SPIDERMONKEY_MODULES="languages/mod_spidermonkey languages/mod_spidermonkey_curl languages/mod_spidermonkey_core_db languages/mod_spidermonkey_odbc languages/mod_spidermonkey_socket languages/mod_spidermonkey_teletone"
</span><span class="cx"> APPLICATIONS_MODULES="applications/mod_commands applications/mod_conference applications/mod_dptools applications/mod_enum applications/mod_esf applications/mod_expr applications/mod_fifo applications/mod_limit applications/mod_rss applications/mod_voicemail applications/mod_directory applications/mod_fsv applications/mod_lcr applications/mod_easyroute applications/mod_stress applications/mod_vmd applications/mod_limit applications/mod_soundtouch applications/mod_fax"
</span><del>-CODECS_MODULES="codecs/mod_ilbc codecs/mod_h26x codecs/mod_voipcodecs codecs/mod_speex codecs/mod_celt codecs/mod_siren"
</del><ins>+CODECS_MODULES="codecs/mod_ilbc codecs/mod_h26x codecs/mod_voipcodecs codecs/mod_speex codecs/mod_celt codecs/mod_siren codecs/mod_bv"
</ins><span class="cx"> DIALPLANS_MODULES="dialplans/mod_dialplan_asterisk dialplans/mod_dialplan_directory dialplans/mod_dialplan_xml"
</span><span class="cx"> DIRECTORIES_MODULES=""
</span><span class="cx"> ENDPOINTS_MODULES="endpoints/mod_dingaling endpoints/mod_iax endpoints/mod_portaudio endpoints/mod_sofia ../../libs/openzap/mod_openzap endpoints/mod_loopback"
</span><span class="cx"> ASR_TTS_MODULES="asr_tts/mod_pocketsphinx asr_tts/mod_flite asr_tts/mod_unimrcp"
</span><span class="cx"> EVENT_HANDLERS_MODULES="event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv"
</span><span class="cx"> FORMATS_MODULES="formats/mod_local_stream formats/mod_native_file formats/mod_sndfile formats/mod_tone_stream formats/mod_shout"
</span><del>-LANGUAGES_MODULES="languages/mod_perl languages/mod_lua languages/mod_python languages/mod_yaml"
</del><ins>+LANGUAGES_MODULES="languages/mod_perl languages/mod_lua languages/mod_python"
</ins><span class="cx"> LOGGERS_MODULES="loggers/mod_console loggers/mod_logfile loggers/mod_syslog"
</span><span class="cx"> SAY_MODULES="say/mod_say_en say/mod_say_de say/mod_say_fr"
</span><span class="cx"> TIMERS_MODULES=
</span><del>-DISABLED_MODULES="applications/mod_soundtouch languages/mod_spidermonkey_skel ast_tts/mod_cepstral asr_tts/mod_lumenvox event_handlers/mod_event_test event_handlers/mod_radius_cdr event_handlers/mod_zeroconf languages/mod_managed languages/mod_java say/mod_say_it say/mod_say_es say/mod_say_nl"
</del><ins>+DISABLED_MODULES="applications/mod_soundtouch languages/mod_spidermonkey_skel ast_tts/mod_cepstral asr_tts/mod_lumenvox event_handlers/mod_event_test event_handlers/mod_radius_cdr event_handlers/mod_zeroconf languages/mod_managed languages/mod_java say/mod_say_it say/mod_say_es say/mod_say_nl languages/mod_yaml"
</ins><span class="cx"> XML_INT_MODULES="xml_int/mod_xml_rpc xml_int/mod_xml_curl xml_int/mod_xml_cdr "
</span><span class="cx"> MYMODULES="$PASSTHRU_CODEC_MODULES $SPIDERMONKEY_MODULES $APPLICATIONS_MODULES $CODECS_MODULES $DIALPLANS_MODULES $DIRECTORIES_MODULES $ENDPOINTS_MODULES $ASR_TTS_MODULES $EVENT_HANDLERS_MODULES $FORMATS_MODULES $LANGUAGES_MODULES $LOGGERS_MODULES $SAY_MODULES $TIMERS_MODULES $XML_INT_MODULES"
</span><span class="cx">
</span><span class="lines">@@ -580,8 +580,8 @@
</span><span class="cx"> %{prefix}/mod/mod_lcr.so
</span><span class="cx"> %{prefix}/mod/mod_loopback.so
</span><span class="cx"> %{prefix}/mod/mod_siren.so
</span><ins>+%{prefix}/mod/mod_bv.so
</ins><span class="cx"> %{prefix}/mod/mod_stress.so
</span><del>-%{prefix}/mod/mod_yaml.so
</del><span class="cx"> %{prefix}/mod/mod_shout.so
</span><span class="cx"> %{prefix}/mod/mod_fax.so
</span><span class="cx"> %{prefix}/mod/mod_soundtouch.so
</span><span class="lines">@@ -694,6 +694,7 @@
</span><span class="cx"> %config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/*.xml
</span><span class="cx"> %config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/demo/*.xml
</span><span class="cx"> %config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/vm/*.xml
</span><ins>+%config(noreplace) %attr(0640, freeswitch, daemon) %{prefix}/conf/lang/ru/dir/*.xml
</ins><span class="cx">
</span><span class="cx"> %files moh
</span><span class="cx"> %dir %attr(0750, freeswitch, daemon) %{prefix}/sounds/music/8000
</span><span class="lines">@@ -811,6 +812,11 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> %changelog
</span><ins>+* Wed Nov 25 2009 - brian@freeswitch.org
+- added mod_bv.so
+* Wed Nov 25 2009 - michal.bielicki@seventhsignal.de
+- Removed mod_yaml
+- added directory files to russian language
</ins><span class="cx"> * Sat Nov 21 2009 - michal.bielicki@seventhsignal.de
</span><span class="cx"> - added patch by Igor Neves <neves.igor@gmail.com>: Added some checkup in %post and %postun to prevent upgrades from removing freeswitch user
</span><span class="cx"> * Thu Nov 18 2009 - michal.bielicki@seventhsignal.de
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchlibslibsndfileconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/libs/libsndfile/configure.gnu (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/libs/libsndfile/configure.gnu        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/libs/libsndfile/configure.gnu        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><del>-#! /bin/sh
-./configure "$@" --disable-sqlite --disable-shared --with-pic --disable-external-libs --disable-octave
</del><ins>+#!/bin/sh
+srcpath=$(dirname $0 2>/dev/null ) || srcpath="."
+$srcpath/configure "$@" --disable-sqlite --disable-shared --with-pic --disable-octave --disable-external-libs
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcincludeswitch_callerh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/include/switch_caller.h (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/include/switch_caller.h        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/include/switch_caller.h        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -161,7 +161,18 @@
</span><span class="cx">                                                                                                                          _In_ switch_caller_extension_t *caller_extension,
</span><span class="cx">                                                                                                                          _In_z_ const char *application_name, _In_z_ const char *extra_data);
</span><span class="cx">
</span><ins>+/*!
+ \brief Add an application (instruction) to the given extension
+ \param session session associated with the extension (bound by scope)
+ \param caller_extension extension to add the application to
+ \param application_name the name of the application
+ \param fmt optional argument to the application (printf format string)
+*/
+SWITCH_DECLARE(void) switch_caller_extension_add_application_printf(_In_ switch_core_session_t *session,
+                                                                                                                         _In_ switch_caller_extension_t *caller_extension,
+                                                                                                                         _In_z_ const char *application_name, _In_z_ const char *fmt, ...);
</ins><span class="cx">
</span><ins>+
</ins><span class="cx"> /*!
</span><span class="cx"> \brief Get the value of a field in a caller profile based on it's name
</span><span class="cx"> \param caller_profile The caller profile
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcincludeswitch_coreh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/include/switch_core.h (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/include/switch_core.h        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/include/switch_core.h        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -1959,6 +1959,8 @@
</span><span class="cx">         switch_mutex_t *mutex;
</span><span class="cx">         switch_memory_pool_t *pool;
</span><span class="cx">         int32_t flags;
</span><ins>+        char creator[CACHE_DB_LEN];
+        char last_user[CACHE_DB_LEN];
</ins><span class="cx"> } switch_cache_db_handle_t;
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -1995,6 +1997,7 @@
</span><span class="cx"> SWITCH_DECLARE(switch_status_t) switch_cache_db_execute_sql_callback(switch_cache_db_handle_t *dbh, const char *sql,
</span><span class="cx">                                                                                                                                          switch_core_db_callback_func_t callback, void *pdata, char **err);
</span><span class="cx">
</span><ins>+SWITCH_DECLARE(void) switch_cache_db_status(switch_stream_handle_t *stream);
</ins><span class="cx"> SWITCH_DECLARE(switch_status_t) _switch_core_db_handle(switch_cache_db_handle_t **dbh, const char *file, const char *func, int line);
</span><span class="cx"> #define switch_core_db_handle(_a) _switch_core_db_handle(_a, __FILE__, __SWITCH_FUNC__, __LINE__)
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_cidlookupmod_cidlookupc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_cidlookup/mod_cidlookup.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_cidlookup/mod_cidlookup.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_cidlookup/mod_cidlookup.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -48,6 +48,8 @@
</span><span class="cx">
</span><span class="cx"> static struct {
</span><span class="cx">         char *url;
</span><ins>+        int curl_timeout;
+        int curl_warnduration;
</ins><span class="cx">         
</span><span class="cx">         char *whitepages_apikey;
</span><span class="cx">
</span><span class="lines">@@ -55,12 +57,12 @@
</span><span class="cx">         int cache_expire;
</span><span class="cx">         
</span><span class="cx">         char *odbc_dsn;
</span><ins>+        char *odbc_user;
+        char *odbc_pass;
</ins><span class="cx">         char *sql;
</span><span class="cx">         char *citystate_sql;
</span><span class="cx">
</span><del>-        switch_mutex_t *db_mutex;
</del><span class="cx">         switch_memory_pool_t *pool;
</span><del>-        switch_odbc_handle_t *master_odbc;
</del><span class="cx"> } globals;
</span><span class="cx">
</span><span class="cx"> struct http_data {
</span><span class="lines">@@ -84,71 +86,62 @@
</span><span class="cx"> };
</span><span class="cx"> typedef struct callback_obj callback_t;
</span><span class="cx">
</span><del>-
</del><span class="cx"> static switch_event_node_t *reload_xml_event = NULL;
</span><span class="cx">
</span><ins>+static switch_cache_db_handle_t *cidlookup_get_db_handle(void)
+{
+        switch_cache_db_connection_options_t options = { {0} };
+        switch_cache_db_handle_t *dbh = NULL;
+        
+        if (globals.odbc_dsn && globals.odbc_user && globals.odbc_pass) {
+                options.odbc_options.dsn = globals.odbc_dsn;
+                options.odbc_options.user = globals.odbc_user;
+                options.odbc_options.pass = globals.odbc_pass;
+
+                if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_ODBC, &options) != SWITCH_STATUS_SUCCESS) dbh = NULL;
+        }
+        return dbh;
+}
+
+
</ins><span class="cx"> static switch_status_t config_callback_dsn(switch_xml_config_item_t *data, const char *newvalue, switch_config_callback_type_t callback_type, switch_bool_t changed)
</span><span class="cx"> {
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><del>-        char *odbc_user = NULL;
-        char *odbc_pass = NULL;
-        char *odbc_dsn = NULL;
</del><span class="cx">         
</span><del>-        switch_odbc_handle_t *odbc = NULL;
</del><ins>+        switch_cache_db_handle_t *dbh = NULL;
</ins><span class="cx">
</span><span class="cx">         if (!switch_odbc_available()) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC is not compiled in. Do not configure odbc-dsn parameter!\n");
</span><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if (globals.db_mutex) {
-                switch_mutex_lock(globals.db_mutex);
-        }
-        
</del><span class="cx">         if ((callback_type == CONFIG_LOAD || callback_type == CONFIG_RELOAD) && changed) {
</span><span class="cx">
</span><span class="cx">                 if(zstr(newvalue)) {
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "No local database defined.\n");
</span><span class="cx">                 } else {
</span><del>-                        odbc_dsn = strdup(newvalue);
-                        if ((odbc_user = strchr(odbc_dsn, ':'))) {
-                                *odbc_user++ = '\0';
-                                if ((odbc_pass = strchr(odbc_user, ':'))) {
-                                        *odbc_pass++ = '\0';
</del><ins>+                        switch_safe_free(globals.odbc_dsn);
+                        globals.odbc_dsn = strdup(newvalue);
+                        if ((globals.odbc_user = strchr(globals.odbc_dsn, ':'))) {
+                                *globals.odbc_user++ = '\0';
+                                if ((globals.odbc_pass = strchr(globals.odbc_user, ':'))) {
+                                        *globals.odbc_pass++ = '\0';
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Connecting to dsn: %s\n", globals.odbc_dsn);
-                        
-                        /* setup dsn */
-                        
-                        if (!(odbc = switch_odbc_handle_new(odbc_dsn, odbc_user, odbc_pass))) {
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connecting to dsn: %s\n", globals.odbc_dsn);
+
+                        if (!(dbh = cidlookup_get_db_handle())) {
</ins><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open ODBC Database!\n");
</span><span class="cx">                                 switch_goto_status(SWITCH_STATUS_FALSE, done);
</span><span class="cx">                         }
</span><del>-                        if (switch_odbc_handle_connect(odbc) != SWITCH_ODBC_SUCCESS) {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open ODBC Database!\n");
-                                switch_goto_status(SWITCH_STATUS_FALSE, done);
-                        }
</del><span class="cx">                 }
</span><del>-                
-                /* ok, we have a new connection, tear down old one */
-                if (globals.master_odbc) {
-                        switch_odbc_handle_disconnect(globals.master_odbc);
-                        switch_odbc_handle_destroy(&globals.master_odbc);
-                }
-                
-                /* and swap in new connection */
-                globals.master_odbc = odbc;
</del><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         switch_goto_status(SWITCH_STATUS_SUCCESS, done);
</span><span class="cx">         
</span><span class="cx"> done:
</span><del>-        if (globals.db_mutex) {
-                switch_mutex_unlock(globals.db_mutex);
-        }
-        switch_safe_free(odbc_dsn);
</del><ins>+        switch_cache_db_release_db_handle(&dbh);
</ins><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -159,6 +152,8 @@
</span><span class="cx">         SWITCH_CONFIG_ITEM_STRING_STRDUP("whitepages-apikey", CONFIG_RELOAD, &globals.whitepages_apikey, NULL, "api key for whitepages.com", "api key for whitepages.com"),
</span><span class="cx">         SWITCH_CONFIG_ITEM("cache", SWITCH_CONFIG_BOOL, CONFIG_RELOAD, &globals.cache, SWITCH_FALSE, NULL, "true|false", "whether to cache via cidlookup"),
</span><span class="cx">         SWITCH_CONFIG_ITEM("cache-expire", SWITCH_CONFIG_INT, CONFIG_RELOAD, &globals.cache_expire, (void *)300, NULL, "expire", "seconds to preserve num->name cache"),
</span><ins>+        SWITCH_CONFIG_ITEM("curl-timeout", SWITCH_CONFIG_INT, CONFIG_RELOAD, &globals.curl_timeout, (void *)2000, NULL, "timeout for curl", "milliseconds to timeout"),
+        SWITCH_CONFIG_ITEM("curl-warning-duration", SWITCH_CONFIG_INT, CONFIG_RELOAD, &globals.curl_warnduration, (void *)1000, NULL, "warning when curl queries are longer than specified time", "milliseconds"),
</ins><span class="cx">         SWITCH_CONFIG_ITEM_STRING_STRDUP("sql", CONFIG_RELOAD, &globals.sql, NULL, "sql whre number=${caller_id_number}", "SQL to run if overriding CID"),
</span><span class="cx">         SWITCH_CONFIG_ITEM_STRING_STRDUP("citystate-sql", CONFIG_RELOAD, &globals.citystate_sql, NULL, "sql to look up city/state info", "SQL to run if overriding CID"),
</span><span class="cx">         SWITCH_CONFIG_ITEM_CALLBACK("odbc-dsn", SWITCH_CONFIG_STRING, CONFIG_RELOAD, &globals.odbc_dsn, "", config_callback_dsn, &config_opt_dsn,
</span><span class="lines">@@ -180,20 +175,23 @@
</span><span class="cx">         do_config(SWITCH_TRUE);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-static switch_bool_t cidlookup_execute_sql_callback(char *sql, switch_core_db_callback_func_t callback, void *pdata)
</del><ins>+static switch_bool_t cidlookup_execute_sql_callback(char *sql, switch_core_db_callback_func_t callback, callback_t *cbt, char **err)
</ins><span class="cx"> {
</span><span class="cx">         switch_bool_t retval = SWITCH_FALSE;
</span><ins>+        switch_cache_db_handle_t *dbh = NULL;
</ins><span class="cx">         
</span><del>-        switch_mutex_lock(globals.db_mutex);
-        if (globals.odbc_dsn) {
-                if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, callback, pdata, NULL)
</del><ins>+        if (globals.odbc_dsn && (dbh = cidlookup_get_db_handle())) {
+                if (switch_cache_db_execute_sql_callback(dbh, sql, callback, (void *)cbt, err)
</ins><span class="cx">                                 == SWITCH_ODBC_FAIL) {
</span><span class="cx">                         retval = SWITCH_FALSE;
</span><span class="cx">                 } else {
</span><span class="cx">                         retval = SWITCH_TRUE;
</span><span class="cx">                 }
</span><ins>+        } else {
+                *err = switch_core_sprintf(cbt->pool, "Unable to get ODBC handle. dsn: %s, dbh is %s\n", globals.odbc_dsn, dbh ? "not null" : "null");
</ins><span class="cx">         }
</span><del>-        switch_mutex_unlock(globals.db_mutex);
</del><ins>+        
+        switch_cache_db_release_db_handle(&dbh);
</ins><span class="cx">         return retval;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -361,7 +359,8 @@
</span><span class="cx">
</span><span class="cx"> static char *do_lookup_url(switch_memory_pool_t *pool, switch_event_t *event, const char *query) {
</span><span class="cx">         char *name = NULL;
</span><del>-        
</del><ins>+        switch_time_t start_time = switch_micro_time_now();
+        switch_time_t time_diff = 0;
</ins><span class="cx">         CURL *curl_handle = NULL;
</span><span class="cx">         long httpRes = 0;
</span><span class="cx">         char hostname[256] = "";
</span><span class="lines">@@ -385,6 +384,14 @@
</span><span class="cx">         curl_easy_setopt(curl_handle, CURLOPT_POST, SWITCH_FALSE);
</span><span class="cx">         curl_easy_setopt(curl_handle, CURLOPT_FOLLOWLOCATION, 1);
</span><span class="cx">         curl_easy_setopt(curl_handle, CURLOPT_MAXREDIRS, 10);
</span><ins>+        /*
+         TIMEOUT_MS is introduced in 7.16.2, we have 7.16.0 in tree
+         */
+#ifdef CURLOPT_TIMEOUT_MS
+        curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT_MS, globals.curl_timeout);
+#else
+        curl_easy_setopt(curl_handle, CURLOPT_TIMEOUT, globals.curl_timeout/1000);
+#endif
</ins><span class="cx">         curl_easy_setopt(curl_handle, CURLOPT_URL, query);
</span><span class="cx">         curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, file_callback);
</span><span class="cx">         curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, (void *) &http_data);
</span><span class="lines">@@ -405,6 +412,22 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         
</span><ins>+        time_diff = (switch_micro_time_now() - start_time); /* convert to milli from micro */
+        
+        if ((time_diff/1000) >= globals.curl_warnduration) {
+                switch_core_time_duration_t duration;
+                switch_core_measure_time(time_diff, &duration);
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "SLOW LOOKUP ("
+                        "%um, "
+                        "%us, "
+                        "%ums"
+                        "): url: %s\n",
+                        duration.min,
+                        duration.sec,
+                        duration.ms,
+                        query);
+        }
+        
</ins><span class="cx">         switch_safe_free(http_data.stream.data);
</span><span class="cx">         return name;
</span><span class="cx"> }
</span><span class="lines">@@ -492,16 +515,17 @@
</span><span class="cx"> static char *do_db_lookup(switch_memory_pool_t *pool, switch_event_t *event, const char *num, const char *sql) {
</span><span class="cx">         char *name = NULL;
</span><span class="cx">         char *newsql = NULL;
</span><ins>+        char *err = NULL;
</ins><span class="cx">         callback_t cbt = { 0 };
</span><span class="cx">         cbt.pool = pool;
</span><span class="cx">         
</span><del>-        if (globals.master_odbc) {
</del><ins>+        if (globals.odbc_dsn) {
</ins><span class="cx">                 newsql = switch_event_expand_headers(event, sql);
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SQL: %s\n", newsql);
</span><del>-                if (cidlookup_execute_sql_callback(newsql, cidlookup_callback, &cbt)) {
</del><ins>+                if (cidlookup_execute_sql_callback(newsql, cidlookup_callback, &cbt, &err)) {
</ins><span class="cx">                         name = cbt.name;
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to lookup cid\n");
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to lookup cid: %s\n", err ? err : "(null)");
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">         if (newsql != globals.sql) {
</span><span class="lines">@@ -524,7 +548,7 @@
</span><span class="cx">         switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "caller_id_number", number);
</span><span class="cx">
</span><span class="cx">         /* database always wins */
</span><del>-        if (switch_odbc_available() && globals.master_odbc && globals.sql) {
</del><ins>+        if (switch_odbc_available() && globals.odbc_dsn && globals.sql) {
</ins><span class="cx">                 name = do_db_lookup(pool, event, number, globals.sql);
</span><span class="cx">                 if (name) {
</span><span class="cx">                         cid->name = name;
</span><span class="lines">@@ -572,7 +596,7 @@
</span><span class="cx">         if (!cid->area &&
</span><span class="cx">                 !skipcitystate &&
</span><span class="cx">                 strlen(number) == 11 && number[0] == '1' &&
</span><del>-                switch_odbc_available() && globals.master_odbc && globals.citystate_sql) {
</del><ins>+                switch_odbc_available() && globals.odbc_dsn && globals.citystate_sql) {
</ins><span class="cx">                 
</span><span class="cx">                 /* yes, this is really area */
</span><span class="cx">                 name = do_db_lookup(pool, event, number, globals.citystate_sql);
</span><span class="lines">@@ -713,6 +737,9 @@
</span><span class="cx">                                                                         globals.url ? globals.url : "(null)",
</span><span class="cx">                                                                         (globals.cache) ? "true" : "false",
</span><span class="cx">                                                                         globals.cache_expire);
</span><ins>+                        stream->write_function(stream, " curl-timeout: %" SWITCH_TIME_T_FMT "\n curl-warn-duration: %" SWITCH_TIME_T_FMT "\n",
+                                                                        globals.curl_timeout,
+                                                                        globals.curl_warnduration);
</ins><span class="cx">                                                                         
</span><span class="cx">                         stream->write_function(stream, " odbc-dsn: %s\n sql: %s\n citystate-sql: %s\n",
</span><span class="cx">                                                                         globals.odbc_dsn ? globals.odbc_dsn : "(null)",
</span><span class="lines">@@ -771,12 +798,6 @@
</span><span class="cx">         
</span><span class="cx">         globals.pool = pool;
</span><span class="cx">
</span><del>-        if (switch_odbc_available() && !globals.db_mutex) {
-                if (switch_mutex_init(&globals.db_mutex, SWITCH_MUTEX_UNNESTED, globals.pool) != SWITCH_STATUS_SUCCESS) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed to initialize db_mutex\n");
-                }
-        }
-
</del><span class="cx">         do_config(SWITCH_FALSE);
</span><span class="cx">         
</span><span class="cx">         if ((switch_event_bind_removable(modname, SWITCH_EVENT_RELOADXML, NULL, event_handler, NULL, &reload_xml_event) != SWITCH_STATUS_SUCCESS)) {
</span><span class="lines">@@ -797,16 +818,7 @@
</span><span class="cx"> Macro expands to: switch_status_t mod_cidlookup_shutdown() */
</span><span class="cx"> SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_cidlookup_shutdown)
</span><span class="cx"> {
</span><del>-        /* Cleanup dynamically allocated config settings */
</del><span class="cx">
</span><del>-        if (globals.db_mutex) {
-                switch_mutex_destroy(globals.db_mutex);
-        }
-        if (globals.master_odbc) {
-                switch_odbc_handle_disconnect(globals.master_odbc);
-                switch_odbc_handle_destroy(&globals.master_odbc);
-        }
-
</del><span class="cx">         switch_event_unbind(&reload_xml_event);
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_commandsmod_commandsc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_commands/mod_commands.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_commands/mod_commands.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_commands/mod_commands.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -53,7 +53,35 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+SWITCH_STANDARD_API(db_cache_function) {
+        int argc;
+        char *mydata = NULL, *argv[2];
</ins><span class="cx">
</span><ins>+        if (zstr(cmd)) {
+                goto error;
+        }
+        
+        mydata = strdup(cmd);
+        switch_assert(mydata);
+
+        argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
+
+        if (argc < 1) {
+                goto error;
+        }
+        if (argv[0] && switch_stristr("status", argv[0])) {
+                switch_cache_db_status(stream);
+                goto ok;
+        } else {
+                goto error;
+        }
+        
+error:
+                stream->write_function(stream, "%s", "parameter missing\n");
+ok:
+                return SWITCH_STATUS_SUCCESS;
+}
+
</ins><span class="cx"> SWITCH_STANDARD_API(host_lookup_function)
</span><span class="cx"> {
</span><span class="cx">         char host[256] = "";
</span><span class="lines">@@ -3827,6 +3855,8 @@
</span><span class="cx">         SWITCH_ADD_API(commands_api_interface, "nat_map", "nat_map", nat_map_function, "[status|republish|reinit] | [add|del] <port> [tcp|udp] [static]");
</span><span class="cx">         SWITCH_ADD_API(commands_api_interface, "host_lookup", "host_lookup", host_lookup_function, "<hostname>");
</span><span class="cx">         SWITCH_ADD_API(commands_api_interface, "hostname", "Returns the system hostname", hostname_api_function, "");
</span><ins>+        SWITCH_ADD_API(commands_api_interface, "db_cache", "db cache management", db_cache_function, "status");
+        switch_console_set_complete("db_cache status");
</ins><span class="cx">
</span><span class="cx">         /* indicate that the module should continue to be loaded */
</span><span class="cx">         return SWITCH_STATUS_NOUNLOAD;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_lcrmod_lcrc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_lcr/mod_lcr.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_lcr/mod_lcr.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_lcr/mod_lcr.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -148,9 +148,9 @@
</span><span class="cx">         switch_memory_pool_t *pool;
</span><span class="cx">         char *dbname;
</span><span class="cx">         char *odbc_dsn;
</span><ins>+        char *odbc_user;
+        char *odbc_pass;
</ins><span class="cx">         switch_mutex_t *mutex;
</span><del>-        switch_mutex_t *db_mutex;
-        switch_odbc_handle_t *master_odbc;
</del><span class="cx">         switch_hash_t *profile_hash;
</span><span class="cx">         profile_t *default_profile;
</span><span class="cx">         void *filler1;
</span><span class="lines">@@ -389,15 +389,34 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static switch_cache_db_handle_t *lcr_get_db_handle(void)
+{
+        switch_cache_db_connection_options_t options = { {0} };
+        switch_cache_db_handle_t *dbh = NULL;
+        
+        if (globals.odbc_dsn && globals.odbc_user && globals.odbc_pass) {
+                options.odbc_options.dsn = globals.odbc_dsn;
+                options.odbc_options.user = globals.odbc_user;
+                options.odbc_options.pass = globals.odbc_pass;
+
+                if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_ODBC, &options) != SWITCH_STATUS_SUCCESS) dbh = NULL;
+        }
+        return dbh;
+}
+
</ins><span class="cx"> static switch_bool_t db_check(char *sql)
</span><span class="cx"> {
</span><del>-        if (globals.odbc_dsn) {
-                if (switch_odbc_handle_exec(globals.master_odbc, sql, NULL) == SWITCH_ODBC_SUCCESS) {
-                        return SWITCH_TRUE;
</del><ins>+        switch_bool_t ret = SWITCH_FALSE;
+        switch_cache_db_handle_t *dbh = NULL;
+
+        if (globals.odbc_dsn && (dbh = lcr_get_db_handle())) {
+                if (switch_cache_db_execute_sql(dbh, sql, NULL) == SWITCH_ODBC_SUCCESS) {
+                        ret = SWITCH_TRUE;
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
-        return SWITCH_FALSE;
</del><ins>+
+        switch_cache_db_release_db_handle(&dbh);
+        return ret;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /* try each type of random until we suceed */
</span><span class="lines">@@ -523,17 +542,17 @@
</span><span class="cx"> static switch_bool_t lcr_execute_sql_callback(char *sql, switch_core_db_callback_func_t callback, void *pdata)
</span><span class="cx"> {
</span><span class="cx">         switch_bool_t retval = SWITCH_FALSE;
</span><ins>+        switch_cache_db_handle_t *dbh = NULL;
</ins><span class="cx">         
</span><del>-        switch_mutex_lock(globals.db_mutex);
-        if (globals.odbc_dsn) {
-                if (switch_odbc_handle_callback_exec(globals.master_odbc, sql, callback, pdata, NULL)
</del><ins>+        if (globals.odbc_dsn && (dbh = lcr_get_db_handle())) {
+                if (switch_cache_db_execute_sql_callback(dbh, sql, callback, pdata, NULL)
</ins><span class="cx">                                 == SWITCH_ODBC_FAIL) {
</span><span class="cx">                         retval = SWITCH_FALSE;
</span><span class="cx">                 } else {
</span><span class="cx">                         retval = SWITCH_TRUE;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        switch_mutex_unlock(globals.db_mutex);
</del><ins>+        switch_cache_db_release_db_handle(&dbh);
</ins><span class="cx">         return retval;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -847,9 +866,8 @@
</span><span class="cx">         switch_stream_handle_t sql_stream = { 0 };
</span><span class="cx">         switch_xml_t cfg, xml, settings, param, x_profile, x_profiles;
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><del>-        char *odbc_user = NULL;
-        char *odbc_pass = NULL;
</del><span class="cx">         profile_t *profile = NULL;
</span><ins>+        switch_cache_db_handle_t *dbh = NULL;
</ins><span class="cx">
</span><span class="cx">         if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
</span><span class="lines">@@ -864,11 +882,12 @@
</span><span class="cx">                         val = (char *) switch_xml_attr_soft(param, "value");
</span><span class="cx">                         if (!strcasecmp(var, "odbc-dsn") && !zstr(val)) {
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "odbc_dsn is %s\n", val);
</span><del>-                                globals.odbc_dsn = switch_core_strdup(globals.pool, val);
-                                if ((odbc_user = strchr(globals.odbc_dsn, ':'))) {
-                                        *odbc_user++ = '\0';
-                                        if ((odbc_pass = strchr(odbc_user, ':'))) {
-                                                *odbc_pass++ = '\0';
</del><ins>+                                switch_safe_free(globals.odbc_dsn);
+                                globals.odbc_dsn = strdup(val);
+                                if ((globals.odbc_user = strchr(globals.odbc_dsn, ':'))) {
+                                        *globals.odbc_user++ = '\0';
+                                        if ((globals.odbc_pass = strchr(globals.odbc_user, ':'))) {
+                                                *globals.odbc_pass++ = '\0';
</ins><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="lines">@@ -877,20 +896,14 @@
</span><span class="cx">         
</span><span class="cx">         /* initialize sql here, 'cause we need to verify custom_sql for each profile below */
</span><span class="cx">         if (globals.odbc_dsn) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO
-                                                 , "dsn is \"%s\", user is \"%s\", and password is \"%s\"\n"
-                                                 , globals.odbc_dsn, odbc_user, odbc_pass
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG
+                                                 , "dsn is \"%s\", user is \"%s\"\n"
+                                                 , globals.odbc_dsn, globals.odbc_user
</ins><span class="cx">                                                  );
</span><del>-                if (!(globals.master_odbc = switch_odbc_handle_new(globals.odbc_dsn, odbc_user, odbc_pass))) {
</del><ins>+                if (!(dbh = lcr_get_db_handle())) {
</ins><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open ODBC Database!\n");
</span><del>-                        status = SWITCH_STATUS_FALSE;
-                        goto done;
</del><ins>+                        switch_goto_status(SWITCH_STATUS_FALSE, done);
</ins><span class="cx">                 }
</span><del>-                if (switch_odbc_handle_connect(globals.master_odbc) != SWITCH_ODBC_SUCCESS) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open ODBC Database!\n");
-                        status = SWITCH_STATUS_FALSE;
-                        goto done;
-                }
</del><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         if (set_db_random() == SWITCH_TRUE) {
</span><span class="lines">@@ -1089,7 +1102,8 @@
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Setting system defined default profile.");
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        done:
</del><ins>+done:
+        switch_cache_db_release_db_handle(&dbh);
</ins><span class="cx">         switch_xml_free(xml);
</span><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="lines">@@ -1549,10 +1563,6 @@
</span><span class="cx">         if (switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed to initialize mutex\n");
</span><span class="cx">         }
</span><del>-        if (switch_mutex_init(&globals.db_mutex, SWITCH_MUTEX_UNNESTED, globals.pool) != SWITCH_STATUS_SUCCESS) {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "failed to initialize db_mutex\n");
-        }
-
</del><span class="cx">         if (lcr_load_config() != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to load lcr config file\n");
</span><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="lines">@@ -1571,8 +1581,6 @@
</span><span class="cx"> SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_lcr_shutdown)
</span><span class="cx"> {
</span><span class="cx">
</span><del>-        switch_odbc_handle_disconnect(globals.master_odbc);
-        switch_odbc_handle_destroy(&globals.master_odbc);
</del><span class="cx">         switch_core_hash_destroy(&globals.profile_hash);
</span><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_limitmod_limitc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_limit/mod_limit.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_limit/mod_limit.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_limit/mod_limit.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -47,12 +47,13 @@
</span><span class="cx">         char hostname[256];
</span><span class="cx">         char *dbname;
</span><span class="cx">         char *odbc_dsn;
</span><ins>+        char *odbc_user;
+        char *odbc_pass;
</ins><span class="cx">         switch_mutex_t *mutex;
</span><span class="cx">         switch_mutex_t *limit_hash_mutex;
</span><span class="cx">         switch_hash_t *limit_hash;        
</span><span class="cx">         switch_mutex_t *db_hash_mutex;
</span><span class="cx">         switch_hash_t *db_hash;        
</span><del>-        switch_odbc_handle_t *master_odbc;
</del><span class="cx"> } globals;
</span><span class="cx">
</span><span class="cx"> typedef struct {
</span><span class="lines">@@ -88,38 +89,47 @@
</span><span class="cx">         " url VARCHAR(255)\n"
</span><span class="cx">         ");\n";
</span><span class="cx">
</span><ins>+
+switch_cache_db_handle_t *limit_get_db_handle(void)
+{
+        switch_cache_db_connection_options_t options = { {0} };
+        switch_cache_db_handle_t *dbh = NULL;
+        
+        if (globals.odbc_dsn && globals.odbc_user && globals.odbc_pass) {
+                options.odbc_options.dsn = globals.odbc_dsn;
+                options.odbc_options.user = globals.odbc_user;
+                options.odbc_options.pass = globals.odbc_pass;
+
+                if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_ODBC, &options) != SWITCH_STATUS_SUCCESS) dbh = NULL;
+                return dbh;
+        } else {
+                options.core_db_options.db_path = globals.dbname;
+                if (switch_cache_db_get_db_handle(&dbh, SCDB_TYPE_CORE_DB, &options) != SWITCH_STATUS_SUCCESS) dbh = NULL;
+                return dbh;
+        }
+}
+
+
</ins><span class="cx"> static switch_status_t limit_execute_sql(char *sql, switch_mutex_t *mutex)
</span><span class="cx"> {
</span><del>-        switch_core_db_t *db;
-        switch_status_t status = SWITCH_STATUS_SUCCESS;
</del><ins>+        switch_cache_db_handle_t *dbh = NULL;
+        switch_status_t status = SWITCH_STATUS_FALSE;
</ins><span class="cx">
</span><span class="cx">         if (mutex) {
</span><span class="cx">                 switch_mutex_lock(mutex);
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if (switch_odbc_available() && globals.odbc_dsn) {
-                switch_odbc_statement_handle_t stmt;
-                if (switch_odbc_handle_exec(globals.master_odbc, sql, &stmt) != SWITCH_ODBC_SUCCESS) {
-                        char *err_str;
-                        err_str = switch_odbc_handle_get_error(globals.master_odbc, stmt);
-                        if (!zstr(err_str)) {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERR: [%s]\n[%s]\n", sql, switch_str_nil(err_str));
-                        }
-                        switch_safe_free(err_str);
-                        status = SWITCH_STATUS_FALSE;
-                }
-                switch_odbc_statement_handle_free(&stmt);
-        } else {
-                if (!(db = switch_core_db_open_file(globals.dbname))) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", globals.dbname);
-                        status = SWITCH_STATUS_FALSE;
-                        goto end;
-                }
-                status = switch_core_db_persistant_execute(db, sql, 1);
-                switch_core_db_close(db);
</del><ins>+        if (!(dbh = limit_get_db_handle())) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB\n");
+                goto end;
</ins><span class="cx">         }
</span><span class="cx">
</span><ins>+        status = switch_cache_db_execute_sql(dbh, sql, NULL);
+
</ins><span class="cx"> end:
</span><ins>+        
+        switch_cache_db_release_db_handle(&dbh);
+
</ins><span class="cx">         if (mutex) {
</span><span class="cx">                 switch_mutex_unlock(mutex);
</span><span class="cx">         }
</span><span class="lines">@@ -130,34 +140,29 @@
</span><span class="cx"> static switch_bool_t limit_execute_sql_callback(switch_mutex_t *mutex, char *sql, switch_core_db_callback_func_t callback, void *pdata)
</span><span class="cx"> {
</span><span class="cx">         switch_bool_t ret = SWITCH_FALSE;
</span><del>-        switch_core_db_t *db;
</del><span class="cx">         char *errmsg = NULL;
</span><del>-
</del><ins>+        switch_cache_db_handle_t *dbh = NULL;
+        
</ins><span class="cx">         if (mutex) {
</span><span class="cx">                 switch_mutex_lock(mutex);
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if (switch_odbc_available() && globals.odbc_dsn) {
-                switch_odbc_handle_callback_exec(globals.master_odbc, sql, callback, pdata, NULL);
-        } else {
-                if (!(db = switch_core_db_open_file(globals.dbname))) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB %s\n", globals.dbname);
-                        goto end;
-                }
</del><ins>+        if (!(dbh = limit_get_db_handle())) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Opening DB\n");
+ goto end;
+ }
+        
+        switch_cache_db_execute_sql_callback(dbh, sql, callback, pdata, &errmsg);
</ins><span class="cx">
</span><del>-                switch_core_db_exec(db, sql, callback, pdata, &errmsg);
-
-                if (errmsg) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL ERR: [%s] %s\n", sql, errmsg);
-                        free(errmsg);
-                }
-
-                if (db) {
-                        switch_core_db_close(db);
-                }
</del><ins>+        if (errmsg) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "SQL ERR: [%s] %s\n", sql, errmsg);
+                free(errmsg);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> end:
</span><ins>+
+        switch_cache_db_release_db_handle(&dbh);
+
</ins><span class="cx">         if (mutex) {
</span><span class="cx">                 switch_mutex_unlock(mutex);
</span><span class="cx">         }
</span><span class="lines">@@ -165,6 +170,7 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> static switch_xml_config_string_options_t limit_config_dsn = { NULL, 0, "[^:]+:[^:]+:.+" };
</span><span class="cx">
</span><span class="cx"> static switch_xml_config_item_t config_settings[] = {
</span><span class="lines">@@ -175,10 +181,8 @@
</span><span class="cx">
</span><span class="cx"> static switch_status_t do_config()
</span><span class="cx"> {
</span><del>-        switch_core_db_t *db;
</del><ins>+        switch_cache_db_handle_t *dbh;
</ins><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><del>-        char *odbc_user = NULL;
-        char *odbc_pass = NULL;
</del><span class="cx">         char *sql = NULL;
</span><span class="cx">         
</span><span class="cx">         limit_config_dsn.pool = globals.pool;
</span><span class="lines">@@ -187,24 +191,28 @@
</span><span class="cx">                 return SWITCH_STATUS_TERM;
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        if (switch_odbc_available() && globals.odbc_dsn) {
-                if ((odbc_user = strchr(globals.odbc_dsn, ':'))) {
-                        *odbc_user++ = '\0';
-                        if ((odbc_pass = strchr(odbc_user, ':'))) {
-                                *odbc_pass++ = '\0';
</del><ins>+        if (globals.odbc_dsn) {
+                if ((globals.odbc_user = strchr(globals.odbc_dsn, ':'))) {
+                        *globals.odbc_user++ = '\0';
+                        if ((globals.odbc_pass = strchr(globals.odbc_user, ':'))) {
+                                *globals.odbc_pass++ = '\0';
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-        } else if (globals.odbc_dsn) {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
</del><ins>+
+                if (!(dbh = limit_get_db_handle())) {
+                        globals.odbc_dsn = globals.odbc_user = globals.odbc_pass;
+                }
</ins><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">
</span><del>-        if (zstr(globals.odbc_dsn) || zstr(odbc_user) || zstr(odbc_pass)) {
</del><ins>+        if (zstr(globals.odbc_dsn) || zstr(globals.odbc_user) || zstr(globals.odbc_pass)) {
</ins><span class="cx">                 globals.dbname = "call_limit";
</span><ins>+                dbh = limit_get_db_handle();
</ins><span class="cx">         }
</span><span class="cx">
</span><del>-        if (switch_odbc_available() && globals.odbc_dsn) {
-                int x;
</del><ins>+
+        if (dbh) {
+                int x = 0;
</ins><span class="cx">                 char *indexes[] = {
</span><span class="cx">                         "create index ld_hostname on limit_data (hostname)",
</span><span class="cx">                         "create index ld_uuid on limit_data (uuid)",
</span><span class="lines">@@ -216,71 +224,24 @@
</span><span class="cx">                         "create index gd_url on group_data (url)",
</span><span class="cx">                         NULL
</span><span class="cx">                 };
</span><ins>+
</ins><span class="cx">                 
</span><span class="cx">
</span><del>-
-                if (!(globals.master_odbc = switch_odbc_handle_new(globals.odbc_dsn, odbc_user, odbc_pass))) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open ODBC Database!\n");
-                        status = SWITCH_STATUS_FALSE;
-                        goto done;
-                }
-                if (switch_odbc_handle_connect(globals.master_odbc) != SWITCH_ODBC_SUCCESS) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open ODBC Database!\n");
-                        status = SWITCH_STATUS_FALSE;
-                        goto done;
-                }
-
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Connected ODBC DSN: %s\n", globals.odbc_dsn);
-                if (switch_odbc_handle_exec(globals.master_odbc, "select count(*) from limit_data", NULL) != SWITCH_STATUS_SUCCESS) {
-                        if (switch_odbc_handle_exec(globals.master_odbc, limit_sql, NULL) != SWITCH_STATUS_SUCCESS) {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Create SQL Database!\n");
-                        }
-                }
-                if (switch_odbc_handle_exec(globals.master_odbc, "select count(*) from db_data", NULL) != SWITCH_STATUS_SUCCESS) {
-                        if (switch_odbc_handle_exec(globals.master_odbc, db_sql, NULL) != SWITCH_STATUS_SUCCESS) {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Create SQL Database!\n");
-                        }
-                }
-                if (switch_odbc_handle_exec(globals.master_odbc, "select count(*) from group_data", NULL) != SWITCH_STATUS_SUCCESS) {
-                        if (switch_odbc_handle_exec(globals.master_odbc, group_sql, NULL) != SWITCH_STATUS_SUCCESS) {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Create SQL Database!\n");
-                        }
-                }
-
</del><ins>+                switch_cache_db_test_reactive(dbh, "select * from limit_data", NULL, limit_sql);
+                switch_cache_db_test_reactive(dbh, "select * from db_data", NULL, db_sql);
+                switch_cache_db_test_reactive(dbh, "select * from group_data", NULL, group_sql);
+                
</ins><span class="cx">                 for (x = 0; indexes[x]; x++) {
</span><del>-                        switch_odbc_handle_exec(globals.master_odbc, indexes[x], NULL);
</del><ins>+                        switch_cache_db_execute_sql(dbh, indexes[x], NULL);
</ins><span class="cx">                 }
</span><del>-        } else {
-                if ((db = switch_core_db_open_file(globals.dbname))) {
-                        switch_core_db_test_reactive(db, "select * from limit_data", NULL, limit_sql);
-                        switch_core_db_test_reactive(db, "select * from db_data", NULL, db_sql);
-                        switch_core_db_test_reactive(db, "select * from group_data", NULL, group_sql);
-                        
-                        switch_core_db_exec(db, "create index if not exists ld_hostname on limit_data (hostname)", NULL, NULL, NULL);
-                        switch_core_db_exec(db, "create index if not exists ld_uuid on limit_data (uuid)", NULL, NULL, NULL);
-                        switch_core_db_exec(db, "create index if not exists ld_realm on limit_data (realm)", NULL, NULL, NULL);
-                        switch_core_db_exec(db, "create index if not exists ld_id on limit_data (id)", NULL, NULL, NULL);
</del><ins>+        
+                switch_cache_db_release_db_handle(&dbh);
</ins><span class="cx">
</span><del>-                        switch_core_db_exec(db, "create index if not exists dd_realm on db_data (realm)", NULL, NULL, NULL);
-                        switch_core_db_exec(db, "create index if not exists dd_data_key on db_data (data_key)", NULL, NULL, NULL);
-
-                        switch_core_db_exec(db, "create index if not exists gd_groupname on group_data (groupname)", NULL, NULL, NULL);
-                        switch_core_db_exec(db, "create index if not exists gd_url on group_data (url)", NULL, NULL, NULL);
-
-                } else {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open SQL Database!\n");
-                        status = SWITCH_STATUS_FALSE;
-                        goto done;
-                }
-                switch_core_db_close(db);
</del><ins>+                sql = switch_mprintf("delete from limit_data where hostname='%q';", globals.hostname);
+                limit_execute_sql(sql, globals.mutex);
+                switch_safe_free(sql);
</ins><span class="cx">         }
</span><span class="cx">
</span><del>- done:
-
-        sql = switch_mprintf("delete from limit_data where hostname='%q';", globals.hostname);
-        limit_execute_sql(sql, globals.mutex);
-        switch_safe_free(sql);
-
</del><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1719,10 +1680,6 @@
</span><span class="cx"> SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_limit_shutdown)
</span><span class="cx"> {
</span><span class="cx">         
</span><del>-        if (globals.master_odbc) {
-                switch_odbc_handle_destroy(&globals.master_odbc);
-        }
-        
</del><span class="cx">         switch_event_free_subclass(LIMIT_EVENT_USAGE);
</span><span class="cx">         
</span><span class="cx">         switch_xml_config_cleanup(config_settings);
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcmodapplicationsmod_voicemailmod_voicemailc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_voicemail/mod_voicemail.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_voicemail/mod_voicemail.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/applications/mod_voicemail/mod_voicemail.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -142,7 +142,6 @@
</span><span class="cx">         uint32_t record_threshold;
</span><span class="cx">         uint32_t record_silence_hits;
</span><span class="cx">         uint32_t record_sample_rate;
</span><del>-        switch_odbc_handle_t *master_odbc;
</del><span class="cx">         switch_bool_t auto_playback_recordings;
</span><span class="cx">         switch_thread_rwlock_t *rwlock;
</span><span class="cx">         switch_memory_pool_t *pool;
</span><span class="lines">@@ -268,10 +267,6 @@
</span><span class="cx"> static void free_profile(vm_profile_t *profile)
</span><span class="cx"> {
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroying Profile %s\n", profile->name);
</span><del>-        if (switch_odbc_available() && profile->odbc_dsn && profile->master_odbc) {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Closing ODBC Database! %s\n", profile->name);
-                switch_odbc_handle_destroy(&profile->master_odbc);
-        }
</del><span class="cx">         switch_core_destroy_memory_pool(&profile->pool);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -607,6 +602,7 @@
</span><span class="cx">         vm_profile_t *profile = NULL;
</span><span class="cx">         switch_xml_t x_profiles, x_profile, cfg, xml, x_email, param;
</span><span class="cx">         switch_event_t *event = NULL;
</span><ins>+        switch_cache_db_handle_t *dbh;
</ins><span class="cx">
</span><span class="cx">         if (!(xml = switch_xml_open_cfg(global_cf, &cfg, NULL))) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", global_cf);
</span><span class="lines">@@ -618,7 +614,6 @@
</span><span class="cx">
</span><span class="cx">         if ((x_profile = switch_xml_find_child(x_profiles, "profile", "name", profile_name))) {
</span><span class="cx">                 switch_memory_pool_t *pool;
</span><del>-                switch_core_db_t *db = NULL;
</del><span class="cx">                 int x, count;
</span><span class="cx">
</span><span class="cx">                 if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -776,6 +771,7 @@
</span><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> end:
</span><ins>+        switch_cache_db_release_db_handle(&dbh);
</ins><span class="cx">         if (xml) {
</span><span class="cx">                 switch_xml_free(xml);
</span><span class="cx">         }
</span><span class="lines">@@ -1321,11 +1317,10 @@
</span><span class="cx">         vm_execute_sql_callback(profile, profile->mutex, sql, sql2str_callback, &cbt);
</span><span class="cx">         *total_saved_messages = atoi(msg_count);
</span><span class="cx">
</span><del>-        switch_snprintf(sql, sizeof(sql),
-                                        "select count(*) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' and read_epoch!=0 and read_flags='%s'",
-                                        myid, domain_name, myfolder, URGENT_FLAG_STRING);
-        vm_execute_sql_callback(profile, profile->mutex, sql, sql2str_callback, &cbt);
-        *total_saved_urgent_messages = atoi(msg_count);
</del><ins>+        *total_new_messages = cbt.total_new_messages + cbt.total_new_urgent_messages;
+        *total_new_urgent_messages = cbt.total_new_urgent_messages;
+        *total_saved_messages = cbt.total_saved_messages + cbt.total_saved_urgent_messages;
+        *total_saved_urgent_messages = cbt.total_saved_urgent_messages;
</ins><span class="cx">
</span><span class="cx">         if (myid != id_in) {
</span><span class="cx">                 free(myid);
</span><span class="lines">@@ -4157,10 +4152,6 @@
</span><span class="cx">                 
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Destroying Profile %s\n", profile->name);
</span><span class="cx">
</span><del>-                if (switch_odbc_available() && profile->odbc_dsn && profile->master_odbc) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Closing ODBC Database! %s\n", profile->name);
-                        switch_odbc_handle_destroy(&profile->master_odbc);
-                }
</del><span class="cx">                 switch_core_destroy_memory_pool(&profile->pool);
</span><span class="cx">                 profile = NULL;
</span><span class="cx">         }
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcmodendpointsmod_sofiasofia_gluec"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/endpoints/mod_sofia/sofia_glue.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -409,6 +409,23 @@
</span><span class="cx">         sofia_glue_tech_set_local_sdp(tech_pvt, buf, SWITCH_TRUE);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+const char *sofia_glue_get_codec_string(private_object_t *tech_pvt)
+{
+        const char *codec_string = NULL, *preferred = NULL, *fallback = NULL;
+        
+        if (switch_channel_direction(tech_pvt->channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
+                preferred = tech_pvt->profile->outbound_codec_string;
+                fallback = tech_pvt->profile->inbound_codec_string;
+        } else {
+                preferred = tech_pvt->profile->inbound_codec_string;
+                fallback = tech_pvt->profile->outbound_codec_string;
+        }
+
+        codec_string = !zstr(preferred) ? preferred : fallback;
+        
+        return codec_string;
+}
+
</ins><span class="cx"> void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt)
</span><span class="cx"> {
</span><span class="cx">         const char *abs, *codec_string = NULL;
</span><span class="lines">@@ -1149,7 +1166,8 @@
</span><span class="cx">
</span><span class="cx">         len = strlen(tech_pvt->local_sdp_str) * 2;
</span><span class="cx">         
</span><del>-        if (switch_stristr("sendonly", tech_pvt->local_sdp_str) || switch_stristr("0.0.0.0", tech_pvt->local_sdp_str)) {
</del><ins>+        if (switch_channel_test_flag(tech_pvt->channel, CF_ANSWERED) &&
+                (switch_stristr("sendonly", tech_pvt->local_sdp_str) || switch_stristr("0.0.0.0", tech_pvt->local_sdp_str))) {
</ins><span class="cx">          switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Skip patch on hold SDP\n");
</span><span class="cx">          return;
</span><span class="cx">         }
</span><span class="lines">@@ -2343,6 +2361,10 @@
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Audio params changed for %s from %s:%d to %s:%d\n",
</span><span class="cx">                                                          switch_channel_get_name(tech_pvt->channel),
</span><span class="cx">                                                          remote_host, remote_port, tech_pvt->remote_sdp_audio_ip, tech_pvt->remote_sdp_audio_port);
</span><ins>+
+                        switch_snprintf(tmp, sizeof(tmp), "%d", tech_pvt->remote_sdp_audio_port);
+                        switch_channel_set_variable(tech_pvt->channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE, tech_pvt->remote_sdp_audio_ip);
+                        switch_channel_set_variable(tech_pvt->channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, tmp);
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -2539,6 +2561,11 @@
</span><span class="cx">                         switch_channel_set_variable(tech_pvt->channel, SOFIA_SECURE_MEDIA_CONFIRMED_VARIABLE, "true");
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+
+                switch_snprintf(tmp, sizeof(tmp), "%d", tech_pvt->remote_sdp_audio_port);
+                switch_channel_set_variable(tech_pvt->channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE, tech_pvt->remote_sdp_audio_ip);
+                switch_channel_set_variable(tech_pvt->channel, SWITCH_REMOTE_MEDIA_PORT_VARIABLE, tmp);
+
</ins><span class="cx">          video:
</span><span class="cx">
</span><span class="cx">                 sofia_glue_check_video_codecs(tech_pvt);
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcmodevent_handlersmod_event_socketmod_event_socketc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/event_handlers/mod_event_socket/mod_event_socket.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/mod/event_handlers/mod_event_socket/mod_event_socket.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -2297,6 +2297,7 @@
</span><span class="cx">         switch_socket_t *inbound_socket = NULL;
</span><span class="cx">         listener_t *listener;
</span><span class="cx">         uint32_t x = 0;
</span><ins>+        uint32_t errs = 0;
</ins><span class="cx">
</span><span class="cx">         if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "OH OH no pool\n");
</span><span class="lines">@@ -2342,15 +2343,23 @@
</span><span class="cx">                         goto fail;
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+                
</ins><span class="cx">                 if ((rv = switch_socket_accept(&inbound_socket, listen_list.sock, listener_pool))) {
</span><span class="cx">                         if (prefs.done) {
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Shutting Down\n");
</span><ins>+                                goto end;
</ins><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error\n");
</del><ins>+                                /* I wish we could use strerror_r here but its not defined everywhere =/ */
+                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Socket Error [%s]\n", strerror(errno));
+                                if (++errs > 100) {
+                                        goto end;
+                                }
</ins><span class="cx">                         }
</span><del>-                        break;
</del><ins>+                } else {
+                        errs = 0;
</ins><span class="cx">                 }
</span><span class="cx">
</span><ins>+                
</ins><span class="cx">                 if (!(listener = switch_core_alloc(listener_pool, sizeof(*listener)))) {
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error\n");
</span><span class="cx">                         break;
</span><span class="lines">@@ -2376,6 +2385,8 @@
</span><span class="cx">
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+ end:
+
</ins><span class="cx">         close_socket(&listen_list.sock);
</span><span class="cx">         
</span><span class="cx">         if (prefs.nat_map && switch_core_get_variable("nat_type")) {
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcswitch_callerc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_caller.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_caller.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_caller.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -394,6 +394,25 @@
</span><span class="cx">         return caller_extension;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+
+SWITCH_DECLARE(void) switch_caller_extension_add_application_printf(switch_core_session_t *session,
+                                                                                                                         switch_caller_extension_t *caller_extension, const char *application_name,
+                                                                                                                         const char *fmt, ...)
+{
+        va_list ap;
+        char *data = NULL;
+        
+        va_start(ap, fmt);
+        switch_vasprintf(&data, fmt, ap);
+        va_end(ap);
+        
+        if (data) {
+                switch_caller_extension_add_application(session, caller_extension, application_name, data);        
+                free(data);
+        }
+}
+
+
</ins><span class="cx"> SWITCH_DECLARE(void) switch_caller_extension_add_application(switch_core_session_t *session,
</span><span class="cx">                                                                                                                          switch_caller_extension_t *caller_extension, const char *application_name,
</span><span class="cx">                                                                                                                          const char *application_data)
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcswitch_core_memoryc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_core_memory.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_core_memory.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_core_memory.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -569,12 +569,8 @@
</span><span class="cx">
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Stopping memory pool queue.\n");
</span><span class="cx">
</span><del>-        memory_manager.pool_thread_running = -1;
</del><ins>+        memory_manager.pool_thread_running = 0;
</ins><span class="cx">         switch_thread_join(&st, pool_thread_p);
</span><del>-        
-        while (memory_manager.pool_thread_running) {
-                switch_cond_next();
-        }
</del><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchsrcswitch_core_sqldbc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_core_sqldb.c (15700 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_core_sqldb.c        2009-11-28 16:36:56 UTC (rev 15700)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/src/switch_core_sqldb.c        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -188,18 +188,25 @@
</span><span class="cx"> {
</span><span class="cx">         switch_thread_id_t self = switch_thread_self();
</span><span class="cx">         char thread_str[CACHE_DB_LEN] = "";
</span><ins>+        char db_callsite_str[CACHE_DB_LEN] = "";
</ins><span class="cx">         switch_cache_db_handle_t *new_dbh = NULL;
</span><span class="cx">         const char *db_name = NULL;
</span><ins>+        const char *db_user = NULL;
+        const char *db_pass = NULL;
</ins><span class="cx">
</span><span class="cx">         switch (type) {
</span><span class="cx">         case SCDB_TYPE_ODBC:
</span><span class="cx">                 {
</span><span class="cx">                         db_name = connection_options->odbc_options.dsn;
</span><ins>+                        db_user = connection_options->odbc_options.user;
+                        db_pass = connection_options->odbc_options.pass;
</ins><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">         case SCDB_TYPE_CORE_DB:
</span><span class="cx">                 {
</span><span class="cx">                         db_name = connection_options->core_db_options.db_path;
</span><ins>+                        db_user = "";
+                        db_pass = "";
</ins><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -208,12 +215,14 @@
</span><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="cx">
</span><del>-
-        snprintf(thread_str, sizeof(thread_str) - 1, "%s_%lu", db_name, (unsigned long)(intptr_t)self);
</del><ins>+        snprintf(db_str, sizeof(db_str) - 1, "db=\"%s\";user=\"%s\";pass=\"%s\"", db_name, db_user, db_pass);
+        snprintf(thread_str, sizeof(thread_str) - 1, "%s;thread=\"%lu\"", db_str, (unsigned long)(intptr_t)self);
+        snprintf(db_callsite_str, sizeof(db_callsite_str) - 1, "%s:%d", file, line);
</ins><span class="cx">         
</span><span class="cx">         switch_mutex_lock(dbh_mutex);
</span><span class="cx">         if ((new_dbh = switch_core_hash_find(dbh_hash, thread_str))) {
</span><del>-                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG1,
</del><ins>+                switch_set_string(new_dbh->last_user, db_callsite_str);
+                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG10,
</ins><span class="cx">                                                  "Reuse Cached DB handle %s [%s]\n", thread_str, switch_cache_db_type_name(new_dbh->type));
</span><span class="cx">         } else {
</span><span class="cx">                 switch_hash_index_t *hi;
</span><span class="lines">@@ -229,7 +238,9 @@
</span><span class="cx">                                 if (!switch_test_flag(new_dbh, CDF_INUSE) && switch_mutex_trylock(new_dbh->mutex) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                         switch_set_flag(new_dbh, CDF_INUSE);
</span><span class="cx">                                         switch_set_string(new_dbh->name, thread_str);
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG1,
</del><ins>+                                        new_dbh->hash = switch_ci_hashfunc_default(db_str, &hlen);
+                                        switch_set_string(new_dbh->last_user, db_callsite_str);
+                                        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG10,
</ins><span class="cx">                                                                          "Reuse Unused Cached DB handle %s [%s]\n", thread_str, switch_cache_db_type_name(new_dbh->type));
</span><span class="cx">                                         break;
</span><span class="cx">                                 }
</span><span class="lines">@@ -287,9 +298,10 @@
</span><span class="cx">                 new_dbh->type = type;
</span><span class="cx">                 switch_set_string(new_dbh->name, thread_str);
</span><span class="cx">                 switch_set_flag(new_dbh, CDF_INUSE);
</span><del>-                
</del><ins>+
</ins><span class="cx">                 if (db) new_dbh->native_handle.core_db_dbh = db; else new_dbh->native_handle.odbc_dbh = odbc_dbh;
</span><span class="cx">                 switch_mutex_init(&new_dbh->mutex, SWITCH_MUTEX_UNNESTED, new_dbh->pool);
</span><ins>+                switch_set_string(new_dbh->creator, db_callsite_str);
</ins><span class="cx">                 switch_mutex_lock(new_dbh->mutex);
</span><span class="cx">
</span><span class="cx">                 switch_core_hash_insert(dbh_hash, new_dbh->name, new_dbh);
</span><span class="lines">@@ -354,7 +366,7 @@
</span><span class="cx">         char *p, *s, *e;
</span><span class="cx">         int chunk_count;
</span><span class="cx">         switch_size_t len;
</span><del>-        
</del><ins>+
</ins><span class="cx">         switch_assert(chunk_size);
</span><span class="cx">
</span><span class="cx">         if (err) *err = NULL;
</span><span class="lines">@@ -379,23 +391,25 @@
</span><span class="cx">                         p = e;
</span><span class="cx">                 }
</span><span class="cx">                 
</span><del>-                while (p > s && *p != ';') {
</del><ins>+                while (p > s) {
+                        if (*p == '\n' && *(p-1) == ';') {
+                                *p = '\0';
+                                *(p-1) = '\0';
+                                break;
+                        }
+                        
</ins><span class="cx">                         p--;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if (p) {
-                        *p = '\0';
-                        while(p < e && (*p == '\n' || *p == ' ')) {
-                                p++;
-                        }
-                }
</del><ins>+                if (p <= s) break;
</ins><span class="cx">                 
</span><ins>+                
</ins><span class="cx">                 status = switch_cache_db_execute_sql_real(dbh, s, err);
</span><span class="cx">                 if (status != SWITCH_STATUS_SUCCESS || (err && *err)) {
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                s = p + 1;
</del><ins>+                s = p;
</ins><span class="cx">         
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -410,14 +424,9 @@
</span><span class="cx">
</span><span class="cx">
</span><span class="cx">         switch (dbh->type) {
</span><del>-        case SCDB_TYPE_CORE_DB:
-                {
-                        status = switch_cache_db_execute_sql_real(dbh, sql, err);
-                }
-                break;
</del><span class="cx">         default:
</span><span class="cx">                 {
</span><del>-                        status = switch_cache_db_execute_sql_chunked(dbh, (char *)sql, 32000, err);
</del><ins>+                        status = switch_cache_db_execute_sql_chunked(dbh, (char *)sql, 32768, err);
</ins><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -629,7 +638,9 @@
</span><span class="cx">         case SCDB_TYPE_ODBC:
</span><span class="cx">                 {
</span><span class="cx">                         if (switch_odbc_handle_exec(dbh->native_handle.odbc_dbh, test_sql, NULL) != SWITCH_ODBC_SUCCESS) {
</span><del>-                                switch_odbc_handle_exec(dbh->native_handle.odbc_dbh, drop_sql, NULL);
</del><ins>+                                if (drop_sql) {
+                                        switch_odbc_handle_exec(dbh->native_handle.odbc_dbh, drop_sql, NULL);
+                                }
</ins><span class="cx">                                 switch_odbc_handle_exec(dbh->native_handle.odbc_dbh, reactive_sql, NULL);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -1288,6 +1299,61 @@
</span><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+SWITCH_DECLARE(void) switch_cache_db_status(switch_stream_handle_t *stream)
+{
+        /* return some status info suitable for the cli */
+        switch_hash_index_t *hi;
+        switch_cache_db_handle_t *dbh = NULL;
+        void *val;
+        const void *var;
+        char *key;
+        switch_bool_t locked = SWITCH_FALSE;
+        time_t now = switch_epoch_time_now(NULL);
+        char cleankey_str[CACHE_DB_LEN];
+        char *pos1 = NULL;
+        char *pos2 = NULL;
+        
+        switch_mutex_lock(dbh_mutex);
+        
+        for (hi = switch_hash_first(NULL, dbh_hash); hi; hi = switch_hash_next(hi)) {
+                switch_hash_this(hi, &var, NULL, &val);
+                key = (char *) var;
+
+                if ((dbh = (switch_cache_db_handle_t *) val)) {
+                        char *needle = "pass=\"";
+                        time_t diff = 0;
+
+                        diff = now - dbh->last_used;
+                        
+                        if (switch_mutex_trylock(dbh->mutex) == SWITCH_STATUS_SUCCESS) {
+                                switch_mutex_unlock(dbh->mutex);
+                                locked = SWITCH_FALSE;
+                        } else {
+                                locked = SWITCH_TRUE;
+                        }
+
+                        /* sanitize password */
+                        memset(cleankey_str, 0, sizeof(cleankey_str));
+                        pos1 = strstr(key, needle) + strlen(needle);
+                        pos2 = strstr(pos1, "\"");
+                        strncpy(cleankey_str, key, pos1-key);
+                        strcpy(&cleankey_str[pos1-key], pos2);
+                        
+                        
+                        stream->write_function(stream, "%s\n\tType: %s\n\tLast used: %d\n\tFlags: %s, %s\n"
+                                                                                        "\tCreator: %s\n\tLast User: %s\n",
+                                cleankey_str,
+                                switch_cache_db_type_name(dbh->type),
+                                diff,
+                                locked ? "Locked" : "Unlocked",
+                                switch_test_flag(dbh, CDF_INUSE) ? "Attached" : "Detached",
+                                dbh->creator,
+                                dbh->last_user);
+                }
+        }
+        switch_mutex_unlock(dbh_mutex);
+}
+
</ins><span class="cx"> /* For Emacs:
</span><span class="cx"> * Local Variables:
</span><span class="cx"> * mode:c
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfromrev15700freeswitchtrunkw32Setupinno_setup"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupFreePBXurl"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FreePBX.url</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupFreePBXurlfromrev15700freeswitchtrunkw32Setupinno_setupFreePBXurl"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FreePBX.url (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/FreePBX.url) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FreePBX.url         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FreePBX.url        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+[InternetShortcut]
+URL=http://127.0.0.1/freepbx-v3/
+IDList=
+[{000214A0-0000-0000-C000-000000000046}]
+Prop3=19,2
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupFusionPBXurl"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FusionPBX.url</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupFusionPBXurlfromrev15700freeswitchtrunkw32Setupinno_setupFusionPBXurl"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FusionPBX.url (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/FusionPBX.url) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FusionPBX.url         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/FusionPBX.url        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,6 @@
</span><ins>+[InternetShortcut]
+URL=http://127.0.0.1/fusionpbx
+IDList=
+HotKey=0
+[{000214A0-0000-0000-C000-000000000046}]
+Prop3=19,2
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_freepbxbat"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.bat</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_freepbxbatfromrev15700freeswitchtrunkw32Setupinno_setupcreate_freepbxbat"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.bat (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/create_freepbx.bat) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.bat         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.bat        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+cd %1
+ping 127.0.0.1 -n 5 -w 1000 > nul
+NET START wampmysqld
+wamp\bin\mysql\mysql5.1.36\bin\mysql --user=root <create_freepbx.sql
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_freepbxsql"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.sql</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_freepbxsqlfromrev15700freeswitchtrunkw32Setupinno_setupcreate_freepbxsql"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.sql (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/create_freepbx.sql) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.sql         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_freepbx.sql        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+CREATE USER 'freepbx'@'localhost' IDENTIFIED BY 'freepbx';
+GRANT ALL ON *.* TO 'freepbx'@'localhost';
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_fusionpbxbat"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.bat</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_fusionpbxbatfromrev15700freeswitchtrunkw32Setupinno_setupcreate_fusionpbxbat"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.bat (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/create_fusionpbx.bat) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.bat         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.bat        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+cd %1
+ping 127.0.0.1 -n 5 -w 1000 > nul
+NET START wampmysqld
+wamp\bin\mysql\mysql5.1.36\bin\mysql --user=root <create_fusionpbx.sql
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_fusionpbxsql"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.sql</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupcreate_fusionpbxsqlfromrev15700freeswitchtrunkw32Setupinno_setupcreate_fusionpbxsql"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.sql (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/create_fusionpbx.sql) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.sql         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/create_fusionpbx.sql        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+CREATE USER 'fusionpbx'@'localhost' IDENTIFIED BY 'fusionpbx';
+GRANT ALL ON *.* TO 'fusionpbx'@'localhost';
+create DATABASE fusionpbx
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupexpsoundbat"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/expsound.bat</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupexpsoundbatfromrev15700freeswitchtrunkw32Setupinno_setupexpsoundbat"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/expsound.bat (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/expsound.bat) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/expsound.bat         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/expsound.bat        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,5 @@
</span><ins>+echo off
+rem example call: expsound {tmp} {app} freeswitch-sounds-en-us-callie-8000-1.0.11.tar.gz
+
+IF EXIST %1\%3 %1\7za x -r -y -o%1 %1\%3
+IF EXIST %1\%~n3 %1\7za x -r -y -o%2\sounds %1\%~n3
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreepbxico"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freepbx.ico</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreepbxicofromrev15700freeswitchtrunkw32Setupinno_setupfreepbxico"></a>
<div class="binary"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freepbx.ico (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/freepbx.ico)</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitchico"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch.ico</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitchicofromrev15700freeswitchtrunkw32Setupinno_setupfreeswitchico"></a>
<div class="binary"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch.ico (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/freeswitch.ico)</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitch_104iss"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_1.0.4.iss</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitch_104issfromrev15700freeswitchtrunkw32Setupinno_setupfreeswitch_104iss"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_1.0.4.iss (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/freeswitch_1.0.4.iss) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_1.0.4.iss         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_1.0.4.iss        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,819 @@
</span><ins>+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application.
+; Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+;AppId={{088C2C50-0D5F-4276-8771-FF54CAA14E70}
+AppName=FreeSWITCH
+AppVerName=FreeSWITCH 1.0.4
+AppPublisher=FreeSWITCH
+AppPublisherURL=http://www.freeswitch.org
+AppSupportURL=http://www.freeswitch.org
+AppUpdatesURL=http://www.freeswitch.org
+DefaultDirName=C:\FreeSWITCH
+DefaultGroupName=FreeSWITCH
+;LicenseFile=C:\source\wamp\license.txt
+OutputBaseFilename=freeswitch-1.0.4
+SetupIconFile=freeswitch.ico
+Compression=lzma
+SolidCompression=true
+AppCopyright=Anthony Minessale II
+AllowUNCPath=false
+OutputDir=Output
+
+[Languages]
+Name: english; MessagesFile: compiler:Default.isl
+
+[Tasks]
+Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+
+[Files]
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+Source: freeswitch.ico; DestDir: {app}; Components: FreeSWITCH
+Source: vcredist_x86.exe; Components: FreeSWITCH; DestDir: {tmp}
+Source: freepbx.ico; DestDir: {app}; Components: FreePBX_WAMP
+Source: expsound.bat; DestDir: {app}; Components: FreeSWITCH
+Source: FreePBX.url; DestDir: {app}; Components: FreePBX_WAMP
+Source: create_freepbx.sql; DestDir: {app}; Components: FreePBX_WAMP
+Source: create_freepbx.bat; DestDir: {app}; Components: FreePBX_WAMP
+Source: G:\freeswitch-1.0.4\Release\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist; Components: FreeSWITCH
+Source: G:\freeswitch-1.0.4\Release_CLR\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist; Components: FreeSWITCH
+Source: G:\freeswitch_dev\contrib\jmesquita\fsgui\bin\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist; Components: fsgui
+
+Source: G:\wamp_source\close\*.*; DestDir: {app}\wamp\; Flags: ignoreversion recursesubdirs; AfterInstall: close(); Components: FreePBX_WAMP
+Source: G:\wamp_source\wamp\*.*; DestDir: {app}\wamp\; Flags: ignoreversion recursesubdirs onlyifdoesntexist; Components: FreePBX_WAMP
+Source: G:\wamp_source\wamp\license.txt; DestDir: {app}\wamp\; AfterInstall: install(); Components: FreePBX_WAMP
+
+Source: G:\freeswitch_dev\Release\php_ESL.dll; DestDir: {app}\wamp\bin\php\php5.3.0\ext; Flags: ignoreversion recursesubdirs; Components: FreePBX_WAMP
+
+Source: G:\freepbx-v3-dev\*; DestDir: {app}\wamp\www\freepbx-v3; Flags: ignoreversion recursesubdirs onlyifdoesntexist createallsubdirs; Components: FreePBX_WAMP
+Source: G:\freepbx-v3-dev\INSTALL.TXT; DestDir: {app}\wamp\www\freepbx-v3; AfterInstall: fix_freepbx_paths(); Components: FreePBX_WAMP
+
+; These two files are required for TLS/SSL support
+Source: C:\OpenSSL\libeay32.dll; DestDir: {app}
+Source: C:\OpenSSL\ssleay32.dll; DestDir: {app}
+
+[Icons]
+Name: {group}\FreeSWITCH; Filename: {app}\FreeSwitch.exe; Components: FreeSWITCH; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}
+Name: {commondesktop}\FreeSWITCH; Filename: {app}\FreeSwitch.exe; Tasks: desktopicon; Components: FreeSWITCH; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\FreeSWITCH; Filename: {app}\FreeSwitch.exe; Tasks: quicklaunchicon; Components: FreeSWITCH; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}
+Name: {commondesktop}\fsgui; Filename: {app}\fsgui.exe; Tasks: desktopicon; Components: fsgui; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}\plugins
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\fsgui; Filename: {app}\fsgui.exe; Tasks: quicklaunchicon; Components: fsgui; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}\plugins
+
+Name: {commondesktop}\FreePBX.url; Filename: {app}\FreePBX.url; Tasks: desktopicon; Components: FreePBX_WAMP; IconFilename: {app}\freepbx.ico; IconIndex: 0
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\FreePBX.url; Filename: {app}\FreePBX.url; Tasks: quicklaunchicon; Components: FreePBX_WAMP; IconFilename: {app}\freepbx.ico; IconIndex: 0
+
+Name: {group}\start WampServer; Filename: {app}\wamp\wampmanager.exe; WorkingDir: {app}\wamp; Components: FreePBX_WAMP; Flags: runminimized
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\WampServer; Filename: {app}\wamp\wampmanager.exe; Tasks: quicklaunchicon; Components: FreePBX_WAMP
+Name: {commondesktop}\WampServer; Filename: {app}\wamp\wampmanager.exe; Tasks: desktopicon; Components: FreePBX_WAMP
+
+[Run]
+Filename: {tmp}\vcredist_x86.exe; Description: Microsoft Visual C++ 2008 Redistributable Package (x86); Components: FreeSWITCH; Parameters: /q
+
+Filename: {app}\wamp\uninstall_services.bat; Components: FreePBX_WAMP; Flags: runhidden
+Filename: {app}\wamp\install_services.bat; Components: FreePBX_WAMP; Flags: runhidden
+Filename: {app}\wamp\wampmanager.exe; Description: Launch WampServer 2 now; Components: FreePBX_WAMP; Flags: shellexec postinstall skipifsilent runhidden
+Filename: {app}\freeswitch.exe; Description: Launch FreeSWITCH now; Flags: shellexec postinstall skipifsilent; Components: FreeSWITCH
+
+Filename: {app}\create_freepbx.bat; Description: Create FreePBX MySQL user; Flags: runhidden; Components: FreePBX_WAMP; Parameters: {app}; WorkingDir: {app}
+
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-en-us-callie-8000-1.0.11.tar.gz; Components: sound_files_8khz; WorkingDir: {tmp}
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-music-8000-1.0.8.tar.gz; Components: sound_files_8khz; WorkingDir: {tmp}; Tasks: ; Languages:
+
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-en-us-callie-16000-1.0.11.tar.gz; Components: sound_files_16khz; WorkingDir: {tmp}; Tasks: ; Languages:
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-music-16000-1.0.8.tar.gz; Components: sound_files_16khz; WorkingDir: {tmp}; Tasks: ; Languages:
+
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-en-us-callie-32000-1.0.11.tar.gz; Components: sound_files_32khz; WorkingDir: {tmp}; Tasks: ; Languages:
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-music-32000-1.0.8.tar.gz; Components: sound_files_32khz; WorkingDir: {tmp}; Tasks: ; Languages:
+
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-en-us-callie-48000-1.0.11.tar.gz; Components: sound_files_48khz; WorkingDir: {tmp}; Tasks: ; Languages:
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-music-48000-1.0.8.tar.gz; Components: sound_files_48khz; WorkingDir: {tmp}; Tasks: ; Languages:
+
+[UninstallDelete]
+Type: filesandordirs; Name: {app}\sounds
+Type: files; Name: {app}\wamp\*.*
+Type: filesandordirs; Name: {app}\wamp\apps
+Type: filesandordirs; Name: {app}\wamp\bin\apache
+Type: filesandordirs; Name: {app}\wamp\bin\php
+Type: filesandordirs; Name: {app}\wamp\help
+Type: filesandordirs; Name: {app}\wamp\lang
+Type: filesandordirs; Name: {app}\wamp\logs
+Type: filesandordirs; Name: {app}\wamp\scripts
+Type: filesandordirs; Name: {app}\wamp\tmp
+Type: filesandordirs; Name: {app}
+
+[UninstallRun]
+Filename: {app}\wamp\uninstall_services.bat; Components: FreePBX_WAMP; Flags: runhidden
+Filename: {app}\freeswitch.exe; Flags: runhidden; Parameters: -stop; WorkingDir: {app}
+
+[_ISToolDownload]
+Source: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-8000-1.0.11.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-en-us-callie-8000-1.0.11.tar.gz; Components: sound_files_8khz
+Source: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-16000-1.0.11.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-en-us-callie-16000-1.0.11.tar.gz; Components: sound_files_16khz
+Source: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-32000-1.0.11.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-en-us-callie-32000-1.0.11.tar.gz; Components: sound_files_32khz
+Source: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-48000-1.0.11.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-en-us-callie-48000-1.0.11.tar.gz; Components: sound_files_48khz
+
+Source: http://files.freeswitch.org/freeswitch-sounds-music-8000-1.0.8.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-music-8000-1.0.8.tar.gz; Components: sound_files_8khz
+Source: http://files.freeswitch.org/freeswitch-sounds-music-16000-1.0.8.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-music-16000-1.0.8.tar.gz; Components: sound_files_16khz
+Source: http://files.freeswitch.org/freeswitch-sounds-music-32000-1.0.8.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-music-32000-1.0.8.tar.gz; Components: sound_files_32khz
+Source: http://files.freeswitch.org/freeswitch-sounds-music-48000-1.0.8.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-music-48000-1.0.8.tar.gz; Components: sound_files_48khz
+
+Source: http://files.freeswitch.org/downloads/win32/7za.exe; DestDir: {tmp}; DestName: 7za.exe; Components: sound_files_8khz
+[Components]
+Name: FreeSWITCH; Description: FreeSWITCH core components; Flags: fixed; Types: custom compact full; Languages:
+Name: FreePBX_WAMP; Description: FreePBX interface along with Apache, Mysql and PHP; Types: custom full
+Name: fsgui; Description: fsgui (Joao Mesquita's QT based console); Types: custom full
+Name: sound_files_8khz; Description: sound files 8khz (G711); ExtraDiskSpaceRequired: 21000000; Types: custom compact full; Languages:
+Name: sound_files_16khz; Description: sound files 16khz (G722); ExtraDiskSpaceRequired: 42000000; Types: custom full; Languages:
+Name: sound_files_32khz; Description: sound files 32khz (CELT); ExtraDiskSpaceRequired: 82000000; Types: custom full; Languages:
+Name: sound_files_48khz; Description: sound files 48khz (CELT); ExtraDiskSpaceRequired: 119000000; Types: custom full; Languages:
+[Code]
+//variables globales
+var phpVersion: String;
+var apacheVersion: String;
+var path: String;
+var pathWithSlashes: String;
+var page: TInputQueryWizardPage;
+var email: String;
+var smtp: String;
+
+//-----------------------------------------------
+
+procedure expand_sound();
+var execFile: String;
+var myResult: Integer;
+var temppath: String;
+
+begin
+temppath := ExpandConstant('{tmp}');
+execFile := temppath+'\7za.exe';
+Exec(execFile, '',temppath+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+end;
+
+procedure fix_freepbx_paths();
+var srcFile: String;
+var destFile: String;
+var srcContents: String;
+var fspath: String;
+var fspathWithSlashes: String;
+
+begin
+fspath := ExpandConstant('{app}');
+fspathWithSlashes := fspath;
+StringChange (fspathWithSlashes, '\','/');
+
+destFile := fspathWithSlashes+'/wamp/www/freepbx-v3/freepbx/config/telephony.php';
+//srcFile := fspathWithSlashes+'/wamp/www/freepbx-v3/freepbx/config/telephony.php.install';
+
+//if not FileExists (destFile) then
+//begin
+
+ LoadStringFromFile (destFile, srcContents);
+
+ StringChange (srcContents, '/opt/freeswitch', fspathWithSlashes);
+ StringChange (srcContents, '/usr/local/freeswitch', fspathWithSlashes);
+
+ SaveStringToFile(destFile,srcContents, False);
+//end
+
+//DeleteFile(SrcFile);
+
+end;
+
+
+//procedure qui ferme les eteind les services et ferme wampmanager.exe (si ils existent)
+
+procedure close();
+var batFile: String;
+var myResult: Integer;
+
+begin
+path := ExpandConstant('{app}') + '\wamp';
+batFile := path+'\closewamp.bat';
+Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+
+
+end;
+
+
+//----------------------------------------------
+
+//procedure qui adapte WAMP aux choix effectu\xE9s lors de l'installation
+
+procedure install();
+var srcFile: String;
+var destFile: String;
+var srcContents: String;
+var browser: String;
+var winPath: String;
+var mysqlVersion: String;
+var wampserverVersion: String;
+var phpmyadminVersion: String;
+//var sqlitemanagerVersion: String;
+var tmp: String;
+var phpDllCopy: String;
+
+
+begin
+
+//version des applis, \xE0 modifier pour chaque version de WampServer 2
+apacheVersion := '2.2.11';
+phpVersion := '5.3.0' ;
+mysqlVersion := '5.1.36';
+wampserverVersion := '2.0';
+phpmyadminVersion := '3.2.0.1';
+//sqlitemanagerVersion := '1.2.0';
+
+
+path := ExpandConstant('{app}') + '\wamp';
+winPath := ExpandConstant('{win}');
+
+pathWithSlashes := path;
+StringChange (pathWithSlashes, '\','/');
+
+//----------------------------------------------
+// renommage du fichier c:/windows/php.ini
+//----------------------------------------------
+
+if FileExists ('c:/windows/php.ini') then
+begin
+ if MsgBox('A previous php.ini file has been detected in your Windows directory. Do you want WampServer2 to rename it to php_old.ini to avoid conflicts?',mbConfirmation,MB_YESNO) = IDYES then
+ begin
+ RenameFile('c:/windows/php.ini','c:/windows/php_old.ini');
+ end
+end
+
+
+
+
+//----------------------------------------------
+// Fichier install_services.bat
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/install_services.bat';
+srcFile := pathWithSlashes+'/install_services.bat.install';
+
+if not FileExists (pathWithSlashes+'/wampmanager.conf') then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //version de apache et mysql
+ StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
+ StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ //dans le cas d'une upgrade on d\xE9truit le fichier pour qu'il ne soit pas execut\xE9
+ DeleteFile(destFile);
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier install_services_auto.bat
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/install_services_auto.bat';
+srcFile := pathWithSlashes+'/install_services_auto.bat.install';
+
+if not FileExists (pathWithSlashes+'/wampmanager.conf') then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //version de apache et mysql
+ StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
+ StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ //dans le cas d'une upgrade on d\xE9truit le fichier pour qu'il ne soit pas execut\xE9
+ DeleteFile(destFile);
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier uninstall_services_auto.bat
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/uninstall_services.bat';
+srcFile := pathWithSlashes+'/uninstall_services.bat.install';
+
+if not FileExists (pathWithSlashes+'/wampmanager.conf') then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //version de apache et mysql
+ StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
+ StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ //dans le cas d'une upgrade on d\xE9truit le fichier pour qu'il ne soit pas execut\xE9
+ DeleteFile(destFile);
+end
+DeleteFile(SrcFile);
+
+
+
+
+//----------------------------------------------
+// Fichier wampmanager.conf
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/wampmanager.conf';
+srcFile := pathWithSlashes+'/wampmanager.conf.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+
+ //installDir et versions
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPSERVERVERSION', wampserverVersion);
+ StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
+ StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
+ StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
+ StringChange (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion);
+// StringChange (srcContents, 'WAMPSQLITEMANAGERVERSION', sqlitemanagerVersion);
+
+
+
+ //navigateur
+ browser := 'explorer.exe';
+ if FileExists ('C:/Program Files/Mozilla Firefox/firefox.exe') then
+ begin
+ if MsgBox('Firefox has been detected on your computer. Would you like to use it as the default browser with WampServer2?',mbConfirmation,MB_YESNO) = IDYES then
+ begin
+ browser := 'C:/Program Files/Mozilla Firefox/firefox.exe';
+ end
+ end
+ if browser = 'explorer.exe' then
+ begin
+ GetOpenFileName('Please choose your default browser. If you are not sure, just click Open :', browser, winPath,'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe');
+ end
+ StringChange (srcContents, 'WAMPBROWSER', browser);
+ SaveStringToFile(destFile,srcContents, False);
+end
+
+else
+begin
+// changement de wampserverVersion et WampserverVersion pour les upgrades
+end
+
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier wampmanager.ini
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/wampmanager.ini';
+srcFile := pathWithSlashes+'/wampmanager.ini.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+
+ //installDir et versions
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
+ SaveStringToFile(destFile,srcContents, False);
+end
+
+DeleteFile(SrcFile);
+
+
+
+//----------------------------------------------
+// Fichier wampmanager.tpl
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/wampmanager.tpl';
+srcFile := pathWithSlashes+'/wampmanager.tpl.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+end
+
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier alias phpmyadmin
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/alias/phpmyadmin.conf';
+srcFile := pathWithSlashes+'/alias/phpmyadmin.conf.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //installDir et version de phpmyadmin
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ LoadStringFromFile (srcFile, srcContents);
+
+ //installDir et version de phpmyadmin
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+
+
+ //mise \xE0 jour de la version de phpmyadmin
+ tmp := GetIniString('apps','phpmyadminVersion',phpmyadminVersion,pathWithSlashes+'/wampmanager.conf');
+ if not CompareText(tmp,phpmyadminVersion) = 0 then
+ begin
+ SetIniString('apps','phpmyadminVersion',phpmyadminVersion,pathWithSlashes+'/wampmanager.conf');
+ LoadStringFromFile (destFile, srcContents);
+ StringChange (srcContents, tmp, phpmyadminVersion);
+ SaveStringToFile(destFile,srcContents, False);
+ end
+end
+
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier de configuration de phpmyadmin
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
+srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
+
+if not FileExists (destFile) then
+begin
+
+// si un fichier existe pour une version precedente de phpmyadmin, on le recupere
+ if FileExists (pathWithSlashes+'/apps/phpmyadmin'+tmp+'/config.inc.php') then
+ begin
+ LoadStringFromFile (pathWithSlashes+'/apps/phpmyadmin'+tmp+'/config.inc.php', srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+ end
+ else
+ begin
+
+// sinon on prends le fichier par defaut
+ LoadStringFromFile (srcFile, srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+ end
+end
+
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier httpd.conf
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/conf/httpd.conf';
+srcFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/conf/httpd.conf.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //installDir et version de php
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier my.ini
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/bin/mysql/mysql'+mysqlVersion+'/my.ini';
+srcFile := pathWithSlashes+'/bin/mysql/mysql'+mysqlVersion+'/my.ini.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //installDir et version de php
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier index.php
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/www/index.php';
+srcFile := pathWithSlashes+'/www/index.php.install';
+
+if not FileExists (destFile) then
+begin
+ LoadStringFromFile (srcFile, srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ if MsgBox('Would you like to install the new WampServer 2 homepage? (this will overwrite exisiting index.php file)',mbConfirmation,MB_YESNO) = IDYES then
+ begin
+ DeleteFile (destFile);
+ LoadStringFromFile (srcFile, srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+ end
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+//----------------------------------------------
+// Fichier php.ini
+//----------------------------------------------
+destFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini';
+
+if not FileExists (destFile) then
+begin
+ page := CreateInputQueryPage(wpInstalling,
+ 'PHP mail parameters', '',
+ 'Please specify the SMTP server and the adresse mail to be used by PHP when using the function mail(). If you are not sure, just leave the default values.');
+
+ page.Add('SMTP:', False);
+ page.Add('Email:', False);
+
+ // Valeurs par defaut
+ page.Values[0] := 'localhost';
+ page.Values[1] := 'you@yourdomain';
+ SaveStringToFile(pathWithSlashes+'/mailtag','tag', False);
+end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// copie des dll de php vers apache
+//----------------------------------------------
+
+phpDllCopy := 'fdftk.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'fribidi.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'gds32.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libeay32.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libmhash.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libmysql.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'msql.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libmysqli.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'ntwdblib.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'php5activescript.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'php5isapi.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'php5nsapi.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'ssleay32.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'yaz.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libmcrypt.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'php5ts.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+
+
+
+
+
+
+
+
+end;
+
+
+
+
+
+
+
+
+//-----------------------------------------------------------
+// gestion des fichiers php.ini
+
+procedure CurPageChanged(CurPageID: Integer);
+var destFile: String;
+var srcFile: String;
+var srcContents: String;
+begin
+ if CurPageID = 14 then
+ begin
+ if FileExists (pathWithSlashes+'/mailtag') then
+ begin
+ smtp := page.Values[0];
+ email := page.Values[1];
+ DeleteFile(pathWithSlashes+'/mailtag');
+ end
+ destFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini';
+ srcFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini.install';
+ LoadStringFromFile (srcFile, srcContents);
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPSMTP', smtp);
+ StringChange (srcContents, 'WAMPEMAIL', email);
+
+//----------------------------------------------
+// fichier php.ini dans php
+//----------------------------------------------
+
+
+
+ if not FileExists (destFile) then
+ begin
+ SaveStringToFile(destFile,srcContents, False);
+ end
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// fichier phpForApache.ini dans php
+//----------------------------------------------
+
+
+
+ destFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/phpForApache.ini';
+ if not FileExists (destFile) then
+ begin
+ SaveStringToFile(destFile,srcContents, False);
+ end
+
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// fichier php.ini dans apache
+//----------------------------------------------
+
+
+
+ destFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/php.ini';
+ if not FileExists (destFile) then
+ begin
+ SaveStringToFile(destFile,srcContents, False);
+ end
+
+ end
+
+ DeleteFile(SrcFile);
+
+
+
+
+
+
+//MsgBox(tmp,mbConfirmation,MB_YESNO);
+end;
+
+
+
+
+
+//-----------------------------------------------
+
+//procedure lanc\xE9e \xE0 la fin de l'installation, elle supprime les fichiers d'installation
+
+procedure DeinitializeSetup();
+
+begin
+ DeleteFile(path+'\install_services.bat');
+ DeleteFile(path+'\install_services_auto.bat');
+ DeleteFile(path+'\expsound.bat');
+ DeleteFile(path+'..\create_freepbx.bat');
+end;
+
+
+
+//-----------------------------------------------
+
+//procedure lanc\xE9e au d\xE9but de l'installation, elle alerte sur les upgrades de WampServer
+
+//function InitializeSetup(): Boolean;
+//begin
+// Result := MsgBox('Important Information:' #13#13 'Please do not try to upgrade from WAMP5 1.x.' #13 ' If you have WAMP5 1.x installed, save your data, uninstall WAMP5 ' #13 'and delete the wamp folder before installing this new release. ' #13#13 'Do you want to continue install?', mbConfirmation, MB_YESNO) = idYes;
+//end;
+// Function generated by ISTool.
+function NextButtonClick(CurPage: Integer): Boolean;
+begin
+        Result := istool_download(CurPage);
+end;
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitch_freepbx_fusionpbxiss"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfreeswitch_freepbx_fusionpbxissfromrev15700freeswitchtrunkw32Setupinno_setupfreeswitch_freepbx_fusionpbxiss"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,837 @@
</span><ins>+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application.
+; Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+;AppId={{088C2C50-0D5F-4276-8771-FF54CAA14E70}
+AppName=FreeSWITCH
+AppVerName=FreeSWITCH svn 15668
+AppPublisher=FreeSWITCH
+AppPublisherURL=http://www.freeswitch.org
+AppSupportURL=http://www.freeswitch.org
+AppUpdatesURL=http://www.freeswitch.org
+DefaultDirName=C:\FreeSWITCH
+DefaultGroupName=FreeSWITCH
+OutputBaseFilename=freeswitch
+SetupIconFile=freeswitch.ico
+Compression=lzma
+SolidCompression=true
+AppCopyright=Anthony Minessale II
+AllowUNCPath=false
+OutputDir=Output
+ArchitecturesInstallIn64BitMode=x64
+
+[Languages]
+Name: english; MessagesFile: compiler:Default.isl
+
+[Tasks]
+Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+
+[Files]
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+Source: freeswitch.ico; DestDir: {app}; Components: FreeSWITCH
+Source: vcredist_x86.exe; Flags: 32bit; Components: FreeSWITCH; DestDir: {tmp}; Check: not Is64BitInstallMode
+Source: vcredist_x64.exe; Flags: 64bit; Components: FreeSWITCH; DestDir: {tmp}; Check: Is64BitInstallMode
+Source: freepbx.ico; DestDir: {app}; Components: FreePBX_WAMP
+Source: expsound.bat; DestDir: {app}; Components: FreeSWITCH
+Source: FreePBX.url; DestDir: {app}; Components: FreePBX_WAMP
+Source: FusionPBX.url; DestDir: {app}; Components: FusionPBX_WAMP
+Source: create_freepbx.sql; DestDir: {app}; Components: FreePBX_WAMP
+Source: create_freepbx.bat; DestDir: {app}; Components: FreePBX_WAMP
+Source: create_fusionpbx.sql; DestDir: {app}; Components: FusionPBX_WAMP
+Source: create_fusionpbx.bat; DestDir: {app}; Components: FusionPBX_WAMP
+
+; 32 bit release
+Source: G:\freeswitch_dev\Release\*.exe; DestDir: {app}; Flags: ignoreversion onlyifdoesntexist 32bit; Components: FreeSWITCH; Check: not Is64BitInstallMode
+Source: G:\freeswitch_dev\Release\*.dll; DestDir: {app}; Flags: ignoreversion onlyifdoesntexist 32bit; Components: FreeSWITCH; Check: not Is64BitInstallMode
+Source: G:\freeswitch_dev\Release\*.lib; DestDir: {app}; Flags: ignoreversion onlyifdoesntexist 32bit; Components: FreeSWITCH; Check: not Is64BitInstallMode
+Source: G:\freeswitch_dev\Release\mod\*; DestDir: {app}\mod; Flags: ignoreversion onlyifdoesntexist 32bit; Components: FreeSWITCH; Check: not Is64BitInstallMode
+Source: G:\freeswitch_dev\Release_CLR\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist 32bit; Components: FreeSWITCH; Check: not Is64BitInstallMode
+; 64 bit release
+Source: G:\freeswitch_dev\x64\Release\*.exe; DestDir: {app}; Flags: ignoreversion onlyifdoesntexist 64bit; Components: FreeSWITCH; Check: Is64BitInstallMode
+Source: G:\freeswitch_dev\x64\Release\*.dll; DestDir: {app}; Flags: ignoreversion onlyifdoesntexist 64bit; Components: FreeSWITCH; Check: Is64BitInstallMode
+Source: G:\freeswitch_dev\x64\Release\*.lib; DestDir: {app}; Flags: ignoreversion onlyifdoesntexist 64bit; Components: FreeSWITCH; Check: Is64BitInstallMode
+Source: G:\freeswitch_dev\x64\Release\mod\*; DestDir: {app}\mod; Flags: ignoreversion onlyifdoesntexist 64bit; Components: FreeSWITCH; Check: Is64BitInstallMode
+Source: G:\freeswitch_dev\x64\Release_CLR\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist 64bit; Components: FreeSWITCH; Check: Is64BitInstallMode
+
+; shared by 32 and 64 bit install
+Source: G:\freeswitch_dev\Release\conf\*; DestDir: {app}\conf; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist; Components: FreeSWITCH
+Source: G:\freeswitch_dev\contrib\jmesquita\fsgui\bin\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist; Components: fsgui
+
+; WAMP
+Source: G:\wamp_source\close\*.*; DestDir: {app}\wamp\; Flags: ignoreversion recursesubdirs; AfterInstall: close(); Components: FreePBX_WAMP FusionPBX_WAMP; Tasks:
+Source: G:\wamp_source\wamp\*.*; DestDir: {app}\wamp\; Flags: ignoreversion recursesubdirs onlyifdoesntexist; Components: FreePBX_WAMP FusionPBX_WAMP
+Source: G:\wamp_source\wamp\license.txt; DestDir: {app}\wamp\; AfterInstall: install_pbx(); Components: FreePBX_WAMP FusionPBX_WAMP
+
+Source: G:\freeswitch_dev\Release\php_ESL.dll; DestDir: {app}\wamp\bin\php\php5.3.0\ext; Flags: ignoreversion recursesubdirs; Components: FreePBX_WAMP FusionPBX_WAMP
+
+; FreePBX w/ svn folders
+Source: G:\freepbx-v3-dev\*; DestDir: {app}\wamp\www\freepbx-v3; Flags: ignoreversion recursesubdirs onlyifdoesntexist createallsubdirs; Components: FreePBX_WAMP
+Source: G:\freepbx-v3-dev\INSTALL.TXT; DestDir: {app}\wamp\www\freepbx-v3; AfterInstall: fix_freepbx_paths(); Components: FreePBX_WAMP
+
+; FusionPBX folders
+Source: G:\fusionpbx\*; DestDir: {app}\wamp\www\fusionpbx; Flags: ignoreversion recursesubdirs onlyifdoesntexist createallsubdirs; Components: FusionPBX_WAMP
+;Source: G:\fusionpbx\secure\*; DestDir: {app}\wamp\secure; Flags: ignoreversion recursesubdirs onlyifdoesntexist createallsubdirs; Components: FusionPBX_WAMP
+
+; These two files are required for TLS/SSL support
+; 32 bit version
+Source: C:\OpenSSL\libeay32.dll; DestDir: {app}; Check: not Is64BitInstallMode; Flags: 32bit
+Source: C:\OpenSSL\ssleay32.dll; DestDir: {app}; Check: not Is64BitInstallMode; Flags: 32bit
+; 64 bit version
+Source: C:\OpenSSL64\libeay32.dll; DestDir: {app}; Check: Is64BitInstallMode; Flags: 64bit
+Source: C:\OpenSSL64\ssleay32.dll; DestDir: {app}; Check: Is64BitInstallMode; Flags: 64bit
+
+
+[Dirs]
+Name: {app}\log
+Name: {app}\db
+Name: {app}\scripts
+Name: {app}\htdocs
+Name: {app}\grammar
+Name: {app}\backup
+Name: {app}\wamp\secure; Components: FusionPBX_WAMP
+
+[Icons]
+Name: {group}\FreeSWITCH; Filename: {app}\FreeSwitch.exe; Components: FreeSWITCH; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}
+Name: {commondesktop}\FreeSWITCH; Filename: {app}\FreeSwitch.exe; Tasks: desktopicon; Components: FreeSWITCH; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\FreeSWITCH; Filename: {app}\FreeSwitch.exe; Tasks: quicklaunchicon; Components: FreeSWITCH; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}
+Name: {commondesktop}\fsgui; Filename: {app}\fsgui.exe; Tasks: desktopicon; Components: fsgui; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}\plugins
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\fsgui; Filename: {app}\fsgui.exe; Tasks: quicklaunchicon; Components: fsgui; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}\plugins
+
+Name: {commondesktop}\FreePBX.url; Filename: {app}\FreePBX.url; Tasks: desktopicon; Components: FreePBX_WAMP; IconFilename: {app}\freepbx.ico; IconIndex: 0
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\FreePBX.url; Filename: {app}\FreePBX.url; Tasks: quicklaunchicon; Components: FreePBX_WAMP; IconFilename: {app}\freepbx.ico; IconIndex: 0
+
+Name: {commondesktop}\FusionPBX.url; Filename: {app}\FusionPBX.url; Tasks: desktopicon; Components: FusionPBX_WAMP
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\FusionPBX.url; Filename: {app}\FusionPBX.url; Tasks: quicklaunchicon; Components: FusionPBX_WAMP
+
+Name: {group}\start WampServer; Filename: {app}\wamp\wampmanager.exe; WorkingDir: {app}\wamp; Components: FreePBX_WAMP FusionPBX_WAMP; Flags: runminimized
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\WampServer; Filename: {app}\wamp\wampmanager.exe; Tasks: quicklaunchicon; Components: FreePBX_WAMP FusionPBX_WAMP
+Name: {commondesktop}\WampServer; Filename: {app}\wamp\wampmanager.exe; Tasks: desktopicon; Components: FreePBX_WAMP FusionPBX_WAMP
+
+[Run]
+Filename: {tmp}\vcredist_x86.exe; Description: Microsoft Visual C++ 2008 Redistributable Package (x86); Components: FreeSWITCH; Parameters: /q; Flags: 32bit; Check: not Is64BitInstallMode
+Filename: {tmp}\vcredist_x64.exe; Description: Microsoft Visual C++ 2008 Redistributable Package (x64); Components: FreeSWITCH; Parameters: /q; Flags: 64bit; Check: Is64BitInstallMode
+Filename: {app}\wamp\uninstall_services.bat; Components: FreePBX_WAMP FusionPBX_WAMP; Flags: runhidden
+Filename: {app}\wamp\install_services.bat; Components: FreePBX_WAMP FusionPBX_WAMP; Flags: runhidden
+Filename: {app}\wamp\wampmanager.exe; Description: Launch WampServer 2 now; Components: FreePBX_WAMP FusionPBX_WAMP; Flags: shellexec postinstall skipifsilent runhidden
+Filename: {app}\freeswitch.exe; Description: Launch FreeSWITCH now; Flags: shellexec postinstall skipifsilent; Components: FreeSWITCH
+
+Filename: {app}\create_freepbx.bat; Description: Create FreePBX MySQL user; Flags: runhidden; Components: FreePBX_WAMP; Parameters: {app}; WorkingDir: {app}
+Filename: {app}\create_fusionpbx.bat; Description: Create FusionPBX MySQL user; Flags: runhidden; Components: FusionPBX_WAMP; Parameters: {app}; WorkingDir: {app}
+
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-en-us-callie-8000-1.0.11.tar.gz; Components: sound_files_8khz; WorkingDir: {tmp}
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-music-8000-1.0.8.tar.gz; Components: sound_files_8khz; WorkingDir: {tmp}; Tasks: ; Languages:
+
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-en-us-callie-16000-1.0.11.tar.gz; Components: sound_files_16khz; WorkingDir: {tmp}; Tasks: ; Languages:
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-music-16000-1.0.8.tar.gz; Components: sound_files_16khz; WorkingDir: {tmp}; Tasks: ; Languages:
+
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-en-us-callie-32000-1.0.11.tar.gz; Components: sound_files_32khz; WorkingDir: {tmp}; Tasks: ; Languages:
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-music-32000-1.0.8.tar.gz; Components: sound_files_32khz; WorkingDir: {tmp}; Tasks: ; Languages:
+
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-en-us-callie-48000-1.0.11.tar.gz; Components: sound_files_48khz; WorkingDir: {tmp}; Tasks: ; Languages:
+Filename: {app}\expsound.bat; Parameters: {tmp} {app} freeswitch-sounds-music-48000-1.0.8.tar.gz; Components: sound_files_48khz; WorkingDir: {tmp}; Tasks: ; Languages:
+
+[UninstallDelete]
+Type: filesandordirs; Name: {app}\sounds
+Type: files; Name: {app}\wamp\*.*
+Type: filesandordirs; Name: {app}\wamp\apps
+Type: filesandordirs; Name: {app}\wamp\bin\apache
+Type: filesandordirs; Name: {app}\wamp\bin\php
+Type: filesandordirs; Name: {app}\wamp\help
+Type: filesandordirs; Name: {app}\wamp\lang
+Type: filesandordirs; Name: {app}\wamp\logs
+Type: filesandordirs; Name: {app}\wamp\scripts
+Type: filesandordirs; Name: {app}\wamp\tmp
+Type: filesandordirs; Name: {app}
+
+[UninstallRun]
+Filename: {app}\wamp\uninstall_services.bat; Components: FreePBX_WAMP FusionPBX_WAMP; Flags: runhidden
+Filename: {app}\freeswitch.exe; Flags: runhidden; Parameters: -stop; WorkingDir: {app}
+
+[_ISToolDownload]
+Source: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-8000-1.0.12.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-en-us-callie-8000-1.0.11.tar.gz; Components: sound_files_8khz
+Source: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-16000-1.0.12.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-en-us-callie-16000-1.0.11.tar.gz; Components: sound_files_16khz
+Source: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-32000-1.0.12.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-en-us-callie-32000-1.0.11.tar.gz; Components: sound_files_32khz
+Source: http://files.freeswitch.org/freeswitch-sounds-en-us-callie-48000-1.0.12.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-en-us-callie-48000-1.0.11.tar.gz; Components: sound_files_48khz
+
+Source: http://files.freeswitch.org/freeswitch-sounds-music-8000-1.0.8.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-music-8000-1.0.8.tar.gz; Components: sound_files_8khz
+Source: http://files.freeswitch.org/freeswitch-sounds-music-16000-1.0.8.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-music-16000-1.0.8.tar.gz; Components: sound_files_16khz
+Source: http://files.freeswitch.org/freeswitch-sounds-music-32000-1.0.8.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-music-32000-1.0.8.tar.gz; Components: sound_files_32khz
+Source: http://files.freeswitch.org/freeswitch-sounds-music-48000-1.0.8.tar.gz; DestDir: {tmp}; DestName: freeswitch-sounds-music-48000-1.0.8.tar.gz; Components: sound_files_48khz
+
+Source: http://files.freeswitch.org/downloads/win32/7za.exe; DestDir: {tmp}; DestName: 7za.exe; Components: sound_files_8khz
+[Components]
+Name: FreeSWITCH; Description: FreeSWITCH core components; Flags: fixed; Types: custom compact full; Languages:
+Name: FreePBX_WAMP; Description: FreePBX interface along with Apache, Mysql and PHP; Types: custom full; Flags: exclusive
+Name: FusionPBX_WAMP; Description: FusionPBX interface along with Apache, Mysql and PHP; Types: custom full; Flags: exclusive
+Name: fsgui; Description: fsgui (Joao Mesquita's QT based console); Types: custom full
+Name: sound_files_8khz; Description: sound files 8khz (G711); ExtraDiskSpaceRequired: 21000000; Types: custom compact full; Languages:
+Name: sound_files_16khz; Description: sound files 16khz (G722); ExtraDiskSpaceRequired: 42000000; Types: custom full; Languages:
+Name: sound_files_32khz; Description: sound files 32khz (CELT); ExtraDiskSpaceRequired: 82000000; Types: custom full; Languages:
+Name: sound_files_48khz; Description: sound files 48khz (CELT); ExtraDiskSpaceRequired: 119000000; Types: custom full; Languages:
+[Code]
+//variables globales
+var phpVersion: String;
+var apacheVersion: String;
+var path: String;
+var pathWithSlashes: String;
+var page: TInputQueryWizardPage;
+var email: String;
+var smtp: String;
+
+//-----------------------------------------------
+
+procedure expand_sound();
+var execFile: String;
+var myResult: Integer;
+var temppath: String;
+
+begin
+temppath := ExpandConstant('{tmp}');
+execFile := temppath+'\7za.exe';
+Exec(execFile, '',temppath+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+end;
+
+procedure fix_freepbx_paths();
+var srcFile: String;
+var destFile: String;
+var srcContents: String;
+var fspath: String;
+var fspathWithSlashes: String;
+
+begin
+fspath := ExpandConstant('{app}');
+fspathWithSlashes := fspath;
+StringChange (fspathWithSlashes, '\','/');
+
+destFile := fspathWithSlashes+'/wamp/www/freepbx-v3/modules/freeswitch/config/freeswitch.php';
+//destFile := fspathWithSlashes+'/wamp/www/freepbx-v3/freepbx/config/telephony.php';
+//srcFile := fspathWithSlashes+'/wamp/www/freepbx-v3/freepbx/config/telephony.php.install';
+
+//if not FileExists (destFile) then
+//begin
+
+ LoadStringFromFile (destFile, srcContents);
+
+ StringChange (srcContents, '/opt/freeswitch', fspathWithSlashes);
+ StringChange (srcContents, '/usr/local/freeswitch', fspathWithSlashes);
+
+ SaveStringToFile(destFile,srcContents, False);
+//end
+
+//DeleteFile(SrcFile);
+
+end;
+
+//-----------------------------------------------
+
+//procedure qui ferme les eteind les services et ferme wampmanager.exe (si ils existent)
+
+procedure close();
+var batFile: String;
+var myResult: Integer;
+
+begin
+path := ExpandConstant('{app}') + '\wamp';
+batFile := path+'\closewamp.bat';
+Exec(batFile, '',path+'\', SW_HIDE, ewWaitUntilTerminated, myResult);
+
+
+end;
+
+//----------------------------------------------
+
+//procedure qui adapte WAMP aux choix effectu\xE9s lors de l'installation
+
+procedure install_pbx();
+var srcFile: String;
+var destFile: String;
+var srcContents: String;
+var browser: String;
+var winPath: String;
+var mysqlVersion: String;
+var wampserverVersion: String;
+var phpmyadminVersion: String;
+//var sqlitemanagerVersion: String;
+var tmp: String;
+var phpDllCopy: String;
+
+
+begin
+
+//version des applis, \xE0 modifier pour chaque version de WampServer 2
+apacheVersion := '2.2.11';
+phpVersion := '5.3.0' ;
+mysqlVersion := '5.1.36';
+wampserverVersion := '2.0';
+phpmyadminVersion := '3.2.0.1';
+//sqlitemanagerVersion := '1.2.0';
+
+
+path := ExpandConstant('{app}') + '\wamp';
+winPath := ExpandConstant('{win}');
+
+pathWithSlashes := path;
+StringChange (pathWithSlashes, '\','/');
+
+//----------------------------------------------
+// renommage du fichier c:/windows/php.ini
+//----------------------------------------------
+
+if FileExists ('c:/windows/php.ini') then
+begin
+ if MsgBox('A previous php.ini file has been detected in your Windows directory. Do you want WampServer2 to rename it to php_old.ini to avoid conflicts?',mbConfirmation,MB_YESNO) = IDYES then
+ begin
+ RenameFile('c:/windows/php.ini','c:/windows/php_old.ini');
+ end
+end
+
+
+
+
+//----------------------------------------------
+// Fichier install_services.bat
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/install_services.bat';
+srcFile := pathWithSlashes+'/install_services.bat.install';
+
+if not FileExists (pathWithSlashes+'/wampmanager.conf') then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //version de apache et mysql
+ StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
+ StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ //dans le cas d'une upgrade on d\xE9truit le fichier pour qu'il ne soit pas execut\xE9
+ DeleteFile(destFile);
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier install_services_auto.bat
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/install_services_auto.bat';
+srcFile := pathWithSlashes+'/install_services_auto.bat.install';
+
+if not FileExists (pathWithSlashes+'/wampmanager.conf') then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //version de apache et mysql
+ StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
+ StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ //dans le cas d'une upgrade on d\xE9truit le fichier pour qu'il ne soit pas execut\xE9
+ DeleteFile(destFile);
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier uninstall_services_auto.bat
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/uninstall_services.bat';
+srcFile := pathWithSlashes+'/uninstall_services.bat.install';
+
+if not FileExists (pathWithSlashes+'/wampmanager.conf') then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //version de apache et mysql
+ StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
+ StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ //dans le cas d'une upgrade on d\xE9truit le fichier pour qu'il ne soit pas execut\xE9
+ DeleteFile(destFile);
+end
+DeleteFile(SrcFile);
+
+
+
+
+//----------------------------------------------
+// Fichier wampmanager.conf
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/wampmanager.conf';
+srcFile := pathWithSlashes+'/wampmanager.conf.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+
+ //installDir et versions
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPSERVERVERSION', wampserverVersion);
+ StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
+ StringChange (srcContents, 'WAMPMYSQLVERSION', mysqlVersion);
+ StringChange (srcContents, 'WAMPAPACHEVERSION', apacheVersion);
+ StringChange (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion);
+// StringChange (srcContents, 'WAMPSQLITEMANAGERVERSION', sqlitemanagerVersion);
+
+
+
+ //navigateur
+ browser := 'explorer.exe';
+ if FileExists ('C:/Program Files/Mozilla Firefox/firefox.exe') then
+ begin
+ if MsgBox('Firefox has been detected on your computer. Would you like to use it as the default browser with WampServer2?',mbConfirmation,MB_YESNO) = IDYES then
+ begin
+ browser := 'C:/Program Files/Mozilla Firefox/firefox.exe';
+ end
+ end
+ if browser = 'explorer.exe' then
+ begin
+ GetOpenFileName('Please choose your default browser. If you are not sure, just click Open :', browser, winPath,'exe files (*.exe)|*.exe|All files (*.*)|*.*' ,'exe');
+ end
+ StringChange (srcContents, 'WAMPBROWSER', browser);
+ SaveStringToFile(destFile,srcContents, False);
+end
+
+else
+begin
+// changement de wampserverVersion et WampserverVersion pour les upgrades
+end
+
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier wampmanager.ini
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/wampmanager.ini';
+srcFile := pathWithSlashes+'/wampmanager.ini.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+
+ //installDir et versions
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
+ SaveStringToFile(destFile,srcContents, False);
+end
+
+DeleteFile(SrcFile);
+
+
+
+//----------------------------------------------
+// Fichier wampmanager.tpl
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/wampmanager.tpl';
+srcFile := pathWithSlashes+'/wampmanager.tpl.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+end
+
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier alias phpmyadmin
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/alias/phpmyadmin.conf';
+srcFile := pathWithSlashes+'/alias/phpmyadmin.conf.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //installDir et version de phpmyadmin
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ LoadStringFromFile (srcFile, srcContents);
+
+ //installDir et version de phpmyadmin
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPPHPMYADMINVERSION', phpmyadminVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+
+
+ //mise \xE0 jour de la version de phpmyadmin
+ tmp := GetIniString('apps','phpmyadminVersion',phpmyadminVersion,pathWithSlashes+'/wampmanager.conf');
+ if not CompareText(tmp,phpmyadminVersion) = 0 then
+ begin
+ SetIniString('apps','phpmyadminVersion',phpmyadminVersion,pathWithSlashes+'/wampmanager.conf');
+ LoadStringFromFile (destFile, srcContents);
+ StringChange (srcContents, tmp, phpmyadminVersion);
+ SaveStringToFile(destFile,srcContents, False);
+ end
+end
+
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier de configuration de phpmyadmin
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php';
+srcFile := pathWithSlashes+'/apps/phpmyadmin'+phpmyadminVersion+'/config.inc.php.install';
+
+if not FileExists (destFile) then
+begin
+
+// si un fichier existe pour une version precedente de phpmyadmin, on le recupere
+ if FileExists (pathWithSlashes+'/apps/phpmyadmin'+tmp+'/config.inc.php') then
+ begin
+ LoadStringFromFile (pathWithSlashes+'/apps/phpmyadmin'+tmp+'/config.inc.php', srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+ end
+ else
+ begin
+
+// sinon on prends le fichier par defaut
+ LoadStringFromFile (srcFile, srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+ end
+end
+
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier httpd.conf
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/conf/httpd.conf';
+srcFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/conf/httpd.conf.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //installDir et version de php
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPPHPVERSION', phpVersion);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+DeleteFile(SrcFile);
+
+
+
+
+//----------------------------------------------
+// Fichier my.ini
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/bin/mysql/mysql'+mysqlVersion+'/my.ini';
+srcFile := pathWithSlashes+'/bin/mysql/mysql'+mysqlVersion+'/my.ini.install';
+
+if not FileExists (destFile) then
+begin
+
+ LoadStringFromFile (srcFile, srcContents);
+
+ //installDir et version de php
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+
+ SaveStringToFile(destFile,srcContents, False);
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// Fichier index.php
+//----------------------------------------------
+
+destFile := pathWithSlashes+'/www/index.php';
+srcFile := pathWithSlashes+'/www/index.php.install';
+
+if not FileExists (destFile) then
+begin
+ LoadStringFromFile (srcFile, srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+end
+else
+begin
+ if MsgBox('Would you like to install the new WampServer 2 homepage? (this will overwrite exisiting index.php file)',mbConfirmation,MB_YESNO) = IDYES then
+ begin
+ DeleteFile (destFile);
+ LoadStringFromFile (srcFile, srcContents);
+ SaveStringToFile(destFile,srcContents, False);
+ end
+end
+DeleteFile(SrcFile);
+
+
+
+
+
+//----------------------------------------------
+// Fichier php.ini
+//----------------------------------------------
+destFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini';
+
+if not FileExists (destFile) then
+begin
+ page := CreateInputQueryPage(wpInstalling,
+ 'PHP mail parameters', '',
+ 'Please specify the SMTP server and the adresse mail to be used by PHP when using the function mail(). If you are not sure, just leave the default values.');
+
+ page.Add('SMTP:', False);
+ page.Add('Email:', False);
+
+ // Valeurs par defaut
+ page.Values[0] := 'localhost';
+ page.Values[1] := 'you@yourdomain';
+ SaveStringToFile(pathWithSlashes+'/mailtag','tag', False);
+end
+
+
+
+//----------------------------------------------
+// copie des dll de php vers apache
+//----------------------------------------------
+
+phpDllCopy := 'fdftk.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'fribidi.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'gds32.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libeay32.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libmhash.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libmysql.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'msql.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libmysqli.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'ntwdblib.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'php5activescript.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'php5isapi.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'php5nsapi.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'ssleay32.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'yaz.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'libmcrypt.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+phpDllCopy := 'php5ts.dll';
+filecopy (pathWithSlashes+'/bin/php/php'+phpVersion+'/'+phpDllCopy, pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/'+phpDllCopy, False);
+
+end;
+
+
+
+
+//-----------------------------------------------------------
+// gestion des fichiers php.ini
+
+procedure CurPageChanged(CurPageID: Integer);
+var destFile: String;
+var srcFile: String;
+var srcContents: String;
+begin
+ if CurPageID = 14 then
+ begin
+ if FileExists (pathWithSlashes+'/mailtag') then
+ begin
+ smtp := page.Values[0];
+ email := page.Values[1];
+ DeleteFile(pathWithSlashes+'/mailtag');
+ end
+ destFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini';
+ srcFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/php.ini.install';
+ LoadStringFromFile (srcFile, srcContents);
+ StringChange (srcContents, 'WAMPROOT', pathWithSlashes);
+ StringChange (srcContents, 'WAMPSMTP', smtp);
+ StringChange (srcContents, 'WAMPEMAIL', email);
+
+//----------------------------------------------
+// fichier php.ini dans php
+//----------------------------------------------
+
+
+
+ if not FileExists (destFile) then
+ begin
+ SaveStringToFile(destFile,srcContents, False);
+ end
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// fichier phpForApache.ini dans php
+//----------------------------------------------
+
+
+
+ destFile := pathWithSlashes+'/bin/php/php'+phpVersion+'/phpForApache.ini';
+ if not FileExists (destFile) then
+ begin
+ SaveStringToFile(destFile,srcContents, False);
+ end
+
+
+
+
+
+
+
+
+
+
+//----------------------------------------------
+// fichier php.ini dans apache
+//----------------------------------------------
+
+
+
+ destFile := pathWithSlashes+'/bin/apache/apache'+apacheVersion+'/bin/php.ini';
+ if not FileExists (destFile) then
+ begin
+ SaveStringToFile(destFile,srcContents, False);
+ end
+
+ end
+
+ DeleteFile(SrcFile);
+
+
+
+
+
+
+//MsgBox(tmp,mbConfirmation,MB_YESNO);
+end;
+
+
+
+
+
+//-----------------------------------------------
+
+//procedure lanc\xE9e \xE0 la fin de l'installation, elle supprime les fichiers d'installation
+
+procedure DeinitializeSetup();
+
+begin
+ DeleteFile(path+'\install_services.bat');
+ DeleteFile(path+'\install_services_auto.bat');
+ DeleteFile(path+'\expsound.bat');
+ DeleteFile(path+'..\create_freepbx.bat');
+ DeleteFile(path+'..\create_fusionbx.bat');
+end;
+
+
+
+//-----------------------------------------------
+
+//procedure lanc\xE9e au d\xE9but de l'installation, elle alerte sur les upgrades de WampServer
+
+//function InitializeSetup(): Boolean;
+//begin
+// Result := MsgBox('Important Information:' #13#13 'Please do not try to upgrade from WAMP5 1.x.' #13 ' If you have WAMP5 1.x installed, save your data, uninstall WAMP5 ' #13 'and delete the wamp folder before installing this new release. ' #13#13 'Do you want to continue install?', mbConfirmation, MB_YESNO) = idYes;
+//end;
+// Function generated by ISTool.
+function NextButtonClick(CurPage: Integer): Boolean;
+begin
+        Result := istool_download(CurPage);
+end;
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfsguiiss"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/fsgui.iss</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupfsguiissfromrev15700freeswitchtrunkw32Setupinno_setupfsguiiss"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/fsgui.iss (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/fsgui.iss) (0 => 15701)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/fsgui.iss         (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/fsgui.iss        2009-11-29 03:39:49 UTC (rev 15701)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+; Script generated by the Inno Setup Script Wizard.
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application.
+; Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+;AppId={{ED55656F-D567-4B3D-A0B9-617CAB13D519}
+AppName=FsGui
+AppVerName=FsGui svn 15668
+AppPublisherURL=http://wiki.freeswitch.org/wiki/Fsgui
+AppSupportURL=http://wiki.freeswitch.org/wiki/Fsgui
+AppUpdatesURL=http://wiki.freeswitch.org/wiki/Fsgui
+DefaultDirName=C:\FreeSWITCH
+DefaultGroupName=FreeSWITCH
+SetupIconFile=freeswitch.ico
+OutputBaseFilename=fsgui
+Compression=lzma
+SolidCompression=yes
+OutputDir=Output
+
+[Languages]
+Name: english; MessagesFile: compiler:Default.isl
+
+[Tasks]
+Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
+
+[Files]
+
+Source: freeswitch.ico; DestDir: {app}
+Source: G:\freeswitch_dev\contrib\jmesquita\fsgui\bin\fsgui.exe; DestDir: {app}; Flags: ignoreversion
+Source: G:\freeswitch_dev\contrib\jmesquita\fsgui\bin\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs onlyifdoesntexist
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files
+
+[Icons]
+Name: {group}\FsGui; Filename: {app}\fsgui.exe; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}\plugins
+Name: {commondesktop}\FsGui; Filename: {app}\fsgui.exe; Tasks: desktopicon; IconFilename: {app}\freeswitch.ico; IconIndex: 0; WorkingDir: {app}\plugins
+
+[Run]
+Filename: {app}\fsgui.exe; Description: {cm:LaunchProgram,FsGui}; Flags: nowait postinstall skipifsilent
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupvcredist_x64exe"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/vcredist_x64.exe</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupvcredist_x64exefromrev15700freeswitchtrunkw32Setupinno_setupvcredist_x64exe"></a>
<div class="binary"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/vcredist_x64.exe (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/vcredist_x64.exe)</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupvcredist_x86exe"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/vcredist_x86.exe</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branchw32Setupinno_setupvcredist_x86exefromrev15700freeswitchtrunkw32Setupinno_setupvcredist_x86exe"></a>
<div class="binary"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch/w32/Setup/inno_setup/vcredist_x86.exe (from rev 15700, freeswitch/trunk/w32/Setup/inno_setup/vcredist_x86.exe)</h4>
<pre class="diff"><span>
<span class="cx">(Binary files differ)
</span></span></pre></div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>