[Freeswitch-svn] [commit] r11519 - freeswitch/branches/gmaruzz/mod_skypiax
FreeSWITCH SVN
gmaruzz at freeswitch.org
Tue Jan 27 15:00:57 PST 2009
Author: gmaruzz
Date: Tue Jan 27 17:00:57 2009
New Revision: 11519
Log:
skypiax: moving switch specific things out of skypiax_protocol.c
Modified:
freeswitch/branches/gmaruzz/mod_skypiax/mod_skypiax.c
freeswitch/branches/gmaruzz/mod_skypiax/skypiax.h
freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c
Modified: freeswitch/branches/gmaruzz/mod_skypiax/mod_skypiax.c
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/mod_skypiax.c (original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/mod_skypiax.c Tue Jan 27 17:00:57 2009
@@ -545,7 +545,19 @@
return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
}
- skypiax_skype_call(tech_pvt, caller_profile->destination_number, 30, *new_session);
+ char *rdest;
+
+ rdest = strchr(caller_profile->destination_number, '/');
+ *rdest++ = '\0';
+
+
+ skypiax_skype_call(tech_pvt, rdest, 30);
+
+ switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(*new_session),
+ sizeof(tech_pvt->session_uuid_str));
+ caller_profile = tech_pvt->caller_profile;
+ caller_profile->destination_number = rdest;
+
switch_channel_set_flag(channel, CF_OUTBOUND);
switch_set_flag_locked(tech_pvt, TFLAG_OUTBOUND);
Modified: freeswitch/branches/gmaruzz/mod_skypiax/skypiax.h
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/skypiax.h (original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/skypiax.h Tue Jan 27 17:00:57 2009
@@ -242,8 +242,7 @@
int skypiax_skype_write(private_t * tech_pvt, char *msg_to_skype);
int skypiax_skype_read(private_t * tech_pvt);
-int skypiax_skype_call(private_t * tech_pvt, char *idest, int timeout,
- switch_core_session_t * session);
+int skypiax_skype_call(private_t * tech_pvt, char *idest, int timeout);
int skypiax_skype_senddigit(private_t * tech_pvt, char digit);
#define skypiax_sleep switch_sleep
Modified: freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c
==============================================================================
--- freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c (original)
+++ freeswitch/branches/gmaruzz/mod_skypiax/skypiax_protocol.c Tue Jan 27 17:00:57 2009
@@ -1684,13 +1684,11 @@
return 0;
}
-int skypiax_skype_call(private_t * tech_pvt, char *idest, int timeout,
- switch_core_session_t * session)
+int skypiax_skype_call(private_t * tech_pvt, char *rdest, int timeout)
{
- char *rdest;
char msg_to_skype[1024];
//private_t *tech_pvt;
- switch_caller_profile_t *caller_profile;
+ //switch_caller_profile_t *caller_profile;
//tech_pvt = p;
@@ -1698,10 +1696,6 @@
DEBUGA_PBX("ENTERING FUNC\n", SKYPIAX_P_LOG);
}
skypiax_sleep(5000);
-
- rdest = strchr(idest, '/');
- *rdest++ = '\0';
-
DEBUGA_SKYPE("Calling Skype, rdest is: %s\n", SKYPIAX_P_LOG, rdest);
skypiax_skype_write(tech_pvt, "SET AGC OFF");
skypiax_sleep(10000);
@@ -1717,11 +1711,6 @@
}
return -1;
}
- switch_copy_string(tech_pvt->session_uuid_str, switch_core_session_get_uuid(session),
- sizeof(tech_pvt->session_uuid_str));
- caller_profile = tech_pvt->caller_profile;
- caller_profile->destination_number = rdest;
-
//FIXME ast_queue_control(tech_pvt->owner, SKYPIAX_CONTROL_RINGING);
return 0;
}
More information about the Freeswitch-svn
mailing list