-# 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 skypiax1 the username
-REM you MUST use the new Skype BETA (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 skypiax1 the username
+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).
+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.
+# 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)
+# 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
+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 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 skypiax1 the username
+# 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
+ 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 skypiax_signaling_read function
+ * \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
- ("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'. Skypiax exiting now\n",
+ ("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",
- DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].silent_mode=%d\n", SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].silent_mode);
- DEBUGA_SKYPE("i=%d globals.SKYPIAX_INTERFACES[%d].write_silence_when_idle=%d\n", SKYPIAX_P_LOG, i, i, globals.SKYPIAX_INTERFACES[i].write_silence_when_idle);
+ 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,
+ 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);
int dtmf_received(private_t * tech_pvt, char *value)
@@ -1807,21+1807,21 @@ int dtmf_received(private_t * tech_pvt, char *value)
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",
- for (i = 0; !found && i < SKYPIAX_MAX_INTERFACES; i++) {
- if (strlen(globals.SKYPIAX_INTERFACES[i].name)) {
+ for (i = 0; !found && i < SKYPOPEN_MAX_INTERFACES; i++) {
+ if (strlen(globals.SKYPOPEN_INTERFACES[i].name)) {
- giovatech = &globals.SKYPIAX_INTERFACES[i];
- if (strlen(giovatech->skype_call_id) && (giovatech->interface_state != SKYPIAX_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
+ 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
+ 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 skypiax interfaces idle, do nothing */
+ /* no skypopen interfaces idle, do nothing */
DEBUGA_SKYPE
- ("Not answering the skype_call %s, because we are already in a skypiax call(%s) and not transferring, because no other skypiax interfaces are available\n",
- SKYPIAX_P_LOG, id, tech_pvt->skype_call_id);
+ ("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);
@@ -203,96+203,96 @@ int skypiax_signaling_read(private_t * tech_pvt)
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",
- SKYPIAX_P_LOG, message);
+ 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", SKYPIAX_P_LOG, message);
("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",
- SKYPIAX_P_LOG, buf);
+ 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",