<!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][17155] </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=17155">17155</a></dd>
<dt>Author</dt> <dd>mikej</dd>
<dt>Date</dt> <dd>2010-04-01 13:07:31 -0500 (Thu, 01 Apr 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>revert to 17152 to fix git mirror, please hold</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#freeswitchtrunkgitignore">freeswitch/trunk/.gitignore</a></li>
<li><a href="#freeswitchtrunkbuildmodulesconfin">freeswitch/trunk/build/modules.conf.in</a></li>
<li><a href="#freeswitchtrunklibsgitignore">freeswitch/trunk/libs/.gitignore</a></li>
<li><a href="#freeswitchtrunklibsfreetdmfreetdmpcin">freeswitch/trunk/libs/freetdm/freetdm.pc.in</a></li>
<li><a href="#freeswitchtrunksrcgitignore">freeswitch/trunk/src/.gitignore</a></li>
<li><a href="#freeswitchtrunksrcmodgitignore">freeswitch/trunk/src/mod/.gitignore</a></li>
<li><a href="#freeswitchtrunksrcmodcodecsmod_sangoma_codecmod_sangoma_codecc">freeswitch/trunk/src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skinnymod_skinnyc">freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skinnymod_skinnyh">freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.h</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skinnyskinny_protocolc">freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_protocol.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skinnyskinny_protocolh">freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_protocol.h</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skinnyskinny_tablesc">freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_tables.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skinnyskinny_tablesh">freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_tables.h</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skypopenmod_skypopenc">freeswitch/trunk/src/mod/endpoints/mod_skypopen/mod_skypopen.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_skypopenskypopen_protocolc">freeswitch/trunk/src/mod/endpoints/mod_skypopen/skypopen_protocol.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiamod_sofiac">freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiamod_sofiah">freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h</a></li>
<li><a href="#freeswitchtrunksrcmodendpointsmod_sofiasofia_gluec">freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c</a></li>
<li><a href="#freeswitchtrunksrcswitch_timec">freeswitch/trunk/src/switch_time.c</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="freeswitchtrunkgitignore"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/.gitignore (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/.gitignore        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/.gitignore        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -1,43 +0,0 @@
</span><del>-*~
-*.o
-*.so
-*.lo
-*.a
-*.la
-.libs
-.deps
-.\#*
-\#*
-.version
-AUTHORS
-COPYING
-ChangeLog
-Makefile
-Makefile.in
-NEWS
-README
-aclocal.m4
-build/Makefile
-build/Makefile.in
-build/config/compile
-build/config/config.guess
-build/config/depcomp
-build/config/install-sh
-build/config/ltmain.sh
-build/config/missing
-build/freeswitch.pc
-build/getlib.sh
-build/getsounds.sh
-build/modmake.rules
-config.log
-config.status
-configure
-freeswitch
-fs_cli
-fs_ivrd
-libtool
-modules.conf
-quiet_libtool
-scripts/fsxs
-scripts/gentls_cert
-a.out.dSYM
</del></span></pre></div>
<a id="freeswitchtrunkbuildmodulesconfin"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/build/modules.conf.in (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/build/modules.conf.in        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/build/modules.conf.in        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> codecs/mod_speex
</span><span class="cx"> codecs/mod_siren
</span><span class="cx"> #codecs/mod_celt
</span><del>-#codecs/mod_sangoma_codec
</del><span class="cx"> #codecs/mod_dahdi_codec
</span><span class="cx"> #dialplans/mod_dialplan_directory
</span><span class="cx"> dialplans/mod_dialplan_xml
</span></span></pre></div>
<a id="freeswitchtrunklibsgitignore"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/.gitignore (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/.gitignore        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/libs/.gitignore        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -1,992 +0,0 @@
</span><del>-apr-util/.make.dirs
-apr-util/Makefile
-apr-util/apr-util.pc
-apr-util/aprutil.exp
-apr-util/apu-1-config
-apr-util/build/apr_common.m4
-apr-util/build/config.guess
-apr-util/build/config.sub
-apr-util/build/find_apr.m4
-apr-util/build/get-version.sh
-apr-util/build/install.sh
-apr-util/build/pkg/pkginfo
-apr-util/build/rules.mk
-apr-util/config.log
-apr-util/config.nice
-apr-util/config.status
-apr-util/configure
-apr-util/export_vars.c
-apr-util/export_vars.sh
-apr-util/exports.c
-apr-util/include/apr_ldap.h
-apr-util/include/apu.h
-apr-util/include/apu_want.h
-apr-util/include/private/apu_config.h
-apr-util/include/private/apu_config.h.in
-apr-util/include/private/apu_select_dbm.h
-apr-util/test/Makefile
-apr-util/xml/expat/Makefile
-apr-util/xml/expat/aclocal.m4
-apr-util/xml/expat/config.h
-apr-util/xml/expat/config.h.in
-apr-util/xml/expat/config.log
-apr-util/xml/expat/config.status
-apr-util/xml/expat/configure
-apr-util/xml/expat/conftools/ltmain.sh
-apr-util/xml/expat/lib/Makefile
-apr-util/xml/expat/lib/expat.h
-apr-util/xml/expat/libtool
-apr/.make.dirs
-apr/Makefile
-apr/apr-1-config
-apr/apr.exp
-apr/apr.pc
-apr/build/apr_rules.mk
-apr/build/config.guess
-apr/build/config.sub
-apr/build/libtool.m4
-apr/build/ltmain.sh
-apr/build/pkg/pkginfo
-apr/config.log
-apr/config.nice
-apr/config.status
-apr/configure
-apr/export_vars.c
-apr/exports.c
-apr/include/apr.h
-apr/include/arch/unix/apr_private.h
-apr/include/arch/unix/apr_private.h.in
-apr/libtool
-apr/test/Makefile
-apr/test/internal/Makefile
-broadvoice/Makefile
-broadvoice/Makefile.in
-broadvoice/aclocal.m4
-broadvoice/broadvoice.pc
-broadvoice/config-h.in
-broadvoice/config.log
-broadvoice/config.status
-broadvoice/config/config.guess
-broadvoice/config/config.sub
-broadvoice/config/depcomp
-broadvoice/config/install-sh
-broadvoice/config/ltmain.sh
-broadvoice/config/missing
-broadvoice/configure
-broadvoice/doc/Makefile
-broadvoice/doc/Makefile.in
-broadvoice/libtool
-broadvoice/src/Makefile
-broadvoice/src/Makefile.in
-broadvoice/src/broadvoice.h
-broadvoice/src/config.h
-broadvoice/src/stamp-h1
-broadvoice/tests/regression_tests.sh
-curl/Makefile
-curl/Makefile.in
-curl/aclocal.m4
-curl/config.guess
-curl/config.log
-curl/config.status
-curl/config.sub
-curl/configure
-curl/curl-config
-curl/depcomp
-curl/include/Makefile
-curl/include/Makefile.in
-curl/include/curl/Makefile
-curl/include/curl/Makefile.in
-curl/install-sh
-curl/lib/Makefile
-curl/lib/Makefile.in
-curl/lib/config.h
-curl/lib/config.h.in
-curl/lib/stamp-h1
-curl/libcurl.pc
-curl/libtool
-curl/ltmain.sh
-curl/missing
-curl/packages/AIX/Makefile
-curl/packages/AIX/Makefile.in
-curl/packages/AIX/RPM/Makefile
-curl/packages/AIX/RPM/Makefile.in
-curl/packages/AIX/RPM/curl.spec
-curl/packages/DOS/Makefile
-curl/packages/DOS/Makefile.in
-curl/packages/EPM/Makefile
-curl/packages/EPM/Makefile.in
-curl/packages/EPM/curl.list
-curl/packages/Linux/Makefile
-curl/packages/Linux/Makefile.in
-curl/packages/Linux/RPM/Makefile
-curl/packages/Linux/RPM/Makefile.in
-curl/packages/Linux/RPM/curl-ssl.spec
-curl/packages/Linux/RPM/curl.spec
-curl/packages/Makefile
-curl/packages/Makefile.in
-curl/packages/Solaris/Makefile
-curl/packages/Solaris/Makefile.in
-curl/packages/Win32/Makefile
-curl/packages/Win32/Makefile.in
-curl/packages/Win32/cygwin/Makefile
-curl/packages/Win32/cygwin/Makefile.in
-curl/packages/vms/Makefile
-curl/packages/vms/Makefile.in
-curl/src/Makefile
-curl/src/Makefile.in
-curl/src/config.h
-curl/src/stamp-h2
-iksemel/Makefile
-iksemel/Makefile.in
-iksemel/aclocal.m4
-iksemel/build/compile
-iksemel/build/config.guess
-iksemel/build/config.sub
-iksemel/build/depcomp
-iksemel/build/install-sh
-iksemel/build/ltmain.sh
-iksemel/build/missing
-iksemel/config.log
-iksemel/config.status
-iksemel/configure
-iksemel/doc/Makefile
-iksemel/doc/Makefile.in
-iksemel/iksemel.pc
-iksemel/include/Makefile
-iksemel/include/Makefile.in
-iksemel/include/config.h
-iksemel/include/config.h.in
-iksemel/include/stamp-h1
-iksemel/libtool
-iksemel/src/Makefile
-iksemel/src/Makefile.in
-iksemel/test/Makefile
-iksemel/test/Makefile.in
-iksemel/tools/Makefile
-iksemel/tools/Makefile.in
-ilbc/Makefile
-ilbc/Makefile.in
-ilbc/aclocal.m4
-ilbc/config-h.in
-ilbc/config.log
-ilbc/config.status
-ilbc/config/config.guess
-ilbc/config/config.sub
-ilbc/config/depcomp
-ilbc/config/install-sh
-ilbc/config/ltmain.sh
-ilbc/config/missing
-ilbc/configure
-ilbc/doc/Makefile
-ilbc/doc/Makefile.in
-ilbc/libtool
-ilbc/localtests/Makefile
-ilbc/localtests/Makefile.in
-ilbc/src/Makefile
-ilbc/src/Makefile.in
-ilbc/src/config.h
-ilbc/src/ilbc.h
-ilbc/src/stamp-h1
-ilbc/tests/Makefile
-ilbc/tests/Makefile.in
-js/Makefile
-js/aclocal.m4
-js/config.guess
-js/config.h
-js/config.h.in
-js/config.log
-js/config.status
-js/config.sub
-js/configure
-js/js
-js/js-config.sh
-js/js.pc
-js/jscpucfg
-js/libtool
-js/ltmain.sh
-js/nsprpub/Makefile
-js/nsprpub/aclocal.m4
-js/nsprpub/build/autoconf/config.guess
-js/nsprpub/build/autoconf/config.sub
-js/nsprpub/build/autoconf/install-sh
-js/nsprpub/build/autoconf/ltmain.sh
-js/nsprpub/build/autoconf/missing
-js/nsprpub/config.log
-js/nsprpub/config.status
-js/nsprpub/config/Makefile
-js/nsprpub/config/autoconf.mk
-js/nsprpub/config/nfspwd
-js/nsprpub/config/now
-js/nsprpub/config/nsinstall
-js/nsprpub/config/nspr-config
-js/nsprpub/config/nsprincl.mk
-js/nsprpub/config/nsprincl.sh
-js/nsprpub/configure
-js/nsprpub/dist/
-js/nsprpub/lib/Makefile
-js/nsprpub/lib/ds/Makefile
-js/nsprpub/lib/ds/_pl_bld.h
-js/nsprpub/lib/libc/Makefile
-js/nsprpub/lib/libc/include/Makefile
-js/nsprpub/lib/libc/src/Makefile
-js/nsprpub/lib/libc/src/_pl_bld.h
-js/nsprpub/lib/tests/Makefile
-js/nsprpub/libtool
-js/nsprpub/pkg/Makefile
-js/nsprpub/pkg/linux/Makefile
-js/nsprpub/pkg/solaris/Makefile
-js/nsprpub/pkg/solaris/SUNWpr/Makefile
-js/nsprpub/pkg/solaris/SUNWprd/Makefile
-js/nsprpub/pr/Makefile
-js/nsprpub/pr/include/Makefile
-js/nsprpub/pr/include/md/Makefile
-js/nsprpub/pr/include/obsolete/Makefile
-js/nsprpub/pr/include/private/Makefile
-js/nsprpub/pr/src/Makefile
-js/nsprpub/pr/src/_pr_bld.h
-js/nsprpub/pr/src/io/Makefile
-js/nsprpub/pr/src/linking/Makefile
-js/nsprpub/pr/src/malloc/Makefile
-js/nsprpub/pr/src/md/Makefile
-js/nsprpub/pr/src/md/unix/Makefile
-js/nsprpub/pr/src/memory/Makefile
-js/nsprpub/pr/src/misc/Makefile
-js/nsprpub/pr/src/pthreads/Makefile
-js/nsprpub/pr/src/threads/Makefile
-js/nsprpub/pr/tests/Makefile
-js/nsprpub/pr/tests/dll/Makefile
-js/src/jsautocfg.h
-js/src/perlconnect/Makefile.PL
-libdingaling/Makefile
-libdingaling/Makefile.in
-libdingaling/aclocal.m4
-libdingaling/build/compile
-libdingaling/build/config.guess
-libdingaling/build/config.sub
-libdingaling/build/depcomp
-libdingaling/build/install-sh
-libdingaling/build/ltmain.sh
-libdingaling/build/missing
-libdingaling/config.log
-libdingaling/config.status
-libdingaling/configure
-libdingaling/libtool
-libdingaling/src/config.h
-libdingaling/src/config.h.in
-libdingaling/src/stamp-h1
-libedit/Makefile
-libedit/Makefile.in
-libedit/aclocal.m4
-libedit/config.guess
-libedit/config.h
-libedit/config.h.in
-libedit/config.log
-libedit/config.status
-libedit/config.sub
-libedit/configure
-libedit/depcomp
-libedit/doc/Makefile
-libedit/doc/Makefile.in
-libedit/doc/editline.3
-libedit/doc/editrc.5
-libedit/examples/Makefile
-libedit/examples/Makefile.in
-libedit/examples/fileman
-libedit/examples/test
-libedit/install-sh
-libedit/libedit.pc
-libedit/libtool
-libedit/ltmain.sh
-libedit/missing
-libedit/src/Makefile
-libedit/src/Makefile.in
-libedit/src/common.h
-libedit/src/emacs.h
-libedit/src/fcns.c
-libedit/src/fcns.h
-libedit/src/help.c
-libedit/src/help.h
-libedit/src/vi.h
-libedit/stamp-h1
-libg722_1/Makefile
-libg722_1/Makefile.in
-libg722_1/aclocal.m4
-libg722_1/config-h.in
-libg722_1/config.log
-libg722_1/config.status
-libg722_1/config/config.guess
-libg722_1/config/config.sub
-libg722_1/config/install-sh
-libg722_1/config/ltmain.sh
-libg722_1/configure
-libg722_1/doc/Makefile
-libg722_1/doc/Makefile.in
-libg722_1/g722_1.spec
-libg722_1/libtool
-libg722_1/src/Makefile
-libg722_1/src/Makefile.in
-libg722_1/src/config.h
-libg722_1/src/dct4.h
-libg722_1/src/g722_1.h
-libg722_1/src/make_dct4_tables
-libg722_1/src/make_tables
-libg722_1/src/stamp-h1
-libg722_1/test-data/Makefile
-libg722_1/test-data/Makefile.in
-libg722_1/test-data/itu/Makefile
-libg722_1/test-data/itu/Makefile.in
-libg722_1/test-data/local/Makefile
-libg722_1/test-data/local/Makefile.in
-libg722_1/tests/Makefile
-libg722_1/tests/Makefile.in
-libg722_1/tests/regression_tests.sh
-libsndfile/Cfg/compile
-libsndfile/Cfg/config.guess
-libsndfile/Cfg/config.sub
-libsndfile/Cfg/depcomp
-libsndfile/Cfg/install-sh
-libsndfile/Cfg/ltmain.sh
-libsndfile/Cfg/missing
-libsndfile/M4/Makefile
-libsndfile/M4/Makefile.in
-libsndfile/Makefile
-libsndfile/Makefile.in
-libsndfile/Octave/Makefile
-libsndfile/Octave/Makefile.in
-libsndfile/Win32/Makefile
-libsndfile/Win32/Makefile.in
-libsndfile/aclocal.m4
-libsndfile/config.log
-libsndfile/config.status
-libsndfile/configure
-libsndfile/doc/Makefile
-libsndfile/doc/Makefile.in
-libsndfile/examples/Makefile
-libsndfile/examples/Makefile.in
-libsndfile/libsndfile.spec
-libsndfile/libtool
-libsndfile/man/Makefile
-libsndfile/man/Makefile.in
-libsndfile/programs/Makefile
-libsndfile/programs/Makefile.in
-libsndfile/regtest/Makefile
-libsndfile/regtest/Makefile.in
-libsndfile/sndfile.pc
-libsndfile/src/G72x/Makefile
-libsndfile/src/G72x/Makefile.in
-libsndfile/src/G72x/g72x_test
-libsndfile/src/GSM610/Makefile
-libsndfile/src/GSM610/Makefile.in
-libsndfile/src/Makefile
-libsndfile/src/Makefile.in
-libsndfile/src/config.h
-libsndfile/src/config.h.in
-libsndfile/src/sndfile.h
-libsndfile/src/stamp-h1
-libsndfile/src/test_main
-libsndfile/tests/Makefile
-libsndfile/tests/Makefile.in
-libsndfile/tests/test_wrapper.sh
-openzap/COPYING
-openzap/INSTALL
-openzap/Makefile.in
-openzap/build/compile
-openzap/build/depcomp
-openzap/build/install-sh
-openzap/build/ltmain.sh
-openzap/build/missing
-openzap/openzap.pc
-pcre/Makefile
-pcre/Makefile.in
-pcre/aclocal.m4
-pcre/config.guess
-pcre/config.h
-pcre/config.h.in
-pcre/config.log
-pcre/config.status
-pcre/config.sub
-pcre/configure
-pcre/install-sh
-pcre/libpcre.pc
-pcre/libpcrecpp.pc
-pcre/libtool
-pcre/ltmain.sh
-pcre/missing
-pcre/pcre-config
-pcre/pcre_chartables.c
-pcre/pcre_scanner_unittest
-pcre/pcre_stringpiece.h
-pcre/pcre_stringpiece_unittest
-pcre/pcrecpp_unittest
-pcre/pcrecpparg.h
-pcre/pcregrep
-pcre/pcretest
-pcre/stamp-h1
-portaudio/Makefile
-portaudio/aclocal.m4
-portaudio/config.guess
-portaudio/config.log
-portaudio/config.status
-portaudio/config.sub
-portaudio/configure
-portaudio/install-sh
-portaudio/libtool
-portaudio/ltmain.sh
-portaudio/missing
-portaudio/portaudio-2.0.pc
-silk/Makefile
-silk/Makefile.in
-silk/aclocal.m4
-silk/compile
-silk/config.guess
-silk/config.log
-silk/config.status
-silk/config.sub
-silk/configure
-silk/depcomp
-silk/install-sh
-silk/libtool
-silk/ltmain.sh
-silk/missing
-sofia-sip/Makefile
-sofia-sip/Makefile.in
-sofia-sip/aclocal.m4
-sofia-sip/compile
-sofia-sip/config.guess
-sofia-sip/config.h
-sofia-sip/config.h.in
-sofia-sip/config.log
-sofia-sip/config.status
-sofia-sip/config.sub
-sofia-sip/configure
-sofia-sip/depcomp
-sofia-sip/install-sh
-sofia-sip/libsofia-sip-ua-glib/Makefile
-sofia-sip/libsofia-sip-ua-glib/Makefile.in
-sofia-sip/libsofia-sip-ua-glib/su-glib/Doxyfile
-sofia-sip/libsofia-sip-ua-glib/su-glib/Makefile
-sofia-sip/libsofia-sip-ua-glib/su-glib/Makefile.in
-sofia-sip/libsofia-sip-ua/Makefile
-sofia-sip/libsofia-sip-ua/Makefile.in
-sofia-sip/libsofia-sip-ua/bnf/Doxyfile
-sofia-sip/libsofia-sip-ua/bnf/Makefile
-sofia-sip/libsofia-sip-ua/bnf/Makefile.in
-sofia-sip/libsofia-sip-ua/docs/Doxyfile
-sofia-sip/libsofia-sip-ua/docs/Doxyfile.rfc
-sofia-sip/libsofia-sip-ua/docs/Doxyfile.version
-sofia-sip/libsofia-sip-ua/docs/Makefile
-sofia-sip/libsofia-sip-ua/docs/Makefile.in
-sofia-sip/libsofia-sip-ua/docs/sofia-footer.html
-sofia-sip/libsofia-sip-ua/features/Doxyfile
-sofia-sip/libsofia-sip-ua/features/Makefile
-sofia-sip/libsofia-sip-ua/features/Makefile.in
-sofia-sip/libsofia-sip-ua/features/sofia-sip/sofia_features.h
-sofia-sip/libsofia-sip-ua/http/Doxyfile
-sofia-sip/libsofia-sip-ua/http/Makefile
-sofia-sip/libsofia-sip-ua/http/Makefile.in
-sofia-sip/libsofia-sip-ua/http/http_parser_table.c
-sofia-sip/libsofia-sip-ua/http/http_tag.c
-sofia-sip/libsofia-sip-ua/http/http_tag_ref.c
-sofia-sip/libsofia-sip-ua/http/sofia-sip/http_protos.h
-sofia-sip/libsofia-sip-ua/http/sofia-sip/http_tag.h
-sofia-sip/libsofia-sip-ua/ipt/Doxyfile
-sofia-sip/libsofia-sip-ua/ipt/Makefile
-sofia-sip/libsofia-sip-ua/ipt/Makefile.in
-sofia-sip/libsofia-sip-ua/iptsec/Doxyfile
-sofia-sip/libsofia-sip-ua/iptsec/Makefile
-sofia-sip/libsofia-sip-ua/iptsec/Makefile.in
-sofia-sip/libsofia-sip-ua/iptsec/auth_tag_ref.c
-sofia-sip/libsofia-sip-ua/msg/Doxyfile
-sofia-sip/libsofia-sip-ua/msg/Makefile
-sofia-sip/libsofia-sip-ua/msg/Makefile.in
-sofia-sip/libsofia-sip-ua/msg/msg_mime_table.c
-sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_mime_protos.h
-sofia-sip/libsofia-sip-ua/msg/sofia-sip/msg_protos.h
-sofia-sip/libsofia-sip-ua/msg/test_protos.h
-sofia-sip/libsofia-sip-ua/msg/test_table.c
-sofia-sip/libsofia-sip-ua/nea/Doxyfile
-sofia-sip/libsofia-sip-ua/nea/Makefile
-sofia-sip/libsofia-sip-ua/nea/Makefile.in
-sofia-sip/libsofia-sip-ua/nea/nea_tag_ref.c
-sofia-sip/libsofia-sip-ua/nta/Doxyfile
-sofia-sip/libsofia-sip-ua/nta/Makefile
-sofia-sip/libsofia-sip-ua/nta/Makefile.in
-sofia-sip/libsofia-sip-ua/nta/nta_tag_ref.c
-sofia-sip/libsofia-sip-ua/nth/Doxyfile
-sofia-sip/libsofia-sip-ua/nth/Makefile
-sofia-sip/libsofia-sip-ua/nth/Makefile.in
-sofia-sip/libsofia-sip-ua/nth/nth_tag_ref.c
-sofia-sip/libsofia-sip-ua/nua/Doxyfile
-sofia-sip/libsofia-sip-ua/nua/Makefile
-sofia-sip/libsofia-sip-ua/nua/Makefile.in
-sofia-sip/libsofia-sip-ua/nua/nua_tag_ref.c
-sofia-sip/libsofia-sip-ua/sdp/Doxyfile
-sofia-sip/libsofia-sip-ua/sdp/Makefile
-sofia-sip/libsofia-sip-ua/sdp/Makefile.in
-sofia-sip/libsofia-sip-ua/sdp/sdp_tag_ref.c
-sofia-sip/libsofia-sip-ua/sip/Doxyfile
-sofia-sip/libsofia-sip-ua/sip/Makefile
-sofia-sip/libsofia-sip-ua/sip/Makefile.in
-sofia-sip/libsofia-sip-ua/sip/sip_parser_table.c
-sofia-sip/libsofia-sip-ua/sip/sip_tag.c
-sofia-sip/libsofia-sip-ua/sip/sip_tag_ref.c
-sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_extra.h
-sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_hclasses.h
-sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_protos.h
-sofia-sip/libsofia-sip-ua/sip/sofia-sip/sip_tag.h
-sofia-sip/libsofia-sip-ua/soa/Doxyfile
-sofia-sip/libsofia-sip-ua/soa/Makefile
-sofia-sip/libsofia-sip-ua/soa/Makefile.in
-sofia-sip/libsofia-sip-ua/soa/soa_tag_ref.c
-sofia-sip/libsofia-sip-ua/sresolv/Doxyfile
-sofia-sip/libsofia-sip-ua/sresolv/Makefile
-sofia-sip/libsofia-sip-ua/sresolv/Makefile.in
-sofia-sip/libsofia-sip-ua/stun/Doxyfile
-sofia-sip/libsofia-sip-ua/stun/Makefile
-sofia-sip/libsofia-sip-ua/stun/Makefile.in
-sofia-sip/libsofia-sip-ua/stun/stun_tag_ref.c
-sofia-sip/libsofia-sip-ua/stun/stunc
-sofia-sip/libsofia-sip-ua/su/Doxyfile
-sofia-sip/libsofia-sip-ua/su/Makefile
-sofia-sip/libsofia-sip-ua/su/Makefile.in
-sofia-sip/libsofia-sip-ua/su/addrinfo
-sofia-sip/libsofia-sip-ua/su/localinfo
-sofia-sip/libsofia-sip-ua/su/sofia-sip/stamp-h2
-sofia-sip/libsofia-sip-ua/su/sofia-sip/su_configure.h
-sofia-sip/libsofia-sip-ua/su/su_tag_ref.c
-sofia-sip/libsofia-sip-ua/tport/Doxyfile
-sofia-sip/libsofia-sip-ua/tport/Makefile
-sofia-sip/libsofia-sip-ua/tport/Makefile.in
-sofia-sip/libsofia-sip-ua/tport/tport_tag_ref.c
-sofia-sip/libsofia-sip-ua/url/Doxyfile
-sofia-sip/libsofia-sip-ua/url/Makefile
-sofia-sip/libsofia-sip-ua/url/Makefile.in
-sofia-sip/libsofia-sip-ua/url/url_tag_ref.c
-sofia-sip/libtool
-sofia-sip/ltmain.sh
-sofia-sip/missing
-sofia-sip/open_c/Makefile
-sofia-sip/open_c/Makefile.in
-sofia-sip/open_c/config.h
-sofia-sip/packages/Makefile
-sofia-sip/packages/Makefile.in
-sofia-sip/packages/sofia-sip-1.12.10devel.spec
-sofia-sip/packages/sofia-sip-ua-glib.pc
-sofia-sip/packages/sofia-sip-ua.pc
-sofia-sip/s2check/Makefile
-sofia-sip/s2check/Makefile.in
-sofia-sip/stamp-h1
-sofia-sip/tests/Makefile
-sofia-sip/tests/Makefile.in
-sofia-sip/utils/Doxyfile
-sofia-sip/utils/Makefile
-sofia-sip/utils/Makefile.in
-sofia-sip/win32/Makefile
-sofia-sip/win32/Makefile.in
-sofia-sip/win32/config.h
-spandsp/Makefile
-spandsp/Makefile.in
-spandsp/aclocal.m4
-spandsp/config-h.in
-spandsp/config.log
-spandsp/config.status
-spandsp/config/config.guess
-spandsp/config/config.sub
-spandsp/config/depcomp
-spandsp/config/install-sh
-spandsp/config/ltmain.sh
-spandsp/config/missing
-spandsp/configure
-spandsp/doc/Makefile
-spandsp/doc/Makefile.in
-spandsp/doc/doxygen
-spandsp/libtool
-spandsp/spandsp-sim/Makefile
-spandsp/spandsp-sim/Makefile.in
-spandsp/spandsp.pc
-spandsp/src/Makefile
-spandsp/src/Makefile.in
-spandsp/src/at_interpreter_dictionary.h
-spandsp/src/config.h
-spandsp/src/make_at_dictionary
-spandsp/src/make_modem_filter
-spandsp/src/spandsp.h
-spandsp/src/stamp-h1
-spandsp/src/v17_v32bis_rx_fixed_rrc.h
-spandsp/src/v17_v32bis_rx_floating_rrc.h
-spandsp/src/v17_v32bis_tx_fixed_rrc.h
-spandsp/src/v17_v32bis_tx_floating_rrc.h
-spandsp/src/v22bis_rx_1200_fixed_rrc.h
-spandsp/src/v22bis_rx_1200_floating_rrc.h
-spandsp/src/v22bis_rx_2400_fixed_rrc.h
-spandsp/src/v22bis_rx_2400_floating_rrc.h
-spandsp/src/v22bis_tx_fixed_rrc.h
-spandsp/src/v22bis_tx_floating_rrc.h
-spandsp/src/v27ter_rx_2400_fixed_rrc.h
-spandsp/src/v27ter_rx_2400_floating_rrc.h
-spandsp/src/v27ter_rx_4800_fixed_rrc.h
-spandsp/src/v27ter_rx_4800_floating_rrc.h
-spandsp/src/v27ter_tx_2400_fixed_rrc.h
-spandsp/src/v27ter_tx_2400_floating_rrc.h
-spandsp/src/v27ter_tx_4800_fixed_rrc.h
-spandsp/src/v27ter_tx_4800_floating_rrc.h
-spandsp/src/v29rx_fixed_rrc.h
-spandsp/src/v29rx_floating_rrc.h
-spandsp/src/v29tx_fixed_rrc.h
-spandsp/src/v29tx_floating_rrc.h
-spandsp/test-data/Makefile
-spandsp/test-data/Makefile.in
-spandsp/test-data/etsi/Makefile
-spandsp/test-data/etsi/Makefile.in
-spandsp/test-data/etsi/fax/Makefile
-spandsp/test-data/etsi/fax/Makefile.in
-spandsp/test-data/itu/Makefile
-spandsp/test-data/itu/Makefile.in
-spandsp/test-data/itu/fax/Makefile
-spandsp/test-data/itu/fax/Makefile.in
-spandsp/test-data/local/Makefile
-spandsp/test-data/local/Makefile.in
-spandsp/tests/Makefile
-spandsp/tests/Makefile.in
-speex/Makefile
-speex/Makefile.in
-speex/aclocal.m4
-speex/config.guess
-speex/config.h
-speex/config.h.in
-speex/config.log
-speex/config.status
-speex/config.sub
-speex/configure
-speex/depcomp
-speex/include/Makefile
-speex/include/Makefile.in
-speex/include/speex/Makefile
-speex/include/speex/Makefile.in
-speex/include/speex/speex_config_types.h
-speex/install-sh
-speex/libspeex/Makefile
-speex/libspeex/Makefile.in
-speex/libtool
-speex/ltmain.sh
-speex/missing
-speex/speex.pc
-speex/speexdsp.pc
-speex/src/Makefile
-speex/src/Makefile.in
-speex/stamp-h1
-speex/symbian/Makefile
-speex/symbian/Makefile.in
-speex/ti/Makefile
-speex/ti/Makefile.in
-speex/ti/speex_C54_test/Makefile
-speex/ti/speex_C54_test/Makefile.in
-speex/ti/speex_C55_test/Makefile
-speex/ti/speex_C55_test/Makefile.in
-speex/ti/speex_C64_test/Makefile
-speex/ti/speex_C64_test/Makefile.in
-speex/win32/Makefile
-speex/win32/Makefile.in
-speex/win32/VS2003/Makefile
-speex/win32/VS2003/Makefile.in
-speex/win32/VS2003/libspeex/Makefile
-speex/win32/VS2003/libspeex/Makefile.in
-speex/win32/VS2003/libspeexdsp/Makefile
-speex/win32/VS2003/libspeexdsp/Makefile.in
-speex/win32/VS2003/speexdec/Makefile
-speex/win32/VS2003/speexdec/Makefile.in
-speex/win32/VS2003/speexenc/Makefile
-speex/win32/VS2003/speexenc/Makefile.in
-speex/win32/VS2003/tests/Makefile
-speex/win32/VS2003/tests/Makefile.in
-speex/win32/VS2005/Makefile
-speex/win32/VS2005/Makefile.in
-speex/win32/VS2005/libspeex/Makefile
-speex/win32/VS2005/libspeex/Makefile.in
-speex/win32/VS2005/libspeexdsp/Makefile
-speex/win32/VS2005/libspeexdsp/Makefile.in
-speex/win32/VS2005/speexdec/Makefile
-speex/win32/VS2005/speexdec/Makefile.in
-speex/win32/VS2005/speexenc/Makefile
-speex/win32/VS2005/speexenc/Makefile.in
-speex/win32/VS2005/tests/Makefile
-speex/win32/VS2005/tests/Makefile.in
-speex/win32/VS2008/Makefile
-speex/win32/VS2008/Makefile.in
-speex/win32/VS2008/libspeex/Makefile
-speex/win32/VS2008/libspeex/Makefile.in
-speex/win32/VS2008/libspeexdsp/Makefile
-speex/win32/VS2008/libspeexdsp/Makefile.in
-speex/win32/VS2008/speexdec/Makefile
-speex/win32/VS2008/speexdec/Makefile.in
-speex/win32/VS2008/speexenc/Makefile
-speex/win32/VS2008/speexenc/Makefile.in
-speex/win32/VS2008/tests/Makefile
-speex/win32/VS2008/tests/Makefile.in
-speex/win32/libspeex/Makefile
-speex/win32/libspeex/Makefile.in
-speex/win32/speexdec/Makefile
-speex/win32/speexdec/Makefile.in
-speex/win32/speexenc/Makefile
-speex/win32/speexenc/Makefile.in
-sqlite/Makefile
-sqlite/aclocal.m4
-sqlite/config.guess
-sqlite/config.log
-sqlite/config.status
-sqlite/config.sub
-sqlite/configure
-sqlite/install-sh
-sqlite/keywordhash.h
-sqlite/lemon
-sqlite/lempar.c
-sqlite/libtool
-sqlite/ltmain.sh
-sqlite/missing
-sqlite/mkkeywordhash
-sqlite/opcodes.c
-sqlite/opcodes.h
-sqlite/parse.c
-sqlite/parse.h
-sqlite/parse.h.temp
-sqlite/parse.out
-sqlite/parse.y
-sqlite/sqlite3
-sqlite/sqlite3.h
-sqlite/sqlite3.pc
-srtp/Makefile
-srtp/Makefile.in
-srtp/aclocal.m4
-srtp/aes_tables
-srtp/build/config.guess
-srtp/build/config.sub
-srtp/build/depcomp
-srtp/build/install-sh
-srtp/build/ltmain.sh
-srtp/build/missing
-srtp/config.log
-srtp/config.status
-srtp/config_in.h
-srtp/configure
-srtp/crypto/Makefile
-srtp/crypto/include/config.h
-srtp/crypto/include/stamp-h1
-srtp/doc/Makefile
-srtp/libtool
-srtp/srtp-1.42.pc
-srtp/test/Makefile
-srtp/test/Makefile.in
-tiff-3.8.2/Makefile
-tiff-3.8.2/Makefile.in
-tiff-3.8.2/aclocal.m4
-tiff-3.8.2/config.log
-tiff-3.8.2/config.status
-tiff-3.8.2/config/config.guess
-tiff-3.8.2/config/config.sub
-tiff-3.8.2/config/install-sh
-tiff-3.8.2/config/ltmain.sh
-tiff-3.8.2/configure
-tiff-3.8.2/contrib/Makefile
-tiff-3.8.2/contrib/Makefile.in
-tiff-3.8.2/contrib/acorn/Makefile
-tiff-3.8.2/contrib/acorn/Makefile.in
-tiff-3.8.2/contrib/addtiffo/Makefile
-tiff-3.8.2/contrib/addtiffo/Makefile.in
-tiff-3.8.2/contrib/addtiffo/addtiffo
-tiff-3.8.2/contrib/dbs/Makefile
-tiff-3.8.2/contrib/dbs/Makefile.in
-tiff-3.8.2/contrib/dbs/tiff-bi
-tiff-3.8.2/contrib/dbs/tiff-grayscale
-tiff-3.8.2/contrib/dbs/tiff-palette
-tiff-3.8.2/contrib/dbs/tiff-rgb
-tiff-3.8.2/contrib/dbs/xtiff/Makefile
-tiff-3.8.2/contrib/dbs/xtiff/Makefile.in
-tiff-3.8.2/contrib/iptcutil/Makefile
-tiff-3.8.2/contrib/iptcutil/Makefile.in
-tiff-3.8.2/contrib/iptcutil/iptcutil
-tiff-3.8.2/contrib/mac-cw/Makefile
-tiff-3.8.2/contrib/mac-cw/Makefile.in
-tiff-3.8.2/contrib/mac-mpw/Makefile
-tiff-3.8.2/contrib/mac-mpw/Makefile.in
-tiff-3.8.2/contrib/mfs/Makefile
-tiff-3.8.2/contrib/mfs/Makefile.in
-tiff-3.8.2/contrib/ojpeg/Makefile
-tiff-3.8.2/contrib/ojpeg/Makefile.in
-tiff-3.8.2/contrib/pds/Makefile
-tiff-3.8.2/contrib/pds/Makefile.in
-tiff-3.8.2/contrib/ras/Makefile
-tiff-3.8.2/contrib/ras/Makefile.in
-tiff-3.8.2/contrib/stream/Makefile
-tiff-3.8.2/contrib/stream/Makefile.in
-tiff-3.8.2/contrib/tags/Makefile
-tiff-3.8.2/contrib/tags/Makefile.in
-tiff-3.8.2/contrib/win_dib/Makefile
-tiff-3.8.2/contrib/win_dib/Makefile.in
-tiff-3.8.2/html/Makefile
-tiff-3.8.2/html/Makefile.in
-tiff-3.8.2/html/images/Makefile
-tiff-3.8.2/html/images/Makefile.in
-tiff-3.8.2/html/man/Makefile
-tiff-3.8.2/html/man/Makefile.in
-tiff-3.8.2/libtiff/Makefile
-tiff-3.8.2/libtiff/Makefile.in
-tiff-3.8.2/libtiff/mkg3states
-tiff-3.8.2/libtiff/stamp-h1
-tiff-3.8.2/libtiff/stamp-h2
-tiff-3.8.2/libtiff/tif_config.h
-tiff-3.8.2/libtiff/tif_config.h.in
-tiff-3.8.2/libtiff/tiffconf.h
-tiff-3.8.2/libtool
-tiff-3.8.2/man/Makefile
-tiff-3.8.2/man/Makefile.in
-tiff-3.8.2/port/Makefile
-tiff-3.8.2/port/Makefile.in
-tiff-3.8.2/test/Makefile
-tiff-3.8.2/test/Makefile.in
-tiff-3.8.2/tools/Makefile
-tiff-3.8.2/tools/Makefile.in
-tiff-3.8.2/tools/bmp2tiff
-tiff-3.8.2/tools/fax2ps
-tiff-3.8.2/tools/fax2tiff
-tiff-3.8.2/tools/gif2tiff
-tiff-3.8.2/tools/pal2rgb
-tiff-3.8.2/tools/ppm2tiff
-tiff-3.8.2/tools/ras2tiff
-tiff-3.8.2/tools/raw2tiff
-tiff-3.8.2/tools/rgb2ycbcr
-tiff-3.8.2/tools/thumbnail
-tiff-3.8.2/tools/tiff2bw
-tiff-3.8.2/tools/tiff2pdf
-tiff-3.8.2/tools/tiff2ps
-tiff-3.8.2/tools/tiff2rgba
-tiff-3.8.2/tools/tiffcmp
-tiff-3.8.2/tools/tiffcp
-tiff-3.8.2/tools/tiffdither
-tiff-3.8.2/tools/tiffdump
-tiff-3.8.2/tools/tiffinfo
-tiff-3.8.2/tools/tiffmedian
-tiff-3.8.2/tools/tiffset
-tiff-3.8.2/tools/tiffsplit
-unimrcp/Makefile
-unimrcp/Makefile.in
-unimrcp/aclocal.m4
-unimrcp/build/Makefile
-unimrcp/build/Makefile.in
-unimrcp/build/config.guess
-unimrcp/build/config.sub
-unimrcp/build/depcomp
-unimrcp/build/install-sh
-unimrcp/build/ltmain.sh
-unimrcp/build/missing
-unimrcp/build/pkgconfig/Makefile
-unimrcp/build/pkgconfig/Makefile.in
-unimrcp/build/pkgconfig/unimrcpclient.pc
-unimrcp/build/pkgconfig/unimrcpplugin.pc
-unimrcp/build/pkgconfig/unimrcpserver.pc
-unimrcp/conf/Makefile
-unimrcp/conf/Makefile.in
-unimrcp/config.log
-unimrcp/config.status
-unimrcp/configure
-unimrcp/data/Makefile
-unimrcp/data/Makefile.in
-unimrcp/libs/Makefile
-unimrcp/libs/Makefile.in
-unimrcp/libs/apr-toolkit/Makefile
-unimrcp/libs/apr-toolkit/Makefile.in
-unimrcp/libs/mpf/Makefile
-unimrcp/libs/mpf/Makefile.in
-unimrcp/libs/mrcp-client/Makefile
-unimrcp/libs/mrcp-client/Makefile.in
-unimrcp/libs/mrcp-engine/Makefile
-unimrcp/libs/mrcp-engine/Makefile.in
-unimrcp/libs/mrcp-server/Makefile
-unimrcp/libs/mrcp-server/Makefile.in
-unimrcp/libs/mrcp-signaling/Makefile
-unimrcp/libs/mrcp-signaling/Makefile.in
-unimrcp/libs/mrcp/Makefile
-unimrcp/libs/mrcp/Makefile.in
-unimrcp/libs/mrcpv2-transport/Makefile
-unimrcp/libs/mrcpv2-transport/Makefile.in
-unimrcp/libs/uni-rtsp/Makefile
-unimrcp/libs/uni-rtsp/Makefile.in
-unimrcp/libtool
-unimrcp/modules/Makefile
-unimrcp/modules/Makefile.in
-unimrcp/modules/mrcp-sofiasip/Makefile
-unimrcp/modules/mrcp-sofiasip/Makefile.in
-unimrcp/modules/mrcp-unirtsp/Makefile
-unimrcp/modules/mrcp-unirtsp/Makefile.in
-unimrcp/platforms/Makefile
-unimrcp/platforms/Makefile.in
-unimrcp/platforms/asr-client/Makefile
-unimrcp/platforms/asr-client/Makefile.in
-unimrcp/platforms/libasr-client/Makefile
-unimrcp/platforms/libasr-client/Makefile.in
-unimrcp/platforms/libunimrcp-client/Makefile
-unimrcp/platforms/libunimrcp-client/Makefile.in
-unimrcp/platforms/libunimrcp-server/Makefile
-unimrcp/platforms/libunimrcp-server/Makefile.in
-unimrcp/platforms/umc/Makefile
-unimrcp/platforms/umc/Makefile.in
-unimrcp/platforms/unimrcp-client/Makefile
-unimrcp/platforms/unimrcp-client/Makefile.in
-unimrcp/platforms/unimrcp-server/Makefile
-unimrcp/platforms/unimrcp-server/Makefile.in
-unimrcp/plugins/Makefile
-unimrcp/plugins/Makefile.in
-unimrcp/plugins/demo-recog/Makefile
-unimrcp/plugins/demo-recog/Makefile.in
-unimrcp/plugins/demo-synth/Makefile
-unimrcp/plugins/demo-synth/Makefile.in
-unimrcp/plugins/mrcp-cepstral/Makefile
-unimrcp/plugins/mrcp-cepstral/Makefile.in
-unimrcp/plugins/mrcp-flite/Makefile
-unimrcp/plugins/mrcp-flite/Makefile.in
-unimrcp/plugins/mrcp-pocketsphinx/Makefile
-unimrcp/plugins/mrcp-pocketsphinx/Makefile.in
-unimrcp/plugins/mrcp-recorder/Makefile
-unimrcp/plugins/mrcp-recorder/Makefile.in
-unimrcp/tests/Makefile
-unimrcp/tests/Makefile.in
-unimrcp/tests/apttest/Makefile
-unimrcp/tests/apttest/Makefile.in
-unimrcp/tests/mpftest/Makefile
-unimrcp/tests/mpftest/Makefile.in
-unimrcp/tests/mrcptest/Makefile
-unimrcp/tests/mrcptest/Makefile.in
-unimrcp/tests/rtsptest/Makefile
-unimrcp/tests/rtsptest/Makefile.in
-unimrcp/tests/strtablegen/Makefile
-unimrcp/tests/strtablegen/Makefile.in
-xmlrpc-c/include/xmlrpc-c/config.h
-xmlrpc-c/stamp-h2
-xmlrpc-c/xmlrpc_amconfig.h
-xmlrpc-c/xmlrpc_config.h
-apr/build/install-sh
-js/install-sh
-js/nsprpub/lib/ds/libplds4.dylib
-js/nsprpub/lib/libc/src/libplc4.dylib
-js/nsprpub/pr/src/libnspr4.dylib
-libsndfile/M4/libtool.m4
-libsndfile/M4/ltoptions.m4
-libsndfile/M4/ltsugar.m4
-libsndfile/M4/ltversion.m4
-sofia-sip/m4/libtool.m4
-sofia-sip/m4/ltoptions.m4
-sofia-sip/m4/ltsugar.m4
-sofia-sip/m4/ltversion.m4
-sofia-sip/m4/lt~obsolete.m4
-sqlite/lemon.dSYM/
-sqlite/mkkeywordhash.dSYM/
-sqlite/sqlite3.dSYM/
-tiff-3.8.2/m4/libtool.m4
-tiff-3.8.2/m4/ltoptions.m4
-tiff-3.8.2/m4/ltsugar.m4
-tiff-3.8.2/m4/ltversion.m4
-tiff-3.8.2/m4/lt~obsolete.m4
-unimrcp/build/acmacros/libtool.m4
-unimrcp/build/acmacros/ltoptions.m4
-unimrcp/build/acmacros/ltsugar.m4
-unimrcp/build/acmacros/ltversion.m4
-unimrcp/build/acmacros/lt~obsolete.m4
</del></span></pre></div>
<a id="freeswitchtrunklibsfreetdmfreetdmpcin"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/libs/freetdm/freetdm.pc.in (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/libs/freetdm/freetdm.pc.in        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/libs/freetdm/freetdm.pc.in        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -1,17 +1,17 @@
</span><span class="cx"> #
</span><del>-# FreeTDM pkg-config file
</del><ins>+# OpenZAP pkg-config file
</ins><span class="cx"> #
</span><span class="cx"> prefix=@prefix@
</span><span class="cx"> exec_prefix=${prefix}
</span><span class="cx"> libdir=${exec_prefix}/lib
</span><span class="cx"> includedir=${prefix}/include
</span><span class="cx">
</span><del>-Name: FreeTDM
</del><ins>+Name: OpenZAP
</ins><span class="cx"> Description:
</span><span class="cx"> Version: @PACKAGE_VERSION@
</span><span class="cx"> URL: http://www.openzap.org/
</span><span class="cx"> Requires:
</span><span class="cx"> Conflicts:
</span><del>-Libs: -L${libdir} -lfreetdm
</del><ins>+Libs: -L${libdir} -lopenzap
</ins><span class="cx"> Libs.private: -lm
</span><span class="cx"> Cflags: -I${includedir}
</span></span></pre></div>
<a id="freeswitchtrunksrcgitignore"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/.gitignore (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/.gitignore        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/.gitignore        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -1,9 +0,0 @@
</span><del>-Makefile
-Makefile.in
-include/stamp-h1
-include/switch_am_config.h
-include/switch_private.h
-include/switch_private.h.in
-include/switch_swigable_cpp.h
-include/switch_version.h
-include/switch_version.h.in
</del></span></pre></div>
<a id="freeswitchtrunksrcmodgitignore"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/.gitignore (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/.gitignore        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/.gitignore        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -1,52 +0,0 @@
</span><del>-Makefile
-Makefile.in
-applications/mod_commands/Makefile
-applications/mod_conference/Makefile
-applications/mod_dptools/Makefile
-applications/mod_enum/Makefile
-applications/mod_enum/Makefile.in
-applications/mod_enum/mod_enum.log
-applications/mod_expr/Makefile
-applications/mod_expr/Makefile.in
-applications/mod_expr/mod_expr.log
-applications/mod_fifo/Makefile
-applications/mod_fsv/Makefile
-applications/mod_limit/Makefile
-applications/mod_stress/Makefile
-applications/mod_stress/Makefile.in
-applications/mod_t38gateway/Makefile
-applications/mod_t38gateway/Makefile.in
-applications/mod_valet_parking/Makefile
-applications/mod_voicemail/Makefile
-asr_tts/mod_unimrcp/Makefile
-asr_tts/mod_unimrcp/Makefile.in
-dialplans/mod_dialplan_asterisk/Makefile
-dialplans/mod_dialplan_xml/Makefile
-endpoints/mod_portaudio/Makefile
-endpoints/mod_portaudio/Makefile.in
-endpoints/mod_skinny/Makefile
-endpoints/mod_skinny/Makefile.in
-endpoints/mod_skypopen/Makefile
-endpoints/mod_skypopen/Makefile.in
-endpoints/mod_sofia/Makefile
-endpoints/mod_sofia/Makefile.in
-endpoints/mod_sofia/mod_sofia.log
-event_handlers/mod_erlang_event/Makefile
-event_handlers/mod_event_socket/Makefile
-formats/mod_native_file/Makefile
-formats/mod_portaudio_stream/Makefile
-formats/mod_portaudio_stream/Makefile.in
-formats/mod_tone_stream/Makefile
-languages/mod_java/Makefile
-languages/mod_lua/Makefile
-languages/mod_lua/Makefile.in
-languages/mod_lua/mod_lua.log
-languages/mod_python/Makefile
-languages/mod_spidermonkey/Makefile
-languages/mod_spidermonkey/Makefile.in
-languages/mod_spidermonkey/mod_spidermonkey.log
-loggers/mod_console/Makefile
-loggers/mod_logfile/Makefile
-loggers/mod_syslog/Makefile
-say/mod_say_en/Makefile
-say/mod_say_ru/Makefile
</del></span></pre></div>
<a id="freeswitchtrunksrcmodcodecsmod_sangoma_codecmod_sangoma_codecc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -205,9 +205,9 @@
</span><span class="cx">         sngtc_codec_ipv4_hex_to_str(codec_reply_leg->codec_ip, codec_ip);
</span><span class="cx">
</span><span class="cx">         iana = codec_id_to_iana(codec_reg_leg->codec_id);
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Creating RTP session for host (%s/%d) vocallo(%s/%d) Iana=%d ms=%d idx=%lu\n",
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Creating RTP session for host (%s/%d) vocallo(%s/%d) Iana=%d sample=%d ms=%d idx=%lu\n",
</ins><span class="cx">                                          local_ip, rtp_port, codec_ip, codec_reply_leg->codec_udp_port, iana,
</span><del>-                                         codec_reg_leg->ms*1000, sess->sessid);
</del><ins>+                                         codec_reg_leg->sample_rate, codec_reg_leg->ms*1000, sess->sessid);
</ins><span class="cx">
</span><span class="cx">         /* create the RTP socket, dont use the session pool since the session may go away while the RTP socket should linger around
</span><span class="cx">          * until sangoma_transcode decides to kill it (possibly because the same RTP session is used for a different call) */
</span><span class="lines">@@ -269,18 +269,22 @@
</span><span class="cx">                 sess->encoder.request.usr_priv = sess;
</span><span class="cx">                 sess->encoder.request.a.codec_id = SNGTC_CODEC_PCMU;
</span><span class="cx">                 sess->encoder.request.a.ms = codec->implementation->microseconds_per_packet/1000;
</span><ins>+                sess->encoder.request.a.sample_rate = codec->implementation->actual_samples_per_second;
</ins><span class="cx">
</span><span class="cx">                 sess->encoder.request.b.codec_id = vcodec->codec_id;
</span><span class="cx">                 sess->encoder.request.b.ms = codec->implementation->microseconds_per_packet/1000;
</span><ins>+                sess->encoder.request.b.sample_rate = codec->implementation->actual_samples_per_second;
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         if (decoding) {
</span><span class="cx">                 sess->decoder.request.usr_priv = sess;
</span><span class="cx">                 sess->decoder.request.a.codec_id = vcodec->codec_id;
</span><span class="cx">                 sess->decoder.request.a.ms = codec->implementation->microseconds_per_packet/1000;
</span><ins>+                sess->decoder.request.a.sample_rate = codec->implementation->actual_samples_per_second;
</ins><span class="cx">
</span><span class="cx">                 sess->decoder.request.b.codec_id = SNGTC_CODEC_PCMU;
</span><span class="cx">                 sess->decoder.request.b.ms = codec->implementation->microseconds_per_packet/1000;
</span><ins>+                sess->decoder.request.b.sample_rate = codec->implementation->actual_samples_per_second;
</ins><span class="cx">
</span><span class="cx">         }
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skinnymod_skinnyc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -65,7 +65,6 @@
</span><span class="cx">         " device_name VARCHAR(16),\n"
</span><span class="cx">         " device_instance INTEGER,\n"
</span><span class="cx">         " position INTEGER,\n"
</span><del>-        " line_instance INTEGER,\n"
</del><span class="cx">         " label VARCHAR(40),\n"
</span><span class="cx">         " value VARCHAR(24),\n"
</span><span class="cx">         " caller_name VARCHAR(44),\n"
</span><span class="lines">@@ -89,16 +88,6 @@
</span><span class="cx">         " settings VARCHAR(44)\n"
</span><span class="cx">         ");\n";
</span><span class="cx">
</span><del>-static char active_lines_sql[] =
-        "CREATE TABLE skinny_active_lines (\n"
-        " device_name VARCHAR(16),\n"
-        " device_instance INTEGER,\n"
-        " line_instance INTEGER,\n"
-        " channel_uuid VARCHAR(256),\n"
-        " call_id INTEGER,\n"
-        " call_state INTEGER\n"
-        ");\n";
-
</del><span class="cx"> /*****************************************************************************/
</span><span class="cx"> /* PROFILES FUNCTIONS */
</span><span class="cx"> /*****************************************************************************/
</span><span class="lines">@@ -149,106 +138,48 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-switch_status_t skinny_profile_find_listener_by_device_name_and_instance(skinny_profile_t *profile, const char *device_name, uint32_t device_instance, listener_t **listener)
-{
-        switch_mutex_lock(profile->listener_mutex);
-        for (listener_t *l = profile->listeners; l; l = l->next) {
-                if (!strcmp(l->device_name, device_name) && (l->device_instance == device_instance)) {
-                        *listener = l;
-                }
-        }
-        switch_mutex_unlock(profile->listener_mutex);
-
-        return SWITCH_STATUS_SUCCESS;
-}
-
-struct skinny_profile_find_session_uuid_helper {
- skinny_profile_t *profile;
-        char *channel_uuid;
-        uint32_t line_instance;
</del><ins>+struct skinny_profile_find_listener_helper {
+        skinny_profile_t *profile;
+        listener_t *listener;
+        uint32_t line;
</ins><span class="cx"> };
</span><span class="cx">
</span><del>-int skinny_profile_find_session_uuid_callback(void *pArg, int argc, char **argv, char **columnNames)
</del><ins>+static int skinny_profile_find_listener_callback(void *pArg, int argc, char **argv, char **columnNames)
</ins><span class="cx"> {
</span><del>-        struct skinny_profile_find_session_uuid_helper *helper = pArg;
</del><ins>+        struct skinny_profile_find_listener_helper *helper = pArg;
+        skinny_profile_t *profile = helper->profile;
+        char *device_name = argv[0];
+        /* uint32_t position = atoi(argv[1]); */
+        uint32_t relative_position = atoi(argv[2]);
</ins><span class="cx">
</span><del>-        char *channel_uuid = argv[0];
-        uint32_t line_instance = atoi(argv[1]);
</del><ins>+        skinny_profile_find_listener_by_device_name(profile, device_name, &helper->listener);
</ins><span class="cx">
</span><del>- if(helper->channel_uuid == NULL) {
- helper->channel_uuid = switch_mprintf("%s", channel_uuid);
- helper->line_instance = line_instance;
- }
-
- return 0;
</del><ins>+        if(helper->listener) {
+                helper->line = relative_position;
+        }
+        return 0;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-char * skinny_profile_find_session_uuid(skinny_profile_t *profile, listener_t *listener, uint32_t *line_instance_p, uint32_t call_id)
</del><ins>+static switch_status_t skinny_profile_find_listener_by_dest(skinny_profile_t *profile, const char *dest, listener_t **l, uint32_t *line)
</ins><span class="cx"> {
</span><del>-        struct skinny_profile_find_session_uuid_helper helper = {0};
</del><span class="cx">         char *sql;
</span><del>-        char *device_condition = NULL;
-        char *line_instance_condition = NULL;
-        char *call_id_condition = NULL;
-        
-        switch_assert(profile);
</del><ins>+        struct skinny_profile_find_listener_helper helper = {0};
</ins><span class="cx">         helper.profile = profile;
</span><del>-        helper.channel_uuid = NULL;
</del><span class="cx">         
</span><del>-        if(listener) {
-         device_condition = switch_mprintf("device_name='%s' AND device_instance=%d",
-         listener->device_name, listener->device_instance);
-        } else {
-         device_condition = switch_mprintf("1=1");
-        }
-        switch_assert(device_condition);
-        if(*line_instance_p > 0) {
-         line_instance_condition = switch_mprintf("line_instance=%d", *line_instance_p);
-        } else {
-         line_instance_condition = switch_mprintf("1=1");
-        }
-        switch_assert(line_instance_condition);
-        if(call_id > 0) {
-         call_id_condition = switch_mprintf("call_id=%d", call_id);
-        } else {
-         call_id_condition = switch_mprintf("1=1");
-        }
-        switch_assert(call_id_condition);
-        if((sql = switch_mprintf(
-                        "SELECT channel_uuid, line_instance "
-                                "FROM skinny_active_lines "
-                                "WHERE %s AND %s AND %s "
-                                "ORDER BY channel_uuid DESC",
-                        device_condition, line_instance_condition, call_id_condition
-                        ))) {
-                skinny_execute_sql_callback(profile, profile->sql_mutex, sql,
-                 skinny_profile_find_session_uuid_callback, &helper);
</del><ins>+        if ((sql = switch_mprintf("SELECT device_name, position, "
+                                                                "(SELECT count(*) from skinny_lines sl2 "
+                                                                        "WHERE sl2.device_name= sl1.device_name AND sl2.device_instance= sl1.device_instance AND sl2.position <= sl1.position) AS relative_position "
+                                                                "FROM skinny_lines sl1 WHERE value='%s'",
+                                                                dest))) {
+                skinny_execute_sql_callback(profile, profile->listener_mutex, sql, skinny_profile_find_listener_callback, &helper);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><del>-        switch_safe_free(device_condition);
-        switch_safe_free(line_instance_condition);
-        switch_safe_free(call_id_condition);
-        *line_instance_p = helper.line_instance;
-        return helper.channel_uuid;
-}
</del><span class="cx">
</span><del>-switch_core_session_t * skinny_profile_find_session(skinny_profile_t *profile, listener_t *listener, uint32_t *line_instance_p, uint32_t call_id)
-{
- char *uuid;
- switch_core_session_t *result = NULL;
- uuid = skinny_profile_find_session_uuid(profile, listener, line_instance_p, call_id);
</del><span class="cx">
</span><del>- if(!zstr(uuid)) {
- /* TODO Why should we force? */
- result = switch_core_session_force_locate(uuid);
-                if(!result) {
-                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
-                 "Unable to find session %s on %s:%d, line %d\n",
-                 uuid, listener->device_name, listener->device_instance, *line_instance_p);
-                }
-                switch_safe_free(uuid);
- }
- return result;
</del><ins>+        *line = helper.line;
+        *l = helper.listener;
+        
+        return SWITCH_STATUS_SUCCESS;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /*****************************************************************************/
</span><span class="lines">@@ -331,73 +262,28 @@
</span><span class="cx"> /*****************************************************************************/
</span><span class="cx"> /* CHANNEL FUNCTIONS */
</span><span class="cx"> /*****************************************************************************/
</span><del>-void skinny_line_perform_set_state(const char *file, const char *func, int line, listener_t *listener, uint32_t line_instance, uint32_t call_id, uint32_t call_state)
</del><ins>+uint32_t skinny_line_perform_set_state(listener_t *listener, const char *file, const char *func, int line, uint32_t instance, uint32_t state, uint32_t call_id)
</ins><span class="cx"> {
</span><del>-        switch_event_t *event = NULL;
- switch_assert(listener);
-
-        skinny_device_event(listener, &event, SWITCH_EVENT_CUSTOM, SKINNY_EVENT_CALL_STATE);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Line-Instance", "%d", line_instance);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Call-Id", "%d", call_id);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Call-State", "%d", call_state);
-        switch_event_fire(&event);
</del><ins>+        switch_assert(listener);
+        
</ins><span class="cx">         switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG,
</span><del>-                "Device %s:%d, Line %d, Call %d Change State to %s (%d)\n",
-                listener->device_name, listener->device_instance, line_instance, call_id,
-                skinny_call_state2str(call_state), call_state);        
-}
</del><ins>+                "Device %s, line %d State Change %s (%d) -> %s (%d) (no session)\n",
+                listener->device_name, instance,
+                skinny_soft_key_set2str(listener->line_state[instance]), listener->line_state[instance],
+                skinny_soft_key_set2str(state), state);
</ins><span class="cx">
</span><del>-
-struct skinny_line_get_state_helper {
-        uint32_t call_state;
-};
-
-int skinny_line_get_state_callback(void *pArg, int argc, char **argv, char **columnNames)
-{
-        struct skinny_line_get_state_helper *helper = pArg;
-        helper->call_state = atoi(argv[0]);
- return 0;
</del><ins>+        send_select_soft_keys(listener, instance, call_id, state, 0xffff);
+        listener->line_state[instance] = state;
+        
+        return listener->line_state[instance];
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-uint32_t skinny_line_get_state(listener_t *listener, uint32_t line_instance, uint32_t call_id)
</del><ins>+uint32_t skinny_line_get_state(listener_t *listener, uint32_t instance)
</ins><span class="cx"> {
</span><del>- char *line_instance_condition;
- char *call_id_condition;
- char *sql;
-        struct skinny_line_get_state_helper helper = {0};
</del><ins>+        switch_assert(listener);
</ins><span class="cx">
</span><del>- switch_assert(listener);
-
- if(line_instance > 0) {
- line_instance_condition = switch_mprintf("line_instance=%d", line_instance);
- } else {
- line_instance_condition = switch_mprintf("1=1");
- }
- switch_assert(line_instance_condition);
- if(call_id > 0) {
- call_id_condition = switch_mprintf("call_id=%d", call_id);
- } else {
- call_id_condition = switch_mprintf("1=1");
- }
- switch_assert(call_id_condition);
-
-        if ((sql = switch_mprintf(
-                        "SELECT call_state FROM skinny_active_lines "
-                        "WHERE device_name='%s' AND device_instance=%d "
-                        "AND %s AND %s",
-                        listener->device_name, listener->device_instance,
-                        line_instance_condition, call_id_condition
-                        ))) {
-                skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_line_get_state_callback, &helper);
-                switch_safe_free(sql);
-        }
-        switch_safe_free(line_instance_condition);
-        switch_safe_free(call_id_condition);
-        
-        return helper.call_state;
</del><ins>+        return listener->line_state[instance];
</ins><span class="cx"> }
</span><del>-
-
</del><span class="cx"> switch_status_t skinny_tech_set_codec(private_t *tech_pvt, int force)
</span><span class="cx"> {
</span><span class="cx">         int ms;
</span><span class="lines">@@ -472,7 +358,9 @@
</span><span class="cx">                                                                          tech_pvt->read_impl.microseconds_per_packet,
</span><span class="cx">                                                                          tech_pvt->read_impl.samples_per_packet
</span><span class="cx">                                                                          ) != SWITCH_STATUS_SUCCESS) {
</span><del>-                        switch_channel_t *channel = switch_core_session_get_channel(tech_pvt->session);
</del><ins>+                        switch_channel_t *channel = NULL;
+                        channel = switch_core_session_get_channel(tech_pvt->session);
+                        assert(channel != NULL);
</ins><span class="cx">
</span><span class="cx">                         switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
</span><span class="cx">                         switch_goto_status(SWITCH_STATUS_FALSE, end);                                
</span><span class="lines">@@ -519,19 +407,28 @@
</span><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void tech_init(private_t *tech_pvt, skinny_profile_t *profile, switch_core_session_t *session)
</del><ins>+void tech_init(private_t *tech_pvt, switch_core_session_t *session, listener_t *listener, uint32_t line)
</ins><span class="cx"> {
</span><ins>+        struct line_stat_res_message *button = NULL;
+
</ins><span class="cx">         switch_assert(tech_pvt);
</span><span class="cx">         switch_assert(session);
</span><ins>+        switch_assert(listener);
</ins><span class="cx">         
</span><span class="cx">         tech_pvt->read_frame.data = tech_pvt->databuf;
</span><span class="cx">         tech_pvt->read_frame.buflen = sizeof(tech_pvt->databuf);
</span><span class="cx">         switch_mutex_init(&tech_pvt->mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
</span><span class="cx">         switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
</span><del>-        tech_pvt->call_id = ++profile->next_call_id;
-        tech_pvt->profile = profile;
</del><ins>+        tech_pvt->call_id = listener->profile->next_call_id++;
+        tech_pvt->listener = listener;
+        tech_pvt->line = line;
</ins><span class="cx">         switch_core_session_set_private(session, tech_pvt);
</span><span class="cx">         tech_pvt->session = session;
</span><ins>+
+        skinny_line_get(listener, line, &button);
+        tech_pvt->line_name = switch_core_strdup(listener->pool, button->name);
+        tech_pvt->line_shortname = switch_core_strdup(listener->pool, button->shortname);
+        tech_pvt->line_displayname = switch_core_strdup(listener->pool, button->displayname);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /*
</span><span class="lines">@@ -541,9 +438,14 @@
</span><span class="cx"> */
</span><span class="cx"> switch_status_t channel_on_init(switch_core_session_t *session)
</span><span class="cx"> {
</span><del>-        switch_channel_t *channel = switch_core_session_get_channel(session);
-        private_t *tech_pvt = switch_core_session_get_private(session);
</del><ins>+        switch_channel_t *channel;
+        private_t *tech_pvt = NULL;
</ins><span class="cx">
</span><ins>+        tech_pvt = switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
+
+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
</ins><span class="cx">         switch_set_flag_locked(tech_pvt, TFLAG_IO);
</span><span class="cx">
</span><span class="cx">         /* Move channel's state machine to ROUTING. This means the call is trying
</span><span class="lines">@@ -562,8 +464,15 @@
</span><span class="cx">
</span><span class="cx"> switch_status_t channel_on_routing(switch_core_session_t *session)
</span><span class="cx"> {
</span><del>- switch_channel_t *channel = switch_core_session_get_channel(session);
</del><ins>+        switch_channel_t *channel = NULL;
+        private_t *tech_pvt = NULL;
</ins><span class="cx">
</span><ins>+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
+
+        tech_pvt = switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
+
</ins><span class="cx">         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s CHANNEL ROUTING\n", switch_channel_get_name(channel));
</span><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -571,8 +480,16 @@
</span><span class="cx">
</span><span class="cx"> switch_status_t channel_on_execute(switch_core_session_t *session)
</span><span class="cx"> {
</span><del>- switch_channel_t *channel = switch_core_session_get_channel(session);
</del><span class="cx">
</span><ins>+        switch_channel_t *channel = NULL;
+        private_t *tech_pvt = NULL;
+
+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
+
+        tech_pvt = switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
+
</ins><span class="cx">         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s CHANNEL EXECUTE\n", switch_channel_get_name(channel));
</span><span class="cx">
</span><span class="cx">
</span><span class="lines">@@ -581,9 +498,14 @@
</span><span class="cx">
</span><span class="cx"> switch_status_t channel_on_destroy(switch_core_session_t *session)
</span><span class="cx"> {
</span><del>-        switch_channel_t *channel = switch_core_session_get_channel(session);
-        private_t *tech_pvt = switch_core_session_get_private(session);
</del><ins>+        switch_channel_t *channel = NULL;
+        private_t *tech_pvt = NULL;
</ins><span class="cx">
</span><ins>+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
+
+        tech_pvt = switch_core_session_get_private(session);
+
</ins><span class="cx">         if (tech_pvt) {
</span><span class="cx">                 if (switch_core_codec_ready(&tech_pvt->read_codec)) {
</span><span class="cx">                         switch_core_codec_destroy(&tech_pvt->read_codec);
</span><span class="lines">@@ -599,100 +521,74 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-struct channel_on_hangup_helper {
-        private_t *tech_pvt;
-};
</del><span class="cx">
</span><del>-int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnNames)
</del><ins>+switch_status_t channel_on_hangup(switch_core_session_t *session)
</ins><span class="cx"> {
</span><del>-        struct channel_on_hangup_helper *helper = pArg;
</del><ins>+        switch_channel_t *channel = NULL;
+        private_t *tech_pvt = NULL;
</ins><span class="cx">         listener_t *listener = NULL;
</span><span class="cx">
</span><del>-        char *device_name = argv[0];
-        uint32_t device_instance = atoi(argv[1]);
-        /* uint32_t position = atoi(argv[2]); */
-        uint32_t line_instance = atoi(argv[3]);
-        /* char *label = argv[4]; */
-        /* char *value = argv[5]; */
-        /* char *caller_name = argv[6]; */
-        /* uint32_t ring_on_idle = atoi(argv[7]); */
-        /* uint32_t ring_on_active = atoi(argv[8]); */
-        /* uint32_t busy_trigger = atoi(argv[9]); */
-        /* char *forward_all = argv[10]; */
-        /* char *forward_busy = argv[11]; */
-        /* char *forward_noanswer = argv[12]; */
-        /* uint32_t noanswer_duration = atoi(argv[13]); */
-        /* char *channel_uuid = argv[14]; */
-        uint32_t call_id = atoi(argv[15]);
-        uint32_t call_state = atoi(argv[16]);
</del><ins>+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
</ins><span class="cx">
</span><del>-        skinny_profile_find_listener_by_device_name_and_instance(helper->tech_pvt->profile, device_name, device_instance, &listener);
- if(listener) {
- if(call_state == SKINNY_CONNECTED) {
-         stop_tone(listener, line_instance, call_id);
-         }
- set_lamp(listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_OFF);
- clear_prompt_status(listener, line_instance, call_id);
- if(call_state == SKINNY_CONNECTED) { /* calling parties */
-                 close_receive_channel(listener,
-                         call_id, /* uint32_t conference_id, */
-                         helper->tech_pvt->party_id, /* uint32_t pass_thru_party_id, */
-                         call_id /* uint32_t conference_id2, */
-                 );
-                 stop_media_transmission(listener,
-                         call_id, /* uint32_t conference_id, */
-                         helper->tech_pvt->party_id, /* uint32_t pass_thru_party_id, */
-                         call_id /* uint32_t conference_id2, */
-                 );
-                 switch_mutex_lock(globals.calls_mutex);
-                 globals.calls--;
-                 if (globals.calls < 0) {
-                         globals.calls = 0;
-                 }
-                 switch_mutex_unlock(globals.calls_mutex);
-
-         }
</del><ins>+        tech_pvt = switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
</ins><span class="cx">
</span><del>-         skinny_line_set_state(listener, line_instance, call_id, SKINNY_ON_HOOK);
-         send_select_soft_keys(listener, line_instance, call_id, SKINNY_KEY_SET_ON_HOOK, 0xffff);
- /* TODO: DefineTimeDate */
- set_speaker_mode(listener, SKINNY_SPEAKER_OFF);
- set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, 0, call_id);
-
- }
- return 0;
-}
-
-switch_status_t channel_on_hangup(switch_core_session_t *session)
-{
-        struct channel_on_hangup_helper helper = {0};
-        switch_channel_t *channel = switch_core_session_get_channel(session);
-        private_t *tech_pvt = switch_core_session_get_private(session);
-        char *sql;
-
</del><ins>+        listener = tech_pvt->listener;
+        assert(listener != NULL);
+        
</ins><span class="cx">         switch_clear_flag_locked(tech_pvt, TFLAG_IO);
</span><span class="cx">         switch_clear_flag_locked(tech_pvt, TFLAG_VOICE);
</span><span class="cx">
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s CHANNEL HANGUP\n", switch_channel_get_name(channel));
</span><span class="cx">
</span><del>- helper.tech_pvt= tech_pvt;
</del><ins>+        listener->session[tech_pvt->line] = NULL;
</ins><span class="cx">
</span><del>- skinny_session_walk_lines(tech_pvt->profile, switch_core_session_get_uuid(session), channel_on_hangup_callback, &helper);
-        if ((sql = switch_mprintf(
-                        "DELETE FROM skinny_active_lines WHERE channel_uuid='%s'",
-                        switch_core_session_get_uuid(session)
-                        ))) {
-                skinny_execute_sql(tech_pvt->profile, sql, tech_pvt->profile->sql_mutex);
-                switch_safe_free(sql);
</del><ins>+        stop_tone(listener, tech_pvt->line, tech_pvt->call_id);
+        set_lamp(listener, SKINNY_BUTTON_LINE, tech_pvt->line, SKINNY_LAMP_OFF);
+        clear_prompt_status(listener, tech_pvt->line, tech_pvt->call_id);
+
+        if( skinny_line_get_state(tech_pvt->listener, tech_pvt->line) == SKINNY_KEY_SET_CONNECTED ) {
+                close_receive_channel(listener,
+                        tech_pvt->call_id, /* uint32_t conference_id, */
+                        tech_pvt->party_id, /* uint32_t pass_thru_party_id, */
+                        tech_pvt->call_id /* uint32_t conference_id2, */
+                );
+                stop_media_transmission(listener,
+                        tech_pvt->call_id, /* uint32_t conference_id, */
+                        tech_pvt->party_id, /* uint32_t pass_thru_party_id, */
+                        tech_pvt->call_id /* uint32_t conference_id2, */
+                );
+                switch_mutex_lock(globals.calls_mutex);
+                globals.calls--;
+                if (globals.calls < 0) {
+                        globals.calls = 0;
+                }
+                switch_mutex_unlock(globals.calls_mutex);
</ins><span class="cx">         }
</span><ins>+        send_call_state(listener,
+                SKINNY_ON_HOOK,
+                tech_pvt->line,
+                tech_pvt->call_id);
+        skinny_line_set_state(listener, tech_pvt->line, SKINNY_KEY_SET_ON_HOOK, tech_pvt->call_id);
+        /* TODO: DefineTimeDate */
+        set_speaker_mode(listener, SKINNY_SPEAKER_OFF);
+        set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, 0);
+
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
</span><span class="cx"> {
</span><del>-        switch_channel_t *channel = switch_core_session_get_channel(session);
-        private_t *tech_pvt = switch_core_session_get_private(session);
</del><ins>+        switch_channel_t *channel = NULL;
+        private_t *tech_pvt = NULL;
</ins><span class="cx">
</span><ins>+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
+
+        tech_pvt = switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
+
</ins><span class="cx">         switch (sig) {
</span><span class="cx">         case SWITCH_SIG_KILL:
</span><span class="cx">                 switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
</span><span class="lines">@@ -735,10 +631,16 @@
</span><span class="cx">
</span><span class="cx"> switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id)
</span><span class="cx"> {
</span><del>- switch_channel_t *channel = switch_core_session_get_channel(session);
-        private_t *tech_pvt = switch_core_session_get_private(session);
</del><ins>+        switch_channel_t *channel = NULL;
+        private_t *tech_pvt = NULL;
</ins><span class="cx">         int payload = 0;
</span><span class="cx">
</span><ins>+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
+
+        tech_pvt = switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
+
</ins><span class="cx">         while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
</span><span class="cx">                 if (switch_channel_ready(channel)) {
</span><span class="cx">                         switch_yield(10000);
</span><span class="lines">@@ -803,10 +705,17 @@
</span><span class="cx">
</span><span class="cx"> switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)
</span><span class="cx"> {
</span><del>-        private_t *tech_pvt = switch_core_session_get_private(session);
</del><ins>+        switch_channel_t *channel = NULL;
+        private_t *tech_pvt = NULL;
</ins><span class="cx">         //switch_frame_t *pframe;
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><span class="cx">         
</span><ins>+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
+
+        tech_pvt = switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
+
</ins><span class="cx">         if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
</span><span class="cx">                 return SWITCH_STATUS_FALSE;
</span><span class="cx">         }
</span><span class="lines">@@ -828,12 +737,31 @@
</span><span class="cx">
</span><span class="cx"> switch_status_t channel_answer_channel(switch_core_session_t *session)
</span><span class="cx"> {
</span><ins>+        private_t *tech_pvt;
+        switch_channel_t *channel = NULL;
+
+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
+
+        tech_pvt = switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
+
+
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><span class="cx"> switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
</span><span class="cx"> {
</span><ins>+        switch_channel_t *channel;
+        private_t *tech_pvt;
+
+        channel = switch_core_session_get_channel(session);
+        assert(channel != NULL);
+
+        tech_pvt = (private_t *) switch_core_session_get_private(session);
+        assert(tech_pvt != NULL);
+
</ins><span class="cx">         switch (msg->message_id) {
</span><span class="cx">         case SWITCH_MESSAGE_INDICATE_ANSWER:
</span><span class="cx">                 {
</span><span class="lines">@@ -860,7 +788,8 @@
</span><span class="cx">         
</span><span class="cx">         char *profile_name, *dest;
</span><span class="cx">         skinny_profile_t *profile = NULL;
</span><del>-        char *sql;
</del><ins>+        listener_t *listener = NULL;
+        uint32_t line = 0;
</ins><span class="cx">         char name[128];
</span><span class="cx">         switch_channel_t *channel;
</span><span class="cx">         switch_caller_profile_t *caller_profile;
</span><span class="lines">@@ -904,8 +833,27 @@
</span><span class="cx">         channel = switch_core_session_get_channel(nsession);
</span><span class="cx">         switch_channel_set_name(channel, name);
</span><span class="cx">         
</span><del>-        tech_init(tech_pvt, profile, nsession);
</del><span class="cx">
</span><ins>+        if ((skinny_profile_find_listener_by_dest(profile, dest, &listener, &line) != SWITCH_STATUS_SUCCESS)) {
+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Problem while retrieving listener and line for destination %s in profile %s\n", dest, profile_name);
+                cause = SWITCH_CAUSE_UNALLOCATED_NUMBER;
+                goto error;
+        }
+        
+        if (!listener) {
+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid destination or phone not registred %s in profile %s\n", dest, profile_name);
+                cause = SWITCH_CAUSE_UNALLOCATED_NUMBER;
+                goto error;
+        }
+
+        if (line == 0) {
+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Invalid destination or phone not registred %s in profile %s\n", dest, profile_name);
+                cause = SWITCH_CAUSE_UNALLOCATED_NUMBER;
+                goto error;
+        }
+        
+        tech_init(tech_pvt, nsession, listener, line);
+
</ins><span class="cx">         caller_profile = switch_caller_profile_clone(nsession, outbound_profile);
</span><span class="cx">         switch_channel_set_caller_profile(channel, caller_profile);
</span><span class="cx">         tech_pvt->caller_profile = caller_profile;
</span><span class="lines">@@ -913,23 +861,19 @@
</span><span class="cx">         switch_channel_set_flag(channel, CF_OUTBOUND);
</span><span class="cx">         switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
</span><span class="cx">
</span><del>-        if ((sql = switch_mprintf(
-                        "INSERT INTO skinny_active_lines "
-                                "(device_name, device_instance, line_instance, channel_uuid, call_id, call_state) "
-                                "SELECT device_name, device_instance, line_instance, '%s', %d, %d "
-                                "FROM skinny_lines "
-                                "WHERE value='%s'",
-                        switch_core_session_get_uuid(nsession), tech_pvt->call_id, SKINNY_ON_HOOK, dest
-                        ))) {
-                skinny_execute_sql(profile, sql, profile->sql_mutex);
-                switch_safe_free(sql);
-        }
-        
-        cause = skinny_ring_lines(tech_pvt);
-        
-        if(cause != SWITCH_CAUSE_SUCCESS) {
</del><ins>+        if(tech_pvt->listener->session[tech_pvt->line]) { /* Line is busy */
+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Device line is busy %s in profile %s\n", dest, profile_name);
+                cause = SWITCH_CAUSE_USER_BUSY;
</ins><span class="cx">                 goto error;
</span><span class="cx">         }
</span><ins>+        tech_pvt->listener->session[tech_pvt->line] = nsession;
+        send_call_state(tech_pvt->listener, SKINNY_RING_IN, tech_pvt->line, tech_pvt->call_id);
+        skinny_line_set_state(tech_pvt->listener, tech_pvt->line, SKINNY_KEY_SET_RING_IN, tech_pvt->call_id);
+        display_prompt_status(tech_pvt->listener, 0, "\200\027tel", tech_pvt->line, tech_pvt->call_id);
+        /* displayprinotifiymessage */
+        skinny_send_call_info(nsession);
+        set_lamp(tech_pvt->listener, SKINNY_BUTTON_LINE, tech_pvt->line, SKINNY_LAMP_BLINK);
+        set_ringer(tech_pvt->listener, SKINNY_RING_OUTSIDE, SKINNY_RING_FOREVER, 0);
</ins><span class="cx">
</span><span class="cx">         *new_session = nsession;
</span><span class="cx">
</span><span class="lines">@@ -1073,7 +1017,7 @@
</span><span class="cx">                                 "DELETE FROM skinny_devices "
</span><span class="cx">                                         "WHERE name='%s' and instance=%d",
</span><span class="cx">                                 listener->device_name, listener->device_instance))) {
</span><del>-                        skinny_execute_sql(profile, sql, profile->sql_mutex);
</del><ins>+                        skinny_execute_sql(profile, sql, profile->listener_mutex);
</ins><span class="cx">                         switch_safe_free(sql);
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -1081,7 +1025,7 @@
</span><span class="cx">                                 "DELETE FROM skinny_lines "
</span><span class="cx">                                         "WHERE device_name='%s' and device_instance=%d",
</span><span class="cx">                                 listener->device_name, listener->device_instance))) {
</span><del>-                        skinny_execute_sql(profile, sql, profile->sql_mutex);
</del><ins>+                        skinny_execute_sql(profile, sql, profile->listener_mutex);
</ins><span class="cx">                         switch_safe_free(sql);
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -1089,7 +1033,7 @@
</span><span class="cx">                                 "DELETE FROM skinny_buttons "
</span><span class="cx">                                         "WHERE device_name='%s' and device_instance=%d",
</span><span class="cx">                                 listener->device_name, listener->device_instance))) {
</span><del>-                        skinny_execute_sql(profile, sql, profile->sql_mutex);
</del><ins>+                        skinny_execute_sql(profile, sql, profile->listener_mutex);
</ins><span class="cx">                         switch_safe_free(sql);
</span><span class="cx">                 }
</span><span class="cx">
</span><span class="lines">@@ -1128,10 +1072,9 @@
</span><span class="cx"> static switch_status_t dump_device(skinny_profile_t *profile, const char *device_name, switch_stream_handle_t *stream)
</span><span class="cx"> {
</span><span class="cx">         char *sql;
</span><del>-        if ((sql = switch_mprintf("SELECT name, user_id, instance, ip, type, max_streams, port, codec_string "
-                        "FROM skinny_devices WHERE name='%s'",
</del><ins>+        if ((sql = switch_mprintf("SELECT * FROM skinny_devices WHERE name LIKE '%s'",
</ins><span class="cx">                         device_name))) {
</span><del>-                skinny_execute_sql_callback(profile, profile->sql_mutex, sql, dump_device_callback, stream);
</del><ins>+                skinny_execute_sql_callback(profile, profile->listener_mutex, sql, dump_device_callback, stream);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1257,7 +1200,6 @@
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Connection Closed\n");
</span><span class="cx">         }
</span><span class="cx">
</span><del>- /* TODO
</del><span class="cx">         for(int line = 0 ; line < SKINNY_MAX_BUTTON_COUNT ; line++) {
</span><span class="cx">                 if(listener->session[line]) {
</span><span class="cx">                         switch_channel_clear_flag(switch_core_session_get_channel(listener->session[line]), CF_CONTROLLED);
</span><span class="lines">@@ -1266,7 +1208,6 @@
</span><span class="cx">                         destroy_pool = 0;
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        */
</del><span class="cx">         if(destroy_pool == 0) {
</span><span class="cx">                 goto no_destroy_pool;
</span><span class="cx">         }
</span><span class="lines">@@ -1526,13 +1467,11 @@
</span><span class="cx">                                         switch_odbc_handle_exec(profile->master_odbc, devices_sql, NULL, NULL);
</span><span class="cx">                                         switch_odbc_handle_exec(profile->master_odbc, lines_sql, NULL, NULL);
</span><span class="cx">                                         switch_odbc_handle_exec(profile->master_odbc, buttons_sql, NULL, NULL);
</span><del>-                                        switch_odbc_handle_exec(profile->master_odbc, active_lines_sql, NULL, NULL);
</del><span class="cx">                                 } else {
</span><span class="cx">                                         if ((db = switch_core_db_open_file(profile->dbname))) {
</span><span class="cx">                                                 switch_core_db_test_reactive(db, "SELECT * FROM skinny_devices", NULL, devices_sql);
</span><span class="cx">                                                 switch_core_db_test_reactive(db, "SELECT * FROM skinny_lines", NULL, lines_sql);
</span><span class="cx">                                                 switch_core_db_test_reactive(db, "SELECT * FROM skinny_buttons", NULL, buttons_sql);
</span><del>-                                                switch_core_db_test_reactive(db, "SELECT * FROM skinny_active_lines", NULL, active_lines_sql);
</del><span class="cx">                                         } else {
</span><span class="cx">                                                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open SQL Database!\n");
</span><span class="cx">                                                 continue;
</span><span class="lines">@@ -1540,10 +1479,9 @@
</span><span class="cx">                                         switch_core_db_close(db);
</span><span class="cx">                                 }
</span><span class="cx">                                 
</span><del>-                                skinny_execute_sql_callback(profile, profile->sql_mutex, "DELETE FROM skinny_devices", NULL, NULL);
-                                skinny_execute_sql_callback(profile, profile->sql_mutex, "DELETE FROM skinny_lines", NULL, NULL);
-                                skinny_execute_sql_callback(profile, profile->sql_mutex, "DELETE FROM skinny_buttons", NULL, NULL);
-                                skinny_execute_sql_callback(profile, profile->sql_mutex, "DELETE FROM skinny_active_lines", NULL, NULL);
</del><ins>+                                skinny_execute_sql_callback(profile, profile->listener_mutex, "DELETE FROM skinny_devices", NULL, NULL);
+                                skinny_execute_sql_callback(profile, profile->listener_mutex, "DELETE FROM skinny_lines", NULL, NULL);
+                                skinny_execute_sql_callback(profile, profile->listener_mutex, "DELETE FROM skinny_buttons", NULL, NULL);
</ins><span class="cx">
</span><span class="cx">                                 switch_core_hash_insert(globals.profile_hash, profile->name, profile);
</span><span class="cx">                                 profile = NULL;
</span><span class="lines">@@ -1590,7 +1528,7 @@
</span><span class="cx">                 listener_t *listener = NULL;
</span><span class="cx">                 skinny_profile_find_listener_by_device_name(profile, device_name, &listener);
</span><span class="cx">                 if(listener) {
</span><del>-                        set_ringer(listener, skinny_str2ring_type(ring_type), skinny_str2ring_mode(ring_mode), 0, 0);
</del><ins>+                        set_ringer(listener, skinny_str2ring_type(ring_type), skinny_str2ring_mode(ring_mode), 0);
</ins><span class="cx">                 } else {
</span><span class="cx">                         stream->write_function(stream, "Listener not found!\n");
</span><span class="cx">                 }
</span><span class="lines">@@ -1769,55 +1707,8 @@
</span><span class="cx">
</span><span class="cx"> static void event_handler(switch_event_t *event)
</span><span class="cx"> {
</span><del>-        char *subclass;
-
</del><span class="cx">         if (event->event_id == SWITCH_EVENT_HEARTBEAT) {
</span><span class="cx">                 walk_listeners(kill_expired_listener, NULL);
</span><del>-        } else if ((subclass = switch_event_get_header_nil(event, "Event-Subclass")) && !strcasecmp(subclass, SKINNY_EVENT_CALL_STATE)) {
-         char *profile_name = switch_event_get_header_nil(event, "Skinny-Profile-Name");
-         char *device_name = switch_event_get_header_nil(event, "Skinny-Device-Name");
-         uint32_t device_instance = atoi(switch_event_get_header_nil(event, "Skinny-Device-Instance"));
-                uint32_t line_instance = atoi(switch_event_get_header_nil(event, "Skinny-Line-Instance"));
-                uint32_t call_id = atoi(switch_event_get_header_nil(event, "Skinny-Call-Id"));
-                uint32_t call_state = atoi(switch_event_get_header_nil(event, "Skinny-Call-State"));
-         skinny_profile_t *profile;
-         listener_t *listener = NULL;
- char *line_instance_condition, *call_id_condition;
- char *sql;
-
-         if ((profile = skinny_find_profile(profile_name))) {
-         skinny_profile_find_listener_by_device_name_and_instance(profile, device_name, device_instance, &listener);
- if(listener) {
- if(line_instance > 0) {
- line_instance_condition = switch_mprintf("line_instance=%d", line_instance);
- } else {
- line_instance_condition = switch_mprintf("1=1");
- }
- switch_assert(line_instance_condition);
- if(call_id > 0) {
- call_id_condition = switch_mprintf("call_id=%d", call_id);
- } else {
- call_id_condition = switch_mprintf("1=1");
- }
- switch_assert(call_id_condition);
-
-         if ((sql = switch_mprintf(
-                         "UPDATE skinny_active_lines "
-                         "SET call_state=%d "
-                         "WHERE device_name='%s' AND device_instance=%d "
-                         "AND %s AND %s",
-                         call_state,
-                         listener->device_name, listener->device_instance,
-                         line_instance_condition, call_id_condition
-                         ))) {
-                 skinny_execute_sql(listener->profile, sql, listener->profile->sql_mutex);
-                 switch_safe_free(sql);
-                 send_call_state(listener, call_state, line_instance, call_id);
-         }
-         switch_safe_free(line_instance_condition);
-         switch_safe_free(call_id_condition);
-         }
-         }
</del><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1885,7 +1776,7 @@
</span><span class="cx">
</span><span class="cx">         if(profile) {
</span><span class="cx">                 if ((sql = switch_mprintf("SELECT name FROM skinny_devices"))) {
</span><del>-                        skinny_execute_sql_callback(profile, profile->sql_mutex, sql, skinny_list_devices_callback, &h);
</del><ins>+                        skinny_execute_sql_callback(profile, profile->listener_mutex, sql, skinny_list_devices_callback, &h);
</ins><span class="cx">                         switch_safe_free(sql);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="lines">@@ -2013,7 +1904,6 @@
</span><span class="cx">                 profile = (skinny_profile_t *) val;
</span><span class="cx">         
</span><span class="cx">                 switch_mutex_init(&profile->listener_mutex, SWITCH_MUTEX_NESTED, module_pool);
</span><del>-                switch_mutex_init(&profile->sql_mutex, SWITCH_MUTEX_NESTED, module_pool);
</del><span class="cx">                 switch_mutex_init(&profile->sock_mutex, SWITCH_MUTEX_NESTED, module_pool);
</span><span class="cx">
</span><span class="cx">         }
</span><span class="lines">@@ -2023,11 +1913,6 @@
</span><span class="cx">                 /* Not such severe to prevent loading */
</span><span class="cx">         }
</span><span class="cx">
</span><del>-        if ((switch_event_bind_removable(modname, SWITCH_EVENT_CUSTOM, SKINNY_EVENT_CALL_STATE, event_handler, NULL, &globals.call_state_node) != SWITCH_STATUS_SUCCESS)) {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind our call_state handler!\n");
-                return SWITCH_STATUS_TERM;
-        }
-
</del><span class="cx">         if (switch_event_reserve_subclass(SKINNY_EVENT_REGISTER) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", SKINNY_EVENT_REGISTER);
</span><span class="cx">                 return SWITCH_STATUS_TERM;
</span><span class="lines">@@ -2099,7 +1984,6 @@
</span><span class="cx">
</span><span class="cx">         switch_event_free_subclass(SKINNY_EVENT_REGISTER);
</span><span class="cx">         switch_event_unbind(&globals.heartbeat_node);
</span><del>-        switch_event_unbind(&globals.call_state_node);
</del><span class="cx">
</span><span class="cx">         globals.running = 0;
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skinnymod_skinnyh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.h (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.h        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_skinny/mod_skinny.h        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> #define SKINNY_EVENT_UNREGISTER "skinny::unregister"
</span><span class="cx"> #define SKINNY_EVENT_EXPIRE "skinny::expire"
</span><span class="cx"> #define SKINNY_EVENT_ALARM "skinny::alarm"
</span><del>-#define SKINNY_EVENT_CALL_STATE "skinny::call_state"
</del><span class="cx">
</span><span class="cx"> struct skinny_globals {
</span><span class="cx">         /* data */
</span><span class="lines">@@ -50,7 +49,6 @@
</span><span class="cx">         switch_mutex_t *calls_mutex;
</span><span class="cx">         switch_hash_t *profile_hash;
</span><span class="cx">         switch_event_node_t *heartbeat_node;
</span><del>-        switch_event_node_t *call_state_node;
</del><span class="cx">         int running;
</span><span class="cx"> };
</span><span class="cx"> typedef struct skinny_globals skinny_globals_t;
</span><span class="lines">@@ -74,7 +72,6 @@
</span><span class="cx">         char *odbc_user;
</span><span class="cx">         char *odbc_pass;
</span><span class="cx">         switch_odbc_handle_t *master_odbc;
</span><del>-        switch_mutex_t *sql_mutex;        
</del><span class="cx">         /* stats */
</span><span class="cx">         uint32_t ib_calls;
</span><span class="cx">         uint32_t ob_calls;
</span><span class="lines">@@ -106,6 +103,8 @@
</span><span class="cx">         skinny_profile_t *profile;
</span><span class="cx">         char device_name[16];
</span><span class="cx">         uint32_t device_instance;
</span><ins>+        switch_core_session_t *session[SKINNY_MAX_LINES];
+        uint32_t line_state[SKINNY_MAX_LINES]; /* See enum skinny_key_set */
</ins><span class="cx">
</span><span class="cx">         switch_socket_t *sock;
</span><span class="cx">         switch_memory_pool_t *pool;
</span><span class="lines">@@ -154,11 +153,14 @@
</span><span class="cx">         switch_mutex_t *mutex;
</span><span class="cx">         switch_mutex_t *flag_mutex;
</span><span class="cx">         /* identification */
</span><ins>+        struct listener *listener;
+        uint32_t line;
</ins><span class="cx">         uint32_t call_id;
</span><span class="cx">         uint32_t party_id;
</span><del>-
-        skinny_profile_t *profile;
-
</del><ins>+        char *line_name;
+        char *line_shortname;
+        char *line_displayname;
+        char dest[10];
</ins><span class="cx">         /* codec */
</span><span class="cx">         char *iananame;        
</span><span class="cx">         switch_codec_t read_codec;
</span><span class="lines">@@ -181,13 +183,6 @@
</span><span class="cx"> typedef struct private_object private_t;
</span><span class="cx">
</span><span class="cx"> /*****************************************************************************/
</span><del>-/* PROFILES FUNCTIONS */
-/*****************************************************************************/
-switch_status_t skinny_profile_find_listener_by_device_name_and_instance(skinny_profile_t *profile, const char *device_name, uint32_t device_instance, listener_t **listener);
-char * skinny_profile_find_session_uuid(skinny_profile_t *profile, listener_t *listener, uint32_t *line_instance_p, uint32_t call_id);
-switch_core_session_t * skinny_profile_find_session(skinny_profile_t *profile, listener_t *listener, uint32_t *line_instance_p, uint32_t call_id);
-
-/*****************************************************************************/
</del><span class="cx"> /* SQL FUNCTIONS */
</span><span class="cx"> /*****************************************************************************/
</span><span class="cx"> void skinny_execute_sql(skinny_profile_t *profile, char *sql, switch_mutex_t *mutex);
</span><span class="lines">@@ -202,13 +197,13 @@
</span><span class="cx"> /*****************************************************************************/
</span><span class="cx"> /* CHANNEL FUNCTIONS */
</span><span class="cx"> /*****************************************************************************/
</span><del>-void skinny_line_perform_set_state(const char *file, const char *func, int line, listener_t *listener, uint32_t line_instance, uint32_t call_id, uint32_t call_state);
-#define skinny_line_set_state(listener, line_instance, call_id, call_state) skinny_line_perform_set_state(__FILE__, __SWITCH_FUNC__, __LINE__, listener, line_instance, call_id, call_state)
</del><ins>+uint32_t skinny_line_perform_set_state(listener_t *listener, const char *file, const char *func, int line, uint32_t instance, uint32_t state, uint32_t call_id);
+#define skinny_line_set_state(listener, instance, state, call_id) skinny_line_perform_set_state(listener, __FILE__, __SWITCH_FUNC__, __LINE__, instance, state, call_id)
</ins><span class="cx">
</span><del>-uint32_t skinny_line_get_state(listener_t *listener, uint32_t line_instance, uint32_t call_id);
</del><ins>+uint32_t skinny_line_get_state(listener_t *listener, uint32_t instance);
</ins><span class="cx">
</span><span class="cx"> switch_status_t skinny_tech_set_codec(private_t *tech_pvt, int force);
</span><del>-void tech_init(private_t *tech_pvt, skinny_profile_t *profile, switch_core_session_t *session);
</del><ins>+void tech_init(private_t *tech_pvt, switch_core_session_t *session, listener_t *listener, uint32_t line);
</ins><span class="cx"> switch_status_t channel_on_init(switch_core_session_t *session);
</span><span class="cx"> switch_status_t channel_on_hangup(switch_core_session_t *session);
</span><span class="cx"> switch_status_t channel_on_destroy(switch_core_session_t *session);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skinnyskinny_protocolc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_protocol.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_protocol.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_protocol.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -218,25 +218,23 @@
</span><span class="cx"> {
</span><span class="cx">         switch_event_t *event = (switch_event_t *) pArg;
</span><span class="cx">
</span><del>-        char *profile_name = argv[0];
-        char *device_name = argv[1];
-        char *user_id = argv[2];
-        char *device_instance = argv[3];
-        char *ip = argv[4];
-        char *device_type = argv[5];
-        char *max_streams = argv[6];
-        char *port = argv[7];
-        char *codec_string = argv[8];
</del><ins>+        char *device_name = argv[0];
+        char *user_id = argv[1];
+        char *instance = argv[2];
+        char *ip = argv[3];
+        char *device_type = argv[4];
+        char *max_streams = argv[5];
+        char *port = argv[6];
+        char *codec_string = argv[7];
</ins><span class="cx">
</span><del>-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Profile-Name", "%s", profile_name);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Device-Name", "%s", device_name);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Station-User-Id", "%s", user_id);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Station-Instance", "%s", device_instance);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-IP-Address", "%s", ip);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Device-Type", "%s", device_type);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Max-Streams", "%s", max_streams);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Port", "%s", port);
-        switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Codecs", "%s", codec_string);
</del><ins>+        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Skinny-Device-Name", device_name);
+        switch_event_add_header( event, SWITCH_STACK_BOTTOM, "Skinny-User-Id", "%s", user_id);
+        switch_event_add_header( event, SWITCH_STACK_BOTTOM, "Skinny-Instance", "%s", instance);
+        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Skinny-IP", ip);
+        switch_event_add_header( event, SWITCH_STACK_BOTTOM, "Skinny-Device-Type", "%s", device_type);
+        switch_event_add_header( event, SWITCH_STACK_BOTTOM, "Skinny-Max-Streams", "%s", max_streams);
+        switch_event_add_header( event, SWITCH_STACK_BOTTOM, "Skinny-Port", "%s", port);
+        switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Skinny-Codecs", codec_string);
</ins><span class="cx">
</span><span class="cx">         return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -251,12 +249,8 @@
</span><span class="cx">
</span><span class="cx">         switch_event_create_subclass(&event, event_id, subclass_name);
</span><span class="cx">         switch_assert(event);
</span><del>-        if ((sql = switch_mprintf("SELECT '%s', name, user_id, instance, ip, type, max_streams, port, codec_string "
-         "FROM skinny_devices "
-                        "WHERE name='%s' AND instance=%d",
-                        listener->profile->name,
-                        listener->device_name, listener->device_instance))) {
-                skinny_execute_sql_callback(profile, profile->sql_mutex, sql, skinny_device_event_callback, event);
</del><ins>+        if ((sql = switch_mprintf("SELECT * FROM skinny_devices WHERE name='%s' AND instance=%d", listener->device_name, listener->device_instance))) {
+                skinny_execute_sql_callback(profile, profile->listener_mutex, sql, skinny_device_event_callback, event);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -265,30 +259,30 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /*****************************************************************************/
</span><del>-switch_status_t skinny_send_call_info(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
</del><ins>+switch_status_t skinny_send_call_info(switch_core_session_t *session)
</ins><span class="cx"> {
</span><span class="cx">         private_t *tech_pvt;
</span><span class="cx">         switch_channel_t *channel;
</span><ins>+        listener_t *listener;
</ins><span class="cx">         
</span><span class="cx">         char calling_party_name[40] = "UNKNOWN";
</span><span class="cx">         char calling_party[24] = "0000000000";
</span><span class="cx">         char called_party_name[40] = "UNKNOWN";
</span><span class="cx">         char called_party[24] = "0000000000";
</span><span class="cx">         
</span><del>-        channel = switch_core_session_get_channel(session);
</del><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><ins>+        switch_assert(tech_pvt != NULL);
+        channel = switch_core_session_get_channel(session);
+        switch_assert(channel != NULL);
</ins><span class="cx">
</span><ins>+        listener = tech_pvt->listener;
+        switch_assert(listener != NULL);
+
</ins><span class="cx">         switch_assert(tech_pvt->caller_profile != NULL);
</span><span class="cx">         
</span><span class="cx">         if(        switch_channel_test_flag(channel, CF_OUTBOUND) ) {
</span><del>-         struct line_stat_res_message *button = NULL;
-
-         skinny_line_get(listener, line_instance, &button);
-
-         if (button) {
-                 strncpy(calling_party_name, button->displayname, 40);
-                 strncpy(calling_party, button->name, 24);
-         }        
</del><ins>+                strncpy(calling_party_name, tech_pvt->line_displayname, 40);
+                strncpy(calling_party, tech_pvt->line_name, 24);
</ins><span class="cx">                 strncpy(called_party_name, tech_pvt->caller_profile->caller_id_name, 40);
</span><span class="cx">                 strncpy(called_party, tech_pvt->caller_profile->caller_id_number, 24);
</span><span class="cx">         } else {
</span><span class="lines">@@ -296,12 +290,12 @@
</span><span class="cx">                 strncpy(calling_party, tech_pvt->caller_profile->caller_id_number, 24);
</span><span class="cx">                 /* TODO called party */
</span><span class="cx">         }
</span><del>-        send_call_info(listener,
</del><ins>+        send_call_info(tech_pvt->listener,
</ins><span class="cx">                 calling_party_name, /* char calling_party_name[40], */
</span><span class="cx">                 calling_party, /* char calling_party[24], */
</span><span class="cx">                 called_party_name, /* char called_party_name[40], */
</span><span class="cx">                 called_party, /* char called_party[24], */
</span><del>-                line_instance, /* uint32_t line_instance, */
</del><ins>+                tech_pvt->line, /* uint32_t line_instance, */
</ins><span class="cx">                 tech_pvt->call_id, /* uint32_t call_id, */
</span><span class="cx">                 SKINNY_OUTBOUND_CALL, /* uint32_t call_type, */
</span><span class="cx">                 "", /* TODO char original_called_party_name[40], */
</span><span class="lines">@@ -322,427 +316,169 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> /*****************************************************************************/
</span><del>-switch_status_t skinny_session_walk_lines(skinny_profile_t *profile, char *channel_uuid, switch_core_db_callback_func_t callback, void *data)
</del><ins>+switch_status_t skinny_create_session(listener_t *listener, uint32_t line, uint32_t to_state)
</ins><span class="cx"> {
</span><del>-        char *sql;
-        if ((sql = switch_mprintf(
-                        "SELECT skinny_lines.*, channel_uuid, call_id, call_state "
-                        "FROM skinny_active_lines "
-                        "INNER JOIN skinny_lines "
-                                "ON skinny_active_lines.device_name = skinny_lines.device_name "
-                                "AND skinny_active_lines.device_instance = skinny_lines.device_instance "
-                                "AND skinny_active_lines.line_instance = skinny_lines.line_instance "
-                        "WHERE channel_uuid='%s'",
-                        channel_uuid))) {
-                skinny_execute_sql_callback(profile, profile->sql_mutex, sql, callback, data);
-                switch_safe_free(sql);
-        }
-        return SWITCH_STATUS_SUCCESS;
-}
-
-switch_status_t skinny_session_walk_lines_by_call_id(skinny_profile_t *profile, uint32_t call_id, switch_core_db_callback_func_t callback, void *data)
-{
-        char *sql;
-        if ((sql = switch_mprintf(
-                        "SELECT skinny_lines.*, channel_uuid, call_id, call_state "
-                        "FROM skinny_active_lines "
-                        "INNER JOIN skinny_lines "
-                                "ON skinny_active_lines.device_name = skinny_lines.device_name "
-                                "AND skinny_active_lines.device_instance = skinny_lines.device_instance "
-                                "AND skinny_active_lines.line_instance = skinny_lines.line_instance "
-                        "WHERE call_id='%d'",
-                        call_id))) {
-                skinny_execute_sql_callback(profile, profile->sql_mutex, sql, callback, data);
-                switch_safe_free(sql);
-        }
-        return SWITCH_STATUS_SUCCESS;
-}
-
-/*****************************************************************************/
-struct skinny_ring_lines_helper {
-        private_t *tech_pvt;
-        uint32_t lines_count;
-};
-
-int skinny_ring_lines_callback(void *pArg, int argc, char **argv, char **columnNames)
-{
-        struct skinny_ring_lines_helper *helper = pArg;
-        char *tmp;
-
-        char *device_name = argv[0];
-        uint32_t device_instance = atoi(argv[1]);
-        /* uint32_t position = atoi(argv[2]); */
-        uint32_t line_instance = atoi(argv[3]);
-        /* char *label = argv[4]; */
-        /* char *value = argv[5]; */
-        /* char *caller_name = argv[6]; */
-        /* uint32_t ring_on_idle = atoi(argv[7]); */
-        /* uint32_t ring_on_active = atoi(argv[8]); */
-        /* uint32_t busy_trigger = atoi(argv[9]); */
-        /* char *forward_all = argv[10]; */
-        /* char *forward_busy = argv[11]; */
-        /* char *forward_noanswer = argv[12]; */
-        /* uint32_t noanswer_duration = atoi(argv[13]); */
-        /* char *channel_uuid = argv[14]; */
-        /* uint32_t call_id = atoi(argv[15]); */
-        /* uint32_t call_state = atoi(argv[16]); */
-
-        listener_t *listener = NULL;
-
- skinny_profile_find_listener_by_device_name_and_instance(helper->tech_pvt->profile,
-         device_name, device_instance, &listener);
-        if(listener) {
-                helper->lines_count++;
-                skinny_line_set_state(listener, line_instance, helper->tech_pvt->call_id, SKINNY_RING_IN);
-                send_select_soft_keys(listener, line_instance, helper->tech_pvt->call_id, SKINNY_KEY_SET_RING_IN, 0xffff);
-         if ((tmp = switch_mprintf("\200\027%s", helper->tech_pvt->caller_profile->destination_number))) {
-         display_prompt_status(listener, 0, tmp, line_instance, helper->tech_pvt->call_id);
-                 switch_safe_free(tmp);
-         }
-         if ((tmp = switch_mprintf("\005\000\000\000%s", helper->tech_pvt->caller_profile->destination_number))) {
-          send_display_pri_notify(listener, 10 /* message_timeout */, 5 /* priority */, tmp);
-                 switch_safe_free(tmp);
-         }
-                skinny_send_call_info(helper->tech_pvt->session, listener, line_instance);
-                set_lamp(listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_BLINK);
-                set_ringer(listener, SKINNY_RING_INSIDE, SKINNY_RING_FOREVER, 0, helper->tech_pvt->call_id);
-        }
-        return 0;
-}
-
-switch_call_cause_t skinny_ring_lines(private_t *tech_pvt)
-{
-        switch_status_t status;
-        struct skinny_ring_lines_helper helper = {0};
-
-        switch_assert(tech_pvt);
-        switch_assert(tech_pvt->profile);
-        switch_assert(tech_pvt->session);
-        
-        helper.tech_pvt = tech_pvt;
-        helper.lines_count = 0;
-        
-        status = skinny_session_walk_lines(tech_pvt->profile,
-         switch_core_session_get_uuid(tech_pvt->session), skinny_ring_lines_callback, &helper);
-        if(status != SWITCH_STATUS_SUCCESS) {
-                return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
-        } else if(helper.lines_count == 0) {
-                return SWITCH_CAUSE_UNALLOCATED_NUMBER;
-        } else {
-                return SWITCH_CAUSE_SUCCESS;
-        }
-}
-
-/*****************************************************************************/
-switch_status_t skinny_create_ingoing_session(listener_t *listener, uint32_t *line_instance_p, switch_core_session_t **session)
-{
-        switch_core_session_t *nsession;
</del><ins>+        switch_core_session_t *session;
</ins><span class="cx">         switch_channel_t *channel;
</span><span class="cx">         private_t *tech_pvt;
</span><span class="cx">         char name[128];
</span><del>-        char *sql;
-        struct line_stat_res_message *button = NULL;
</del><span class="cx">
</span><del>- if((nsession = skinny_profile_find_session(listener->profile, listener, line_instance_p, 0))) {
- switch_core_session_rwunlock(nsession);
- if(skinny_line_get_state(listener, *line_instance_p, 0) == SKINNY_OFF_HOOK) {
- /* Reuse existing session */
- *session = nsession;
-         return SWITCH_STATUS_SUCCESS;
- }
- skinny_session_hold_line(nsession, listener, *line_instance_p);
- }
- if(*line_instance_p == 0) {
- *line_instance_p = 1;
- }
</del><ins>+        if(listener->session[line]) {
+                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "There is already a session on line %d of device %s\n",
+                        line, listener->device_name);
</ins><span class="cx">
</span><del>-        skinny_line_get(listener, *line_instance_p, &button);
</del><ins>+                session = listener->session[line];
</ins><span class="cx">
</span><del>-        if (!button || !button->shortname) {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Line %d not found on device %s %d\n",
-                 *line_instance_p, listener->device_name, listener->device_instance);
-                goto error;
-        }
</del><ins>+                channel = switch_core_session_get_channel(session);
+                assert(channel != NULL);
+
+                tech_pvt = switch_core_session_get_private(session);
+                assert(tech_pvt != NULL);
+        } else {
</ins><span class="cx">         
</span><del>-        if (!(nsession = switch_core_session_request(skinny_get_endpoint_interface(),
-         SWITCH_CALL_DIRECTION_INBOUND, NULL))) {
-                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error Creating Session\n");
-                goto error;
-        }
</del><ins>+                if (!(session = switch_core_session_request(skinny_get_endpoint_interface(), SWITCH_CALL_DIRECTION_INBOUND, NULL))) {
+                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Error Creating Session\n");
+                        goto error;
+                }
</ins><span class="cx">
</span><del>-        if (!(tech_pvt = (struct private_object *) switch_core_session_alloc(nsession, sizeof(*tech_pvt)))) {
-                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(nsession), SWITCH_LOG_CRIT,
-                 "Error Creating Session private object\n");
-                goto error;
-        }
</del><ins>+                if (!(tech_pvt = (struct private_object *) switch_core_session_alloc(session, sizeof(*tech_pvt)))) {
+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Error Creating Session private object\n");
+                        goto error;
+                }
</ins><span class="cx">
</span><del>-        switch_core_session_add_stream(nsession, NULL);
</del><ins>+                switch_core_session_add_stream(session, NULL);
</ins><span class="cx">
</span><del>-        tech_init(tech_pvt, listener->profile, nsession);
</del><ins>+                tech_init(tech_pvt, session, listener, line);
</ins><span class="cx">
</span><del>-        channel = switch_core_session_get_channel(nsession);
</del><ins>+                channel = switch_core_session_get_channel(session);
</ins><span class="cx">
</span><del>-        snprintf(name, sizeof(name), "SKINNY/%s/%s:%d/%d", listener->profile->name,
-         listener->device_name, listener->device_instance, *line_instance_p);
-        switch_channel_set_name(channel, name);
</del><ins>+                snprintf(name, sizeof(name), "SKINNY/%s/%s:%d/%d", listener->profile->name, listener->device_name, listener->device_instance, tech_pvt->line);
+                switch_channel_set_name(channel, name);
</ins><span class="cx">
</span><del>-        if (switch_core_session_thread_launch(nsession) != SWITCH_STATUS_SUCCESS) {
-                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(nsession), SWITCH_LOG_CRIT,
-                 "Error Creating Session thread\n");
-                goto error;
-        }
</del><ins>+                if (switch_core_session_thread_launch(session) != SWITCH_STATUS_SUCCESS) {
+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Error Creating Session thread\n");
+                        goto error;
+                }
</ins><span class="cx">
</span><del>-        if (!(tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(nsession),
-                                                                                                         NULL, listener->profile->dialplan,
-                                                                                                         button->shortname, button->name,
-                                                                                                         listener->remote_ip, NULL, NULL, NULL,
-                                                                                                         "skinny" /* modname */,
-                                                                                                         listener->profile->context,
-                                                                                                         "")) != 0) {
-         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(nsession), SWITCH_LOG_CRIT,
-         "Error Creating Session caller profile\n");
-                goto error;
-        }
</del><ins>+                if (!(tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
+                                                                                                                                 NULL, listener->profile->dialplan, tech_pvt->line_displayname, tech_pvt->line_name, listener->remote_ip, NULL, NULL, NULL, "skinny" /* modname */, listener->profile->context, tech_pvt->dest)) != 0) {
+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_CRIT, "Error Creating Session caller profile\n");
+                        goto error;
+                }
</ins><span class="cx">
</span><del>-        switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
</del><ins>+                switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
</ins><span class="cx">
</span><del>-        if ((sql = switch_mprintf(
-                        "INSERT INTO skinny_active_lines "
-                                "(device_name, device_instance, line_instance, channel_uuid, call_id, call_state) "
-                                "SELECT device_name, device_instance, line_instance, '%s', %d, %d "
-                                "FROM skinny_lines "
-                                "WHERE value='%s'",
-                        switch_core_session_get_uuid(nsession), tech_pvt->call_id, SKINNY_ON_HOOK, button->shortname
-                        ))) {
-                skinny_execute_sql(listener->profile, sql, listener->profile->sql_mutex);
-                switch_safe_free(sql);
</del><span class="cx">         }
</span><del>-
-        set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, 0, tech_pvt->call_id);
</del><ins>+        
+        set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, 0);
</ins><span class="cx">         set_speaker_mode(listener, SKINNY_SPEAKER_ON);
</span><del>-        set_lamp(listener, SKINNY_BUTTON_LINE, *line_instance_p, SKINNY_LAMP_ON);
- skinny_line_set_state(listener, *line_instance_p, tech_pvt->call_id, SKINNY_OFF_HOOK);
- send_select_soft_keys(listener, *line_instance_p, tech_pvt->call_id, SKINNY_KEY_SET_OFF_HOOK, 0xffff);
-        display_prompt_status(listener, 0, "\200\000",
-                *line_instance_p, tech_pvt->call_id);
-        activate_call_plane(listener, *line_instance_p);
</del><ins>+        set_lamp(listener, SKINNY_BUTTON_LINE, tech_pvt->line, SKINNY_LAMP_ON);
+        send_call_state(listener,
+                SKINNY_OFF_HOOK,
+                tech_pvt->line,
+                tech_pvt->call_id);
+        skinny_line_set_state(listener, tech_pvt->line, to_state, tech_pvt->call_id);
+        display_prompt_status(listener,
+                0,
+                "\200\000",
+                tech_pvt->line,
+                tech_pvt->call_id);
+        activate_call_plane(listener, tech_pvt->line);
+        start_tone(listener, SKINNY_TONE_DIALTONE, 0, tech_pvt->line, tech_pvt->call_id);
</ins><span class="cx">
</span><span class="cx">         goto done;
</span><span class="cx"> error:
</span><del>-        if (nsession) {
-                switch_core_session_destroy(&nsession);
</del><ins>+        if (session) {
+                switch_core_session_destroy(&session);
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_FALSE;
</span><span class="cx">
</span><span class="cx"> done:
</span><del>- switch_core_session_rwunlock(nsession);
-        *session = nsession;
</del><ins>+        listener->session[line] = session;
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-switch_status_t skinny_session_process_dest(switch_core_session_t *session, listener_t *listener, uint32_t line_instance, char *dest, char append_dest, uint32_t backspace)
</del><ins>+switch_status_t skinny_process_dest(listener_t *listener, uint32_t line)
</ins><span class="cx"> {
</span><span class="cx">         switch_channel_t *channel = NULL;
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx">
</span><del>- switch_assert(session);
- switch_assert(listener);
- switch_assert(listener->profile);
-
-        channel = switch_core_session_get_channel(session);
-        tech_pvt = switch_core_session_get_private(session);
</del><ins>+        channel = switch_core_session_get_channel(listener->session[line]);
+        assert(channel != NULL);
</ins><span class="cx">
</span><del>-        if(!dest) {
- if(append_dest == '\0') {/* no digit yet */
-          start_tone(listener, SKINNY_TONE_DIALTONE, 0, line_instance, tech_pvt->call_id);
- } else {
- if(strlen(tech_pvt->caller_profile->destination_number) == 0) {/* first digit */
-                 stop_tone(listener, line_instance, tech_pvt->call_id);
- send_select_soft_keys(listener, line_instance, tech_pvt->call_id,
- SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT, 0xffff);
- }
- tech_pvt->caller_profile->destination_number = switch_core_sprintf(tech_pvt->caller_profile->pool,
- "%s%c", tech_pvt->caller_profile->destination_number, append_dest);
- }
- } else {
-         tech_pvt->caller_profile->destination_number = switch_core_strdup(tech_pvt->caller_profile->pool,
-         dest);
- }
- /* TODO Number is complete -> check against dialplan */
-        if((strlen(tech_pvt->caller_profile->destination_number) >= 4) || dest) {
-                send_dialed_number(listener, tech_pvt->caller_profile->destination_number, line_instance, tech_pvt->call_id);
- skinny_line_set_state(listener, line_instance, tech_pvt->call_id, SKINNY_PROCEED);
-         skinny_send_call_info(session, listener, line_instance);
- skinny_session_start_media(session, listener, line_instance);
-        }
</del><ins>+        tech_pvt = switch_core_session_get_private(listener->session[line]);
+        assert(tech_pvt != NULL);
</ins><span class="cx">
</span><del>-        switch_core_session_rwunlock(session);
-        
-        return SWITCH_STATUS_SUCCESS;
-}
</del><ins>+        tech_pvt->caller_profile->destination_number = switch_core_strdup(tech_pvt->caller_profile->pool, tech_pvt->dest);
+        if(strlen(tech_pvt->dest) >= 4) { /* TODO Number is complete -> check against dialplan */
+                if (switch_channel_get_state(channel) == CS_NEW) {
+                        switch_channel_set_state(channel, CS_INIT);
+                }
</ins><span class="cx">
</span><del>-switch_status_t skinny_session_ring_out(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
-{
-        switch_channel_t *channel = NULL;
-        private_t *tech_pvt = NULL;
-
- switch_assert(session);
- switch_assert(listener);
- switch_assert(listener->profile);
-
-        channel = switch_core_session_get_channel(session);
-        tech_pvt = switch_core_session_get_private(session);
-
- skinny_line_set_state(listener, line_instance, tech_pvt->call_id, SKINNY_RING_OUT);
- send_select_soft_keys(listener, line_instance, tech_pvt->call_id,
- SKINNY_KEY_SET_RING_OUT, 0xffff);
-        display_prompt_status(listener, 0, "\200\026",
-                line_instance, tech_pvt->call_id);
- skinny_send_call_info(session, listener, line_instance);
-
-        switch_core_session_rwunlock(session);
-        
</del><ins>+                send_dialed_number(listener, tech_pvt->dest, tech_pvt->line, tech_pvt->call_id);
+                skinny_answer(listener->session[line]);
+        }
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-struct skinny_session_answer_helper {
</del><ins>+switch_status_t skinny_answer(switch_core_session_t *session)
+{
</ins><span class="cx">         private_t *tech_pvt;
</span><span class="cx">         listener_t *listener;
</span><del>-        uint32_t line_instance;
-};
-
-int skinny_session_answer_callback(void *pArg, int argc, char **argv, char **columnNames)
-{
-        struct skinny_session_answer_helper *helper = pArg;
-        listener_t *listener = NULL;
-
-        char *device_name = argv[0];
-        uint32_t device_instance = atoi(argv[1]);
-        /* uint32_t position = atoi(argv[2]); */
-        uint32_t line_instance = atoi(argv[3]);
-        /* char *label = argv[4]; */
-        /* char *value = argv[5]; */
-        /* char *caller_name = argv[6]; */
-        /* uint32_t ring_on_idle = atoi(argv[7]); */
-        /* uint32_t ring_on_active = atoi(argv[8]); */
-        /* uint32_t busy_trigger = atoi(argv[9]); */
-        /* char *forward_all = argv[10]; */
-        /* char *forward_busy = argv[11]; */
-        /* char *forward_noanswer = argv[12]; */
-        /* uint32_t noanswer_duration = atoi(argv[13]); */
-        /* char *channel_uuid = argv[14]; */
-        /* uint32_t call_id = atoi(argv[15]); */
-        /* uint32_t call_state = atoi(argv[16]); */
-
-        skinny_profile_find_listener_by_device_name_and_instance(helper->tech_pvt->profile, device_name, device_instance, &listener);
- if(listener) {
- if(!strcmp(device_name, helper->listener->device_name)
- && (device_instance == helper->listener->device_instance)
- && (line_instance == helper->line_instance)) {/* the answering line */
-         
-         
-         set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, 0, helper->tech_pvt->call_id);
-         set_speaker_mode(listener, SKINNY_SPEAKER_ON);
-         set_lamp(listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_ON);
- skinny_line_set_state(listener, line_instance, helper->tech_pvt->call_id, SKINNY_OFF_HOOK);
- /* send_select_soft_keys(listener, line_instance, helper->tech_pvt->call_id, SKINNY_KEY_SET_OFF_HOOK, 0xffff); */
-         /* display_prompt_status(listener, 0, "\200\000",
-                 line_instance, tech_pvt->call_id); */
-         activate_call_plane(listener, line_instance);
- }
- }
- return 0;
-}
-
-switch_status_t skinny_session_answer(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
-{
-        struct skinny_session_answer_helper helper = {0};
-        switch_channel_t *channel = NULL;
-        private_t *tech_pvt = NULL;
-
- switch_assert(session);
- switch_assert(listener);
- switch_assert(listener->profile);
-
-        channel = switch_core_session_get_channel(session);
</del><ins>+        
</ins><span class="cx">         tech_pvt = switch_core_session_get_private(session);
</span><ins>+        switch_assert(tech_pvt != NULL);
</ins><span class="cx">         
</span><del>- helper.tech_pvt = tech_pvt;
- helper.listener = listener;
- helper.line_instance = line_instance;
</del><ins>+        listener = tech_pvt->listener;
+        switch_assert(listener != NULL);
</ins><span class="cx">
</span><del>- skinny_session_walk_lines(tech_pvt->profile, switch_core_session_get_uuid(session), skinny_session_answer_callback, &helper);
-
-        skinny_session_start_media(session, listener, line_instance);
-
-        switch_core_session_rwunlock(session);
-        
</del><ins>+        set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, 0); /* TODO : here ? */
+        stop_tone(listener, tech_pvt->line, tech_pvt->call_id);
+        open_receive_channel(listener,
+                tech_pvt->call_id, /* uint32_t conference_id, */
+                0, /* uint32_t pass_thru_party_id, */
+                20, /* uint32_t packets, */
+                SKINNY_CODEC_ULAW_64K, /* uint32_t payload_capacity, */
+                0, /* uint32_t echo_cancel_type, */
+                0, /* uint32_t g723_bitrate, */
+                0, /* uint32_t conference_id2, */
+                0 /* uint32_t reserved[10] */
+        );
+        send_call_state(listener,
+                SKINNY_CONNECTED,
+                tech_pvt->line,
+                tech_pvt->call_id);
+        skinny_line_set_state(listener, tech_pvt->line, SKINNY_KEY_SET_CONNECTED, tech_pvt->call_id);
+        display_prompt_status(listener,
+                0,
+                "\200\030",
+                tech_pvt->line,
+                tech_pvt->call_id);
+        skinny_send_call_info(session);
</ins><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-switch_status_t skinny_session_start_media(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
</del><ins>+switch_status_t skinny_hold_line(listener_t *listener, uint32_t line)
</ins><span class="cx"> {
</span><span class="cx">         switch_channel_t *channel = NULL;
</span><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx">
</span><del>- switch_assert(session);
- switch_assert(listener);
- switch_assert(listener->profile);
-
-        channel = switch_core_session_get_channel(session);
-        tech_pvt = switch_core_session_get_private(session);
-
- stop_tone(listener, line_instance, tech_pvt->call_id);
- open_receive_channel(listener,
- tech_pvt->call_id, /* uint32_t conference_id, */
- tech_pvt->call_id, /* uint32_t pass_thru_party_id, */
- 20, /* uint32_t packets, */
- SKINNY_CODEC_ULAW_64K, /* uint32_t payload_capacity, */
- 0, /* uint32_t echo_cancel_type, */
- 0, /* uint32_t g723_bitrate, */
- 0, /* uint32_t conference_id2, */
- 0 /* uint32_t reserved[10] */
- );
- skinny_line_set_state(listener, line_instance, tech_pvt->call_id, SKINNY_CONNECTED);
- send_select_soft_keys(listener, line_instance, tech_pvt->call_id,
- SKINNY_KEY_SET_CONNECTED, 0xffff);
- display_prompt_status(listener,
- 0,
- "\200\030",
- line_instance,
- tech_pvt->call_id);
- skinny_send_call_info(session, listener, line_instance);
</del><ins>+        channel = switch_core_session_get_channel(listener->session[line]);
+        assert(channel != NULL);
</ins><span class="cx">
</span><del>-        switch_core_session_rwunlock(session);
-        
-        return SWITCH_STATUS_SUCCESS;
-}
</del><ins>+        tech_pvt = switch_core_session_get_private(listener->session[line]);
+        assert(tech_pvt != NULL);
</ins><span class="cx">
</span><del>-switch_status_t skinny_session_hold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
-{
-        switch_channel_t *channel = NULL;
-        private_t *tech_pvt = NULL;
-
- switch_assert(session);
- switch_assert(listener);
- switch_assert(listener->profile);
-
-        channel = switch_core_session_get_channel(session);
-        tech_pvt = switch_core_session_get_private(session);
-                
</del><span class="cx">         /* TODO */
</span><span class="cx">         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Hold is not implemented yet. Hanging up the line.\n");
</span><span class="cx">
</span><span class="cx">         switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
</span><span class="cx">
</span><del>-        switch_core_session_rwunlock(session);
-        
</del><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-switch_status_t skinny_session_unhold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance)
</del><ins>+switch_status_t skinny_unhold_line(listener_t *listener, uint32_t line)
</ins><span class="cx"> {
</span><span class="cx">         /* TODO */
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -789,7 +525,7 @@
</span><span class="cx">                         instance,
</span><span class="cx">                         listener->device_name, listener->device_instance
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_line_get_callback, &helper);
</del><ins>+                skinny_execute_sql_callback(listener->profile, listener->profile->listener_mutex, sql, skinny_line_get_callback, &helper);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">         *button = helper.button;
</span><span class="lines">@@ -833,7 +569,7 @@
</span><span class="cx">                         listener->device_name, listener->device_instance,
</span><span class="cx">                         SKINNY_BUTTON_SPEED_DIAL
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_speed_dial_get_callback, &helper);
</del><ins>+                skinny_execute_sql_callback(listener->profile, listener->profile->listener_mutex, sql, skinny_speed_dial_get_callback, &helper);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">         *button = helper.button;
</span><span class="lines">@@ -878,7 +614,7 @@
</span><span class="cx">                         listener->device_instance,
</span><span class="cx">                         SKINNY_BUTTON_SERVICE_URL
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_service_url_get_callback, &helper);
</del><ins>+                skinny_execute_sql_callback(listener->profile, listener->profile->listener_mutex, sql, skinny_service_url_get_callback, &helper);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">         *button = helper.button;
</span><span class="lines">@@ -924,7 +660,7 @@
</span><span class="cx">                         listener->device_instance,
</span><span class="cx">                         SKINNY_BUTTON_SPEED_DIAL, SKINNY_BUTTON_SERVICE_URL
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_feature_get_callback, &helper);
</del><ins>+                skinny_execute_sql_callback(listener->profile, listener->profile->listener_mutex, sql, skinny_feature_get_callback, &helper);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">         *button = helper.button;
</span><span class="lines">@@ -968,8 +704,7 @@
</span><span class="cx"> switch_status_t set_ringer(listener_t *listener,
</span><span class="cx">         uint32_t ring_type,
</span><span class="cx">         uint32_t ring_mode,
</span><del>-        uint32_t line_instance,
-        uint32_t call_id)
</del><ins>+        uint32_t unknown)
</ins><span class="cx"> {
</span><span class="cx">         skinny_message_t *message;
</span><span class="cx">         message = switch_core_alloc(listener->pool, 12+sizeof(message->data.ringer));
</span><span class="lines">@@ -977,8 +712,7 @@
</span><span class="cx">         message->length = 4 + sizeof(message->data.ringer);
</span><span class="cx">         message->data.ringer.ring_type = ring_type;
</span><span class="cx">         message->data.ringer.ring_mode = ring_mode;
</span><del>-        message->data.ringer.line_instance = line_instance;
-        message->data.ringer.call_id = call_id;
</del><ins>+        message->data.ringer.unknown = unknown;
</ins><span class="cx">         skinny_send_reply(listener, message);
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -1256,26 +990,10 @@
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-switch_status_t send_display_pri_notify(listener_t *listener,
-        uint32_t message_timeout,
-        uint32_t priority,
-        char *notify)
</del><ins>+switch_status_t send_reset(listener_t *listener,
+        uint32_t reset_type)
</ins><span class="cx"> {
</span><span class="cx">         skinny_message_t *message;
</span><del>-        message = switch_core_alloc(listener->pool, 12+sizeof(message->data.display_pri_notify));
-        message->type = DISPLAY_PRI_NOTIFY_MESSAGE;
-        message->length = 4 + sizeof(message->data.display_pri_notify);
-        message->data.display_pri_notify.message_timeout = message_timeout;
-        message->data.display_pri_notify.priority = priority;
-        strncpy(message->data.display_pri_notify.notify, notify, 32);
-        skinny_send_reply(listener, message);
-        return SWITCH_STATUS_SUCCESS;
-}
-
-
-switch_status_t send_reset(listener_t *listener, uint32_t reset_type)
-{
-        skinny_message_t *message;
</del><span class="cx">         message = switch_core_alloc(listener->pool, 12+sizeof(message->data.reset));
</span><span class="cx">         message->type = RESET_MESSAGE;
</span><span class="cx">         message->length = 4 + sizeof(message->data.reset);
</span><span class="lines">@@ -1360,7 +1078,7 @@
</span><span class="cx">                         request->data.reg.max_streams,
</span><span class="cx">                         "" /* codec_string */
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql(profile, sql, profile->sql_mutex);
</del><ins>+                skinny_execute_sql(profile, sql, profile->listener_mutex);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -1372,7 +1090,6 @@
</span><span class="cx">         if (xskinny) {
</span><span class="cx">                 xbuttons = switch_xml_child(xskinny, "buttons");
</span><span class="cx">                 if (xbuttons) {
</span><del>-                        uint32_t line_instance = 1;
</del><span class="cx">                         for (xbutton = switch_xml_child(xbuttons, "button"); xbutton; xbutton = xbutton->next) {
</span><span class="cx">                                 uint32_t position = atoi(switch_xml_attr_soft(xbutton, "position"));
</span><span class="cx">                                 uint32_t type = skinny_str2button(switch_xml_attr_soft(xbutton, "type"));
</span><span class="lines">@@ -1389,16 +1106,16 @@
</span><span class="cx">                                         uint32_t noanswer_duration = atoi(switch_xml_attr_soft(xbutton, "noanswer-duration"));
</span><span class="cx">                                         if ((sql = switch_mprintf(
</span><span class="cx">                                                         "INSERT INTO skinny_lines "
</span><del>-                                                                "(device_name, device_instance, position, line_instance, "
</del><ins>+                                                                "(device_name, device_instance, position, "
</ins><span class="cx">                                                                 "label, value, caller_name, "
</span><span class="cx">                                                                 "ring_on_idle, ring_on_active, busy_trigger, "
</span><span class="cx">                                                         "forward_all, forward_busy, forward_noanswer, noanswer_duration) "
</span><del>-                                                                "VALUES('%s', %d, %d, %d, '%s', '%s', '%s', %d, %d, %d, '%s', '%s', '%s', %d)",
-                                                        request->data.reg.device_name, request->data.reg.instance, position, line_instance++,
</del><ins>+                                                                "VALUES('%s', %d, %d, '%s', '%s', '%s', %d, %d, %d, '%s', '%s', '%s', %d)",
+                                                        request->data.reg.device_name, request->data.reg.instance, position,
</ins><span class="cx">                                                         label, value, caller_name,
</span><span class="cx">                                                         ring_on_idle, ring_on_active, busy_trigger,
</span><span class="cx">                                                 forward_all, forward_busy, forward_noanswer, noanswer_duration))) {
</span><del>-                                                skinny_execute_sql(profile, sql, profile->sql_mutex);
</del><ins>+                                                skinny_execute_sql(profile, sql, profile->listener_mutex);
</ins><span class="cx">                                                 switch_safe_free(sql);
</span><span class="cx">                                         }
</span><span class="cx">                                 } else {
</span><span class="lines">@@ -1414,7 +1131,7 @@
</span><span class="cx">                                                         label,
</span><span class="cx">                                                         value,
</span><span class="cx">                                                         settings))) {
</span><del>-                                                skinny_execute_sql(profile, sql, profile->sql_mutex);
</del><ins>+                                                skinny_execute_sql(profile, sql, profile->listener_mutex);
</ins><span class="cx">                                                 switch_safe_free(sql);
</span><span class="cx">                                         }
</span><span class="cx">                                 }
</span><span class="lines">@@ -1428,9 +1145,9 @@
</span><span class="cx">         message = switch_core_alloc(listener->pool, 12+sizeof(message->data.reg_ack));
</span><span class="cx">         message->type = REGISTER_ACK_MESSAGE;
</span><span class="cx">         message->length = 4 + sizeof(message->data.reg_ack);
</span><del>-        message->data.reg_ack.keep_alive = profile->keep_alive;
-        memcpy(message->data.reg_ack.date_format, profile->date_format, 6);
-        message->data.reg_ack.secondary_keep_alive = profile->keep_alive;
</del><ins>+        message->data.reg_ack.keepAlive = profile->keep_alive;
+        memcpy(message->data.reg_ack.dateFormat, profile->date_format, 6);
+        message->data.reg_ack.secondaryKeepAlive = profile->keep_alive;
</ins><span class="cx">         skinny_send_reply(listener, message);
</span><span class="cx">
</span><span class="cx">         /* Send CapabilitiesReqMessage */
</span><span class="lines">@@ -1510,7 +1227,7 @@
</span><span class="cx">                         SKINNY_BUTTON_SPEED_DIAL,
</span><span class="cx">                         listener->device_name
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql_callback(profile, profile->sql_mutex, sql, skinny_config_stat_res_callback, message);
</del><ins>+                skinny_execute_sql_callback(profile, profile->listener_mutex, sql, skinny_config_stat_res_callback, message);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">         skinny_send_reply(listener, message);
</span><span class="lines">@@ -1570,10 +1287,10 @@
</span><span class="cx">                         codec_string,
</span><span class="cx">                         listener->device_name
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql(profile, sql, profile->sql_mutex);
</del><ins>+                skinny_execute_sql(profile, sql, profile->listener_mutex);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><del>-        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
</del><ins>+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,
</ins><span class="cx">                 "Codecs %s supported.\n", codec_string);
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -1592,11 +1309,11 @@
</span><span class="cx">
</span><span class="cx">         if ((sql = switch_mprintf(
</span><span class="cx">                         "UPDATE skinny_devices SET port=%d WHERE name='%s' and instance=%d",
</span><del>-                        request->data.port.port,
</del><ins>+                        request->data.as_uint16,
</ins><span class="cx">                         listener->device_name,
</span><span class="cx">                         listener->device_instance
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql(profile, sql, profile->sql_mutex);
</del><ins>+                skinny_execute_sql(profile, sql, profile->listener_mutex);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -1661,7 +1378,7 @@
</span><span class="cx">                         SKINNY_BUTTON_UNDEFINED,
</span><span class="cx">                         listener->device_name, listener->device_instance
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql_callback(profile, profile->sql_mutex, sql, skinny_handle_button_template_request_callback, &helper);
</del><ins>+                skinny_execute_sql_callback(profile, profile->listener_mutex, sql, skinny_handle_button_template_request_callback, &helper);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -1674,7 +1391,7 @@
</span><span class="cx">                         SKINNY_BUTTON_LINE,
</span><span class="cx">                         listener->device_name, listener->device_instance
</span><span class="cx">                         ))) {
</span><del>-                skinny_execute_sql_callback(profile, profile->sql_mutex, sql, skinny_handle_button_template_request_callback, &helper);
</del><ins>+                skinny_execute_sql_callback(profile, profile->listener_mutex, sql, skinny_handle_button_template_request_callback, &helper);
</ins><span class="cx">                 switch_safe_free(sql);
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -1747,7 +1464,7 @@
</span><span class="cx">         skinny_send_reply(listener, message);
</span><span class="cx">
</span><span class="cx">         /* Init the states */
</span><del>- send_select_soft_keys(listener, 0, 0, SKINNY_KEY_SET_ON_HOOK, 0xffff);
</del><ins>+        skinny_line_set_state(listener, 0, SKINNY_KEY_SET_ON_HOOK, 0);
</ins><span class="cx">         
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="lines">@@ -1879,128 +1596,173 @@
</span><span class="cx"> switch_status_t skinny_handle_soft_key_event_message(listener_t *listener, skinny_message_t *request)
</span><span class="cx"> {
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><del>-        uint32_t line_instance = 0;
-        switch_core_session_t *session = NULL;
</del><ins>+
+        skinny_profile_t *profile;
</ins><span class="cx">         switch_channel_t *channel = NULL;
</span><ins>+        uint32_t line;
</ins><span class="cx">         private_t *tech_pvt = NULL;
</span><span class="cx">
</span><del>- switch_assert(listener);
- switch_assert(listener->profile);
-
-        skinny_check_data_length(request, sizeof(request->data.soft_key_event));
</del><span class="cx">
</span><del>-        line_instance = request->data.soft_key_event.line_instance;
</del><ins>+        switch_assert(listener->profile);
+        switch_assert(listener->device_name);
</ins><span class="cx">
</span><del>-        switch(request->data.soft_key_event.event) {
-                case SOFTKEY_REDIAL:
-         status = skinny_create_ingoing_session(listener, &line_instance, &session);
</del><ins>+        profile = listener->profile;
</ins><span class="cx">
</span><del>-                 skinny_session_process_dest(session, listener, line_instance, "redial", '\0', 0);
-                        break;
-                case SOFTKEY_NEWCALL:
-         status = skinny_create_ingoing_session(listener, &line_instance, &session);
-                 tech_pvt = switch_core_session_get_private(session);
-                 assert(tech_pvt != NULL);
</del><ins>+        skinny_check_data_length(request, sizeof(request->data.soft_key_event));
</ins><span class="cx">
</span><del>-                 skinny_session_process_dest(session, listener, line_instance, NULL, '\0', 0);
-                        break;
-                case SOFTKEY_HOLD:
- session = skinny_profile_find_session(listener->profile, listener, &line_instance, request->data.soft_key_event.call_id);
</del><ins>+        if(request->data.soft_key_event.line_instance) {
+                line = request->data.soft_key_event.line_instance;
+        } else {
+                line = 1;
+        }
+        /* Close/Hold busy lines */
+        for(int i = 0 ; i < SKINNY_MAX_BUTTON_COUNT ; i++) {
+                if(i == line) {
+                        continue;
+                }
+                if(listener->session[i]) {
+                        channel = switch_core_session_get_channel(listener->session[i]);
+                        assert(channel != NULL);
+                        if((skinny_line_get_state(listener, i) == SKINNY_KEY_SET_ON_HOOK)
+                                        || (skinny_line_get_state(listener, i) == SKINNY_KEY_SET_OFF_HOOK)
+                                        || (skinny_line_get_state(listener, i) == SKINNY_KEY_SET_RING_OUT)
+                                        || (skinny_line_get_state(listener, i) == SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT)
+                                        || (skinny_line_get_state(listener, i) == SKINNY_KEY_SET_OFF_HOOK_WITH_FEATURES)) {
</ins><span class="cx">
</span><del>-                 if(session) {
- status = skinny_session_hold_line(session, listener, line_instance);
- }
-                        break;
-                case SOFTKEY_ENDCALL:
- session = skinny_profile_find_session(listener->profile, listener, &line_instance, request->data.soft_key_event.call_id);
</del><ins>+                                switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
+                                channel = NULL;
+                        } else if((skinny_line_get_state(listener, i) == SKINNY_KEY_SET_RING_IN)
+                                        || (skinny_line_get_state(listener, i) == SKINNY_KEY_SET_CONNECTED)
+                                        || (skinny_line_get_state(listener, i) == SKINNY_KEY_SET_CONNECTED_WITH_TRANSFER)
+                                        || (skinny_line_get_state(listener, i) == SKINNY_KEY_SET_CONNECTED_WITH_CONFERENCE)) {
+                                skinny_hold_line(listener, i);                        
+                        } /* remaining: SKINNY_KEY_SET_ON_HOLD */
+                }
+        }
+        
+        if(!listener->session[line]) { /*the line is not busy */
+                switch(request->data.soft_key_event.event) {
+                        case SOFTKEY_REDIAL:
+                                skinny_create_session(listener, line, SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT);
+        
+                                tech_pvt = switch_core_session_get_private(listener->session[line]);
+                                assert(tech_pvt != NULL);
+                
+                                strcpy(tech_pvt->dest, "redial");
+                                skinny_process_dest(listener, line);
+                                break;
+                        case SOFTKEY_NEWCALL:
+                                skinny_create_session(listener, line, SKINNY_KEY_SET_OFF_HOOK);
+                                break;
+                        default:
+                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
+                                        "Unknown SoftKeyEvent type while not busy: %d.\n", request->data.soft_key_event.event);
+                }
+        } else { /* the line is busy */
+                if(skinny_line_get_state(listener, line) == SKINNY_KEY_SET_ON_HOLD) {
+                        skinny_unhold_line(listener, line);                        
+                }
+                switch(request->data.soft_key_event.event) {
+                        case SOFTKEY_ANSWER:
+                                skinny_answer(listener->session[line]);
+                                break;
+                        case SOFTKEY_ENDCALL:
+                                channel = switch_core_session_get_channel(listener->session[line]);
+                                assert(channel != NULL);
</ins><span class="cx">
</span><del>-                 if(session) {
-                         channel = switch_core_session_get_channel(session);
</del><ins>+                                switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
</ins><span class="cx">
</span><del>-                         switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
- }
-                        break;
-                case SOFTKEY_RESUME:
- session = skinny_profile_find_session(listener->profile, listener, &line_instance, request->data.soft_key_event.call_id);
-
-                 if(session) {
- status = skinny_session_unhold_line(session, listener, line_instance);
- }
-                        break;
-                case SOFTKEY_ANSWER:
- session = skinny_profile_find_session(listener->profile, listener, &line_instance, request->data.soft_key_event.call_id);
-
-                 if(session) {
-                         status = skinny_session_answer(session, listener, line_instance);
-                 }
-                        break;
-                default:
-                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
-                                "Unknown SoftKeyEvent type while busy: %d.\n", request->data.soft_key_event.event);
</del><ins>+                                break;
+                        default:
+                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
+                                        "Unknown SoftKeyEvent type while busy: %d.\n", request->data.soft_key_event.event);
+                }
</ins><span class="cx">         }
</span><del>-
- if(session) {
-         switch_core_session_rwunlock(session);
- }
-        
</del><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> switch_status_t skinny_handle_off_hook_message(listener_t *listener, skinny_message_t *request)
</span><span class="cx"> {
</span><del>-        uint32_t line_instance;
-        switch_core_session_t *session = NULL;
-        private_t *tech_pvt = NULL;
</del><ins>+        skinny_profile_t *profile;
+        uint32_t line;
</ins><span class="cx">
</span><ins>+        switch_assert(listener->profile);
+        switch_assert(listener->device_name);
+
+        profile = listener->profile;
+
</ins><span class="cx">         skinny_check_data_length(request, sizeof(request->data.off_hook));
</span><span class="cx">
</span><del>-        if(request->data.off_hook.line_instance > 0) {
-                line_instance = request->data.off_hook.line_instance;
</del><ins>+        if(request->data.off_hook.line_instance) {
+                line = request->data.off_hook.line_instance;
</ins><span class="cx">         } else {
</span><del>-                line_instance = 1;
</del><ins>+                line = 1;
</ins><span class="cx">         }
</span><del>-
- session = skinny_profile_find_session(listener->profile, listener, &line_instance, request->data.off_hook.call_id);
-
-        if(session) { /*answering a call */
-                skinny_session_answer(session, listener, line_instance);
</del><ins>+        if(listener->session[line]) { /*answering a call */
+                skinny_answer(listener->session[line]);
</ins><span class="cx">         } else { /* start a new call */
</span><del>-                skinny_create_ingoing_session(listener, &line_instance, &session);
-         tech_pvt = switch_core_session_get_private(session);
-         assert(tech_pvt != NULL);
-
-         skinny_session_process_dest(session, listener, line_instance, NULL, '\0', 0);
</del><ins>+                skinny_create_session(listener, line, SKINNY_KEY_SET_OFF_HOOK);
</ins><span class="cx">         }
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_message_t *request)
</span><span class="cx"> {
</span><ins>+        skinny_profile_t *profile;
</ins><span class="cx">         struct speed_dial_stat_res_message *button = NULL;
</span><del>-        uint32_t line_instance = 0;
-        uint32_t call_id = 0;
-        switch_core_session_t *session = NULL;
</del><ins>+        uint32_t line = 0;
+        private_t *tech_pvt = NULL;
</ins><span class="cx">
</span><del>-        skinny_check_data_length(request, sizeof(request->data.stimulus)-sizeof(request->data.stimulus.call_id));
</del><ins>+        switch_assert(listener->profile);
+        switch_assert(listener->device_name);
</ins><span class="cx">
</span><del>-        if(skinny_check_data_length_soft(request, sizeof(request->data.stimulus))) {
-         call_id = request->data.stimulus.call_id;
-        }
</del><ins>+        profile = listener->profile;
</ins><span class="cx">
</span><ins>+        skinny_check_data_length(request, sizeof(request->data.stimulus));
+
+        if(request->data.stimulus.instance_type == SKINNY_BUTTON_LINE) {/* Choose the specified line */
+                line = request->data.stimulus.instance;
+        }
+        if(line == 0) {/* If none, find the first busy line */
+                for(int i = 0 ; i < SKINNY_MAX_BUTTON_COUNT ; i++) {
+                        if(listener->session[i]) {
+                                line = i;
+                                break;
+                        }
+                }
+        }
+        if(line == 0) {/* If none, choose the first line */
+                line = 1;
+        }
</ins><span class="cx">         switch(request->data.stimulus.instance_type) {
</span><span class="cx">                 case SKINNY_BUTTON_LAST_NUMBER_REDIAL:
</span><del>-                 skinny_create_ingoing_session(listener, &line_instance, &session);
-                        skinny_session_process_dest(session, listener, line_instance, "redial", '\0', 0);
</del><ins>+                        skinny_create_session(listener, line, SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT);
+
+                        tech_pvt = switch_core_session_get_private(listener->session[line]);
+                        assert(tech_pvt != NULL);
+        
+                        strcpy(tech_pvt->dest, "redial");
+                        skinny_process_dest(listener, line);
</ins><span class="cx">                         break;
</span><span class="cx">                 case SKINNY_BUTTON_VOICEMAIL:
</span><del>-                 skinny_create_ingoing_session(listener, &line_instance, &session);
-                        skinny_session_process_dest(session, listener, line_instance, "vmain", '\0', 0);
</del><ins>+                        skinny_create_session(listener, line, SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT);
+        
+                        tech_pvt = switch_core_session_get_private(listener->session[line]);
+                        assert(tech_pvt != NULL);
+                
+                        strcpy(tech_pvt->dest, "vmain");
+                        skinny_process_dest(listener, line);
</ins><span class="cx">                         break;
</span><span class="cx">                 case SKINNY_BUTTON_SPEED_DIAL:
</span><span class="cx">                         skinny_speed_dial_get(listener, request->data.stimulus.instance, &button);
</span><span class="cx">                         if(strlen(button->line) > 0) {
</span><del>-                 skinny_create_ingoing_session(listener, &line_instance, &session);
-                         skinny_session_process_dest(session, listener, line_instance, button->line, '\0', 0);
</del><ins>+                                skinny_create_session(listener, line, SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT);
+
+                                tech_pvt = switch_core_session_get_private(listener->session[line]);
+                                assert(tech_pvt != NULL);
+                
+                                strcpy(tech_pvt->dest, button->line);
+                                skinny_process_dest(listener, line);
</ins><span class="cx">                         }
</span><span class="cx">                         break;
</span><span class="cx">                 default:
</span><span class="lines">@@ -2012,21 +1774,35 @@
</span><span class="cx"> switch_status_t skinny_handle_open_receive_channel_ack_message(listener_t *listener, skinny_message_t *request)
</span><span class="cx"> {
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><del>-        uint32_t line_instance = 0;
-        switch_core_session_t *session;
</del><ins>+        skinny_profile_t *profile;
+        uint32_t line = 0;
</ins><span class="cx">
</span><ins>+        switch_assert(listener->profile);
+        switch_assert(listener->device_name);
+
+        profile = listener->profile;
+
</ins><span class="cx">         skinny_check_data_length(request, sizeof(request->data.open_receive_channel_ack));
</span><span class="cx">
</span><del>- session = skinny_profile_find_session(listener->profile, listener, &line_instance, request->data.open_receive_channel_ack.pass_thru_party_id);
</del><ins>+        for(int i = 0 ; i < SKINNY_MAX_BUTTON_COUNT ; i++) {
+                if(listener->session[i]) {
+                        private_t *tech_pvt = NULL;
+                        tech_pvt = switch_core_session_get_private(listener->session[i]);
+                        
+                        if(tech_pvt->party_id == request->data.open_receive_channel_ack.pass_thru_party_id) {
+                                line = i;
+                        }
+                }
+        }
</ins><span class="cx">
</span><del>-        if(session) {
</del><ins>+        if(listener->session[line]) {
</ins><span class="cx">                 const char *err = NULL;
</span><span class="cx">                 private_t *tech_pvt = NULL;
</span><span class="cx">                 switch_channel_t *channel = NULL;
</span><span class="cx">                 struct in_addr addr;
</span><span class="cx">
</span><del>-                tech_pvt = switch_core_session_get_private(session);
-                channel = switch_core_session_get_channel(session);
</del><ins>+                tech_pvt = switch_core_session_get_private(listener->session[line]);
+                channel = switch_core_session_get_channel(listener->session[line]);
</ins><span class="cx">
</span><span class="cx">                 /* Codec */
</span><span class="cx">                 tech_pvt->iananame = "PCMU"; /* TODO */
</span><span class="lines">@@ -2034,7 +1810,7 @@
</span><span class="cx">                 tech_pvt->rm_rate = 8000; /* TODO */
</span><span class="cx">                 tech_pvt->rm_fmtp = NULL; /* TODO */
</span><span class="cx">                 tech_pvt->agreed_pt = (switch_payload_t) 0; /* TODO */
</span><del>-                tech_pvt->rm_encoding = switch_core_strdup(switch_core_session_get_pool(session), "");
</del><ins>+                tech_pvt->rm_encoding = switch_core_strdup(switch_core_session_get_pool(listener->session[line]), "");
</ins><span class="cx">                 skinny_tech_set_codec(tech_pvt, 0);
</span><span class="cx">                 if ((status = skinny_tech_set_codec(tech_pvt, 0)) != SWITCH_STATUS_SUCCESS) {
</span><span class="cx">                         goto end;
</span><span class="lines">@@ -2045,7 +1821,7 @@
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_CRIT, "No RTP ports available!\n");
</span><span class="cx">                         return SWITCH_STATUS_FALSE;
</span><span class="cx">                 }
</span><del>-                tech_pvt->local_sdp_audio_ip = switch_core_strdup(switch_core_session_get_pool(session), listener->profile->ip);
</del><ins>+                tech_pvt->local_sdp_audio_ip = switch_core_strdup(switch_core_session_get_pool(listener->session[line]), listener->profile->ip);
</ins><span class="cx">
</span><span class="cx">                 tech_pvt->remote_sdp_audio_ip = inet_ntoa(request->data.open_receive_channel_ack.ip);
</span><span class="cx">                 tech_pvt->remote_sdp_audio_port = request->data.open_receive_channel_ack.port;
</span><span class="lines">@@ -2058,7 +1834,7 @@
</span><span class="cx">                                                                                          tech_pvt->read_impl.samples_per_packet,
</span><span class="cx">                                                                                          tech_pvt->codec_ms * 1000,
</span><span class="cx">                                                                                          (switch_rtp_flag_t) 0, "soft", &err,
</span><del>-                                                                                         switch_core_session_get_pool(session));
</del><ins>+                                                                                         switch_core_session_get_pool(listener->session[line]));
</ins><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
</span><span class="cx">                                                  "AUDIO RTP [%s] %s:%d->%s:%d codec: %u ms: %d [%s]\n",
</span><span class="cx">                                                  switch_channel_get_name(channel),
</span><span class="lines">@@ -2082,12 +1858,7 @@
</span><span class="cx">                         0, /* uint16_t max_frames_per_packet, */
</span><span class="cx">                         0 /* uint32_t g723_bitrate */
</span><span class="cx">                 );
</span><del>-         if (switch_channel_get_state(channel) == CS_NEW) {
-                 switch_channel_set_state(channel, CS_INIT);
-         }
</del><span class="cx">                 switch_channel_mark_answered(channel);
</span><del>-                
-                switch_core_session_rwunlock(session);
</del><span class="cx">         }
</span><span class="cx"> end:
</span><span class="cx">         return status;
</span><span class="lines">@@ -2095,28 +1866,35 @@
</span><span class="cx">
</span><span class="cx"> switch_status_t skinny_handle_keypad_button_message(listener_t *listener, skinny_message_t *request)
</span><span class="cx"> {
</span><del>-        uint32_t line_instance = 0;
-        switch_core_session_t *session;
</del><ins>+        uint32_t line = 0;
</ins><span class="cx">
</span><span class="cx">         skinny_check_data_length(request, sizeof(request->data.keypad_button));
</span><del>-
- if(request->data.keypad_button.line_instance) {
- line_instance = request->data.keypad_button.line_instance;
- } else {
- line_instance = 1;
- }
</del><span class="cx">
</span><del>- session = skinny_profile_find_session(listener->profile, listener, &line_instance, request->data.keypad_button.call_id);
-
-        if(session) {
</del><ins>+        /* Choose the specified line */
+        line = request->data.keypad_button.line_instance;
+        if(line == 0) {/* If none, find the first busy line */
+                for(int i = 0 ; i < SKINNY_MAX_BUTTON_COUNT ; i++) {
+                        if(listener->session[i]) {
+                                line = i;
+                                break;
+                        }
+                }
+        }
+        if(line == 0) {/* If none, choose the first line */
+                line = 1;
+        }
+        if(listener->session[line]) {
</ins><span class="cx">                 switch_channel_t *channel = NULL;
</span><span class="cx">                 private_t *tech_pvt = NULL;
</span><span class="cx">                 char digit = '\0';
</span><span class="cx">
</span><del>-                channel = switch_core_session_get_channel(session);
-                tech_pvt = switch_core_session_get_private(session);
</del><ins>+                channel = switch_core_session_get_channel(listener->session[line]);
+                assert(channel != NULL);
+
+                tech_pvt = switch_core_session_get_private(listener->session[line]);
+                assert(tech_pvt != NULL);
</ins><span class="cx">                 
</span><del>-                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "SEND DTMF ON CALL %d [%d]\n", tech_pvt->call_id, request->data.keypad_button.button);
</del><ins>+                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(listener->session[line]), SWITCH_LOG_DEBUG, "SEND DTMF ON CALL %d [%d]\n", tech_pvt->call_id, request->data.keypad_button.button);
</ins><span class="cx">
</span><span class="cx">                 if (request->data.keypad_button.button == 14) {
</span><span class="cx">                         digit = '*';
</span><span class="lines">@@ -2125,14 +1903,21 @@
</span><span class="cx">                 } else if (request->data.keypad_button.button >= 0 && request->data.keypad_button.button <= 9) {
</span><span class="cx">                         digit = '0' + request->data.keypad_button.button;
</span><span class="cx">                 } else {
</span><del>-                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_WARNING, "UNKNOW DTMF RECEIVED ON CALL %d [%d]\n", tech_pvt->call_id, request->data.keypad_button.button);
</del><ins>+                        switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(listener->session[line]), SWITCH_LOG_WARNING, "UNKNOW DTMF RECEIVED ON CALL %d [%d]\n", tech_pvt->call_id, request->data.keypad_button.button);
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 /* TODO check call_id and line */
</span><span class="cx">
</span><del>-                if((skinny_line_get_state(listener, line_instance, tech_pvt->call_id) == SKINNY_OFF_HOOK)) {
</del><ins>+                if((skinny_line_get_state(listener, tech_pvt->line) == SKINNY_KEY_SET_OFF_HOOK)
+                                || (skinny_line_get_state(listener, tech_pvt->line) == SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT)) {
+                        if(strlen(tech_pvt->dest) == 0) {/* first digit */
+                                stop_tone(listener, tech_pvt->line, tech_pvt->call_id);
+                                skinny_line_set_state(listener, tech_pvt->line, SKINNY_KEY_SET_DIGITS_AFTER_DIALING_FIRST_DIGIT, tech_pvt->call_id);
+                        }
</ins><span class="cx">                         
</span><del>-                 skinny_session_process_dest(session, listener, line_instance, NULL, digit, 0);
</del><ins>+                        tech_pvt->dest[strlen(tech_pvt->dest)] = digit;
+                        
+                        skinny_process_dest(listener, tech_pvt->line);
</ins><span class="cx">                 } else {
</span><span class="cx">                         if(digit != '\0') {
</span><span class="cx">                                 switch_dtmf_t dtmf = { 0, switch_core_default_dtmf_duration(0)};
</span><span class="lines">@@ -2140,7 +1925,6 @@
</span><span class="cx">                                 switch_channel_queue_dtmf(channel, &dtmf);
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><del>-         switch_core_session_rwunlock(session);
</del><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         return SWITCH_STATUS_SUCCESS;
</span><span class="lines">@@ -2149,23 +1933,35 @@
</span><span class="cx"> switch_status_t skinny_handle_on_hook_message(listener_t *listener, skinny_message_t *request)
</span><span class="cx"> {
</span><span class="cx">         switch_status_t status = SWITCH_STATUS_SUCCESS;
</span><del>-        switch_core_session_t *session = NULL;
-        uint32_t line_instance = 0;
</del><ins>+        skinny_profile_t *profile;
+        uint32_t line = 0;
</ins><span class="cx">
</span><ins>+        switch_assert(listener->profile);
+        switch_assert(listener->device_name);
+
+        profile = listener->profile;
+
</ins><span class="cx">         skinny_check_data_length(request, sizeof(request->data.on_hook));
</span><span class="cx">
</span><del>- line_instance = request->data.on_hook.line_instance;
-
- session = skinny_profile_find_session(listener->profile, listener, &line_instance, request->data.on_hook.call_id);
</del><ins>+        if(request->data.on_hook.line_instance != 0) {
+                line = request->data.on_hook.line_instance;
+        } else {
+                /* Find first active line */
+                for(int i = 0 ; i < SKINNY_MAX_BUTTON_COUNT ; i++) {
+                        if(listener->session[i]) {
+                                line = i;
+                                break;
+                        }
+                }
+        }
</ins><span class="cx">
</span><del>-        if(session) {
</del><ins>+        if(listener->session[line]) {
</ins><span class="cx">                 switch_channel_t *channel = NULL;
</span><span class="cx">
</span><del>-                channel = switch_core_session_get_channel(session);
</del><ins>+                channel = switch_core_session_get_channel(listener->session[line]);
+                assert(channel != NULL);
</ins><span class="cx">
</span><span class="cx">                 switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
</span><del>-                
-                switch_core_session_rwunlock(session);
</del><span class="cx">         }
</span><span class="cx">         return status;
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skinnyskinny_protocolh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_protocol.h (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_protocol.h        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_protocol.h        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -59,9 +59,6 @@
</span><span class="cx">
</span><span class="cx"> /* PortMessage */
</span><span class="cx"> #define PORT_MESSAGE 0x0002
</span><del>-struct port_message {
-        uint16_t port;
-};
</del><span class="cx">
</span><span class="cx"> /* KeypadButtonMessage */
</span><span class="cx"> #define KEYPAD_BUTTON_MESSAGE 0x0003
</span><span class="lines">@@ -76,14 +73,14 @@
</span><span class="cx"> struct stimulus_message {
</span><span class="cx">         uint32_t instance_type; /* See enum skinny_button_definition */
</span><span class="cx">         uint32_t instance;
</span><del>-        uint32_t call_id;
</del><ins>+        /* uint32_t call_reference; */
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> /* OffHookMessage */
</span><span class="cx"> #define OFF_HOOK_MESSAGE 0x0006
</span><span class="cx"> struct off_hook_message {
</span><span class="cx">         uint32_t line_instance;
</span><del>-        uint32_t call_id;
</del><ins>+        /* uint32_t call_id; */
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> /* OnHookMessage */
</span><span class="lines">@@ -153,7 +150,7 @@
</span><span class="cx"> struct soft_key_event_message {
</span><span class="cx">         uint32_t event;
</span><span class="cx">         uint32_t line_instance;
</span><del>-        uint32_t call_id;
</del><ins>+        uint32_t callreference;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> /* UnregisterMessage */
</span><span class="lines">@@ -189,10 +186,10 @@
</span><span class="cx"> /* RegisterAckMessage */
</span><span class="cx"> #define REGISTER_ACK_MESSAGE 0x0081
</span><span class="cx"> struct register_ack_message {
</span><del>-        uint32_t keep_alive;
-        char date_format[6];
</del><ins>+        uint32_t keepAlive;
+        char dateFormat[6];
</ins><span class="cx">         char reserved[2];
</span><del>-        uint32_t secondary_keep_alive;
</del><ins>+        uint32_t secondaryKeepAlive;
</ins><span class="cx">         char reserved2[4];
</span><span class="cx"> };
</span><span class="cx">
</span><span class="lines">@@ -217,8 +214,7 @@
</span><span class="cx"> struct set_ringer_message {
</span><span class="cx">         uint32_t ring_type; /* See enum skinny_ring_type */
</span><span class="cx">         uint32_t ring_mode; /* See enum skinny_ring_mode */
</span><del>-        uint32_t line_instance;
-        uint32_t call_id;
</del><ins>+        uint32_t unknown; /* ?? */
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> /* SetLampMessage */
</span><span class="lines">@@ -474,14 +470,6 @@
</span><span class="cx">         uint32_t status;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-/* DisplayPriNotifyMessage */
-#define DISPLAY_PRI_NOTIFY_MESSAGE 0x0120
-struct display_pri_notify_message {
-        uint32_t message_timeout;
-        uint32_t priority;
-        char notify[32];
-};
-
</del><span class="cx"> /* ServiceUrlStatMessage */
</span><span class="cx"> #define SERVICE_URL_STAT_RES_MESSAGE 0x012F
</span><span class="cx"> struct service_url_stat_res_message {
</span><span class="lines">@@ -499,7 +487,6 @@
</span><span class="cx">
</span><span class="cx"> union skinny_data {
</span><span class="cx">         struct register_message reg;
</span><del>-        struct port_message port;
</del><span class="cx">         struct keypad_button_message keypad_button;
</span><span class="cx">         struct stimulus_message stimulus;
</span><span class="cx">         struct off_hook_message off_hook;
</span><span class="lines">@@ -542,7 +529,6 @@
</span><span class="cx">         struct unregister_ack_message unregister_ack;
</span><span class="cx">         struct dialed_number_message dialed_number;
</span><span class="cx">         struct feature_stat_res_message feature_res;
</span><del>-        struct display_pri_notify_message display_pri_notify;
</del><span class="cx">         struct service_url_stat_res_message service_url_res;
</span><span class="cx">         
</span><span class="cx">         uint16_t as_uint16;
</span><span class="lines">@@ -612,24 +598,16 @@
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Received Too Short Skinny Message (Expected %" SWITCH_SIZE_T_FMT ", got %d).\n", len+4, message->length);\
</span><span class="cx">                 return SWITCH_STATUS_FALSE;\
</span><span class="cx">         }
</span><del>-#define skinny_check_data_length_soft(message, len) \
- (message->length >= len+4)
</del><span class="cx">
</span><span class="cx"> switch_status_t skinny_read_packet(listener_t *listener, skinny_message_t **req);
</span><span class="cx">
</span><span class="cx"> switch_status_t skinny_device_event(listener_t *listener, switch_event_t **ev, switch_event_types_t event_id, const char *subclass_name);
</span><span class="cx">
</span><del>-switch_status_t skinny_send_call_info(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
-switch_status_t skinny_session_walk_lines(skinny_profile_t *profile, char *channel_uuid, switch_core_db_callback_func_t callback, void *data);
-switch_call_cause_t skinny_ring_lines(private_t *tech_pvt);
</del><ins>+switch_status_t skinny_send_call_info(switch_core_session_t *session);
</ins><span class="cx">
</span><del>-switch_status_t skinny_create_ingoing_session(listener_t *listener, uint32_t *line_instance, switch_core_session_t **session);
-switch_status_t skinny_session_process_dest(switch_core_session_t *session, listener_t *listener, uint32_t line_instance, char *dest, char append_dest, uint32_t backspace);
-switch_status_t skinny_session_ring_out(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
-switch_status_t skinny_session_answer(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
-switch_status_t skinny_session_start_media(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
-switch_status_t skinny_session_hold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
-switch_status_t skinny_session_unhold_line(switch_core_session_t *session, listener_t *listener, uint32_t line_instance);
</del><ins>+switch_status_t skinny_create_session(listener_t *listener, uint32_t line, uint32_t to_state);
+switch_status_t skinny_process_dest(listener_t *listener, uint32_t line);
+switch_status_t skinny_answer(switch_core_session_t *session);
</ins><span class="cx">
</span><span class="cx"> void skinny_line_get(listener_t *listener, uint32_t instance, struct line_stat_res_message **button);
</span><span class="cx"> void skinny_speed_dial_get(listener_t *listener, uint32_t instance, struct speed_dial_stat_res_message **button);
</span><span class="lines">@@ -653,8 +631,7 @@
</span><span class="cx"> switch_status_t set_ringer(listener_t *listener,
</span><span class="cx">         uint32_t ring_type,
</span><span class="cx">         uint32_t ring_mode,
</span><del>-        uint32_t line_instance,
-        uint32_t call_id);
</del><ins>+        uint32_t unknown);
</ins><span class="cx"> switch_status_t set_lamp(listener_t *listener,
</span><span class="cx">         uint32_t stimulus,
</span><span class="cx">         uint32_t stimulus_instance,
</span><span class="lines">@@ -733,10 +710,6 @@
</span><span class="cx">         char called_party[24],
</span><span class="cx">         uint32_t line_instance,
</span><span class="cx">         uint32_t call_id);
</span><del>-switch_status_t send_display_pri_notify(listener_t *listener,
-        uint32_t message_timeout,
-        uint32_t priority,
-        char *notify);
</del><span class="cx"> switch_status_t send_reset(listener_t *listener,
</span><span class="cx">         uint32_t reset_type);
</span><span class="cx">
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skinnyskinny_tablesc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_tables.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_tables.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_tables.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx">         {"ResetMessage", RESET_MESSAGE},
</span><span class="cx">         {"KeepAliveAckMessage", KEEP_ALIVE_ACK_MESSAGE},
</span><span class="cx">         {"OpenReceiveChannelMessage", OPEN_RECEIVE_CHANNEL_MESSAGE},
</span><del>-        {"CloseReceiveChannelMessage", CLOSE_RECEIVE_CHANNEL_MESSAGE},
</del><ins>+        {"OCloseReceiveChannelMessage", CLOSE_RECEIVE_CHANNEL_MESSAGE},
</ins><span class="cx">         {"SoftKeyTemplateResMessage", SOFT_KEY_TEMPLATE_RES_MESSAGE},
</span><span class="cx">         {"SoftKeySetResMessage", SOFT_KEY_SET_RES_MESSAGE},
</span><span class="cx">         {"SelectSoftKeysMessage", SELECT_SOFT_KEYS_MESSAGE},
</span><span class="lines">@@ -88,7 +88,6 @@
</span><span class="cx">         {"UnregisterAckMessage", UNREGISTER_ACK_MESSAGE},
</span><span class="cx">         {"DialedNumberMessage", DIALED_NUMBER_MESSAGE},
</span><span class="cx">         {"FeatureResMessage", FEATURE_STAT_RES_MESSAGE},
</span><del>-        {"DisplayPriNotifyMessage", DISPLAY_PRI_NOTIFY_MESSAGE},
</del><span class="cx">         {"ServiceUrlStatMessage", SERVICE_URL_STAT_RES_MESSAGE},
</span><span class="cx">         {NULL, 0}
</span><span class="cx"> };
</span><span class="lines">@@ -169,13 +168,13 @@
</span><span class="cx">         {"RingIn", SKINNY_RING_IN},
</span><span class="cx">         {"Connected", SKINNY_CONNECTED},
</span><span class="cx">         {"Busy", SKINNY_BUSY},
</span><del>-        {"LineInUse", SKINNY_LINE_IN_USE},
</del><ins>+        {"Congestion", SKINNY_CONGESTION},
</ins><span class="cx">         {"Hold", SKINNY_HOLD},
</span><span class="cx">         {"CallWaiting", SKINNY_CALL_WAITING},
</span><span class="cx">         {"CallTransfer", SKINNY_CALL_TRANSFER},
</span><span class="cx">         {"CallPark", SKINNY_CALL_PARK},
</span><span class="cx">         {"Proceed", SKINNY_PROCEED},
</span><del>-        {"InUseRemotely", SKINNY_IN_USE_REMOTELY},
</del><ins>+        {"CallRemoteMultiline", SKINNY_CALL_REMOTE_MULTILINE},
</ins><span class="cx">         {"InvalidNumber", SKINNY_INVALID_NUMBER},
</span><span class="cx">         {NULL, 0}
</span><span class="cx"> };
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skinnyskinny_tablesh"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_tables.h (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_tables.h        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_skinny/skinny_tables.h        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -84,7 +84,7 @@
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">
</span><del>-struct skinny_table SKINNY_MESSAGE_TYPES[56];
</del><ins>+struct skinny_table SKINNY_MESSAGE_TYPES[55];
</ins><span class="cx"> const char *skinny_message_type2str(uint32_t id);
</span><span class="cx"> uint32_t skinny_str2message_type(const char *str);
</span><span class="cx"> #define SKINNY_PUSH_MESSAGE_TYPES SKINNY_DECLARE_PUSH_MATCH(SKINNY_MESSAGE_TYPES)
</span><span class="lines">@@ -210,13 +210,13 @@
</span><span class="cx">         SKINNY_RING_IN = 4,
</span><span class="cx">         SKINNY_CONNECTED = 5,
</span><span class="cx">         SKINNY_BUSY = 6,
</span><del>-        SKINNY_LINE_IN_USE = 7,
</del><ins>+        SKINNY_CONGESTION = 7,
</ins><span class="cx">         SKINNY_HOLD = 8,
</span><span class="cx">         SKINNY_CALL_WAITING = 9,
</span><span class="cx">         SKINNY_CALL_TRANSFER = 10,
</span><span class="cx">         SKINNY_CALL_PARK = 11,
</span><span class="cx">         SKINNY_PROCEED = 12,
</span><del>-        SKINNY_IN_USE_REMOTELY = 13,
</del><ins>+        SKINNY_CALL_REMOTE_MULTILINE = 13,
</ins><span class="cx">         SKINNY_INVALID_NUMBER = 14
</span><span class="cx"> };
</span><span class="cx"> struct skinny_table SKINNY_CALL_STATES[15];
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skypopenmod_skypopenc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skypopen/mod_skypopen.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skypopen/mod_skypopen.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypopen/mod_skypopen.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -1191,7 +1191,6 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        tech_pvt->skypopen_signaling_thread=NULL;
</del><span class="cx">         DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
</span><span class="cx">         return NULL;
</span><span class="cx"> }
</span><span class="lines">@@ -1704,8 +1703,6 @@
</span><span class="cx">                                 switch_file_write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", &howmany);        // let's the controldev_thread die
</span><span class="cx">
</span><span class="cx"> #else /* WIN32 */
</span><del>-                                skypopen_signaling_write(tech_pvt, "DIE");
-                                switch_sleep(10000);
</del><span class="cx">                                 howmany = write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", howmany);
</span><span class="cx"> #endif /* WIN32 */
</span><span class="cx">                         }
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_skypopenskypopen_protocolc"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_skypopen/skypopen_protocol.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_skypopen/skypopen_protocol.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypopen/skypopen_protocol.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -584,7 +584,6 @@
</span><span class="cx">                                                 skypopen_sleep(1000);
</span><span class="cx">                                                 sprintf(msg_to_skype, "ALTER CALL %s SET_INPUT PORT=\"%d\"", id, tech_pvt->tcp_cli_port);
</span><span class="cx">                                                 skypopen_signaling_write(tech_pvt, msg_to_skype);
</span><del>-                                                skypopen_sleep(1000);
</del><span class="cx">                                                 sprintf(msg_to_skype, "#output ALTER CALL %s SET_OUTPUT PORT=\"%d\"", id, tech_pvt->tcp_srv_port);
</span><span class="cx">                                                 skypopen_signaling_write(tech_pvt, msg_to_skype);
</span><span class="cx">
</span><span class="lines">@@ -1409,7 +1408,6 @@
</span><span class="cx">                         win32_DeInitialize_DestroyWindowClass(tech_pvt);
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        tech_pvt->skypopen_api_thread=NULL;
</del><span class="cx">         DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
</span><span class="cx">         return NULL;
</span><span class="cx"> }
</span><span class="lines">@@ -1709,9 +1707,8 @@
</span><span class="cx">         } else {
</span><span class="cx">                 ERRORA("Skype is not running, maybe crashed. Please run/restart Skype and relaunch Skypopen\n", SKYPOPEN_P_LOG);
</span><span class="cx">                 running = 0;
</span><ins>+                return NULL;
</ins><span class="cx">         }
</span><del>-        tech_pvt->skypopen_api_thread=NULL;
-        NOTICA("EXITING\n", SKYPOPEN_P_LOG);
</del><span class="cx">         return NULL;
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiamod_sofiac"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -2604,17 +2604,12 @@
</span><span class="cx">                         goto done;
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if (!strcasecmp(argv[2], "_all_")) {
-                        sofia_glue_del_every_gateway(profile);
-                        stream->write_function(stream, "+OK every gateway marked for deletion.\n");
</del><ins>+                if ((gateway_ptr = sofia_reg_find_gateway(argv[2]))) {
+                        sofia_glue_del_gateway(gateway_ptr);
+                        sofia_reg_release_gateway(gateway_ptr);
+                        stream->write_function(stream, "+OK gateway marked for deletion.\n");
</ins><span class="cx">                 } else {
</span><del>-                        if ((gateway_ptr = sofia_reg_find_gateway(argv[2]))) {
-                                sofia_glue_del_gateway(gateway_ptr);
-                                sofia_reg_release_gateway(gateway_ptr);
-                                stream->write_function(stream, "+OK gateway marked for deletion.\n");
-                        } else {
-                                stream->write_function(stream, "-ERR no such gateway.\n");
-                        }
</del><ins>+                        stream->write_function(stream, "-ERR no such gateway.\n");
</ins><span class="cx">                 }
</span><span class="cx">
</span><span class="cx">                 goto done;
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiamod_sofiah"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -915,7 +915,6 @@
</span><span class="cx"> const char *sofia_glue_strip_proto(const char *uri);
</span><span class="cx"> switch_status_t reconfig_sofia(sofia_profile_t *profile);
</span><span class="cx"> void sofia_glue_del_gateway(sofia_gateway_t *gp);
</span><del>-void sofia_glue_del_every_gateway(sofia_profile_t *profile);
</del><span class="cx"> void sofia_reg_send_reboot(sofia_profile_t *profile, const char *user, const char *host, const char *contact, const char *user_agent,
</span><span class="cx">                                                  const char *network_ip);
</span><span class="cx"> void sofia_glue_restart_all_profiles(void);
</span></span></pre></div>
<a id="freeswitchtrunksrcmodendpointsmod_sofiasofia_gluec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -3932,19 +3932,6 @@
</span><span class="cx">         return status;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
-void sofia_glue_del_every_gateway(sofia_profile_t *profile)
-{
-        sofia_gateway_t *gp = NULL;
-
-        switch_mutex_lock(mod_sofia_globals.hash_mutex);
-        for (gp = profile->gateways; gp; gp = gp->next) {
-                sofia_glue_del_gateway(gp);
-        }
-        switch_mutex_unlock(mod_sofia_globals.hash_mutex);
-}
-
-
</del><span class="cx"> void sofia_glue_del_gateway(sofia_gateway_t *gp)
</span><span class="cx"> {
</span><span class="cx">         if (!gp->deleted) {
</span></span></pre></div>
<a id="freeswitchtrunksrcswitch_timec"></a>
<div class="modfile"><h4>Modified: freeswitch/trunk/src/switch_time.c (17154 => 17155)</h4>
<pre class="diff"><span>
<span class="info">--- freeswitch/trunk/src/switch_time.c        2010-04-01 17:22:02 UTC (rev 17154)
+++ freeswitch/trunk/src/switch_time.c        2010-04-01 18:07:31 UTC (rev 17155)
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx">         if (res > 1500) {
</span><span class="cx">                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
</span><span class="cx">                                                  "Timer resolution of %ld microseconds detected!\n"
</span><del>-                                                 "Do you have your kernel timer frequency set to lower than 1,000Hz? You may experience audio problems.\n", ts.tv_nsec / 1000);
</del><ins>+                                                 "Do you have your kernel timer set to higher than 1 kHz? You may experience audio problems.\n", ts.tv_nsec / 1000);
</ins><span class="cx">                 do_sleep(5000000);
</span><span class="cx">                 switch_time_set_cond_yield(SWITCH_TRUE);
</span><span class="cx">                 return;
</span><span class="lines">@@ -226,7 +226,7 @@
</span><span class="cx">                 if (diff > 1500) {
</span><span class="cx">                         switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,
</span><span class="cx">                                                          "Abnormally large timer gap %d detected!\n"
</span><del>-                                                         "Do you have your kernel timer frequency set to lower than 1,000Hz? You may experience audio problems.\n", diff);
</del><ins>+                                                         "Do you have your kernel timer set to higher than 1 kHz? You may experience audio problems.\n", diff);
</ins><span class="cx">                         do_sleep(5000000);
</span><span class="cx">                         switch_time_set_cond_yield(SWITCH_TRUE);
</span><span class="cx">                         return;
</span></span></pre>
</div>
</div>
<div id="footer">See you at ClueCon</div>
</body>
</html>