[Freeswitch-svn] [commit] r10708 - freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax
FreeSWITCH SVN
gmaruzz at freeswitch.org
Thu Dec 11 06:15:19 PST 2008
Author: gmaruzz
Date: Thu Dec 11 09:15:18 2008
New Revision: 10708
Log:
skypiax: better function distribution between mod_skypiax.c and skypiax_protocol.c
Modified:
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/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 Thu Dec 11 09:15:18 2008
@@ -446,43 +446,6 @@
/*.receive_event */ channel_receive_event
};
-int skypiax_skype_call(struct skypiax_interface *p, char *idest, int timeout,
- switch_core_session_t * session)
-{
- char *rdest;
- char msg_to_skype[1024];
-
- if (option_debug > 10) {
- DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
- }
- switch_sleep(5000);
-
- rdest = strchr(idest, '/');
- *rdest++ = '\0';
-
- if (option_debug)
- DEBUGA_SKYPE("Calling Skype, rdest is: %s\n", SKYPIAX_P_LOG, rdest);
- NOTICA("Calling Skype, rdest is: %s\n", SKYPIAX_P_LOG, rdest);
- skypiax_skype_write(p, "SET AGC OFF");
- switch_sleep(10000);
- skypiax_skype_write(p, "SET AEC OFF");
- switch_sleep(10000);
-
- sprintf(msg_to_skype, "CALL %s", rdest);
- if (skypiax_skype_write(p, msg_to_skype) < 0) {
-
- ERRORA("failed to communicate with Skype client, now exit\n", SKYPIAX_P_LOG);
- if (option_debug > 10) {
- DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_P_LOG);
- }
- return -1;
- }
- global_session = session;
-
- //FIXME ast_queue_control(p->owner, SKYPIAX_CONTROL_RINGING);
- return 0;
-}
-
static switch_call_cause_t channel_outgoing_channel(switch_core_session_t * session,
switch_event_t * var_event,
switch_caller_profile_t *
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 Thu Dec 11 09:15:18 2008
@@ -214,3 +214,5 @@
int skypiax_skypeaudio_init(struct skypiax_interface *p);
int skypiax_skype_write(struct skypiax_interface *p, char *msg_to_skype);
int skypiax_skype_read(struct skypiax_interface *p);
+
+int skypiax_skype_call(struct skypiax_interface *p, char *idest, int timeout, switch_core_session_t * session);
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 Thu Dec 11 09:15:18 2008
@@ -1400,3 +1400,41 @@
//DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_P_LOG);
return 0;
}
+
+int skypiax_skype_call(struct skypiax_interface *p, char *idest, int timeout, switch_core_session_t * session)
+{
+ char *rdest;
+ char msg_to_skype[1024];
+
+ if (option_debug > 10) {
+ DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
+ }
+ switch_sleep(5000);
+
+ rdest = strchr(idest, '/');
+ *rdest++ = '\0';
+
+ if (option_debug)
+ DEBUGA_SKYPE("Calling Skype, rdest is: %s\n", SKYPIAX_P_LOG, rdest);
+ NOTICA("Calling Skype, rdest is: %s\n", SKYPIAX_P_LOG, rdest);
+ skypiax_skype_write(p, "SET AGC OFF");
+ switch_sleep(10000);
+ skypiax_skype_write(p, "SET AEC OFF");
+ switch_sleep(10000);
+
+ sprintf(msg_to_skype, "CALL %s", rdest);
+ if (skypiax_skype_write(p, msg_to_skype) < 0) {
+
+ ERRORA("failed to communicate with Skype client, now exit\n", SKYPIAX_P_LOG);
+ if (option_debug > 10) {
+ DEBUGA_PBX("EXITING FUNC\n", SKYPIAX_P_LOG);
+ }
+ return -1;
+ }
+ global_session = session;
+
+ //FIXME ast_queue_control(p->owner, SKYPIAX_CONTROL_RINGING);
+ return 0;
+}
+
+
More information about the Freeswitch-svn
mailing list