<!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][15705] </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=15705">15705</a></dd>
<dt>Author</dt> <dd>joshrivers</dd>
<dt>Date</dt> <dd>2009-11-28 23:19:09 -0600 (Sat, 28 Nov 2009)</dd>
</dl>

<h3>Log Message</h3>
<pre>Updating branch to HEAD. Hopefully correct merge this time.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairFreeswitch2008sln">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/Freeswitch.2008.sln</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairMakefileam">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/Makefile.am</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairbuildmodmakerulesin">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/build/modmake.rules.in</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangenvmsoundsxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/en/vm/sounds.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangruvmsoundsxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/vm/sounds.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconfsip_profilesexternalxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/external.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconfsip_profilesinternalipv6xml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/internal-ipv6.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconfsip_profilesinternalxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/internal.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconfvarsxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/vars.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconfigurein">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/configure.in</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairdocsphrasephrase_enxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/docs/phrase/phrase_en.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairfreeswitchspec">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/freeswitch.spec</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsaprconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/apr/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsaprutilconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/apr-util/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsbroadvoiceconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/broadvoice/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibscurlconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/curl/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibseslperlloggerpl">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/esl/perl/logger.pl</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibseslsrceslc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/esl/src/esl.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsiksemelconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/iksemel/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsilbcconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/ilbc/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsjsMakefilein">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/Makefile.in</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsjsconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsjsnsprpubconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/nsprpub/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsjsnsprpubconfigurein">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/nsprpub/configure.in</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibdingalingconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libdingaling/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibeditconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libedit/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibsndfileconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibteletoneconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libteletone/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibspcreconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/pcre/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsportaudioconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/portaudio/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibssofiasipconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/sofia-sip/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsspandspconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/spandsp/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsspandspsrcgsm0610_rpec">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/spandsp/src/gsm0610_rpe.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsspeexconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/speex/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibssqliteconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/sqlite/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibssrtpconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/srtp/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibstiff382configuregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/tiff-3.8.2/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsunimrcpconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/unimrcp/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsxmlrpccconfiguregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/xmlrpc-c/configure.gnu</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcincludeswitch_callerh">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_caller.h</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcincludeswitch_coreh">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_core.h</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcincludeswitch_typesh">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_types.h</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcincludeswitch_utilsh">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_utils.h</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodMakefileam">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/Makefile.am</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodapplicationsmod_cidlookupmod_cidlookupc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_cidlookup/mod_cidlookup.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodapplicationsmod_commandsmod_commandsc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_commands/mod_commands.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodapplicationsmod_lcrmod_lcrc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_lcr/mod_lcr.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodapplicationsmod_limitmod_limitc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_limit/mod_limit.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodapplicationsmod_voicemailmod_voicemailc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_voicemail/mod_voicemail.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_portaudiomod_portaudioc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_portaudio/mod_portaudio.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_skypiaxskypiax_protocolc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_skypiax/skypiax_protocol.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiamod_sofiac">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/mod_sofia.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiamod_sofiah">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/mod_sofia.h</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiasofiac">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiasofia_gluec">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia_glue.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiasofia_regc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia_reg.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodevent_handlersmod_event_socketmod_event_socketc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/event_handlers/mod_event_socket/mod_event_socket.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodlanguagesmod_spidermonkeysmmak">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/languages/mod_spidermonkey/sm.mak</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodlanguagesmod_spidermonkey_core_dbmod_spidermonkey_core_dbc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_callerc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_caller.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_core_memoryc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_core_memory.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_core_sqldbc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_core_sqldb.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_ivr_asyncc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_ivr_async.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_ivr_bridgec">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_ivr_bridge.c</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_rtpc">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_rtp.c</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/</li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirsoundsxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/sounds.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirttsxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/tts.xml</a></li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/dvarnes/</li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/dvarnes/java/</li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/dvarnes/java/esl-client/</li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/</li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfREADME">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/README</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfemail2pdf">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/email2pdf</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfheaderhtml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/header.html</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibg722_1configuregnu">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libg722_1/configure.gnu</a></li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/</li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupFreePBXurl">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FreePBX.url</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupFusionPBXurl">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FusionPBX.url</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_freepbxbat">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_freepbxsql">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.sql</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_fusionpbxbat">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_fusionpbxsql">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.sql</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupexpsoundbat">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/expsound.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreepbxico">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freepbx.ico</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitchico">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch.ico</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitch_104iss">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_1.0.4.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitch_freepbx_fusionpbxiss">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfsguiiss">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/fsgui.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupvcredist_x64exe">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/vcredist_x64.exe</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupvcredist_x86exe">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/vcredist_x86.exe</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirsoundsxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/sounds.xml</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirttsxml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/tts.xml</a></li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/dvarnes/java/</li>
<li>freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/dvarnes/java/esl-client/</li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfREADME">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/README</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfemail2pdf">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/email2pdf</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfheaderhtml">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/header.html</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibsndfileM4ltoptionsm4">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/M4/ltoptions.m4</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibsndfileM4ltsugarm4">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/M4/ltsugar.m4</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibsndfileM4ltversionm4">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/M4/ltversion.m4</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairlibstiff382configinstallsh">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/tiff-3.8.2/config/install-sh</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupFreePBXurl">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FreePBX.url</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupFusionPBXurl">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FusionPBX.url</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_freepbxbat">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_freepbxsql">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.sql</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_fusionpbxbat">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_fusionpbxsql">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.sql</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupexpsoundbat">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/expsound.bat</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreepbxico">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freepbx.ico</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitchico">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch.ico</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitch_104iss">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_1.0.4.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitch_freepbx_fusionpbxiss">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfsguiiss">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/fsgui.iss</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupvcredist_x64exe">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/vcredist_x64.exe</a></li>
<li><a href="#freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupvcredist_x86exe">freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/vcredist_x86.exe</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairFreeswitch2008sln"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/Freeswitch.2008.sln (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/Freeswitch.2008.sln        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/Freeswitch.2008.sln        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1022,6 +1022,9 @@
</span><span class="cx"> Project(&quot;{2150E333-8FDC-42A3-9474-1A3956D46DE8}&quot;) = &quot;unimrcp&quot;, &quot;unimrcp&quot;, &quot;{62F27B1A-C919-4A70-8478-51F178F3B18F}&quot;
</span><span class="cx"> EndProject
</span><span class="cx"> Project(&quot;{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}&quot;) = &quot;aprtoolkit&quot;, &quot;libs\unimrcp\libs\apr-toolkit\aprtoolkit.2008.vcproj&quot;, &quot;{13DEECA0-BDD4-4744-A1A2-8EB0A44DF3D2}&quot;
</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(&quot;{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}&quot;) = &quot;mpf&quot;, &quot;libs\unimrcp\libs\mpf\mpf.2008.vcproj&quot;, &quot;{B5A00BFA-6083-4FAE-A097-71642D6473B5}&quot;
</span><span class="cx"> EndProject
</span><span class="lines">@@ -1036,6 +1039,9 @@
</span><span class="cx"> Project(&quot;{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}&quot;) = &quot;unirtsp&quot;, &quot;libs\unimrcp\libs\uni-rtsp\unirtsp.2008.vcproj&quot;, &quot;{504B3154-7A4F-459D-9877-B951021C3F1F}&quot;
</span><span class="cx"> EndProject
</span><span class="cx"> Project(&quot;{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}&quot;) = &quot;mrcpsofiasip&quot;, &quot;libs\unimrcp\modules\mrcp-sofiasip\mrcpsofiasip.2008.vcproj&quot;, &quot;{746F3632-5BB2-4570-9453-31D6D58A7D8E}&quot;
</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(&quot;{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}&quot;) = &quot;mrcpunirtsp&quot;, &quot;libs\unimrcp\modules\mrcp-unirtsp\mrcpunirtsp.2008.vcproj&quot;, &quot;{DEB01ACB-D65F-4A62-AED9-58C1054499E9}&quot;
</span><span class="cx"> EndProject
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairMakefileam"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/Makefile.am (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/Makefile.am        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/Makefile.am        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -162,14 +162,14 @@
</span><span class="cx"> libs/libteletone/src/libteletone.h\
</span><span class="cx"> src/include/switch_odbc.h
</span><span class="cx"> 
</span><del>-CORE_CFLAGS     = `$(switch_srcdir)/libs/apr/apr-1-config --cflags --cppflags --includes`
-CORE_CFLAGS    += `$(switch_srcdir)/libs/apr-util/apu-1-config --includes`
</del><ins>+CORE_CFLAGS     = `$(switch_builddir)/libs/apr/apr-1-config --cflags --cppflags --includes`
+CORE_CFLAGS    += `$(switch_builddir)/libs/apr-util/apu-1-config --includes`
</ins><span class="cx"> CORE_CFLAGS    += -I$(switch_srcdir)/libs/stfu
</span><span class="cx"> CORE_CFLAGS    += -I$(switch_srcdir)/libs/sqlite
</span><span class="cx"> CORE_CFLAGS    += -I$(switch_srcdir)/libs/pcre
</span><del>-CORE_CFLAGS    += -I$(switch_srcdir)/libs/speex/include
</del><ins>+CORE_CFLAGS    += -I$(switch_srcdir)/libs/speex/include -Ilibs/speex/include
</ins><span class="cx"> CORE_CFLAGS    += -I$(switch_srcdir)/libs/srtp/include
</span><del>-CORE_CFLAGS    += -I$(switch_srcdir)/libs/srtp/crypto/include
</del><ins>+CORE_CFLAGS    += -I$(switch_srcdir)/libs/srtp/crypto/include -Ilibs/srtp/crypto/include
</ins><span class="cx"> 
</span><span class="cx"> CORE_LIBS      = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la
</span><span class="cx"> CORE_LIBS     += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la
</span><span class="lines">@@ -192,22 +192,22 @@
</span><span class="cx"> fs_cli_SOURCES = libs/esl/src/esl.c libs/esl/src/esl_config.c libs/esl/src/esl_event.c libs/esl/src/esl_threadmutex.c libs/esl/fs_cli.c
</span><span class="cx"> freeswitch_SOURCES = src/switch.c
</span><span class="cx"> nodist_freeswitch_SOURCES = src/include/switch_version.h
</span><del>-fs_cli_CFLAGS = $(AM_CFLAGS) -Ilibs/esl/src/include 
</del><ins>+fs_cli_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include 
</ins><span class="cx"> fs_cli_LDFLAGS = $(AM_LDFLAGS) -lpthread $(ESL_LDFLAGS)
</span><del>-fs_ivrd_CFLAGS = $(AM_CFLAGS) -Ilibs/esl/src/include 
</del><ins>+fs_ivrd_CFLAGS = $(AM_CFLAGS) -I$(switch_srcdir)/libs/esl/src/include 
</ins><span class="cx"> fs_ivrd_LDFLAGS = $(AM_LDFLAGS) -lpthread $(ESL_LDFLAGS)
</span><span class="cx"> freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS)
</span><span class="cx"> freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
</span><span class="cx"> freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
</span><span class="cx"> if ADD_LIBEDIT
</span><del>-fs_cli_CFLAGS += -DHAVE_EDITLINE -Ilibs/libedit/src
</del><ins>+fs_cli_CFLAGS += -DHAVE_EDITLINE -I$(switch_srcdir)/libs/libedit/src
</ins><span class="cx"> fs_cli_LDADD = libs/libedit/src/.libs/libedit.a
</span><span class="cx"> freeswitch_CFLAGS    += -Ilibs/libedit/src -DSWITCH_HAVE_LIBEDIT
</span><span class="cx"> freeswitch_LDADD      += libs/libedit/src/.libs/libedit.a
</span><span class="cx"> endif
</span><span class="cx"> 
</span><span class="cx"> if ADD_LIBEDIT
</span><del>-CORE_CFLAGS    += -Ilibs/libedit/src -DSWITCH_HAVE_LIBEDIT
</del><ins>+CORE_CFLAGS    += -I$(switch_srcdir)/libs/libedit/src -DSWITCH_HAVE_LIBEDIT
</ins><span class="cx"> CORE_LIBS      += libs/libedit/src/.libs/libedit.a
</span><span class="cx"> endif
</span><span class="cx"> 
</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&gt;/dev/null | grep -v &quot;^#&quot; &gt; 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&gt;/dev/null | grep -v &quot;^#&quot; &gt; 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 &amp;&amp; $(MAKE)
</span><span class="lines">@@ -282,7 +282,7 @@
</span><span class="cx"> .version:
</span><span class="cx">         touch .version
</span><span class="cx"> 
</span><del>-src/include/switch_version.h: $(top_srcdir)/src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
</del><ins>+src/include/switch_version.h: $(switch_builddir)/src/include/switch_version.h.in .version $(libfreeswitch_la_SOURCES) $(library_include_HEADERS)
</ins><span class="cx">         @have_version=1 ; \
</span><span class="cx">         force=0 ; \
</span><span class="cx">         grep &quot;@SWITCH_VERSION_REVISION@&quot; src/include/switch_version.h.in &gt; /dev/null  &amp;&amp; have_version=0 ; \
</span><span class="lines">@@ -491,12 +491,12 @@
</span><span class="cx">             -e &quot;s,@INSTALL\@,$(INSTALL),&quot; \
</span><span class="cx">             -e &quot;s,@MKINSTALLDIRS\@,$(mkdir_p),&quot; \
</span><span class="cx">             \
</span><del>-            -e &quot;s|@CFLAGS\@|$(CFLAGS) `$(switch_srcdir)/libs/apr/apr-1-config --cflags --cppflags`|&quot; \
</del><ins>+            -e &quot;s|@CFLAGS\@|$(CFLAGS) `./libs/apr/apr-1-config --cflags --cppflags`|&quot; \
</ins><span class="cx">             -e &quot;s|@INCLUDES\@|-I$(PREFIX)/include|&quot; \
</span><span class="cx">             -e &quot;s|@SOLINK\@|$(SOLINK)|&quot; \
</span><span class="cx">             -e &quot;s|@LDFLAGS\@|-L$(PREFIX)/lib|&quot; \
</span><del>-            -e &quot;s|@LIBS\@|`$(switch_srcdir)/libs/apr/apr-1-config --libs` `$(switch_srcdir)/libs/apr-util/apu-1-config --libs`|&quot; \
-            scripts/fsxs.in &gt; scripts/fsxs
</del><ins>+            -e &quot;s|@LIBS\@|`./libs/apr/apr-1-config --libs` `./libs/apr-util/apu-1-config --libs`|&quot; \
+            $(top_srcdir)/scripts/fsxs.in &gt; scripts/fsxs
</ins><span class="cx"> 
</span><span class="cx"> eclean: clean
</span><span class="cx">         rm -f `find . -type f -name \*~`
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairbuildmodmakerulesin"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/build/modmake.rules.in (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/build/modmake.rules.in        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/build/modmake.rules.in        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -20,7 +20,7 @@
</span><span class="cx"> LIBCURL=@LIBCURL@
</span><span class="cx"> LIBCURL_CPPFLAGS=@LIBCURL_CPPFLAGS@
</span><span class="cx"> CURL_DIR=$(switch_srcdir)/libs/curl
</span><del>-CURLLA=$(CURL_DIR)/lib/libcurl.la
</del><ins>+CURLLA=$(switch_builddir)/libs/curl/lib/libcurl.la
</ins><span class="cx"> 
</span><span class="cx"> OPENSSL_LIBS=@openssl_LIBS@
</span><span class="cx"> OPENSSL_CFLAGS=@openssl_CFLAGS@
</span><span class="lines">@@ -50,14 +50,14 @@
</span><span class="cx"> LTCXXCOMPILE = $(LIBTOOL) --mode=compile --tag=CXX $(CXXCOMPILE)
</span><span class="cx"> CXXLINK = $(LIBTOOL) --mode=link --tag=CXX $(CXXLD) $(ALL_CXXFLAGS) $(LDFLAGS) -shared -module -avoid-version -rpath $(MODINSTDIR) -o $@
</span><span class="cx"> 
</span><del>-CSOURCEFILE=$(MODNAME).c
-CXXSOURCEFILE=$(MODNAME).cpp
</del><ins>+CSOURCEFILE=$(MODDIR)/$(MODNAME).c
+CXXSOURCEFILE=$(MODDIR)/$(MODNAME).cpp
</ins><span class="cx"> TOUCH_TARGET=@TOUCH_TARGET@
</span><span class="cx"> 
</span><span class="cx"> #MAKE_OPTS = `if test -z &quot;$(VERBOSE)&quot; ; then $(MAKE) --help | grep silent | grep &quot;\-s&quot; 2&gt;&amp;1 &gt;/dev/null &amp;&amp; echo -s;fi`
</span><span class="cx"> MAKE_OPTS = `test -n &quot;$(VERBOSE)&quot; || echo -s`
</span><span class="cx"> RECURSE_MODNAME=`pwd | sed -e 's|^.*/||'`
</span><del>-RECURSE_SOURCEFILE=`if test -f $$modname.cpp; then echo $$modname.cpp; else echo $$modname.c; fi`
</del><ins>+RECURSE_SOURCEFILE=`if test -f &quot;$(MODDIR)/$$modname.cpp&quot;; then echo &quot;$(MODDIR)/$$modname.cpp&quot;; else echo &quot;$(MODDIR)/$$modname.c&quot;; fi`
</ins><span class="cx"> RECURSE_OUR_DEPS=`test -z &quot;$(WANT_CURL)&quot; || if test ! -z &quot;$(LIBCURL_DEPS)&quot;; then echo $(CURLLA); fi `
</span><span class="cx"> RECURSE_OUR_CFLAGS=`test -z &quot;$(WANT_CURL)&quot; || echo $(LIBCURL_CPPFLAGS) ; $(LOCAL_INSERT_CFLAGS) `
</span><span class="cx"> RECURSE_OUR_LDFLAGS=`test -z &quot;$(WANT_CURL)&quot; || echo $(LIBCURL) ; $(LOCAL_INSERT_LDFLAGS) `
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">                 ourcflags=&quot;$(RECURSE_OUR_CFLAGS)&quot; ; \
</span><span class="cx">                 ourldflags=&quot;$(RECURSE_OUR_LDFLAGS)&quot; ; \
</span><span class="cx">                 insertobjs=&quot;`$(LOCAL_INSERT_OBJS)`&quot; ; \
</span><del>-                $(MAKE) $(MAKE_OPTS) MODNAME=&quot;$$modname&quot; SOURCEFILE=&quot;$$sourcefile&quot; \
</del><ins>+                $(MAKE) $(MAKE_OPTS) MODNAME=&quot;$$modname&quot; SOURCEFILE=&quot;$$sourcefile&quot; MODDIR=&quot;$(MODDIR)&quot; \
</ins><span class="cx">                         OUR_DEPS=&quot;$$ourdefs&quot; OUR_CFLAGS=&quot;$$ourcflags&quot; OUR_LDFLAGS=&quot;$$ourldflags&quot; OUR_OBJS=&quot;$$insertobjs&quot;
</span><span class="cx"> 
</span><span class="cx"> all: Makefile
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx"> 
</span><span class="cx"> Makefile:
</span><span class="cx">         @if test ! -f $@; then \
</span><del>-          if ! pwd | grep $(switch_srcdir)/src/mod ; then rulesdir=$(switch_srcdir) ; else rulesdir=../../../.. ; fi ; \
</del><ins>+          if ! pwd | grep $(switch_builddir)/src/mod ; then rulesdir=$(switch_builddir) ; else rulesdir=../../../.. ; fi ; \
</ins><span class="cx">           echo BASE=$$rulesdir &gt; Makefile ; \
</span><span class="cx">           echo 'include $$(BASE)/build/modmake.rules' &gt;&gt; Makefile ; \
</span><span class="cx">         fi ;
</span><span class="lines">@@ -164,7 +164,8 @@
</span><span class="cx">         @$(LTCXXCOMPILE) -c -o $@ $&lt; || exit 1
</span><span class="cx"> 
</span><span class="cx"> $(MODNAME).o $(MODNAME).lo: $(SOURCEFILE) \
</span><del>-  $(switch_srcdir)/src/include/switch.h $(switch_srcdir)/src/include/switch_am_config.h \
</del><ins>+  $(switch_srcdir)/src/include/switch.h \
+  $(switch_builddir)/src/include/switch_am_config.h \
</ins><span class="cx">   $(switch_srcdir)/src/include/switch_types.h $(switch_srcdir)/src/include/switch_apr.h \
</span><span class="cx">   $(switch_srcdir)/src/include/switch_core_db.h $(switch_srcdir)/src/include/switch_regex.h \
</span><span class="cx">   $(switch_srcdir)/src/include/switch_core.h $(switch_srcdir)/src/include/switch_loadable_module.h \
</span><span class="lines">@@ -179,7 +180,7 @@
</span><span class="cx"> 
</span><span class="cx"> $(switch_srcdir)/src/include/switch.h:
</span><span class="cx"> 
</span><del>-$(switch_srcdir)/src/include/switch_am_config.h:
</del><ins>+$(switch_builddir)/src/include/switch_am_config.h: $(switch_srcdir)/src/include/switch_am_config.h.in
</ins><span class="cx"> 
</span><span class="cx"> $(switch_srcdir)/src/include/switch_types.h:
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangenvmsoundsxml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/en/vm/sounds.xml (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/en/vm/sounds.xml        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/en/vm/sounds.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">   &lt;macro name=&quot;voicemail_hello&quot;&gt;
</span><span class="cx">     &lt;input pattern=&quot;(.*)&quot;&gt;
</span><span class="cx">       &lt;match&gt;
</span><del>-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-hello.wav&quot;/&gt;
</del><ins>+        &lt;!--&lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-hello.wav&quot;/&gt; --&gt;
</ins><span class="cx">       &lt;/match&gt;
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">   &lt;/macro&gt;
</span><span class="lines">@@ -56,7 +56,6 @@
</span><span class="cx">         &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;items&quot;/&gt;
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-$2.wav&quot;/&gt; 
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-message.wav&quot;/&gt;
</span><del>-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-in_folder.wav&quot;/&gt;
</del><span class="cx">       &lt;/match&gt;
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">     &lt;input pattern=&quot;^(\d+):(.*)$&quot;&gt;
</span><span class="lines">@@ -65,7 +64,6 @@
</span><span class="cx">         &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;items&quot;/&gt;
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-$2.wav&quot;/&gt; 
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-messages.wav&quot;/&gt;
</span><del>-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-in_folder.wav&quot;/&gt;
</del><span class="cx">       &lt;/match&gt;
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">   &lt;/macro&gt;
</span><span class="lines">@@ -89,7 +87,6 @@
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">   &lt;/macro&gt;
</span><span class="cx"> 
</span><del>-
</del><span class="cx">   &lt;macro name=&quot;voicemail_config_menu&quot;&gt;
</span><span class="cx">     &lt;input pattern=&quot;^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$&quot;&gt;
</span><span class="cx">       &lt;match&gt;
</span><span class="lines">@@ -112,7 +109,6 @@
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">   &lt;/macro&gt;
</span><span class="cx"> 
</span><del>-
</del><span class="cx">   &lt;macro name=&quot;voicemail_record_name&quot;&gt;
</span><span class="cx">     &lt;input pattern=&quot;^(.*)$&quot;&gt;
</span><span class="cx">       &lt;match&gt;
</span><span class="lines">@@ -182,7 +178,7 @@
</span><span class="cx">   &lt;/macro&gt;
</span><span class="cx"> 
</span><span class="cx">   &lt;macro name=&quot;voicemail_listen_file_check&quot;&gt;
</span><del>-    &lt;input pattern=&quot;^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$&quot;&gt;
</del><ins>+    &lt;input pattern=&quot;^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$&quot;&gt;
</ins><span class="cx">       &lt;match&gt;
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-listen_to_recording.wav&quot;/&gt;
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
</span><span class="lines">@@ -204,6 +200,25 @@
</span><span class="cx">         &lt;action function=&quot;say&quot; data=&quot;$6&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
</span><span class="cx">       &lt;/match&gt;
</span><span class="cx">     &lt;/input&gt;
</span><ins>+    &lt;input pattern=&quot;^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$&quot;&gt;
+      &lt;match&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-listen_to_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-save_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-delete_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$3&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-return_call.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$5&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-to_forward.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$6&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+      &lt;/match&gt;
+    &lt;/input&gt;
</ins><span class="cx">   &lt;/macro&gt;
</span><span class="cx"> 
</span><span class="cx">   &lt;macro name=&quot;voicemail_choose_greeting&quot;&gt;
</span><span class="lines">@@ -363,7 +378,4 @@
</span><span class="cx">       &lt;/match&gt;
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">   &lt;/macro&gt;
</span><del>-
-
-
</del><span class="cx"> &lt;/include&gt;&lt;!--This line will be ignored it's here to validate the xml and is optional --&gt;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirfromrev15704freeswitchtrunkconflangrudir"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir (from rev 15704, freeswitch/trunk/conf/lang/ru/dir)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirsoundsxml"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/sounds.xml</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirsoundsxmlfromrev15704freeswitchtrunkconflangrudirsoundsxml"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/sounds.xml (from rev 15704, freeswitch/trunk/conf/lang/ru/dir/sounds.xml) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/sounds.xml                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/sounds.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -0,0 +1,121 @@
</span><ins>+&lt;include&gt;&lt;!--This line will be ignored it's here to validate the xml and is optional --&gt;
+        &lt;macro name=&quot;directory_intro&quot;&gt;
+                &lt;input pattern=&quot;^(last_name)&quot; break_on_match=&quot;false&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-enter-person.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-last_name.wav&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+                &lt;input pattern=&quot;^(first_name)&quot; break_on_match=&quot;false&quot;&gt;
+                        &lt;match&gt;
+                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-enter-person.wav&quot;/&gt;
+                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-first_name.wav&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+                &lt;input pattern=&quot;^(last_name):([0-9#*])$&quot; break_on_match=&quot;false&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-to_search_by.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-first_name.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-press.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+                &lt;input pattern=&quot;^(first_name):([0-9#*])$&quot; break_on_match=&quot;false&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-to_search_by.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-last_name.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-press.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_min_search_digits&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-specify_mininum_first.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;items&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-letters_of_person_name.wav&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_count&quot;&gt;
+                &lt;input pattern=&quot;^0$&quot; break_on_match=&quot;true&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-no_match_entry.wav&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;items&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-result_match.wav&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_count_too_large&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-to_many_result.wav&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_last&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-no_more_result.wav&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_item&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-result_number.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;items&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_at&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-at_extension.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_menu&quot;&gt;
+                &lt;input pattern=&quot;^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-to_select_entry.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-press.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-for_next.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-press.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-for_prev.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-press.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$3&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-to_make_new_search.wav&quot;/&gt;
+                                &lt;action function=&quot;play-file&quot; data=&quot;directory/dir-press.wav&quot;/&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$4&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_say_name&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+&lt;/include&gt;&lt;!--This line will be ignored it's here to validate the xml and is optional --&gt;
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirttsxml"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/tts.xml</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangrudirttsxmlfromrev15704freeswitchtrunkconflangrudirttsxml"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/tts.xml (from rev 15704, freeswitch/trunk/conf/lang/ru/dir/tts.xml) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/tts.xml                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/dir/tts.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -0,0 +1,96 @@
</span><ins>+&lt;include&gt;&lt;!--This line will be ignored it's here to validate the xml and is optional --&gt;
+
+        &lt;macro name=&quot;directory_intro&quot;&gt;
+                &lt;input pattern=&quot;^(last_name)&quot; break_on_match=&quot;false&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;Please enter the first few digit of the person last name&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+                &lt;input pattern=&quot;^(first_name)&quot; break_on_match=&quot;false&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;Please enter the first few digit of the person first name&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+                &lt;input pattern=&quot;^(last_name):([0-9#*])$&quot; break_on_match=&quot;false&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;to search by first name, press $2&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+                &lt;input pattern=&quot;^(first_name):([0-9#*])$&quot; break_on_match=&quot;false&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;to search by last name, press $2&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_min_search_digits&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;You need to specify a minimum the first $1 letters of the person name, try again.&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_count&quot;&gt;
+                &lt;input pattern=&quot;^0$&quot; break_on_match=&quot;true&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;Your search match no user on this system, try again.&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;$1 result match your search&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_count_too_large&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;Your search returned too many result, please try again&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_last&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;No more result&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_item&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;Result number $1&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_menu&quot;&gt;
+                &lt;input pattern=&quot;^([0-9#*]),([0-9#*]),([0-9#*]),([0-9#*])$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;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&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+        &lt;macro name=&quot;directory_result_at&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;at extension $1&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+        &lt;macro name=&quot;directory_result_say_name&quot;&gt;
+                &lt;input pattern=&quot;^(.*)$&quot;&gt;
+                        &lt;match&gt;
+                                &lt;action function=&quot;speak-text&quot; data=&quot;$1&quot;/&gt;
+                        &lt;/match&gt;
+                &lt;/input&gt;
+        &lt;/macro&gt;
+
+&lt;/include&gt;&lt;!--This line will be ignored it's here to validate the xml and is optional --&gt;
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconflangruvmsoundsxml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/vm/sounds.xml (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/vm/sounds.xml        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/lang/ru/vm/sounds.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx">         &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;MESSAGES&quot;/&gt;
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-$2.wav&quot;/&gt; 
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-message.wav&quot;/&gt;
</span><del>-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-in_folder.wav&quot;/&gt;
</del><ins>+&lt;!--        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-in_folder.wav&quot;/&gt;--&gt;
</ins><span class="cx">       &lt;/match&gt;
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">     &lt;!-- Ð¾Ñ‚ 10 Ð´Ð¾ 19 Ð¸ Ð½Ð¾Ð»ÑŒ   --&gt; &lt;!-- Ð¾Ñ‚ 5до 9 Ð¸ Ð±Ð¾Ð»ÑŒÑˆÐµ 20-ти 25-29   --&gt;
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx">         &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;MESSAGES&quot;/&gt;
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-$2x.wav&quot;/&gt; 
</span><span class="cx">         &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-messagex.wav&quot;/&gt;
</span><del>-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-in_folder.wav&quot;/&gt;
</del><ins>+&lt;!--        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-in_folder.wav&quot;/&gt;--&gt;
</ins><span class="cx">       &lt;/match&gt;
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">     &lt;input pattern=&quot;^(\d+[0,2-9][2-4]|[2-9][2-4]|[2-4]):(.*)$&quot;&gt; 
</span><span class="lines">@@ -193,26 +193,45 @@
</span><span class="cx">   &lt;/macro&gt;
</span><span class="cx"> 
</span><span class="cx">   &lt;macro name=&quot;voicemail_listen_file_check&quot;&gt;
</span><ins>+    &lt;input pattern=&quot;^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):(.*)$&quot;&gt;
+      &lt;match&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-listen_to_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-save_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-delete_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$3&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-forward_to_email.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$4&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-return_call.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$5&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-to_forward.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$6&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+      &lt;/match&gt;
+    &lt;/input&gt;
</ins><span class="cx">     &lt;input pattern=&quot;^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$&quot;&gt;
</span><span class="cx">       &lt;match&gt;
</span><del>-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-listen_to_recording.wav&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
-        &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-save_recording.wav&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
-        &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-delete_recording.wav&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
-        &lt;action function=&quot;say&quot; data=&quot;$3&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-forward_to_email.wav&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
-        &lt;action function=&quot;say&quot; data=&quot;$4&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-return_call.wav&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
-        &lt;action function=&quot;say&quot; data=&quot;$5&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-to_forward.wav&quot;/&gt;
-        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
-        &lt;action function=&quot;say&quot; data=&quot;$6&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
</del><ins>+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-listen_to_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$1&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-save_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$2&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-delete_recording.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$3&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-return_call.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$5&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-to_forward.wav&quot;/&gt;
+        &lt;action function=&quot;play-file&quot; data=&quot;voicemail/vm-press.wav&quot;/&gt;
+        &lt;action function=&quot;say&quot; data=&quot;$6&quot; method=&quot;pronounced&quot; type=&quot;name_spelled&quot;/&gt;
</ins><span class="cx">       &lt;/match&gt;
</span><span class="cx">     &lt;/input&gt;
</span><span class="cx">   &lt;/macro&gt;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconfsip_profilesexternalxml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/external.xml (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/external.xml        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/external.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -24,7 +24,8 @@
</span><span class="cx">     &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;context&quot; value=&quot;public&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dtmf-duration&quot; value=&quot;100&quot;/&gt;
</span><del>-    &lt;param name=&quot;codec-prefs&quot; value=&quot;$${outbound_codec_prefs}&quot;/&gt;
</del><ins>+    &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
+    &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;$${outbound_codec_prefs}&quot;/&gt;
</ins><span class="cx">     &lt;param name=&quot;hold-music&quot; value=&quot;$${hold_music}&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;rtp-timer-name&quot; value=&quot;soft&quot;/&gt;
</span><span class="cx">     &lt;!--&lt;param name=&quot;enable-100rel&quot; value=&quot;true&quot;/&gt;--&gt;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconfsip_profilesinternalipv6xml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/internal-ipv6.xml (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/internal-ipv6.xml        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/internal-ipv6.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -14,7 +14,8 @@
</span><span class="cx">     &lt;param name=&quot;sip-port&quot; value=&quot;$${internal_sip_port}&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dtmf-duration&quot; value=&quot;100&quot;/&gt;
</span><del>-    &lt;param name=&quot;codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
</del><ins>+    &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
+    &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
</ins><span class="cx">     &lt;param name=&quot;use-rtp-timer&quot; value=&quot;true&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;rtp-timer-name&quot; value=&quot;soft&quot;/&gt;
</span><span class="cx">     &lt;!-- ip address to use for rtp --&gt;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconfsip_profilesinternalxml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/internal.xml (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/internal.xml        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/sip_profiles/internal.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -40,13 +40,15 @@
</span><span class="cx">     &lt;!-- &lt;param name=&quot;user-agent-string&quot; value=&quot;FreeSWITCH Rocks!&quot;/&gt; --&gt;
</span><span class="cx">     &lt;param name=&quot;debug&quot; value=&quot;0&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;sip-trace&quot; value=&quot;no&quot;/&gt;
</span><ins>+    &lt;param name=&quot;log-auth-failures&quot; value=&quot;true&quot;/&gt;
</ins><span class="cx">     &lt;param name=&quot;context&quot; value=&quot;public&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;rfc2833-pt&quot; value=&quot;101&quot;/&gt;
</span><span class="cx">     &lt;!-- port to bind to for sip traffic --&gt;
</span><span class="cx">     &lt;param name=&quot;sip-port&quot; value=&quot;$${internal_sip_port}&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dialplan&quot; value=&quot;XML&quot;/&gt;
</span><span class="cx">     &lt;param name=&quot;dtmf-duration&quot; value=&quot;100&quot;/&gt;
</span><del>-    &lt;param name=&quot;codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
</del><ins>+    &lt;param name=&quot;inbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
+    &lt;param name=&quot;outbound-codec-prefs&quot; value=&quot;$${global_codec_prefs}&quot;/&gt;
</ins><span class="cx">     &lt;param name=&quot;rtp-timer-name&quot; value=&quot;soft&quot;/&gt;
</span><span class="cx">     &lt;!-- ip address to use for rtp, DO NOT USE HOSTNAMES ONLY IP ADDRESSES --&gt;
</span><span class="cx">     &lt;param name=&quot;rtp-ip&quot; value=&quot;$${local_ip_v4}&quot;/&gt;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconfvarsxml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/vars.xml (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/vars.xml        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/conf/vars.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -51,6 +51,8 @@
</span><span class="cx">        speex@8000h@20i  - Speex 8kHz using 20ms ptime.
</span><span class="cx">        speex@16000h@20i - Speex 16kHz using 20ms ptime.
</span><span class="cx">        speex@32000h@20i - Speex 32kHz using 20ms ptime.
</span><ins>+       BV16             - BroadVoice 16kb/s narrowband, 8kHz
+       BV32             - BroadVoice 32kb/s wideband, 16kHz
</ins><span class="cx">        G7221@16000h     - G722.1 16kHz (aka Siren 7)
</span><span class="cx">        G7221@32000h     - G722.1C 32kHz (aka Siren 14)
</span><span class="cx">        CELT@32000h      - CELT 32kHz, only 10ms supported
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairconfigurein"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/configure.in (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/configure.in        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/configure.in        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -95,8 +95,8 @@
</span><span class="cx"> fi
</span><span class="cx"> 
</span><span class="cx"> # set defaults for use on all platforms
</span><del>-SWITCH_AM_CFLAGS=&quot;-I${switch_srcdir}/src/include -I${switch_srcdir}/libs/libteletone/src&quot;
-SWITCH_AM_CXXFLAGS=&quot;-I${switch_srcdir}/src/include -I${switch_srcdir}/libs/libteletone/src&quot;
</del><ins>+SWITCH_AM_CFLAGS=&quot;-I${switch_srcdir}/src/include -I${switch_builddir}/src/include -I${switch_srcdir}/libs/libteletone/src&quot;
+SWITCH_AM_CXXFLAGS=&quot;-I${switch_srcdir}/src/include -I${switch_builddir}/src/include -I${switch_srcdir}/libs/libteletone/src&quot;
</ins><span class="cx"> SWITCH_AM_LDFLAGS=&quot;-lm&quot;
</span><span class="cx"> 
</span><span class="cx"> #set SOLINK variable based on compiler and host
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribdvarnesfromrev15704freeswitchtrunkcontribdvarnes"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/dvarnes (from rev 15704, freeswitch/trunk/contrib/dvarnes)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribdvarnesjavafromrev15704freeswitchtrunkcontribdvarnesjava"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/dvarnes/java (from rev 15704, freeswitch/trunk/contrib/dvarnes/java)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribdvarnesjavaeslclientfromrev15704freeswitchtrunkcontribdvarnesjavaeslclient"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/dvarnes/java/esl-client (from rev 15704, freeswitch/trunk/contrib/dvarnes/java/esl-client)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdffromrev15704freeswitchtrunkcontribsathieuemail2pdf"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf (from rev 15704, freeswitch/trunk/contrib/sathieu/email2pdf)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfREADME"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/README</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfREADMEfromrev15704freeswitchtrunkcontribsathieuemail2pdfREADME"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/README (from rev 15704, freeswitch/trunk/contrib/sathieu/email2pdf/README) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/README                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/README        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -0,0 +1,29 @@
</span><ins>+email2pdf - Render email as pdf
+
+Copyright (c) 2009 Mathieu Parent &lt;math.parent@gmail.com&gt;
+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 &lt;http://blogs.igalia.com/berto/2007/09/15/converting-office-documents-into-pdf-from-the-command-line/&gt;
+        imagemagick's convert            - for gif, jpeg, png and tiff
+
+Share and Enjoy!
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfemail2pdf"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/email2pdf</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfemail2pdffromrev15704freeswitchtrunkcontribsathieuemail2pdfemail2pdf"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/email2pdf (from rev 15704, freeswitch/trunk/contrib/sathieu/email2pdf/email2pdf) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/email2pdf                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/email2pdf        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -0,0 +1,274 @@
</span><ins>+#!/usr/bin/perl
+=head1 NAME
+
+email2pdf - Render email as pdf
+
+=head1 SYNOPSIS
+
+B&lt;email2pdf&gt; [options] filein fileout
+
+=head1 ARGUMENTS
+
+=over 8
+
+=item I&lt;filein&gt;
+
+RFC2822 email. Use - for stdin.
+
+=item I&lt;fileout&gt;
+
+PDF file. Use - for stdout.
+
+=back
+
+=head1 OPTIONS
+
+=over 8
+
+=item B&lt;--help&gt;
+
+Print a brief help message and exits.
+
+=item B&lt;--man&gt;
+
+Prints the manual page and exits.
+
+=item B&lt;--header&gt;=header.html
+
+Set header file. This file will be processed using Template-Toolkit.
+
+=back
+
+=head1 COPYRIGHT AND AUTHORS
+
+Copyright (c) 2009 Mathieu Parent &lt;math.parent@gmail.com&gt;
+
+=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 &lt;http://www.gnu.org/licenses/gpl.html&gt;.
+
+=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' =&gt; 'plain',
+        'text/html' =&gt; 'html',
+        
+        #images
+        'image/gif' =&gt; 'gif',
+        'image/jpeg' =&gt; 'jpeg',
+        'image/png' =&gt; 'png',
+        'image/tiff' =&gt; 'tiff',
+
+        #OpenDocument
+        'application/vnd.oasis.opendocument.text' =&gt; 'opendoctext',
+        'application/vnd.oasis.opendocument.spreadsheet' =&gt; 'opendocspreadsheet',
+        'application/vnd.oasis.opendocument.presentation' =&gt; 'opendocpresentation',
+        'application/vnd.oasis.opendocument.graphics' =&gt; 'opendocgraphics',
+                                                                
+        #MS office
+        'application/vnd.ms-excel' =&gt; 'msexcel',
+        'application/msexcel' =&gt; 'msexcel',
+        'application/x-msexcel' =&gt; 'msexcel',
+        'application/vnd.ms-powerpoint' =&gt; 'mspowerpoint',
+        'application/vnd.ms-word' =&gt; 'msword',
+        'application/msword' =&gt; 'msword',
+        
+        'application/pdf' =&gt; 'pdf',
+        
+};
+my $mime_drivers = {
+        #plain and html
+        'plain' =&gt; ['.txt', 'html2ps FILE | ps2pdf - -'],
+        'html' =&gt; ['.html', 'html2ps FILE | ps2pdf - -'],
+        
+        #images
+        'gif' =&gt; ['.gif', 'convert FILE pdf:-'],
+        'jpeg' =&gt; ['.jpeg', 'convert FILE pdf:-'],
+        'png' =&gt; ['.png', 'convert FILE pdf:-'],
+        'tiff' =&gt; ['.tiff', 'convert FILE pdf:-'],
+        
+        #OpenDocument
+        'opendoctext' =&gt; ['.odt', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'opendocspreadsheet' =&gt; ['.ods', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'opendocpresentation' =&gt; ['.odp', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'opendocgraphics' =&gt; ['.odg', 'python /root/ooextract.py --pdf --stdout FILE'],
+
+        #MS office
+        'msexcel' =&gt; ['.xls', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'mspowerpoint' =&gt; ['.ppt', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'msword' =&gt; ['.doc', 'python /root/ooextract.py --pdf --stdout FILE'],
+        'pdf' =&gt; ['.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-&gt;{$content_type})) {
+                if(defined($mime_drivers-&gt;{$mime_types-&gt;{$content_type}})) {
+                        my @mime_driver = $mime_drivers-&gt;{$mime_types-&gt;{$content_type}};
+                        my $suffix = $mime_driver[0][0];
+                        my $command = $mime_driver[0][1];
+                        my ($fh_in, $filename_in) = tempfile( DIR =&gt; $output_dir, SUFFIX =&gt; $suffix );
+                        system(&quot;chmod +r $filename_in&quot;);
+                        print { $fh_in } $raw;
+                        close $fh_in or warn $! ? &quot;Error closing sort pipe: $!&quot; : &quot;Exit status $? from sort&quot;;
+                        $command =~ s/FILE/$filename_in/;
+                        print STDERR &quot;Processing '$filename' ($content_type). From '$filename_in'. &quot;;
+                        my $out = `$command`;
+                        if(!$out) {
+                                print STDERR &quot;Empty generated PDF.\n&quot;;
+                                return;
+                        }
+                        my ($fh_out, $filename_out) = tempfile( DIR =&gt; $output_dir, SUFFIX =&gt; '.pdf' );
+                        print STDERR &quot;To '$filename_out'. &quot;;
+                        print { $fh_out } $out;
+                        close $fh_out or warn $! ? &quot;Error closing sort pipe: $!&quot; : &quot;Exit status $? from sort&quot;;
+                        if($is_header) {
+                                shift @files;
+                                unshift @files, ($filename_out);
+                        } else {
+                                push @files, ($filename_out);
+                        }
+                        print STDERR &quot;\n&quot;;
+                } else {
+                        print STDERR &quot;Undefined mime driver: $mime_types-&gt;{$content_type}\n&quot;;
+                }
+        } else {
+                print STDERR &quot;Undefined mime type: $content_type\n&quot;;
+        }
+}
+
+sub process_header
+{
+        my $parsed = shift;
+        unshift @files, (0) if $files[0] != 0;
+        # define template variables for replacement
+        my $vars = {
+                body =&gt; '', #$parsed-&gt;body,
+                body_raw =&gt; $parsed-&gt;body_raw,
+                content_type =&gt; $parsed-&gt;content_type,
+                mail =&gt; $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-&gt;new($tt_config);
+
+        # process input template, substituting variables
+        $template-&gt;process($o_header, $vars, \$header)
+                || die $template-&gt;error();
+        process_raw $parsed-&gt;filename, $content_type, $header, 1;
+}
+
+sub process_part
+{
+        my $part = shift;
+        my $parsed_content_type = parse_content_type($part-&gt;content_type);
+        my $content_type = $parsed_content_type-&gt;{'discrete'}.'/'.$parsed_content_type-&gt;{'composite'};
+        if($content_type eq 'multipart/alternative') {
+                my @subparts = $part-&gt;subparts;
+                foreach my $subpart (@subparts) {
+                        return if $subpart-&gt;parts &gt; 1; # multipart
+                        my $parsed_subcontent_type = parse_content_type($subpart-&gt;content_type);
+                        my $subcontent_type = $parsed_subcontent_type-&gt;{'discrete'}.'/'.$parsed_subcontent_type-&gt;{'composite'};
+                        process_raw $subpart-&gt;filename, $subcontent_type, $subpart-&gt;body, 1;
+                }
+        } else {
+                process_raw $part-&gt;filename, $content_type, $part-&gt;body;
+        }
+}
+
+# =========================================================================== #
+my $result = GetOptions(
+    'help|?' =&gt; \$o_help,
+    'man' =&gt; \$o_man,
+    'header=s' =&gt; \$o_header,
+    );
+
+pod2usage(-exitstatus =&gt; 0, -verbose =&gt; 2) if $o_man;
+pod2usage(-exitstatus =&gt; 0, -verbose =&gt; 1) if $o_help;
+
+my $file_in = shift @ARGV;
+if(!defined($file_in)) {
+        print &quot;Missing argument: filein\n&quot;;
+        pod2usage(-exitstatus =&gt; 0, -verbose =&gt; 1);
+        exit 1;
+}
+my $file_out = shift @ARGV;
+if(!defined($file_out)) {
+        print &quot;Missing argument: fileout\n&quot;;
+        pod2usage(-exitstatus =&gt; 0, -verbose =&gt; 1);
+        exit 1;
+}
+
+# =========================================================================== #
+# setup temp dir
+$output_dir = tempdir( CLEANUP =&gt; 1 );
+system(&quot;chmod +rwx $output_dir&quot;);
+
+# load mail
+if($file_in eq &quot;-&quot;) {
+        $email = Email::MIME-&gt;new(join('',&lt;&gt;));
+} else {
+        open(FILEIN, '&lt;', $file_in);
+        $email = Email::MIME-&gt;new(join('',&lt;FILEIN&gt;));
+        close(FILEIN);
+}
+
+my @parts = $email-&gt;subparts;
+foreach my $part (@parts) {
+        process_part $part;
+}
+process_header($email);
+print &quot;Merging files: &quot;.join(' ', @files).&quot;\n&quot;;
+system('pdftk '.join(' ', @files).&quot; cat output $file_out&quot;);
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfheaderhtml"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/header.html</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repaircontribsathieuemail2pdfheaderhtmlfromrev15704freeswitchtrunkcontribsathieuemail2pdfheaderhtml"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/header.html (from rev 15704, freeswitch/trunk/contrib/sathieu/email2pdf/header.html) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/header.html                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/contrib/sathieu/email2pdf/header.html        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
+&lt;html&gt;
+ &lt;head&gt;
+  &lt;title&gt;[% mail.header('Subject') %]&lt;/title&gt;
+ &lt;/head&gt;
+ &lt;body&gt;
+ &lt;h3&gt;Fax&lt;/h3&gt;
+From : [% mail.header('From') %]&lt;br&gt;
+Subject : [% mail.header('Subject') %]&lt;br&gt;
+[% body %]
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairdocsphrasephrase_enxml"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/docs/phrase/phrase_en.xml (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/docs/phrase/phrase_en.xml        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/docs/phrase/phrase_en.xml        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -316,11 +316,27 @@
</span><span class="cx">       &lt;prompt phrase=&quot;You are about to provision this phone permanently to your extension.&quot; filename=&quot;ivr-provision_phone_permanently_to_extension.wav&quot;/&gt;
</span><span class="cx">       &lt;prompt phrase=&quot;Please enter the extension number to which you would like to provision this phone, followed by the pound sign.&quot; filename=&quot;ivr-extension_to_provision_this_phone.wav&quot;/&gt;
</span><span class="cx">       &lt;prompt phrase=&quot;Thank you, this phone will now reboot.&quot; filename=&quot;ivr-this_phone_will_now_reboot.wav&quot;/&gt;
</span><del>-      &lt;!-- The following three phrases still need to be recorded --&gt;
</del><ins>+      &lt;!-- The following phrases still need to be recorded --&gt;
</ins><span class="cx">       &lt;prompt phrase=&quot;Thank you. Your recording has been saved.&quot; filename=&quot;ivr-recording_saved.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
</span><span class="cx">       &lt;prompt phrase=&quot;Press 1 to save your recording. Press 2 to review your recording. Press 3 to re-record.&quot; filename=&quot;ivr-save_review_record.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
</span><del>-      &lt;prompt phrase=&quot;The system is unable to save your sound file at this time. Please try again later.&quot; filename=&quot;ivr-unable_save&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
-
</del><ins>+      &lt;prompt phrase=&quot;The system is unable to save your sound file at this time. Please try again later.&quot; filename=&quot;ivr-unable_save.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;You are number&quot; filename=&quot;ivr-you_are_number.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;In line.&quot; filename=&quot;ivr-in_line.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Thank you for holding.&quot; filename=&quot;ivr-thank_you_for_holding.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Your estimated hold time is...&quot; filename=&quot;ivr-estimated_hold_time.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;More than...&quot; filename=&quot;ivr-more_than.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Less than...&quot; filename=&quot;ivr-less_than.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Begin recording.&quot; filename=&quot;ivr-begin_recording.wav &quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Call forwarding has been cancelled.&quot; filename=&quot;ivr-call_forwarding_has_been_cancelled.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Call forwarding has been set.&quot; filename=&quot;ivr-call_forwarding_has_been_set.wav &quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Please enter the phone number.&quot; filename=&quot;ivr-please_enter_the_phone_number.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Please state your name and the reason for your call.&quot; filename=&quot;ivr-please_state_your_name_and_reason_for_calling.wav &quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;To accept, press 1. To reject, press 2. To send to voicemail, press 3.&quot; filename=&quot;ivr-accept_reject_voicemail.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Incoming call.&quot; filename=&quot;ivr-incoming_call.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Thank you for calling.&quot; filename=&quot;ivr-thank_you_for_calling.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Please stay on the line. You call will be answered momentarily.&quot; filename=&quot;ivr-stay_on_line_call_answered_momentarily.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Your call is being transferred.&quot; filename=&quot;ivr-call_being_transferred.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
+      &lt;prompt phrase=&quot;Please enjoy the music while your call is being transferred.&quot; filename=&quot;ivr-enjoy_music_while_transfer.wav&quot; attr=&quot;Needs_to_be_recorded!&quot;/&gt;
</ins><span class="cx">     &lt;/ivr&gt;
</span><span class="cx">     &lt;misc&gt;
</span><span class="cx">       &lt;prompt phrase=&quot;This call has been secured&quot; filename=&quot;call_secured.wav&quot;/&gt;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairfreeswitchspec"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/freeswitch.spec (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/freeswitch.spec        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/freeswitch.spec        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -315,18 +315,18 @@
</span><span class="cx"> PASSTHRU_CODEC_MODULES=&quot;codecs/mod_g729 codecs/mod_g723_1 codecs/mod_amr codecs/mod_amrwb&quot;
</span><span class="cx"> SPIDERMONKEY_MODULES=&quot;languages/mod_spidermonkey languages/mod_spidermonkey_curl languages/mod_spidermonkey_core_db languages/mod_spidermonkey_odbc languages/mod_spidermonkey_socket languages/mod_spidermonkey_teletone&quot;
</span><span class="cx"> APPLICATIONS_MODULES=&quot;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&quot;
</span><del>-CODECS_MODULES=&quot;codecs/mod_ilbc codecs/mod_h26x codecs/mod_voipcodecs codecs/mod_speex codecs/mod_celt codecs/mod_siren&quot;
</del><ins>+CODECS_MODULES=&quot;codecs/mod_ilbc codecs/mod_h26x codecs/mod_voipcodecs codecs/mod_speex codecs/mod_celt codecs/mod_siren codecs/mod_bv&quot;
</ins><span class="cx"> DIALPLANS_MODULES=&quot;dialplans/mod_dialplan_asterisk dialplans/mod_dialplan_directory dialplans/mod_dialplan_xml&quot;
</span><span class="cx"> DIRECTORIES_MODULES=&quot;&quot;
</span><span class="cx"> ENDPOINTS_MODULES=&quot;endpoints/mod_dingaling endpoints/mod_iax endpoints/mod_portaudio endpoints/mod_sofia ../../libs/openzap/mod_openzap endpoints/mod_loopback&quot;
</span><span class="cx"> ASR_TTS_MODULES=&quot;asr_tts/mod_pocketsphinx asr_tts/mod_flite asr_tts/mod_unimrcp&quot;
</span><span class="cx"> EVENT_HANDLERS_MODULES=&quot;event_handlers/mod_event_multicast event_handlers/mod_event_socket event_handlers/mod_cdr_csv&quot;
</span><span class="cx"> FORMATS_MODULES=&quot;formats/mod_local_stream formats/mod_native_file formats/mod_sndfile formats/mod_tone_stream formats/mod_shout&quot;
</span><del>-LANGUAGES_MODULES=&quot;languages/mod_perl languages/mod_lua languages/mod_python languages/mod_yaml&quot;
</del><ins>+LANGUAGES_MODULES=&quot;languages/mod_perl languages/mod_lua languages/mod_python&quot;
</ins><span class="cx"> LOGGERS_MODULES=&quot;loggers/mod_console loggers/mod_logfile loggers/mod_syslog&quot;
</span><span class="cx"> SAY_MODULES=&quot;say/mod_say_en say/mod_say_de say/mod_say_fr&quot;
</span><span class="cx"> TIMERS_MODULES=
</span><del>-DISABLED_MODULES=&quot;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&quot;
</del><ins>+DISABLED_MODULES=&quot;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&quot;
</ins><span class="cx"> XML_INT_MODULES=&quot;xml_int/mod_xml_rpc  xml_int/mod_xml_curl xml_int/mod_xml_cdr &quot;
</span><span class="cx"> MYMODULES=&quot;$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&quot;
</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 &lt;neves.igor@gmail.com&gt;: 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_branch_repairlibsaprconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/apr/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/apr/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/apr/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsaprutilconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/apr-util/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/apr-util/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/apr-util/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --with-apr=../apr --disable-shared --with-pic --without-sqlite2 --without-sqlite3 --with-expat=builtin
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --with-apr=../apr --disable-shared --with-pic --without-sqlite2 --without-sqlite3 --with-expat=builtin
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsbroadvoiceconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/broadvoice/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/broadvoice/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/broadvoice/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibscurlconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/curl/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/curl/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/curl/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --without-libidn --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --without-libidn --disable-shared --with-pic
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibseslperlloggerpl"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/esl/perl/logger.pl (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/esl/perl/logger.pl        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/esl/perl/logger.pl        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> -f --file &lt;file&gt;            Output file
</span><span class="cx"> -pb --paste-bin &lt;name&gt;            Post to FreeSWITCH Paste Bin
</span><span class="cx"> -sp --sip-profiles &lt;list&gt;   List of SIP profiles to trace
</span><del>--sd --sip-debug &lt;leve&gt;      Set SIP debug level
</del><ins>+-sd --sip-debug &lt;level&gt;      Set SIP debug level
</ins><span class="cx"> 
</span><span class="cx"> No arguments given will trace profile 'internal' to STDOUT
</span><span class="cx"> &quot;;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibseslsrceslc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/esl/src/esl.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/esl/src/esl.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/esl/src/esl.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -833,7 +833,7 @@
</span><span class="cx">                                 }
</span><span class="cx">                                 
</span><span class="cx">                                 if (!revent) {
</span><del>-                                        esl_event_create(&amp;revent, ESL_EVENT_COMMAND);
</del><ins>+                                        esl_event_create(&amp;revent, ESL_EVENT_CLONE);
</ins><span class="cx">                                 }
</span><span class="cx">                                 
</span><span class="cx">                                 hname = beg;
</span><span class="lines">@@ -910,7 +910,7 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 if (!esl_safe_strcasecmp(hval, &quot;text/event-plain&quot;) &amp;&amp; revent-&gt;body) {
</span><del>-                        esl_event_types_t et = ESL_EVENT_COMMAND;
</del><ins>+                        esl_event_types_t et = ESL_EVENT_CLONE;
</ins><span class="cx">                         char *body = strdup(revent-&gt;body);
</span><span class="cx">                         
</span><span class="cx">                         esl_event_create(&amp;handle-&gt;last_ievent, et);
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsiksemelconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/iksemel/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/iksemel/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/iksemel/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot;  --disable-shared --with-pic 
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsilbcconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/ilbc/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/ilbc/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/ilbc/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --with-pic --disable-shared
</del><ins>+srcpath=$(dirname $0)
+$srcpath/configure &quot;$@&quot; --with-pic --disable-shared
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsjsMakefilein"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/Makefile.in (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/Makefile.in        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/Makefile.in        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -156,7 +156,7 @@
</span><span class="cx">         @$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $&lt;
</span><span class="cx"> 
</span><span class="cx"> $(LIB_NAME): $(LIB_OBJS)
</span><del>-        @$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) -version-info 1:6
</del><ins>+        @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) -version-info 1:6
</ins><span class="cx"> 
</span><span class="cx"> $(CLI_NAME): $(CLI_OBJS) $(LIB_NAME)
</span><span class="cx">         @$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(CLI_LDFLAGS) $(CFLAGS) -o $(CLI_NAME) $(CLI_OBJS) $(LIB_NAME) $(LIBS) $(CLI_LIBS)
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsjsconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --with-pic --with-nspr=yes
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --with-pic --with-nspr=yes
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsjsnsprpubconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/nsprpub/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/nsprpub/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/nsprpub/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --with-pic
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsjsnsprpubconfigurein"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/nsprpub/configure.in (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/nsprpub/configure.in        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/js/nsprpub/configure.in        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -617,7 +617,7 @@
</span><span class="cx"> LIB_SUFFIX=a
</span><span class="cx"> DLL_SUFFIX=so
</span><span class="cx"> ASM_SUFFIX=s
</span><del>-MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
</del><ins>+MKSHLIB='$(LD) $(DSO_LDOPTS) $(OS_LDFLAGS) -o $@'
</ins><span class="cx"> PR_MD_ASFILES=
</span><span class="cx"> PR_MD_CSRCS=
</span><span class="cx"> PR_MD_ARCH_DIR=unix
</span><span class="lines">@@ -986,7 +986,7 @@
</span><span class="cx">     DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name ${prefix}/lib/$@ -headerpad_max_install_names'
</span><span class="cx">     # Use the standard preprocessor (cpp)
</span><span class="cx">     CFLAGS=&quot;$CFLAGS -no-cpp-precomp&quot;
</span><del>-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
</del><ins>+    MKSHLIB='$(CC) $(DSO_LDOPTS) $(OS_LDFLAGS) -o $@'
</ins><span class="cx">     STRIP=&quot;$STRIP -x -S&quot;
</span><span class="cx">     DLL_SUFFIX=dylib
</span><span class="cx">     USE_PTHREADS=1
</span><span class="lines">@@ -1132,7 +1132,7 @@
</span><span class="cx">     else
</span><span class="cx">         DLL_SUFFIX=so.1
</span><span class="cx">     fi
</span><del>-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
</del><ins>+    MKSHLIB='$(CC) $(DSO_LDOPTS) $(OS_LDFLAGS) -o $@'
</ins><span class="cx">     DSO_CFLAGS=-fPIC
</span><span class="cx">     DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
</span><span class="cx">     MDCPUCFG_H=_freebsd.cfg
</span><span class="lines">@@ -1401,7 +1401,7 @@
</span><span class="cx">     esac
</span><span class="cx">     MDCPUCFG_H=_linux.cfg
</span><span class="cx">     PR_MD_CSRCS=linux.c
</span><del>-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
</del><ins>+    MKSHLIB='$(CC) $(DSO_LDOPTS) $(OS_LDFLAGS) -o $@'
</ins><span class="cx">     DSO_CFLAGS=-fPIC
</span><span class="cx">     DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
</span><span class="cx">     _OPTIMIZE_FLAGS=-O2
</span><span class="lines">@@ -1660,7 +1660,7 @@
</span><span class="cx">     DSO_CFLAGS='-fPIC -DPIC'
</span><span class="cx">     CFLAGS=&quot;$CFLAGS -ansi -Wall&quot;
</span><span class="cx">     CXXFLAGS=&quot;$CXXFLAGS -ansi -Wall&quot;
</span><del>-    MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS)'
</del><ins>+    MKSHLIB='$(CC) -o $@ $(DSO_LDOPTS) $(OS_LDFLAGS) '
</ins><span class="cx"> 
</span><span class="cx">     if test -z &quot;$OBJECT_FMT&quot;; then
</span><span class="cx">         if echo __ELF__ | ${CC-cc} -E - | grep -q __ELF__ 2&gt;/dev/null; then
</span><span class="lines">@@ -1741,7 +1741,7 @@
</span><span class="cx">         USE_PTHREADS=1
</span><span class="cx">     fi
</span><span class="cx">     DSO_LDOPTS='-shared -fPIC'
</span><del>-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
</del><ins>+    MKSHLIB='$(CC) $(DSO_LDOPTS) $(OS_LDFLAGS) -o $@'
</ins><span class="cx">     ;;
</span><span class="cx"> 
</span><span class="cx"> *-openvms*)
</span><span class="lines">@@ -1911,7 +1911,7 @@
</span><span class="cx">     MDCPUCFG_H=_solaris.cfg
</span><span class="cx">     PR_MD_CSRCS=solaris.c
</span><span class="cx">     LD=/usr/ccs/bin/ld
</span><del>-    MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
</del><ins>+    MKSHLIB='$(CC) $(DSO_LDOPTS) $(OS_LDFLAGS) -o $@'
</ins><span class="cx">     RESOLVE_LINK_SYMBOLS=1
</span><span class="cx">     if test -n &quot;$GNU_CC&quot;; then
</span><span class="cx">         DSO_CFLAGS=-fPIC
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibdingalingconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libdingaling/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libdingaling/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libdingaling/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibeditconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libedit/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libedit/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libedit/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibg722_1configuregnufromrev15704freeswitchtrunklibslibg722_1configuregnu"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libg722_1/configure.gnu (from rev 15704, freeswitch/trunk/libs/libg722_1/configure.gnu) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libg722_1/configure.gnu                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libg722_1/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+#! /bin/sh
+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibsndfileM4ltoptionsm4"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/M4/ltoptions.m4</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibsndfileM4ltsugarm4"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/M4/ltsugar.m4</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibsndfileM4ltversionm4"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/M4/ltversion.m4</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibsndfileconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libsndfile/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><del>-#! /bin/sh
-./configure &quot;$@&quot; --disable-sqlite --disable-shared --with-pic --disable-external-libs --disable-octave
</del><ins>+#!/bin/sh
+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-sqlite --disable-shared --with-pic --disable-octave --disable-external-libs
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibslibteletoneconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libteletone/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libteletone/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/libteletone/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibspcreconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/pcre/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/pcre/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/pcre/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsportaudioconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/portaudio/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/portaudio/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/portaudio/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --with-pic --disable-shared
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --with-pic --disable-shared
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibssofiasipconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/sofia-sip/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/sofia-sip/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/sofia-sip/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --with-pic --with-glib=no --disable-shared --without-doxygen
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --with-pic --with-glib=no --disable-shared  --without-doxygen
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsspandspconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/spandsp/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/spandsp/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/spandsp/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic --enable-builtin-tiff
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic --enable-builtin-tiff
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsspandspsrcgsm0610_rpec"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/spandsp/src/gsm0610_rpe.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/spandsp/src/gsm0610_rpe.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/spandsp/src/gsm0610_rpe.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -55,11 +55,20 @@
</span><span class="cx"> 
</span><span class="cx"> /* 4.2.13 .. 4.2.17  RPE ENCODING SECTION */
</span><span class="cx"> 
</span><ins>+#if defined(__GNUC__)  &amp;&amp;  defined(__i386__)
+#define SPANDSP_USE_I386_ASM
+#if (defined(__APPLE__) || defined(macintosh)) &amp;&amp; defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 1060
+#undef SPANDSP_USE_I386_ASM
+#endif
+#endif
+#endif
+
</ins><span class="cx"> /* 4.2.13 */
</span><span class="cx"> static void weighting_filter(const int16_t *e,     // signal [-5..0.39.44] IN
</span><span class="cx">                              int16_t x[40])
</span><span class="cx"> {
</span><del>-#if defined(__GNUC__)  &amp;&amp;  defined(__i386__)
</del><ins>+#if defined(SPANDSP_USE_I386_ASM)
</ins><span class="cx">     /* Table 4.4   Coefficients of the weighting filter */
</span><span class="cx">     /* This must be padded to a multiple of 4 for MMX to work */
</span><span class="cx">     static const union
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsspeexconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/speex/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/speex/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/speex/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic --disable-oggtest
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic --disable-oggtest
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibssqliteconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/sqlite/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/sqlite/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/sqlite/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-tcl --enable-threadsafe --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-tcl --enable-threadsafe --disable-shared --with-pic
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibssrtpconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/srtp/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/srtp/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/srtp/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibstiff382configinstallsh"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/tiff-3.8.2/config/install-sh</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibstiff382configuregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/tiff-3.8.2/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/tiff-3.8.2/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/tiff-3.8.2/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-shared --with-pic
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-shared --with-pic
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsunimrcpconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/unimrcp/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/unimrcp/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/unimrcp/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,3 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --with-apr=../apr --disable-shared --with-pic --with-apr-util=../apr-util --with-sofia-sip=../sofia-sip
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --with-apr=../apr --disable-shared --with-pic --with-apr-util=../apr-util --with-sofia-sip=../sofia-sip
</ins><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairlibsxmlrpccconfiguregnu"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/xmlrpc-c/configure.gnu (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/xmlrpc-c/configure.gnu        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/libs/xmlrpc-c/configure.gnu        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1,2 +1,4 @@
</span><span class="cx"> #! /bin/sh
</span><del>-./configure &quot;$@&quot; --disable-cplusplus --disable-wininet-client --disable-libwww-client --disable-shared --with-pic --disable-curl-client
</del><ins>+srcpath=$(dirname $0 2&gt;/dev/null )  || srcpath=&quot;.&quot; 
+$srcpath/configure &quot;$@&quot; --disable-cplusplus --disable-wininet-client --disable-libwww-client --disable-shared --with-pic --disable-curl-client
+
</ins></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcincludeswitch_callerh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_caller.h (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_caller.h        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_caller.h        2009-11-29 05:19:09 UTC (rev 15705)
</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_branch_repairsrcincludeswitch_coreh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_core.h (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_core.h        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_core.h        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1959,6 +1959,9 @@
</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>+        unsigned long hash;
+        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 +1998,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_branch_repairsrcincludeswitch_typesh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_types.h (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_types.h        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_types.h        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -804,7 +804,7 @@
</span><span class="cx"> typedef enum {
</span><span class="cx">         SCSMF_DYNAMIC = (1 &lt;&lt; 0),
</span><span class="cx">         SCSMF_FREE_STRING_REPLY = (1 &lt;&lt; 1),
</span><del>-        SCSMF_FREE_POINTER_REPLY = (1 &lt;&lt; 2),
</del><ins>+        SCSMF_FREE_POINTER_REPLY = (1 &lt;&lt; 2)
</ins><span class="cx"> } switch_core_session_message_flag_enum_t;
</span><span class="cx"> typedef uint32_t switch_core_session_message_flag_t;
</span><span class="cx"> 
</span><span class="lines">@@ -942,6 +942,7 @@
</span><span class="cx">         CF_SIGNAL_BRIDGE_TTL,
</span><span class="cx">         CF_MEDIA_BRIDGE_TTL,
</span><span class="cx">         CF_BYPASS_MEDIA_AFTER_BRIDGE,
</span><ins>+        CF_LEG_HOLDING,
</ins><span class="cx">         /* WARNING: DO NOT ADD ANY FLAGS BELOW THIS LINE */
</span><span class="cx">         CF_FLAG_MAX
</span><span class="cx"> } switch_channel_flag_t;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcincludeswitch_utilsh"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_utils.h (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_utils.h        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/include/switch_utils.h        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx"> enum switch_uri_flags {
</span><span class="cx">         SWITCH_URI_NUMERIC_HOST = 1,
</span><span class="cx">         SWITCH_URI_NUMERIC_PORT = 2,
</span><del>-        SWITCH_URI_NO_SCOPE = 4,
</del><ins>+        SWITCH_URI_NO_SCOPE = 4
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> /*!
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodMakefileam"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/Makefile.am (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/Makefile.am        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/Makefile.am        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -8,10 +8,16 @@
</span><span class="cx">         target=`echo $@ | sed -e 's|^.*-||'`; \
</span><span class="cx">         modname=`echo $@ | sed -e 's|-.*||' | sed -e 's|^.*/||'`; \
</span><span class="cx">         confmoddir=`cat $(switch_builddir)/modules.conf | sed -e 's| ||' | grep $$modname$$ | sed -e 's|#||' | head -n 1`; \
</span><del>-        if test -z &quot;$$confmoddir&quot; ; then moddir=$@ ; else  \
</del><ins>+        if test -z &quot;$$confmoddir&quot; ; then \
+                moddir=$@ ; \
+                buildmoddir=$(switch_builddir)/src/mod/$@ ;\
+        else  \
</ins><span class="cx">                 if test -d  &quot;$(switch_srcdir)/src/mod/$$confmoddir&quot; ; then \
</span><del>-                        moddir=&quot;$(switch_srcdir)/src/mod/$$confmoddir&quot; ; else \
</del><ins>+                        moddir=&quot;$(switch_srcdir)/src/mod/$$confmoddir&quot; ; \
+                        buildmoddir=&quot;$(switch_builddir)/src/mod/$$confmoddir&quot; ; \
+                else \
</ins><span class="cx">                         moddir=&quot;$$confmoddir&quot; ; \
</span><ins>+                        buildmoddir=&quot;$(switch_builddir)/src/mod/$$confmoddir&quot; ; \
</ins><span class="cx">                 fi ; \
</span><span class="cx">         fi ; \
</span><span class="cx">         if test -z &quot;$$target&quot; ; then target=&quot;all&quot; ; fi ; \
</span><span class="lines">@@ -20,8 +26,10 @@
</span><span class="cx">                 echo ;\
</span><span class="cx">                 echo making $$target $$modname ;\
</span><span class="cx">                 (if test -f &quot;$$moddir/Makefile&quot; ; then \
</span><del>-                        cd $$moddir &amp;&amp; MODNAME=$$modname BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) $$target; else\
-                        cd $$moddir &amp;&amp; MODNAME=$$modname BASE=$(switch_builddir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules $$target ;\
</del><ins>+                        test -f &quot;$$buildmoddir/Makefile&quot; || cp $$moddir/Makefile $$buildmoddir/Makefile ; \
+                        cd $$buildmoddir &amp;&amp; MODDIR=$$moddir MODNAME=$$modname BASE=$(switch_srcdir) $(MAKE) $(AM_MAKEFLAGS) $$target; \
+                else\
+                        cd $$buildmoddir &amp;&amp; MODDIR=$$moddir MODNAME=$$modname BASE=$(switch_srcdir) $(MAKE) $(AM_MAKEFLAGS) -f $(switch_builddir)/build/modmake.rules $$target ;\
</ins><span class="cx">                 fi;) || case &quot;$$amf&quot; in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
</span><span class="cx">         fi; \
</span><span class="cx">         test -z &quot;$$fail&quot; ;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodapplicationsmod_cidlookupmod_cidlookupc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_cidlookup/mod_cidlookup.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_cidlookup/mod_cidlookup.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_cidlookup/mod_cidlookup.c        2009-11-29 05:19:09 UTC (rev 15705)
</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 &amp;&amp; globals.odbc_user &amp;&amp; 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(&amp;dbh, SCDB_TYPE_ODBC, &amp;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, &quot;ODBC is not compiled in.  Do not configure odbc-dsn parameter!\n&quot;);
</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) &amp;&amp; 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, &quot;No local database defined.\n&quot;);
</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, &quot;Connecting to dsn: %s\n&quot;, 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, &quot;Connecting to dsn: %s\n&quot;, globals.odbc_dsn);
+
+                        if (!(dbh = cidlookup_get_db_handle())) {
</ins><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Cannot Open ODBC Database!\n&quot;);
</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, &quot;Cannot Open ODBC Database!\n&quot;);
-                                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(&amp;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(&amp;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(&quot;whitepages-apikey&quot;, CONFIG_RELOAD, &amp;globals.whitepages_apikey, NULL, &quot;api key for whitepages.com&quot;, &quot;api key for whitepages.com&quot;),
</span><span class="cx">         SWITCH_CONFIG_ITEM(&quot;cache&quot;, SWITCH_CONFIG_BOOL, CONFIG_RELOAD, &amp;globals.cache, SWITCH_FALSE, NULL, &quot;true|false&quot;, &quot;whether to cache via cidlookup&quot;),
</span><span class="cx">         SWITCH_CONFIG_ITEM(&quot;cache-expire&quot;, SWITCH_CONFIG_INT, CONFIG_RELOAD, &amp;globals.cache_expire, (void *)300, NULL, &quot;expire&quot;, &quot;seconds to preserve num-&gt;name cache&quot;),
</span><ins>+        SWITCH_CONFIG_ITEM(&quot;curl-timeout&quot;, SWITCH_CONFIG_INT, CONFIG_RELOAD, &amp;globals.curl_timeout, (void *)2000, NULL, &quot;timeout for curl&quot;, &quot;milliseconds to timeout&quot;),
+        SWITCH_CONFIG_ITEM(&quot;curl-warning-duration&quot;, SWITCH_CONFIG_INT, CONFIG_RELOAD, &amp;globals.curl_warnduration, (void *)1000, NULL, &quot;warning when curl queries are longer than specified time&quot;, &quot;milliseconds&quot;),
</ins><span class="cx">         SWITCH_CONFIG_ITEM_STRING_STRDUP(&quot;sql&quot;, CONFIG_RELOAD, &amp;globals.sql, NULL, &quot;sql whre number=${caller_id_number}&quot;, &quot;SQL to run if overriding CID&quot;),
</span><span class="cx">         SWITCH_CONFIG_ITEM_STRING_STRDUP(&quot;citystate-sql&quot;, CONFIG_RELOAD, &amp;globals.citystate_sql, NULL, &quot;sql to look up city/state info&quot;, &quot;SQL to run if overriding CID&quot;),
</span><span class="cx">         SWITCH_CONFIG_ITEM_CALLBACK(&quot;odbc-dsn&quot;, SWITCH_CONFIG_STRING, CONFIG_RELOAD, &amp;globals.odbc_dsn, &quot;&quot;, config_callback_dsn, &amp;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 &amp;&amp; (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-&gt;pool, &quot;Unable to get ODBC handle.  dsn: %s, dbh is %s\n&quot;, globals.odbc_dsn, dbh ? &quot;not null&quot; : &quot;null&quot;);
</ins><span class="cx">         }
</span><del>-        switch_mutex_unlock(globals.db_mutex);
</del><ins>+        
+        switch_cache_db_release_db_handle(&amp;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] = &quot;&quot;;
</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 *) &amp;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) &gt;= globals.curl_warnduration) {
+                switch_core_time_duration_t duration;
+                switch_core_measure_time(time_diff, &amp;duration);
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;SLOW LOOKUP (&quot;
+                        &quot;%um, &quot;
+                        &quot;%us, &quot;
+                        &quot;%ums&quot;
+                        &quot;): url: %s\n&quot;, 
+                        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, &quot;SQL: %s\n&quot;, newsql);
</span><del>-                if (cidlookup_execute_sql_callback(newsql, cidlookup_callback, &amp;cbt)) {
</del><ins>+                if (cidlookup_execute_sql_callback(newsql, cidlookup_callback, &amp;cbt, &amp;err)) {
</ins><span class="cx">                         name = cbt.name;
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unable to lookup cid\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unable to lookup cid: %s\n&quot;, err ? err : &quot;(null)&quot;);
</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, &quot;caller_id_number&quot;, number);
</span><span class="cx"> 
</span><span class="cx">         /* database always wins */
</span><del>-        if (switch_odbc_available() &amp;&amp; globals.master_odbc &amp;&amp; globals.sql) {
</del><ins>+        if (switch_odbc_available() &amp;&amp; globals.odbc_dsn &amp;&amp; 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-&gt;name = name;
</span><span class="lines">@@ -572,7 +596,7 @@
</span><span class="cx">         if (!cid-&gt;area &amp;&amp;
</span><span class="cx">                 !skipcitystate &amp;&amp; 
</span><span class="cx">                 strlen(number) == 11 &amp;&amp; number[0] == '1' &amp;&amp;
</span><del>-                switch_odbc_available() &amp;&amp; globals.master_odbc &amp;&amp; globals.citystate_sql) {
</del><ins>+                switch_odbc_available() &amp;&amp; globals.odbc_dsn &amp;&amp; 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 : &quot;(null)&quot;,
</span><span class="cx">                                                                         (globals.cache) ? &quot;true&quot; : &quot;false&quot;,
</span><span class="cx">                                                                         globals.cache_expire);
</span><ins>+                        stream-&gt;write_function(stream, &quot; curl-timeout: %&quot; SWITCH_TIME_T_FMT &quot;\n curl-warn-duration: %&quot; SWITCH_TIME_T_FMT &quot;\n&quot;, 
+                                                                        globals.curl_timeout,
+                                                                        globals.curl_warnduration);
</ins><span class="cx">                                                                         
</span><span class="cx">                         stream-&gt;write_function(stream, &quot; odbc-dsn: %s\n sql: %s\n citystate-sql: %s\n&quot;, 
</span><span class="cx">                                                                         globals.odbc_dsn ? globals.odbc_dsn : &quot;(null)&quot;,
</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() &amp;&amp; !globals.db_mutex) {
-                if (switch_mutex_init(&amp;globals.db_mutex, SWITCH_MUTEX_UNNESTED, globals.pool) != SWITCH_STATUS_SUCCESS) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;failed to initialize db_mutex\n&quot;);
-                }
-        }
-
</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, &amp;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(&amp;globals.master_odbc);
-        }
-
</del><span class="cx">         switch_event_unbind(&amp;reload_xml_event);
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodapplicationsmod_commandsmod_commandsc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_commands/mod_commands.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_commands/mod_commands.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_commands/mod_commands.c        2009-11-29 05:19:09 UTC (rev 15705)
</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 &lt; 1) {
+                goto error;
+        }
+        if (argv[0] &amp;&amp; switch_stristr(&quot;status&quot;, argv[0])) {
+                switch_cache_db_status(stream);
+                goto ok;
+        } else {
+                goto error;
+        }
+        
+error:
+                stream-&gt;write_function(stream, &quot;%s&quot;, &quot;parameter missing\n&quot;);
+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] = &quot;&quot;;
</span><span class="lines">@@ -3827,6 +3855,8 @@
</span><span class="cx">         SWITCH_ADD_API(commands_api_interface, &quot;nat_map&quot;, &quot;nat_map&quot;, nat_map_function, &quot;[status|republish|reinit] | [add|del] &lt;port&gt; [tcp|udp] [static]&quot;);
</span><span class="cx">         SWITCH_ADD_API(commands_api_interface, &quot;host_lookup&quot;, &quot;host_lookup&quot;, host_lookup_function, &quot;&lt;hostname&gt;&quot;);
</span><span class="cx">         SWITCH_ADD_API(commands_api_interface, &quot;hostname&quot;, &quot;Returns the system hostname&quot;, hostname_api_function, &quot;&quot;);
</span><ins>+        SWITCH_ADD_API(commands_api_interface, &quot;db_cache&quot;, &quot;db cache management&quot;, db_cache_function, &quot;status&quot;);
+        switch_console_set_complete(&quot;db_cache status&quot;);
</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_branch_repairsrcmodapplicationsmod_lcrmod_lcrc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_lcr/mod_lcr.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_lcr/mod_lcr.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_lcr/mod_lcr.c        2009-11-29 05:19:09 UTC (rev 15705)
</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 &amp;&amp; globals.odbc_user &amp;&amp; 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(&amp;dbh, SCDB_TYPE_ODBC, &amp;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 &amp;&amp; (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(&amp;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 &amp;&amp; (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(&amp;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, &amp;cfg, NULL))) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;open of %s failed\n&quot;, cf);
</span><span class="lines">@@ -864,11 +882,12 @@
</span><span class="cx">                         val = (char *) switch_xml_attr_soft(param, &quot;value&quot;);
</span><span class="cx">                         if (!strcasecmp(var, &quot;odbc-dsn&quot;) &amp;&amp; !zstr(val)) {
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;odbc_dsn is %s\n&quot;, 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
-                                                  , &quot;dsn is \&quot;%s\&quot;, user is \&quot;%s\&quot;, and password is \&quot;%s\&quot;\n&quot;
-                                                  , globals.odbc_dsn, odbc_user, odbc_pass
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG
+                                                  , &quot;dsn is \&quot;%s\&quot;, user is \&quot;%s\&quot;\n&quot;
+                                                  , 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, &quot;Cannot Open ODBC Database!\n&quot;);
</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, &quot;Cannot Open ODBC Database!\n&quot;);
-                        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, &quot;Setting system defined default profile.&quot;);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        done:
</del><ins>+done:
+        switch_cache_db_release_db_handle(&amp;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(&amp;globals.mutex, SWITCH_MUTEX_NESTED, globals.pool) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;failed to initialize mutex\n&quot;);
</span><span class="cx">         }
</span><del>-        if (switch_mutex_init(&amp;globals.db_mutex, SWITCH_MUTEX_UNNESTED, globals.pool) != SWITCH_STATUS_SUCCESS) {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;failed to initialize db_mutex\n&quot;);
-        }
-
</del><span class="cx">         if (lcr_load_config() != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Unable to load lcr config file\n&quot;);
</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(&amp;globals.master_odbc);
</del><span class="cx">         switch_core_hash_destroy(&amp;globals.profile_hash);
</span><span class="cx"> 
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodapplicationsmod_limitmod_limitc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_limit/mod_limit.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_limit/mod_limit.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_limit/mod_limit.c        2009-11-29 05:19:09 UTC (rev 15705)
</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">         &quot;   url        VARCHAR(255)\n&quot;
</span><span class="cx">         &quot;);\n&quot;;
</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 &amp;&amp; globals.odbc_user &amp;&amp; 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(&amp;dbh, SCDB_TYPE_ODBC, &amp;options) != SWITCH_STATUS_SUCCESS) dbh = NULL;
+                return dbh;
+        } else {
+                options.core_db_options.db_path = globals.dbname;
+                if (switch_cache_db_get_db_handle(&amp;dbh, SCDB_TYPE_CORE_DB, &amp;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() &amp;&amp; globals.odbc_dsn) {
-                switch_odbc_statement_handle_t stmt;
-                if (switch_odbc_handle_exec(globals.master_odbc, sql, &amp;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, &quot;ERR: [%s]\n[%s]\n&quot;, sql, switch_str_nil(err_str));
-                        }
-                        switch_safe_free(err_str);
-                        status = SWITCH_STATUS_FALSE;
-                }
-                switch_odbc_statement_handle_free(&amp;stmt);
-        } else {
-                if (!(db = switch_core_db_open_file(globals.dbname))) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error Opening DB %s\n&quot;, 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, &quot;Error Opening DB\n&quot;);
+                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(&amp;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() &amp;&amp; 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, &quot;Error Opening DB %s\n&quot;, globals.dbname);
-                        goto end;
-                }
</del><ins>+        if (!(dbh = limit_get_db_handle())) {
+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error Opening DB\n&quot;);
+        goto end;
+    }
+        
+        switch_cache_db_execute_sql_callback(dbh, sql, callback, pdata, &amp;errmsg);
</ins><span class="cx"> 
</span><del>-                switch_core_db_exec(db, sql, callback, pdata, &amp;errmsg);
-
-                if (errmsg) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;SQL ERR: [%s] %s\n&quot;, sql, errmsg);
-                        free(errmsg);
-                }
-
-                if (db) {
-                        switch_core_db_close(db);
-                }
</del><ins>+        if (errmsg) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;SQL ERR: [%s] %s\n&quot;, 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(&amp;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, &quot;[^:]+:[^:]+:.+&quot; };
</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() &amp;&amp; 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, &quot;ODBC IS NOT AVAILABLE!\n&quot;);
</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 = &quot;call_limit&quot;;
</span><ins>+                dbh = limit_get_db_handle();
</ins><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (switch_odbc_available() &amp;&amp; globals.odbc_dsn) {
-                int x;
</del><ins>+
+        if (dbh) {
+                int x = 0;
</ins><span class="cx">                 char *indexes[] = {
</span><span class="cx">                         &quot;create index ld_hostname on limit_data (hostname)&quot;,
</span><span class="cx">                         &quot;create index ld_uuid on limit_data (uuid)&quot;,
</span><span class="lines">@@ -216,71 +224,24 @@
</span><span class="cx">                         &quot;create index gd_url on group_data (url)&quot;,
</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, &quot;Cannot Open ODBC Database!\n&quot;);
-                        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, &quot;Cannot Open ODBC Database!\n&quot;);
-                        status = SWITCH_STATUS_FALSE;
-                        goto done;
-                }
-
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Connected ODBC DSN: %s\n&quot;, globals.odbc_dsn);
-                if (switch_odbc_handle_exec(globals.master_odbc, &quot;select count(*) from limit_data&quot;, 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, &quot;Cannot Create SQL Database!\n&quot;);
-                        }
-                }
-                if (switch_odbc_handle_exec(globals.master_odbc, &quot;select count(*) from db_data&quot;, 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, &quot;Cannot Create SQL Database!\n&quot;);
-                        }
-                }
-                if (switch_odbc_handle_exec(globals.master_odbc, &quot;select count(*) from group_data&quot;, 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, &quot;Cannot Create SQL Database!\n&quot;);
-                        }
-                }
-
</del><ins>+                switch_cache_db_test_reactive(dbh, &quot;select * from limit_data&quot;, NULL, limit_sql);
+                switch_cache_db_test_reactive(dbh, &quot;select * from db_data&quot;, NULL, db_sql);
+                switch_cache_db_test_reactive(dbh, &quot;select * from group_data&quot;, 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, &quot;select * from limit_data&quot;, NULL, limit_sql);
-                        switch_core_db_test_reactive(db, &quot;select * from db_data&quot;, NULL, db_sql);
-                        switch_core_db_test_reactive(db, &quot;select * from group_data&quot;, NULL, group_sql);
-                        
-                        switch_core_db_exec(db, &quot;create index if not exists ld_hostname on limit_data (hostname)&quot;, NULL, NULL, NULL);
-                        switch_core_db_exec(db, &quot;create index if not exists ld_uuid on limit_data (uuid)&quot;, NULL, NULL, NULL);
-                        switch_core_db_exec(db, &quot;create index if not exists ld_realm on limit_data (realm)&quot;, NULL, NULL, NULL);
-                        switch_core_db_exec(db, &quot;create index if not exists ld_id on limit_data (id)&quot;, NULL, NULL, NULL);
</del><ins>+        
+                switch_cache_db_release_db_handle(&amp;dbh);
</ins><span class="cx"> 
</span><del>-                        switch_core_db_exec(db, &quot;create index if not exists dd_realm on db_data (realm)&quot;, NULL, NULL, NULL);
-                        switch_core_db_exec(db, &quot;create index if not exists dd_data_key on db_data (data_key)&quot;, NULL, NULL, NULL);
-
-                        switch_core_db_exec(db, &quot;create index if not exists gd_groupname on group_data (groupname)&quot;, NULL, NULL, NULL);
-                        switch_core_db_exec(db, &quot;create index if not exists gd_url on group_data (url)&quot;, NULL, NULL, NULL);
-
-                } else {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Cannot Open SQL Database!\n&quot;);
-                        status = SWITCH_STATUS_FALSE;
-                        goto done;
-                }
-                switch_core_db_close(db);
</del><ins>+                sql = switch_mprintf(&quot;delete from limit_data where hostname='%q';&quot;, 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(&quot;delete from limit_data where hostname='%q';&quot;, 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(&amp;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_branch_repairsrcmodapplicationsmod_voicemailmod_voicemailc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_voicemail/mod_voicemail.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_voicemail/mod_voicemail.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/applications/mod_voicemail/mod_voicemail.c        2009-11-29 05:19:09 UTC (rev 15705)
</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">@@ -153,81 +152,89 @@
</span><span class="cx"> };
</span><span class="cx"> typedef struct vm_profile vm_profile_t;
</span><span class="cx"> 
</span><ins>+
+switch_cache_db_handle_t *vm_get_db_handle(vm_profile_t *profile)
+{
+        switch_cache_db_connection_options_t options = { {0} };
+        switch_cache_db_handle_t *dbh = NULL;
+        
+        if (profile-&gt;odbc_dsn &amp;&amp; profile-&gt;odbc_user &amp;&amp; profile-&gt;odbc_pass) {
+                options.odbc_options.dsn = profile-&gt;odbc_dsn;
+                options.odbc_options.user = profile-&gt;odbc_user;
+                options.odbc_options.pass = profile-&gt;odbc_pass;
+
+                if (switch_cache_db_get_db_handle(&amp;dbh, SCDB_TYPE_ODBC, &amp;options) != SWITCH_STATUS_SUCCESS) dbh = NULL;
+                return dbh;
+        } else {
+                options.core_db_options.db_path = profile-&gt;dbname;
+                if (switch_cache_db_get_db_handle(&amp;dbh, SCDB_TYPE_CORE_DB, &amp;options) != SWITCH_STATUS_SUCCESS) dbh = NULL;
+                return dbh;
+        }
+}
+
+
</ins><span class="cx"> static switch_status_t vm_execute_sql(vm_profile_t *profile, 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() &amp;&amp; profile-&gt;odbc_dsn) {
-                switch_odbc_statement_handle_t stmt;
-                if (switch_odbc_handle_exec(profile-&gt;master_odbc, sql, &amp;stmt) != SWITCH_ODBC_SUCCESS) {
-                        char *err_str;
-                        err_str = switch_odbc_handle_get_error(profile-&gt;master_odbc, stmt);
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;ERR: [%s]\n[%s]\n&quot;, sql, switch_str_nil(err_str));
-                        switch_safe_free(err_str);
-                        status = SWITCH_STATUS_FALSE;
-                }
-                switch_odbc_statement_handle_free(&amp;stmt);
-        } else {
-                if (!(db = switch_core_db_open_file(profile-&gt;dbname))) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error Opening DB %s\n&quot;, profile-&gt;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 = vm_get_db_handle(profile))) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error Opening DB\n&quot;);
+                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(&amp;dbh);
+
</ins><span class="cx">         if (mutex) {
</span><span class="cx">                 switch_mutex_unlock(mutex);
</span><span class="cx">         }
</span><ins>+
</ins><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> static switch_bool_t vm_execute_sql_callback(vm_profile_t *profile, 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() &amp;&amp; profile-&gt;odbc_dsn) {
-                switch_odbc_handle_callback_exec(profile-&gt;master_odbc, sql, callback, pdata, NULL);
-        } else {
-                if (!(db = switch_core_db_open_file(profile-&gt;dbname))) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error Opening DB %s\n&quot;, profile-&gt;dbname);
-                        goto end;
-                }
</del><ins>+        if (!(dbh = vm_get_db_handle(profile))) {
+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error Opening DB\n&quot;);
+        goto end;
+    }
+        
+        switch_cache_db_execute_sql_callback(dbh, sql, callback, pdata, &amp;errmsg);
</ins><span class="cx"> 
</span><del>-                switch_core_db_exec(db, sql, callback, pdata, &amp;errmsg);
-
-                if (errmsg) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;SQL ERR: [%s] %s\n&quot;, sql, errmsg);
-                        free(errmsg);
-                }
-
-                if (db) {
-                        switch_core_db_close(db);
-                }
</del><ins>+        if (errmsg) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;SQL ERR: [%s] %s\n&quot;, 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(&amp;dbh);
+
</ins><span class="cx">         if (mutex) {
</span><span class="cx">                 switch_mutex_unlock(mutex);
</span><span class="cx">         }
</span><ins>+
</ins><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> static char vm_sql[] =
</span><span class="cx">         &quot;CREATE TABLE voicemail_msgs (\n&quot;
</span><span class="cx">         &quot;   created_epoch INTEGER,\n&quot;
</span><span class="lines">@@ -268,10 +275,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, &quot;Destroying Profile %s\n&quot;, profile-&gt;name);
</span><del>-        if (switch_odbc_available() &amp;&amp; profile-&gt;odbc_dsn &amp;&amp; profile-&gt;master_odbc) {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Closing ODBC Database! %s\n&quot;, profile-&gt;name);
-                switch_odbc_handle_destroy(&amp;profile-&gt;master_odbc);
-        }
</del><span class="cx">         switch_core_destroy_memory_pool(&amp;profile-&gt;pool);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -607,6 +610,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, &amp;cfg, NULL))) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Open of %s failed\n&quot;, global_cf);
</span><span class="lines">@@ -618,8 +622,8 @@
</span><span class="cx"> 
</span><span class="cx">         if ((x_profile = switch_xml_find_child(x_profiles, &quot;profile&quot;, &quot;name&quot;, 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><ins>+                char *errmsg;
</ins><span class="cx"> 
</span><span class="cx">                 if (switch_core_new_memory_pool(&amp;pool) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Pool Failure\n&quot;);
</span><span class="lines">@@ -679,96 +683,23 @@
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 profile-&gt;dbname = switch_core_sprintf(profile-&gt;pool, &quot;voicemail_%s&quot;, profile_name);
</span><del>-                if (switch_odbc_available() &amp;&amp; profile-&gt;odbc_dsn) {
-                        if (!(profile-&gt;master_odbc = switch_odbc_handle_new(profile-&gt;odbc_dsn, profile-&gt;odbc_user, profile-&gt;odbc_pass))) {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Cannot Open ODBC Database!\n&quot;);
-                                goto end;
</del><span class="cx"> 
</span><del>-                        }
-                        if (switch_odbc_handle_connect(profile-&gt;master_odbc) != SWITCH_ODBC_SUCCESS) {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Cannot Open ODBC Database!\n&quot;);
-                                goto end;
-                        }
-
-                        if (switch_odbc_handle_exec(profile-&gt;master_odbc, &quot;select count(message_len) from voicemail_msgs&quot;, NULL) != SWITCH_ODBC_SUCCESS) {
-                                switch_odbc_handle_exec(profile-&gt;master_odbc, &quot;drop table voicemail_msgs&quot;, NULL);
-                                switch_odbc_handle_exec(profile-&gt;master_odbc, vm_sql, NULL);
-                        }
-
-                        if (switch_odbc_handle_exec(profile-&gt;master_odbc, &quot;select count(username) from voicemail_prefs&quot;, NULL) != SWITCH_ODBC_SUCCESS) {
-                                switch_odbc_handle_exec(profile-&gt;master_odbc, &quot;drop table voicemail_prefs&quot;, NULL);
-                                switch_odbc_handle_exec(profile-&gt;master_odbc, vm_pref_sql, NULL);
-                        }
-
-                        if (switch_odbc_handle_exec(profile-&gt;master_odbc, &quot;select count(password) from voicemail_prefs&quot;, NULL) != SWITCH_ODBC_SUCCESS) {
-                                switch_odbc_handle_exec(profile-&gt;master_odbc, &quot;alter table voicemail_prefs add password varchar(255)&quot;, NULL);
-                        }
-
-                        if (switch_odbc_handle_exec(profile-&gt;master_odbc, &quot;select count(message_len) from voicemail_data&quot;, NULL) == SWITCH_ODBC_SUCCESS) {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Old table voicemail_data found, migrating data!\n&quot;);
-                                /* XXX: Old table found.. migrating data into new table */
-                                if (switch_odbc_handle_exec(profile-&gt;master_odbc,
-                                                                                        &quot;insert into voicemail_msgs (created_epoch, read_epoch, username, domain, uuid, cid_name, cid_number, &quot;
-                                                                                        &quot;in_folder, file_path, message_len, flags, read_flags) &quot;
-                                                                                        &quot;select created_epoch, read_epoch, user, domain, uuid, &quot;
-                                                                                        &quot;cid_name, cid_number, in_folder, file_path, message_len, flags, read_flags from voicemail_data&quot;,
-                                                                                        NULL) != SWITCH_ODBC_SUCCESS) {
-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Failed to migrate old voicemail_data to voicemail_msgs!\n&quot;);
-                                        goto end;
-                                }
-                                switch_odbc_handle_exec(profile-&gt;master_odbc, &quot;drop table voicemail_data&quot;, NULL);
-                        }
-
-                        for (x = 0; vm_index_list[x]; x++) {
-                                switch_odbc_handle_exec(profile-&gt;master_odbc, vm_index_list[x], NULL);
-                        }
-                } else {
-                        if ((db = switch_core_db_open_file(profile-&gt;dbname))) {
-                                char *errmsg;
-                                switch_core_db_test_reactive(db, &quot;select count(message_len) from voicemail_msgs&quot;, &quot;drop table voicemail_msgs&quot;, vm_sql);
-
-                                switch_core_db_exec(db, &quot;select count(message_len) from voicemail_data&quot;, NULL, NULL, &amp;errmsg);
-                                if (errmsg) {
-                                        switch_core_db_free(errmsg);
-                                        errmsg = NULL;
-                                } else {
-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Migrating data from voicemail_data to voicemail_msgs!\n&quot;);
-                                        switch_core_db_exec(db, &quot;insert into voicemail_msgs (created_epoch, read_epoch, username, domain, uuid, cid_name, cid_number, &quot;
-                                                                                &quot;in_folder, file_path, message_len, flags, read_flags) &quot;
-                                                                                &quot;select created_epoch, read_epoch, user, domain, uuid, &quot;
-                                                                                &quot;cid_name, cid_number, in_folder, file_path, message_len, flags, read_flags from voicemail_data&quot;,
-                                                                                NULL, NULL, &amp;errmsg);
-                                        if (errmsg) {
-                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;SQL ERR [%s]\n&quot;, errmsg);
-                                                switch_core_db_free(errmsg);
-                                                errmsg = NULL;
-                                        }
-                                        switch_core_db_exec(db, &quot;drop table voicemail_data&quot;, NULL, NULL, &amp;errmsg);
-                                        if (errmsg) {
-                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;SQL ERR [%s]\n&quot;, errmsg);
-                                                switch_core_db_free(errmsg);
-                                                errmsg = NULL;
-                                        }
-                                }
-
-
-                                switch_core_db_test_reactive(db, &quot;select count(username) from voicemail_prefs&quot;, &quot;drop table voicemail_prefs&quot;, vm_pref_sql);
-                                switch_core_db_test_reactive(db, &quot;select count(password) from voicemail_prefs&quot;, NULL, 
-                                                                                                 &quot;alter table voicemail_prefs add password varchar(255)&quot;);
-
-                                for (x = 0; vm_index_list[x]; x++) {
-                                        errmsg = NULL;
-                                        switch_core_db_exec(db, vm_index_list[x], NULL, NULL, &amp;errmsg);
-                                        switch_safe_free(errmsg);
-                                }
-
-                        } else {
-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Cannot Open SQL Database!\n&quot;);
-                                goto end;
-                        }
-                        switch_core_db_close(db);
</del><ins>+                if (!(dbh = vm_get_db_handle(profile))) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, &quot;Cannot open DB!\n&quot;);
+                        goto end;
</ins><span class="cx">                 }
</span><ins>+                
+                switch_cache_db_test_reactive(dbh, &quot;select count(message_len) from voicemail_msgs&quot;, &quot;drop table voicemail_msgs&quot;, vm_sql);
+                switch_cache_db_test_reactive(dbh, &quot;select count(username) from voicemail_prefs&quot;, &quot;drop table voicemail_prefs&quot;, vm_pref_sql);
+                switch_cache_db_test_reactive(dbh, &quot;select count(password) from voicemail_prefs&quot;, NULL, &quot;alter table voicemail_prefs add password varchar(255)&quot;);
+                
+                for (x = 0; vm_index_list[x]; x++) {
+                        errmsg = NULL;
+                        switch_cache_db_execute_sql(dbh, vm_index_list[x], &amp;errmsg);
+                        switch_safe_free(errmsg);
+                }
</ins><span class="cx"> 
</span><ins>+                switch_cache_db_release_db_handle(&amp;dbh);
</ins><span class="cx"> 
</span><span class="cx">                 switch_mutex_init(&amp;profile-&gt;mutex, SWITCH_MUTEX_NESTED, profile-&gt;pool);
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, &quot;Added Profile %s\n&quot;, profile-&gt;name);
</span><span class="lines">@@ -776,6 +707,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">   end:
</span><ins>+        switch_cache_db_release_db_handle(&amp;dbh);
</ins><span class="cx">         if (xml) {
</span><span class="cx">                 switch_xml_free(xml);
</span><span class="cx">         }
</span><span class="lines">@@ -1058,6 +990,38 @@
</span><span class="cx"> };
</span><span class="cx"> typedef struct callback callback_t;
</span><span class="cx"> 
</span><ins>+struct msg_cnt_callback {
+        char *buf;
+        size_t len;
+        int matches;
+        int total_new_messages;
+        int total_new_urgent_messages;
+        int total_saved_messages;
+        int total_saved_urgent_messages;
+};
+typedef struct msg_cnt_callback msg_cnt_callback_t;
+
+
+static int message_count_callback(void *pArg, int argc, char **argv, char **columnNames)
+{
+        msg_cnt_callback_t *cbt = (msg_cnt_callback_t *) pArg;
+        if (atoi(argv[0]) == 1) { /* UnRead */
+                if (!strcasecmp(argv[1], &quot;A_URGENT&quot;)) { /* Urgent */
+                        cbt-&gt;total_new_urgent_messages = atoi(argv[2]);
+                } else { /* Normal */
+                        cbt-&gt;total_new_messages = atoi(argv[2]);
+                }
+        } else { /* Already Read */
+                if (!strcasecmp(argv[1], &quot;A_URGENT&quot;)) { /* Urgent */
+                        cbt-&gt;total_saved_urgent_messages = atoi(argv[2]);
+                } else { /* Normal */
+                        cbt-&gt;total_saved_messages = atoi(argv[2]);
+                }
+        }
+
+        return 0;
+}
+
</ins><span class="cx"> static int sql2str_callback(void *pArg, int argc, char **argv, char **columnNames)
</span><span class="cx"> {
</span><span class="cx">         callback_t *cbt = (callback_t *) pArg;
</span><span class="lines">@@ -1290,42 +1254,35 @@
</span><span class="cx">         return ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void message_count(vm_profile_t *profile, const char *id_in, const char *domain_name, const char *myfolder,
-                                                  int *total_new_messages, int *total_saved_messages, int *total_new_urgent_messages, int *total_saved_urgent_messages)
</del><ins>+static void message_count(vm_profile_t *profile, const char *id_in, const char *domain_name, const char *myfolder, int *total_new_messages, 
+                int *total_saved_messages, int *total_new_urgent_messages, int *total_saved_urgent_messages)
</ins><span class="cx"> {
</span><span class="cx">         char msg_count[80] = &quot;&quot;;
</span><del>-        callback_t cbt = { 0 };
</del><ins>+        msg_cnt_callback_t cbt = { 0 };
</ins><span class="cx">         char sql[256];
</span><span class="cx">         char *myid = NULL;
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx">         cbt.buf = msg_count;
</span><span class="cx">         cbt.len = sizeof(msg_count);
</span><del>-        
</del><ins>+
+        cbt.total_new_messages = 0;
+        cbt.total_new_urgent_messages = 0;
+        cbt.total_saved_messages = 0;
+        cbt.total_saved_urgent_messages = 0;
+
</ins><span class="cx">         myid = resolve_id(id_in, domain_name, &quot;message-count&quot;);
</span><del>-        
-        switch_snprintf(sql, sizeof(sql),
-                                        &quot;select count(*) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' and read_epoch=0&quot;,
-                                        myid, domain_name, myfolder);
-        vm_execute_sql_callback(profile, profile-&gt;mutex, sql, sql2str_callback, &amp;cbt);
-        *total_new_messages = atoi(msg_count);
</del><span class="cx"> 
</span><span class="cx">         switch_snprintf(sql, sizeof(sql),
</span><del>-                                        &quot;select count(*) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' and read_epoch=0 and read_flags='%s'&quot;,
-                                        myid, domain_name, myfolder, URGENT_FLAG_STRING);
-        vm_execute_sql_callback(profile, profile-&gt;mutex, sql, sql2str_callback, &amp;cbt);
-        *total_new_urgent_messages = atoi(msg_count);
</del><ins>+                                        &quot;select read_epoch=0, read_flags, count(read_epoch) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' group by read_epoch=0,read_flags;&quot;,
+                                                myid, domain_name, myfolder);
</ins><span class="cx"> 
</span><del>-        switch_snprintf(sql, sizeof(sql),
-                                        &quot;select count(*) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' and read_epoch!=0&quot;,
-                                        myid, domain_name, myfolder);
-        vm_execute_sql_callback(profile, profile-&gt;mutex, sql, sql2str_callback, &amp;cbt);
-        *total_saved_messages = atoi(msg_count);
</del><ins>+        vm_execute_sql_callback(profile, profile-&gt;mutex, sql, message_count_callback, &amp;cbt);
</ins><span class="cx"> 
</span><del>-        switch_snprintf(sql, sizeof(sql),
-                                        &quot;select count(*) from voicemail_msgs where username='%s' and domain='%s' and in_folder='%s' and read_epoch!=0 and read_flags='%s'&quot;,
-                                        myid, domain_name, myfolder, URGENT_FLAG_STRING);
-        vm_execute_sql_callback(profile, profile-&gt;mutex, sql, sql2str_callback, &amp;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">@@ -1471,8 +1428,9 @@
</span><span class="cx"> 
</span><span class="cx">                 args.input_callback = cancel_on_dtmf;
</span><span class="cx"> 
</span><del>-                switch_snprintf(key_buf, sizeof(key_buf), &quot;%s:%s:%s:%s:%s:%s&quot;, profile-&gt;listen_file_key, profile-&gt;save_file_key, 
-                                                profile-&gt;delete_file_key, profile-&gt;email_key, profile-&gt;callback_key, profile-&gt;forward_key);
</del><ins>+                switch_snprintf(key_buf, sizeof(key_buf), &quot;%s:%s:%s:%s:%s:%s%s%s&quot;, profile-&gt;listen_file_key, profile-&gt;save_file_key, 
+                                                profile-&gt;delete_file_key, profile-&gt;email_key, profile-&gt;callback_key, 
+                                                profile-&gt;forward_key, cbt-&gt;email ? &quot;:&quot; : &quot;&quot;, cbt-&gt;email ? cbt-&gt;email : &quot;&quot;);
</ins><span class="cx">                                                 
</span><span class="cx"> 
</span><span class="cx">                 switch_snprintf(input, sizeof(input), &quot;%s:%d&quot;, cbt-&gt;type == MSG_NEW ? &quot;new&quot; : &quot;saved&quot;, cbt-&gt;want + 1);
</span><span class="lines">@@ -1746,7 +1704,7 @@
</span><span class="cx">         int total_new_urgent_messages = 0;
</span><span class="cx">         int total_saved_urgent_messages = 0;
</span><span class="cx">         int heard_auto_saved = 0, heard_auto_new = 0;
</span><del>-        char *vm_email = NULL;
</del><ins>+        char *vm_email = NULL, *email_addr = NULL;
</ins><span class="cx">         char *convert_cmd = profile-&gt;convert_cmd;
</span><span class="cx">         char *convert_ext = profile-&gt;convert_ext;
</span><span class="cx">         char *vm_storage_dir = NULL;
</span><span class="lines">@@ -1863,7 +1821,7 @@
</span><span class="cx">                                 message_count(profile, myid, domain_name, myfolder, &amp;total_new_messages, &amp;total_saved_messages,
</span><span class="cx">                                                           &amp;total_new_urgent_messages, &amp;total_saved_urgent_messages);
</span><span class="cx">                                 memset(&amp;cbt, 0, sizeof(cbt));
</span><del>-                                cbt.email = vm_email;
</del><ins>+                                cbt.email = vm_email ? vm_email : email_addr;
</ins><span class="cx">                                 cbt.convert_cmd = convert_cmd;
</span><span class="cx">                                 cbt.convert_ext = convert_ext;
</span><span class="cx">                                 cbt.move = VM_MOVE_NEXT;
</span><span class="lines">@@ -2179,6 +2137,9 @@
</span><span class="cx">                                                 }
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;vm-mailto&quot;)) {
</span><span class="cx">                                                 vm_email = switch_core_session_strdup(session, val);
</span><ins>+                                                email_addr = switch_core_session_strdup(session, val);
+                                        } else if (!strcasecmp(var, &quot;email-addr&quot;)) {
+                                                email_addr = switch_core_session_strdup(session, val);
</ins><span class="cx">                                         } else if (!strcasecmp(var, &quot;vm-convert-cmd&quot;)) {
</span><span class="cx">                                                 convert_cmd = switch_core_session_strdup(session, val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;vm-convert-ext&quot;)) {
</span><span class="lines">@@ -4157,10 +4118,6 @@
</span><span class="cx">                 
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Destroying Profile %s\n&quot;, profile-&gt;name);
</span><span class="cx"> 
</span><del>-                if (switch_odbc_available() &amp;&amp; profile-&gt;odbc_dsn &amp;&amp; profile-&gt;master_odbc) {
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, &quot;Closing ODBC Database! %s\n&quot;, profile-&gt;name);
-                        switch_odbc_handle_destroy(&amp;profile-&gt;master_odbc);
-                }
</del><span class="cx">                 switch_core_destroy_memory_pool(&amp;profile-&gt;pool);
</span><span class="cx">                 profile = NULL;
</span><span class="cx">         }
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_portaudiomod_portaudioc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_portaudio/mod_portaudio.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_portaudio/mod_portaudio.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_portaudio/mod_portaudio.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -846,8 +846,8 @@
</span><span class="cx">         switch_console_set_complete(&quot;add pa indev&quot;);
</span><span class="cx">         switch_console_set_complete(&quot;add pa outdev&quot;);
</span><span class="cx">         switch_console_set_complete(&quot;add pa ringdev&quot;);
</span><ins>+        switch_console_set_complete(&quot;add pa ringfile&quot;);
</ins><span class="cx">         switch_console_set_complete(&quot;add pa play&quot;);
</span><del>-        switch_console_set_complete(&quot;add pa ringtest&quot;);
</del><span class="cx">         switch_console_set_complete(&quot;add pa looptest&quot;);
</span><span class="cx"> 
</span><span class="cx">         /* indicate that the module should continue to be loaded */
</span><span class="lines">@@ -1833,6 +1833,7 @@
</span><span class="cx">                 &quot;pa outdev #&lt;num&gt;|&lt;partial name&gt;\n&quot;
</span><span class="cx">                 &quot;pa ringdev #&lt;num&gt;|&lt;partial name&gt;\n&quot;
</span><span class="cx">                 &quot;pa play [ringtest|&lt;filename&gt;]\n&quot;
</span><ins>+                &quot;pa ringfile [filename]\n&quot;
</ins><span class="cx">                 &quot;pa looptest\n&quot; &quot;--------------------------------------------------------------------------------\n&quot;;
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -2060,6 +2061,27 @@
</span><span class="cx">                         stream-&gt;write_function(stream, &quot;Failed to engage audio device\n&quot;);
</span><span class="cx">                 }
</span><span class="cx">                 goto done;
</span><ins>+        } else if (!strcasecmp(argv[0], &quot;ringfile&quot;)) {
+                if (argv[1]) {
+                        if (engage_device(0) == SWITCH_STATUS_SUCCESS) {
+                                switch_file_handle_t fh = { 0 };
+                                if (switch_core_file_open(&amp;fh,
+                                                        argv[1],
+                                                        globals.read_codec.implementation-&gt;number_of_channels,
+                                                        globals.read_codec.implementation-&gt;actual_samples_per_second,
+                                                        SWITCH_FILE_FLAG_READ | SWITCH_FILE_DATA_SHORT, NULL) == SWITCH_STATUS_SUCCESS) {
+                                        switch_core_file_close(&amp;fh);
+                                        set_global_ring_file(argv[1]);
+                                } else {
+                                        stream-&gt;write_function(stream, &quot;Unable to open ring file %s\n&quot;, argv[1]);
+                                }
+                        } else {
+                                stream-&gt;write_function(stream, &quot;Failed to engage audio device\n&quot;);
+                        }
+                } else {
+                        stream-&gt;write_function(stream, &quot;%s&quot;, globals.ring_file);
+                }
+                goto done;
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (func) {
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_skypiaxskypiax_protocolc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_skypiax/skypiax_protocol.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_skypiax/skypiax_protocol.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_skypiax/skypiax_protocol.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-        sockbufsize=SAMPLES_PER_FRAME * 8;
</del><ins>+        sockbufsize=SAMPLES_PER_FRAME * 8 * 3;
</ins><span class="cx">         size = sizeof(int);
</span><span class="cx">         setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&amp;sockbufsize, size);
</span><span class="cx"> 
</span><span class="lines">@@ -98,7 +98,7 @@
</span><span class="cx">         getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&amp;sockbufsize, &amp;size);
</span><span class="cx">         DEBUGA_SKYPE(&quot;2 SO_RCVBUF is %d, size is %d\n&quot;, SKYPIAX_P_LOG, sockbufsize, size);
</span><span class="cx"> 
</span><del>-        sockbufsize=SAMPLES_PER_FRAME * 8;
</del><ins>+        sockbufsize=SAMPLES_PER_FRAME * 8 * 3;
</ins><span class="cx">         size = sizeof(int);
</span><span class="cx">         setsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *)&amp;sockbufsize, size);
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiamod_sofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/mod_sofia.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/mod_sofia.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/mod_sofia.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -121,10 +121,12 @@
</span><span class="cx"> static switch_status_t sofia_on_routing(switch_core_session_t *session)
</span><span class="cx"> {
</span><span class="cx">         private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
</span><ins>+        switch_channel_t *channel = switch_core_session_get_channel(session);
</ins><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><span class="cx">         if (!sofia_test_flag(tech_pvt, TFLAG_HOLD_LOCK)) {
</span><span class="cx">                 sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%s SOFIA ROUTING\n&quot;, switch_channel_get_name(switch_core_session_get_channel(session)));
</span><span class="lines">@@ -136,10 +138,12 @@
</span><span class="cx"> static switch_status_t sofia_on_reset(switch_core_session_t *session)
</span><span class="cx"> {
</span><span class="cx">         private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
</span><ins>+        switch_channel_t *channel = switch_core_session_get_channel(session);
</ins><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><span class="cx">         if (!sofia_test_flag(tech_pvt, TFLAG_HOLD_LOCK)) {
</span><span class="cx">                 sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%s SOFIA RESET\n&quot;, switch_channel_get_name(switch_core_session_get_channel(session)));
</span><span class="lines">@@ -151,10 +155,12 @@
</span><span class="cx"> static switch_status_t sofia_on_hibernate(switch_core_session_t *session)
</span><span class="cx"> {
</span><span class="cx">         private_object_t *tech_pvt = switch_core_session_get_private(session);
</span><ins>+        switch_channel_t *channel = switch_core_session_get_channel(session);
</ins><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><span class="cx">         if (!sofia_test_flag(tech_pvt, TFLAG_HOLD_LOCK)) {
</span><span class="cx">                 sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%s SOFIA HIBERNATE\n&quot;, switch_channel_get_name(switch_core_session_get_channel(session)));
</span><span class="lines">@@ -165,10 +171,12 @@
</span><span class="cx"> static switch_status_t sofia_on_execute(switch_core_session_t *session)
</span><span class="cx"> {
</span><span class="cx">         private_object_t *tech_pvt = (private_object_t *) switch_core_session_get_private(session);
</span><ins>+        switch_channel_t *channel = switch_core_session_get_channel(session);
</ins><span class="cx">         switch_assert(tech_pvt != NULL);
</span><span class="cx"> 
</span><span class="cx">         if (!sofia_test_flag(tech_pvt, TFLAG_HOLD_LOCK)) {
</span><span class="cx">                 sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">         }
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;%s SOFIA EXECUTE\n&quot;, switch_channel_get_name(switch_core_session_get_channel(session)));
</span><span class="cx"> 
</span><span class="lines">@@ -347,32 +355,6 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (sofia_test_flag(tech_pvt, TFLAG_SIP_HOLD) &amp;&amp; cause != SWITCH_CAUSE_ATTENDED_TRANSFER) {
-                const char *buuid;
-                switch_core_session_t *bsession;
-                switch_channel_t *bchannel;
-                const char *lost_ext;
-
-                if (tech_pvt-&gt;max_missed_packets) {
-                        switch_rtp_set_max_missed_packets(tech_pvt-&gt;rtp_session, tech_pvt-&gt;max_missed_packets);
-                }
-                switch_channel_presence(tech_pvt-&gt;channel, &quot;unknown&quot;, &quot;unhold&quot;, NULL);
-
-                if ((buuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
-                        if ((bsession = switch_core_session_locate(buuid))) {
-                                bchannel = switch_core_session_get_channel(bsession);
-                                if (switch_channel_test_flag(bchannel, CF_BROADCAST)) {
-                                        if ((lost_ext = switch_channel_get_variable(bchannel, &quot;left_hanging_extension&quot;))) {
-                                                switch_ivr_session_transfer(bsession, lost_ext, NULL, NULL);
-                                        }
-                                        switch_channel_stop_broadcast(bchannel);
-                                }
-                                switch_core_session_rwunlock(bsession);
-                        }
-                }
-                sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
-        }
-
</del><span class="cx">         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Channel %s hanging up, cause: %s\n&quot;,
</span><span class="cx">                                           switch_channel_get_name(channel), switch_channel_cause2str(cause));
</span><span class="cx"> 
</span><span class="lines">@@ -665,6 +647,7 @@
</span><span class="cx">                                         if (sofia_test_flag(tech_pvt, TFLAG_SIP_HOLD)) {
</span><span class="cx">                                                 sofia_glue_toggle_hold(tech_pvt, 0);
</span><span class="cx">                                                 sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">                                         }
</span><span class="cx">                                         switch_channel_hangup(tech_pvt-&gt;channel, SWITCH_CAUSE_MEDIA_TIMEOUT);
</span><span class="cx">                                 }
</span><span class="lines">@@ -780,6 +763,7 @@
</span><span class="cx">                                         if (sofia_test_flag(tech_pvt, TFLAG_SIP_HOLD)) {
</span><span class="cx">                                                 sofia_glue_toggle_hold(tech_pvt, 0);
</span><span class="cx">                                                 sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">                                         }
</span><span class="cx">                                         
</span><span class="cx">                                         switch_channel_hangup(tech_pvt-&gt;channel, SWITCH_CAUSE_MEDIA_TIMEOUT);
</span><span class="lines">@@ -1446,6 +1430,7 @@
</span><span class="cx">         case SWITCH_MESSAGE_INDICATE_HOLD:
</span><span class="cx">                 {
</span><span class="cx">                         sofia_set_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                        switch_channel_set_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">                         sofia_glue_do_invite(session);
</span><span class="cx">                         if (!zstr(msg-&gt;string_arg)) {
</span><span class="cx">                                 char message[256] = &quot;&quot;;
</span><span class="lines">@@ -1470,6 +1455,7 @@
</span><span class="cx">         case SWITCH_MESSAGE_INDICATE_UNHOLD:
</span><span class="cx">                 {
</span><span class="cx">                         sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                        switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">                         sofia_glue_do_invite(session);
</span><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="lines">@@ -1935,6 +1921,7 @@
</span><span class="cx">                                 stream-&gt;write_function(stream, &quot;Freq    \t%d\n&quot;, gp-&gt;freq);
</span><span class="cx">                                 stream-&gt;write_function(stream, &quot;Ping    \t%d\n&quot;, gp-&gt;ping);
</span><span class="cx">                                 stream-&gt;write_function(stream, &quot;PingFreq\t%d\n&quot;, gp-&gt;ping_freq);
</span><ins>+                                stream-&gt;write_function(stream, &quot;PingState\t%d/%d/%d\n&quot;, gp-&gt;ping_min, gp-&gt;ping_count, gp-&gt;ping_max);
</ins><span class="cx">                                 stream-&gt;write_function(stream, &quot;State   \t%s\n&quot;, sofia_state_names[gp-&gt;state]);
</span><span class="cx">                                 stream-&gt;write_function(stream, &quot;Status  \t%s%s\n&quot;, status_names[gp-&gt;status], gp-&gt;pinging ? &quot; (ping)&quot; : &quot;&quot;);
</span><span class="cx">                                 stream-&gt;write_function(stream, &quot;CallsIN \t%d\n&quot;, gp-&gt;ib_calls);
</span><span class="lines">@@ -1979,7 +1966,9 @@
</span><span class="cx">                                         }
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;HOLD-MUSIC       \t%s\n&quot;, zstr(profile-&gt;hold_music) ? &quot;N/A&quot; : profile-&gt;hold_music);
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;OUTBOUND-PROXY   \t%s\n&quot;, zstr(profile-&gt;outbound_proxy) ? &quot;N/A&quot; : profile-&gt;outbound_proxy);
</span><del>-                                        stream-&gt;write_function(stream, &quot;CODECS           \t%s\n&quot;, switch_str_nil(profile-&gt;codec_string));
</del><ins>+                                        stream-&gt;write_function(stream, &quot;CODECS IN        \t%s\n&quot;, switch_str_nil(profile-&gt;inbound_codec_string));
+                                        stream-&gt;write_function(stream, &quot;CODECS OUT       \t%s\n&quot;, switch_str_nil(profile-&gt;outbound_codec_string));
+
</ins><span class="cx">                                         stream-&gt;write_function(stream, &quot;TEL-EVENT        \t%d\n&quot;, profile-&gt;te);
</span><span class="cx">                                         if (profile-&gt;dtmf_type == DTMF_2833) {
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;DTMF-MODE        \trfc2833\n&quot;);
</span><span class="lines">@@ -2199,7 +2188,9 @@
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;tls-bind-url&gt;%s&lt;/tls-bind-url&gt;\n&quot;, switch_str_nil(profile-&gt;tls_bindurl));
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;hold-music&gt;%s&lt;/hold-music&gt;\n&quot;, zstr(profile-&gt;hold_music) ? &quot;N/A&quot; : profile-&gt;hold_music);
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;outbound-proxy&gt;%s&lt;/outbound-proxy&gt;\n&quot;, zstr(profile-&gt;outbound_proxy) ? &quot;N/A&quot; : profile-&gt;outbound_proxy);
</span><del>-                                        stream-&gt;write_function(stream, &quot;    &lt;codecs&gt;%s&lt;/codecs&gt;\n&quot;, switch_str_nil(profile-&gt;codec_string));
</del><ins>+                                        stream-&gt;write_function(stream, &quot;    &lt;inbound-codecs&gt;%s&lt;/inbound-codecs&gt;\n&quot;, switch_str_nil(profile-&gt;inbound_codec_string));
+                                        stream-&gt;write_function(stream, &quot;    &lt;outbound-codecs&gt;%s&lt;/outbound-codecs&gt;\n&quot;, switch_str_nil(profile-&gt;outbound_codec_string));
+
</ins><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;tel-event&gt;%d&lt;/tel-event&gt;\n&quot;, profile-&gt;te);
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;dtmf-mode&gt;rfc2833&lt;/dtmf-mode&gt;\n&quot;);
</span><span class="cx">                                         stream-&gt;write_function(stream, &quot;    &lt;dtmf-mode&gt;info&lt;/dtmf-mode&gt;\n&quot;);
</span><span class="lines">@@ -3083,6 +3074,8 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><ins>+        switch_channel_set_variable(nchannel, &quot;sip_profile_name&quot;, profile_name);
+
</ins><span class="cx">         sofia_glue_get_user_host(switch_core_session_strdup(nsession, tech_pvt-&gt;dest), NULL, &amp;tech_pvt-&gt;remote_ip);
</span><span class="cx"> 
</span><span class="cx">         if (dest_to) {
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiamod_sofiah"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/mod_sofia.h (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/mod_sofia.h        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/mod_sofia.h        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -201,6 +201,7 @@
</span><span class="cx">         PFLAG_SIPCOMPACT,
</span><span class="cx">         PFLAG_SQL_IN_TRANS,
</span><span class="cx">         PFLAG_PASS_CALLEE_ID,
</span><ins>+        PFLAG_LOG_AUTH_FAIL,
</ins><span class="cx">         /* No new flags below this line */
</span><span class="cx">         PFLAG_MAX
</span><span class="cx"> } PFLAGS;
</span><span class="lines">@@ -377,6 +378,9 @@
</span><span class="cx">         int pinging;
</span><span class="cx">         sofia_gateway_status_t status;
</span><span class="cx">         uint32_t ping_freq;
</span><ins>+        int ping_count;
+        int ping_max;
+        int ping_min;
</ins><span class="cx">         uint8_t flags[REG_FLAG_MAX];
</span><span class="cx">         int32_t retry_seconds;
</span><span class="cx">         reg_state_t state;
</span><span class="lines">@@ -455,7 +459,8 @@
</span><span class="cx">         switch_port_t sip_port;
</span><span class="cx">         switch_port_t tls_sip_port;
</span><span class="cx">         int tls_version;
</span><del>-        char *codec_string;
</del><ins>+        char *inbound_codec_string;
+        char *outbound_codec_string;
</ins><span class="cx">         int running;
</span><span class="cx">         int dtmf_duration;
</span><span class="cx">         uint8_t flags[TFLAG_MAX];
</span><span class="lines">@@ -701,6 +706,8 @@
</span><span class="cx"> 
</span><span class="cx"> void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt);
</span><span class="cx"> 
</span><ins>+const char *sofia_glue_get_codec_string(private_object_t *tech_pvt);
+
</ins><span class="cx"> void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *profile, private_object_t *tech_pvt, const char *channame);
</span><span class="cx"> 
</span><span class="cx"> switch_status_t sofia_glue_tech_choose_port(private_object_t *tech_pvt, int force);
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiasofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx">  * Marcel Barbulescu &lt;marcelbarbulescu@gmail.com&gt;
</span><span class="cx">  * Norman Brandinger
</span><span class="cx">  * Raymond Chandler &lt;intralanman@gmail.com&gt;
</span><ins>+ * Nathan Patrick &lt;npatrick at corp.sonic.net&gt;
</ins><span class="cx">  *
</span><span class="cx">  *
</span><span class="cx">  * sofia.c -- SOFIA SIP Endpoint (sofia code)
</span><span class="lines">@@ -1450,6 +1451,7 @@
</span><span class="cx">                         const char *sipip, *format;
</span><span class="cx">                         switch_uuid_t uuid;
</span><span class="cx">                         uint32_t ping_freq = 0, extension_in_contact = 0, distinct_to = 0;
</span><ins>+                        int ping_max = 0, ping_min = 0;
</ins><span class="cx">                         char *register_str = &quot;true&quot;, *scheme = &quot;Digest&quot;,
</span><span class="cx">                                 *realm = NULL,
</span><span class="cx">                                 *username = NULL,
</span><span class="lines">@@ -1479,8 +1481,10 @@
</span><span class="cx">                         gateway-&gt;next = NULL;
</span><span class="cx">                         gateway-&gt;ping = 0;
</span><span class="cx">                         gateway-&gt;ping_freq = 0;
</span><ins>+                        gateway-&gt;ping_max = 1;
+                        gateway-&gt;ping_min = -1;
+                        gateway-&gt;ping_count = 0;
</ins><span class="cx">                         
</span><del>-                        
</del><span class="cx">                         if ((x_params = switch_xml_child(gateway_tag, &quot;variables&quot;))) {
</span><span class="cx">                                 param = switch_xml_child(x_params, &quot;variable&quot;);
</span><span class="cx">                         } else {
</span><span class="lines">@@ -1551,6 +1555,10 @@
</span><span class="cx">                                         extension = val;
</span><span class="cx">                                 } else if (!strcmp(var, &quot;ping&quot;)) {
</span><span class="cx">                                         ping_freq = atoi(val);
</span><ins>+                                } else if (!strcmp(var, &quot;ping-max&quot;)) {
+                                        ping_max = atoi(val);
+                                } else if (!strcmp(var, &quot;ping-min&quot;)) {
+                                        ping_min = atoi(val);
</ins><span class="cx">                                 } else if (!strcmp(var, &quot;proxy&quot;)) {
</span><span class="cx">                                         proxy = val;
</span><span class="cx">                                 } else if (!strcmp(var, &quot;context&quot;)) {
</span><span class="lines">@@ -1590,6 +1598,8 @@
</span><span class="cx">                         if (ping_freq) {
</span><span class="cx">                                 if (ping_freq &gt;= 5) {
</span><span class="cx">                                         gateway-&gt;ping_freq = ping_freq;
</span><ins>+                                        gateway-&gt;ping_max = ping_max;
+                                        gateway-&gt;ping_min = ping_min;
</ins><span class="cx">                                         gateway-&gt;ping = switch_epoch_time_now(NULL) + ping_freq;
</span><span class="cx">                                 } else {
</span><span class="cx">                                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;ERROR: invalid ping!\n&quot;);
</span><span class="lines">@@ -1835,7 +1845,7 @@
</span><span class="cx">                         profile-&gt;ib_calls = 0;
</span><span class="cx">                         profile-&gt;ob_calls = 0;
</span><span class="cx">                         profile-&gt;ib_failed_calls = 0;
</span><del>-                        profile-&gt;ob_failed_calls = 0;
</del><ins>+                        profile-&gt;ob_failed_calls = 0;                
</ins><span class="cx"> 
</span><span class="cx">                         if (xprofiledomain) {
</span><span class="cx">                                 profile-&gt;domain_name = switch_core_strdup(profile-&gt;pool, xprofiledomain);
</span><span class="lines">@@ -1877,6 +1887,12 @@
</span><span class="cx">                                                 profile-&gt;user_agent = switch_core_strdup(profile-&gt;pool, val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;auto-restart&quot;)) {
</span><span class="cx">                                                 profile-&gt;auto_restart = switch_true(val);
</span><ins>+                                        } else if (!strcasecmp(var, &quot;log-auth-failures&quot;)) {
+                                                if (switch_true(val)) { 
+                                                        sofia_set_pflag(profile, PFLAG_LOG_AUTH_FAIL);
+                                                } else {
+                                                        sofia_clear_pflag(profile, PFLAG_LOG_AUTH_FAIL);
+                                                }
</ins><span class="cx">                                         } else if (!strcasecmp(var, &quot;dtmf-type&quot;)) {
</span><span class="cx">                                                 if (!strcasecmp(val, &quot;rfc2833&quot;)) {
</span><span class="cx">                                                         profile-&gt;dtmf_type = DTMF_2833;
</span><span class="lines">@@ -2163,7 +2179,12 @@
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;max-calls&quot;)) {
</span><span class="cx">                                                 profile-&gt;max_calls = atoi(val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;codec-prefs&quot;)) {
</span><del>-                                                profile-&gt;codec_string = switch_core_strdup(profile-&gt;pool, val);
</del><ins>+                                                profile-&gt;inbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                                profile-&gt;outbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                        } else if (!strcasecmp(var, &quot;inbound-codec-prefs&quot;)) {
+                                                profile-&gt;inbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                        } else if (!strcasecmp(var, &quot;outbound-codec-prefs&quot;)) {
+                                                profile-&gt;outbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
</ins><span class="cx">                                         } else if (!strcasecmp(var, &quot;challenge-realm&quot;)) {
</span><span class="cx">                                                 profile-&gt;challenge_realm = switch_core_strdup(profile-&gt;pool, val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;dtmf-duration&quot;)) {
</span><span class="lines">@@ -2432,6 +2453,12 @@
</span><span class="cx">                                                 profile-&gt;user_agent = switch_core_strdup(profile-&gt;pool, val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;auto-restart&quot;)) {
</span><span class="cx">                                                 profile-&gt;auto_restart = switch_true(val);
</span><ins>+                                        } else if (!strcasecmp(var, &quot;log-auth-failures&quot;)) {
+                                                if (switch_true(val)) { 
+                                                        sofia_set_pflag(profile, PFLAG_LOG_AUTH_FAIL);
+                                                } else {
+                                                        sofia_clear_pflag(profile, PFLAG_LOG_AUTH_FAIL);
+                                                }
</ins><span class="cx">                                         } else if (!strcasecmp(var, &quot;dtmf-type&quot;)) {
</span><span class="cx">                                                 if (!strcasecmp(val, &quot;rfc2833&quot;)) {
</span><span class="cx">                                                         profile-&gt;dtmf_type = DTMF_2833;
</span><span class="lines">@@ -2861,7 +2888,12 @@
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;max-calls&quot;)) {
</span><span class="cx">                                                 profile-&gt;max_calls = atoi(val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;codec-prefs&quot;)) {
</span><del>-                                                profile-&gt;codec_string = switch_core_strdup(profile-&gt;pool, val);
</del><ins>+                                                profile-&gt;inbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                                profile-&gt;outbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                        } else if (!strcasecmp(var, &quot;inbound-codec-prefs&quot;)) {
+                                                profile-&gt;inbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
+                                        } else if (!strcasecmp(var, &quot;outbound-codec-prefs&quot;)) {
+                                                profile-&gt;outbound_codec_string = switch_core_strdup(profile-&gt;pool, val);
</ins><span class="cx">                                         } else if (!strcasecmp(var, &quot;challenge-realm&quot;)) {
</span><span class="cx">                                                 profile-&gt;challenge_realm = switch_core_strdup(profile-&gt;pool, val);
</span><span class="cx">                                         } else if (!strcasecmp(var, &quot;dtmf-duration&quot;)) {
</span><span class="lines">@@ -3176,6 +3208,7 @@
</span><span class="cx">                                                                            tagi_t tags[])
</span><span class="cx"> {
</span><span class="cx">         sofia_gateway_t *gateway = NULL;
</span><ins>+        static const char *status_names[] = { &quot;DOWN&quot;, &quot;UP&quot;, NULL };
</ins><span class="cx"> 
</span><span class="cx">         if (sofia_private &amp;&amp; !zstr(sofia_private-&gt;gateway_name)) {
</span><span class="cx">                 gateway = sofia_reg_find_gateway(sofia_private-&gt;gateway_name);
</span><span class="lines">@@ -3187,15 +3220,35 @@
</span><span class="cx">                         if (gateway-&gt;state == REG_STATE_FAILED) {
</span><span class="cx">                                 gateway-&gt;state = REG_STATE_UNREGED;
</span><span class="cx">                         }
</span><del>-                        gateway-&gt;status = SOFIA_GATEWAY_UP;
</del><ins>+
+                        if (gateway-&gt;ping_count &lt; gateway-&gt;ping_max) {
+                                gateway-&gt;ping_count++;
+
+                                if (gateway-&gt;ping_count &gt;= 0) gateway-&gt;status = SOFIA_GATEWAY_UP;
+
+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
+                                        &quot;Ping succeeded %s with code %d - count %d/%d/%d, state %s\n&quot;,
+                                        gateway-&gt;name, status, gateway-&gt;ping_min, gateway-&gt;ping_count, gateway-&gt;ping_max,
+                                        status_names[gateway-&gt;status]);
+                        }
</ins><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Ping failed %s\n&quot;, gateway-&gt;name);
-                        gateway-&gt;status = SOFIA_GATEWAY_DOWN;
</del><span class="cx">                         if (gateway-&gt;state == REG_STATE_REGED) {
</span><span class="cx">                                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, &quot;Unregister %s\n&quot;, gateway-&gt;name);
</span><span class="cx">                                 gateway-&gt;state = REG_STATE_FAILED;
</span><span class="cx">                         }
</span><ins>+
+                        if (gateway-&gt;ping_count &gt; gateway-&gt;ping_min) {
+                                gateway-&gt;ping_count--;
+
+                                if (gateway-&gt;ping_count &lt;= 0) gateway-&gt;status = SOFIA_GATEWAY_DOWN;
+                        }
+
+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING,
+                                &quot;Ping failed %s with code %d - count %d/%d/%d, state %s\n&quot;,
+                                gateway-&gt;name, status, gateway-&gt;ping_min, gateway-&gt;ping_count, gateway-&gt;ping_max,
+                                status_names[gateway-&gt;status]);
</ins><span class="cx">                 }
</span><ins>+
</ins><span class="cx">                 gateway-&gt;ping = switch_epoch_time_now(NULL) + gateway-&gt;ping_freq;
</span><span class="cx">                 sofia_reg_release_gateway(gateway);
</span><span class="cx">                 gateway-&gt;pinging = 0;
</span><span class="lines">@@ -3657,7 +3710,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 if (sofia_test_flag(tech_pvt, TFLAG_LATE_NEGOTIATION) &amp;&amp; (parser = sdp_parse(NULL, r_sdp, (int) strlen(r_sdp), 0))) {
</span><span class="cx">                                         if ((sdp = sdp_session(parser))) {
</span><del>-                                                sofia_glue_set_r_sdp_codec_string(session, (tech_pvt-&gt;profile?tech_pvt-&gt;profile-&gt;codec_string:NULL), sdp);
</del><ins>+                                                sofia_glue_set_r_sdp_codec_string(session, sofia_glue_get_codec_string(tech_pvt), sdp);
</ins><span class="cx">                                         }
</span><span class="cx">                                         sdp_parser_free(parser);
</span><span class="cx">                                 }
</span><span class="lines">@@ -3821,6 +3874,7 @@
</span><span class="cx">                                                                                 switch_ivr_uuid_bridge(br_a, br_b);
</span><span class="cx">                                                                                 switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, &quot;ATTENDED_TRANSFER&quot;);
</span><span class="cx">                                                                                 sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                                                switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">                                                                                 sofia_clear_flag_locked(tech_pvt, TFLAG_HOLD_LOCK);
</span><span class="cx">                                                                                 switch_channel_hangup(channel, SWITCH_CAUSE_ATTENDED_TRANSFER);
</span><span class="cx">                                                                         } else {
</span><span class="lines">@@ -3964,10 +4018,12 @@
</span><span class="cx">                                                 if (sofia_test_flag(tech_pvt, TFLAG_SIP_HOLD)) {
</span><span class="cx">                                                         if (!switch_stristr(&quot;sendonly&quot;, r_sdp)) {
</span><span class="cx">                                                                 sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                                switch_channel_clear_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">                                                                 switch_channel_presence(tech_pvt-&gt;channel, &quot;unknown&quot;, &quot;unhold&quot;, NULL);
</span><span class="cx">                                                         }
</span><span class="cx">                                                 } else if (switch_stristr(&quot;sendonly&quot;, r_sdp)) {
</span><span class="cx">                                                         sofia_set_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                        switch_channel_set_flag(channel, CF_LEG_HOLDING);
</ins><span class="cx">                                                         switch_channel_presence(tech_pvt-&gt;channel, &quot;unknown&quot;, &quot;hold&quot;, NULL);
</span><span class="cx">                                                 }
</span><span class="cx">                                         
</span><span class="lines">@@ -4277,11 +4333,11 @@
</span><span class="cx"> {
</span><span class="cx">         nightmare_xfer_helper_t *nhelper = (nightmare_xfer_helper_t *) obj;
</span><span class="cx">         switch_memory_pool_t *pool;
</span><del>-        switch_status_t status;
</del><ins>+        switch_status_t status = SWITCH_STATUS_FALSE;
</ins><span class="cx">         switch_core_session_t *session, *a_session;
</span><span class="cx">         
</span><span class="cx">         if ((a_session = switch_core_session_locate(nhelper-&gt;bridge_to_uuid))) {
</span><del>-                switch_core_session_t *tsession;
</del><ins>+                switch_core_session_t *tsession = NULL;
</ins><span class="cx">                 switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
</span><span class="cx">                 uint32_t timeout = 60;
</span><span class="cx">                 char *tuuid_str;
</span><span class="lines">@@ -4290,34 +4346,32 @@
</span><span class="cx">                         private_object_t *tech_pvt = switch_core_session_get_private(session);
</span><span class="cx">                         switch_channel_t *channel_a = switch_core_session_get_channel(session);
</span><span class="cx"> 
</span><del>-                        status = switch_ivr_originate(NULL, &amp;tsession, &amp;cause, nhelper-&gt;exten, timeout, NULL, NULL, NULL,
-                                          switch_channel_get_caller_profile(channel_a), nhelper-&gt;vars, SOF_NONE, NULL);
-
-                        if ((switch_channel_up(channel_a))) {
-                                if (status != SWITCH_STATUS_SUCCESS || cause != SWITCH_CAUSE_SUCCESS) {
-                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Cannot Create Outgoing Channel! [%s]\n&quot;, nhelper-&gt;exten);
-                                        nua_notify(tech_pvt-&gt;nh, NUTAG_NEWSUB(1), SIPTAG_CONTENT_TYPE_STR(&quot;messsage/sipfrag&quot;),
-                                                           NUTAG_SUBSTATE(nua_substate_terminated),
-                                                           SIPTAG_PAYLOAD_STR(&quot;SIP/2.0 403 Forbidden&quot;), SIPTAG_EVENT_STR(nhelper-&gt;event), TAG_END());
-                                        status = SWITCH_STATUS_FALSE;
-                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Don't be sad.... I tried to warn you.\n&quot;);
-                                } else {
</del><ins>+                        if ((status = switch_ivr_originate(NULL, &amp;tsession, &amp;cause, nhelper-&gt;exten, timeout, NULL, NULL, NULL,
+                                                                                           switch_channel_get_caller_profile(channel_a), 
+                                                                                           nhelper-&gt;vars, SOF_NONE, NULL)) == SWITCH_STATUS_SUCCESS) {
+                                if (switch_channel_up(channel_a)) {
</ins><span class="cx">                                         tuuid_str = switch_core_session_get_uuid(tsession);
</span><span class="cx">                                         switch_ivr_uuid_bridge(nhelper-&gt;bridge_to_uuid, tuuid_str);
</span><span class="cx">                                         switch_channel_set_variable(channel_a, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, &quot;ATTENDED_TRANSFER&quot;);
</span><span class="cx">                                         sofia_set_flag_locked(tech_pvt, TFLAG_BYE);
</span><del>-                                        nua_notify(tech_pvt-&gt;nh, NUTAG_NEWSUB(1), SIPTAG_CONTENT_TYPE_STR(&quot;message/sipfrag&quot;),
-                                                           NUTAG_SUBSTATE(nua_substate_terminated), SIPTAG_PAYLOAD_STR(&quot;SIP/2.0 200 OK&quot;), SIPTAG_EVENT_STR(nhelper-&gt;event), TAG_END());
-                                        switch_core_session_rwunlock(tsession);
-                                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Congratulations! You have *no* idea how lucky you are!\n&quot;);
</del><ins>+                                } else {
+                                        switch_channel_hangup(switch_core_session_get_channel(tsession), SWITCH_CAUSE_ORIGINATOR_CANCEL);
+                                        status = SWITCH_STATUS_FALSE;
</ins><span class="cx">                                 }
</span><ins>+                                switch_core_session_rwunlock(tsession);
+                        }
+
+                        if (status == SWITCH_STATUS_SUCCESS) {
+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;The nightmare is over.....\n&quot;);
</ins><span class="cx">                         } else {
</span><del>-                                nua_notify(tech_pvt-&gt;nh, NUTAG_NEWSUB(1), SIPTAG_CONTENT_TYPE_STR(&quot;messsage/sipfrag&quot;),
-                                                   NUTAG_SUBSTATE(nua_substate_terminated),
-                                                   SIPTAG_PAYLOAD_STR(&quot;SIP/2.0 403 Forbidden&quot;), SIPTAG_EVENT_STR(nhelper-&gt;event), TAG_END());
-                                status = SWITCH_STATUS_FALSE;
-                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;Wow, This could not have turned out any worse...=/ Sorry...\n&quot;);
</del><ins>+                                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, &quot;1 .. 2 .. Freddie's commin' for you...\n&quot;);
</ins><span class="cx">                         }
</span><ins>+
+                        nua_notify(tech_pvt-&gt;nh, NUTAG_NEWSUB(1), SIPTAG_CONTENT_TYPE_STR(&quot;messsage/sipfrag&quot;),
+                                           NUTAG_SUBSTATE(nua_substate_terminated),
+                                           SIPTAG_PAYLOAD_STR(status == SWITCH_STATUS_SUCCESS ? &quot;SIP/2.0 200 OK&quot;: 
+                                                                                  &quot;SIP/2.0 403 Forbidden&quot;), SIPTAG_EVENT_STR(nhelper-&gt;event), TAG_END());
+
</ins><span class="cx">                         switch_core_session_rwunlock(session);
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -4487,6 +4541,7 @@
</span><span class="cx">                                                         
</span><span class="cx">                                                         
</span><span class="cx">                                                         sofia_clear_flag_locked(b_tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                        switch_channel_clear_flag(channel_b, CF_LEG_HOLDING);
</ins><span class="cx">                                                         sofia_clear_flag_locked(tech_pvt, TFLAG_HOLD_LOCK);
</span><span class="cx"> 
</span><span class="cx">                                                         switch_channel_set_variable(channel_b, SWITCH_HOLDING_UUID_VARIABLE, br_a);
</span><span class="lines">@@ -4555,6 +4610,7 @@
</span><span class="cx">                                                                            NUTAG_SUBSTATE(nua_substate_terminated), SIPTAG_PAYLOAD_STR(&quot;SIP/2.0 200 OK&quot;), SIPTAG_EVENT_STR(etmp), TAG_END());
</span><span class="cx"> 
</span><span class="cx">                                                         sofia_clear_flag_locked(b_tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                        switch_channel_clear_flag(channel_b, CF_LEG_HOLDING);
</ins><span class="cx">                                                         sofia_clear_flag_locked(tech_pvt, TFLAG_HOLD_LOCK);
</span><span class="cx">                                                         switch_channel_set_variable(channel_b, &quot;park_timeout&quot;, &quot;2&quot;);
</span><span class="cx">                                                         switch_channel_set_state(channel_b, CS_PARK);
</span><span class="lines">@@ -4578,7 +4634,9 @@
</span><span class="cx">                                                                         t_session = switch_core_session_locate(br_b);
</span><span class="cx">                                                                         hup_channel = channel_a;
</span><span class="cx">                                                                         sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                                        switch_channel_clear_flag(tech_pvt-&gt;channel, CF_LEG_HOLDING);
</ins><span class="cx">                                                                         sofia_clear_flag_locked(h_tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                                                                        switch_channel_clear_flag(h_tech_pvt-&gt;channel, CF_LEG_HOLDING);
</ins><span class="cx">                                                                         switch_channel_hangup(channel_b, SWITCH_CAUSE_ATTENDED_TRANSFER);
</span><span class="cx">                                                                 }
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiasofia_gluec"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia_glue.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia_glue.c        2009-11-29 05:19:09 UTC (rev 15705)
</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-&gt;channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
+                preferred = tech_pvt-&gt;profile-&gt;outbound_codec_string;
+                fallback = tech_pvt-&gt;profile-&gt;inbound_codec_string;
+        } else {
+                preferred = tech_pvt-&gt;profile-&gt;inbound_codec_string;
+                fallback = tech_pvt-&gt;profile-&gt;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">@@ -426,25 +443,29 @@
</span><span class="cx"> 
</span><span class="cx">         if ((abs = switch_channel_get_variable(tech_pvt-&gt;channel, &quot;absolute_codec_string&quot;))) {
</span><span class="cx">                 codec_string = abs;
</span><del>-        } else {
-                if (!(codec_string = switch_channel_get_variable(tech_pvt-&gt;channel, &quot;codec_string&quot;))) {
-                        if (tech_pvt-&gt;profile-&gt;codec_string) {
-                                codec_string = tech_pvt-&gt;profile-&gt;codec_string;
-                        }
</del><ins>+                goto ready;
+        }
+
+        if (!(codec_string = switch_channel_get_variable(tech_pvt-&gt;channel, &quot;codec_string&quot;))) {
+                codec_string = sofia_glue_get_codec_string(tech_pvt);
+                if (codec_string &amp;&amp; *codec_string == '=') {
+                        codec_string++;
+                        goto ready;
</ins><span class="cx">                 }
</span><ins>+        }
</ins><span class="cx"> 
</span><del>-                if ((ocodec = switch_channel_get_variable(tech_pvt-&gt;channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) {
-                        if (!codec_string || sofia_test_pflag(tech_pvt-&gt;profile, PFLAG_DISABLE_TRANSCODING)) {
</del><ins>+        if ((ocodec = switch_channel_get_variable(tech_pvt-&gt;channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) {
+                if (!codec_string || sofia_test_pflag(tech_pvt-&gt;profile, PFLAG_DISABLE_TRANSCODING)) {
+                        codec_string = ocodec;
+                } else {
+                        if (!(codec_string = switch_core_session_sprintf(tech_pvt-&gt;session, &quot;%s,%s&quot;, ocodec, codec_string))) {
</ins><span class="cx">                                 codec_string = ocodec;
</span><del>-                        } else {
-                                if (!(codec_string = switch_core_session_sprintf(tech_pvt-&gt;session, &quot;%s,%s&quot;, ocodec, codec_string))) {
-                                        codec_string = ocodec;
-                                }
</del><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><ins>+        
+ ready:
</ins><span class="cx"> 
</span><del>-
</del><span class="cx">         if (codec_string) {
</span><span class="cx">                 char *tmp_codec_string;
</span><span class="cx">                 if ((tmp_codec_string = switch_core_session_strdup(tech_pvt-&gt;session, codec_string))) {
</span><span class="lines">@@ -1149,7 +1170,8 @@
</span><span class="cx"> 
</span><span class="cx">         len = strlen(tech_pvt-&gt;local_sdp_str) * 2;
</span><span class="cx">         
</span><del>-        if (switch_stristr(&quot;sendonly&quot;, tech_pvt-&gt;local_sdp_str) || switch_stristr(&quot;0.0.0.0&quot;, tech_pvt-&gt;local_sdp_str)) {
</del><ins>+        if (switch_channel_test_flag(tech_pvt-&gt;channel, CF_ANSWERED) &amp;&amp; 
+                (switch_stristr(&quot;sendonly&quot;, tech_pvt-&gt;local_sdp_str) || switch_stristr(&quot;0.0.0.0&quot;, tech_pvt-&gt;local_sdp_str))) {
</ins><span class="cx">             switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt-&gt;session), SWITCH_LOG_DEBUG, &quot;Skip patch on hold SDP\n&quot;);
</span><span class="cx">             return;
</span><span class="cx">         }
</span><span class="lines">@@ -2343,6 +2365,10 @@
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt-&gt;session), SWITCH_LOG_DEBUG, &quot;Audio params changed for %s from %s:%d to %s:%d\n&quot;, 
</span><span class="cx">                                                           switch_channel_get_name(tech_pvt-&gt;channel),
</span><span class="cx">                                                           remote_host, remote_port, tech_pvt-&gt;remote_sdp_audio_ip, tech_pvt-&gt;remote_sdp_audio_port);
</span><ins>+
+                        switch_snprintf(tmp, sizeof(tmp), &quot;%d&quot;, tech_pvt-&gt;remote_sdp_audio_port);
+                        switch_channel_set_variable(tech_pvt-&gt;channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE, tech_pvt-&gt;remote_sdp_audio_ip);
+                        switch_channel_set_variable(tech_pvt-&gt;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 +2565,11 @@
</span><span class="cx">                         switch_channel_set_variable(tech_pvt-&gt;channel, SOFIA_SECURE_MEDIA_CONFIRMED_VARIABLE, &quot;true&quot;);
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+
+                switch_snprintf(tmp, sizeof(tmp), &quot;%d&quot;, tech_pvt-&gt;remote_sdp_audio_port);
+                switch_channel_set_variable(tech_pvt-&gt;channel, SWITCH_REMOTE_MEDIA_IP_VARIABLE, tech_pvt-&gt;remote_sdp_audio_ip);
+                switch_channel_set_variable(tech_pvt-&gt;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 class="lines">@@ -2885,6 +2916,7 @@
</span><span class="cx">                         const char *stream;
</span><span class="cx"> 
</span><span class="cx">                         sofia_set_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                        switch_channel_set_flag(tech_pvt-&gt;channel, CF_LEG_HOLDING);
</ins><span class="cx">                         switch_channel_presence(tech_pvt-&gt;channel, &quot;unknown&quot;, &quot;hold&quot;, NULL);
</span><span class="cx"> 
</span><span class="cx">                         if (tech_pvt-&gt;max_missed_hold_packets) {
</span><span class="lines">@@ -2909,6 +2941,7 @@
</span><span class="cx">         } else {
</span><span class="cx">                 if (sofia_test_flag(tech_pvt, TFLAG_HOLD_LOCK)) {
</span><span class="cx">                         sofia_set_flag(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                        switch_channel_set_flag(tech_pvt-&gt;channel, CF_LEG_HOLDING);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 sofia_clear_flag_locked(tech_pvt, TFLAG_HOLD_LOCK);
</span><span class="lines">@@ -2939,6 +2972,7 @@
</span><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         sofia_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
</span><ins>+                        switch_channel_clear_flag(tech_pvt-&gt;channel, CF_LEG_HOLDING);
</ins><span class="cx">                         switch_channel_presence(tech_pvt-&gt;channel, &quot;unknown&quot;, &quot;unhold&quot;, NULL);
</span><span class="cx">                 }
</span><span class="cx">         }
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodendpointsmod_sofiasofia_regc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia_reg.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia_reg.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/endpoints/mod_sofia/sofia_reg.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -449,7 +449,6 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         sofia_glue_send_notify(profile, user, host, event, contenttype, body, contact, network_ip);
</span><del>-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> int sofia_sla_dialog_del_callback(void *pArg, int argc, char **argv, char **columnNames)
</span><span class="lines">@@ -928,7 +927,6 @@
</span><span class="cx">                                         if (*received_data &amp;&amp; sofia_test_pflag(profile, PFLAG_RECIEVED_IN_NAT_REG_CONTACT)) {
</span><span class="cx">                                                 switch_snprintf(received_data, sizeof(received_data), &quot;;received=%s:%d&quot;, url_ip, network_port);
</span><span class="cx">                                         }
</span><del>-
</del><span class="cx">         
</span><span class="cx">                                         if (!strcasecmp(v_contact_str, &quot;nat-connectile-dysfunction&quot;) ||
</span><span class="cx">                                                 !strcasecmp(v_contact_str, &quot;NDLB-connectile-dysfunction&quot;) || !strcasecmp(v_contact_str, &quot;NDLB-tls-connectile-dysfunction&quot;)) {
</span><span class="lines">@@ -972,6 +970,17 @@
</span><span class="cx">                         }
</span><span class="cx">                         if (auth_res == AUTH_FORBIDDEN) {
</span><span class="cx">                                 nua_respond(nh, SIP_403_FORBIDDEN, NUTAG_WITH_THIS(nua), TAG_END());
</span><ins>+                                
+                                /* Log line added to support Fail2Ban */
+                                if (sofia_test_pflag(profile, PFLAG_LOG_AUTH_FAIL)) {
+                                        if (regtype == REG_REGISTER) {
+                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;SIP auth failure (REGISTER) on sofia profile '%s' &quot;
+                                                                                  &quot;for [%s@%s] from ip %s\n&quot;, profile-&gt;name, to_user, to_host, network_ip);
+                                        } else if (regtype == REG_INVITE) {
+                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;SIP auth failure (INVITE) on sofia profile '%s' &quot;
+                                                                                  &quot;for [%s@%s] from ip %s\n&quot;, profile-&gt;name, to_user, to_host, network_ip);
+                                        }                                                                          
+                                }
</ins><span class="cx">                         } else {
</span><span class="cx">                                 nua_respond(nh, SIP_401_UNAUTHORIZED, NUTAG_WITH_THIS(nua), TAG_END());
</span><span class="cx">                         }
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodevent_handlersmod_event_socketmod_event_socketc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/event_handlers/mod_event_socket/mod_event_socket.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/event_handlers/mod_event_socket/mod_event_socket.c        2009-11-29 05:19:09 UTC (rev 15705)
</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(&amp;pool) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;OH OH no pool\n&quot;);
</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(&amp;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, &quot;Shutting Down\n&quot;);
</span><ins>+                                goto end;
</ins><span class="cx">                         } else {
</span><del>-                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Socket Error\n&quot;);
</del><ins>+                                /* I wish we could use strerror_r here but its not defined everywhere =/ */
+                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Socket Error [%s]\n&quot;, strerror(errno));
+                                if (++errs &gt; 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, &quot;Memory Error\n&quot;);
</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(&amp;listen_list.sock);
</span><span class="cx">         
</span><span class="cx">         if (prefs.nat_map &amp;&amp; switch_core_get_variable(&quot;nat_type&quot;)) {
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodlanguagesmod_spidermonkeysmmak"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/languages/mod_spidermonkey/sm.mak (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/languages/mod_spidermonkey/sm.mak        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/languages/mod_spidermonkey/sm.mak        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx"> JSLA=$(JS_DIR)/libjs.la
</span><span class="cx"> 
</span><span class="cx"> LOCAL_CFLAGS+=-I$(JS_DIR)/src -I$(JS_DIR)/nsprpub/dist/include/nspr  -DXP_UNIX -I../mod_spidermonkey  -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 -DJS_HAS_XML_SUPPORT=1
</span><del>-LOCAL_LDFLAGS_POST=$(JS_DIR)/nsprpub/pr/src/libnspr4.*
</del><ins>+LOCAL_LDFLAGS_POST=-L$(JS_DIR)/nsprpub/dist/lib -lnspr4 $(JS_DIR)/nsprpub/pr/src/libnspr4.*
</ins><span class="cx"> LOCAL_LIBADD+=$(JSLA)
</span><span class="cx"> 
</span><span class="cx"> include $(switch_srcdir)/build/modmake.rules
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcmodlanguagesmod_spidermonkey_core_dbmod_spidermonkey_core_dbc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -168,7 +168,11 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-static JSBool db_next(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
</del><ins>+/* Evaluate a prepared statement
+  stepSuccessCode expected success code from switch_core_db_step() 
+  return true if step return expected success code, false otherwise
+*/
+static JSBool db_step_ex(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval, int stepSuccessCode)
</ins><span class="cx"> {
</span><span class="cx">         struct db_obj *dbo = JS_GetPrivate(cx, obj);
</span><span class="cx">         *rval = BOOLEAN_TO_JSVAL(JS_FALSE);
</span><span class="lines">@@ -181,14 +185,17 @@
</span><span class="cx">                 int running = 1;
</span><span class="cx">                 while (running &lt; 5000) {
</span><span class="cx">                         int result = switch_core_db_step(dbo-&gt;stmt);
</span><del>-                        if (result == SWITCH_CORE_DB_ROW) {
</del><ins>+                        if (result == stepSuccessCode) {
</ins><span class="cx">                                 *rval = BOOLEAN_TO_JSVAL(JS_TRUE);
</span><span class="cx">                                 break;
</span><span class="cx">                         } else if (result == SWITCH_CORE_DB_BUSY) {
</span><span class="cx">                                 running++;
</span><ins>+                                switch_cond_next(); /* wait a bit before retrying */
</ins><span class="cx">                                 continue;
</span><ins>+                        } 
+                        if (switch_core_db_finalize(dbo-&gt;stmt) != SWITCH_CORE_DB_OK) {        
+                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error %s\n&quot;, switch_core_db_errmsg(dbo-&gt;db));
</ins><span class="cx">                         }
</span><del>-                        switch_core_db_finalize(dbo-&gt;stmt);
</del><span class="cx">                         dbo-&gt;stmt = NULL;
</span><span class="cx">                         break;
</span><span class="cx">                 }
</span><span class="lines">@@ -197,6 +204,25 @@
</span><span class="cx">         return JS_TRUE;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+/* Evaluate a prepared statement, to be used with statements that return data 
+  return true while data is available, false when done or error
+*/
+static JSBool db_next(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
+{
+    /* return true until no more rows available */
+        return db_step_ex(cx, obj, argc, argv, rval, SWITCH_CORE_DB_ROW);
+}
+
+/* Evaluate a prepared statement, to be used with statements that return no data 
+  return true if statement has finished executing successfully, false otherwise 
+*/
+static JSBool db_step(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
+{
+    /* return true when the statement has finished executing successfully */
+        return db_step_ex(cx, obj, argc, argv, rval, SWITCH_CORE_DB_DONE);
+}
+
+
</ins><span class="cx"> static JSBool db_fetch(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
</span><span class="cx"> {
</span><span class="cx">         struct db_obj *dbo = JS_GetPrivate(cx, obj);
</span><span class="lines">@@ -258,6 +284,98 @@
</span><span class="cx">         return JS_TRUE;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static JSBool db_bind_text(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
+{
+        struct db_obj *dbo = JS_GetPrivate(cx, obj);
+        JSBool status;
+        uint32 param_index = -1;
+    char *param_value = NULL;
+
+        *rval = BOOLEAN_TO_JSVAL(JS_FALSE);
+
+        if (!dbo-&gt;db) {
+                return JS_FALSE;
+        }
+
+    /* db_prepare() must be called first */
+        if (!dbo-&gt;stmt) {
+                return JS_FALSE;
+        }
+
+        /* argv[0] = parameter index
+       argv[1] = parameter value
+     */
+        if (argc &lt; 2) {
+                return JS_FALSE;
+        }
+
+        
+
+        /* convert args */
+        status = JS_ValueToECMAUint32(cx, argv[0], &amp;param_index);
+        switch_assert(status == JS_TRUE);
+    param_value = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
+        if ((param_index &lt; 1) || (NULL == param_value)) {
+                return  JS_FALSE;
+        }
+
+        /* bind param */
+        if (switch_core_db_bind_text(dbo-&gt;stmt, param_index, param_value, -1, SWITCH_CORE_DB_STATIC)) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error %s\n&quot;, switch_core_db_errmsg(dbo-&gt;db));
+                return JS_FALSE;
+        } else {
+                *rval = BOOLEAN_TO_JSVAL(JS_TRUE);
+        }
+
+        return JS_TRUE;
+}
+
+static JSBool db_bind_int(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, jsval * rval)
+{
+        struct db_obj *dbo = JS_GetPrivate(cx, obj);
+        JSBool status;
+        uint32 param_index = -1;
+        uint32 param_value = -1;
+
+        *rval = BOOLEAN_TO_JSVAL(JS_FALSE);
+
+        if (!dbo-&gt;db) {
+                return JS_FALSE;
+        }
+
+    /* db_prepare() must be called first */
+        if (!dbo-&gt;stmt) {
+                return JS_FALSE;
+        }
+
+        /* argv[0] = parameter index
+       argv[1] = parameter value
+     */
+        if (argc &lt; 2) {
+                return JS_FALSE;
+        }
+
+        /* convert args */
+        status = JS_ValueToECMAUint32(cx, argv[0], &amp;param_index);
+        switch_assert(status == JS_TRUE);
+        status = JS_ValueToECMAUint32(cx, argv[1], &amp;param_value);
+        switch_assert(status == JS_TRUE);
+
+        if (param_index &lt; 1)  {
+                return  JS_FALSE;
+        }
+
+        /* bind param */
+        if (switch_core_db_bind_int(dbo-&gt;stmt, param_index, param_value)) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, &quot;Error %s\n&quot;, switch_core_db_errmsg(dbo-&gt;db));
+                return JS_FALSE;
+        } else {
+                *rval = BOOLEAN_TO_JSVAL(JS_TRUE);
+        }
+
+        return JS_TRUE;
+}
+
</ins><span class="cx"> enum db_tinyid {
</span><span class="cx">         DB_NAME
</span><span class="cx"> };
</span><span class="lines">@@ -266,8 +384,11 @@
</span><span class="cx">         {&quot;exec&quot;, db_exec, 1},
</span><span class="cx">         {&quot;close&quot;, db_close, 0},
</span><span class="cx">         {&quot;next&quot;, db_next, 0},
</span><ins>+        {&quot;step&quot;, db_step, 0},
</ins><span class="cx">         {&quot;fetch&quot;, db_fetch, 1},
</span><span class="cx">         {&quot;prepare&quot;, db_prepare, 0},
</span><ins>+        {&quot;bindText&quot;, db_bind_text, 2},
+        {&quot;bindInt&quot;, db_bind_int, 2},
</ins><span class="cx">         {0}
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_callerc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_caller.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_caller.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_caller.c        2009-11-29 05:19:09 UTC (rev 15705)
</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(&amp;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_branch_repairsrcswitch_core_memoryc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_core_memory.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_core_memory.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_core_memory.c        2009-11-29 05:19:09 UTC (rev 15705)
</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, &quot;Stopping memory pool queue.\n&quot;);
</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(&amp;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_branch_repairsrcswitch_core_sqldbc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_core_sqldb.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_core_sqldb.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_core_sqldb.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -171,6 +171,8 @@
</span><span class="cx">                 if ((dbh = (switch_cache_db_handle_t *) val)) {
</span><span class="cx">                         if (switch_mutex_trylock(dbh-&gt;mutex) == SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                                 if (strstr(dbh-&gt;name, thread_str)) {
</span><ins>+                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, 
+                                                                          &quot;Detach cached DB handle %s [%s]\n&quot;, thread_str, switch_cache_db_type_name(dbh-&gt;type));
</ins><span class="cx">                                         switch_clear_flag(dbh, CDF_INUSE);
</span><span class="cx">                                 } 
</span><span class="cx">                                 switch_mutex_unlock(dbh-&gt;mutex);
</span><span class="lines">@@ -188,18 +190,28 @@
</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] = &quot;&quot;;
</span><ins>+        char db_str[CACHE_DB_LEN] = &quot;&quot;;
+        char db_callsite_str[CACHE_DB_LEN] = &quot;&quot;;
</ins><span class="cx">         switch_cache_db_handle_t *new_dbh = NULL;
</span><ins>+        switch_ssize_t hlen = -1;
+
</ins><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-&gt;odbc_options.dsn;
</span><ins>+                        db_user = connection_options-&gt;odbc_options.user;
+                        db_pass = connection_options-&gt;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-&gt;core_db_options.db_path;
</span><ins>+                        db_user = &quot;&quot;;
+                        db_pass = &quot;&quot;;
</ins><span class="cx">                 }
</span><span class="cx">                 break;
</span><span class="cx">         }
</span><span class="lines">@@ -208,28 +220,36 @@
</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, &quot;%s_%lu&quot;, db_name, (unsigned long)(intptr_t)self);
</del><ins>+        snprintf(db_str, sizeof(db_str) - 1, &quot;db=\&quot;%s\&quot;;user=\&quot;%s\&quot;;pass=\&quot;%s\&quot;&quot;, db_name, db_user, db_pass);
+        snprintf(thread_str, sizeof(thread_str) - 1, &quot;%s;thread=\&quot;%lu\&quot;&quot;, db_str, (unsigned long)(intptr_t)self);
+        snprintf(db_callsite_str, sizeof(db_callsite_str) - 1, &quot;%s:%d&quot;, 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-&gt;last_user, db_callsite_str);
+                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG10, 
</ins><span class="cx">                                                   &quot;Reuse Cached DB handle %s [%s]\n&quot;, thread_str, switch_cache_db_type_name(new_dbh-&gt;type));
</span><span class="cx">         } else {
</span><span class="cx">                 switch_hash_index_t *hi;
</span><span class="cx">                 const void *var;
</span><span class="cx">                 void *val;
</span><span class="cx">                 char *key;
</span><ins>+                unsigned long hash = 0;
+                
+                hash = switch_ci_hashfunc_default(db_str, &amp;hlen);
</ins><span class="cx"> 
</span><span class="cx">                 for (hi = switch_hash_first(NULL, dbh_hash); hi; hi = switch_hash_next(hi)) {
</span><span class="cx">                         switch_hash_this(hi, &amp;var, NULL, &amp;val);
</span><span class="cx">                         key = (char *) var;
</span><span class="cx">                         
</span><span class="cx">                         if ((new_dbh = (switch_cache_db_handle_t *) val)) {
</span><del>-                                if (!switch_test_flag(new_dbh, CDF_INUSE) &amp;&amp; switch_mutex_trylock(new_dbh-&gt;mutex) == SWITCH_STATUS_SUCCESS) {
</del><ins>+                                if (hash == new_dbh-&gt;hash &amp;&amp; !strncasecmp(new_dbh-&gt;name, db_str, strlen(db_str)) &amp;&amp; 
+                                        !switch_test_flag(new_dbh, CDF_INUSE) &amp;&amp; switch_mutex_trylock(new_dbh-&gt;mutex) == SWITCH_STATUS_SUCCESS) {
</ins><span class="cx">                                         switch_set_flag(new_dbh, CDF_INUSE);
</span><span class="cx">                                         switch_set_string(new_dbh-&gt;name, thread_str);
</span><del>-                                        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG1, 
</del><ins>+                                        new_dbh-&gt;hash = switch_ci_hashfunc_default(db_str, &amp;hlen);
+                                        switch_set_string(new_dbh-&gt;last_user, db_callsite_str);
+                                        switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG10, 
</ins><span class="cx">                                                                           &quot;Reuse Unused Cached DB handle %s [%s]\n&quot;, thread_str, switch_cache_db_type_name(new_dbh-&gt;type));
</span><span class="cx">                                         break;
</span><span class="cx">                                 }
</span><span class="lines">@@ -278,8 +298,8 @@
</span><span class="cx">                         goto end;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG1, 
-                                                  &quot;Create Cached DB handle %s [%s]\n&quot;, thread_str, db ? &quot;sqlite&quot; : &quot;ODBC&quot;);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG10, 
+                                                  &quot;Create Cached DB handle %s [%s]\n&quot;, thread_str, switch_cache_db_type_name(type));
</ins><span class="cx"> 
</span><span class="cx">                 switch_core_new_memory_pool(&amp;pool);
</span><span class="cx">                 new_dbh = switch_core_alloc(pool, sizeof(*new_dbh));
</span><span class="lines">@@ -287,9 +307,12 @@
</span><span class="cx">                 new_dbh-&gt;type = type;
</span><span class="cx">                 switch_set_string(new_dbh-&gt;name, thread_str);
</span><span class="cx">                 switch_set_flag(new_dbh, CDF_INUSE);
</span><del>-                
</del><ins>+                new_dbh-&gt;hash = switch_ci_hashfunc_default(db_str, &amp;hlen);
+
+
</ins><span class="cx">                 if (db) new_dbh-&gt;native_handle.core_db_dbh = db; else new_dbh-&gt;native_handle.odbc_dbh = odbc_dbh;
</span><span class="cx">                 switch_mutex_init(&amp;new_dbh-&gt;mutex, SWITCH_MUTEX_UNNESTED, new_dbh-&gt;pool);
</span><ins>+                switch_set_string(new_dbh-&gt;creator, db_callsite_str);
</ins><span class="cx">                 switch_mutex_lock(new_dbh-&gt;mutex);
</span><span class="cx"> 
</span><span class="cx">                 switch_core_hash_insert(dbh_hash, new_dbh-&gt;name, new_dbh);
</span><span class="lines">@@ -354,7 +377,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 +402,25 @@
</span><span class="cx">                         p = e;
</span><span class="cx">                 }
</span><span class="cx">                 
</span><del>-                while (p &gt; s &amp;&amp; *p != ';') {
</del><ins>+                while (p &gt; s) {
+                        if (*p == '\n' &amp;&amp; *(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 &lt; e &amp;&amp; (*p == '\n' || *p == ' ')) {
-                                p++;
-                        }
-                }
</del><ins>+                if (p &lt;= 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 &amp;&amp; *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 +435,9 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx">         switch (dbh-&gt;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 +649,9 @@
</span><span class="cx">         case SCDB_TYPE_ODBC:
</span><span class="cx">                 {
</span><span class="cx">                         if (switch_odbc_handle_exec(dbh-&gt;native_handle.odbc_dbh, test_sql, NULL) != SWITCH_ODBC_SUCCESS) {
</span><del>-                                switch_odbc_handle_exec(dbh-&gt;native_handle.odbc_dbh, drop_sql, NULL);
</del><ins>+                                if (drop_sql) {
+                                        switch_odbc_handle_exec(dbh-&gt;native_handle.odbc_dbh, drop_sql, NULL);
+                                }
</ins><span class="cx">                                 switch_odbc_handle_exec(dbh-&gt;native_handle.odbc_dbh, reactive_sql, NULL);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -1143,7 +1165,7 @@
</span><span class="cx">                         runtime.odbc_dsn = NULL;
</span><span class="cx">                         runtime.odbc_user = NULL;
</span><span class="cx">                         runtime.odbc_pass = NULL;
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Falling back to sqlite.\n&quot;);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, &quot;Falling back to core_db.\n&quot;);
</ins><span class="cx">                         goto top;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -1288,6 +1310,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, &amp;var, NULL, &amp;val);
+                key = (char *) var;
+
+                if ((dbh = (switch_cache_db_handle_t *) val)) {
+                        char *needle = &quot;pass=\&quot;&quot;;
+                        time_t diff = 0;
+
+                        diff = now - dbh-&gt;last_used;
+                        
+                        if (switch_mutex_trylock(dbh-&gt;mutex) == SWITCH_STATUS_SUCCESS) {
+                                switch_mutex_unlock(dbh-&gt;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, &quot;\&quot;&quot;);
+                        strncpy(cleankey_str, key, pos1-key);
+                        strcpy(&amp;cleankey_str[pos1-key], pos2);
+                        
+                        
+                        stream-&gt;write_function(stream, &quot;%s\n\tType: %s\n\tLast used: %d\n\tFlags: %s, %s\n&quot;
+                                                                                        &quot;\tCreator: %s\n\tLast User: %s\n&quot;,
+                                cleankey_str,
+                                switch_cache_db_type_name(dbh-&gt;type),
+                                diff,
+                                locked ? &quot;Locked&quot; : &quot;Unlocked&quot;,
+                                switch_test_flag(dbh, CDF_INUSE) ? &quot;Attached&quot; : &quot;Detached&quot;,
+                                dbh-&gt;creator,
+                                dbh-&gt;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_branch_repairsrcswitch_ivr_asyncc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_ivr_async.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_ivr_async.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_ivr_async.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -628,7 +628,7 @@
</span><span class="cx">                 const char *macro_name = &quot;eavesdrop_announce&quot;;
</span><span class="cx">                 const char *id_name = NULL;
</span><span class="cx">                 switch_codec_implementation_t tread_impl = {0}, read_impl = {0};
</span><del>-
</del><ins>+                switch_core_session_message_t msg = { 0 };
</ins><span class="cx">                 
</span><span class="cx">                 if (!switch_channel_media_ready(channel)) {
</span><span class="cx">                         goto end;
</span><span class="lines">@@ -734,6 +734,14 @@
</span><span class="cx">                         goto end;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+
+                msg.from = __FILE__;
+                
+                /* Tell the channel we are going to be in a bridge */
+                msg.message_id = SWITCH_MESSAGE_INDICATE_BRIDGE;
+                switch_core_session_receive_message(session, &amp;msg);
+                
+
</ins><span class="cx">                 while (switch_channel_ready(tchannel) &amp;&amp; switch_channel_ready(channel)) {
</span><span class="cx">                         uint32_t len = sizeof(buf);
</span><span class="cx">                         switch_event_t *event = NULL;
</span><span class="lines">@@ -743,7 +751,7 @@
</span><span class="cx">                         status = switch_core_session_read_frame(session, &amp;read_frame, SWITCH_IO_FLAG_NONE, 0);
</span><span class="cx"> 
</span><span class="cx">                         if (!SWITCH_READ_ACCEPTABLE(status)) {
</span><del>-                                goto end;
</del><ins>+                                goto end_loop;
</ins><span class="cx">                         }
</span><span class="cx"> 
</span><span class="cx">                         if (switch_core_session_dequeue_event(session, &amp;event, SWITCH_FALSE) == SWITCH_STATUS_SUCCESS) {
</span><span class="lines">@@ -784,7 +792,7 @@
</span><span class="cx">                                                 switch_clear_flag(ep, ED_MUX_WRITE);
</span><span class="cx">                                                 break;
</span><span class="cx">                                         case '*':
</span><del>-                                                goto end;
</del><ins>+                                                goto end_loop;
</ins><span class="cx">                                         default:
</span><span class="cx">                                                 z = 0;
</span><span class="cx">                                                 break;
</span><span class="lines">@@ -836,7 +844,16 @@
</span><span class="cx"> 
</span><span class="cx">                 }
</span><span class="cx"> 
</span><ins>+        end_loop:
+
+                /* Tell the channel we are no longer going to be in a bridge */
+                msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
+                switch_core_session_receive_message(session, &amp;msg);
+
+
+
</ins><span class="cx">           end:
</span><ins>+
</ins><span class="cx">                 if ( codec_initialized )
</span><span class="cx">                         switch_core_codec_destroy(&amp;codec);
</span><span class="cx"> 
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_ivr_bridgec"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_ivr_bridge.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_ivr_bridge.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_ivr_bridge.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1083,7 +1083,26 @@
</span><span class="cx">                         switch_channel_set_state(peer_channel, CS_EXCHANGE_MEDIA);
</span><span class="cx">                         audio_bridge_thread(NULL, (void *) a_leg);
</span><span class="cx">                         
</span><ins>+                        if (switch_channel_test_flag(caller_channel, CF_LEG_HOLDING)) {
+                                const char *ext = switch_channel_get_variable(caller_channel, &quot;hold_hangup_xfer_exten&quot;);
+                                if (!zstr(ext)) {
+                                        switch_channel_set_variable(peer_channel, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, ext);
+                                }
+                                switch_channel_clear_flag(caller_channel, CF_LEG_HOLDING);
+                        }
+
+                        if (switch_channel_test_flag(peer_channel, CF_LEG_HOLDING)) {
+                                const char *ext = switch_channel_get_variable(peer_channel, &quot;hold_hangup_xfer_exten&quot;);
+                                if (!zstr(ext)) {
+                                        switch_channel_set_variable(caller_channel, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE, ext);
+                                }
+                                switch_channel_clear_flag(peer_channel, CF_LEG_HOLDING);
+                        }
+
</ins><span class="cx">                         switch_channel_clear_flag_recursive(caller_channel, CF_BRIDGE_ORIGINATOR);
</span><ins>+                        
+                        switch_channel_stop_broadcast(peer_channel);
+                        
</ins><span class="cx"> 
</span><span class="cx">                         while (switch_channel_get_state(peer_channel) == CS_EXCHANGE_MEDIA) {
</span><span class="cx">                                 switch_cond_next();
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairsrcswitch_rtpc"></a>
<div class="modfile"><h4>Modified: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_rtp.c (15704 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_rtp.c        2009-11-29 04:58:51 UTC (rev 15704)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/src/switch_rtp.c        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -1778,6 +1778,8 @@
</span><span class="cx"> 
</span><span class="cx"> static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_type, switch_frame_flag_t *flags, switch_io_flag_t io_flags)
</span><span class="cx"> {
</span><ins>+        switch_core_session_t *session = switch_core_memory_pool_get_data(rtp_session-&gt;pool, &quot;__session&quot;);
+        switch_channel_t *channel = NULL;
</ins><span class="cx">         switch_size_t bytes = 0;
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS, poll_status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">         int check = 0;
</span><span class="lines">@@ -1788,6 +1790,10 @@
</span><span class="cx">         int fdr = 0;
</span><span class="cx">         int hot_socket = 0;
</span><span class="cx"> 
</span><ins>+        if (session) {
+                channel = switch_core_session_get_channel(session);
+        }
+
</ins><span class="cx">         if (!switch_rtp_ready(rtp_session)) {
</span><span class="cx">                 return -1;
</span><span class="cx">         }
</span><span class="lines">@@ -1961,13 +1967,24 @@
</span><span class="cx">                                         const char *tx_host;
</span><span class="cx">                                         const char *old_host;
</span><span class="cx">                                         char bufa[30], bufb[30];
</span><del>-                                        
</del><ins>+                                        char adj_port[5];
+
</ins><span class="cx">                                         tx_host = switch_get_addr(bufa, sizeof(bufa), rtp_session-&gt;from_addr);
</span><span class="cx">                                         old_host = switch_get_addr(bufb, sizeof(bufb), rtp_session-&gt;remote_addr);                        
</span><span class="cx">         
</span><span class="cx">                                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,
</span><span class="cx">                                                                           &quot;Auto Changing port from %s:%u to %s:%u\n&quot;, old_host, old, tx_host,
</span><span class="cx">                                                                           switch_sockaddr_get_port(rtp_session-&gt;from_addr));
</span><ins>+
+                                        if (channel) {
+                                                switch_channel_set_variable(channel, &quot;remote_media_ip_reported&quot;, switch_channel_get_variable(channel, &quot;remote_media_ip&quot;));
+                                                switch_channel_set_variable(channel, &quot;remote_media_ip&quot;, tx_host);
+                                                switch_snprintf (adj_port, sizeof(adj_port), &quot;%u&quot;, switch_sockaddr_get_port(rtp_session-&gt;from_addr));
+                                                switch_channel_set_variable(channel, &quot;remote_media_port_reported&quot;, switch_channel_get_variable(channel, &quot;remote_media_port&quot;));
+                                                switch_channel_set_variable(channel, &quot;remote_media_port&quot;, adj_port);
+                                                switch_channel_set_variable(channel, &quot;rtp_auto_adjust&quot;, &quot;true&quot;);
+                                        }
+
</ins><span class="cx">                                         switch_rtp_set_remote_address(rtp_session, tx_host, switch_sockaddr_get_port(rtp_session-&gt;from_addr), SWITCH_FALSE, &amp;err);
</span><span class="cx">                                         switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
</span><span class="cx">                                 }
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfromrev15704freeswitchtrunkw32Setupinno_setup"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup)</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupFreePBXurl"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FreePBX.url</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupFreePBXurlfromrev15704freeswitchtrunkw32Setupinno_setupFreePBXurl"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FreePBX.url (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/FreePBX.url) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FreePBX.url                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FreePBX.url        2009-11-29 05:19:09 UTC (rev 15705)
</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_branch_repairw32Setupinno_setupFusionPBXurl"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FusionPBX.url</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupFusionPBXurlfromrev15704freeswitchtrunkw32Setupinno_setupFusionPBXurl"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FusionPBX.url (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/FusionPBX.url) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FusionPBX.url                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/FusionPBX.url        2009-11-29 05:19:09 UTC (rev 15705)
</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_branch_repairw32Setupinno_setupcreate_freepbxbat"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.bat</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_freepbxbatfromrev15704freeswitchtrunkw32Setupinno_setupcreate_freepbxbat"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.bat (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/create_freepbx.bat) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.bat                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.bat        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+cd %1 
+ping 127.0.0.1 -n 5 -w 1000 &gt; nul
+NET START wampmysqld
+wamp\bin\mysql\mysql5.1.36\bin\mysql --user=root &lt;create_freepbx.sql
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_freepbxsql"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.sql</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_freepbxsqlfromrev15704freeswitchtrunkw32Setupinno_setupcreate_freepbxsql"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.sql (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/create_freepbx.sql) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.sql                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_freepbx.sql        2009-11-29 05:19:09 UTC (rev 15705)
</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_branch_repairw32Setupinno_setupcreate_fusionpbxbat"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.bat</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_fusionpbxbatfromrev15704freeswitchtrunkw32Setupinno_setupcreate_fusionpbxbat"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.bat (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/create_fusionpbx.bat) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.bat                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.bat        2009-11-29 05:19:09 UTC (rev 15705)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+cd %1 
+ping 127.0.0.1 -n 5 -w 1000 &gt; nul
+NET START wampmysqld
+wamp\bin\mysql\mysql5.1.36\bin\mysql --user=root &lt;create_fusionpbx.sql
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_fusionpbxsql"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.sql</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupcreate_fusionpbxsqlfromrev15704freeswitchtrunkw32Setupinno_setupcreate_fusionpbxsql"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.sql (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/create_fusionpbx.sql) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.sql                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/create_fusionpbx.sql        2009-11-29 05:19:09 UTC (rev 15705)
</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_branch_repairw32Setupinno_setupexpsoundbat"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/expsound.bat</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupexpsoundbatfromrev15704freeswitchtrunkw32Setupinno_setupexpsoundbat"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/expsound.bat (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/expsound.bat) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/expsound.bat                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/expsound.bat        2009-11-29 05:19:09 UTC (rev 15705)
</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_branch_repairw32Setupinno_setupfreepbxico"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freepbx.ico</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreepbxicofromrev15704freeswitchtrunkw32Setupinno_setupfreepbxico"></a>
<div class="binary"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freepbx.ico (from rev 15704, 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_branch_repairw32Setupinno_setupfreeswitchico"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch.ico</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitchicofromrev15704freeswitchtrunkw32Setupinno_setupfreeswitchico"></a>
<div class="binary"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch.ico (from rev 15704, 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_branch_repairw32Setupinno_setupfreeswitch_104iss"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_1.0.4.iss</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitch_104issfromrev15704freeswitchtrunkw32Setupinno_setupfreeswitch_104iss"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_1.0.4.iss (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/freeswitch_1.0.4.iss) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_1.0.4.iss                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_1.0.4.iss        2009-11-29 05:19:09 UTC (rev 15705)
</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 &quot;Flags: ignoreversion&quot; 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_branch_repairw32Setupinno_setupfreeswitch_freepbx_fusionpbxiss"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfreeswitch_freepbx_fusionpbxissfromrev15704freeswitchtrunkw32Setupinno_setupfreeswitch_freepbx_fusionpbxiss"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/freeswitch_freepbx_fusionpbx.iss        2009-11-29 05:19:09 UTC (rev 15705)
</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 &quot;Flags: ignoreversion&quot; 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_branch_repairw32Setupinno_setupfsguiiss"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/fsgui.iss</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupfsguiissfromrev15704freeswitchtrunkw32Setupinno_setupfsguiiss"></a>
<div class="copfile"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/fsgui.iss (from rev 15704, freeswitch/trunk/w32/Setup/inno_setup/fsgui.iss) (0 => 15705)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/fsgui.iss                                (rev 0)
+++ freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/fsgui.iss        2009-11-29 05:19:09 UTC (rev 15705)
</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 &quot;Flags: ignoreversion&quot; 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_branch_repairw32Setupinno_setupvcredist_x64exe"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/vcredist_x64.exe</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupvcredist_x64exefromrev15704freeswitchtrunkw32Setupinno_setupvcredist_x64exe"></a>
<div class="binary"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/vcredist_x64.exe (from rev 15704, 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_branch_repairw32Setupinno_setupvcredist_x86exe"></a>
<div class="delfile"><h4>Deleted: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/vcredist_x86.exe</h4></div>
<a id="freeswitchbranchesjoshriversmod_managed_working_branch_repairw32Setupinno_setupvcredist_x86exefromrev15704freeswitchtrunkw32Setupinno_setupvcredist_x86exe"></a>
<div class="binary"><h4>Copied: freeswitch/branches/joshrivers/mod_managed_working_branch_repair/w32/Setup/inno_setup/vcredist_x86.exe (from rev 15704, 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>