Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
December 2006
- 10 participants
- 350 discussions
[commit] r3510 - in freeswitch/trunk/src/mod/languages: mod_spidermonkey mod_spidermonkey_etpan mod_spidermonkey_odbc
by Freeswitch SVN 01 Dec '06
by Freeswitch SVN 01 Dec '06
01 Dec '06
Author: mikej
Date: Fri Dec 1 14:16:46 2006
New Revision: 3510
Modified:
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
Log:
move email to etpan, cleanup the new stubs.
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Fri Dec 1 14:16:46 2006
@@ -1996,20 +1996,6 @@
return JS_FALSE;
}
-#define B64BUFFLEN 1024
-static const char c64[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-static int write_buf(int fd, char *buf) {
-
- int len = (int)strlen(buf);
- if (fd && write(fd, buf, len) != len) {
- close(fd);
- return 0;
- }
-
- return 1;
-}
-
static JSBool js_api_use(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
char *mod_name = NULL;
@@ -2121,135 +2107,10 @@
return JS_TRUE;
}
-static JSBool js_email(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
-{
- char *to = NULL, *from = NULL, *headers, *body = NULL, *file = NULL;
- char *bound = "XXXX_boundary_XXXX";
- char filename[80], buf[B64BUFFLEN];
- int fd = 0, ifd = 0;
- int x=0, y=0, bytes=0, ilen=0;
- unsigned int b=0, l=0;
- unsigned char in[B64BUFFLEN];
- unsigned char out[B64BUFFLEN+512];
- char *path = NULL;
-
-
- if (
- argc > 3 &&
- (from = JS_GetStringBytes(JS_ValueToString(cx, argv[0]))) &&
- (to = JS_GetStringBytes(JS_ValueToString(cx, argv[1]))) &&
- (headers = JS_GetStringBytes(JS_ValueToString(cx, argv[2]))) &&
- (body = JS_GetStringBytes(JS_ValueToString(cx, argv[3])))
- ) {
- if ( argc > 4) {
- file = JS_GetStringBytes(JS_ValueToString(cx, argv[4]));
- }
- snprintf(filename, 80, "%smail.%ld%04x", SWITCH_GLOBAL_dirs.temp_dir, time(NULL), rand() & 0xffff);
-
- if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644))) {
- if (file) {
- path = file;
- if ((ifd = open(path, O_RDONLY)) < 1) {
- return JS_FALSE;
- }
-
- snprintf(buf, B64BUFFLEN, "MIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=\"%s\"\n", bound);
- if (!write_buf(fd, buf)) {
- return JS_FALSE;
- }
- }
-
- if (!write_buf(fd, headers))
- return JS_FALSE;
-
- if (!write_buf(fd, "\n\n"))
- return JS_FALSE;
-
- if (file) {
- snprintf(buf, B64BUFFLEN, "--%s\nContent-Type: text/plain\n\n", bound);
- if (!write_buf(fd, buf))
- return JS_FALSE;
- }
-
- if (!write_buf(fd, body))
- return JS_FALSE;
-
- if (file) {
- snprintf(buf, B64BUFFLEN, "\n\n--%s\nContent-Type: application/octet-stream\n"
- "Content-Transfer-Encoding: base64\n"
- "Content-Description: Sound attachment.\n"
- "Content-Disposition: attachment; filename=\"%s\"\n\n", bound, file);
- if (!write_buf(fd, buf))
- return JS_FALSE;
-
- while((ilen=read(ifd, in, B64BUFFLEN))) {
- for (x=0;x<ilen;x++) {
- b = (b<<8) + in[x];
- l += 8;
- while (l >= 6) {
- out[bytes++] = c64[(b>>(l-=6))%64];
- if (++y!=72)
- continue;
- out[bytes++] = '\n';
- y=0;
- }
- }
- if (write(fd, &out, bytes) != bytes) {
- return -1;
- } else
- bytes=0;
-
- }
-
- if (l > 0) {
- out[bytes++] = c64[((b%16)<<(6-l))%64];
- }
- if (l != 0) while (l < 6) {
- out[bytes++] = '=', l += 2;
- }
- if (write(fd, &out, bytes) != bytes) {
- return -1;
- }
-
- }
-
-
-
- if (file) {
- snprintf(buf, B64BUFFLEN, "\n\n--%s--\n.\n", bound);
- if (!write_buf(fd, buf))
- return JS_FALSE;
- }
- }
-
- if (fd) {
- close(fd);
- }
- if (ifd) {
- close(ifd);
- }
- snprintf(buf, B64BUFFLEN, "/bin/cat %s | /usr/sbin/sendmail -tf \"%s\" %s", filename, from, to);
- system(buf);
- unlink(filename);
-
-
- if (file) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Emailed file [%s] to [%s]\n", filename, to);
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Emailed data to [%s]\n", to);
- }
- return JS_TRUE;
- }
-
-
- return JS_FALSE;
-}
-
static JSFunctionSpec fs_functions[] = {
{"console_log", js_log, 2},
{"exit", js_exit, 0},
{"include", js_include, 1},
- {"email", js_email, 2},
{"bridge", js_bridge, 2},
{"apiExecute", js_api_execute, 2},
{"use", js_api_use, 1},
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c Fri Dec 1 14:16:46 2006
@@ -34,6 +34,20 @@
static const char modname[] = "etpan";
+#define B64BUFFLEN 1024
+static const char c64[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+static int write_buf(int fd, char *buf) {
+
+ int len = (int)strlen(buf);
+ if (fd && write(fd, buf, len) != len) {
+ close(fd);
+ return 0;
+ }
+
+ return 1;
+}
+
/* etpan Object */
/*********************************************************************************/
static JSBool etpan_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
@@ -54,14 +68,137 @@
etpan_NAME
};
+static JSBool js_email(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+ char *to = NULL, *from = NULL, *headers, *body = NULL, *file = NULL;
+ char *bound = "XXXX_boundary_XXXX";
+ char filename[80], buf[B64BUFFLEN];
+ int fd = 0, ifd = 0;
+ int x=0, y=0, bytes=0, ilen=0;
+ unsigned int b=0, l=0;
+ unsigned char in[B64BUFFLEN];
+ unsigned char out[B64BUFFLEN+512];
+ char *path = NULL;
+
+
+ if (
+ argc > 3 &&
+ (from = JS_GetStringBytes(JS_ValueToString(cx, argv[0]))) &&
+ (to = JS_GetStringBytes(JS_ValueToString(cx, argv[1]))) &&
+ (headers = JS_GetStringBytes(JS_ValueToString(cx, argv[2]))) &&
+ (body = JS_GetStringBytes(JS_ValueToString(cx, argv[3])))
+ ) {
+ if ( argc > 4) {
+ file = JS_GetStringBytes(JS_ValueToString(cx, argv[4]));
+ }
+ snprintf(filename, 80, "%smail.%ld%04x", SWITCH_GLOBAL_dirs.temp_dir, time(NULL), rand() & 0xffff);
+
+ if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644))) {
+ if (file) {
+ path = file;
+ if ((ifd = open(path, O_RDONLY)) < 1) {
+ return JS_FALSE;
+ }
+
+ snprintf(buf, B64BUFFLEN, "MIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=\"%s\"\n", bound);
+ if (!write_buf(fd, buf)) {
+ return JS_FALSE;
+ }
+ }
+
+ if (!write_buf(fd, headers))
+ return JS_FALSE;
+
+ if (!write_buf(fd, "\n\n"))
+ return JS_FALSE;
+
+ if (file) {
+ snprintf(buf, B64BUFFLEN, "--%s\nContent-Type: text/plain\n\n", bound);
+ if (!write_buf(fd, buf))
+ return JS_FALSE;
+ }
+
+ if (!write_buf(fd, body))
+ return JS_FALSE;
+
+ if (file) {
+ snprintf(buf, B64BUFFLEN, "\n\n--%s\nContent-Type: application/octet-stream\n"
+ "Content-Transfer-Encoding: base64\n"
+ "Content-Description: Sound attachment.\n"
+ "Content-Disposition: attachment; filename=\"%s\"\n\n", bound, file);
+ if (!write_buf(fd, buf))
+ return JS_FALSE;
+
+ while((ilen=read(ifd, in, B64BUFFLEN))) {
+ for (x=0;x<ilen;x++) {
+ b = (b<<8) + in[x];
+ l += 8;
+ while (l >= 6) {
+ out[bytes++] = c64[(b>>(l-=6))%64];
+ if (++y!=72)
+ continue;
+ out[bytes++] = '\n';
+ y=0;
+ }
+ }
+ if (write(fd, &out, bytes) != bytes) {
+ return -1;
+ } else
+ bytes=0;
+
+ }
+
+ if (l > 0) {
+ out[bytes++] = c64[((b%16)<<(6-l))%64];
+ }
+ if (l != 0) while (l < 6) {
+ out[bytes++] = '=', l += 2;
+ }
+ if (write(fd, &out, bytes) != bytes) {
+ return -1;
+ }
+
+ }
+
+
+
+ if (file) {
+ snprintf(buf, B64BUFFLEN, "\n\n--%s--\n.\n", bound);
+ if (!write_buf(fd, buf))
+ return JS_FALSE;
+ }
+ }
+
+ if (fd) {
+ close(fd);
+ }
+ if (ifd) {
+ close(ifd);
+ }
+ snprintf(buf, B64BUFFLEN, "/bin/cat %s | /usr/sbin/sendmail -tf \"%s\" %s", filename, from, to);
+ system(buf);
+ unlink(filename);
+
+
+ if (file) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Emailed file [%s] to [%s]\n", filename, to);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Emailed data to [%s]\n", to);
+ }
+ return JS_TRUE;
+ }
+
+
+ return JS_FALSE;
+}
+
static JSFunctionSpec etpan_methods[] = {
- {"myMethod", etpan_my_method, 1},
+// {"myMethod", odbc_my_method, 1},
{0}
};
-
static JSPropertySpec etpan_props[] = {
- {"name", etpan_NAME, JSPROP_READONLY|JSPROP_PERMANENT},
+// {"name", etpan_NAME, JSPROP_READONLY|JSPROP_PERMANENT},
{0}
};
@@ -81,8 +218,15 @@
};
+static JSFunctionSpec etpan_functions[] = {
+ {"email", js_email, 2},
+ {0}
+};
+
switch_status_t spidermonkey_load(JSContext *cx, JSObject *obj)
{
+ JS_DefineFunctions(cx, obj, etpan_functions);
+
JS_InitClass(cx,
obj,
NULL,
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c Fri Dec 1 14:16:46 2006
@@ -30,18 +30,18 @@
*
*/
#include "mod_spidermonkey.h"
-
-#include <sql.h>
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4201)
-#include <sqlext.h>
-#pragma warning(pop)
-#else
-#include <sqlext.h>
-#endif
-#include <sqltypes.h>
+#include <sql.h>
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4201)
+#include <sqlext.h>
+#pragma warning(pop)
+#else
+#include <sqlext.h>
+#endif
+#include <sqltypes.h>
+
static const char modname[] = "odbc";
/* ODBC Object */
@@ -65,13 +65,13 @@
};
static JSFunctionSpec odbc_methods[] = {
- {"myMethod", odbc_my_method, 1},
+// {"myMethod", odbc_my_method, 1},
{0}
};
static JSPropertySpec odbc_props[] = {
- {"name", odbc_NAME, JSPROP_READONLY|JSPROP_PERMANENT},
+// {"name", odbc_NAME, JSPROP_READONLY|JSPROP_PERMANENT},
{0}
};
1
0
[commit] r3509 - freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr
by Freeswitch SVN 01 Dec '06
by Freeswitch SVN 01 Dec '06
01 Dec '06
Author: mishehu
Date: Fri Dec 1 13:46:41 2006
New Revision: 3509
Modified:
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/README
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.h
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
Log:
Fixed mod_cdr for changes to switch_channel_t effected by anthm today. Also added in the ability to manually pause and unpause the popping of BaseCDR objects from the queue.
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/README
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/README (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/README Fri Dec 1 13:46:41 2006
@@ -85,9 +85,14 @@
Q: What would an example configuration look like?
A: Here is an excerpt from the freeswitch XML configuration file:
+Q: What about one-legged calls, such as calls to voicemail or playback?
+A: With the current changes in place (as of 2006-12-01), the value of originated will always be set to 0, but destuuid will always be blank. This will provide you with a method to bill for specific applications and/or calls if you so desire.
+
Q: What happened to the ani2 field?
A: Oops, you caught us. The real name for is it aniii. You will need to update any database schemas or external handlers for this change.
+Example configuration:
+
<configuration name="mod_cdr.conf" description="CDR Configuration">
<pddcdr>
<param name="path" value="/work/temp/pddcdr"/>
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp Fri Dec 1 13:46:41 2006
@@ -76,13 +76,17 @@
memset(aniii,0,80);
memset(lastapp,0,80);
memset(lastdata,0,255);
-
+
+ switch_channel_timetable_t *timetable;
+
coresession = newchannel->session;
- callstartdate= newchannel->timetable->created;
- callanswerdate = newchannel->timetable->answered;
- callenddate = newchannel->timetable->hungup;
+ timetable = switch_channel_get_timetable(newchannel->channel->caller_profile);
+ callstartdate= timetable->created;
+ callanswerdate = timetable->answered;
+ callenddate = timetable->hungup;
- if (newchannel->callerprofile) {
+ if (newchannel->callerprofile)
+ {
if(newchannel->callerprofile->caller_id_name != 0)
{
strncpy(clid,newchannel->callerprofile->caller_id_name,strlen(newchannel->callerprofile->caller_id_name));
@@ -104,34 +108,39 @@
if(newchannel->callerprofile->network_addr != 0)
strncpy(network_addr,newchannel->callerprofile->network_addr,strlen(newchannel->callerprofile->network_addr));
}
-
- originated = newchannel->originate;
-
- if(newchannel->originateprofile && newchannel->originateprofile->uuid != 0)
- strncpy(destuuid,newchannel->originateprofile->uuid,strlen(newchannel->originateprofile->uuid));
-
- // We still need to check if this is originated or not
- if(originated == 0)
+
+ switch_caller_profile_t *originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel->callerprofile);
+
+ // Were we the receiver of the call?
+ if(originateprofile)
{
- if (newchannel->callerprofile) {
- if(newchannel->callerprofile->destination_number != 0)
+ originated = 0;
+ if(newchannel->originateprofile->uuid != 0)
+ strncpy(destuuid,originateprofile->uuid,strlen(originateprofile->uuid));
+ if(newchannel->callerprofile)
+ {
+ if(newchannel->callerprofile->destination_number)
strncpy(src,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
if(newchannel->callerprofile->caller_id_number != 0)
strncpy(dst,newchannel->callerprofile->caller_id_number,strlen(newchannel->callerprofile->caller_id_number));
}
- if(newchannel->originateprofile && newchannel->originateprofile->chan_name != 0)
- strncpy(dstchannel,newchannel->originateprofile->chan_name,strlen(newchannel->originateprofile->chan_name));
}
else
{
- if (newchannel->callerprofile) {
- if(newchannel->callerprofile->caller_id_number != 0)
- strncpy(src,newchannel->callerprofile->caller_id_number,strlen(newchannel->callerprofile->caller_id_number));
- if(newchannel->callerprofile->destination_number != 0)
- strncpy(dst,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
+ originateprofile = switch_channel_get_originatee_profile(newchannel->channel->callerprofile);
+ // Or were we maybe we were the caller?
+ if(originateprofile)
+ {
+ originated = 1;
+ if (newchannel->callerprofile) {
+ if(newchannel->callerprofile->caller_id_number != 0)
+ strncpy(src,newchannel->callerprofile->caller_id_number,strlen(newchannel->callerprofile->caller_id_number));
+ if(newchannel->callerprofile->destination_number != 0)
+ strncpy(dst,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
+ }
+ if(originateprofile->chan_name != 0)
+ strncpy(dstchannel,newchannel->originateprofile->chan_name,strlen(newchannel->originateprofile->chan_name));
}
- if(newchannel->originateprofile && newchannel->originateprofile->chan_name != 0)
- strncpy(dstchannel,newchannel->originateprofile->chan_name,strlen(newchannel->originateprofile->chan_name));
}
strncpy(myuuid,newchannel->callerprofile->uuid,strlen(newchannel->callerprofile->uuid));
@@ -140,7 +149,7 @@
if(switch_channel_test_flag(newchannel->channel,CF_ANSWERED))
{
disposition=1;
- billusec = newchannel->timetable->hungup - newchannel->timetable->answered;
+ billusec = timetable->hungup - timetable->answered;
}
else
{
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h Fri Dec 1 13:46:41 2006
@@ -50,11 +50,11 @@
{
switch_core_session_t *session;
switch_channel_t *channel;
- switch_channel_timetable_t *timetable;
+ //switch_channel_timetable_t *timetable;
switch_caller_extension_t *callerextension;
switch_caller_profile_t *callerprofile;
- switch_caller_profile_t *originateprofile;
- bool originate;
+ //switch_caller_profile_t *originateprofile;
+ //bool originate;
};
enum switch_mod_cdr_sql_types_t { CDR_INTEGER,CDR_STRING,CDR_DECIMAL,CDR_DOUBLE,CDR_TINY };
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp Fri Dec 1 13:46:41 2006
@@ -45,6 +45,8 @@
// Create the APR threadsafe queue, though I don't know if this is the current memory pool.
switch_queue_create(&cdrqueue,5224288, module_pool);
+ queue_paused = 0;
+
strcpy(configfile,"mod_cdr.conf");
switch_mod_cdr_newchannel_t *newchannel; // = new switch_mod_cdr_newchannel_t;
@@ -90,8 +92,14 @@
switch_console_printf(SWITCH_CHANNEL_LOG,"mod_cdr shutdown gracefully.");
}
-void CDRContainer::reload()
+void CDRContainer::reload(switch_stream_handle_t *stream)
{
+ // The queue can't be paused otherwise it will never be able to reload safely.
+ if(queue_paused)
+ {
+ stream->write_function(stream,"The queue is currently paused, resuming it.\n");
+ queue_resume(stream);
+ }
// Something tells me I still need to figure out what to do if there are items still in queue after reload that are no longer active in the configuration.
switch_queue_isempty(cdrqueue); // Waits for the queue to be empty
@@ -138,6 +146,31 @@
switch_console_printf(SWITCH_CHANNEL_LOG,"mod_cdr configuration reloaded.");
}
+void CDRContainer::queue_pause(switch_stream_handle_t *stream)
+{
+ if(queue_paused)
+ stream->write_function(stream,"Queue is already paused.\n");
+ else
+ {
+ queue_paused = 1;
+ switch_queue_blockpop(cdrqueue);
+ stream->write_function(stream,"CDR queue is now paused. Beware that this can waste resources the longer you keep it paused.\n");
+ }
+}
+
+void CDRContainer::queue_resume(switch_stream_handle_t *stream)
+{
+ if(!queue_paused)
+ stream->write_function(stream,"Queue is currently running, no need to resume it.\n");
+ else
+ {
+ queue_paused = 0;
+ switch_queue_unblockpop(cdrqueue);
+ stream->write_function(stream,"CDR queue has now resumed processing CDR records.\n");
+ }
+
+}
+
void CDRContainer::add_cdr(switch_core_session_t *session)
{
switch_mod_cdr_newchannel_t *newchannel = new switch_mod_cdr_newchannel_t;
@@ -146,60 +179,31 @@
newchannel->channel = switch_core_session_get_channel(session);
assert(newchannel->channel != 0);
+ // Need to fix this up a bit so that it reflects a change to switch_caller_profile_t
+ // switch_channel_t will contain caller_profile, and caller_profile will contain
+ // the originator and originatee profile
newchannel->session = session;
- newchannel->timetable = switch_channel_get_timetable(newchannel->channel);
+ //newchannel->timetable = switch_channel_get_timetable(newchannel->channel);
newchannel->callerextension = switch_channel_get_caller_extension(newchannel->channel);
newchannel->callerprofile = switch_channel_get_caller_profile(newchannel->channel);
- newchannel->originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel);
+ //newchannel->originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel);
BaseRegistry& registry(BaseRegistry::get());
for(BaseRegistry::iterator it = registry.active_begin(); it != registry.active_end(); ++it)
{
- /*
- First time it might be originator profile, or originatee. Second and
- after is always going to be originatee profile.
- */
-
basecdr_creator func = *it;
- if(newchannel->originateprofile != 0 )
+ do
{
BaseCDR* newloggerobject = func(newchannel);
switch_console_printf(SWITCH_CHANNEL_LOG,"Adding a new logger object to the queue.\n");
switch_queue_push(cdrqueue,newloggerobject);
-
- if(newchannel->timetable->next != 0)
- {
- newchannel->originateprofile = switch_channel_get_originatee_caller_profile(newchannel->channel);
- newchannel->originate = 1;
- }
- }
- else
- {
- newchannel->originateprofile = switch_channel_get_originatee_caller_profile(newchannel->channel);
- if(newchannel->originateprofile != 0)
- {
- newchannel->originate = 1;
-
- BaseCDR* newloggerobject = func(newchannel);
- switch_console_printf(SWITCH_CHANNEL_LOG,"Adding a new logger object to the queue.\n");
- switch_queue_push(cdrqueue,newloggerobject);
- }
- }
-
- while (newchannel->timetable->next != 0 && newchannel->callerextension->next != 0 && newchannel->callerprofile->next != 0 && newchannel->originateprofile->next != 0 )
- {
- newchannel->timetable = newchannel->timetable->next;
newchannel->callerprofile = newchannel->callerprofile->next;
newchannel->callerextension = newchannel->callerextension->next;
- newchannel->originateprofile = newchannel->originateprofile->next;
-
- BaseCDR* newloggerobject = func(newchannel);
- switch_console_printf(SWITCH_CHANNEL_LOG,"Adding a new logger object to the queue.\n");
- switch_queue_push(cdrqueue,newloggerobject);
- }
+ } while (newchannel->callerprofile && newchannel->callerextension);
+
}
-
+
delete newchannel;
}
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.h (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.h Fri Dec 1 13:46:41 2006
@@ -58,13 +58,16 @@
~CDRContainer();
void add_cdr(switch_core_session_t *session);
void process_records();
- void reload();
+ void reload(switch_stream_handle_t *stream);
+ void queue_pause(switch_stream_handle_t *stream);
+ void queue_resume(switch_stream_handle_t *stream);
protected:
private:
switch_xml_t cfg, xml, settings, param;
switch_queue_t *cdrqueue;
std::string tempfilepath;
char configfile[13];
+ bool queue_paused;
};
#ifdef __cplusplus
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp Fri Dec 1 13:46:41 2006
@@ -64,6 +64,22 @@
/*.desc */ "Reload mod_cdr's configuration",
/*.function */ modcdr_reload,
/*.syntax */ "modcdr_reload",
+ /*.next */ &modcdr_queue_pause
+};
+
+static switch_api_interface_t modcdr_queue_pause = {
+ /*.interface_name */ "modcdr_queue_pause",
+ /*.desc */ "Manually pauses the popping of objects from the queue. (DANGER: Can suck your memory away rather quickly.)",
+ /*.function */ modcdr_queue_pause,
+ /*.syntax */ "modcdr_queue_pause",
+ /*.next */ &modcdr_queue_resume
+};
+
+static switch_api_interface_t modcdr_queue_resume = {
+ /*.interface_name */ "modcdr_queue_pause",
+ /*.desc */ "Manually resumes the popping of objects from the queue.",
+ /*.function */ modcdr_queue_resume,
+ /*.syntax */ "modcdr_queue_resume",
/*.next */ 0
};
@@ -117,9 +133,21 @@
static switch_status_t modcdr_reload(char *dest=0, switch_core_session_t *isession=0, switch_stream_handle_t *stream=0)
{
switch_thread_rwlock_wrlock(cdr_rwlock);
- newcdrcontainer->reload();
+ newcdrcontainer->reload(stream);
switch_thread_rwlock_unlock(cdr_rwlock);
stream->write_function(stream, "XML Reloaded and mod_cdr reloaded.\n");
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static switch_status_t modcdr_queue_pause(char *dest=0, switch_core_session_t *isession=0, switch_stream_handle_t *stream=0)
+{
+ newcdrcontainer->queue_pause(stream);
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static switch_status_t modcdr_queue_resume(char *dest=0, switch_core_session_t *isession=0, switch_stream_handle_t *stream=0)
+{
+ newcdrcontainer->queue_resume(stream);
return SWITCH_STATUS_SUCCESS;
}
1
0
01 Dec '06
Author: anthm
Date: Fri Dec 1 13:27:45 2006
New Revision: 3508
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
add some vars
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Fri Dec 1 13:27:45 2006
@@ -3927,6 +3927,8 @@
char *url_user = (char *) from->a_url->url_user;
char *to_user, *to_host, *to_port;
char *req_user, *req_host, *req_port;
+ char *contact_user, *contact_host, *contact_port;
+ char *via_rport, *via_host, *via_port;
char uri[1024];
if (!(tech_pvt = (private_object_t *) switch_core_session_alloc(session, sizeof(private_object_t)))) {
@@ -4028,6 +4030,23 @@
switch_channel_set_variable(channel, "sip_req_user", req_user);
switch_channel_set_variable(channel, "sip_req_host", req_host);
switch_channel_set_variable(channel, "sip_req_port", req_port);
+
+ contact_user = (char *) sip->sip_contact->m_url->url_user;
+ contact_host = (char *) sip->sip_contact->m_url->url_host;
+ contact_port = (char *) sip->sip_contact->m_url->url_port;
+
+ switch_channel_set_variable(channel, "sip_contact_user", contact_user);
+ switch_channel_set_variable(channel, "sip_contact_host", contact_host);
+ switch_channel_set_variable(channel, "sip_contact_port", contact_port);
+
+ via_host = (char *) sip->sip_via->v_host;
+ via_port = (char *) sip->sip_via->v_port;
+ via_rport = (char *) sip->sip_via->v_rport;
+
+ switch_channel_set_variable(channel, "sip_via_host", via_host);
+ switch_channel_set_variable(channel, "sip_via_port", via_port);
+ switch_channel_set_variable(channel, "sip_via_rport", via_rport);
+
snprintf(uri, sizeof(uri), "%s@%s:%s", req_user, req_host, req_port);
switch_channel_set_variable(channel, "sip_req_uri", uri);
1
0
[commit] r3507 - in freeswitch/trunk: . libs/win32 libs/win32/etpan src/mod/languages/mod_spidermonkey src/mod/languages/mod_spidermonkey_etpan src/mod/languages/mod_spidermonkey_odbc src/mod/languages/mod_spidermonkey_teletone
by Freeswitch SVN 01 Dec '06
by Freeswitch SVN 01 Dec '06
01 Dec '06
Author: mikej
Date: Fri Dec 1 12:59:58 2006
New Revision: 3507
Added:
freeswitch/trunk/libs/win32/Download ETPAN.vcproj
freeswitch/trunk/libs/win32/etpan/
freeswitch/trunk/libs/win32/etpan/cleancount
freeswitch/trunk/libs/win32/etpan/libetpan.vcproj
freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/
freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/Makefile
freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.vcproj
freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/
freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/Makefile
freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.vcproj
Modified:
freeswitch/trunk/Freeswitch.sln
freeswitch/trunk/src/mod/languages/mod_spidermonkey/Makefile
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.h
freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c
Log:
initial stubs for odbc and libetpan modules for spidermonkey. These do not do anything yet.
Modified: freeswitch/trunk/Freeswitch.sln
==============================================================================
--- freeswitch/trunk/Freeswitch.sln (original)
+++ freeswitch/trunk/Freeswitch.sln Fri Dec 1 12:59:58 2006
@@ -579,6 +579,30 @@
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_etpan", "src\mod\languages\mod_spidermonkey_etpan\mod_spidermonkey_etpan.vcproj", "{D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_odbc", "src\mod\languages\mod_spidermonkey_odbc\mod_spidermonkey_odbc.vcproj", "{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download ETPAN", "libs\win32\Download ETPAN.vcproj", "{EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libetpan", "libs\win32\etpan\libetpan.vcproj", "{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB} = {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -949,6 +973,22 @@
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Debug|Win32.Build.0 = Debug|Win32
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Release|Win32.ActiveCfg = Release|Win32
{71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Release|Win32.Build.0 = Release|Win32
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}.Debug|Win32.Build.0 = Debug|Win32
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}.Release|Win32.ActiveCfg = Release|Win32
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}.Release|Win32.Build.0 = Release|Win32
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Debug|Win32.Build.0 = Debug|Win32
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Release|Win32.ActiveCfg = Release|Win32
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Release|Win32.Build.0 = Release|Win32
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}.Debug|Win32.Build.0 = Debug|Win32
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}.Release|Win32.ActiveCfg = Release|Win32
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}.Release|Win32.Build.0 = Release|Win32
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Debug|Win32.Build.0 = Debug|Win32
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Release|Win32.ActiveCfg = Release|Win32
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1021,11 +1061,14 @@
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{7B077E7F-1BE7-4291-AB86-55E527B25CAC} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{8F992C49-6C51-412F-B2A3-34EAB708EB65} = {0C808854-54D1-4230-BFF5-77B5FD905000}
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9} = {0C808854-54D1-4230-BFF5-77B5FD905000}
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{692F6330-4D87-4C82-81DF-40DB5892636E} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}
{1C453396-D912-4213-89FD-9B489162B7B5} = {A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}
{CBEC7225-0C21-4DA8-978E-1F158F8AD950} = {F69A4A6B-9360-4EBB-A280-22AA3C455AC5}
@@ -1044,5 +1087,6 @@
{B0AA13FC-636C-45A7-8EAE-663220679A75} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{8B2CE7D1-77EF-45ED-927D-82147805440B} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {C120A020-773F-4EA3-923F-B67AF28B750D}
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB} = {C120A020-773F-4EA3-923F-B67AF28B750D}
EndGlobalSection
EndGlobal
Added: freeswitch/trunk/libs/win32/Download ETPAN.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/win32/Download ETPAN.vcproj Fri Dec 1 12:59:58 2006
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="Download ETPAN"
+ ProjectGUID="{EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}"
+ RootNamespace="Download ETPAN"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="10"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine=""
+ Outputs=""
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="10"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ BuildLogFile="$(IntDir)\BuildLog $(ProjectName).htm"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <File
+ RelativePath=".\etpan\cleancount"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Downloading ETPAN."
+ CommandLine="if not exist "$(ProjectDir)..\libetpan-0.46" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://svn.freeswitch.org/downloads/libs/libetpan-0.46.tar.gz "$(ProjectDir).."
"
+ Outputs="$(ProjectDir)..\libetpan-0.46"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Downloading ETPAN."
+ CommandLine="if not exist "$(ProjectDir)..\libetpan-0.46" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://svn.freeswitch.org/downloads/libs/libetpan-0.46.tar.gz "$(ProjectDir).."
"
+ Outputs="$(ProjectDir)..\libetpan-0.46"
+ />
+ </FileConfiguration>
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/libs/win32/etpan/cleancount
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/win32/etpan/cleancount Fri Dec 1 12:59:58 2006
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: freeswitch/trunk/libs/win32/etpan/libetpan.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/libs/win32/etpan/libetpan.vcproj Fri Dec 1 12:59:58 2006
@@ -0,0 +1,1109 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="libetpan"
+ ProjectGUID="{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}"
+ RootNamespace="libetpan"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ InlineFunctionExpansion="0"
+ AdditionalIncludeDirectories="../../libetpan-0.46/build-windows/include;../../libetpan-0.46/build-windows/include/libetpan"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBETPAN_DLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ CompileAs="1"
+ ForcedIncludeFiles="$(ProjectDir)../../libetpan-0.46/build-windows/StdAfx.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/DLL"
+ AdditionalDependencies="oldnames.lib Ws2_32.lib mswsock.lib"
+ OutputFile="$(SolutionDir)$(IntDir)/libetpan.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ IgnoreDefaultLibraryNames="C"
+ ModuleDefinitionFile=""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/libetpan.pdb"
+ MapExports="true"
+ SubSystem="0"
+ ImportLibrary="../Debug/libetpan.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../libetpan-0.46/build-windows/include;../../libetpan-0.46/build-windows/include/libetpan"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBETPAN_DLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="0"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="0"
+ CompileAs="1"
+ ForcedIncludeFiles="$(ProjectDir)../../libetpan-0.46/build-windows/StdAfx.h"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalOptions="/DLL"
+ AdditionalDependencies="oldnames.lib Ws2_32.lib mswsock.lib"
+ OutputFile="$(SolutionDir)$(IntDir)/libetpan.dll"
+ LinkIncremental="2"
+ IgnoreDefaultLibraryNames="C"
+ GenerateDebugInformation="false"
+ SubSystem="0"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ ImportLibrary="../Release/libetpan.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\build_headers.list"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cd ..\..\libetpan-0.46\build-windows
build_headers.bat
"
+ Outputs="$(InputDir)\_headers_depends"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="cd ..\..\libetpan-0.46\build-windows
build_headers.bat
"
+ Outputs="$(InputDir)\_headers_depends"
+ />
+ </FileConfiguration>
+ </File>
+ <Filter
+ Name="engine"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\engine\mailengine.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\engine\mailprivacy.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\engine\mailprivacy_gnupg.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\engine\mailprivacy_smime.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\engine\mailprivacy_tools.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="datatypes"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\base64.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\carray.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\charconv.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\chash.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\cinthash.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\clist.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\connect.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mail_cache_db.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\maillock.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mailsem.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mailstream.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mailstream_helper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mailstream_low.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mailstream_socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mailstream_ssl.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mapping.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\md5.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\data-types\mmapstring.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="low-level"
+ >
+ <Filter
+ Name="imap"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\acl.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\acl_parser.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\acl_sender.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\acl_types.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\annotatemore.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\annotatemore_parser.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\annotatemore_sender.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\annotatemore_types.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_extension.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_helper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_keywords.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_parser.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_print.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_sender.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_ssl.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_types.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imap\mailimap_types_helper.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="pop3"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\pop3\mailpop3.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\pop3\mailpop3_helper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\pop3\mailpop3_socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\pop3\mailpop3_ssl.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="mime"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_content.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_decode.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_disposition.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_types.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_types_helper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_write.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_write_file.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_write_generic.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mime\mailmime_write_mem.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="imf"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imf\mailimf.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imf\mailimf_types.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imf\mailimf_types_helper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imf\mailimf_write.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imf\mailimf_write_file.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imf\mailimf_write_generic.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\imf\mailimf_write_mem.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="maildir"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\maildir\maildir.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="mbox"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mbox\mailmbox.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mbox\mailmbox_parse.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mbox\mailmbox_types.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="mh"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\mh\mailmh.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="nntp"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\nntp\newsnntp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\nntp\newsnntp_socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\nntp\newsnntp_ssl.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="smtp"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\smtp\mailsmtp.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\smtp\mailsmtp_helper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\smtp\mailsmtp_socket.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\low-level\smtp\mailsmtp_ssl.c"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="driver"
+ >
+ <Filter
+ Name="interface"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\maildriver.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\maildriver_tools.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\maildriver_types.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\maildriver_types_helper.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\mailfolder.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\mailmessage.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\mailmessage_tools.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\mailmessage_types.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\mailstorage.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\interface\mailstorage_tools.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="implementation"
+ >
+ <Filter
+ Name="data-message"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\data-message\data_message_driver.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="db"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\db\dbdriver.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\db\dbdriver_message.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\db\dbstorage.c"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="hotmail"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\hotmail\hotmailstorage.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="imap"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\imap\imapdriver.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\imap\imapdriver_cached.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\imap\imapdriver_cached_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\imap\imapdriver_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\imap\imapdriver_tools.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\imap\imapstorage.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="maildir"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\maildir\maildirdriver.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\maildir\maildirdriver_cached.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\maildir\maildirdriver_cached_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\maildir\maildirdriver_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\maildir\maildirdriver_tools.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\maildir\maildirstorage.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="mbox"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mbox\mboxdriver.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mbox\mboxdriver_cached.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mbox\mboxdriver_cached_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mbox\mboxdriver_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mbox\mboxdriver_tools.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mbox\mboxstorage.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="mh"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mh\mhdriver.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mh\mhdriver_cached.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mh\mhdriver_cached_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mh\mhdriver_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mh\mhdriver_tools.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mh\mhstorage.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="mime-message"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\mime-message\mime_message_driver.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="nntp"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\nntp\nntpdriver.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\nntp\nntpdriver_cached.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\nntp\nntpdriver_cached_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\nntp\nntpdriver_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\nntp\nntpdriver_tools.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\nntp\nntpstorage.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="pop3"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\pop3\pop3driver.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\pop3\pop3driver_cached.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\pop3\pop3driver_cached_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\pop3\pop3driver_message.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\pop3\pop3driver_tools.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\implementation\pop3\pop3storage.c"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="tools"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\tools\generic_cache.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\tools\imfcache.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\tools\mailthread.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\driver\tools\mailthread_types.c"
+ >
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Windows"
+ >
+ <File
+ RelativePath="..\..\libetpan-0.46\src\windows\dirent.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\windows\misc.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\windows\mmap.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\windows\time_r.c"
+ >
+ </File>
+ <File
+ RelativePath="..\..\libetpan-0.46\src\windows\wsocket.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ CompileAs="2"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\libetpan-config.h"
+ >
+ </File>
+ <File
+ RelativePath="..\libetpan_version.h"
+ >
+ </File>
+ <File
+ RelativePath="..\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/Makefile (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/Makefile Fri Dec 1 12:59:58 2006
@@ -1,5 +1,5 @@
include sm.mak
-OBJS=$(BASE)/libs/mozilla/js/src/$(OS_CONFIG)_$(VER).OBJ/libjs.a $(BASE)/libs/mozilla/nsprpub/dist/lib/libnspr4.a -lcurl -letpan
+OBJS=$(BASE)/libs/mozilla/js/src/$(OS_CONFIG)_$(VER).OBJ/libjs.a $(BASE)/libs/mozilla/nsprpub/dist/lib/libnspr4.a -lcurl
LINKER=$(CC)
@@ -8,7 +8,6 @@
depends:
BUILD_OPT=$(BO) MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) mozilla.tar.gz --prefix=$(PREFIX)
MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install curl-7.15.2.tar.gz --prefix=$(PREFIX) --without-libidn
- MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libetpan-0.45.tar.gz --prefix=$(PREFIX)
$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.h
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.h (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.h Fri Dec 1 12:59:58 2006
@@ -50,7 +50,6 @@
#include "jsparse.h"
#include "jsscope.h"
#include "jsscript.h"
-#include <libteletone.h>
SWITCH_BEGIN_EXTERN_C
Added: freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/Makefile Fri Dec 1 12:59:58 2006
@@ -0,0 +1,20 @@
+include ../mod_spidermonkey/sm.mak
+
+OBJS=#$(BASE)/libs/mozilla/js/src/$(OS_CONFIG)_$(VER).OBJ/libjs.a $(BASE)/libs/mozilla/nsprpub/dist/lib/libnspr4.a -letpan
+LINKER=$(CC)
+
+
+all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN)
+
+depends:
+ MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libetpan-0.46.tar.gz --prefix=$(PREFIX)
+
+$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c
+ $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
+ $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS)
+
+clean:
+ rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~
+
+install:
+ cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod
Added: freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c Fri Dec 1 12:59:58 2006
@@ -0,0 +1,390 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005/2006, Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ *
+ * mod_spidermonkey_etpan.c -- etpan Javascript Module
+ *
+ */
+#include "mod_spidermonkey.h"
+#include <libetpan/libetpan.h>
+
+static const char modname[] = "etpan";
+
+/* etpan Object */
+/*********************************************************************************/
+static JSBool etpan_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+ return JS_TRUE;
+}
+
+static void etpan_destroy(JSContext *cx, JSObject *obj)
+{
+}
+
+static JSBool etpan_my_method(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+ return JS_FALSE;
+}
+
+enum etpan_tinyid {
+ etpan_NAME
+};
+
+static JSFunctionSpec etpan_methods[] = {
+ {"myMethod", etpan_my_method, 1},
+ {0}
+};
+
+
+static JSPropertySpec etpan_props[] = {
+ {"name", etpan_NAME, JSPROP_READONLY|JSPROP_PERMANENT},
+ {0}
+};
+
+
+static JSBool etpan_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
+{
+ JSBool res = JS_TRUE;
+
+ return res;
+}
+
+JSClass etpan_class = {
+ modname, JSCLASS_HAS_PRIVATE,
+ JS_PropertyStub, JS_PropertyStub, etpan_getProperty, JS_PropertyStub,
+ JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, etpan_destroy, NULL, NULL, NULL,
+ etpan_construct
+};
+
+
+switch_status_t spidermonkey_load(JSContext *cx, JSObject *obj)
+{
+ JS_InitClass(cx,
+ obj,
+ NULL,
+ &etpan_class,
+ etpan_construct,
+ 3,
+ etpan_props,
+ etpan_methods,
+ etpan_props,
+ etpan_methods
+ );
+ return SWITCH_STATUS_SUCCESS;
+}
+
+
+const sm_module_interface_t etpan_module_interface = {
+ /*.name = */ modname,
+ /*.spidermonkey_load*/ spidermonkey_load,
+ /*.next*/ NULL
+};
+
+SWITCH_MOD_DECLARE(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
+{
+ *module_interface = &etpan_module_interface;
+ return SWITCH_STATUS_SUCCESS;
+}
+
+/* sample code from smtp send example*/
+#if 0
+/* globals */
+char *smtp_server;
+uint16_t smtp_port = 25;
+char *smtp_user;
+char *smtp_password;
+char *smtp_from;
+int smtp_tls = 0;
+int smtp_esmtp = 1;
+
+struct mem_message {
+ char *data;
+ size_t len;
+ MMAPString *mstring;
+};
+
+#define BLOCKSIZE 4096
+
+int collect(struct mem_message *message) {
+ struct stat sb;
+ int len;
+
+ memset(message, 0, sizeof(struct mem_message));
+
+#ifndef MMAP_UNAVAILABLE
+ /* if stdin is a file whose size is known, try to mmap it */
+ if (!fstat(0, &sb) && S_ISREG(sb.st_mode) && sb.st_size >= 0) {
+ message->len = sb.st_size;
+ if ((message->data = mmap(NULL, message->len, PROT_READ, MAP_SHARED,
+ STDIN_FILENO, 0)) != MAP_FAILED)
+ return 0;
+ }
+#endif
+
+ /* read the buffer from stdin by blocks, until EOF or error.
+ save the message in a mmap_string */
+ if ((message->mstring = mmap_string_sized_new(BLOCKSIZE)) == NULL) {
+ perror("mmap_string_new");
+ goto error;
+ }
+ message->len = 0;
+
+ while ((len = read(STDIN_FILENO,
+ message->mstring->str + message->len, BLOCKSIZE)) > 0) {
+ message->len += len;
+ /* reserve room for next block */
+ if ((mmap_string_set_size(message->mstring,
+ message->len + BLOCKSIZE)) == NULL) {
+ perror("mmap_string_set_size");
+ goto error;
+ }
+ }
+
+ if (len == 0) {
+ message->data = message->mstring->str;
+ return 0; /* OK */
+ }
+
+ perror("read");
+
+ error:
+ if (message->mstring != NULL)
+ mmap_string_free(message->mstring);
+ return -1;
+}
+
+char *guessfrom() {
+#ifndef _MSC_VER
+ uid_t uid;
+ struct passwd *pw;
+ char hostname[256];
+ int len;
+ char *gfrom;
+
+ if (gethostname(hostname, sizeof(hostname))) {
+ perror("gethostname");
+ return NULL;
+ }
+ hostname[sizeof(hostname) - 1] = '\0';
+
+ uid = getuid();
+ pw = getpwuid(uid);
+
+ len = ((pw != NULL) ? strlen(pw->pw_name) : 12)
+ + strlen(hostname) + 2;
+
+ if ((gfrom = malloc(len)) == NULL) {
+ perror("malloc");
+ return NULL;
+ }
+ if (pw != NULL && pw->pw_name != NULL)
+ snprintf(gfrom, len, "%s@%s", pw->pw_name, hostname);
+ else
+ snprintf(gfrom, len, "#%u@%s", uid, hostname);
+ return gfrom;
+#else
+ return NULL;
+#endif
+}
+
+void release(struct mem_message *message) {
+ if (message->mstring != NULL)
+ mmap_string_free(message->mstring);
+#ifndef MMAP_UNAVAILABLE
+ else if (message->data != NULL)
+ munmap(message->data, message->len);
+#endif
+}
+
+int send_message(char *data, size_t len, char**rcpts) {
+ int s = -1;
+ int ret;
+ char **r;
+ int esmtp = 0;
+ mailsmtp *smtp = NULL;
+
+ if ((smtp = mailsmtp_new(0, NULL)) == NULL) {
+ perror("mailsmtp_new");
+ goto error;
+ }
+
+ /* first open the stream */
+ if ((ret = mailsmtp_socket_connect(smtp,
+ (smtp_server != NULL ? smtp_server : "localhost"),
+ smtp_port)) != MAILSMTP_NO_ERROR) {
+ fprintf(stderr, "mailsmtp_socket_connect: %s\n", mailsmtp_strerror(ret));
+ goto error;
+ }
+
+ /* then introduce ourselves */
+ if (smtp_esmtp && (ret = mailesmtp_ehlo(smtp)) == MAILSMTP_NO_ERROR)
+ esmtp = 1;
+ else if (!smtp_esmtp || ret == MAILSMTP_ERROR_NOT_IMPLEMENTED)
+ ret = mailsmtp_helo(smtp);
+ if (ret != MAILSMTP_NO_ERROR) {
+ fprintf(stderr, "mailsmtp_helo: %s\n", mailsmtp_strerror(ret));
+ goto error;
+ }
+
+ if (esmtp && smtp_tls &&
+ (ret = mailsmtp_socket_starttls(smtp)) != MAILSMTP_NO_ERROR) {
+ fprintf(stderr, "mailsmtp_starttls: %s\n", mailsmtp_strerror(ret));
+ goto error;
+ }
+
+ if (esmtp && smtp_user != NULL &&
+ (ret = mailsmtp_auth(smtp, smtp_user,
+ (smtp_password != NULL) ? smtp_password : ""))
+ != MAILSMTP_NO_ERROR) {
+ fprintf(stderr, "mailsmtp_auth: %s: %s\n", smtp_user, mailsmtp_strerror(ret));
+ goto error;
+ }
+
+ /* source */
+ if ((ret = (esmtp ?
+ mailesmtp_mail(smtp, smtp_from, 1, "etPanSMTPTest") :
+ mailsmtp_mail(smtp, smtp_from))) != MAILSMTP_NO_ERROR) {
+ fprintf(stderr, "mailsmtp_mail: %s, %s\n", smtp_from, mailsmtp_strerror(ret));
+ goto error;
+ }
+
+ /* recipients */
+ for (r = rcpts; *r != NULL; r++) {
+ if ((ret = (esmtp ?
+ mailesmtp_rcpt(smtp, *r,
+ MAILSMTP_DSN_NOTIFY_FAILURE|MAILSMTP_DSN_NOTIFY_DELAY,
+ NULL) :
+ mailsmtp_rcpt(smtp, *r))) != MAILSMTP_NO_ERROR) {
+ fprintf(stderr, "mailsmtp_rcpt: %s: %s\n", *r, mailsmtp_strerror(ret));
+ goto error;
+ }
+ }
+
+ /* message */
+ if ((ret = mailsmtp_data(smtp)) != MAILSMTP_NO_ERROR) {
+ fprintf(stderr, "mailsmtp_data: %s\n", mailsmtp_strerror(ret));
+ goto error;
+ }
+ if ((ret = mailsmtp_data_message(smtp, data, len)) != MAILSMTP_NO_ERROR) {
+ fprintf(stderr, "mailsmtp_data_message: %s\n", mailsmtp_strerror(ret));
+ goto error;
+ }
+ mailsmtp_free(smtp);
+ return 0;
+
+ error:
+ if (smtp != NULL)
+ mailsmtp_free(smtp);
+ if (s >= 0)
+ close(s);
+ return -1;
+}
+
+int main(int argc, char **argv) {
+ struct mem_message message;
+ int index, r;
+
+ static struct option long_options[] = {
+ {"server", 1, 0, 's'},
+ {"port", 1, 0, 'p'},
+ {"user", 1, 0, 'u'},
+ {"password", 1, 0, 'v'},
+ {"from", 1, 0, 'f'},
+ {"tls", 0, 0, 'S'},
+ {"no-esmtp", 0, 0, 'E'},
+ };
+
+ while(1) {
+ if ((r = getopt_long(argc, argv, "s:p:u:v:f:SE", long_options, &index)) < 0)
+ break;
+ switch (r) {
+ case 's':
+ if (smtp_server != NULL)
+ free(smtp_server);
+ smtp_server = strdup(optarg);
+ break;
+ case 'p':
+ smtp_port = (uint16_t) strtoul(optarg, NULL, 10);
+ break;
+ case 'u':
+ if (smtp_user != NULL)
+ free(smtp_user);
+ smtp_user = strdup(optarg);
+ break;
+ case 'v':
+ if (smtp_password != NULL)
+ free(smtp_password);
+ smtp_password = strdup(optarg);
+ break;
+ case 'f':
+ if (smtp_from != NULL)
+ free(smtp_from);
+ smtp_from = strdup(optarg);
+ break;
+ case 'S':
+ smtp_tls = 1;
+ break;
+ case 'E':
+ smtp_esmtp = 0;
+ break;
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc < 1) {
+ fprintf(stderr, "usage: smtpsend [-f from] [-u user] [-v password] [-s server] [-p port] [-S] <rcpts>...\n");
+ return EXIT_FAILURE;
+ }
+
+ if (smtp_from == NULL && (smtp_from = guessfrom()) == NULL) {
+ fprintf(stderr, "can't guess a valid from, please use -f option.\n");
+ return EXIT_FAILURE;
+ }
+
+ /* reads message from stdin */
+ if (collect(&message))
+ return EXIT_FAILURE;
+
+ send_message(message.data, message.len, argv);
+
+ release(&message);
+ return EXIT_SUCCESS;
+}
+
+#endif
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Added: freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.vcproj Fri Dec 1 12:59:58 2006
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="mod_spidermonkey_etpan"
+ ProjectGUID="{D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}"
+ RootNamespace="mod_spidermonkey_etpan"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\js20051231\src";"$(InputDir)..\..\..\..\libs\libetpan-0.46\build-windows\include";"$(InputDir)..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\include";"$(InputDir)..\mod_spidermonkey""
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;XP_WIN;DEBUG;_X86_=1;JSFILE;EXPORT_JS_API;HAVE_CURL;CURL_STATICLIB;JS_THREADSAFE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ WarnAsError="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkLibraryDependencies="true"
+ AdditionalDependencies="ws2_32.lib winmm.lib libnspr4.lib libplc4.lib libplds4.lib"
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\lib""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/mod_spidermonkey_etpan.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\js20051231\src";"$(InputDir)..\..\..\..\libs\libetpan-0.46\build-windows\include";"$(InputDir)..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\include";"$(InputDir)..\mod_spidermonkey""
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;XP_WIN;_X86_=1;JSFILE;EXPORT_JS_API;HAVE_CURL;CURL_STATICLIB;JS_THREADSAFE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ WarnAsError="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkLibraryDependencies="true"
+ AdditionalDependencies="ws2_32.lib winmm.lib libnspr4.lib libplc4.lib libplds4.lib"
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\lib""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ ImportLibrary="$(OutDir)/mod_spidermonkey_etpan.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\mod_spidermonkey_etpan.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/Makefile
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/Makefile Fri Dec 1 12:59:58 2006
@@ -0,0 +1,20 @@
+include ../mod_spidermonkey/sm.mak
+
+OBJS=#$(BASE)/libs/mozilla/js/src/$(OS_CONFIG)_$(VER).OBJ/libjs.a $(BASE)/libs/mozilla/nsprpub/dist/lib/libnspr4.a -lunixodbc
+LINKER=$(CC)
+
+
+all: depends $(MODNAME).$(DYNAMIC_LIB_EXTEN)
+
+depends:
+ MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install unixODBC-2.2.12.tar.gz --prefix=$(PREFIX)
+
+$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c
+ $(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
+ $(LINKER) $(SOLINK) -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(MODNAME).o $(OBJS) $(LDFLAGS)
+
+clean:
+ rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~
+
+install:
+ cp -f $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(PREFIX)/mod
Added: freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c Fri Dec 1 12:59:58 2006
@@ -0,0 +1,132 @@
+/*
+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ * Copyright (C) 2005/2006, Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
+ *
+ * The Initial Developer of the Original Code is
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ * Portions created by the Initial Developer are Copyright (C)
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Anthony Minessale II <anthmct(a)yahoo.com>
+ *
+ *
+ * mod_spidermonkey_odbc.c -- ODBC Javascript Module
+ *
+ */
+#include "mod_spidermonkey.h"
+
+#include <sql.h>
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4201)
+#include <sqlext.h>
+#pragma warning(pop)
+#else
+#include <sqlext.h>
+#endif
+#include <sqltypes.h>
+
+static const char modname[] = "odbc";
+
+/* ODBC Object */
+/*********************************************************************************/
+static JSBool odbc_construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+ return JS_TRUE;
+}
+
+static void odbc_destroy(JSContext *cx, JSObject *obj)
+{
+}
+
+static JSBool odbc_my_method(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
+{
+ return JS_FALSE;
+}
+
+enum odbc_tinyid {
+ odbc_NAME
+};
+
+static JSFunctionSpec odbc_methods[] = {
+ {"myMethod", odbc_my_method, 1},
+ {0}
+};
+
+
+static JSPropertySpec odbc_props[] = {
+ {"name", odbc_NAME, JSPROP_READONLY|JSPROP_PERMANENT},
+ {0}
+};
+
+
+static JSBool odbc_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
+{
+ JSBool res = JS_TRUE;
+
+ return res;
+}
+
+JSClass odbc_class = {
+ modname, JSCLASS_HAS_PRIVATE,
+ JS_PropertyStub, JS_PropertyStub, odbc_getProperty, JS_PropertyStub,
+ JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, odbc_destroy, NULL, NULL, NULL,
+ odbc_construct
+};
+
+
+switch_status_t spidermonkey_load(JSContext *cx, JSObject *obj)
+{
+ JS_InitClass(cx,
+ obj,
+ NULL,
+ &odbc_class,
+ odbc_construct,
+ 3,
+ odbc_props,
+ odbc_methods,
+ odbc_props,
+ odbc_methods
+ );
+ return SWITCH_STATUS_SUCCESS;
+}
+
+
+const sm_module_interface_t odbc_module_interface = {
+ /*.name = */ modname,
+ /*.spidermonkey_load*/ spidermonkey_load,
+ /*.next*/ NULL
+};
+
+SWITCH_MOD_DECLARE(switch_status_t) spidermonkey_init(const sm_module_interface_t **module_interface)
+{
+ *module_interface = &odbc_module_interface;
+ return SWITCH_STATUS_SUCCESS;
+}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Added: freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.vcproj
==============================================================================
--- (empty file)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.vcproj Fri Dec 1 12:59:58 2006
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="mod_spidermonkey_odbc"
+ ProjectGUID="{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}"
+ RootNamespace="mod_spidermonkey_odbc"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\js20051231\src";"$(InputDir)..\..\..\..\libs\curl-7.15.2\include";"$(InputDir)..\..\..\..\libs\libteletone\src";"$(InputDir)..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\include";"$(InputDir)..\mod_spidermonkey""
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;XP_WIN;DEBUG;_X86_=1;JSFILE;EXPORT_JS_API;HAVE_CURL;CURL_STATICLIB;JS_THREADSAFE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ WarnAsError="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkLibraryDependencies="true"
+ AdditionalDependencies="ws2_32.lib winmm.lib libnspr4.lib libplc4.lib libplds4.lib odbc32.lib "
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\lib""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/mod_spidermonkey_odbc.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ CommandLine=""
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\js20051231\src";"$(InputDir)..\..\..\..\libs\curl-7.15.2\include";"$(InputDir)..\..\..\..\libs\libteletone\src";"$(InputDir)..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\include";"$(InputDir)..\mod_spidermonkey""
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;XP_WIN;_X86_=1;JSFILE;EXPORT_JS_API;HAVE_CURL;CURL_STATICLIB;JS_THREADSAFE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ WarnAsError="true"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkLibraryDependencies="true"
+ AdditionalDependencies="ws2_32.lib winmm.lib libnspr4.lib libplc4.lib libplds4.lib odbc32.lib "
+ OutputFile="$(SolutionDir)$(OutDir)/mod/$(InputName).dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories=""..\..\..\..\libs\nspr-4.6.1.winnt5.$(OutDir)\nspr-4.6.1\lib""
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)$(TargetName).pdb"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ ImportLibrary="$(OutDir)/mod_spidermonkey_odbc.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\mod_spidermonkey_odbc.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c Fri Dec 1 12:59:58 2006
@@ -30,6 +30,7 @@
*
*/
#include "mod_spidermonkey.h"
+#include <libteletone.h>
static const char modname[] = "TeleTone";
1
0
Author: anthm
Date: Fri Dec 1 11:08:56 2006
New Revision: 3506
Modified:
freeswitch/trunk/src/switch_loadable_module.c
Log:
prevent double load of modules
Modified: freeswitch/trunk/src/switch_loadable_module.c
==============================================================================
--- freeswitch/trunk/src/switch_loadable_module.c (original)
+++ freeswitch/trunk/src/switch_loadable_module.c Fri Dec 1 11:08:56 2006
@@ -380,7 +380,12 @@
snprintf(path, len, "%s%s%s%s", dir, SWITCH_PATH_SEPARATOR, file, ext);
}
}
-
+
+ if (switch_core_hash_find(loadable_modules.module_hash, file)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Module %s Already Loaded!\n", file);
+ return SWITCH_STATUS_FALSE;
+ }
+
if ((status = switch_loadable_module_load_file(path, &new_module) == SWITCH_STATUS_SUCCESS)) {
return switch_loadable_module_process((char *) file, new_module);
} else {
1
0
Author: anthm
Date: Fri Dec 1 11:00:16 2006
New Revision: 3505
Modified:
freeswitch/trunk/src/include/switch_ivr.h
Log:
dox
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Fri Dec 1 11:00:16 2006
@@ -458,6 +458,7 @@
/*!
\brief Set a digit string terminator
\param parser a pointer to the parser object created by switch_ivr_digit_stream_parser_new
+ \param digit the terminator digit
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(switch_ivr_digit_stream_parser_t *parser, char digit);
1
0
[commit] r3504 - in freeswitch/trunk/src: . include mod/applications/mod_enum mod/languages/mod_spidermonkey
by Freeswitch SVN 01 Dec '06
by Freeswitch SVN 01 Dec '06
01 Dec '06
Author: anthm
Date: Fri Dec 1 10:26:37 2006
New Revision: 3504
Modified:
freeswitch/trunk/src/include/switch_caller.h
freeswitch/trunk/src/include/switch_channel.h
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/trunk/src/switch_channel.c
Log:
adjustments to the core do a make sure
Modified: freeswitch/trunk/src/include/switch_caller.h
==============================================================================
--- freeswitch/trunk/src/include/switch_caller.h (original)
+++ freeswitch/trunk/src/include/switch_caller.h Fri Dec 1 10:26:37 2006
@@ -88,6 +88,9 @@
char *context;
/*! flags */
switch_caller_profile_flag_t flags;
+ struct switch_caller_profile *originator_caller_profile;
+ struct switch_caller_profile *originatee_caller_profile;
+ struct switch_channel_timetable *times;
struct switch_caller_profile *next;
};
Modified: freeswitch/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/trunk/src/include/switch_channel.h (original)
+++ freeswitch/trunk/src/include/switch_channel.h Fri Dec 1 10:26:37 2006
@@ -46,6 +46,7 @@
switch_time_t created;
switch_time_t answered;
switch_time_t hungup;
+ switch_time_t transferred;
struct switch_channel_timetable *next;
};
@@ -428,9 +429,6 @@
*/
SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel, char *in);
-// These may go away
-SWITCH_DECLARE(switch_status_t) switch_channel_set_raw_mode (switch_channel_t *channel, int freq, int bits, int channels, int ms, int kbps);
-SWITCH_DECLARE(switch_status_t) switch_channel_get_raw_mode (switch_channel_t *channel, int *freq, int *bits, int *channels, int *ms, int *kbps);
/** @} */
SWITCH_END_EXTERN_C
Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c Fri Dec 1 10:26:37 2006
@@ -570,7 +570,7 @@
char vbuf[1024] = "";
char *rbp = rbuf;
switch_size_t l = 0, rbl = sizeof(rbuf);
- uint32_t cnt = 0;
+ uint32_t cnt = 1;
switch_channel_t *channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -583,10 +583,21 @@
dest = argv[0];
root = argv[1] ? argv[1] : globals.root;
if (enum_lookup(root, data, &results) == SWITCH_STATUS_SUCCESS) {
+ switch_hash_index_t *hi;
+ void *vval;
+ const void *vvar;
+
+ for (hi = switch_channel_variable_first(channel, switch_core_session_get_pool(session)); hi; hi = switch_hash_next(hi)) {
+ switch_hash_this(hi, &vvar, NULL, &vval);
+ if (vvar && !strncmp(vvar, "enum_", 5)) {
+ switch_channel_set_variable(channel, (char *) vvar, NULL);
+ }
+ }
+
for(rtp = globals.route_order; rtp; rtp = rtp->next) {
for(rp = results; rp; rp = rp->next) {
if (!strcmp(rtp->service, rp->service)) {
- snprintf(vbuf, sizeof(vbuf), "enum_route_%d", ++cnt);
+ snprintf(vbuf, sizeof(vbuf), "enum_route_%d", cnt++);
switch_channel_set_variable(channel, vbuf, rp->route);
snprintf(rbp, rbl, "%s|", rp->route);
@@ -596,6 +607,8 @@
}
}
}
+ snprintf(vbuf, sizeof(vbuf), "%d", cnt);
+ switch_channel_set_variable(channel, "enum_route_count", vbuf);
*(rbuf+strlen(rbuf)-1) = '\0';
switch_channel_set_variable(channel, "enum_auto_route", rbuf);
free_results(&results);
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Fri Dec 1 10:26:37 2006
@@ -862,14 +862,14 @@
}
if (argc > 4) {
- int32_t thresh;
- JS_ValueToInt32(cx, argv[4], &(int32)thresh);
+ int32 thresh;
+ JS_ValueToInt32(cx, argv[4], &thresh);
fh.thresh = thresh;
}
if (argc > 5) {
- int32_t silence_hits;
- JS_ValueToInt32(cx, argv[5], &(int32)silence_hits);
+ int32 silence_hits;
+ JS_ValueToInt32(cx, argv[5], &silence_hits);
fh.silence_hits = silence_hits;
}
}
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Fri Dec 1 10:26:37 2006
@@ -108,20 +108,12 @@
uint32_t flags;
uint32_t state_flags;
switch_caller_profile_t *caller_profile;
- switch_caller_profile_t *originator_caller_profile;
- switch_caller_profile_t *originatee_caller_profile;
switch_caller_extension_t *caller_extension;
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
int state_handler_index;
switch_hash_t *variables;
switch_hash_t *private_hash;
- switch_channel_timetable_t *times;
switch_call_cause_t hangup_cause;
- int freq;
- int bits;
- int channels;
- int ms;
- int kbps;
};
@@ -160,8 +152,16 @@
SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch_channel_t *channel)
{
+ switch_channel_timetable_t *times = NULL;
+
assert(channel != NULL);
- return channel->times;
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ times = channel->caller_profile->times;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
+
+ return times;
}
SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool)
@@ -184,46 +184,6 @@
return SWITCH_STATUS_SUCCESS;
}
-SWITCH_DECLARE(switch_status_t) switch_channel_set_raw_mode(switch_channel_t *channel, int freq, int bits, int channels,
- int ms, int kbps)
-{
-
- assert(channel != NULL);
-
- channel->freq = freq;
- channel->bits = bits;
- channel->channels = channels;
- channel->ms = ms;
- channel->kbps = kbps;
-
-
- return SWITCH_STATUS_SUCCESS;
-}
-
-SWITCH_DECLARE(switch_status_t) switch_channel_get_raw_mode(switch_channel_t *channel, int *freq, int *bits, int *channels,
- int *ms, int *kbps)
-{
- if (freq) {
- *freq = channel->freq;
- }
- if (bits) {
- *bits = channel->bits;
- }
- if (channels) {
- *channels = channel->channels;
- }
- if (ms) {
- *ms = channel->ms;
- }
- if (kbps) {
- *kbps = channel->kbps;
- }
-
- return SWITCH_STATUS_SUCCESS;
-
-}
-
-
SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(switch_channel_t *channel)
{
switch_size_t has;
@@ -306,7 +266,6 @@
channel->state = state;
channel->flags = flags;
channel->session = session;
- switch_channel_set_raw_mode(channel, 8000, 16, 1, 20, 8);
return SWITCH_STATUS_SUCCESS;
}
@@ -348,7 +307,7 @@
assert(channel != NULL);
if (!(v=switch_core_hash_find(channel->variables, varname))) {
- if (!(v = switch_caller_get_field_by_name(channel->caller_profile, varname))) {
+ if (!channel->caller_profile || !(v = switch_caller_get_field_by_name(channel->caller_profile, varname))) {
if (!strcmp(varname, "base_dir")) {
return SWITCH_GLOBAL_dirs.base_dir;
}
@@ -710,16 +669,17 @@
SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, switch_event_t *event)
{
- switch_caller_profile_t *caller_profile, *originator_caller_profile, *originatee_caller_profile;
+ switch_caller_profile_t *caller_profile, *originator_caller_profile = NULL, *originatee_caller_profile = NULL;
switch_hash_index_t *hi;
switch_codec_t *codec;
void *val;
const void *var;
char state_num[25];
- caller_profile = switch_channel_get_caller_profile(channel);
- originator_caller_profile = switch_channel_get_originator_caller_profile(channel);
- originatee_caller_profile = switch_channel_get_originatee_caller_profile(channel);
+ if ((caller_profile = switch_channel_get_caller_profile(channel))) {
+ originator_caller_profile = caller_profile->originator_caller_profile;
+ originatee_caller_profile = caller_profile->originatee_caller_profile;
+ }
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Channel-State", (char *) switch_channel_state_name(channel->state));
snprintf(state_num, sizeof(state_num), "%d", channel->state);
@@ -767,11 +727,10 @@
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile)
{
- switch_channel_timetable_t *times;
-
assert(channel != NULL);
assert(channel->session != NULL);
switch_mutex_lock(channel->profile_mutex);
+ assert(caller_profile != NULL);
if (!caller_profile->uuid) {
caller_profile->uuid = switch_core_session_strdup(channel->session, switch_core_session_get_uuid(channel->session));
@@ -793,13 +752,15 @@
switch_event_fire(&event);
}
}
-
- if ((times = (switch_channel_timetable_t *) switch_core_session_alloc(channel->session, sizeof(*times)))) {
- times->next = channel->times;
- channel->times = times;
- }
- channel->times->created = switch_time_now();
+
+ caller_profile->times = (switch_channel_timetable_t *) switch_core_session_alloc(channel->session, sizeof(*caller_profile->times));
+ caller_profile->times->created = switch_time_now();
+ if (channel->caller_profile && channel->caller_profile->times) {
+ channel->caller_profile->times->transferred = switch_time_now();
+ caller_profile->times->answered = channel->caller_profile->times->answered;
+ }
+
caller_profile->next = channel->caller_profile;
channel->caller_profile = caller_profile;
@@ -822,53 +783,61 @@
switch_caller_profile_t *caller_profile)
{
assert(channel != NULL);
- switch_mutex_lock(channel->profile_mutex);
- caller_profile->next = channel->originator_caller_profile;
- channel->originator_caller_profile = caller_profile;
- switch_mutex_unlock(channel->profile_mutex);
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ caller_profile->next = channel->caller_profile->originator_caller_profile;
+ channel->caller_profile->originator_caller_profile = caller_profile;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
}
SWITCH_DECLARE(void) switch_channel_set_originatee_caller_profile(switch_channel_t *channel,
switch_caller_profile_t *caller_profile)
{
assert(channel != NULL);
- switch_mutex_lock(channel->profile_mutex);
- caller_profile->next = channel->originatee_caller_profile;
- channel->originatee_caller_profile = caller_profile;
- switch_mutex_unlock(channel->profile_mutex);
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ caller_profile->next = channel->caller_profile->originatee_caller_profile;
+ channel->caller_profile->originatee_caller_profile = caller_profile;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
}
SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originator_caller_profile(switch_channel_t *channel)
{
- switch_caller_profile_t *profile;
+ switch_caller_profile_t *profile = NULL;
assert(channel != NULL);
- switch_mutex_lock(channel->profile_mutex);
- profile = channel->originator_caller_profile;
- switch_mutex_unlock(channel->profile_mutex);
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ profile = channel->caller_profile->originator_caller_profile;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
return profile;
}
-SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel_t *channel)
-{
- assert(channel != NULL);
- assert(channel->session != NULL);
- return switch_core_session_get_uuid(channel->session);
-}
-
SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originatee_caller_profile(switch_channel_t *channel)
{
- switch_caller_profile_t *profile;
+ switch_caller_profile_t *profile = NULL;
assert(channel != NULL);
- switch_mutex_lock(channel->profile_mutex);
- profile = channel->originatee_caller_profile;
- switch_mutex_unlock(channel->profile_mutex);
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ profile = channel->caller_profile->originatee_caller_profile;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
return profile;
}
+SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel_t *channel)
+{
+ assert(channel != NULL);
+ assert(channel->session != NULL);
+ return switch_core_session_get_uuid(channel->session);
+}
+
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel_t *channel,
const switch_state_handler_table_t *state_handler)
{
@@ -974,8 +943,10 @@
assert(channel != NULL);
switch_mutex_lock(channel->flag_mutex);
- if (channel->times && !channel->times->hungup) {
- channel->times->hungup = switch_time_now();
+ if (channel->caller_profile && channel->caller_profile->times && !channel->caller_profile->times->hungup) {
+ switch_mutex_lock(channel->profile_mutex);
+ channel->caller_profile->times->hungup = switch_time_now();
+ switch_mutex_unlock(channel->profile_mutex);
}
if (channel->state < CS_HANGUP) {
@@ -1096,7 +1067,12 @@
if (switch_core_session_answer_channel(channel->session) == SWITCH_STATUS_SUCCESS) {
switch_event_t *event;
- channel->times->answered = switch_time_now();
+ if (channel->caller_profile && channel->caller_profile->times) {
+ switch_mutex_lock(channel->profile_mutex);
+ channel->caller_profile->times->answered = switch_time_now();
+ switch_mutex_unlock(channel->profile_mutex);
+ }
+
switch_channel_set_flag(channel, CF_ANSWERED);
switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_NOTICE, "Answer %s!\n", channel->name);
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_ANSWER) == SWITCH_STATUS_SUCCESS) {
1
0
[commit] r3503 - in freeswitch/trunk: libs/win32/udns src/mod/applications/mod_enum
by Freeswitch SVN 01 Dec '06
by Freeswitch SVN 01 Dec '06
01 Dec '06
Author: mikej
Date: Fri Dec 1 01:12:07 2006
New Revision: 3503
Modified:
freeswitch/trunk/libs/win32/udns/libudns.vcproj
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.vcproj
Log:
fix mod_enum on windows, fix logic error in free function causing operations on freed memory
Modified: freeswitch/trunk/libs/win32/udns/libudns.vcproj
==============================================================================
--- freeswitch/trunk/libs/win32/udns/libudns.vcproj (original)
+++ freeswitch/trunk/libs/win32/udns/libudns.vcproj Fri Dec 1 01:12:07 2006
@@ -20,7 +20,7 @@
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
- CharacterSet="1"
+ CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c Fri Dec 1 01:12:07 2006
@@ -258,10 +258,10 @@
for(rp = *results; rp;) {
fp = rp;
+ rp = rp->next;
switch_safe_free(fp->service);
switch_safe_free(fp->route);
switch_safe_free(fp);
- rp = rp->next;
}
*results = NULL;
}
Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.vcproj (original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.vcproj Fri Dec 1 01:12:07 2006
@@ -21,7 +21,7 @@
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
+ CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
@@ -104,7 +104,7 @@
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
1
0
Author: sphere
Date: Fri Dec 1 00:20:28 2006
New Revision: 3502
Added:
freeswitch/branches/pgupta35/
Log:
Creating empty folder for pgupta35
1
0
Author: sphere
Date: Thu Nov 30 19:25:29 2006
New Revision: 3501
Added:
freeswitch/branches/eurosomtel/
Log:
Creating empty folder for eurosomtel
1
0