[Freeswitch-branches] [commit] r11125 - in freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax: . configs

FreeSWITCH SVN gmaruzz at freeswitch.org
Sun Jan 11 08:36:09 PST 2009


Author: gmaruzz
Date: Sun Jan 11 10:36:09 2009
New Revision: 11125

Log:
skypiax: various configuration tweakings, both in the code and in the config files

Removed:
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/public.xml
Modified:
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/default.xml
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/skypiax.conf.xml
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/startskype.bat
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/wait.bat
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/default.xml
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/default.xml	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/default.xml	Sun Jan 11 10:36:09 2009
@@ -267,13 +267,13 @@
     <!-- dial via skypiax -->
     <extension name="skypiax">
       <condition field="destination_number" expression="^2908$">
-	<action application="bridge" data="skypiax/skypiax19/echo123"/>
+	<action application="bridge" data="skypiax/skypiax1/echo123"/>
       </condition>
     </extension>
     <!-- dial via SKYPE uri -->
     <extension name="skype_uri">
       <condition field="destination_number" expression="^skype/(.*)$">
-	<action application="bridge" data="skypiax/skypiax11/$1"/>
+	<action application="bridge" data="skypiax/skypiax1/$1"/>
       </condition>
     </extension>
 

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/skypiax.conf.xml
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/skypiax.conf.xml	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/skypiax.conf.xml	Sun Jan 11 10:36:09 2009
@@ -1,11 +1,10 @@
 <configuration name="skypiax.conf" description="Skypiax Configuration">
   <global_settings>
     <param name="debug" value="8"/>
-    <param name="port" value="4569"/>
-    <param name="ip" value="127.0.0.1"/>
     <param name="codec-master" value="us"/>
     <param name="dialplan" value="XML"/>
-    <param name="context" value="public"/>
+    <param name="context" value="default"/>
+    <param name="destination" value="5000"/>
     <param name="codec-prefs" value="gsm,ulaw"/>
     <param name="codec-rates" value="8000,16000"/>
     <param name="hold-music" value="$${moh_uri}"/>
@@ -15,280 +14,197 @@
     <interface id="1" name="skypiax1">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skype_password" value="xxxx"/>
     </interface>
     <interface id="2" name="skypiax2">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax2"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
-
     <interface id="3" name="skypiax3">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax3"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="4" name="skypiax4">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax4"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="5" name="skypiax5">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax5"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
     <interface id="6" name="skypiax6">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax6"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
     <interface id="7" name="skypiax7">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax7"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="8" name="skypiax8">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax8"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="9" name="skypiax9">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax9"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="10" name="skypiax10">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax10"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="11" name="skypiax11">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax11"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="12" name="skypiax12">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax12"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="13" name="skypiax13">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax13"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="14" name="skypiax14">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax14"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="15" name="skypiax15">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax15"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="16" name="skypiax16">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax16"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="17" name="skypiax17">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax17"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="18" name="skypiax18">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax18"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="19" name="skypiax19">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax19"/>
-	<param name="skype_password" value="xxxx"/>
     </interface>
 
     <interface id="20" name="skypiax20">
 	<param name="hold-music" value="$${moh_uri}"/>
 	<param name="dialplan" value="XML"/>
-	<param name="context" value="public"/>
+	<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="skypiax20"/>
-	<param name="skype_password" value="xxxx"/>
-    </interface>
-
-
-
-	<!-- following has no id, error! -->
-    <interface>
-      <param name="hold-music" value="$${moh_uri}"/>
-      <param name="tonegroup" value="us"/>
-      <param name="digit-timeout" value="2000"/>
-      <param name="max-digits" value="11"/>
-      <param name="dialplan" value="XML"/>
-      <param name="context" value="public"/>
-      <param name="enable-callerid" value="true"/>
-	  <param name="dial-regex" value="9996"/> 
-	  <param name="dial-regex-fail" value="9996"/>
-	  <param name="X11-display" value=":991"/>
-    </interface>
-    <interface id="55" name="cucu">
-      <param name="hold-music" value="$${moh_uri}"/>
-      <param name="tonegroup" value="us"/>
-      <param name="digit-timeout" value="2000"/>
-      <param name="max-digits" value="11"/>
-      <param name="dialplan" value="XML"/>
-      <param name="context" value="public"/>
-      <param name="enable-callerid" value="true"/>
-	  <param name="dial-regex" value="9996"/> 
-	  <param name="dial-regex-fail" value="9996"/>
-    </interface>
-    <interface id="55c" name="cucu">
-      <param name="hold-music" value="$${moh_uri}"/>
-      <param name="tonegroup" value="us"/>
-      <param name="digit-timeout" value="2000"/>
-      <param name="max-digits" value="11"/>
-      <param name="dialplan" value="XML"/>
-      <param name="context" value="public"/>
-      <param name="enable-callerid" value="true"/>
-	  <param name="dial-regex" value="9996"/> 
-	  <param name="dial-regex-fail" value="9996"/>
-	  <param name="X11-display" value=":991"/>
-    </interface>
-    <interface id="73">
-      <param name="hold-music" value="$${moh_uri}"/>
-      <param name="tonegroup" value="us"/>
-      <param name="digit-timeout" value="2000"/>
-      <param name="max-digits" value="11"/>
-      <param name="dialplan" value="XML"/>
-      <param name="context" value="public"/>
-      <param name="enable-callerid" value="true"/>
-	  <param name="dial-regex" value="9996"/> 
-	  <param name="dial-regex-fail" value="9996"/>
-	  <param name="X11-display" value=":991"/>
-    </interface>
-    <interface id="3">
-      <param name="hold-music" value="$${moh_uri}"/>
-      <param name="tonegroup" value="us"/>
-      <param name="digit-timeout" value="2000"/>
-      <param name="max-digits" value="11"/>
-      <param name="dialplan" value="XML"/>
-      <param name="context" value="public"/>
-      <param name="enable-callerid" value="true"/>
-	  <param name="dial-regex" value="9996"/> 
-	  <param name="dial-regex-fail" value="9996"/>
     </interface>
   </per_interface_settings>
 </configuration>

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/startskype.bat
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/startskype.bat	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/startskype.bat	Sun Jan 11 10:36:09 2009
@@ -1,45 +1,46 @@
 echo off
-REM you have to adjust MYPATH to where the Skype executable is
-set MYPATH=%PATH%;C:\Program Files\Skype\Phone
+REM you have to adjust PATH to where the Skype executable is
+set PATH=%PATH%;C:\Program Files\Skype\Phone\
 
-echo %MYPATH%
+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 skypiax1 the username
 start Skype.exe /secondary /username:skypiax1 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax2 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax3 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax4 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax5 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax6 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax7 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax8 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax9 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax10 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax11 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax12 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax13 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax14 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax15 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax16 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax17 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax18 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax19 /password:xxx
-call wait 5
+call wait 7
 start Skype.exe /secondary /username:skypiax20 /password:xxx

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/wait.bat
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/wait.bat	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/configs/wait.bat	Sun Jan 11 10:36:09 2009
@@ -1,4 +1,3 @@
-echo off
 @ping 127.0.0.1 -n 2 -w 1000 > nul
 @ping 127.0.0.1 -n %1% -w 1000> nul
 

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/mod_skypiax.c	Sun Jan 11 10:36:09 2009
@@ -9,6 +9,8 @@
   char *ip;
   int port;
   char *dialplan;
+  char *destination;
+  char *context;
   char *codec_string;
   char *codec_order[SWITCH_MAX_CODECS];
   int codec_order_last;
@@ -29,10 +31,11 @@
 int running = 1;
 
 SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_dialplan, globals.dialplan);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_context, globals.context);
+SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_destination, globals.destination);
 SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_string, globals.codec_string);
 SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_codec_rates_string,
                                   globals.codec_rates_string);
-SWITCH_DECLARE_GLOBAL_STRING_FUNC(set_global_ip, globals.ip);
 
 static switch_status_t channel_on_init(switch_core_session_t * session);
 static switch_status_t channel_on_hangup(switch_core_session_t * session);
@@ -624,9 +627,6 @@
       } else if (!strcmp(var, "port")) {
         globals.port = atoi(val);
         DEBUGA_SKYPE("globals.port=%d\n", SKYPIAX_P_LOG, globals.port);
-      } else if (!strcmp(var, "ip")) {
-        set_global_ip(val);
-        DEBUGA_SKYPE("globals.ip=%s\n", SKYPIAX_P_LOG, globals.ip);
       } else if (!strcmp(var, "codec-master")) {
         if (!strcasecmp(val, "us")) {
           switch_set_flag(&globals, GFLAG_MY_CODEC_PREFS);
@@ -635,6 +635,12 @@
       } else if (!strcmp(var, "dialplan")) {
         set_global_dialplan(val);
         DEBUGA_SKYPE("globals.dialplan=%s\n", SKYPIAX_P_LOG, globals.dialplan);
+      } else if (!strcmp(var, "destination")) {
+        set_global_destination(val);
+        DEBUGA_SKYPE("globals.destination=%s\n", SKYPIAX_P_LOG, globals.destination);
+      } else if (!strcmp(var, "context")) {
+        set_global_context(val);
+        DEBUGA_SKYPE("globals.context=%s\n", SKYPIAX_P_LOG, globals.context);
       } else if (!strcmp(var, "codec-prefs")) {
         set_global_codec_string(val);
         DEBUGA_SKYPE("globals.codec_string=%s\n", SKYPIAX_P_LOG, globals.codec_string);
@@ -662,6 +668,7 @@
       char *name = (char *) switch_xml_attr(myinterface, "name");
       char *context = "default";
       char *dialplan = "XML";
+      char *destination = "5000";
       char *tonegroup = NULL;
       char *digit_timeout = NULL;
       char *max_digits = NULL;
@@ -674,7 +681,6 @@
       char *tcp_cli_port = NULL;
       char *tcp_srv_port = NULL;
       char *skype_user = NULL;
-      char *skype_password = NULL;
 
       uint32_t interface_id = 0, to = 0, max = 0;
 
@@ -690,6 +696,8 @@
           context = val;
         } else if (!strcasecmp(var, "dialplan")) {
           dialplan = val;
+        } else if (!strcasecmp(var, "destination")) {
+          destination = val;
         } else if (!strcasecmp(var, "dial-regex")) {
           dial_regex = val;
         } else if (!strcasecmp(var, "enable-callerid")) {
@@ -700,8 +708,6 @@
           hold_music = val;
         } else if (!strcasecmp(var, "skype_user")) {
           skype_user = val;
-        } else if (!strcasecmp(var, "skype_password")) {
-          skype_password = val;
         } else if (!strcasecmp(var, "tcp_cli_port")) {
           tcp_cli_port = val;
         } else if (!strcasecmp(var, "tcp_srv_port")) {
@@ -720,10 +726,6 @@
         continue;
       }
 
-      if (!skype_password) {
-        ERRORA("interface missing REQUIRED param 'skype_password'\n", SKYPIAX_P_LOG);
-        continue;
-      }
       if (!X11_display) {
         ERRORA("interface missing REQUIRED param 'X11_display'\n", SKYPIAX_P_LOG);
         continue;
@@ -804,10 +806,10 @@
                           X11_display);
         switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].skype_user,
                           skype_user);
-        switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].skype_password,
-                          skype_password);
         switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
         switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].dialplan, dialplan);
+        switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].destination, destination);
+        switch_set_string(globals.SKYPIAX_INTERFACES[interface_id].context, context);
 
         DEBUGA_SKYPE
           ("interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].X11_display=%s\n",
@@ -818,10 +820,6 @@
            SKYPIAX_P_LOG, interface_id,
            globals.SKYPIAX_INTERFACES[interface_id].skype_user);
         DEBUGA_SKYPE
-          ("interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].skype_password=%s\n",
-           SKYPIAX_P_LOG, interface_id,
-           globals.SKYPIAX_INTERFACES[interface_id].skype_password);
-        DEBUGA_SKYPE
           ("interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].tcp_cli_port=%d\n",
            SKYPIAX_P_LOG, interface_id,
            globals.SKYPIAX_INTERFACES[interface_id].tcp_cli_port);
@@ -839,6 +837,14 @@
           ("interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].dialplan=%s\n",
            SKYPIAX_P_LOG, interface_id,
            globals.SKYPIAX_INTERFACES[interface_id].dialplan);
+        DEBUGA_SKYPE
+          ("interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].destination=%s\n",
+           SKYPIAX_P_LOG, interface_id,
+           globals.SKYPIAX_INTERFACES[interface_id].destination);
+        DEBUGA_SKYPE
+          ("interface_id=%d globals.SKYPIAX_INTERFACES[interface_id].context=%s\n",
+           SKYPIAX_P_LOG, interface_id,
+           globals.SKYPIAX_INTERFACES[interface_id].context);
         NOTICA("STARTING interface_id=%d\n", SKYPIAX_P_LOG, interface_id);
 
         switch_threadattr_create(&skypiax_skypeapi_thread_attr, skypiax_module_pool);
@@ -890,6 +896,10 @@
                      i, globals.SKYPIAX_INTERFACES[i].context);
         DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].dialplan=%s\n", SKYPIAX_P_LOG,
                      i, i, globals.SKYPIAX_INTERFACES[i].dialplan);
+        DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].destination=%s\n", SKYPIAX_P_LOG,
+                     i, i, globals.SKYPIAX_INTERFACES[i].destination);
+        DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].context=%s\n", SKYPIAX_P_LOG,
+                     i, i, globals.SKYPIAX_INTERFACES[i].context);
       }
     }
   }

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax.h	Sun Jan 11 10:36:09 2009
@@ -225,6 +225,7 @@
   int skypiax_dir_entry_extension_prefix;
   char skype_user[256];
   char skype_password[256];
+  char destination[256];
 
 };
 

Modified: freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	(original)
+++ freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	Sun Jan 11 10:36:09 2009
@@ -1006,7 +1006,7 @@
     DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
   }
   sprintf(acInputRow, "%s", msg_to_skype);
-  if (option_debug > 1)
+  if (option_debug > 100)
     DEBUGA_SKYPE("acInputRow: |||%s||||\n", SKYPIAX_P_LOG, acInputRow);
   /*  send command to skype */
   oCopyData.dwData = 0;
@@ -1555,12 +1555,12 @@
 
                     if ((tech_pvt->caller_profile =
                          switch_caller_profile_new(switch_core_session_get_pool(session),
-                                                   "skypiax", "XML",
+                                                   "skypiax", tech_pvt->dialplan,
                                                    tech_pvt->callid_name,
                                                    tech_pvt->callid_number, NULL,
-                                                   "calling_ani", NULL, NULL,
-                                                   "mod_skypiax", "public",
-                                                   "5000")) != 0) {
+                                                   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);



More information about the Freeswitch-branches mailing list