[Freeswitch-svn] [commit] r11120 - freeswitch/branches/gmaruzz/src/mod/endpoints/mod_skypiax
FreeSWITCH SVN
gmaruzz at freeswitch.org
Sun Jan 11 04:15:27 PST 2009
Author: gmaruzz
Date: Sun Jan 11 06:15:27 2009
New Revision: 11120
Log:
skypiax: indent -gnu -ts4 -br -brs -cdw -lp -ce -nbfda -npcs -nprs -npsl -nbbo -saf -sai -saw -cs -bbo -nhnl -nut -sob -l90
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 Sun Jan 11 06:15:27 2009
@@ -146,7 +146,6 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
-
switch_clear_flag_locked(tech_pvt, TFLAG_IO);
switch_clear_flag_locked(tech_pvt, TFLAG_VOICE);
//switch_set_flag_locked(tech_pvt, TFLAG_HANGUP);
@@ -352,7 +351,6 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
-
if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
ERRORA("CIAPA \n", SKYPIAX_P_LOG);
return SWITCH_STATUS_FALSE;
@@ -387,7 +385,6 @@
tech_pvt = switch_core_session_get_private(session);
assert(tech_pvt != NULL);
-
DEBUGA_SKYPE("ANSWERED! \n", SKYPIAX_P_LOG);
return SWITCH_STATUS_SUCCESS;
@@ -405,7 +402,6 @@
tech_pvt = (private_t *) switch_core_session_get_private(session);
assert(tech_pvt != NULL);
-
switch (msg->message_id) {
case SWITCH_MESSAGE_INDICATE_ANSWER:
{
@@ -496,7 +492,7 @@
DEBUGA_SKYPE("globals.SKYPIAX_INTERFACES[%d].name=|||%s|||?\n", SKYPIAX_P_LOG,
i, globals.SKYPIAX_INTERFACES[i].name);
- tech_pvt = &globals.SKYPIAX_INTERFACES[i]; //FIXME
+ tech_pvt = &globals.SKYPIAX_INTERFACES[i]; //FIXME
//globals.SKYPIAX_INTERFACES[i].tech_pvt = tech_pvt; //FIXME
found = 1;
break;
@@ -879,8 +875,7 @@
skypiax_skypeaudio_init(&globals.SKYPIAX_INTERFACES[interface_id]);
- while (globals.SKYPIAX_INTERFACES[interface_id].SkypiaxHandles.
- api_connected == 0) {
+ while (globals.SKYPIAX_INTERFACES[interface_id].SkypiaxHandles.api_connected == 0) {
switch_sleep(1000);
}
NOTICA("STARTED interface_id=%d\n", SKYPIAX_P_LOG, interface_id);
@@ -951,7 +946,7 @@
if (globals.SKYPIAX_INTERFACES[interface_id].skypiax_do_controldev_thread_thread) {
#ifdef WIN32
- switch_file_write(tech_pvt->SkypiaxHandles.fdesc[1], "sciutati", &howmany); // let's the controldev_thread die
+ switch_file_write(tech_pvt->SkypiaxHandles.fdesc[1], "sciutati", &howmany); // let's the controldev_thread die
#else /* WIN32 */
howmany = write(tech_pvt->SkypiaxHandles.fdesc[1], "sciutati", howmany);
#endif /* WIN32 */
@@ -959,13 +954,14 @@
if (globals.SKYPIAX_INTERFACES[interface_id].skypiax_do_skype_thread_thread) {
#ifdef WIN32
- if (SendMessage(tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) { // let's the do_skype_thread die
+ if (SendMessage(tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle, WM_DESTROY, 0, 0) == FALSE) { // let's the do_skype_thread die
ERRORA("WHY FALSE HERE? %d\n", SKYPIAX_P_LOG, GetLastError());
}
#else
XEvent e;
Atom atom1 =
- XInternAtom(tech_pvt->SkypiaxHandles.disp, "SKYPECONTROLAPI_MESSAGE_BEGIN", False);
+ XInternAtom(tech_pvt->SkypiaxHandles.disp, "SKYPECONTROLAPI_MESSAGE_BEGIN",
+ False);
memset(&e, 0, sizeof(e));
e.xclient.type = ClientMessage;
e.xclient.message_type = atom1; /* leading message */
@@ -973,7 +969,8 @@
e.xclient.window = tech_pvt->SkypiaxHandles.skype_win;
e.xclient.format = 8;
- XSendEvent(tech_pvt->SkypiaxHandles.disp, tech_pvt->SkypiaxHandles.win, False, 0, &e);
+ XSendEvent(tech_pvt->SkypiaxHandles.disp, tech_pvt->SkypiaxHandles.win, False, 0,
+ &e);
XSync(tech_pvt->SkypiaxHandles.disp, False);
#endif
}
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 Sun Jan 11 06:15:27 2009
@@ -154,77 +154,6 @@
#endif //WIN32
-#if 0
-private_t {
- char interface_id[80];
- char name[80];
- char dialplan[80];
- char context[80];
- char dial_regex[256];
- char fail_dial_regex[256];
- char hold_music[256];
- char type[256];
- char X11_display[256];
-#ifdef WIN32
- unsigned short tcp_cli_port;
- unsigned short tcp_srv_port;
-#else
- int tcp_cli_port;
- int tcp_srv_port;
-#endif
- struct SkypiaxHandles SkypiaxHandles;
-
- int interface_state; /*!< \brief 'state' of the interface (channel) */
- char language[80]; /*!< \brief default Asterisk dialplan language for this interface */
- char exten[80]; /*!< \brief default Asterisk dialplan extension for this interface */
- int skypiax_sound_rate; /*!< \brief rate of the sound device, in Hz, eg: 8000 */
- switch_file_t *skypiax_sound_capt_fd; /*!< \brief file descriptor for sound capture dev */
- char callid_name[50];
- char callid_number[50];
- double playback_boost;
- double capture_boost;
- int stripmsd;
- switch_thread_t *skype_thread;
- char skype_call_id[512];
- int skype_call_ongoing;
- char skype_friends[4096];
- char skype_fullname[512];
- char skype_displayname[512];
- int skype_callflow; /*!< \brief 'callflow' of the skype interface (as opposed to phone interface) */
- int skype; /*!< \brief config flag, bool, Skype support on this interface (0 if false, -1 if true) */
- int control_to_send;
-#ifdef WIN32
- switch_file_t *audiopipe[2];
- switch_file_t *audioskypepipe[2];
-#else /* WIN32 */
- int audiopipe[2];
- int audioskypepipe[2];
-#endif /* WIN32 */
- switch_thread_t *tcp_srv_thread;
- switch_thread_t *tcp_cli_thread;
- switch_thread_t *skypiax_do_controldev_thread_thread;
- switch_thread_t *skypiax_do_skype_thread_thread;
- short audiobuf[SAMPLES_PER_FRAME];
- int audiobuf_is_loaded;
-
- //int phonebook_listing;
- //int phonebook_querying;
- //int phonebook_listing_received_calls;
-
- //int phonebook_first_entry;
- //int phonebook_last_entry;
- //int phonebook_number_lenght;
- //int phonebook_text_lenght;
- FILE *phonebook_writing_fp;
- int skypiax_dir_entry_extension_prefix;
- void *tech_pvt;
- char skype_user[256];
- char skype_password[256];
-};
-
-typedef private_t private_t;
-#endif
-
struct private_object {
unsigned int flags;
switch_codec_t read_codec;
@@ -303,9 +232,6 @@
char skype_user[256];
char skype_password[256];
-
-
-
};
typedef struct private_object private_t;
@@ -313,10 +239,10 @@
void *SWITCH_THREAD_FUNC do_skype_thread(switch_thread_t * thread, void *obj);
void skypiax_tech_init(private_t * tech_pvt, switch_core_session_t * session);
switch_status_t skypiax_skypeaudio_read(private_t * tech_pvt);
-int skypiax_skypeaudio_init(private_t *p);
-int skypiax_skype_write(private_t *p, char *msg_to_skype);
-int skypiax_skype_read(private_t *p);
+int skypiax_skypeaudio_init(private_t * p);
+int skypiax_skype_write(private_t * p, char *msg_to_skype);
+int skypiax_skype_read(private_t * p);
-int skypiax_skype_call(private_t *p, char *idest, int timeout,
+int skypiax_skype_call(private_t * p, char *idest, int timeout,
switch_core_session_t * session);
-int skypiax_skype_senddigit(private_t *p, char digit);
+int skypiax_skype_senddigit(private_t * p, char digit);
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 Sun Jan 11 06:15:27 2009
@@ -108,8 +108,8 @@
if ((SAMPLERATE_SKYPIAX - 8000) == 0) {
- ERRORA("tech_pvt->audiopipe[0] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[0]);
- ERRORA("tech_pvt->audiopipe[1] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[1]);
+ ERRORA("tech_pvt->audiopipe[0] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[0]);
+ ERRORA("tech_pvt->audiopipe[1] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[1]);
if (len > 0) {
a = 0;
for (i = 0; i < len / sizeof(short); i++) {
@@ -156,8 +156,8 @@
}
} else if (SAMPLERATE_SKYPIAX == 16000) {
- //ERRORA("tech_pvt->audiopipe[0] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[0]);
- //ERRORA("tech_pvt->audiopipe[1] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[1]);
+ //ERRORA("tech_pvt->audiopipe[0] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[0]);
+ //ERRORA("tech_pvt->audiopipe[1] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[1]);
if (len > 0) {
if (len == SAMPLES_PER_FRAME * sizeof(short)) {
#ifdef WIN32
@@ -288,7 +288,7 @@
memset(&my_addr, 0, sizeof(my_addr));
my_addr.sin_family = AF_INET;
my_addr.sin_addr.s_addr = htonl(0x7f000001); /* use the localhost */
- my_addr.sin_port = htons(tech_pvt->tcp_cli_port); //FIXME configurable!
+ my_addr.sin_port = htons(tech_pvt->tcp_cli_port); //FIXME configurable!
if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
ERRORA("socket Error\n", SKYPIAX_P_LOG);
@@ -438,12 +438,14 @@
return NULL;
}
-int skypiax_skypeaudio_init(private_t *tech_pvt)
+int skypiax_skypeaudio_init(private_t * tech_pvt)
{
#ifdef WIN32
switch_status_t rv;
- rv = switch_file_pipe_create(&tech_pvt->audiopipe[0], &tech_pvt->audiopipe[1], skypiax_module_pool);
+ rv =
+ switch_file_pipe_create(&tech_pvt->audiopipe[0], &tech_pvt->audiopipe[1],
+ skypiax_module_pool);
rv =
switch_file_pipe_create(&tech_pvt->audioskypepipe[0], &tech_pvt->audioskypepipe[1],
skypiax_module_pool);
@@ -496,8 +498,8 @@
samples = read(tech_pvt->audiopipe[0], tech_pvt->read_frame.data, samples);
#endif /* WIN32 */
- //ERRORA("tech_pvt->audiopipe[0] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[0]);
- //ERRORA("tech_pvt->audiopipe[1] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[1]);
+ //ERRORA("tech_pvt->audiopipe[0] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[0]);
+ //ERRORA("tech_pvt->audiopipe[1] = %d\n", SKYPIAX_P_LOG, tech_pvt->audiopipe[1]);
if (samples != SAMPLES_PER_FRAME * sizeof(short)) {
if (samples)
ERRORA("SRV PIPE READ=====> NOT GOOD samples=%u expected=%lu\n", SKYPIAX_P_LOG,
@@ -599,7 +601,8 @@
break;
default:
if (p && tech_pvt->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
- if (uiMessage == tech_pvt->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
+ if (uiMessage ==
+ tech_pvt->SkypiaxHandles.win32_uiGlobal_MsgID_SkypeControlAPIAttach) {
switch (ulParam) {
case SKYPECONTROLAPI_ATTACH_SUCCESS:
if (!tech_pvt->SkypiaxHandles.api_connected) {
@@ -618,7 +621,8 @@
SendMessage(HWND_BROADCAST,
tech_pvt->SkypiaxHandles.
win32_uiGlobal_MsgID_SkypeControlAPIDiscover,
- (WPARAM) tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle, 0);
+ (WPARAM) tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle,
+ 0);
}
break;
case SKYPECONTROLAPI_ATTACH_REFUSED:
@@ -634,7 +638,8 @@
SendMessage(HWND_BROADCAST,
tech_pvt->SkypiaxHandles.
win32_uiGlobal_MsgID_SkypeControlAPIDiscover,
- (WPARAM) tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle, 0);
+ (WPARAM) tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle,
+ 0);
}
break;
default:
@@ -652,7 +657,7 @@
return (lReturnCode);
}
-int win32_Initialize_CreateWindowClass(private_t *tech_pvt)
+int win32_Initialize_CreateWindowClass(private_t * tech_pvt)
{
unsigned char *paucUUIDString;
RPC_STATUS lUUIDResult;
@@ -669,7 +674,8 @@
WNDCLASS oWindowClass;
strcpy(tech_pvt->SkypiaxHandles.win32_acInit_WindowClassName, "Skype-API-Skypiax-");
- strcat(tech_pvt->SkypiaxHandles.win32_acInit_WindowClassName, (char *) paucUUIDString);
+ strcat(tech_pvt->SkypiaxHandles.win32_acInit_WindowClassName,
+ (char *) paucUUIDString);
oWindowClass.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
oWindowClass.lpfnWndProc = (WNDPROC) & skypiax_skype_present;
@@ -694,7 +700,7 @@
return (fReturnStatus);
}
-void win32_DeInitialize_DestroyWindowClass(private_t *tech_pvt)
+void win32_DeInitialize_DestroyWindowClass(private_t * tech_pvt)
{
UnregisterClass(tech_pvt->SkypiaxHandles.win32_acInit_WindowClassName,
tech_pvt->SkypiaxHandles.win32_hInit_ProcessHandle);
@@ -702,17 +708,18 @@
tech_pvt->SkypiaxHandles.win32_hInit_ProcessHandle = NULL;
}
-int win32_Initialize_CreateMainWindow(private_t *tech_pvt)
+int win32_Initialize_CreateMainWindow(private_t * tech_pvt)
{
tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle =
CreateWindowEx(WS_EX_APPWINDOW | WS_EX_WINDOWEDGE,
tech_pvt->SkypiaxHandles.win32_acInit_WindowClassName, "",
WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT,
- 128, 128, NULL, 0, tech_pvt->SkypiaxHandles.win32_hInit_ProcessHandle, p);
+ 128, 128, NULL, 0, tech_pvt->SkypiaxHandles.win32_hInit_ProcessHandle,
+ p);
return (tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle != NULL ? 1 : 0);
}
-void win32_DeInitialize_DestroyMainWindow(private_t *tech_pvt)
+void win32_DeInitialize_DestroyMainWindow(private_t * tech_pvt)
{
if (tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle != NULL)
DestroyWindow(tech_pvt->SkypiaxHandles.win32_hInit_MainWindowHandle),
@@ -831,10 +838,9 @@
//XLockDisplay(disp);
status =
- XGetWindowProperty(SkypiaxHandles->disp,
- DefaultRootWindow(SkypiaxHandles->disp), skype_inst, 0, 1,
- False, XA_WINDOW, &type_ret, &format_ret, &nitems_ret,
- &bytes_after_ret, &prop);
+ XGetWindowProperty(SkypiaxHandles->disp, DefaultRootWindow(SkypiaxHandles->disp),
+ skype_inst, 0, 1, False, XA_WINDOW, &type_ret, &format_ret,
+ &nitems_ret, &bytes_after_ret, &prop);
//XUnlockDisplay(disp);
/* sanity check */
@@ -986,7 +992,7 @@
}
#endif // WIN32
-int skypiax_skype_write(private_t *tech_pvt, char *msg_to_skype)
+int skypiax_skype_write(private_t * tech_pvt, char *msg_to_skype)
{
#ifdef WIN32
static char acInputRow[1024];
@@ -1050,7 +1056,7 @@
}
-int skypiax_skype_read(private_t *tech_pvt)
+int skypiax_skype_read(private_t * tech_pvt)
{
char read_from_pipe[4096];
@@ -1280,15 +1286,16 @@
SKYPIAX_P_LOG, messaggio, obj, id, prop, value, where ? where : "NULL");
if (!strcasecmp(prop, "PARTNER_HANDLE")) {
- strncpy(tech_pvt->callid_number, value, sizeof(tech_pvt->callid_number) - 1);
+ strncpy(tech_pvt->callid_number, value,
+ sizeof(tech_pvt->callid_number) - 1);
WARNINGA
("the skype_call %s caller PARTNER_HANDLE (tech_pvt->callid_number) is: %s\n",
SKYPIAX_P_LOG, id, tech_pvt->callid_number);
return CALLFLOW_INCOMING_RING;
}
if (!strcasecmp(prop, "PARTNER_DISPNAME")) {
- snprintf(tech_pvt->callid_name, sizeof(tech_pvt->callid_name) - 1, "%s%s%s", value,
- where ? " " : "", where ? where : "");
+ snprintf(tech_pvt->callid_name, sizeof(tech_pvt->callid_name) - 1, "%s%s%s",
+ value, where ? " " : "", where ? where : "");
WARNINGA
("the skype_call %s caller PARTNER_DISPNAME (tech_pvt->callid_name) is: %s\n",
SKYPIAX_P_LOG, id, tech_pvt->callid_name);
@@ -1349,7 +1356,7 @@
if (tech_pvt->interface_state != SKYPIAX_STATE_DIALING) {
/* we are not calling out */
- if (!strlen(tech_pvt->skype_call_id)) { //FIXME
+ if (!strlen(tech_pvt->skype_call_id)) { //FIXME
/* we are not inside an active call */
tech_pvt->skype_callflow = CALLFLOW_STATUS_RINGING;
tech_pvt->interface_state = SKYPIAX_STATE_RING;
@@ -1369,7 +1376,8 @@
if (option_debug)
DEBUGA_SKYPE("We answered a Skype RING on skype_call %s\n",
SKYPIAX_P_LOG, id);
- strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
+ strncpy(tech_pvt->skype_call_id, id,
+ sizeof(tech_pvt->skype_call_id) - 1);
} else {
/* we're owned, we're in a call, let's refuse */
sprintf(msg_to_skype, "ALTER CALL %s END HANGUP", id);
@@ -1385,7 +1393,8 @@
tech_pvt->skype_callflow = CALLFLOW_STATUS_RINGING;
tech_pvt->interface_state = SKYPIAX_STATE_RINGING;
//FIXME ast_queue_control(tech_pvt->owner, SKYPIAX_CONTROL_RINGING);
- strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
+ strncpy(tech_pvt->skype_call_id, id,
+ sizeof(tech_pvt->skype_call_id) - 1);
DEBUGA_SKYPE("Our remote party in skype_call %s is RINGING\n",
SKYPIAX_P_LOG, id);
}
@@ -1452,7 +1461,8 @@
DEBUGA_SKYPE
("we tried to call Skype on skype_call %s and Skype has now REFUSED\n",
SKYPIAX_P_LOG, id);
- strncpy(tech_pvt->skype_call_id, id, sizeof(tech_pvt->skype_call_id) - 1);
+ strncpy(tech_pvt->skype_call_id, id,
+ sizeof(tech_pvt->skype_call_id) - 1);
tech_pvt->interface_state = SKYPIAX_STATE_DOWN;
tech_pvt->skype_call_id[0] = '\0';
if (option_debug > 100) {
@@ -1493,14 +1503,16 @@
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&tech_pvt->tcp_srv_thread, thd_attr,
- skypiax_do_tcp_srv_thread, tech_pvt, skypiax_module_pool);
+ skypiax_do_tcp_srv_thread, tech_pvt,
+ skypiax_module_pool);
DEBUGA_SKYPE("started tcp_srv_thread thread.\n", SKYPIAX_P_LOG);
switch_threadattr_create(&thd_attr, skypiax_module_pool);
switch_threadattr_detach_set(thd_attr, 1);
switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
switch_thread_create(&tech_pvt->tcp_cli_thread, thd_attr,
- skypiax_do_tcp_cli_thread, tech_pvt, skypiax_module_pool);
+ skypiax_do_tcp_cli_thread, tech_pvt,
+ skypiax_module_pool);
DEBUGA_SKYPE("started tcp_cli_thread thread.\n", SKYPIAX_P_LOG);
switch_sleep(100000);
sprintf(msg_to_skype, "ALTER CALL %s SET_OUTPUT PORT=\"%d\"", id,
@@ -1530,10 +1542,13 @@
switch_core_session_request(skypiax_endpoint_interface,
NULL)) != 0) {
switch_core_session_add_stream(session, NULL);
- channel = switch_core_session_get_channel(session);
- skypiax_tech_init(tech_pvt, session);
+ channel = switch_core_session_get_channel(session);
+ skypiax_tech_init(tech_pvt, session);
#if 0
- if ((tech_pvt = (private_t *) switch_core_session_alloc(session, sizeof(private_t))) != 0) {
+ if ((tech_pvt =
+ (private_t *) switch_core_session_alloc(session,
+ sizeof(private_t))) !=
+ 0) {
channel = switch_core_session_get_channel(session);
skypiax_tech_init(tech_pvt, session);
} else {
@@ -1545,9 +1560,11 @@
if ((tech_pvt->caller_profile =
switch_caller_profile_new(switch_core_session_get_pool(session),
- "skypiax", "XML", tech_pvt->callid_name,
- tech_pvt->callid_number, NULL, "calling_ani",
- NULL, NULL, "mod_skypiax", "public",
+ "skypiax", "XML",
+ tech_pvt->callid_name,
+ tech_pvt->callid_number, NULL,
+ "calling_ani", NULL, NULL,
+ "mod_skypiax", "public",
"5000")) != 0) {
char name[128];
//switch_snprintf(name, sizeof(name), "skypiax/%s/%s", tech_pvt->name, tech_pvt->caller_profile->destination_number);
@@ -1611,7 +1628,7 @@
return 0;
}
-int skypiax_skype_senddigit(private_t *tech_pvt, char digit)
+int skypiax_skype_senddigit(private_t * tech_pvt, char digit)
{
char msg_to_skype[1024];
if (option_debug > 10) {
@@ -1630,7 +1647,7 @@
return 0;
}
-int skypiax_skype_call(private_t *tech_pvt, char *idest, int timeout,
+int skypiax_skype_call(private_t * tech_pvt, char *idest, int timeout,
switch_core_session_t * session)
{
char *rdest;
More information about the Freeswitch-svn
mailing list