[Freeswitch-trunk] [commit] r13666 - freeswitch/trunk/src/mod/endpoints/mod_skypiax

FreeSWITCH SVN gmaruzz at freeswitch.org
Sat Jun 6 13:31:02 PDT 2009


Author: gmaruzz
Date: Sat Jun  6 15:31:01 2009
New Revision: 13666

Log:
skypiax: insert the delay ONLY if the broken message is 'ERROR 92 CALL: Unrecognised identity': when repeatedly you try to connect to non-existing Skype account in a short period, the Skype client send you back the two halves of the message 'ERROR 92 CALL: Unrecognised identity' inverted in a way that breaks the flux of the API messages. Maybe an anti-spam feature? Anyway, let's try to work around it and restore sanity with a 1 second delay

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_skypiax/skypiax_protocol.c	Sat Jun  6 15:31:01 2009
@@ -381,10 +381,11 @@
                 tech_pvt->skype_callflow = CALLFLOW_STATUS_INPROGRESS;
                 tech_pvt->interface_state = SKYPIAX_STATE_UP;
                 start_audio_threads(tech_pvt);
-                skypiax_sleep(1000);
+                skypiax_sleep(1000); //FIXME
                 sprintf(msg_to_skype, "ALTER CALL %s SET_INPUT PORT=\"%d\"", id,
                         tech_pvt->tcp_cli_port);
                 skypiax_signaling_write(tech_pvt, msg_to_skype);
+                skypiax_sleep(1000); //FIXME
                 sprintf(msg_to_skype, "#output ALTER CALL %s SET_OUTPUT PORT=\"%d\"", id,
                         tech_pvt->tcp_srv_port);
                 skypiax_signaling_write(tech_pvt, msg_to_skype);
@@ -1469,6 +1470,8 @@
 
         buf[i] = '\0';
 
+        DEBUGA_SKYPE ("BUF=|||%s|||\n", SKYPIAX_P_LOG, buf);
+
 	if(an_event.xclient.message_type == atom_begin){
 
 		if(strlen(buffer)){
@@ -1482,9 +1485,12 @@
 	if(an_event.xclient.message_type == atom_continue){
 
 		if(!strlen(buffer)){
-			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", SKYPIAX_P_LOG, buf);
+			DEBUGA_SKYPE("Got a 'continue' XAtom without a previous 'begin'. It's value (between vertical bars) is=|||%s|||\n", SKYPIAX_P_LOG, buf);
 			continue_is_broken=1;
-			skypiax_sleep(1000000); //1 sec
+			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", SKYPIAX_P_LOG, buf);
+				skypiax_sleep(1000000); //1 sec
+			}
 			break;
 		}
 	}



More information about the Freeswitch-trunk mailing list