[Freeswitch-branches] [commit] r11110 - freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax

FreeSWITCH SVN gmaruzz at freeswitch.org
Sat Jan 10 03:16:41 PST 2009


Author: gmaruzz
Date: Sat Jan 10 05:16:41 2009
New Revision: 11110

Log:
skypiax: always (will be under config param) authorize to be added as a contact and seen online

Modified:
   freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax/skypiax_protocol.c

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	Sat Jan 10 05:16:41 2009
@@ -1365,6 +1365,28 @@
             }
           }
 
+          if (!strcasecmp(messaggio, "USER")) {
+            strncpy(obj, where, sizeof(obj) - 1);
+
+            where = strsep(stringp, " ");
+
+            strncpy(id, where, sizeof(id) - 1);
+
+            where = strsep(stringp, " ");
+
+            strncpy(prop, where, sizeof(prop) - 1);
+
+            if (!strcasecmp(prop,"RECEIVEDAUTHREQUEST" )) {
+		    char msg_to_skype[256];
+              DEBUGA_SKYPE ("Skype MSG: messaggio: %s, obj: %s, id: %s, prop: %s!\n", SKYPIAX_P_LOG, messaggio, obj, id, prop);
+
+	      //FIXME: TODO: allow authorization based on config param
+                    sprintf(msg_to_skype, "SET USER %s ISAUTHORIZED TRUE", id);
+                    skypiax_skype_write(p, msg_to_skype);
+            }
+          }
+
+
           if (!strcasecmp(messaggio, "CALL")) {
 
             strncpy(obj, where, sizeof(obj) - 1);



More information about the Freeswitch-branches mailing list