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
August 2006
- 16 participants
- 260 discussions
Author: anthm
Date: Wed Aug 16 22:45:55 2006
New Revision: 2313
Modified:
freeswitch/trunk/src/switch_ivr.c
Log:
changed my mind i think the confirm option is cool even when you call 1 dest
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Wed Aug 16 22:45:55 2006
@@ -1196,52 +1196,46 @@
int32_t i;
*idx = -1;
+ int32_t hups = 0;
- if (len == 1) {
- *idx = 0;
- return (switch_channel_get_state(peer_channels[0]) < CS_HANGUP &&
- !switch_channel_test_flag(peer_channels[0], CF_ANSWERED) &&
- !switch_channel_test_flag(peer_channels[0], CF_EARLY_MEDIA)) ? 1 : 0;
- } else {
- int32_t hups = 0;
+ for (i = 0; i < len; i++) {
+ if (!peer_channels[i]) {
+ continue;
+ }
+ if (switch_channel_get_state(peer_channels[i]) >= CS_HANGUP) {
+ hups++;
+ } else if ((switch_channel_test_flag(peer_channels[i], CF_ANSWERED) || (len == 1 && switch_channel_test_flag(peer_channels[0], CF_EARLY_MEDIA))) &&
+ !switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
- for (i = 0; i < len; i++) {
- if (!peer_channels[i]) {
- continue;
- }
- if (switch_channel_get_state(peer_channels[i]) >= CS_HANGUP) {
- hups++;
- } else if (switch_channel_test_flag(peer_channels[i], CF_ANSWERED) && !switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
+ if (key) {
+ struct key_collect *collect;
- if (key) {
- struct key_collect *collect;
-
- if ((collect = switch_core_session_alloc(peer_sessions[i], sizeof(*collect)))) {
- switch_channel_set_flag(peer_channels[i], CF_TAGGED);
- collect->key = key;
- if (file) {
- collect->file = switch_core_session_strdup(peer_sessions[i], file);
- }
- collect->session = peer_sessions[i];
- launch_collect_thread(collect);
+ if ((collect = switch_core_session_alloc(peer_sessions[i], sizeof(*collect)))) {
+ switch_channel_set_flag(peer_channels[i], CF_TAGGED);
+ collect->key = key;
+ if (file) {
+ collect->file = switch_core_session_strdup(peer_sessions[i], file);
}
- } else {
- *idx = i;
- return 0;
-
+ collect->session = peer_sessions[i];
+ launch_collect_thread(collect);
}
- } else if (switch_channel_test_flag(peer_channels[i], CF_WINNER)) {
+ } else {
*idx = i;
return 0;
+
}
- }
-
- if (hups == len) {
+ } else if (switch_channel_test_flag(peer_channels[i], CF_WINNER)) {
+ *idx = i;
return 0;
- } else {
- return 1;
}
}
+
+ if (hups == len) {
+ return 0;
+ } else {
+ return 1;
+ }
+
}
#define MAX_PEERS 256
@@ -1266,7 +1260,7 @@
switch_memory_pool_t *pool;
char *data = NULL;
int i, argc;
- int32_t idx = -1, ccount = 0;
+ int32_t idx = -1;
switch_codec_t write_codec = {0};
switch_frame_t write_frame = {0};
uint8_t err = 0, fdata[1024];
@@ -1302,8 +1296,6 @@
caller_channel = switch_core_session_get_channel(session);
assert(caller_channel != NULL);
-
-
if ((var = switch_channel_get_variable(caller_channel, "group_confirm_key"))) {
key = switch_core_session_strdup(session, var);
if ((var = switch_channel_get_variable(caller_channel, "group_confirm_file"))) {
@@ -1414,15 +1406,6 @@
}
time(&start);
- for (i = 0; i < argc; i++) {
- if (peer_channels[i]) {
- ccount++;
- }
- }
-
- if (ccount == 1) {
- key = file = NULL;
- }
for (;;) {
for (i = 0; i < argc; i++) {
1
0
[commit] r2312 - in freeswitch/branches/james: . libs/libdingaling/src mac/xcode/FreeSWITCH.xcodeproj src src/include src/mod/applications/mod_bridgecall src/mod/applications/mod_conference src/mod/endpoints/mod_iax src/mod/event_handlers/mod_cdr w32/Setup
by Freeswitch SVN 17 Aug '06
by Freeswitch SVN 17 Aug '06
17 Aug '06
Author: james
Date: Wed Aug 16 20:59:56 2006
New Revision: 2312
Modified:
freeswitch/branches/james/ (props changed)
freeswitch/branches/james/libs/libdingaling/src/libdingaling.c
freeswitch/branches/james/mac/xcode/FreeSWITCH.xcodeproj/project.pbxproj
freeswitch/branches/james/src/include/switch_ivr.h
freeswitch/branches/james/src/include/switch_types.h
freeswitch/branches/james/src/mod/applications/mod_bridgecall/mod_bridgecall.c
freeswitch/branches/james/src/mod/applications/mod_conference/mod_conference.c
freeswitch/branches/james/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/branches/james/src/mod/endpoints/mod_iax/mod_iax.vcproj
freeswitch/branches/james/src/mod/event_handlers/mod_cdr/basecdr.cpp
freeswitch/branches/james/src/mod/event_handlers/mod_cdr/csvcdr.cpp
freeswitch/branches/james/src/mod/event_handlers/mod_cdr/pddcdr.cpp
freeswitch/branches/james/src/switch.c
freeswitch/branches/james/src/switch_channel.c
freeswitch/branches/james/src/switch_core.c
freeswitch/branches/james/src/switch_event.c
freeswitch/branches/james/src/switch_ivr.c
freeswitch/branches/james/src/switch_log.c
freeswitch/branches/james/w32/Setup/Setup.vdproj
Log:
Update to trunk.
Modified: freeswitch/branches/james/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/branches/james/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/branches/james/libs/libdingaling/src/libdingaling.c Wed Aug 16 20:59:56 2006
@@ -592,7 +592,8 @@
#define B64BUFFLEN 1024
static int b64encode(unsigned char *in, uint32_t ilen, unsigned char *out, uint32_t olen) {
- int x=0,y=0,bytes=0;
+ int y=0,bytes=0;
+ uint32_t x=0;
unsigned int b=0,l=0;
for(x=0;x<ilen;x++) {
@@ -667,7 +668,7 @@
iks_insert_attrib(x, "mechanism", "PLAIN");
iks_insert_attrib(x, "encoding", "UTF-8");
snprintf(s, sizeof(s), "%c%s%c%s", 0, handle->acc->user, 0, handle->password);
- slen = strlen(handle->acc->user) + strlen(handle->password) + 2;
+ slen = (uint32_t)(strlen(handle->acc->user) + strlen(handle->password) + 2);
b64encode((unsigned char *)s, slen, (unsigned char *) base64, sizeof(base64));
iks_insert_cdata(x, base64, 0);
iks_send(handle->parser, x);
Modified: freeswitch/branches/james/mac/xcode/FreeSWITCH.xcodeproj/project.pbxproj
==============================================================================
--- freeswitch/branches/james/mac/xcode/FreeSWITCH.xcodeproj/project.pbxproj (original)
+++ freeswitch/branches/james/mac/xcode/FreeSWITCH.xcodeproj/project.pbxproj Wed Aug 16 20:59:56 2006
@@ -195,6 +195,30 @@
D34725610A76D91E001C8ED7 /* apr.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3DEC21D0A75CB06002001CF /* apr.framework */; };
D34725C40A76D954001C8ED7 /* mod_iax.c in Sources */ = {isa = PBXBuildFile; fileRef = D34725C30A76D954001C8ED7 /* mod_iax.c */; };
D34725CA0A76D9BF001C8ED7 /* iax.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D34725350A76D7B1001C8ED7 /* iax.framework */; };
+ D35834B20A8F8047004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834B40A8F8052004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834B50A8F8058004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834B60A8F805D004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834B70A8F8069004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834B80A8F806E004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834B90A8F8072004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834BA0A8F807A004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834BB0A8F807F004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834BC0A8F8085004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834BE0A8F8094004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834BF0A8F8099004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C00A8F809F004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C10A8F80A3004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C20A8F80A9004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C30A8F80AF004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C40A8F80B3004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C50A8F80BB004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C60A8F80C1004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C70A8F80C9004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834C90A8F80D1004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834CA0A8F80D6004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834DD0A8F968C004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
+ D35834DE0A8F9699004459D4 /* pcre.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D36500F10A76BE9400C47A76 /* pcre.framework */; };
D36500860A76BE4700C47A76 /* mod_dialplan_xml.c in Sources */ = {isa = PBXBuildFile; fileRef = D36500850A76BE4700C47A76 /* mod_dialplan_xml.c */; };
D36500870A76BE5A00C47A76 /* apr.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3DEC21D0A75CB06002001CF /* apr.framework */; };
D36500880A76BE5A00C47A76 /* aprutil.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3DEC6CF0A75D4E9002001CF /* aprutil.framework */; };
@@ -1171,6 +1195,13 @@
remoteGlobalIDString = D34725340A76D7B1001C8ED7;
remoteInfo = iax2;
};
+ D35834D60A8F9679004459D4 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = D36500F00A76BE9400C47A76 /* pcre */;
+ remoteInfo = pcre;
+ };
D36501760A76C28200C47A76 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
@@ -2481,6 +2512,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C30A8F80AF004459D4 /* pcre.framework in Frameworks */,
D3152FB50A76F27000549119 /* apr.framework in Frameworks */,
D3152FB60A76F27000549119 /* aprutil.framework in Frameworks */,
D3152FB70A76F27000549119 /* libfreeswitch.framework in Frameworks */,
@@ -2498,6 +2530,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C20A8F80A9004459D4 /* pcre.framework in Frameworks */,
D34725CA0A76D9BF001C8ED7 /* iax.framework in Frameworks */,
D347255B0A76D91E001C8ED7 /* teletone.framework in Frameworks */,
D347255C0A76D91E001C8ED7 /* srtp.framework in Frameworks */,
@@ -2539,6 +2572,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834BE0A8F8094004459D4 /* pcre.framework in Frameworks */,
D36501F10A76C64200C47A76 /* apr.framework in Frameworks */,
D36501F20A76C64200C47A76 /* aprutil.framework in Frameworks */,
D36501F30A76C64200C47A76 /* libfreeswitch.framework in Frameworks */,
@@ -2555,6 +2589,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834BF0A8F8099004459D4 /* pcre.framework in Frameworks */,
D36501F80A76C64A00C47A76 /* apr.framework in Frameworks */,
D36501F90A76C64A00C47A76 /* aprutil.framework in Frameworks */,
D36501FA0A76C64A00C47A76 /* libfreeswitch.framework in Frameworks */,
@@ -2571,6 +2606,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C00A8F809F004459D4 /* pcre.framework in Frameworks */,
D36501FF0A76C65300C47A76 /* apr.framework in Frameworks */,
D36502000A76C65300C47A76 /* aprutil.framework in Frameworks */,
D36502010A76C65300C47A76 /* libfreeswitch.framework in Frameworks */,
@@ -2594,6 +2630,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C10A8F80A3004459D4 /* pcre.framework in Frameworks */,
D365025F0A76C91100C47A76 /* gsm.framework in Frameworks */,
D36502570A76C90700C47A76 /* apr.framework in Frameworks */,
D36502580A76C90700C47A76 /* aprutil.framework in Frameworks */,
@@ -2642,6 +2679,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834DD0A8F968C004459D4 /* pcre.framework in Frameworks */,
D30DE7670A7819B300C8AAD5 /* System.framework in Frameworks */,
D38DD5540A768CB100FEDB19 /* resample.framework in Frameworks */,
D38DD51F0A768B4700FEDB19 /* srtp.framework in Frameworks */,
@@ -2656,6 +2694,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834DE0A8F9699004459D4 /* pcre.framework in Frameworks */,
D38DD55C0A768CD600FEDB19 /* srtp.framework in Frameworks */,
D38DD55A0A768CCB00FEDB19 /* speakup.framework in Frameworks */,
D38DD5590A768CC700FEDB19 /* resample.framework in Frameworks */,
@@ -2671,6 +2710,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C40A8F80B3004459D4 /* pcre.framework in Frameworks */,
D3B4072E0A76EED9000AF6D4 /* speex.framework in Frameworks */,
D3B406CA0A76EED0000AF6D4 /* apr.framework in Frameworks */,
D3B406CB0A76EED0000AF6D4 /* aprutil.framework in Frameworks */,
@@ -2688,6 +2728,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834B20A8F8047004459D4 /* pcre.framework in Frameworks */,
D3BC32480A769B9C00DE971E /* teletone.framework in Frameworks */,
D3BC32460A769B9100DE971E /* resample.framework in Frameworks */,
D3BC32450A769B8C00DE971E /* srtp.framework in Frameworks */,
@@ -2704,6 +2745,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834B40A8F8052004459D4 /* pcre.framework in Frameworks */,
D3BC326A0A769D7700DE971E /* teletone.framework in Frameworks */,
D3BC326B0A769D7700DE971E /* resample.framework in Frameworks */,
D3BC326C0A769D7700DE971E /* srtp.framework in Frameworks */,
@@ -2722,6 +2764,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834B50A8F8058004459D4 /* pcre.framework in Frameworks */,
D3BC32850A769E2700DE971E /* teletone.framework in Frameworks */,
D3BC32860A769E2700DE971E /* resample.framework in Frameworks */,
D3BC32870A769E2700DE971E /* srtp.framework in Frameworks */,
@@ -2754,6 +2797,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834B60A8F805D004459D4 /* pcre.framework in Frameworks */,
D3BC32ED0A76A75B00DE971E /* teletone.framework in Frameworks */,
D3BC32EE0A76A75B00DE971E /* resample.framework in Frameworks */,
D3BC32EF0A76A75B00DE971E /* srtp.framework in Frameworks */,
@@ -2770,6 +2814,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834B70A8F8069004459D4 /* pcre.framework in Frameworks */,
D3BC33000A76A7EB00DE971E /* teletone.framework in Frameworks */,
D3BC33010A76A7EB00DE971E /* resample.framework in Frameworks */,
D3BC33020A76A7EB00DE971E /* srtp.framework in Frameworks */,
@@ -2786,6 +2831,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834B90A8F8072004459D4 /* pcre.framework in Frameworks */,
D3BC33130A76A86A00DE971E /* apr.framework in Frameworks */,
D3BC33140A76A86A00DE971E /* aprutil.framework in Frameworks */,
D3BC33150A76A86A00DE971E /* libfreeswitch.framework in Frameworks */,
@@ -2802,6 +2848,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834B80A8F806E004459D4 /* pcre.framework in Frameworks */,
D3BC332A0A76A8BC00DE971E /* apr.framework in Frameworks */,
D3BC332B0A76A8BC00DE971E /* aprutil.framework in Frameworks */,
D3BC332C0A76A8BC00DE971E /* libfreeswitch.framework in Frameworks */,
@@ -2818,6 +2865,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834BA0A8F807A004459D4 /* pcre.framework in Frameworks */,
D3BC33450A76AA0D00DE971E /* apr.framework in Frameworks */,
D3BC33460A76AA0D00DE971E /* aprutil.framework in Frameworks */,
D3BC33470A76AA0D00DE971E /* libfreeswitch.framework in Frameworks */,
@@ -2842,6 +2890,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834BB0A8F807F004459D4 /* pcre.framework in Frameworks */,
D3BC34DC0A76B05C00DE971E /* sndfile.framework in Frameworks */,
D3BC34D40A76B04600DE971E /* apr.framework in Frameworks */,
D3BC34D50A76B04600DE971E /* aprutil.framework in Frameworks */,
@@ -2859,6 +2908,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834BC0A8F8085004459D4 /* pcre.framework in Frameworks */,
D3BC34ED0A76B17800DE971E /* apr.framework in Frameworks */,
D3BC34EE0A76B17800DE971E /* aprutil.framework in Frameworks */,
D3BC34EF0A76B17800DE971E /* libfreeswitch.framework in Frameworks */,
@@ -2893,6 +2943,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C60A8F80C1004459D4 /* pcre.framework in Frameworks */,
D3E66A800A77E63C00D04E25 /* apr.framework in Frameworks */,
D3E66A810A77E63C00D04E25 /* aprutil.framework in Frameworks */,
D3E66A820A77E63C00D04E25 /* libfreeswitch.framework in Frameworks */,
@@ -2909,6 +2960,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C70A8F80C9004459D4 /* pcre.framework in Frameworks */,
D3E66B190A77E7F400D04E25 /* apr.framework in Frameworks */,
D3E66B1A0A77E7F400D04E25 /* aprutil.framework in Frameworks */,
D3E66B1B0A77E7F400D04E25 /* libfreeswitch.framework in Frameworks */,
@@ -2925,6 +2977,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C90A8F80D1004459D4 /* pcre.framework in Frameworks */,
D3E66B200A77E7FC00D04E25 /* apr.framework in Frameworks */,
D3E66B210A77E7FC00D04E25 /* aprutil.framework in Frameworks */,
D3E66B220A77E7FC00D04E25 /* libfreeswitch.framework in Frameworks */,
@@ -2941,6 +2994,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834CA0A8F80D6004459D4 /* pcre.framework in Frameworks */,
D3E66B270A77E80400D04E25 /* apr.framework in Frameworks */,
D3E66B280A77E80400D04E25 /* aprutil.framework in Frameworks */,
D3E66B290A77E80400D04E25 /* libfreeswitch.framework in Frameworks */,
@@ -2981,6 +3035,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ D35834C50A8F80BB004459D4 /* pcre.framework in Frameworks */,
D3AA5D290A77D54A008F105E /* exosip2.framework in Frameworks */,
D3AA5D2A0A77D54A008F105E /* osip2.framework in Frameworks */,
D3AA5D2B0A77D54A008F105E /* osipparser2.framework in Frameworks */,
@@ -5739,6 +5794,7 @@
buildRules = (
);
dependencies = (
+ D35834D70A8F9679004459D4 /* PBXTargetDependency */,
D36501BF0A76C40000C47A76 /* PBXTargetDependency */,
D36501D50A76C54300C47A76 /* PBXTargetDependency */,
D36501BD0A76C3FB00C47A76 /* PBXTargetDependency */,
@@ -7368,6 +7424,11 @@
isa = PBXTargetDependency;
target = D34725340A76D7B1001C8ED7 /* iax */;
targetProxy = D34725570A76D904001C8ED7 /* PBXContainerItemProxy */;
+ };
+ D35834D70A8F9679004459D4 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = D36500F00A76BE9400C47A76 /* pcre */;
+ targetProxy = D35834D60A8F9679004459D4 /* PBXContainerItemProxy */;
};
D36501770A76C28200C47A76 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
Modified: freeswitch/branches/james/src/include/switch_ivr.h
==============================================================================
--- freeswitch/branches/james/src/include/switch_ivr.h (original)
+++ freeswitch/branches/james/src/include/switch_ivr.h Wed Aug 16 20:59:56 2006
@@ -164,6 +164,22 @@
void *buf,
unsigned int buflen);
+/*!
+ \brief Make an outgoing call
+ \param session originating session
+ \param bleg B leg session
+ \param bridgeto the desired remote callstring
+ \param table optional state handler table to install on the channel
+ \param cid_name_override override the caller id name
+ \param cid_num_override override the caller id number
+ \return SWITCH_STATUS_SUCCESS if bleg is a running session.
+*/
+SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *session,
+ switch_core_session_t **bleg,
+ char *bridgeto,
+ const switch_state_handler_table_t *table,
+ char *cid_name_override,
+ char *cid_num_override);
/*!
\brief Bridge Audio from one session to another
Modified: freeswitch/branches/james/src/include/switch_types.h
==============================================================================
--- freeswitch/branches/james/src/include/switch_types.h (original)
+++ freeswitch/branches/james/src/include/switch_types.h Wed Aug 16 20:59:56 2006
@@ -86,7 +86,7 @@
typedef struct switch_directories switch_directories;
SWITCH_DECLARE_DATA extern switch_directories SWITCH_GLOBAL_dirs;
-#define SWITCH_THREAD_STACKSIZE 512 * 1024
+#define SWITCH_THREAD_STACKSIZE 384 * 1024
#define SWITCH_RECCOMMENDED_BUFFER_SIZE 2048
#define SWITCH_MAX_CODECS 30
#define SWITCH_MAX_STATE_HANDLERS 30
Modified: freeswitch/branches/james/src/mod/applications/mod_bridgecall/mod_bridgecall.c
==============================================================================
--- freeswitch/branches/james/src/mod/applications/mod_bridgecall/mod_bridgecall.c (original)
+++ freeswitch/branches/james/src/mod/applications/mod_bridgecall/mod_bridgecall.c Wed Aug 16 20:59:56 2006
@@ -40,42 +40,17 @@
{
switch_channel_t *caller_channel;
switch_core_session_t *peer_session;
- switch_caller_profile_t *caller_profile, *caller_caller_profile;
- char chan_type[128] = { '\0' }, *chan_data;
- unsigned int timelimit = 60; /* probably a useful option to pass in when there's time */
+ unsigned int timelimit = 60; /* probably a useful option to pass in when there's time */
+
caller_channel = switch_core_session_get_channel(session);
assert(caller_channel != NULL);
-
- strncpy(chan_type, data, sizeof(chan_type));
-
- if ((chan_data = strchr(chan_type, '/')) != 0) {
- *chan_data = '\0';
- chan_data++;
- }
-
- caller_caller_profile = switch_channel_get_caller_profile(caller_channel);
- caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
- caller_caller_profile->username,
- caller_caller_profile->dialplan,
- caller_caller_profile->caller_id_name,
- caller_caller_profile->caller_id_number,
- caller_caller_profile->network_addr,
- NULL,
- NULL,
- caller_caller_profile->rdnis,
- caller_caller_profile->source,
- caller_caller_profile->context,
- chan_data);
-
-
-
- if (switch_core_session_outgoing_channel(session, chan_type, caller_profile, &peer_session, NULL) !=
- SWITCH_STATUS_SUCCESS) {
+ if (switch_ivr_originate(session, &peer_session, data, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
return;
} else {
+ /* peer channel is read locked now the bridge func will unlock it for us */
switch_ivr_multi_threaded_bridge(session, peer_session, timelimit, NULL, NULL, NULL);
}
}
Modified: freeswitch/branches/james/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/branches/james/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/branches/james/src/mod/applications/mod_conference/mod_conference.c Wed Aug 16 20:59:56 2006
@@ -53,6 +53,8 @@
switch_mutex_t *id_mutex;
switch_mutex_t *hash_mutex;
uint32_t id_pool;
+ int32_t running;
+ uint32_t threads;
} globals;
struct conference_member;
@@ -451,7 +453,9 @@
return NULL;
}
- while(!switch_test_flag(conference, CFLAG_DESTRUCT)) {
+ globals.threads++;
+
+ while(globals.running && !switch_test_flag(conference, CFLAG_DESTRUCT)) {
uint8_t file_frame[CONF_BUFFER_SIZE] = {0};
switch_size_t file_sample_len = samples;
switch_size_t file_data_len = samples * 2;
@@ -654,7 +658,8 @@
switch_core_destroy_memory_pool(&pool);
}
}
-
+
+ globals.threads--;
return NULL;
}
@@ -1969,148 +1974,32 @@
static switch_status_t conference_outcall(conference_obj_t *conference, switch_core_session_t *session, char *bridgeto, char *cid_name, char *cid_num)
{
switch_core_session_t *peer_session;
- switch_caller_profile_t *caller_profile, *caller_caller_profile;
- char *chan_type, *chan_data;
- unsigned int timelimit = 60;
switch_channel_t *peer_channel;
- time_t start;
- switch_frame_t *read_frame = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_channel_t *caller_channel = NULL;
- chan_type = strdup(bridgeto);
-
- if ((chan_data = strchr(chan_type, '/')) != 0) {
- *chan_data = '\0';
- chan_data++;
- }
-
- if (session) {
- caller_channel = switch_core_session_get_channel(session);
- assert(caller_channel != NULL);
- caller_caller_profile = switch_channel_get_caller_profile(caller_channel);
- if (!cid_name) {
- cid_name = caller_caller_profile->caller_id_name;
- }
-
- if (!cid_num) {
- cid_num = caller_caller_profile->caller_id_number;
- }
-
- caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
- caller_caller_profile->username,
- caller_caller_profile->dialplan,
- cid_name,
- cid_num,
- caller_caller_profile->network_addr,
- NULL,
- NULL,
- caller_caller_profile->rdnis,
- caller_caller_profile->source,
- caller_caller_profile->context,
- chan_data);
- } else {
-
- if (!cid_name) {
- cid_name = conference->caller_id_name;
- }
-
- if (!cid_num) {
- cid_num = conference->caller_id_number;
- }
-
- caller_profile = switch_caller_profile_new(conference->pool,
- NULL,
- NULL,
- cid_name,
- cid_num,
- NULL,
- NULL,
- NULL,
- NULL,
- (char *) global_app_name,
- NULL,
- chan_data);
- }
-
-
-
- if (switch_core_session_outgoing_channel(session, chan_type, caller_profile, &peer_session, NULL) !=
- SWITCH_STATUS_SUCCESS) {
+ if (switch_ivr_originate(session, &peer_session, bridgeto, &audio_bridge_peer_state_handlers, cid_name, cid_num) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
- if (caller_channel) {
+ if (session) {
+ caller_channel = switch_core_session_get_channel(session);
switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
}
- status = SWITCH_STATUS_FALSE;
goto done;
}
+
+ switch_core_session_rwunlock(peer_session);
peer_channel = switch_core_session_get_channel(peer_session);
assert(peer_channel != NULL);
-
- switch_channel_add_state_handler(peer_channel, &audio_bridge_peer_state_handlers);
-
- if (switch_core_session_runing(peer_session)) {
- switch_channel_set_state(peer_channel, CS_RING);
- } else {
- switch_core_session_thread_launch(peer_session);
- }
-
- time(&start);
-
- for (;;) {
- int state = switch_channel_get_state(peer_channel);
- if (state >= CS_RING) {
- break;
- }
-
- if (caller_channel && !switch_channel_ready(caller_channel)) {
- break;
- }
-
- if ((time(NULL) - start) > (time_t)timelimit) {
- break;
- }
- switch_yield(1000);
- }
-
- if (caller_channel) {
- switch_channel_pre_answer(caller_channel);
- }
-
- while ((!caller_channel || switch_channel_ready(caller_channel)) &&
- !switch_channel_test_flag(peer_channel, CF_ANSWERED) &&
- !switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA) &&
- ((time(NULL) - start) < (time_t)timelimit)) {
-
- /* read from the channel while we wait if the audio is up on it */
- if (session && (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA))) {
- switch_status_t status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
-
- if (!SWITCH_READ_ACCEPTABLE(status)) {
- break;
- }
- if (read_frame) {
- if (switch_core_session_write_frame(session, read_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
- break;
- }
- }
-
- } else {
- switch_yield(1000);
- }
-
- }
-
+
if (caller_channel && switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
switch_channel_answer(caller_channel);
}
if (switch_channel_test_flag(peer_channel, CF_ANSWERED) || switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA)) {
switch_caller_extension_t *extension = NULL;
- if ((extension = switch_caller_extension_new(peer_session, caller_profile->destination_number,
- caller_profile->destination_number)) == 0) {
+ if ((extension = switch_caller_extension_new(peer_session, conference->name, conference->name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
status = SWITCH_STATUS_MEMERR;
goto done;
@@ -2127,7 +2016,6 @@
}
done:
- free(chan_type);
return status;
}
@@ -2171,6 +2059,7 @@
switch_xml_t cxml = NULL, cfg = NULL, profile = NULL, profiles = NULL;
char *flags_str;
member_flag_t uflags = MFLAG_CAN_SPEAK | MFLAG_CAN_HEAR;
+ switch_core_session_message_t msg = {0};
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -2404,9 +2293,19 @@
}
switch_set_flag_locked((&member), MFLAG_RUNNING | uflags);
+ msg.from = __FILE__;
+
+ /* Tell the channel we are going to be in a bridge */
+ msg.message_id = SWITCH_MESSAGE_INDICATE_BRIDGE;
+ switch_core_session_receive_message(session, &msg);
+
/* Run the confernece loop */
conference_loop(&member);
+ /* Tell the channel we are no longer going to be in a bridge */
+ msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
+ switch_core_session_receive_message(session, &msg);
+
/* Remove the caller from the conference */
conference_del_member(member.last_conference, &member);
@@ -2897,6 +2796,22 @@
/* Release the config registry handle */
switch_xml_free(cxml);
+ globals.running = 1;
/* indicate that the module should continue to be loaded */
return status;
+}
+
+
+SWITCH_MOD_DECLARE(switch_status_t) switch_module_shutdown(void)
+{
+
+
+ if (globals.running) {
+ globals.running = 0;
+ while (globals.threads) {
+ switch_yield(100000);
+ }
+ }
+
+ return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/branches/james/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/branches/james/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/branches/james/src/mod/endpoints/mod_iax/mod_iax.c Wed Aug 16 20:59:56 2006
@@ -934,9 +934,9 @@
/* Wait for an event. */
if ((iaxevent = iax_get_event(0)) == NULL) {
- switch_yield(1000);
+ switch_yield(100);
continue;
- } else if (iaxevent) {
+ } else {
struct private_object *tech_pvt = iax_get_private(iaxevent->session);
if (globals.debug && iaxevent->etype != IAX_EVENT_VOICE) {
Modified: freeswitch/branches/james/src/mod/endpoints/mod_iax/mod_iax.vcproj
==============================================================================
--- freeswitch/branches/james/src/mod/endpoints/mod_iax/mod_iax.vcproj (original)
+++ freeswitch/branches/james/src/mod/endpoints/mod_iax/mod_iax.vcproj Wed Aug 16 20:59:56 2006
@@ -52,6 +52,7 @@
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
+ DisableSpecificWarnings="4201"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -133,6 +134,7 @@
WarnAsError="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
+ DisableSpecificWarnings="4201"
/>
<Tool
Name="VCManagedResourceCompilerTool"
Modified: freeswitch/branches/james/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/branches/james/src/mod/event_handlers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/branches/james/src/mod/event_handlers/mod_cdr/basecdr.cpp Wed Aug 16 20:59:56 2006
@@ -82,49 +82,55 @@
callanswerdate = newchannel->timetable->answered;
callenddate = newchannel->timetable->hungup;
- if(newchannel->callerprofile->caller_id_name != 0)
- {
- strncpy(clid,newchannel->callerprofile->caller_id_name,strlen(newchannel->callerprofile->caller_id_name));
- strncat(clid," <",2);
- if(newchannel->callerprofile->caller_id_number != 0 )
- strncat(clid,newchannel->callerprofile->caller_id_number,strlen(clid)+strlen(newchannel->callerprofile->caller_id_number));
- strncat(clid,">",1);
- }
+ if (newchannel->callerprofile) {
+ if(newchannel->callerprofile->caller_id_name != 0)
+ {
+ strncpy(clid,newchannel->callerprofile->caller_id_name,strlen(newchannel->callerprofile->caller_id_name));
+ strncat(clid," <",2);
+ if(newchannel->callerprofile->caller_id_number != 0 )
+ strncat(clid,newchannel->callerprofile->caller_id_number,strlen(clid)+strlen(newchannel->callerprofile->caller_id_number));
+ strncat(clid,">",1);
+ }
+
+ // Get the ANI information if it's set
+ if(newchannel->callerprofile->ani != 0)
+ strncpy(ani,newchannel->callerprofile->ani,strlen(newchannel->callerprofile->ani));
+ if(newchannel->callerprofile->ani2 != 0)
+ strncpy(ani2,newchannel->callerprofile->ani2,strlen(newchannel->callerprofile->ani2));
- // Get the ANI information if it's set
- if(newchannel->callerprofile->ani != 0)
- strncpy(ani,newchannel->callerprofile->ani,strlen(newchannel->callerprofile->ani));
- if(newchannel->callerprofile->ani2 != 0)
- strncpy(ani2,newchannel->callerprofile->ani2,strlen(newchannel->callerprofile->ani2));
-
- if(newchannel->callerprofile->dialplan != 0)
- strncpy(dialplan,newchannel->callerprofile->dialplan,strlen(newchannel->callerprofile->dialplan));
-
- if(newchannel->callerprofile->network_addr != 0)
- strncpy(network_addr,newchannel->callerprofile->network_addr,strlen(newchannel->callerprofile->network_addr));
-
+ if(newchannel->callerprofile->dialplan != 0)
+ strncpy(dialplan,newchannel->callerprofile->dialplan,strlen(newchannel->callerprofile->dialplan));
+
+ if(newchannel->callerprofile->network_addr != 0)
+ strncpy(network_addr,newchannel->callerprofile->network_addr,strlen(newchannel->callerprofile->network_addr));
+ }
+
originated = newchannel->originate;
- if(newchannel->originateprofile->uuid != 0)
+ 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)
{
- if(newchannel->callerprofile->destination_number != 0)
- 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->chan_name != 0)
+ if (newchannel->callerprofile) {
+ if(newchannel->callerprofile->destination_number != 0)
+ 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->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(newchannel->originateprofile->chan_name != 0)
+ 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(newchannel->originateprofile && newchannel->originateprofile->chan_name != 0)
strncpy(dstchannel,newchannel->originateprofile->chan_name,strlen(newchannel->originateprofile->chan_name));
}
Modified: freeswitch/branches/james/src/mod/event_handlers/mod_cdr/csvcdr.cpp
==============================================================================
--- freeswitch/branches/james/src/mod/event_handlers/mod_cdr/csvcdr.cpp (original)
+++ freeswitch/branches/james/src/mod/event_handlers/mod_cdr/csvcdr.cpp Wed Aug 16 20:59:56 2006
@@ -65,7 +65,7 @@
// Format the times
apr_size_t retsizecsd, retsizecad, retsizeced; //csd == callstartdate, cad == callanswerdate, ced == callenddate, ceff == callenddate_forfile
- char format[] = "%F %T";
+ char format[] = "%Y-%m-%d-%H-%M-%S";
switch_strftime(formattedcallstartdate,&retsizecsd,sizeof(formattedcallstartdate),format,&tempcallstart);
switch_strftime(formattedcallanswerdate,&retsizecad,sizeof(formattedcallanswerdate),format,&tempcallanswer);
switch_strftime(formattedcallenddate,&retsizeced,sizeof(formattedcallenddate),format,&tempcallend);
@@ -193,7 +193,7 @@
switch_time_exp_lt(&now_converted,now);
apr_size_t retsize;
- char format[] = "%F %T";
+ char format[] = "%Y-%m-%d-%H-%M-%S";
char formatteddate[100];
memset(formatteddate,0,100);
switch_strftime(formatteddate,&retsize,100,format,&now_converted);
Modified: freeswitch/branches/james/src/mod/event_handlers/mod_cdr/pddcdr.cpp
==============================================================================
--- freeswitch/branches/james/src/mod/event_handlers/mod_cdr/pddcdr.cpp (original)
+++ freeswitch/branches/james/src/mod/event_handlers/mod_cdr/pddcdr.cpp Wed Aug 16 20:59:56 2006
@@ -60,7 +60,7 @@
// Format the times
size_t retsizecsd, retsizecad, retsizeced; //csd == callstartdate, cad == callanswerdate, ced == callenddate, ceff == callenddate_forfile
- char format[] = "%F %T";
+ char format[] = "%Y-%m-%d-%H-%M-%S";
switch_strftime(formattedcallstartdate,&retsizecsd,sizeof(formattedcallstartdate),format,&tempcallstart);
switch_strftime(formattedcallanswerdate,&retsizecad,sizeof(formattedcallanswerdate),format,&tempcallanswer);
switch_strftime(formattedcallenddate,&retsizeced,sizeof(formattedcallenddate),format,&tempcallend);
Modified: freeswitch/branches/james/src/switch.c
==============================================================================
--- freeswitch/branches/james/src/switch.c (original)
+++ freeswitch/branches/james/src/switch.c Wed Aug 16 20:59:56 2006
@@ -222,8 +222,6 @@
switch_core_session_hupall();
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Clean up modules.\n");
switch_loadable_module_shutdown();
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Tearing down environment.\n");
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Exiting Now.\n");
switch_core_destroy();
return 0;
}
Modified: freeswitch/branches/james/src/switch_channel.c
==============================================================================
--- freeswitch/branches/james/src/switch_channel.c (original)
+++ freeswitch/branches/james/src/switch_channel.c Wed Aug 16 20:59:56 2006
@@ -762,9 +762,14 @@
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel_t *channel,
const switch_state_handler_table_t *state_handler)
{
- int index;
+ int x, index;
assert(channel != NULL);
+ for (x = 0; x < SWITCH_MAX_STATE_HANDLERS; x++) {
+ if (channel->state_handlers[x] == state_handler) {
+ return x;
+ }
+ }
index = channel->state_handler_index++;
if (channel->state_handler_index >= SWITCH_MAX_STATE_HANDLERS) {
Modified: freeswitch/branches/james/src/switch_core.c
==============================================================================
--- freeswitch/branches/james/src/switch_core.c (original)
+++ freeswitch/branches/james/src/switch_core.c Wed Aug 16 20:59:56 2006
@@ -233,7 +233,15 @@
SWITCH_DECLARE(switch_status_t) switch_core_session_read_lock(switch_core_session_t *session)
{
- return (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock);
+ switch_status_t status = SWITCH_STATUS_SUCCESS;
+
+ if (!switch_channel_test_flag(session->channel, CF_LOCK_THREAD)) {
+ if ((status = (switch_status_t) switch_thread_rwlock_tryrdlock(session->rwlock)) == SWITCH_STATUS_SUCCESS) {
+ switch_channel_set_flag(session->channel, CF_LOCK_THREAD);
+ }
+ }
+
+ return status;
}
SWITCH_DECLARE(void) switch_core_session_write_lock(switch_core_session_t *session)
@@ -243,6 +251,7 @@
SWITCH_DECLARE(void) switch_core_session_rwunlock(switch_core_session_t *session)
{
+ switch_channel_clear_flag(session->channel, CF_LOCK_THREAD);
switch_thread_rwlock_unlock(session->rwlock);
}
@@ -283,7 +292,7 @@
switch_mutex_unlock(runtime.session_table_mutex);
while(runtime.session_count) {
- switch_yield(1000);
+ switch_yield(10000);
}
}
@@ -3118,26 +3127,27 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Closing Event Engine.\n");
switch_event_shutdown();
- switch_log_shutdown();
-
+
switch_queue_push(runtime.sql_queue, NULL);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Waiting for unfinished SQL transactions\n");
while (switch_queue_size(runtime.sql_queue) > 0) {
- switch_yield(1000);
+ switch_yield(10000);
}
switch_core_db_close(runtime.db);
switch_core_db_close(runtime.event_db);
switch_xml_destroy();
- if (runtime.memory_pool) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Unallocating memory pool.\n");
- apr_pool_destroy(runtime.memory_pool);
- apr_terminate();
- }
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Finalizing Shutdown.\n");
+ switch_log_shutdown();
if(runtime.console != stdout && runtime.console != stderr) {
fclose(runtime.console);
runtime.console = NULL;
+ }
+
+ if (runtime.memory_pool) {
+ apr_pool_destroy(runtime.memory_pool);
+ apr_terminate();
}
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/branches/james/src/switch_event.c
==============================================================================
--- freeswitch/branches/james/src/switch_event.c (original)
+++ freeswitch/branches/james/src/switch_event.c Wed Aug 16 20:59:56 2006
@@ -441,12 +441,14 @@
char data[2048];
va_list ap;
- va_start(ap, fmt);
- vsnprintf(data, sizeof(data), fmt, ap);
- va_end(ap);
+ if (fmt) {
+ va_start(ap, fmt);
+ ret = vsnprintf(data, sizeof(data), fmt, ap);
+ va_end(ap);
+ }
if (ret == -1) {
- return SWITCH_STATUS_MEMERR;
+ return SWITCH_STATUS_GENERR;
} else {
event->body = DUP(data);
return SWITCH_STATUS_SUCCESS;
Modified: freeswitch/branches/james/src/switch_ivr.c
==============================================================================
--- freeswitch/branches/james/src/switch_ivr.c (original)
+++ freeswitch/branches/james/src/switch_ivr.c Wed Aug 16 20:59:56 2006
@@ -439,7 +439,7 @@
comment,
date);
-
+ assert(read_codec != NULL);
interval = read_codec->implementation->microseconds_per_frame / 1000;
@@ -1141,53 +1141,97 @@
};
-SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
- switch_core_session_t *peer_session,
- unsigned int timelimit,
- switch_input_callback_function_t input_callback,
- void *session_data,
- void *peer_session_data)
-
-
+SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *session,
+ switch_core_session_t **bleg,
+ char *bridgeto,
+ const switch_state_handler_table_t *table,
+ char *cid_name_override,
+ char *cid_num_override)
+
{
- switch_core_thread_session_t *this_audio_thread, *other_audio_thread;
- switch_channel_t *caller_channel, *peer_channel;
+ switch_core_session_t *peer_session;
+ switch_caller_profile_t *caller_profile, *caller_caller_profile;
+ char *chan_type, *chan_data;
+ unsigned int timelimit = 60;
+ switch_channel_t *peer_channel;
time_t start;
- int stream_id = 0;
switch_frame_t *read_frame = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS;
+ switch_channel_t *caller_channel = NULL;
+
+ *bleg = NULL;
+ chan_type = strdup(bridgeto);
+
+ if ((chan_data = strchr(chan_type, '/')) != 0) {
+ *chan_data = '\0';
+ chan_data++;
+ }
+ if (session) {
+ caller_channel = switch_core_session_get_channel(session);
+ assert(caller_channel != NULL);
+ caller_caller_profile = switch_channel_get_caller_profile(caller_channel);
- caller_channel = switch_core_session_get_channel(session);
- assert(caller_channel != NULL);
+ if (!cid_name_override) {
+ cid_name_override = caller_caller_profile->caller_id_name;
+ }
+ if (!cid_num_override) {
+ cid_num_override = caller_caller_profile->caller_id_number;
+ }
- switch_channel_set_flag(caller_channel, CF_ORIGINATOR);
+ caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
+ caller_caller_profile->username,
+ caller_caller_profile->dialplan,
+ cid_name_override,
+ cid_num_override,
+ caller_caller_profile->network_addr,
+ NULL,
+ NULL,
+ caller_caller_profile->rdnis,
+ caller_caller_profile->source,
+ caller_caller_profile->context,
+ chan_data);
+ } else {
+ if (!cid_name_override) {
+ cid_name_override = "FreeSWITCH";
+ }
+ if (!cid_num_override) {
+ cid_num_override = "0000000000";
+ }
+ caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
+ NULL,
+ NULL,
+ cid_name_override,
+ cid_num_override,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ __FILE__,
+ NULL,
+ chan_data);
+ }
- peer_channel = switch_core_session_get_channel(peer_session);
- assert(peer_channel != NULL);
- other_audio_thread = switch_core_session_alloc(peer_session, sizeof(switch_core_thread_session_t));
- this_audio_thread = switch_core_session_alloc(peer_session, sizeof(switch_core_thread_session_t));
- other_audio_thread->objs[0] = session;
- other_audio_thread->objs[1] = peer_session;
- other_audio_thread->objs[2] = &stream_id;
- other_audio_thread->objs[3] = (void *) input_callback;
- other_audio_thread->objs[4] = session_data;
- other_audio_thread->objs[5] = this_audio_thread;
- other_audio_thread->running = 5;
+ if (switch_core_session_outgoing_channel(session, chan_type, caller_profile, &peer_session, NULL) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
+ status = SWITCH_STATUS_FALSE;
+ goto done;
+ }
- this_audio_thread->objs[0] = peer_session;
- this_audio_thread->objs[1] = session;
- this_audio_thread->objs[2] = &stream_id;
- this_audio_thread->objs[3] = (void *) input_callback;
- this_audio_thread->objs[4] = peer_session_data;
- this_audio_thread->objs[5] = other_audio_thread;
- this_audio_thread->running = 2;
+ switch_core_session_read_lock(peer_session);
- switch_channel_add_state_handler(peer_channel, &audio_bridge_peer_state_handlers);
+ peer_channel = switch_core_session_get_channel(peer_session);
+ assert(peer_channel != NULL);
+
+ if (!table) {
+ table = &audio_bridge_peer_state_handlers;
+ }
+ switch_channel_add_state_handler(peer_channel, table);
+
if (switch_core_session_runing(peer_session)) {
switch_channel_set_state(peer_channel, CS_RING);
} else {
@@ -1202,7 +1246,7 @@
break;
}
- if (!switch_channel_ready(caller_channel)) {
+ if (caller_channel && !switch_channel_ready(caller_channel)) {
break;
}
@@ -1212,24 +1256,23 @@
switch_yield(1000);
}
- switch_channel_pre_answer(caller_channel);
-
+ if (caller_channel) {
+ switch_channel_pre_answer(caller_channel);
+ }
- while (switch_channel_ready(caller_channel) &&
- switch_channel_ready(peer_channel) &&
+ while ((!caller_channel || switch_channel_ready(caller_channel)) &&
!switch_channel_test_flag(peer_channel, CF_ANSWERED) &&
!switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA) &&
((time(NULL) - start) < (time_t)timelimit)) {
-
+
/* read from the channel while we wait if the audio is up on it */
- if (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA)) {
+ if (session && (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA))) {
switch_status_t status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
if (read_frame) {
- //memset(read_frame->data, 0, read_frame->datalen);
if (switch_core_session_write_frame(session, read_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
break;
}
@@ -1238,8 +1281,71 @@
} else {
switch_yield(1000);
}
+
+ }
+ if (caller_channel && switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
+ switch_channel_answer(caller_channel);
}
+
+ if (switch_channel_test_flag(peer_channel, CF_ANSWERED) || switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA)) {
+ *bleg = peer_session;
+ status = SWITCH_STATUS_SUCCESS;
+ } else {
+ switch_channel_hangup(peer_channel, SWITCH_CAUSE_NO_ANSWER);
+ status = SWITCH_STATUS_FALSE;
+ }
+
+
+ done:
+ free(chan_type);
+ return status;
+}
+
+
+SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
+ switch_core_session_t *peer_session,
+ unsigned int timelimit,
+ switch_input_callback_function_t input_callback,
+ void *session_data,
+ void *peer_session_data)
+
+
+
+{
+ switch_core_thread_session_t *this_audio_thread, *other_audio_thread;
+ switch_channel_t *caller_channel, *peer_channel;
+ int stream_id = 0;
+ switch_status_t status = SWITCH_STATUS_SUCCESS;
+
+ caller_channel = switch_core_session_get_channel(session);
+ assert(caller_channel != NULL);
+
+ switch_channel_set_flag(caller_channel, CF_ORIGINATOR);
+
+ peer_channel = switch_core_session_get_channel(peer_session);
+ assert(peer_channel != NULL);
+
+ other_audio_thread = switch_core_session_alloc(peer_session, sizeof(switch_core_thread_session_t));
+ this_audio_thread = switch_core_session_alloc(peer_session, sizeof(switch_core_thread_session_t));
+
+ other_audio_thread->objs[0] = session;
+ other_audio_thread->objs[1] = peer_session;
+ other_audio_thread->objs[2] = &stream_id;
+ other_audio_thread->objs[3] = (void *) input_callback;
+ other_audio_thread->objs[4] = session_data;
+ other_audio_thread->objs[5] = this_audio_thread;
+ other_audio_thread->running = 5;
+
+ this_audio_thread->objs[0] = peer_session;
+ this_audio_thread->objs[1] = session;
+ this_audio_thread->objs[2] = &stream_id;
+ this_audio_thread->objs[3] = (void *) input_callback;
+ this_audio_thread->objs[4] = peer_session_data;
+ this_audio_thread->objs[5] = other_audio_thread;
+ this_audio_thread->running = 2;
+
+ switch_channel_add_state_handler(peer_channel, &audio_bridge_peer_state_handlers);
if (switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
switch_channel_answer(caller_channel);
Modified: freeswitch/branches/james/src/switch_log.c
==============================================================================
--- freeswitch/branches/james/src/switch_log.c (original)
+++ freeswitch/branches/james/src/switch_log.c Wed Aug 16 20:59:56 2006
@@ -118,7 +118,7 @@
assert(obj == NULL || obj != NULL);
THREAD_RUNNING = 1;
- for(;;) {
+ while(THREAD_RUNNING == 1) {
void *pop = NULL;
switch_log_node_t *node = NULL;
switch_log_binding_t *binding;
@@ -222,23 +222,23 @@
switch_event_fire(&event);
}
} else {
- if (level == SWITCH_LOG_CONSOLE || !THREAD_RUNNING) {
+ if (level == SWITCH_LOG_CONSOLE || !LOG_QUEUE || !THREAD_RUNNING) {
fprintf(handle, data);
- }
-
- if (level <= MAX_LEVEL) {
- switch_log_node_t *node = malloc(sizeof(*node));
- node->data = data;
- node->file = strdup(filep);
- node->func = strdup(func);
- node->line = line;
- node->level = level;
- node->content = content;
- node->timestamp = now;
- switch_queue_push(LOG_QUEUE, node);
- } else {
free(data);
- }
+ } else if (level <= MAX_LEVEL) {
+ switch_log_node_t *node;
+
+ if ((node = malloc(sizeof(*node)))) {
+ node->data = data;
+ node->file = strdup(filep);
+ node->func = strdup(func);
+ node->line = line;
+ node->level = level;
+ node->content = content;
+ node->timestamp = now;
+ switch_queue_push(LOG_QUEUE, node);
+ }
+ }
}
}
@@ -276,7 +276,11 @@
SWITCH_DECLARE(switch_status_t) switch_log_shutdown(void)
{
+ THREAD_RUNNING = -1;
switch_queue_push(LOG_QUEUE, NULL);
+ while (THREAD_RUNNING) {
+ switch_yield(1000);
+ }
return SWITCH_STATUS_SUCCESS;
}
Modified: freeswitch/branches/james/w32/Setup/Setup.vdproj
==============================================================================
--- freeswitch/branches/james/w32/Setup/Setup.vdproj (original)
+++ freeswitch/branches/james/w32/Setup/Setup.vdproj Wed Aug 16 20:59:56 2006
@@ -87,26 +87,26 @@
}
"Entry"
{
- "MsmKey" = "8:_413E616556854689B457A68A06830A82"
- "OwnerKey" = "8:_UNDEFINED"
+ "MsmKey" = "8:_3F927D72DFA53DCF09A9D5F6EB00333D"
+ "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_4A285D260C3748A4BEFA6E5A9004D128"
+ "MsmKey" = "8:_413E616556854689B457A68A06830A82"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_53150E807A66E04034BACF0B4D81105A"
- "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
+ "MsmKey" = "8:_4A285D260C3748A4BEFA6E5A9004D128"
+ "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_53150E807A66E04034BACF0B4D81105A"
- "OwnerKey" = "8:_F0B800E719294692A02518CFD8CBAEFF"
+ "MsmKey" = "8:_4F16AA4E02A545BEA97556AC80AAB7C0"
+ "OwnerKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@@ -147,132 +147,108 @@
}
"Entry"
{
- "MsmKey" = "8:_83062AA0528B40A59202BC7668F7132A"
- "OwnerKey" = "8:_UNDEFINED"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
- "MsmKey" = "8:_83C1B93AD71B4F8F9E074F9607B60DF1"
- "OwnerKey" = "8:_UNDEFINED"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
- "MsmKey" = "8:_87768631363249B2B301143C193612F7"
- "OwnerKey" = "8:_UNDEFINED"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_1CFB1AB04E024FC993E0EB4859DF8408"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_F0B800E719294692A02518CFD8CBAEFF"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_EF14CB99F3414BB689D0CB0E6D6B8AB8"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
- "OwnerKey" = "8:_EE46A936D4054F7286909355BF2AE5D7"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_D1269F1E49D442CF8EAC96C23E60325D"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_B20769E090034897B32E3EA4EC1BA8A0"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_A0D5F714A0F94250A1C39603B699AB82"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_83C1B93AD71B4F8F9E074F9607B60DF1"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
- "OwnerKey" = "8:_6753CE9F969E43A2A50ADEC0245F58A4"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_4A285D260C3748A4BEFA6E5A9004D128"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_318FCC99E8D143D6B4F9F534E63009B3"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_2F2FEC549F02436EB87961BD1B9E5783"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "MsmKey" = "8:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
"OwnerKey" = "8:_2814E641538B42EFA83525986A9D5AC1"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
- "OwnerKey" = "8:_1F21CF104E90499E8F6BBD2136A52884"
+ "MsmKey" = "8:_83062AA0528B40A59202BC7668F7132A"
+ "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_9A293E8A356A4959BB6E541B7DC213CD"
+ "MsmKey" = "8:_83C1B93AD71B4F8F9E074F9607B60DF1"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_9B01D8B92FE15ACCAAD5F4F4C7681FD6"
- "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
+ "MsmKey" = "8:_87768631363249B2B301143C193612F7"
+ "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_A044EB8034E3CED402BF9A7DB7CC4550"
+ "MsmKey" = "8:_95DF1AC815283888345057940530D1C0"
"OwnerKey" = "8:_F0B800E719294692A02518CFD8CBAEFF"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
+ "MsmKey" = "8:_9A293E8A356A4959BB6E541B7DC213CD"
+ "OwnerKey" = "8:_UNDEFINED"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_A0D5F714A0F94250A1C39603B699AB82"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -285,6 +261,12 @@
}
"Entry"
{
+ "MsmKey" = "8:_A55F680EDBCDA3F18A46EF6CFC14A1D5"
+ "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
"MsmKey" = "8:_AD2EB44FE6D548F2A8DA4F9F2CE817AC"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -303,20 +285,26 @@
}
"Entry"
{
- "MsmKey" = "8:_C105055EE271471A999CE7022E617EB7"
- "OwnerKey" = "8:_UNDEFINED"
+ "MsmKey" = "8:_B4DB166A7F41DC9EF58E277B90CC68AB"
+ "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_C81AC700C1BC4A55B98DF12C0CBAFD6F"
+ "MsmKey" = "8:_B4DB166A7F41DC9EF58E277B90CC68AB"
+ "OwnerKey" = "8:_F0B800E719294692A02518CFD8CBAEFF"
+ "MsmSig" = "8:_UNDEFINED"
+ }
+ "Entry"
+ {
+ "MsmKey" = "8:_C105055EE271471A999CE7022E617EB7"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
- "MsmKey" = "8:_CD7DAA5960C15D1769787DCAC200919C"
- "OwnerKey" = "8:_E72980C058C646E0A7FAF423EB57EA6E"
+ "MsmKey" = "8:_C81AC700C1BC4A55B98DF12C0CBAFD6F"
+ "OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
@@ -345,12 +333,6 @@
}
"Entry"
{
- "MsmKey" = "8:_DDC345A5D8F3411B871108AAD163F920"
- "OwnerKey" = "8:_8FC4214A35474C90B4FFD16CA8F225D4"
- "MsmSig" = "8:_UNDEFINED"
- }
- "Entry"
- {
"MsmKey" = "8:_E4BCD553B2054B0F8BC67428E1A11674"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
@@ -654,12 +636,12 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_413E616556854689B457A68A06830A82"
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_3F927D72DFA53DCF09A9D5F6EB00333D"
{
- "SourcePath" = "8:..\\..\\src\\mod\\languages\\mod_perl\\freeswitch.pm"
- "TargetName" = "8:freeswitch.pm"
+ "SourcePath" = "8:libaprutil-1.dll"
+ "TargetName" = "8:libaprutil-1.dll"
"Tag" = "8:"
- "Folder" = "8:_27A96C279A6A44E8A2FDF8D51CD86E29"
+ "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
@@ -671,15 +653,15 @@
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
- "IsDependency" = "11:FALSE"
+ "IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_53150E807A66E04034BACF0B4D81105A"
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_413E616556854689B457A68A06830A82"
{
- "SourcePath" = "8:libapr-1.dll"
- "TargetName" = "8:libapr-1.dll"
+ "SourcePath" = "8:..\\..\\src\\mod\\languages\\mod_perl\\freeswitch.pm"
+ "TargetName" = "8:freeswitch.pm"
"Tag" = "8:"
- "Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
+ "Folder" = "8:_27A96C279A6A44E8A2FDF8D51CD86E29"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
@@ -691,7 +673,7 @@
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
- "IsDependency" = "11:TRUE"
+ "IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_83062AA0528B40A59202BC7668F7132A"
@@ -714,10 +696,10 @@
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9B01D8B92FE15ACCAAD5F4F4C7681FD6"
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_95DF1AC815283888345057940530D1C0"
{
- "SourcePath" = "8:libaprutil-1.dll"
- "TargetName" = "8:libaprutil-1.dll"
+ "SourcePath" = "8:FreeSwitch.dll"
+ "TargetName" = "8:FreeSwitch.dll"
"Tag" = "8:"
"Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
"Condition" = "8:"
@@ -734,10 +716,10 @@
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A044EB8034E3CED402BF9A7DB7CC4550"
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A40E3F2045F44C60A8509FDFE47E6C45"
{
- "SourcePath" = "8:FreeSwitch.dll"
- "TargetName" = "8:FreeSwitch.dll"
+ "SourcePath" = "8:..\\..\\COPYING"
+ "TargetName" = "8:COPYING"
"Tag" = "8:"
"Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
"Condition" = "8:"
@@ -750,14 +732,14 @@
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
- "Exclude" = "11:TRUE"
- "IsDependency" = "11:TRUE"
+ "Exclude" = "11:FALSE"
+ "IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A40E3F2045F44C60A8509FDFE47E6C45"
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_A55F680EDBCDA3F18A46EF6CFC14A1D5"
{
- "SourcePath" = "8:..\\..\\COPYING"
- "TargetName" = "8:COPYING"
+ "SourcePath" = "8:sqlite.dll"
+ "TargetName" = "8:sqlite.dll"
"Tag" = "8:"
"Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
"Condition" = "8:"
@@ -771,13 +753,13 @@
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
- "IsDependency" = "11:FALSE"
+ "IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
- "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_CD7DAA5960C15D1769787DCAC200919C"
+ "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B4DB166A7F41DC9EF58E277B90CC68AB"
{
- "SourcePath" = "8:sqlite.dll"
- "TargetName" = "8:sqlite.dll"
+ "SourcePath" = "8:libapr-1.dll"
+ "TargetName" = "8:libapr-1.dll"
"Tag" = "8:"
"Folder" = "8:_04AC783F1C9F41AEB4E947C46CE9C9FF"
"Condition" = "8:"
@@ -1536,30 +1518,30 @@
}
"MergeModule"
{
- "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_8FC4214A35474C90B4FFD16CA8F225D4"
+ "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_4F16AA4E02A545BEA97556AC80AAB7C0"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
- "SourcePath" = "8:Microsoft_VC80_DebugCRT_x86.msm"
+ "SourcePath" = "8:policy_8_0_microsoft_vc80_debugcrt_x86.msm"
"Properties"
{
}
"LanguageId" = "3:0"
- "Exclude" = "11:TRUE"
+ "Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
}
- "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_DDC345A5D8F3411B871108AAD163F920"
+ "{CEE29DC0-9FBA-4B99-8D47-5BC643D9B626}:_7BE928D7D9AD4CC3A3D85B1AA764FEB0"
{
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:TRUE"
- "SourcePath" = "8:policy_8_0_microsoft_vc80_debugcrt_x86.msm"
+ "SourcePath" = "8:Microsoft_VC80_DebugCRT_x86.msm"
"Properties"
{
}
"LanguageId" = "3:0"
- "Exclude" = "11:TRUE"
+ "Exclude" = "11:FALSE"
"Folder" = "8:"
"Feature" = "8:"
"IsolateTo" = "8:"
@@ -2437,7 +2419,7 @@
}
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_EE46A936D4054F7286909355BF2AE5D7"
{
- "SourcePath" = "8:..\\vsnet\\Debug\\perl\\fs_perl.dll"
+ "SourcePath" = "8:..\\vsnet\\debug\\perl\\fs_perl.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_27A96C279A6A44E8A2FDF8D51CD86E29"
1
0
[commit] r2311 - in freeswitch/trunk/src: . include mod/applications/mod_bridgecall mod/applications/mod_commands mod/applications/mod_conference mod/languages/mod_spidermonkey
by Freeswitch SVN 17 Aug '06
by Freeswitch SVN 17 Aug '06
17 Aug '06
Author: anthm
Date: Wed Aug 16 20:53:09 2006
New Revision: 2311
Modified:
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/include/switch_types.h
freeswitch/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/trunk/src/switch_channel.c
freeswitch/trunk/src/switch_ivr.c
freeswitch/trunk/src/switch_utils.c
Log:
*deep breath*
Ok,
This one adds a bunch of stuff on top of the framework restructuring from yesterday.
1) originate api function:
Usage: originate <call url> <exten> [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]
This will call the specified url then transfer the call to the specified extension
example: originate exosip/1000@somehost 1000 XML default
2) mutiple destinations in outbound calls:
This means any dialstring may contain an '&' separated list of call urls
When using mutiple urls in this manner it is possible to map a certian key as required
indication of an accepted call. You may also supply a filename to play possibly instructing the
call recipiant to press the desired key etc...
The example below will call 2 locations playing prompt.wav to any who answer and
completing the call to the first offhook recipiant to dial "4"
<extension name="3002">
<condition field="destination_number" expression="^3002$">
<action application="set" data="call_timeout=60"/>
<action application="set" data="group_confirm_file=/path/to/prompt.wav"/>
<action application="set" data="group_confirm_key=4"/>
<action application="bridge" data="iax/guest@somebox/1234&exosip/1000@somehost"/>
</condition>
</extension>
The following is the equivilant but the confirm data is passed vial the bridge parameters
(This is for situations where there is no originating channel to set variables to)
<extension name="3002">
<condition field="destination_number" expression="^3002$">
<action application="bridge" data=/path/to/prompt.wav:4"confirm=iax/guest@somebox/1234&exosip/1000@somehost"/>
</condition>
</extension>
Omitting the file and key stuff will simply comeplete the call to whoever answers first.
(this is similar to how other less fortunate software handles the situation with thier best effort.)
This logic should be permitted in anything that establishes an outgoing call with
switch_ivr_originate()
Yes! That means even in this new originate api command you can call mutiple targets and send
whoever answers first to an extension that calls more mutiple targets. (better test it though!)
Oh, and you should be able to do the same in the mod_conference dial and dynamic conference features
please report any behaviour contrary to this account to me ASAP cos i would not be terribly
suprised if I forgot some scenerio that causes an explosion I did all this in 1 afternoon so it probably needs tuning still.
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Wed Aug 16 20:53:09 2006
@@ -169,6 +169,7 @@
\param session originating session
\param bleg B leg session
\param bridgeto the desired remote callstring
+ \param timelimit_sec timeout in seconds for outgoing call
\param table optional state handler table to install on the channel
\param cid_name_override override the caller id name
\param cid_num_override override the caller id number
@@ -177,6 +178,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *session,
switch_core_session_t **bleg,
char *bridgeto,
+ uint32_t timelimit_sec,
const switch_state_handler_table_t *table,
char *cid_name_override,
char *cid_num_override);
@@ -185,18 +187,16 @@
\brief Bridge Audio from one session to another
\param session one session
\param peer_session the other session
- \param timelimit maximum number of seconds to wait for both channels to be answered
\param dtmf_callback code to execute if any dtmf is dialed during the bridge
\param session_data data to pass to the DTMF callback for session
\param peer_session_data data to pass to the DTMF callback for peer_session
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
- switch_core_session_t *peer_session,
- unsigned int timelimit,
- switch_input_callback_function_t dtmf_callback,
- void *session_data,
- void *peer_session_data);
+ switch_core_session_t *peer_session,
+ switch_input_callback_function_t dtmf_callback,
+ void *session_data,
+ void *peer_session_data);
/*!
Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h (original)
+++ freeswitch/trunk/src/include/switch_types.h Wed Aug 16 20:53:09 2006
@@ -355,6 +355,8 @@
CF_BRIDGED = (1 << 7) - Channel in a bridge
CF_HOLD = (1 << 8) - Channel is on hold
CF_SERVICE = (1 << 9) - Channel has a service thread
+CF_TAGGED = (1 << 10) - Channel is tagged
+CF_WINNER = (1 << 10) - Channel is the winner
</pre>
*/
@@ -368,7 +370,9 @@
CF_LOCK_THREAD = (1 << 6),
CF_BRIDGED = (1 << 7),
CF_HOLD = (1 << 8),
- CF_SERVICE = (1 << 9)
+ CF_SERVICE = (1 << 9),
+ CF_TAGGED = (1 << 10),
+ CF_WINNER = (1 << 11)
} switch_channel_flag_t;
@@ -636,7 +640,8 @@
SWITCH_CAUSE_PROTOCOL_ERROR = 111,
SWITCH_CAUSE_INTERWORKING = 127,
SWITCH_CAUSE_CRASH = 500,
- SWITCH_CAUSE_SYSTEM_SHUTDOWN = 501
+ SWITCH_CAUSE_SYSTEM_SHUTDOWN = 501,
+ SWITCH_CAUSE_LOSE_RACE = 502
} switch_call_cause_t;
Modified: freeswitch/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c Wed Aug 16 20:53:09 2006
@@ -40,18 +40,23 @@
{
switch_channel_t *caller_channel;
switch_core_session_t *peer_session;
- unsigned int timelimit = 60; /* probably a useful option to pass in when there's time */
+ unsigned int timelimit = 60;
+ char *var;
caller_channel = switch_core_session_get_channel(session);
assert(caller_channel != NULL);
- if (switch_ivr_originate(session, &peer_session, data, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
+ if ((var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
+ timelimit = atoi(var);
+ }
+
+ if (switch_ivr_originate(session, &peer_session, data, timelimit, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
switch_channel_hangup(caller_channel, SWITCH_CAUSE_REQUESTED_CHAN_UNAVAIL);
return;
} else {
/* peer channel is read locked now the bridge func will unlock it for us */
- switch_ivr_multi_threaded_bridge(session, peer_session, timelimit, NULL, NULL, NULL);
+ switch_ivr_multi_threaded_bridge(session, peer_session, NULL, NULL, NULL);
}
}
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Wed Aug 16 20:53:09 2006
@@ -209,6 +209,72 @@
return SWITCH_STATUS_SUCCESS;
}
+static switch_status_t originate_function(char *cmd, switch_core_session_t *isession, switch_stream_handle_t *stream)
+{
+ switch_channel_t *caller_channel;
+ switch_core_session_t *caller_session;
+ char *argv[7] = {0};
+ int x, argc = 0;
+ char *aleg, *exten, *dp, *context, *cid_name, *cid_num;
+ uint32_t timeout = 60;
+
+ if (isession) {
+ stream->write_function(stream, "Illegal Usage\n");
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ if (switch_strlen_zero(cmd)) {
+ stream->write_function(stream, "Usage: originate <call url> <exten> [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]\n");
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ argc = switch_separate_string(cmd, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
+
+ for(x = 0; x < argc; x++) {
+ if (!strcasecmp(argv[x], "undef")) {
+ argv[x] = NULL;
+ }
+ }
+
+ aleg = argv[0];
+ exten = argv[1];
+ dp = argv[2];
+ context = argv[3];
+ cid_name = argv[4];
+ cid_num = argv[5];
+
+ if (!dp) {
+ dp = "XML";
+ }
+
+ if (!context) {
+ context = "default";
+ }
+
+ if (argv[6]) {
+ timeout = atoi(argv[6]);
+ }
+
+ if (!aleg && exten) {
+ stream->write_function(stream, "Invalid Arguements\n");
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ if (switch_ivr_originate(NULL, &caller_session, aleg, timeout, NULL, cid_name, cid_num) != SWITCH_STATUS_SUCCESS) {
+ stream->write_function(stream, "Cannot Create Outgoing Channel! [%s]\n", aleg);
+ return SWITCH_STATUS_SUCCESS;
+ }
+
+ caller_channel = switch_core_session_get_channel(caller_session);
+ assert(caller_channel != NULL);
+ switch_channel_clear_state_handler(caller_channel, NULL);
+ switch_core_session_rwunlock(caller_session);
+
+ switch_ivr_session_transfer(caller_session, exten, dp, context);
+
+ return SWITCH_STATUS_SUCCESS;;
+}
+
struct holder {
switch_stream_handle_t *stream;
char *http;
@@ -349,7 +415,7 @@
static switch_api_interface_t load_api_interface = {
/*.interface_name */ "load",
- /*.desc */ "Load Modile",
+ /*.desc */ "Load Module",
/*.function */ load_function,
/*.next */ &transfer_api_interface
};
@@ -369,6 +435,14 @@
/*.next */ &reload_api_interface
};
+static switch_api_interface_t originate_api_interface = {
+ /*.interface_name */ "originate",
+ /*.desc */ "Originate a Call",
+ /*.function */ originate_function,
+ /*.next */ &commands_api_interface
+};
+
+
static const switch_loadable_module_interface_t mod_commands_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
@@ -376,7 +450,7 @@
/*.dialplan_interface */ NULL,
/*.codec_interface */ NULL,
/*.application_interface */ NULL,
- /*.api_interface */ &commands_api_interface
+ /*.api_interface */ &originate_api_interface
};
Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Wed Aug 16 20:53:09 2006
@@ -192,7 +192,12 @@
static void conference_list(conference_obj_t *conference, switch_stream_handle_t *stream, char *delim);
static switch_status_t conf_function(char *buf, switch_core_session_t *session, switch_stream_handle_t *stream);
static switch_status_t audio_bridge_on_ring(switch_core_session_t *session);
-static switch_status_t conference_outcall(conference_obj_t *conference, switch_core_session_t *session, char *bridgeto, char *cid_name, char *cid_num);
+static switch_status_t conference_outcall(conference_obj_t *conference,
+ switch_core_session_t *session,
+ char *bridgeto,
+ uint32_t timeout,
+ char *cid_name,
+ char *cid_num);
static void conference_function(switch_core_session_t *session, char *data);
static void launch_conference_thread(conference_obj_t *conference);
static void *SWITCH_THREAD_FUNC input_thread_run(switch_thread_t *thread, void *obj);
@@ -1387,7 +1392,7 @@
goto done;
} else if (!strcasecmp(argv[1], "dial")) {
if (argc > 2) {
- conference_outcall(conference, NULL, argv[2], argv[3], argv[4]);
+ conference_outcall(conference, NULL, argv[2], 60, argv[3], argv[4]);
stream->write_function(stream, "OK\n");
goto done;
} else {
@@ -1971,7 +1976,12 @@
/*.on_hold */ NULL,
};
-static switch_status_t conference_outcall(conference_obj_t *conference, switch_core_session_t *session, char *bridgeto, char *cid_name, char *cid_num)
+static switch_status_t conference_outcall(conference_obj_t *conference,
+ switch_core_session_t *session,
+ char *bridgeto,
+ uint32_t timeout,
+ char *cid_name,
+ char *cid_num)
{
switch_core_session_t *peer_session;
switch_channel_t *peer_channel;
@@ -1979,7 +1989,7 @@
switch_channel_t *caller_channel = NULL;
- if (switch_ivr_originate(session, &peer_session, bridgeto, &audio_bridge_peer_state_handlers, cid_name, cid_num) != SWITCH_STATUS_SUCCESS) {
+ if (switch_ivr_originate(session, &peer_session, bridgeto, timeout, &audio_bridge_peer_state_handlers, cid_name, cid_num) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
if (session) {
caller_channel = switch_core_session_get_channel(session);
@@ -2172,7 +2182,11 @@
if (strlen(pin) < strlen(conference->pin)) {
buf = pin + strlen(pin);
- switch_ivr_collect_digits_count(session, buf, sizeof(pin) - (unsigned int)strlen(pin), (unsigned int)strlen(conference->pin) - (unsigned int)strlen(pin), "#", &term, 10000);
+ switch_ivr_collect_digits_count(session,
+ buf,
+ sizeof(pin) - (unsigned int)strlen(pin),
+ (unsigned int)strlen(conference->pin) - (unsigned int)strlen(pin),
+ "#", &term, 10000);
}
if (strcmp(pin, conference->pin)) {
@@ -2196,7 +2210,7 @@
}
if (bridgeto) {
- if (conference_outcall(conference, session, bridgeto, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
+ if (conference_outcall(conference, session, bridgeto, 60, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
goto done;
}
}
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 Wed Aug 16 20:53:09 2006
@@ -1903,7 +1903,7 @@
return JS_FALSE;
}
- switch_ivr_multi_threaded_bridge(jss_a->session, jss_b->session, timelimit, NULL, NULL, NULL);
+ switch_ivr_multi_threaded_bridge(jss_a->session, jss_b->session, NULL, NULL, NULL);
return JS_TRUE;
}
Modified: freeswitch/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/trunk/src/switch_channel.c (original)
+++ freeswitch/trunk/src/switch_channel.c Wed Aug 16 20:53:09 2006
@@ -84,6 +84,7 @@
{ "INTERWORKING", SWITCH_CAUSE_INTERWORKING },
{ "CRASH", SWITCH_CAUSE_CRASH },
{ "SYSTEM_SHUTDOWN", SWITCH_CAUSE_SYSTEM_SHUTDOWN },
+ { "LOSE_RACE", SWITCH_CAUSE_LOSE_RACE },
{ NULL, 0 }
};
@@ -798,17 +799,20 @@
assert(channel != NULL);
-
- for (index = 0; index < channel->state_handler_index; index++) {
- if (channel->state_handlers[index] != state_handler) {
- new_handlers[i++] = channel->state_handlers[index];
+ if (state_handler) {
+ for (index = 0; index < channel->state_handler_index; index++) {
+ if (channel->state_handlers[index] != state_handler) {
+ new_handlers[i++] = channel->state_handlers[index];
+ }
}
}
for (index = 0; index < SWITCH_MAX_STATE_HANDLERS; index++) {
channel->state_handlers[index] = NULL;
}
- for (index = 0; index < i; index++) {
- channel->state_handlers[index] = new_handlers[i];
+ if (state_handler) {
+ for (index = 0; index < i; index++) {
+ channel->state_handlers[index] = new_handlers[i];
+ }
}
}
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Wed Aug 16 20:53:09 2006
@@ -541,7 +541,7 @@
if (fh->speed > 2) {
fh->speed = 2;
- } else if(fh->speed < -2) {
+ } else if (fh->speed < -2) {
fh->speed = -2;
}
@@ -1140,131 +1140,344 @@
/*.on_hold */ audio_bridge_on_hold,
};
+struct key_collect {
+ char *key;
+ char *file;
+ switch_core_session_t *session;
+};
+static void *SWITCH_THREAD_FUNC collect_thread_run(switch_thread_t *thread, void *obj)
+{
+ struct key_collect *collect = (struct key_collect *) obj;
+ switch_channel_t *channel = switch_core_session_get_channel(collect->session);
+ char buf[10] = "";
+ char *p, term;
+
+ while(switch_channel_ready(channel)) {
+ memset(buf, 0, sizeof(buf));
+
+ if (collect->file) {
+ switch_ivr_play_file(collect->session, NULL, collect->file, NULL, NULL, buf, sizeof(buf));
+ } else {
+ switch_ivr_collect_digits_count(collect->session, buf, sizeof(buf), 1, "", &term, 0);
+ }
+
+ for(p = buf; *p; p++) {
+ if (*collect->key == *p) {
+ switch_channel_set_flag(channel, CF_WINNER);
+ goto wbreak;
+ }
+ }
+ }
+ wbreak:
+
+ return NULL;
+}
+
+static void launch_collect_thread(struct key_collect *collect)
+{
+ switch_thread_t *thread;
+ switch_threadattr_t *thd_attr = NULL;
+
+ switch_threadattr_create(&thd_attr, switch_core_session_get_pool(collect->session));
+ switch_threadattr_detach_set(thd_attr, 1);
+ switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
+ switch_thread_create(&thread, thd_attr, collect_thread_run, collect, switch_core_session_get_pool(collect->session));
+}
+
+static uint8_t check_channel_status(switch_channel_t **peer_channels,
+ switch_core_session_t **peer_sessions,
+ uint32_t len,
+ int32_t *idx,
+ char *file,
+ char *key)
+{
+
+ int32_t i;
+ *idx = -1;
+
+ if (len == 1) {
+ *idx = 0;
+ return (switch_channel_get_state(peer_channels[0]) < CS_HANGUP &&
+ !switch_channel_test_flag(peer_channels[0], CF_ANSWERED) &&
+ !switch_channel_test_flag(peer_channels[0], CF_EARLY_MEDIA)) ? 1 : 0;
+ } else {
+ int32_t hups = 0;
+
+ for (i = 0; i < len; i++) {
+ if (!peer_channels[i]) {
+ continue;
+ }
+ if (switch_channel_get_state(peer_channels[i]) >= CS_HANGUP) {
+ hups++;
+ } else if (switch_channel_test_flag(peer_channels[i], CF_ANSWERED) && !switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
+
+ if (key) {
+ struct key_collect *collect;
+
+ if ((collect = switch_core_session_alloc(peer_sessions[i], sizeof(*collect)))) {
+ switch_channel_set_flag(peer_channels[i], CF_TAGGED);
+ collect->key = key;
+ if (file) {
+ collect->file = switch_core_session_strdup(peer_sessions[i], file);
+ }
+ collect->session = peer_sessions[i];
+ launch_collect_thread(collect);
+ }
+ } else {
+ *idx = i;
+ return 0;
+
+ }
+ } else if (switch_channel_test_flag(peer_channels[i], CF_WINNER)) {
+ *idx = i;
+ return 0;
+ }
+ }
+
+ if (hups == len) {
+ return 0;
+ } else {
+ return 1;
+ }
+ }
+}
+
+#define MAX_PEERS 256
SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *session,
switch_core_session_t **bleg,
char *bridgeto,
+ uint32_t timelimit_sec,
const switch_state_handler_table_t *table,
char *cid_name_override,
char *cid_num_override)
{
- switch_core_session_t *peer_session;
- switch_caller_profile_t *caller_profile, *caller_caller_profile;
- char *chan_type, *chan_data;
- unsigned int timelimit = 60;
- switch_channel_t *peer_channel;
+ char *peer_names[MAX_PEERS];
+ switch_core_session_t *peer_session, *peer_sessions[MAX_PEERS];
+ switch_caller_profile_t *caller_profiles[MAX_PEERS], *caller_caller_profile;
+ char *chan_type = NULL, *chan_data;
+ switch_channel_t *peer_channel = NULL, *peer_channels[MAX_PEERS];
time_t start;
switch_frame_t *read_frame = NULL;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_channel_t *caller_channel = NULL;
+ switch_memory_pool_t *pool;
+ char *data = NULL;
+ int i, argc;
+ int32_t idx = -1, ccount = 0;
+ switch_codec_t write_codec = {0};
+ switch_frame_t write_frame = {0};
+ uint8_t err = 0, fdata[1024];
+ char *file = NULL, *key = NULL, *odata, *var;
+ write_frame.data = fdata;
+
*bleg = NULL;
- chan_type = strdup(bridgeto);
-
- if ((chan_data = strchr(chan_type, '/')) != 0) {
- *chan_data = '\0';
- chan_data++;
+ odata = strdup(bridgeto);
+ data = odata;
+
+ if (!strncasecmp(data, "confirm=", 8)) {
+ data += 8;
+ file = data;
+ if ((data = strchr(file, ';'))) {
+ *data++ = '\0';
+ if ((key = strchr(file, ':'))) {
+ *key++ = '\0';
+ } else {
+ err++;
+ }
+ } else {
+ err++;
+ }
}
+
+ if (err) {
+ status = SWITCH_STATUS_GENERR;
+ goto done;
+ }
if (session) {
caller_channel = switch_core_session_get_channel(session);
assert(caller_channel != NULL);
- caller_caller_profile = switch_channel_get_caller_profile(caller_channel);
- if (!cid_name_override) {
- cid_name_override = caller_caller_profile->caller_id_name;
- }
- if (!cid_num_override) {
- cid_num_override = caller_caller_profile->caller_id_number;
- }
- caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
- caller_caller_profile->username,
- caller_caller_profile->dialplan,
- cid_name_override,
- cid_num_override,
- caller_caller_profile->network_addr,
- NULL,
- NULL,
- caller_caller_profile->rdnis,
- caller_caller_profile->source,
- caller_caller_profile->context,
- chan_data);
- } else {
- if (!cid_name_override) {
- cid_name_override = "FreeSWITCH";
+
+ if ((var = switch_channel_get_variable(caller_channel, "group_confirm_key"))) {
+ key = switch_core_session_strdup(session, var);
+ if ((var = switch_channel_get_variable(caller_channel, "group_confirm_file"))) {
+ file = switch_core_session_strdup(session, var);
+ }
}
- if (!cid_num_override) {
- cid_num_override = "0000000000";
- }
- caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
- NULL,
- NULL,
- cid_name_override,
- cid_num_override,
- NULL,
- NULL,
- NULL,
- NULL,
- __FILE__,
- NULL,
- chan_data);
}
+
+ if (file && !strcmp(file, "undef")) {
+ file = NULL;
+ }
- if (switch_core_session_outgoing_channel(session, chan_type, caller_profile, &peer_session, NULL) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
- status = SWITCH_STATUS_FALSE;
- goto done;
- }
+ argc = switch_separate_string(data, '&', peer_names, (sizeof(peer_names) / sizeof(peer_names[0])));
+
+ for (i = 0; i < argc; i++) {
+
+ chan_type = peer_names[i];
+ if ((chan_data = strchr(chan_type, '/')) != 0) {
+ *chan_data = '\0';
+ chan_data++;
+ }
+
+ if (session) {
+ if (!switch_channel_ready(caller_channel)) {
+ status = SWITCH_STATUS_FALSE;
+ goto done;
+ }
- switch_core_session_read_lock(peer_session);
+ caller_caller_profile = switch_channel_get_caller_profile(caller_channel);
- peer_channel = switch_core_session_get_channel(peer_session);
- assert(peer_channel != NULL);
+ if (!cid_name_override) {
+ cid_name_override = caller_caller_profile->caller_id_name;
+ }
+ if (!cid_num_override) {
+ cid_num_override = caller_caller_profile->caller_id_number;
+ }
+
+ caller_profiles[i] = switch_caller_profile_new(switch_core_session_get_pool(session),
+ caller_caller_profile->username,
+ caller_caller_profile->dialplan,
+ cid_name_override,
+ cid_num_override,
+ caller_caller_profile->network_addr,
+ NULL,
+ NULL,
+ caller_caller_profile->rdnis,
+ caller_caller_profile->source,
+ caller_caller_profile->context,
+ chan_data);
+ pool = NULL;
+ } else {
+ if (!cid_name_override) {
+ cid_name_override = "FreeSWITCH";
+ }
+ if (!cid_num_override) {
+ cid_num_override = "0000000000";
+ }
+
+ if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
+ status = SWITCH_STATUS_TERM;
+ goto done;
+ }
+
+ caller_profiles[i] = switch_caller_profile_new(pool,
+ NULL,
+ NULL,
+ cid_name_override,
+ cid_num_override,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ __FILE__,
+ NULL,
+ chan_data);
+ }
+
+
+ if (switch_core_session_outgoing_channel(session, chan_type, caller_profiles[i], &peer_sessions[i], pool) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot Create Outgoing Channel!\n");
+ if (pool) {
+ switch_core_destroy_memory_pool(&pool);
+ }
+ caller_profiles[i] = NULL;
+ peer_channels[i] = NULL;
+ peer_sessions[i] = NULL;
+ continue;
+ }
+ pool = NULL;
+
+ peer_channels[i] = switch_core_session_get_channel(peer_sessions[i]);
+ assert(peer_channels[i] != NULL);
- if (!table) {
- table = &audio_bridge_peer_state_handlers;
- }
+ if (!table) {
+ table = &audio_bridge_peer_state_handlers;
+ }
- switch_channel_add_state_handler(peer_channel, table);
+ switch_channel_add_state_handler(peer_channels[i], table);
- if (switch_core_session_runing(peer_session)) {
- switch_channel_set_state(peer_channel, CS_RING);
- } else {
- switch_core_session_thread_launch(peer_session);
+ if (switch_core_session_runing(peer_sessions[i])) {
+ switch_channel_set_state(peer_channels[i], CS_RING);
+ } else {
+ switch_core_session_thread_launch(peer_sessions[i]);
+ }
}
time(&start);
+ for (i = 0; i < argc; i++) {
+ if (peer_channels[i]) {
+ ccount++;
+ }
+ }
+
+ if (ccount == 1) {
+ key = file = NULL;
+ }
for (;;) {
- int state = switch_channel_get_state(peer_channel);
- if (state >= CS_RING) {
- break;
- }
+ for (i = 0; i < argc; i++) {
+ int state;
+
+ if (!peer_channels[i]) {
+ continue;
+ }
+
+ state = switch_channel_get_state(peer_channels[i]);
+
+ if (state >= CS_RING) {
+ goto endfor1;
+ }
- if (caller_channel && !switch_channel_ready(caller_channel)) {
- break;
- }
+ if (caller_channel && !switch_channel_ready(caller_channel)) {
+ break;
+ }
- if ((time(NULL) - start) > (time_t)timelimit) {
- break;
+ if ((time(NULL) - start) > (time_t)timelimit_sec) {
+ break;
+ }
+ switch_yield(1000);
}
- switch_yield(1000);
}
+ endfor1:
- if (caller_channel) {
+ if (session) {
+ switch_codec_t *read_codec = switch_core_session_get_read_codec(session);
switch_channel_pre_answer(caller_channel);
+
+ if (switch_core_codec_init(&write_codec,
+ "L16",
+ read_codec->implementation->samples_per_second,
+ read_codec->implementation->microseconds_per_frame / 1000,
+ 1,
+ SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
+ NULL,
+ pool) == SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Raw Codec Activation Success L16@%uhz 1 channel %dms\n",
+ read_codec->implementation->samples_per_second,
+ read_codec->implementation->microseconds_per_frame / 1000);
+ write_frame.codec = &write_codec;
+ write_frame.datalen = read_codec->implementation->bytes_per_frame;
+ write_frame.samples = write_frame.datalen / 2;
+ memset(write_frame.data, 255, write_frame.datalen);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Codec Error!");
+ switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_TEMPORARY_FAILURE);
+ }
}
- while ((!caller_channel || switch_channel_ready(caller_channel)) &&
- !switch_channel_test_flag(peer_channel, CF_ANSWERED) &&
- !switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA) &&
- ((time(NULL) - start) < (time_t)timelimit)) {
-
+ while ((!caller_channel || switch_channel_ready(caller_channel)) &&
+ check_channel_status(peer_channels, peer_sessions, argc, &idx, file, key) && ((time(NULL) - start) < (time_t)timelimit_sec)) {
+
/* read from the channel while we wait if the audio is up on it */
if (session && (switch_channel_test_flag(caller_channel, CF_ANSWERED) || switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA))) {
switch_status_t status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
@@ -1273,7 +1486,7 @@
break;
}
if (read_frame) {
- if (switch_core_session_write_frame(session, read_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
+ if (switch_core_session_write_frame(session, &write_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
break;
}
}
@@ -1284,11 +1497,32 @@
}
+ switch_core_session_reset(session);
+
+ for (i = 0; i < argc; i++) {
+ if (!peer_channels[i]) {
+ continue;
+ }
+ if (i != idx) {
+ switch_channel_hangup(peer_channels[i], SWITCH_CAUSE_LOSE_RACE);
+ }
+ }
+
+
+ if (idx > -1) {
+ peer_session = peer_sessions[idx];
+ peer_channel = peer_channels[idx];
+ } else {
+ status = SWITCH_STATUS_FALSE;
+ goto done;
+ }
+
if (caller_channel && switch_channel_test_flag(peer_channel, CF_ANSWERED)) {
switch_channel_answer(caller_channel);
}
if (switch_channel_test_flag(peer_channel, CF_ANSWERED) || switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA)) {
+ switch_core_session_read_lock(peer_session);
*bleg = peer_session;
status = SWITCH_STATUS_SUCCESS;
} else {
@@ -1298,18 +1532,22 @@
done:
- free(chan_type);
+ if (odata) {
+ free(odata);
+ }
+ if (write_codec.implementation) {
+ switch_core_codec_destroy(&write_codec);
+ }
return status;
}
SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_session_t *session,
- switch_core_session_t *peer_session,
- unsigned int timelimit,
- switch_input_callback_function_t input_callback,
- void *session_data,
- void *peer_session_data)
-
+ switch_core_session_t *peer_session,
+ switch_input_callback_function_t input_callback,
+ void *session_data,
+ void *peer_session_data)
+
{
Modified: freeswitch/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/trunk/src/switch_utils.c (original)
+++ freeswitch/trunk/src/switch_utils.c Wed Aug 16 20:53:09 2006
@@ -75,8 +75,9 @@
SWITCH_DECLARE(unsigned int) switch_separate_string(char *buf, char delim, char **array, int arraylen)
{
int argc;
- char *scan;
- int paren = 0;
+ char *ptr;
+ int quot = 0;
+ char qc = '"';
if (!buf || !array || !arraylen) {
return 0;
@@ -84,25 +85,33 @@
memset(array, 0, arraylen * sizeof(*array));
- scan = buf;
+ ptr = buf;
- for (argc = 0; *scan && (argc < arraylen - 1); argc++) {
- array[argc] = scan;
- for (; *scan; scan++) {
- if (*scan == '(')
- paren++;
- else if (*scan == ')') {
- if (paren)
- paren--;
- } else if ((*scan == delim) && !paren) {
- *scan++ = '\0';
+ for (argc = 0; *ptr && (argc < arraylen - 1); argc++) {
+ array[argc] = ptr;
+ for (; *ptr; ptr++) {
+ if (*ptr == qc) {
+ if (quot) {
+ quot--;
+ } else {
+ quot++;
+ }
+ } else if ((*ptr == delim) && !quot) {
+ *ptr++ = '\0';
break;
}
}
}
- if (*scan) {
- array[argc++] = scan;
+ if (*ptr) {
+ char *e;
+ if (*ptr == qc) {
+ ptr++;
+ }
+ if ((e = strchr(ptr, qc))) {
+ *e = '\0';
+ }
+ array[argc++] = ptr;
}
return argc;
1
0
Author: sphere
Date: Wed Aug 16 15:55:32 2006
New Revision: 2310
Added:
freeswitch/branches/andrewbucklin/
Log:
Creating empty folder for andrewbucklin
1
0
Author: sphere
Date: Wed Aug 16 15:23:28 2006
New Revision: 2309
Added:
freeswitch/branches/windyfeng/
Log:
Creating empty folder for windyfeng
1
0
Author: sphere
Date: Wed Aug 16 15:19:37 2006
New Revision: 2308
Added:
freeswitch/branches/sevuganhari/
Log:
Creating empty folder for sevuganhari
1
0
Author: sphere
Date: Wed Aug 16 15:13:32 2006
New Revision: 2307
Added:
freeswitch/branches/raheelahmad/
Log:
Creating empty folder for raheelahmad
1
0
Author: sphere
Date: Wed Aug 16 03:36:28 2006
New Revision: 2306
Added:
freeswitch/branches/will/
Log:
Creating empty folder for will
1
0
Author: sphere
Date: Wed Aug 16 01:45:26 2006
New Revision: 2305
Added:
freeswitch/branches/codemonkey/
Log:
Creating empty folder for codemonkey
1
0
Author: anthm
Date: Tue Aug 15 20:54:38 2006
New Revision: 2304
Modified:
freeswitch/trunk/src/switch_ivr.c
Log:
add assert
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Tue Aug 15 20:54:38 2006
@@ -439,7 +439,7 @@
comment,
date);
-
+ assert(read_codec != NULL);
interval = read_codec->implementation->microseconds_per_frame / 1000;
1
0