Freeswitch-branches
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
December 2006
- 8 participants
- 101 discussions
[commit] r3525 - freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference
by Freeswitch SVN 04 Dec '06
by Freeswitch SVN 04 Dec '06
04 Dec '06
Author: knhor
Date: Sun Dec 3 23:00:29 2006
New Revision: 3525
Modified:
freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
Log:
a little more polish
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c Sun Dec 3 23:00:29 2006
@@ -92,8 +92,15 @@
struct conference_member;
typedef struct conference_member conference_member_t;
-typedef struct caller_control_actions {
+typedef struct caller_control_fn_table {
+ char *key;
+ char *digits;
+ caller_control_t action;
void (*handler)(conference_member_t *, void *);
+} caller_control_fn_table_t;
+
+typedef struct caller_control_actions {
+ caller_control_fn_table_t *fndesc;
void *data;
} caller_control_action_t;
@@ -1125,12 +1132,7 @@
switch_thread_create(&thread, thd_attr, conference_loop_input, member, pool);
}
-static struct caller_control_fn_table {
- char *key;
- char *digits;
- caller_control_t action;
- void (*handler)(conference_member_t *, void *);
-} ccfntbl[] = {
+static caller_control_fn_table_t ccfntbl[] = {
{"mute", "0", CALLER_CONTROL_MUTE, conference_loop_fn_mute_toggle},
{"deaf mute", "*", CALLER_CONTROL_DEAF_MUTE, conference_loop_fn_deafmute_toggle},
{"energy up", "9", CALLER_CONTROL_ENERGY_UP, conference_loop_fn_energy_up},
@@ -1249,21 +1251,22 @@
}
// if a caller action has been detected, handle it
- if (caller_action != NULL) {
-
- if (caller_action->handler != NULL) {
- int i,found;
+ if (caller_action != NULL && caller_action->fndesc != NULL && caller_action->fndesc->handler != NULL) {
+ switch_channel_t *channel = switch_core_session_get_channel(member->session);
+ switch_caller_profile_t *profile = switch_channel_get_caller_profile(channel);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "digit_stream_parser_feed result != NULL %u\n",caller_action != NULL);
- for(i=0,found=0; i<CCFNTBL_QTY && !found; i++) {
- if (caller_action->handler == ccfntbl[i].handler) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "excuting caller control '%s' param '%s'\n",ccfntbl[i].key,(ccfntbl[i].action != CALLER_CONTROL_MENU ? caller_action->data : ""));
- found = 1;
- }
- }
+ switch_log_printf(SWITCH_CHANNEL_LOG,
+ SWITCH_LOG_INFO,
+ "executing caller control '%s' param '%s' on call '%u,%s,%s,%s'\n",
+ caller_action->fndesc->key,
+ (caller_action->fndesc->action != CALLER_CONTROL_MENU ? caller_action->data : ""),
+ member->id,
+ switch_channel_get_name(channel),
+ profile->caller_id_name,
+ profile->caller_id_number
+ );
+ caller_action->fndesc->handler(member,caller_action->data);
- caller_action->handler(member,caller_action->data);
- }
// set up for next pass
caller_action = NULL;
}
@@ -3516,7 +3519,7 @@
ccfntbl[i].digits);
action = (caller_control_action_t *)switch_core_alloc(conference->pool,sizeof(caller_control_action_t));
if (action != NULL) {
- action->handler = ccfntbl[i].handler;
+ action->fndesc = &ccfntbl[i];
action->data = NULL;
status = switch_ivr_digit_stream_parser_set_event(conference->dtmf_parser,ccfntbl[i].digits,action);
} else {
@@ -3572,7 +3575,7 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Installing caller control action '%s' bound to '%s'.\n",key,val);
action = (caller_control_action_t *)switch_core_alloc(conference->pool,sizeof(caller_control_action_t));
if (action != NULL) {
- action->handler = ccfntbl[i].handler;
+ action->fndesc = &ccfntbl[i];
action->data = (void *)data;
status = switch_ivr_digit_stream_parser_set_event(conference->dtmf_parser,val,action);
} else {
1
0
Author: knhor
Date: Sun Dec 3 17:55:28 2006
New Revision: 3522
Added:
freeswitch/branches/knhor/trunk/libs/udns/
- copied from r3518, /freeswitch/trunk/libs/udns/
freeswitch/branches/knhor/trunk/libs/udns.build.sh
- copied unchanged from r3518, /freeswitch/trunk/libs/udns.build.sh
freeswitch/branches/knhor/trunk/libs/udns/COPYING.LGPL
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/COPYING.LGPL
freeswitch/branches/knhor/trunk/libs/udns/Makefile
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/Makefile
freeswitch/branches/knhor/trunk/libs/udns/NOTES
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/NOTES
freeswitch/branches/knhor/trunk/libs/udns/TODO
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/TODO
freeswitch/branches/knhor/trunk/libs/udns/debian/
- copied from r3518, /freeswitch/trunk/libs/udns/debian/
freeswitch/branches/knhor/trunk/libs/udns/debian/changelog
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/debian/changelog
freeswitch/branches/knhor/trunk/libs/udns/debian/control
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/debian/control
freeswitch/branches/knhor/trunk/libs/udns/debian/copyright
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/debian/copyright
freeswitch/branches/knhor/trunk/libs/udns/debian/rules
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/debian/rules
freeswitch/branches/knhor/trunk/libs/udns/dnsget.1
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/dnsget.1
freeswitch/branches/knhor/trunk/libs/udns/dnsget.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/dnsget.c
freeswitch/branches/knhor/trunk/libs/udns/ex-rdns.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/ex-rdns.c
freeswitch/branches/knhor/trunk/libs/udns/inet_pton.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/inet_pton.c
freeswitch/branches/knhor/trunk/libs/udns/inet_pton.h
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/inet_pton.h
freeswitch/branches/knhor/trunk/libs/udns/rblcheck.1
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/rblcheck.1
freeswitch/branches/knhor/trunk/libs/udns/rblcheck.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/rblcheck.c
freeswitch/branches/knhor/trunk/libs/udns/udns.3
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns.3
freeswitch/branches/knhor/trunk/libs/udns/udns.h
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns.h
freeswitch/branches/knhor/trunk/libs/udns/udns_bl.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_bl.c
freeswitch/branches/knhor/trunk/libs/udns/udns_codes.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_codes.c
freeswitch/branches/knhor/trunk/libs/udns/udns_dn.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_dn.c
freeswitch/branches/knhor/trunk/libs/udns/udns_dntosp.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_dntosp.c
freeswitch/branches/knhor/trunk/libs/udns/udns_misc.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_misc.c
freeswitch/branches/knhor/trunk/libs/udns/udns_parse.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_parse.c
freeswitch/branches/knhor/trunk/libs/udns/udns_resolver.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_resolver.c
freeswitch/branches/knhor/trunk/libs/udns/udns_rr_a.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_rr_a.c
freeswitch/branches/knhor/trunk/libs/udns/udns_rr_mx.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_rr_mx.c
freeswitch/branches/knhor/trunk/libs/udns/udns_rr_naptr.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_rr_naptr.c
freeswitch/branches/knhor/trunk/libs/udns/udns_rr_ptr.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_rr_ptr.c
freeswitch/branches/knhor/trunk/libs/udns/udns_rr_srv.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_rr_srv.c
freeswitch/branches/knhor/trunk/libs/udns/udns_rr_txt.c
- copied unchanged from r3518, /freeswitch/trunk/libs/udns/udns_rr_txt.c
freeswitch/branches/knhor/trunk/libs/win32/Download ETPAN.vcproj
- copied unchanged from r3518, /freeswitch/trunk/libs/win32/Download ETPAN.vcproj
freeswitch/branches/knhor/trunk/libs/win32/etpan/
- copied from r3518, /freeswitch/trunk/libs/win32/etpan/
freeswitch/branches/knhor/trunk/libs/win32/etpan/cleancount
- copied unchanged from r3518, /freeswitch/trunk/libs/win32/etpan/cleancount
freeswitch/branches/knhor/trunk/libs/win32/etpan/libetpan.vcproj
- copied unchanged from r3518, /freeswitch/trunk/libs/win32/etpan/libetpan.vcproj
freeswitch/branches/knhor/trunk/libs/win32/udns/
- copied from r3518, /freeswitch/trunk/libs/win32/udns/
freeswitch/branches/knhor/trunk/libs/win32/udns/libudns.vcproj
- copied unchanged from r3518, /freeswitch/trunk/libs/win32/udns/libudns.vcproj
freeswitch/branches/knhor/trunk/src/mod/applications/mod_enum/
- copied from r3518, /freeswitch/trunk/src/mod/applications/mod_enum/
freeswitch/branches/knhor/trunk/src/mod/applications/mod_enum/Makefile
- copied unchanged from r3518, /freeswitch/trunk/src/mod/applications/mod_enum/Makefile
freeswitch/branches/knhor/trunk/src/mod/applications/mod_enum/mod_enum.c
- copied unchanged from r3518, /freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_enum/mod_enum.vcproj
- copied unchanged from r3518, /freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.vcproj
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_etpan/
- copied from r3518, /freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_etpan/Makefile
- copied unchanged from r3518, /freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/Makefile
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c
- copied unchanged from r3518, /freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.vcproj
- copied unchanged from r3518, /freeswitch/trunk/src/mod/languages/mod_spidermonkey_etpan/mod_spidermonkey_etpan.vcproj
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_odbc/
- copied from r3518, /freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_odbc/Makefile
- copied unchanged from r3518, /freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/Makefile
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
- copied unchanged from r3518, /freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.vcproj
- copied unchanged from r3518, /freeswitch/trunk/src/mod/languages/mod_spidermonkey_odbc/mod_spidermonkey_odbc.vcproj
Modified:
freeswitch/branches/knhor/trunk/ (props changed)
freeswitch/branches/knhor/trunk/AUTHORS
freeswitch/branches/knhor/trunk/Freeswitch.sln
freeswitch/branches/knhor/trunk/INSTALL
freeswitch/branches/knhor/trunk/conf/freeswitch.xml
freeswitch/branches/knhor/trunk/libs/libdingaling/.update
freeswitch/branches/knhor/trunk/libs/libdingaling/src/ldl_compat.h
freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c
freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.h
freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.c
freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone.h
freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_detect.c
freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_detect.h
freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_generate.c
freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_generate.h
freeswitch/branches/knhor/trunk/libs/mozilla.build.sh
freeswitch/branches/knhor/trunk/libs/win32/Download SOFIA.vcproj
freeswitch/branches/knhor/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj
freeswitch/branches/knhor/trunk/modules.conf.in
freeswitch/branches/knhor/trunk/src/include/switch.h
freeswitch/branches/knhor/trunk/src/include/switch_apr.h
freeswitch/branches/knhor/trunk/src/include/switch_bitpack.h
freeswitch/branches/knhor/trunk/src/include/switch_buffer.h
freeswitch/branches/knhor/trunk/src/include/switch_caller.h
freeswitch/branches/knhor/trunk/src/include/switch_channel.h
freeswitch/branches/knhor/trunk/src/include/switch_config.h
freeswitch/branches/knhor/trunk/src/include/switch_console.h
freeswitch/branches/knhor/trunk/src/include/switch_core.h
freeswitch/branches/knhor/trunk/src/include/switch_event.h
freeswitch/branches/knhor/trunk/src/include/switch_frame.h
freeswitch/branches/knhor/trunk/src/include/switch_ivr.h
freeswitch/branches/knhor/trunk/src/include/switch_loadable_module.h
freeswitch/branches/knhor/trunk/src/include/switch_log.h
freeswitch/branches/knhor/trunk/src/include/switch_module_interfaces.h
freeswitch/branches/knhor/trunk/src/include/switch_platform.h
freeswitch/branches/knhor/trunk/src/include/switch_resample.h
freeswitch/branches/knhor/trunk/src/include/switch_rtp.h
freeswitch/branches/knhor/trunk/src/include/switch_sqlite.h
freeswitch/branches/knhor/trunk/src/include/switch_stun.h
freeswitch/branches/knhor/trunk/src/include/switch_types.h
freeswitch/branches/knhor/trunk/src/include/switch_utils.h
freeswitch/branches/knhor/trunk/src/include/switch_xml.h
freeswitch/branches/knhor/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_commands/mod_commands.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_dptools/mod_dptools.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_echo/mod_echo.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_park/mod_park.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback/mod_playback.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_rss/mod_rss.c
freeswitch/branches/knhor/trunk/src/mod/applications/mod_skel/mod_skel.c
freeswitch/branches/knhor/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g711/mod_g711.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g722/mod_g722.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g726/mod_g726.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g729/mod_g729.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_gsm/mod_gsm.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_l16/mod_l16.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_lpc10/mod_lpc10.c
freeswitch/branches/knhor/trunk/src/mod/codecs/mod_speex/mod_speex.c
freeswitch/branches/knhor/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
freeswitch/branches/knhor/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
freeswitch/branches/knhor/trunk/src/mod/directories/mod_ldap/mod_ldap.c
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_iax/mod_iax.c
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/Makefile
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/basecdr.h
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/baseregistry.cpp
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/baseregistry.h
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.h
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/csvcdr.cpp
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/csvcdr.h
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.cpp
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.h
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/pddcdr.cpp
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/pddcdr.h
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c
freeswitch/branches/knhor/trunk/src/mod/formats/mod_native_file/mod_native_file.c
freeswitch/branches/knhor/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_mono/mod_mono.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_perl/mod_perl.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_perl/switch_swig_wrap.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_php/mod_php.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_php/switch_swig_wrap.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/mod_python.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/switch_swig_wrap.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_ruby/mod_ruby.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_ruby/switch_swig_wrap.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/Makefile
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.h
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_skel/mod_spidermonkey_skel.c
freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c
freeswitch/branches/knhor/trunk/src/mod/loggers/mod_console/mod_console.c
freeswitch/branches/knhor/trunk/src/mod/loggers/mod_syslog/mod_syslog.c
freeswitch/branches/knhor/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
freeswitch/branches/knhor/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
freeswitch/branches/knhor/trunk/src/switch.c
freeswitch/branches/knhor/trunk/src/switch_buffer.c
freeswitch/branches/knhor/trunk/src/switch_caller.c
freeswitch/branches/knhor/trunk/src/switch_channel.c
freeswitch/branches/knhor/trunk/src/switch_config.c
freeswitch/branches/knhor/trunk/src/switch_console.c
freeswitch/branches/knhor/trunk/src/switch_core.c
freeswitch/branches/knhor/trunk/src/switch_event.c
freeswitch/branches/knhor/trunk/src/switch_ivr.c
freeswitch/branches/knhor/trunk/src/switch_loadable_module.c
freeswitch/branches/knhor/trunk/src/switch_log.c
freeswitch/branches/knhor/trunk/src/switch_resample.c
freeswitch/branches/knhor/trunk/src/switch_rtp.c
freeswitch/branches/knhor/trunk/src/switch_stun.c
freeswitch/branches/knhor/trunk/src/switch_swig.c
freeswitch/branches/knhor/trunk/src/switch_utils.c
freeswitch/branches/knhor/trunk/src/switch_xml.c
freeswitch/branches/knhor/trunk/support/freeswitch.pub
Log:
Merged revisions 3441-3521 via svnmerge from trunk
Modified: freeswitch/branches/knhor/trunk/AUTHORS
==============================================================================
--- freeswitch/branches/knhor/trunk/AUTHORS (original)
+++ freeswitch/branches/knhor/trunk/AUTHORS Sun Dec 3 17:55:28 2006
@@ -30,6 +30,8 @@
Ken Rice of Asteria Solutions Group, INC <ken AT asteriasgi.com> - xmlcdr, sofia improvements, load testing.
Neal Horman <neal at wanlink dot com> - conference improvements, switch_ivr menu additions and other tweaks.
Johny Kadarisman <jkr888 at gmail.com> - mod_python fixups.
+ Michael Murdock <mike at mmurdock dot org> - testing, documentation, bug finding and usability enhancements.
+ Matt Klein <mklein(a)nmedia.net>
A big THANK YOU goes to:
Modified: freeswitch/branches/knhor/trunk/Freeswitch.sln
==============================================================================
--- freeswitch/branches/knhor/trunk/Freeswitch.sln (original)
+++ freeswitch/branches/knhor/trunk/Freeswitch.sln Sun Dec 3 17:55:28 2006
@@ -11,14 +11,14 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FreeSwitchCoreLib", "w32\Library\FreeSwitchCore.vcproj", "{202D7A4E-760D-4D0E-AFA1-D7459CED30FF}"
ProjectSection(ProjectDependencies) = postProject
- {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761} = {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761}
- {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
{6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
{101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
{EEF031CB-FED8-451E-A471-91EC8D4F6750} = {EEF031CB-FED8-451E-A471-91EC8D4F6750}
{F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
{F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {89385C74-5860-4174-9CAF-A39E7C48909C} = {89385C74-5860-4174-9CAF-A39E7C48909C}
{8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
+ {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761} = {50AD0E28-B8D7-4FCC-8FC3-599F6AC69761}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_g729", "src\mod\codecs\mod_g729\mod_g729.vcproj", "{1D95CD95-0DE2-48C3-AC23-D5C7D1C9C0F0}"
@@ -566,6 +566,43 @@
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
EndProjectSection
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libudns", "libs\win32\udns\libudns.vcproj", "{4043FC6A-9A30-4577-8AD5-9B233C9575D8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_enum", "src\mod\applications\mod_enum\mod_enum.vcproj", "{71A967D5-0E99-4CEF-A587-98836EE6F2EF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {8D04B550-D240-4A44-8A18-35DA3F7038D9} = {8D04B550-D240-4A44-8A18-35DA3F7038D9}
+ {4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {4043FC6A-9A30-4577-8AD5-9B233C9575D8}
+ {F057DA7F-79E5-4B00-845C-EF446EF055E3} = {F057DA7F-79E5-4B00-845C-EF446EF055E3}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {101130D1-3EA6-4ED2-B65D-CEB5243A20ED} = {101130D1-3EA6-4ED2-B65D-CEB5243A20ED}
+ {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3} = {6EDFEFD5-3596-4FA9-8EBA-B331547B35A3}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_etpan", "src\mod\languages\mod_spidermonkey_etpan\mod_spidermonkey_etpan.vcproj", "{D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_spidermonkey_odbc", "src\mod\languages\mod_spidermonkey_odbc\mod_spidermonkey_odbc.vcproj", "{0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}"
+ ProjectSection(ProjectDependencies) = postProject
+ {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F}
+ {202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+ {F6C55D93-B927-4483-BB69-15AEF3DD2DFF} = {F6C55D93-B927-4483-BB69-15AEF3DD2DFF}
+ {204FA0DE-305D-4414-AE2E-F195A23F390D} = {204FA0DE-305D-4414-AE2E-F195A23F390D}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Download ETPAN", "libs\win32\Download ETPAN.vcproj", "{EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libetpan", "libs\win32\etpan\libetpan.vcproj", "{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}"
+ ProjectSection(ProjectDependencies) = postProject
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB} = {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}
+ EndProjectSection
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -928,6 +965,30 @@
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Debug|Win32.Build.0 = Debug|Win32
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|Win32.ActiveCfg = Release|Win32
{8F992C49-6C51-412F-B2A3-34EAB708EB65}.Release|Win32.Build.0 = Release|Win32
+ {4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Debug|Win32.Build.0 = Debug|Win32
+ {4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.ActiveCfg = Release|Win32
+ {4043FC6A-9A30-4577-8AD5-9B233C9575D8}.Release|Win32.Build.0 = Release|Win32
+ {71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Debug|Win32.Build.0 = Debug|Win32
+ {71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Release|Win32.ActiveCfg = Release|Win32
+ {71A967D5-0E99-4CEF-A587-98836EE6F2EF}.Release|Win32.Build.0 = Release|Win32
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}.Debug|Win32.Build.0 = Debug|Win32
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}.Release|Win32.ActiveCfg = Release|Win32
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9}.Release|Win32.Build.0 = Release|Win32
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Debug|Win32.Build.0 = Debug|Win32
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Release|Win32.ActiveCfg = Release|Win32
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF}.Release|Win32.Build.0 = Release|Win32
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}.Debug|Win32.Build.0 = Debug|Win32
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}.Release|Win32.ActiveCfg = Release|Win32
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB}.Release|Win32.Build.0 = Release|Win32
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Debug|Win32.Build.0 = Debug|Win32
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Release|Win32.ActiveCfg = Release|Win32
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -959,6 +1020,7 @@
{C24FB505-05D7-4319-8485-7540B44C8603} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{B5881A85-FE70-4F64-8607-2CAAE52669C6} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{2740F45C-475A-4DE0-BCED-6E2E5F6C4B8B} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
+ {71A967D5-0E99-4CEF-A587-98836EE6F2EF} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
{5FD31A25-5D83-4794-8BEE-904DAD84CE71} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{FE3540C5-3303-46E0-A69E-D92F775687F1} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
{3A5B9131-F20C-4A85-9447-6C1610941CEE} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
@@ -998,11 +1060,15 @@
{D71E7338-8D9C-4FE4-A15F-D5CC60202C7C} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{70A49BC2-7500-41D0-B75D-EDCC5BE987A0} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{DF018947-0FFF-4EB3-BDEE-441DC81DA7A4} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
+ {4043FC6A-9A30-4577-8AD5-9B233C9575D8} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
+ {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
{1AD3F51E-BBB6-4090-BA39-9DFAB1EF1F5F} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{B0C6CFF9-7DCD-4A21-8BA4-C2011E18DED8} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{7B077E7F-1BE7-4291-AB86-55E527B25CAC} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{ACFFF684-4D19-4D48-AF12-88EA1D778BDF} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{8F992C49-6C51-412F-B2A3-34EAB708EB65} = {0C808854-54D1-4230-BFF5-77B5FD905000}
+ {D6C82F86-2B05-4A7F-8CC6-D2592E66FBB9} = {0C808854-54D1-4230-BFF5-77B5FD905000}
+ {0A6B5EA5-6E9B-4A51-931F-ED25AA87B4DF} = {0C808854-54D1-4230-BFF5-77B5FD905000}
{692F6330-4D87-4C82-81DF-40DB5892636E} = {4CF6A6AC-07DE-4B9E-ABE1-7F98B64E0BB0}
{1C453396-D912-4213-89FD-9B489162B7B5} = {A7AB4405-FDB7-4853-9FBB-1516B1C3D80A}
{CBEC7225-0C21-4DA8-978E-1F158F8AD950} = {F69A4A6B-9360-4EBB-A280-22AA3C455AC5}
@@ -1021,5 +1087,6 @@
{B0AA13FC-636C-45A7-8EAE-663220679A75} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{8B2CE7D1-77EF-45ED-927D-82147805440B} = {C120A020-773F-4EA3-923F-B67AF28B750D}
{8B3B4C4C-13C2-446C-BEB0-F412CC2CFB9A} = {C120A020-773F-4EA3-923F-B67AF28B750D}
+ {EAE4F6B7-B1E3-4975-8580-481E47A9BEAB} = {C120A020-773F-4EA3-923F-B67AF28B750D}
EndGlobalSection
EndGlobal
Modified: freeswitch/branches/knhor/trunk/INSTALL
==============================================================================
--- freeswitch/branches/knhor/trunk/INSTALL (original)
+++ freeswitch/branches/knhor/trunk/INSTALL Sun Dec 3 17:55:28 2006
@@ -1,3 +1,9 @@
+**************************************** NOTICE *******************************
+You MUST own the destination path of /usr/local/freeswitch for the project to
+build properly! The alternative is to pick a different prefix with ./configure
+--prefix=/my/special/place .
+*******************************************************************************
+
UNIX:
You will need 'wget' installed in your path so the build system
can download the dependancies.
Modified: freeswitch/branches/knhor/trunk/conf/freeswitch.xml
==============================================================================
--- freeswitch/branches/knhor/trunk/conf/freeswitch.xml (original)
+++ freeswitch/branches/knhor/trunk/conf/freeswitch.xml Sun Dec 3 17:55:28 2006
@@ -22,6 +22,10 @@
<load module="mod_console"/>
<!-- <load module="mod_syslog"/> -->
+ <!-- Multi-Faceted -->
+ <!-- mod_enum is a dialplan interface, an application interface and an api command interface -->
+ <load module="mod_enum"/>
+
<!-- XML Interfaces -->
<!-- <load module="mod_xml_rpc"/> -->
@@ -46,7 +50,7 @@
<!-- Applications -->
<load module="mod_bridgecall"/>
<load module="mod_commands"/>
- <!--<load module="mod_conference"/>-->
+ <load module="mod_conference"/>
<load module="mod_dptools"/>
<load module="mod_echo"/>
<!--<load module="mod_park"/>-->
@@ -77,7 +81,6 @@
<!-- ASR /TTS -->
<!-- <load module="mod_cepstral"/> -->
<!-- <load module="mod_rss"/> -->
-
</modules>
</configuration>
@@ -85,6 +88,7 @@
<modules>
<load module="mod_spidermonkey_teletone"/>
<load module="mod_spidermonkey_core_db"/>
+ <!--<load module="mod_spidermonkey_odbc"/>-->
</modules>
</configuration>
@@ -404,6 +408,19 @@
</profile>
</profiles>
</configuration>
+
+ <configuration name="enum.conf" description="ENUM Module">
+ <settings>
+ <param name="default-root" value="e164.org"/>
+ </settings>
+
+ <routes>
+ <route service="E2U+SIP" regex="sip:(.*)" replace="sofia/test/$1"/>
+ <route service="E2U+IAX2" regex="iax2:(.*)" replace="iax/$1"/>
+ <route service="E2U+XMPP" regex="XMPP:(.*)" replace="dingaling/jingle/$1"/>
+ </routes>
+ </configuration>
+
</section>
<section name="dialplan" description="Regex/XML Dialplan">
@@ -415,7 +432,8 @@
<context name="default">
<extension name="tollfree">
<condition field="destination_number" expression="^(18(0{2}|8{2}|7{2}|6{2})\d{7})$">
- <action application="bridge" data="sofia/test/$1-freeswitch(a)voip.trxtel.com"/>
+ <action application="enum" data="$1"/>
+ <action application="bridge" data="${enum_auto_route}"/>
</condition>
</extension>
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/.update
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/.update (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/.update Sun Dec 3 17:55:28 2006
@@ -1 +1 @@
-Thu Nov 16 16:09:31 UTC 2006
+Fri Dec 1 21:13:04 EST 2006
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/ldl_compat.h
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/src/ldl_compat.h (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/ldl_compat.h Sun Dec 3 17:55:28 2006
@@ -61,3 +61,14 @@
#endif
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.c Sun Dec 3 17:55:28 2006
@@ -497,17 +497,20 @@
struct ldl_buffer *buffer;
size_t x;
+
+ apr_cpystrn(id, from, sizeof(id));
+ if ((resource = strchr(id, '/'))) {
+ *resource++ = '\0';
+ }
+
if (!apr_hash_get(handle->sub_hash, from, APR_HASH_KEY_STRING)) {
iks *msg;
apr_hash_set(handle->sub_hash, apr_pstrdup(handle->pool, from), APR_HASH_KEY_STRING, &marker);
- msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, from, "Ding A Ling....");
+ msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, id, "Ding A Ling....");
apr_queue_push(handle->queue, msg);
}
- apr_cpystrn(id, from, sizeof(id));
- if ((resource = strchr(id, '/'))) {
- *resource++ = '\0';
- }
+
if (resource) {
for (x = 0; x < strlen(resource); x++) {
@@ -705,20 +708,23 @@
if (!status) {
status = type;
}
+
+
+ apr_cpystrn(id, from, sizeof(id));
+ lowercase(id);
+
+ if ((resource = strchr(id, '/'))) {
+ *resource++ = '\0';
+ }
if (!apr_hash_get(handle->sub_hash, from, APR_HASH_KEY_STRING)) {
iks *msg;
apr_hash_set(handle->sub_hash, apr_pstrdup(handle->pool, from), APR_HASH_KEY_STRING, &marker);
- msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, from, "Ding A Ling....");
+ msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, id, "Ding A Ling....");
apr_queue_push(handle->queue, msg);
}
- apr_cpystrn(id, from, sizeof(id));
- lowercase(id);
- if ((resource = strchr(id, '/'))) {
- *resource++ = '\0';
- }
if (resource && strstr(resource, "talk") && (buffer = apr_hash_get(handle->probe_hash, id, APR_HASH_KEY_STRING))) {
apr_cpystrn(buffer->buf, from, buffer->len);
@@ -811,14 +817,25 @@
ldl_handle_t *handle = user_data;
char *from = iks_find_attrib(pak->x, "from");
char *to = iks_find_attrib(pak->x, "to");
- iks *msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, from, "Ding A Ling....");
+ iks *msg = NULL;
+ char *id = strdup(from);
+ char *r;
+ if (!id) {
+ return -1;
+ }
+ if ((r = strchr(from, '/'))) {
+ *r++ = '\0';
+ }
+
+ msg = iks_make_s10n (IKS_TYPE_SUBSCRIBED, id, "Ding A Ling....");
+
if (to && ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
iks_insert_attrib(msg, "from", to);
}
apr_queue_push(handle->queue, msg);
- msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, from, "Ding A Ling....");
+ msg = iks_make_s10n (IKS_TYPE_SUBSCRIBE, id, "Ding A Ling....");
if (to && ldl_test_flag(handle, LDL_FLAG_COMPONENT)) {
iks_insert_attrib(msg, "from", to);
@@ -2134,4 +2151,13 @@
handle->log_stream = log_stream;
}
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.h (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/libdingaling.h Sun Dec 3 17:55:28 2006
@@ -557,3 +557,14 @@
*
*/
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.c
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.c (original)
+++ freeswitch/branches/knhor/trunk/libs/libdingaling/src/sha1.c Sun Dec 3 17:55:28 2006
@@ -212,4 +212,13 @@
#endif
}
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone.h
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone.h (original)
+++ freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone.h Sun Dec 3 17:55:28 2006
@@ -74,3 +74,14 @@
#endif
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_detect.c
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_detect.c (original)
+++ freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_detect.c Sun Dec 3 17:55:28 2006
@@ -401,3 +401,13 @@
return max;
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_detect.h
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_detect.h (original)
+++ freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_detect.h Sun Dec 3 17:55:28 2006
@@ -225,3 +225,14 @@
#endif
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_generate.c
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_generate.c (original)
+++ freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_generate.c Sun Dec 3 17:55:28 2006
@@ -414,3 +414,14 @@
return 0;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_generate.h
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_generate.h (original)
+++ freeswitch/branches/knhor/trunk/libs/libteletone/src/libteletone_generate.h Sun Dec 3 17:55:28 2006
@@ -163,3 +163,14 @@
#endif
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/libs/mozilla.build.sh
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/mozilla.build.sh (original)
+++ freeswitch/branches/knhor/trunk/libs/mozilla.build.sh Sun Dec 3 17:55:28 2006
@@ -23,6 +23,7 @@
cp js/src/config/Linux_All.mk js/src/config/`uname -s``uname -r`.mk
ldflags="-lpthread"
+other_libs="-lpthread"
fi
if [ $hosttype = "OpenBSD" ] ; then
@@ -49,5 +50,6 @@
cd nsprpub && CFLAGS=$cflags LDFLAGS=$ldflags ./configure $opts && $MAKE
-cd ../js/src && CFLAGS=$cflags BUILD_OPT=$BUILD_OPT LDFLAGS=$ldflags JS_THREADSAFE=1 JS_HAS_FILE_OBJECT=1 OTHER_LIBS="-L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr" $MAKE -f Makefile.ref `find . -name libjs.a`
+cd ../js/src && CFLAGS=$cflags BUILD_OPT=$BUILD_OPT LDFLAGS=$ldflags JS_THREADSAFE=1 JS_HAS_FILE_OBJECT=1 OTHER_LIBS="$other_libs -L../../../mozilla/nsprpub/dist/lib" INCLUDES="-I../../../mozilla/nsprpub/dist/include/nspr" $MAKE -f Makefile.ref `find . -name libjs.a`
+
Modified: freeswitch/branches/knhor/trunk/libs/win32/Download SOFIA.vcproj
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/win32/Download SOFIA.vcproj (original)
+++ freeswitch/branches/knhor/trunk/libs/win32/Download SOFIA.vcproj Sun Dec 3 17:55:28 2006
@@ -76,8 +76,8 @@
<Tool
Name="VCCustomBuildTool"
Description="Downloading SOFIA."
- CommandLine="if not exist "$(ProjectDir)..\sofia-sip-1.12.3.11" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://svn.freeswitch.org/downloads/libs/sofia-sip-1.12.3.11.tar.gz "$(ProjectDir).."
"
- Outputs="$(ProjectDir)..\sofia-sip-1.12.3.11"
+ CommandLine="if not exist "$(ProjectDir)..\sofia-sip-1.12.4" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://svn.freeswitch.org/downloads/libs/sofia-sip-1.12.4.tar.gz "$(ProjectDir).."
"
+ Outputs="$(ProjectDir)..\sofia-sip-1.12.4"
/>
</FileConfiguration>
<FileConfiguration
@@ -86,8 +86,8 @@
<Tool
Name="VCCustomBuildTool"
Description="Downloading SOFIA."
- CommandLine="if not exist "$(ProjectDir)..\sofia-sip-1.12.3.11" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://svn.freeswitch.org/downloads/libs/sofia-sip-1.12.3.11.tar.gz "$(ProjectDir).."
"
- Outputs="$(ProjectDir)..\sofia-sip-1.12.3.11"
+ CommandLine="if not exist "$(ProjectDir)..\sofia-sip-1.12.4" cscript /nologo "$(ProjectDir)util.vbs" GetUnzip http://svn.freeswitch.org/downloads/libs/sofia-sip-1.12.4.tar.gz "$(ProjectDir).."
"
+ Outputs="$(ProjectDir)..\sofia-sip-1.12.4"
/>
</FileConfiguration>
</File>
Modified: freeswitch/branches/knhor/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj
==============================================================================
--- freeswitch/branches/knhor/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj (original)
+++ freeswitch/branches/knhor/trunk/libs/win32/sofia/libsofia_sip_ua_static.vcproj Sun Dec 3 17:55:28 2006
@@ -26,7 +26,7 @@
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "$(ProjectDir)..\..\sofia-sip-1.12.3.11\win32\gawk.exe" cscript /nologo "$(ProjectDir)..\util.vbs" Get http://svn.freeswitch.org/downloads/win32/gawk.exe "$(ProjectDir)..\..\sofia-sip-1.12.3.11\win32\"
cd /D "$(ProjectDir)..\..\sofia-sip-1.12.3.11\win32\"
"autogen.cmd"
"
+ CommandLine="if not exist "$(ProjectDir)..\..\sofia-sip-1.12.4\win32\gawk.exe" cscript /nologo "$(ProjectDir)..\util.vbs" Get http://svn.freeswitch.org/downloads/win32/gawk.exe "$(ProjectDir)..\..\sofia-sip-1.12.4\win32\"
cd /D "$(ProjectDir)..\..\sofia-sip-1.12.4\win32\"
"autogen.cmd"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""..\..\sofia-sip-1.12.3.11\win32";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\bnf";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\url";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nth";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\features";"..\..\pthreads-w32-2-7-0-release";."
+ AdditionalIncludeDirectories=""..\..\sofia-sip-1.12.4\win32";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\su";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\bnf";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\url";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\http";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\nth";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\features";"..\..\pthreads-w32-2-7-0-release";."
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;IN_LIBSOFIA_SIP_UA_STATIC;LIBSOFIA_SIP_UA_STATIC;LIBSRES_STATIC;PTW32_STATIC_LIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -104,7 +104,7 @@
>
<Tool
Name="VCPreBuildEventTool"
- CommandLine="if not exist "$(ProjectDir)..\..\sofia-sip-1.12.3.11\win32\gawk.exe" cscript /nologo "$(ProjectDir)..\util.vbs" Get http://svn.freeswitch.org/downloads/win32/gawk.exe "$(ProjectDir)..\..\sofia-sip-1.12.3.11\win32\"
cd /D "$(ProjectDir)..\..\sofia-sip-1.12.3.11\win32\"
"autogen.cmd"
"
+ CommandLine="if not exist "$(ProjectDir)..\..\sofia-sip-1.12.4\win32\gawk.exe" cscript /nologo "$(ProjectDir)..\util.vbs" Get http://svn.freeswitch.org/downloads/win32/gawk.exe "$(ProjectDir)..\..\sofia-sip-1.12.4\win32\"
cd /D "$(ProjectDir)..\..\sofia-sip-1.12.4\win32\"
"autogen.cmd"
"
/>
<Tool
Name="VCCustomBuildTool"
@@ -122,7 +122,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
- AdditionalIncludeDirectories=""..\..\sofia-sip-1.12.3.11\win32";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\bnf";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\url";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nth";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport";"..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\features";"..\..\pthreads-w32-2-7-0-release";."
+ AdditionalIncludeDirectories=""..\..\sofia-sip-1.12.4\win32";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\su";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\bnf";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\url";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\http";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\nth";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport";"..\..\sofia-sip-1.12.4\libsofia-sip-ua\features";"..\..\pthreads-w32-2-7-0-release";."
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;IN_LIBSOFIA_SIP_UA_STATIC;LIBSOFIA_SIP_UA_STATIC;LIBSRES_STATIC;PTW32_STATIC_LIB"
StringPooling="true"
RuntimeLibrary="2"
@@ -182,247 +182,247 @@
Name="su"
Filter="su*.c"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\inet_ntop.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\inet_pton.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_addrinfo.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_alloc.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_alloc_lock.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_bm.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_default_log.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_errno.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_global_log.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_localinfo.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_log.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_md5.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_os_nw.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_port.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_root.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_sprintf.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_strdup.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_strlst.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_tag_io.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_taglist.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_time.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_time0.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_timer.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_uniqueid.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_vector.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_wait.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\inet_ntop.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\inet_pton.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_addrinfo.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_alloc.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_alloc_lock.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_bm.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_default_log.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_errno.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_global_log.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_localinfo.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_log.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_md5.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_os_nw.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_port.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_root.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_sprintf.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_strdup.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_strlst.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_tag_io.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_taglist.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_time.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_time0.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_timer.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_uniqueid.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_vector.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_wait.c"></File>
</Filter>
<Filter
Name="ipt"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt\base64.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt\rc4.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt\string0.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt\token64.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt\base64.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt\rc4.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt\string0.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt\token64.c"></File>
</Filter>
<Filter
Name="url"
Filter="url*.c"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\url\url.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\url\url_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\url\url_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\url\url.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\url\url_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\url\url_tag_ref.c"></File>
</Filter>
<Filter
Name="features"
Filter="features*.c"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\features\features.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\features\features.c"></File>
</Filter>
<Filter
Name="bnf"
Filter="bnf*.c"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\bnf\bnf.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\bnf\bnf.c"></File>
</Filter>
<Filter
Name="msg"
Filter="msg*.c"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_auth.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_basic.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_date.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_generic.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_header_copy.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_header_make.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_mclass.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_mime.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_mime_table.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_parser.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_parser_util.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_auth.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_basic.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_date.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_generic.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_header_copy.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_header_make.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_mclass.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_mime.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_mime_table.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_parser.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_parser_util.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_tag.c"></File>
</Filter>
<Filter
Name="clib replacement"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\memcspn.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\memmem.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\memspn.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\strcasestr.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\strtoull.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\memcspn.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\memmem.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\memspn.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\strcasestr.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\strtoull.c"></File>
</Filter>
<Filter
Name="sip"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_basic.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_caller_prefs.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_event.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_extra.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_feature.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_header.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_mime.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_parser.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_parser_table.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_prack.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_pref_util.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_reason.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_refer.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_security.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_session.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_status.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_tag_class.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_tag_ref.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_time.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_util.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_basic.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_caller_prefs.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_event.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_extra.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_feature.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_header.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_mime.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_parser.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_parser_table.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_prack.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_pref_util.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_reason.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_refer.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_security.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_session.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_status.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_tag_class.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_time.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_util.c"></File>
</Filter>
<Filter
Name="http"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_basic.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_extra.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_header.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_parser.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_parser_table.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_status.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_tag_class.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\http_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_basic.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_extra.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_header.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_parser.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_parser_table.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_status.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_tag_class.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\http_tag_ref.c"></File>
</Filter>
<Filter
Name="nth"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nth\nth_client.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nth\nth_server.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nth\nth_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nth\nth_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nth\nth_client.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nth\nth_server.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nth\nth_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nth\nth_tag_ref.c"></File>
</Filter>
<Filter
Name="sresolv"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sres.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sres_blocking.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sres_cache.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sresolv.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sres.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sres_blocking.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sres_cache.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sresolv.c"></File>
</Filter>
<Filter
Name="nea"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\nea.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\nea_debug.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\nea_event.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\nea_server.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\nea_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\nea_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\nea.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\nea_debug.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\nea_event.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\nea_server.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\nea_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\nea_tag_ref.c"></File>
</Filter>
<Filter
Name="iptsec"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_client.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_common.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_digest.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_module.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_module_http.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_module_sip.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_plugin.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_plugin_delayed.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\auth_tag_ref.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\iptsec_debug.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_client.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_common.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_digest.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_module.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_module_http.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_module_sip.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_plugin.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_plugin_delayed.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\auth_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\iptsec_debug.c"></File>
</Filter>
<Filter
Name="stun"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\stun.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\stun_common.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\stun_dns.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\stun_internal.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\stun_mini.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\stun_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\stun_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\stun.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\stun_common.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\stun_dns.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\stun_internal.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\stun_mini.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\stun_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\stun_tag_ref.c"></File>
</Filter>
<Filter
Name="nua"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_common.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_dialog.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_dialog.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_event_server.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_extension.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_message.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_notifier.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_options.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_params.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_params.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_publish.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_register.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_registrar.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_session.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_stack.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_stack.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_subnotref.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\nua_tag_ref.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\outbound.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_common.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_dialog.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_dialog.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_event_server.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_extension.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_message.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_notifier.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_options.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_params.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_params.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_publish.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_register.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_registrar.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_session.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_stack.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_stack.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_subnotref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\nua_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\outbound.c"></File>
</Filter>
<Filter
Name="nta"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\nta.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\nta_check.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\nta_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\nta_tag_ref.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\sl_read_payload.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\sl_utils_log.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\sl_utils_print.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\nta.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\nta_check.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\nta_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\nta_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\sl_read_payload.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\sl_utils_log.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\sl_utils_print.c"></File>
</Filter>
<Filter
Name="tport"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_internal.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_logging.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_stub_sigcomp.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_stub_stun.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_tag_ref.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_type_connect.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_type_tcp.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_type_udp.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_internal.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_logging.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_stub_sigcomp.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_stub_stun.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_type_connect.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_type_tcp.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_type_udp.c"></File>
</Filter>
<Filter
Name="sdp"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp\sdp.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp\sdp_parse.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp\sdp_print.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp\sdp_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp\sdp_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp\sdp.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp\sdp_parse.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp\sdp_print.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp\sdp_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp\sdp_tag_ref.c"></File>
</Filter>
<Filter
Name="soa"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa\soa.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa\sofia-sip\soa_session.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa\soa_static.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa\soa_tag.c"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa\soa_tag_ref.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa\soa.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa\sofia-sip\soa_session.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa\soa_static.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa\soa_tag.c"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa\soa_tag_ref.c"></File>
</Filter>
</Filter>
<Filter
@@ -433,194 +433,194 @@
Name="su headers"
Filter="su*.h"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\htable.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\htable2.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\rbtree.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_addrinfo.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_alloc.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_alloc_stat.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_bm.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_config.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_debug.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_errno.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_localinfo.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_log.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_md5.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_module_debug.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_os_nw.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\su_port.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_source.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_strlst.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_tag_class.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_tag_inline.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_tag_io.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_tagarg.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_time.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_types.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_uniqueid.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_vector.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\su_wait.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\su\sofia-sip\tstdef.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\htable.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\htable2.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\rbtree.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_addrinfo.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_alloc.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_alloc_stat.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_bm.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_config.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_debug.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_errno.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_localinfo.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_log.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_md5.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_module_debug.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_os_nw.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\su_port.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_source.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_strlst.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_tag_inline.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_tag_io.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_tagarg.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_time.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_types.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_uniqueid.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_vector.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\su_wait.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\su\sofia-sip\tstdef.h"></File>
</Filter>
<Filter
Name="win32 headers"
>
<File RelativePath="..\config.h"></File>
- <File RelativePath="..\sofia-sip-1.12.3.11\su_configure.h"></File>
+ <File RelativePath="..\sofia-sip-1.12.4\su_configure.h"></File>
<File RelativePath="..\unistd.h"></File>
</Filter>
<Filter
Name="ipt headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt\sofia-sip\base64.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt\sofia-sip\rc4.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt\sofia-sip\string0.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\ipt\sofia-sip\token64.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt\sofia-sip\base64.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt\sofia-sip\rc4.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt\sofia-sip\string0.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\ipt\sofia-sip\token64.h"></File>
</Filter>
<Filter
Name="url headers"
Filter="url*.h"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\url\sofia-sip\url.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\url\sofia-sip\url_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\url\sofia-sip\url_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\url\sofia-sip\url.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\url\sofia-sip\url_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\url\sofia-sip\url_tag_class.h"></File>
</Filter>
<Filter
Name="features headers"
Filter="features*.h"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\features\sofia-sip\sofia_features.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\features\sofia-sip\sofia_features.h"></File>
</Filter>
<Filter
Name="bnf headers"
Filter="bnf*.h"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\bnf\sofia-sip\bnf.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\bnf\sofia-sip\hostdomain.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\bnf\sofia-sip\bnf.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\bnf\sofia-sip\hostdomain.h"></File>
</Filter>
<Filter
Name="msg headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_addr.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_bnf.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_buffer.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_date.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_header.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\msg_internal.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_mclass.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_mclass_hash.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_mime.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_mime_protos.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_parser.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_protos.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_tag_class.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\msg\sofia-sip\msg_types.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_addr.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_bnf.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_buffer.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_date.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_header.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\msg_internal.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_mclass.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_mclass_hash.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_mime.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_mime_protos.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_parser.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_protos.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\msg\sofia-sip\msg_types.h"></File>
</Filter>
<Filter
Name="sip headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_extensions.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip_hclasses.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip_header.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sip_internal.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip_parser.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip_protos.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip_status.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip_tag_class.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sip\sofia-sip\sip_util.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_extensions.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip_hclasses.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip_header.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sip_internal.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip_parser.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip_protos.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip_status.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sip\sofia-sip\sip_util.h"></File>
</Filter>
<Filter
Name="http headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\sofia-sip\http.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\sofia-sip\http_hclasses.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\sofia-sip\http_header.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\sofia-sip\http_parser.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\sofia-sip\http_protos.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\sofia-sip\http_status.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\sofia-sip\http_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\http\sofia-sip\http_tag_class.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\sofia-sip\http.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\sofia-sip\http_hclasses.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\sofia-sip\http_header.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\sofia-sip\http_parser.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\sofia-sip\http_protos.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\sofia-sip\http_status.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\sofia-sip\http_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\http\sofia-sip\http_tag_class.h"></File>
</Filter>
<Filter
Name="nth headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nth\sofia-sip\nth.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nth\sofia-sip\nth_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nth\sofia-sip\nth.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nth\sofia-sip\nth_tag.h"></File>
</Filter>
<Filter
Name="sresolv headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sofia-resolv\sres.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sofia-resolv\sres_async.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sofia-resolv\sres_cache.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sofia-resolv\sres_record.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sresolv\sofia-sip\sresolv.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sofia-resolv\sres.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sofia-resolv\sres_async.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sofia-resolv\sres_cache.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sofia-resolv\sres_record.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sresolv\sofia-sip\sresolv.h"></File>
</Filter>
<Filter
Name="nea headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\sofia-sip\nea.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\nea_debug.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nea\sofia-sip\nea_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\sofia-sip\nea.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\nea_debug.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nea\sofia-sip\nea_tag.h"></File>
</Filter>
<Filter
Name="iptsec headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\sofia-sip\auth_client.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\sofia-sip\auth_digest.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\sofia-sip\auth_module.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\sofia-sip\auth_ntlm.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\sofia-sip\auth_plugin.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec\iptsec_debug.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\sofia-sip\auth_client.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\sofia-sip\auth_digest.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\sofia-sip\auth_module.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\sofia-sip\auth_ntlm.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\sofia-sip\auth_plugin.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\iptsec\iptsec_debug.h"></File>
</Filter>
<Filter
Name="stun headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\sofia-sip\stun.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\sofia-sip\stun_common.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\stun\sofia-sip\stun_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\sofia-sip\stun.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\sofia-sip\stun_common.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\stun\sofia-sip\stun_tag.h"></File>
</Filter>
<Filter
Name="nua headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\sofia-sip\nua.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nua\sofia-sip\nua_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\sofia-sip\nua.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nua\sofia-sip\nua_tag.h"></File>
</Filter>
<Filter
Name="nta headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\sofia-sip\nta.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\nta_internal.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\sofia-sip\nta_stateless.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\sofia-sip\nta_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\sofia-sip\nta_tport.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\nta\sofia-sip\sl_utils.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\sofia-sip\nta.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\nta_internal.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\sofia-sip\nta_stateless.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\sofia-sip\nta_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\sofia-sip\nta_tport.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\nta\sofia-sip\sl_utils.h"></File>
</Filter>
<Filter
Name="tport headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\sofia-sip\tport.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\sofia-sip\tport_plugins.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\sofia-sip\tport_tag.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\tport\tport_tls.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\sofia-sip\tport.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\sofia-sip\tport_plugins.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\sofia-sip\tport_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\tport\tport_tls.h"></File>
</Filter>
<Filter
Name="sdp headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp\sofia-sip\sdp.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp\sofia-sip\sdp_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp\sofia-sip\sdp.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\sdp\sofia-sip\sdp_tag.h"></File>
</Filter>
<Filter
Name="soa headers"
>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa\sofia-sip\soa.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa\sofia-sip\soa_add.h"></File>
- <File RelativePath="..\..\sofia-sip-1.12.3.11\libsofia-sip-ua\soa\sofia-sip\soa_tag.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa\sofia-sip\soa.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa\sofia-sip\soa_add.h"></File>
+ <File RelativePath="..\..\sofia-sip-1.12.4\libsofia-sip-ua\soa\sofia-sip\soa_tag.h"></File>
</Filter>
</Filter>
</Files>
Modified: freeswitch/branches/knhor/trunk/modules.conf.in
==============================================================================
--- freeswitch/branches/knhor/trunk/modules.conf.in (original)
+++ freeswitch/branches/knhor/trunk/modules.conf.in Sun Dec 3 17:55:28 2006
@@ -43,5 +43,6 @@
#languages/mod_spidermonkey
#languages/mod_spidermonkey_teletone
#languages/mod_spidermonkey_core_db
+#languages/mod_spidermonkey_odbc
timers/mod_softtimer
#xml_int/mod_xml_rpc
Modified: freeswitch/branches/knhor/trunk/src/include/switch.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch.h Sun Dec 3 17:55:28 2006
@@ -166,3 +166,14 @@
*
*/
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_apr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_apr.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_apr.h Sun Dec 3 17:55:28 2006
@@ -1441,3 +1441,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_bitpack.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_bitpack.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_bitpack.h Sun Dec 3 17:55:28 2006
@@ -280,3 +280,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_buffer.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_buffer.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_buffer.h Sun Dec 3 17:55:28 2006
@@ -131,3 +131,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_caller.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_caller.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_caller.h Sun Dec 3 17:55:28 2006
@@ -88,6 +88,9 @@
char *context;
/*! flags */
switch_caller_profile_flag_t flags;
+ struct switch_caller_profile *originator_caller_profile;
+ struct switch_caller_profile *originatee_caller_profile;
+ struct switch_channel_timetable *times;
struct switch_caller_profile *next;
};
@@ -203,4 +206,13 @@
#endif
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_channel.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_channel.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_channel.h Sun Dec 3 17:55:28 2006
@@ -46,6 +46,7 @@
switch_time_t created;
switch_time_t answered;
switch_time_t hungup;
+ switch_time_t transferred;
struct switch_channel_timetable *next;
};
@@ -428,11 +429,19 @@
*/
SWITCH_DECLARE(char *) switch_channel_expand_variables(switch_channel_t *channel, char *in);
-// These may go away
-SWITCH_DECLARE(switch_status_t) switch_channel_set_raw_mode (switch_channel_t *channel, int freq, int bits, int channels, int ms, int kbps);
-SWITCH_DECLARE(switch_status_t) switch_channel_get_raw_mode (switch_channel_t *channel, int *freq, int *bits, int *channels, int *ms, int *kbps);
/** @} */
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_config.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_config.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_config.h Sun Dec 3 17:55:28 2006
@@ -109,3 +109,14 @@
/** @} */
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_console.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_console.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_console.h Sun Dec 3 17:55:28 2006
@@ -71,3 +71,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_core.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_core.h Sun Dec 3 17:55:28 2006
@@ -1362,3 +1362,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_event.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_event.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_event.h Sun Dec 3 17:55:28 2006
@@ -313,3 +313,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_frame.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_frame.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_frame.h Sun Dec 3 17:55:28 2006
@@ -71,3 +71,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_ivr.h Sun Dec 3 17:55:28 2006
@@ -200,15 +200,17 @@
\param dtmf_callback code to execute if any dtmf is dialed during the recording
\param buf an object to maintain across calls
\param buflen the size of buf
+ \param limit max limit to record for (0 for infinite)
\return SWITCH_STATUS_SUCCESS if all is well
\note passing a NULL dtmf_callback nad a not NULL buf indicates to copy any dtmf to buf and stop recording.
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *session,
- switch_file_handle_t *fh,
- char *file,
- switch_input_callback_function_t dtmf_callback,
- void *buf,
- uint32_t buflen);
+ switch_file_handle_t *fh,
+ char *file,
+ switch_input_callback_function_t dtmf_callback,
+ void *buf,
+ uint32_t buflen,
+ uint32_t limit);
/*!
\brief Function to evaluate an expression against a string
@@ -456,6 +458,7 @@
/*!
\brief Set a digit string terminator
\param parser a pointer to the parser object created by switch_ivr_digit_stream_parser_new
+ \param digit the terminator digit
\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_set_terminator(switch_ivr_digit_stream_parser_t *parser, char digit);
@@ -606,4 +609,13 @@
#endif
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_loadable_module.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_loadable_module.h Sun Dec 3 17:55:28 2006
@@ -251,3 +251,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_log.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_log.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_log.h Sun Dec 3 17:55:28 2006
@@ -120,3 +120,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_module_interfaces.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_module_interfaces.h Sun Dec 3 17:55:28 2006
@@ -313,6 +313,8 @@
void *private_info;
int64_t pos;
switch_buffer_t *audio_buffer;
+ uint32_t thresh;
+ uint32_t silence_hits;
};
/*! \brief Abstract interface to an asr module */
@@ -604,3 +606,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_platform.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_platform.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_platform.h Sun Dec 3 17:55:28 2006
@@ -155,3 +155,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_resample.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_resample.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_resample.h Sun Dec 3 17:55:28 2006
@@ -168,4 +168,13 @@
#endif
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_rtp.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_rtp.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_rtp.h Sun Dec 3 17:55:28 2006
@@ -380,3 +380,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_sqlite.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_sqlite.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_sqlite.h Sun Dec 3 17:55:28 2006
@@ -1808,3 +1808,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_stun.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_stun.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_stun.h Sun Dec 3 17:55:28 2006
@@ -243,3 +243,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_types.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_types.h Sun Dec 3 17:55:28 2006
@@ -86,6 +86,8 @@
#define SWITCH_LOCAL_MEDIA_PORT_VARIABLE "_local_media_port_"
#define SWITCH_REMOTE_MEDIA_IP_VARIABLE "_remote_media_ip_"
#define SWITCH_REMOTE_MEDIA_PORT_VARIABLE "_remote_media_port_"
+#define SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE "hangup_after_bridge"
+
#define SWITCH_SPEECH_KEY "_speech_"
#define SWITCH_UUID_BRIDGE "_uuid_bridge_"
#define SWITCH_BITS_PER_BYTE 8
@@ -465,7 +467,8 @@
CF_CONTROLLED = (1 << 12),
CF_NOMEDIA = (1 << 13),
CF_SUSPEND = (1 << 14),
- CF_EVENT_PARSE = (1 << 15)
+ CF_EVENT_PARSE = (1 << 15),
+ CF_NO_INDICATE = (1 << 16)
} switch_channel_flag_t;
@@ -911,3 +914,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_utils.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_utils.h Sun Dec 3 17:55:28 2006
@@ -39,6 +39,7 @@
#define SWITCH_UTILS_H
#include <switch.h>
+#include <pcre.h>
SWITCH_BEGIN_EXTERN_C
@@ -231,8 +232,15 @@
*/
SWITCH_DECLARE(char *) switch_cut_path(char *in);
+#define switch_clean_re(re) if (re) {\
+ pcre_free(re);\
+ re = NULL;\
+ }
+
SWITCH_DECLARE(char *) switch_string_replace(const char *string, const char *search, const char *replace);
SWITCH_DECLARE(switch_status_t) switch_string_match(const char *string, size_t string_len, const char *search, size_t search_len);
+SWITCH_DECLARE(int) switch_perform_regex(char *field, char *expression, pcre **new_re, int *ovector, uint32_t olen);
+SWITCH_DECLARE(void) switch_perform_substitution(pcre *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector);
#define SWITCH_READ_ACCEPTABLE(status) status == SWITCH_STATUS_SUCCESS || status == SWITCH_STATUS_BREAK
SWITCH_DECLARE(size_t) switch_url_encode(char *url, char *buf, size_t len);
@@ -240,3 +248,14 @@
SWITCH_END_EXTERN_C
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/include/switch_xml.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_xml.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_xml.h Sun Dec 3 17:55:28 2006
@@ -336,3 +336,14 @@
///\}
#endif // _SWITCH_XML_H
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_bridgecall/mod_bridgecall.c Sun Dec 3 17:55:28 2006
@@ -42,17 +42,27 @@
switch_core_session_t *peer_session;
unsigned int timelimit = 60;
char *var;
+ uint8_t no_media_bridge = 0;
switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
+ if (switch_strlen_zero(data)) {
+ return;
+ }
+
caller_channel = switch_core_session_get_channel(session);
assert(caller_channel != NULL);
if ((var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
timelimit = atoi(var);
}
-
- if ((var = switch_channel_get_variable(caller_channel, "no_media"))) {
- switch_channel_set_flag(caller_channel, CF_NOMEDIA);
+
+ if ((var = switch_channel_get_variable(caller_channel, "no_media")) && switch_true(var)) {
+ if (!switch_channel_test_flag(caller_channel, CF_ANSWERED) && !switch_channel_test_flag(caller_channel, CF_EARLY_MEDIA)) {
+ switch_channel_set_flag(caller_channel, CF_NOMEDIA);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel is already up, delaying point-to-point mode 'till both legs are up.\n");
+ no_media_bridge = 1;
+ }
}
if (switch_ivr_originate(session, &peer_session, &cause, data, timelimit, NULL, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
@@ -61,10 +71,17 @@
switch_channel_hangup(caller_channel, cause);
return;
} else {
- if (switch_channel_test_flag(caller_channel, CF_NOMEDIA)) {
- switch_ivr_signal_bridge(session, peer_session);
+ if (no_media_bridge) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Redirecting media to point-to-point mode.\n");
+ switch_ivr_nomedia(switch_core_session_get_uuid(session), SMF_FORCE);
+ switch_ivr_nomedia(switch_core_session_get_uuid(peer_session), SMF_FORCE);
+ switch_ivr_signal_bridge(session, peer_session);
} else {
- switch_ivr_multi_threaded_bridge(session, peer_session, NULL, NULL, NULL);
+ if (switch_channel_test_flag(caller_channel, CF_NOMEDIA)) {
+ switch_ivr_signal_bridge(session, peer_session);
+ } else {
+ switch_ivr_multi_threaded_bridge(session, peer_session, NULL, NULL, NULL);
+ }
}
}
}
@@ -95,3 +112,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_commands/mod_commands.c Sun Dec 3 17:55:28 2006
@@ -26,12 +26,14 @@
* Anthony Minessale II <anthmct(a)yahoo.com>
* Michael Jerris <mike(a)jerris.com>
* Johny Kadarisman <jkr888(a)gmail.com>
+ * Paul Tinsley <jackhammer(a)gmail.com>
*
*
* mod_commands.c -- Misc. Command Module
*
*/
#include <switch.h>
+#include <switch_version.h>
static const char modname[] = "mod_commands";
static switch_api_interface_t ctl_api_interface;
@@ -613,9 +615,9 @@
// If you change one, you must change the other!
if ((cmdname = strchr(cmd, ' ')) != 0) {
*cmdname++ = '\0';
- sprintf (sql, "select description, name, syntax from interfaces where type = 'api' and name = '%s'", cmdname);
+ snprintf (sql, sizeof(sql) - 1, "select description, name, syntax from interfaces where type = 'api' and name = '%s'", cmdname);
} else {
- sprintf (sql, "select description, name, syntax from interfaces where type = 'api'");
+ snprintf (sql, sizeof(sql) - 1, "select description, name, syntax from interfaces where type = 'api'");
}
} else {
stream->write_function(stream, "USAGE: %s\n", show_api_interface.syntax);
@@ -650,6 +652,15 @@
return SWITCH_STATUS_SUCCESS;
}
+static switch_status_t version_function(char *cmd, switch_core_session_t *session, switch_stream_handle_t *stream)
+{
+ char version_string[1024];
+ snprintf(version_string, sizeof(version_string) - 1, "FreeSwitch Version %s\n", SWITCH_VERSION_FULL);
+
+ stream->write_function(stream, version_string);
+ return SWITCH_STATUS_SUCCESS;
+}
+
static switch_status_t help_function(char *cmd, switch_core_session_t *session, switch_stream_handle_t *stream)
{
char showcmd[1024];
@@ -658,7 +669,7 @@
sprintf (showcmd, "help");
all = 1;
} else {
- sprintf (showcmd, "help %s", cmd);
+ snprintf(showcmd, sizeof(showcmd) -1, "help %s", cmd);
}
if (all) {
@@ -667,19 +678,23 @@
show_function(showcmd, session, stream);
- if (all) {
- stream->write_function(stream, "version\n" "shutdown - stop the program\n");
- }
-
return SWITCH_STATUS_SUCCESS;
}
+static switch_api_interface_t version_api_interface = {
+ /*.interface_name */ "version",
+ /*.desc */ "Show version of the switch",
+ /*.function */ version_function,
+ /*.syntax */ "",
+ /*.next */ NULL
+};
+
static switch_api_interface_t help_api_interface = {
/*.interface_name */ "help",
/*.desc */ "Show help for all the api commands",
/*.function */ help_function,
/*.syntax */ "",
- /*.next */ NULL
+ /*.next */ &version_api_interface,
};
static switch_api_interface_t ctl_api_interface = {
@@ -805,3 +820,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c Sun Dec 3 17:55:28 2006
@@ -3923,3 +3923,14 @@
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_dptools/mod_dptools.c Sun Dec 3 17:55:28 2006
@@ -25,6 +25,7 @@
*
* Anthony Minessale II <anthmct(a)yahoo.com>
* Ken Rice, Asteria Solutions Group, Inc <ken(a)asteriasgi.com>
+ * Michael Murdock <mike at mmurdock dot org>
*
*
* mod_dptools.c -- Raw Audio File Streaming Application Module
@@ -135,6 +136,48 @@
}
}
+static void log_function(switch_core_session_t *session, char *data)
+{
+ switch_channel_t *channel;
+ char *level, *log_str;
+
+ channel = switch_core_session_get_channel(session);
+ assert(channel != NULL);
+
+ if ((level = strdup(data))) {
+ switch_event_types_t etype = SWITCH_LOG_DEBUG;
+
+ if ((log_str = strchr(level, ' '))) {
+ *log_str++ = '\0';
+ switch_name_event(level, &etype);
+ } else {
+ log_str = level;
+ }
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, etype, "%s\n", log_str);
+ switch_safe_free(level);
+ }
+}
+
+
+static void info_function(switch_core_session_t *session, char *data)
+{
+ switch_channel_t *channel;
+ switch_event_t *event;
+ char *buf;
+
+ channel = switch_core_session_get_channel(session);
+ assert(channel != NULL);
+
+ if (switch_event_create(&event, SWITCH_EVENT_MESSAGE) == SWITCH_STATUS_SUCCESS) {
+ switch_channel_event_set_data(channel, event);
+ switch_event_serialize(event, &buf);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "CHANNEL_DATA:\n%s\n", buf);
+ switch_event_destroy(&event);
+ }
+
+}
+
static void privacy_function(switch_core_session_t *session, char *data)
{
switch_channel_t *channel;
@@ -315,13 +358,31 @@
/*.next */ &ringback_application_interface
};
+static const switch_application_interface_t info_application_interface = {
+ /*.interface_name */ "info",
+ /*.application_function */ info_function,
+ /* long_desc */ "Display Call Info",
+ /* short_desc */ "Display Call Info",
+ /* syntax */ "",
+ /*.next */ &set_application_interface
+};
+
+static const switch_application_interface_t log_application_interface = {
+ /*.interface_name */ "log",
+ /*.application_function */ log_function,
+ /* long_desc */ "Logs a channel varaible for the channel calling the application.",
+ /* short_desc */ "Logs a channel varaible",
+ /* syntax */ "<varname>",
+ /*.next */ &info_application_interface
+};
+
static const switch_application_interface_t answer_application_interface = {
/*.interface_name */ "answer",
/*.application_function */ answer_function,
/* long_desc */ "Answer the call for a channel.",
/* short_desc */ "Answer the call",
/* syntax */ "",
- /*.next */ &set_application_interface
+ /*.next */ &log_application_interface
};
@@ -399,3 +460,14 @@
//switch_status_t switch_module_runtime(void)
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_echo/mod_echo.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_echo/mod_echo.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_echo/mod_echo.c Sun Dec 3 17:55:28 2006
@@ -72,3 +72,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c Sun Dec 3 17:55:28 2006
@@ -491,3 +491,14 @@
//switch_status_t switch_module_runtime(void)
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_park/mod_park.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_park/mod_park.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_park/mod_park.c Sun Dec 3 17:55:28 2006
@@ -65,3 +65,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback/mod_playback.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback/mod_playback.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_playback/mod_playback.c Sun Dec 3 17:55:28 2006
@@ -132,11 +132,21 @@
{
switch_channel_t *channel;
switch_status_t status;
+ uint32_t limit = 0;
+ char *path;
+ char *p;
+
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
- status = switch_ivr_record_file(session, NULL, data, on_dtmf, NULL, 0);
+ path = switch_core_session_strdup(session, data);
+ if ((p = strchr(path, '+'))) {
+ *p++ = '\0';
+ limit = atoi(p);
+ }
+ status = switch_ivr_record_file(session, NULL, path, on_dtmf, NULL, 0, limit);
+
if (!switch_channel_ready(channel) || (status != SWITCH_STATUS_SUCCESS && !SWITCH_STATUS_IS_BREAK(status))) {
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
}
@@ -224,3 +234,14 @@
//switch_status_t switch_module_runtime(void)
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_rss/mod_rss.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_rss/mod_rss.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_rss/mod_rss.c Sun Dec 3 17:55:28 2006
@@ -679,3 +679,13 @@
return SWITCH_STATUS_SUCCESS;
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_skel/mod_skel.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_skel/mod_skel.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_skel/mod_skel.c Sun Dec 3 17:55:28 2006
@@ -78,3 +78,14 @@
return SWITCH_STATUS_TERM;
}
*/
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c Sun Dec 3 17:55:28 2006
@@ -435,3 +435,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g711/mod_g711.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g711/mod_g711.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g711/mod_g711.c Sun Dec 3 17:55:28 2006
@@ -326,3 +326,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g722/mod_g722.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g722/mod_g722.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g722/mod_g722.c Sun Dec 3 17:55:28 2006
@@ -183,3 +183,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c Sun Dec 3 17:55:28 2006
@@ -222,3 +222,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g726/mod_g726.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g726/mod_g726.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g726/mod_g726.c Sun Dec 3 17:55:28 2006
@@ -448,3 +448,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g729/mod_g729.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g729/mod_g729.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_g729/mod_g729.c Sun Dec 3 17:55:28 2006
@@ -282,3 +282,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_gsm/mod_gsm.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_gsm/mod_gsm.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_gsm/mod_gsm.c Sun Dec 3 17:55:28 2006
@@ -135,7 +135,7 @@
static const switch_codec_implementation_t gsm_8k_implementation = {
/*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
/*.ianacode */ 3,
- /*.iananame */ "gsm",
+ /*.iananame */ "GSM",
/*.fmtp */ NULL,
/*.samples_per_second */ 8000,
/*.bits_per_second */ 13200,
@@ -174,4 +174,13 @@
return SWITCH_STATUS_SUCCESS;
}
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c Sun Dec 3 17:55:28 2006
@@ -333,9 +333,13 @@
}
-
-
-
-
-
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_l16/mod_l16.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_l16/mod_l16.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_l16/mod_l16.c Sun Dec 3 17:55:28 2006
@@ -263,3 +263,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_lpc10/mod_lpc10.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_lpc10/mod_lpc10.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_lpc10/mod_lpc10.c Sun Dec 3 17:55:28 2006
@@ -210,3 +210,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/codecs/mod_speex/mod_speex.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/codecs/mod_speex/mod_speex.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/codecs/mod_speex/mod_speex.c Sun Dec 3 17:55:28 2006
@@ -351,3 +351,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c Sun Dec 3 17:55:28 2006
@@ -183,3 +183,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c Sun Dec 3 17:55:28 2006
@@ -37,96 +37,8 @@
static const char modname[] = "mod_dialplan_xml";
-#define cleanre(re) if (re) {\
- pcre_free(re);\
- re = NULL;\
- }
-static int perform_regex(switch_channel_t *channel, char *field, char *expression, pcre **new_re, int *ovector, uint32_t olen)
-{
- const char *error = NULL;
- int erroffset = 0;
- pcre *re = NULL;
- int match_count = 0;
-
- if (!(field && expression)) {
- return 0;
- }
-
- re = pcre_compile(expression, /* the pattern */
- 0, /* default options */
- &error, /* for error message */
- &erroffset, /* for error offset */
- NULL); /* use default character tables */
- if (error) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "COMPILE ERROR: %d [%s]\n", erroffset, error);
- cleanre(re);
- return 0;
- }
-
- match_count = pcre_exec(re, /* result of pcre_compile() */
- NULL, /* we didn't study the pattern */
- field, /* the subject string */
- (int) strlen(field), /* the length of the subject string */
- 0, /* start at offset 0 in the subject */
- 0, /* default options */
- ovector, /* vector of integers for substring information */
- olen); /* number of elements (NOT size in bytes) */
-
- if (match_count <= 0) {
- cleanre(re);
- match_count = 0;
- }
-
- *new_re = re;
-
- return match_count;
-}
-
-
-static void perform_substitution(pcre *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector)
-{
- char index[10] = "";
- char replace[1024] = "";
- uint32_t x, y = 0, z = 0, num = 0;
-
- for (x = 0; x < (len-1) && x < strlen(data);) {
- if (data[x] == '$') {
- x++;
-
- if (!(data[x] > 47 && data[x] < 58)) {
- substituted[y++] = data[x-1];
- continue;
- }
-
- while (data[x] > 47 && data[x] < 58) {
- index[z++] = data[x];
- x++;
- }
- index[z++] = '\0';
- z = 0;
- num = atoi(index);
-
- if (pcre_copy_substring(field_data,
- ovector,
- match_count,
- num,
- replace,
- sizeof(replace)) > 0) {
- unsigned int r;
- for (r = 0; r < strlen(replace); r++) {
- substituted[y++] = replace[r];
- }
- }
- } else {
- substituted[y++] = data[x];
- x++;
- }
- }
- substituted[y++] = '\0';
-}
-
typedef enum {
BREAK_ON_TRUE,
BREAK_ON_FALSE,
@@ -197,7 +109,7 @@
field_data = "";
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "test conditions %s(%s) =~ /%s/\n", field, field_data, expression);
- if (!(proceed = perform_regex(channel, field_data, expression, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
+ if (!(proceed = switch_perform_regex(field_data, expression, &re, ovector, sizeof(ovector) / sizeof(ovector[0])))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Regex mismatch\n");
for (xaction = switch_xml_child(xcond, "anti-action"); xaction; xaction = xaction->next) {
@@ -232,7 +144,7 @@
char *app_data = NULL;
if (field && strchr(expression, '(')) {
- perform_substitution(re, proceed, data, field_data, substituted, sizeof(substituted), ovector);
+ switch_perform_substitution(re, proceed, data, field_data, substituted, sizeof(substituted), ovector);
app_data = substituted;
} else {
app_data = data;
@@ -249,7 +161,7 @@
switch_caller_extension_add_application(session, *extension, application, app_data);
}
- cleanre(re);
+ switch_clean_re(re);
if (do_break_i == BREAK_ON_TRUE || do_break_i == BREAK_ALWAYS) {
break;
@@ -356,3 +268,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/directories/mod_ldap/mod_ldap.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/directories/mod_ldap/mod_ldap.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/directories/mod_ldap/mod_ldap.c Sun Dec 3 17:55:28 2006
@@ -228,3 +228,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c Sun Dec 3 17:55:28 2006
@@ -2633,3 +2633,13 @@
return LDL_STATUS_SUCCESS;
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_iax/mod_iax.c Sun Dec 3 17:55:28 2006
@@ -1200,3 +1200,14 @@
}
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Sun Dec 3 17:55:28 2006
@@ -1029,3 +1029,14 @@
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/Makefile
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/Makefile (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/Makefile Sun Dec 3 17:55:28 2006
@@ -1,6 +1,6 @@
OS_ARCH := $(subst /,_,$(shell uname -s | sed /\ /s//_/))
VERSION = sofia-sip-1.12
-TARBALL = sofia-sip-1.12.3.11.tar.gz
+TARBALL = sofia-sip-1.12.4.tar.gz
CFLAGS += -I. -I$(PREFIX)/include/$(VERSION)
LDFLAGS += -lsofia-sip-ua
LINKER=$(CC)
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Sun Dec 3 17:55:28 2006
@@ -762,6 +762,8 @@
static void tech_set_codecs(private_object_t *tech_pvt)
{
+ switch_channel_t *channel;
+ char *codec_string = NULL;
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
return;
@@ -771,7 +773,16 @@
return;
}
- if (tech_pvt->profile->codec_string) {
+ assert(tech_pvt->session != NULL);
+
+ channel = switch_core_session_get_channel(tech_pvt->session);
+ assert (channel != NULL);
+
+ if (!(codec_string = switch_channel_get_variable(channel, "codec_string"))) {
+ codec_string = tech_pvt->profile->codec_string;
+ }
+
+ if (codec_string) {
tech_pvt->num_codecs = switch_loadable_module_get_codecs_sorted(tech_pvt->codecs,
SWITCH_MAX_CODECS,
tech_pvt->profile->codec_order,
@@ -2344,7 +2355,7 @@
to_host = (char *) to->a_url->url_host;
}
-
+
if (!to_user) {
return;
}
@@ -2441,9 +2452,10 @@
if (!switch_channel_get_variable(other_channel, SWITCH_B_SDP_VARIABLE)) {
switch_channel_set_variable(other_channel, SWITCH_B_SDP_VARIABLE, sdp);
}
+
if (!switch_test_flag(tech_pvt, TFLAG_CHANGE_MEDIA) && (
switch_channel_test_flag(other_channel, CF_OUTBOUND) &&
- switch_channel_test_flag(other_channel, CF_NOMEDIA) &&
+ //switch_channel_test_flag(other_channel, CF_NOMEDIA) &&
switch_channel_test_flag(channel, CF_OUTBOUND) &&
switch_channel_test_flag(channel, CF_NOMEDIA))) {
switch_ivr_nomedia(val, SMF_FORCE);
@@ -2526,7 +2538,7 @@
break;
case nua_callstate_proceeding:
if (channel) {
- if (status == 180) {
+ if (status == 180 && !(switch_channel_test_flag(channel, CF_NO_INDICATE))) {
if (switch_test_flag(tech_pvt, TFLAG_NOMEDIA)) {
if ((uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE)) && (other_session = switch_core_session_locate(uuid))) {
switch_core_session_message_t msg;
@@ -3924,7 +3936,11 @@
char *displayname;
char *username, *to_username = NULL;
char *url_user = (char *) from->a_url->url_user;
- char *to_user, *to_host;
+ char *to_user, *to_host, *to_port;
+ char *req_user, *req_host, *req_port;
+ char *contact_user, *contact_host, *contact_port;
+ char *via_rport, *via_host, *via_port;
+ char uri[1024];
if (!(tech_pvt = (private_object_t *) switch_core_session_alloc(session, sizeof(private_object_t)))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Hey where is my memory pool?\n");
@@ -3938,6 +3954,9 @@
to_user = (char *) to->a_url->url_user;
to_host = (char *) to->a_url->url_host;
+ if (!(to_port = (char *) to->a_url->url_port)) {
+ to_port = "5060";
+ }
if (switch_strlen_zero(to_user)) { /* if sofia doesnt parse the To: right, we'll have to do it */
if ((to_user = sip_header_as_string(tech_pvt->home, (sip_header_t *) to))) {
@@ -3979,7 +3998,7 @@
}
if (profile->pflags & PFLAG_FULL_ID) {
- if (!(to_username = switch_mprintf("%s@%s", (char *) to_user, (char *) to_host))) {
+ if (!(to_username = switch_mprintf("%s@%s:%s", (char *) to_user, (char *) to_host, to_port))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Memory Error!\n");
switch_safe_free(username);
return;
@@ -4000,6 +4019,50 @@
switch_channel_set_variable(channel, "sip_from_user_stripped", (char *)from->a_url->url_user);
}
switch_channel_set_variable(channel, "sip_from_host", (char *) from->a_url->url_host);
+ switch_channel_set_variable(channel, "sip_from_port", (char *) from->a_url->url_port);
+
+
+ snprintf(uri, sizeof(uri), "%s@%s:%s", (char *) from->a_url->url_user, (char *) from->a_url->url_host, (char *) from->a_url->url_port);
+ switch_channel_set_variable(channel, "sip_from_uri", uri);
+
+
+ switch_channel_set_variable(channel, "sip_to_user", to_user);
+ switch_channel_set_variable(channel, "sip_to_host", to_host);
+ switch_channel_set_variable(channel, "sip_to_port", to_port);
+
+ snprintf(uri, sizeof(uri), "%s@%s:%s", to_user, to_host, to_port);
+ switch_channel_set_variable(channel, "sip_to_uri", uri);
+
+
+ req_user = (char *) sip->sip_request->rq_url->url_user;
+ req_host = (char *) sip->sip_request->rq_url->url_host;
+ req_port = (char *) sip->sip_request->rq_url->url_port;
+
+ switch_channel_set_variable(channel, "sip_req_user", req_user);
+ switch_channel_set_variable(channel, "sip_req_host", req_host);
+ switch_channel_set_variable(channel, "sip_req_port", req_port);
+
+ contact_user = (char *) sip->sip_contact->m_url->url_user;
+ contact_host = (char *) sip->sip_contact->m_url->url_host;
+ contact_port = (char *) sip->sip_contact->m_url->url_port;
+
+ switch_channel_set_variable(channel, "sip_contact_user", contact_user);
+ switch_channel_set_variable(channel, "sip_contact_host", contact_host);
+ switch_channel_set_variable(channel, "sip_contact_port", contact_port);
+
+ via_host = (char *) sip->sip_via->v_host;
+ via_port = (char *) sip->sip_via->v_port;
+ via_rport = (char *) sip->sip_via->v_rport;
+
+ switch_channel_set_variable(channel, "sip_via_host", via_host);
+ switch_channel_set_variable(channel, "sip_via_port", via_port);
+ switch_channel_set_variable(channel, "sip_via_rport", via_rport);
+
+
+ snprintf(uri, sizeof(uri), "%s@%s:%s", req_user, req_host, req_port);
+ switch_channel_set_variable(channel, "sip_req_uri", uri);
+
+
if ((tech_pvt->caller_profile = switch_caller_profile_new(switch_core_session_get_pool(session),
(char *) from->a_url->url_user,
profile->dialplan,
@@ -4261,6 +4324,9 @@
if ((profile->pflags & PFLAG_AUTH_ALL) && tech_pvt && tech_pvt->key && sip) {
sip_authorization_t const *authorization = NULL;
+ switch_channel_t *channel = switch_core_session_get_channel(tech_pvt->session);
+ assert(channel != NULL);
+
if (sip->sip_authorization) {
authorization = sip->sip_authorization;
} else if (sip->sip_proxy_authorization) {
@@ -4272,11 +4338,14 @@
}
if (auth_res != AUTH_OK) {
- switch_channel_t *channel = switch_core_session_get_channel(tech_pvt->session);
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
nua_respond(nh, SIP_401_UNAUTHORIZED, TAG_END());
goto done;
}
+
+ if (session) {
+ switch_channel_set_variable(channel, "sip_authorized", "true");
+ }
}
if (status == 401 || status == 407) {
@@ -4460,9 +4529,9 @@
SIPTAG_CONTACT_STR(oregp->register_from),
SIPTAG_EXPIRES_STR(oregp->expires_str),
NUTAG_REGISTRAR(oregp->register_proxy),
- NUTAG_OUTBOUND("no-options-keepalive"),
- NUTAG_OUTBOUND("no-validate"),
- NUTAG_KEEPALIVE(0),
+ NUTAG_OUTBOUND("no-options-keepalive"),
+ NUTAG_OUTBOUND("no-validate"),
+ NUTAG_KEEPALIVE(0),
TAG_NULL());
oregp->retry = now + 10;
oregp->state = REG_STATE_TRYING;
@@ -4522,8 +4591,8 @@
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("NOTIFY")),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW("SUBSCRIBE")),
TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ENABLEMESSAGE(1)),
- //TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")),
- //TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence.winfo")),
+ TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence")),
+ TAG_IF((profile->pflags & PFLAG_PRESENCE), NUTAG_ALLOW_EVENTS("presence.winfo")),
SIPTAG_SUPPORTED_STR("100rel, precondition"),
SIPTAG_USER_AGENT_STR(SOFIA_USER_AGENT),
TAG_END());
@@ -5340,3 +5409,14 @@
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_sofia/mod_sofia.vcproj Sun Dec 3 17:55:28 2006
@@ -42,7 +42,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\su";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\nua";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\win32";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\url";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\sip";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\msg";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\nta";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\nea";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\soa";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\bnf""
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\su";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\nua";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\win32";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\url";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\sip";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\msg";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\sdp";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\nta";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\nea";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\soa";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\iptsec";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\bnf""
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;LIBSOFIA_SIP_UA_STATIC;PTW32_STATIC_LIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -126,7 +126,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\su";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\nua";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\win32";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\url";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\sip";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\msg";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\sdp";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\nta";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\nea";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\soa";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\iptsec";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.3.11\libsofia-sip-ua\bnf""
+ AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\su";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\nua";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\win32";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\url";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\sip";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\msg";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\sdp";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\nta";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\nea";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\soa";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\iptsec";"$(InputDir)..\..\..\..\libs\sofia-sip-1.12.4\libsofia-sip-ua\bnf""
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS;LIBSOFIA_SIP_UA_STATIC;PTW32_STATIC_LIB"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c Sun Dec 3 17:55:28 2006
@@ -1532,5 +1532,13 @@
}
-
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c Sun Dec 3 17:55:28 2006
@@ -1391,3 +1391,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/basecdr.cpp Sun Dec 3 17:55:28 2006
@@ -358,3 +358,14 @@
}
}
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/basecdr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/basecdr.h (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/basecdr.h Sun Dec 3 17:55:28 2006
@@ -105,3 +105,14 @@
#endif
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/baseregistry.cpp
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/baseregistry.cpp (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/baseregistry.cpp Sun Dec 3 17:55:28 2006
@@ -79,3 +79,14 @@
{
BaseRegistry::get().add(creator);
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/baseregistry.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/baseregistry.h (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/baseregistry.h Sun Dec 3 17:55:28 2006
@@ -76,3 +76,14 @@
#endif // ifdef __cplusplus
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp Sun Dec 3 17:55:28 2006
@@ -163,3 +163,14 @@
delete newloggerobject;
}
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.h (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/cdrcontainer.h Sun Dec 3 17:55:28 2006
@@ -69,3 +69,14 @@
#endif
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/csvcdr.cpp
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/csvcdr.cpp (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/csvcdr.cpp Sun Dec 3 17:55:28 2006
@@ -284,3 +284,14 @@
}
AUTO_REGISTER_BASECDR(CsvCDR);
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/csvcdr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/csvcdr.h (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/csvcdr.h Sun Dec 3 17:55:28 2006
@@ -75,3 +75,14 @@
};
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mod_cdr.cpp Sun Dec 3 17:55:28 2006
@@ -105,3 +105,14 @@
delete newcdrcontainer;
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.cpp
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.cpp (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.cpp Sun Dec 3 17:55:28 2006
@@ -54,7 +54,7 @@
src_length = (long unsigned int)strlen(src);
dst_length = (long unsigned int)strlen(dst);
ani_length = (long unsigned int)strlen(ani);
- ani2_length = (long unsigned int)strlen(ani2);
+ aniii_length = (long unsigned int)strlen(aniii);
dialplan_length = (long unsigned int)strlen(dialplan);
myuuid_length = (long unsigned int)strlen(myuuid);
destuuid_length = (long unsigned int)strlen(destuuid);
@@ -181,7 +181,7 @@
if(activated)
{
- tmp_sql_query = "INSERT INTO freeswitchcdr (callstartdate,callanswerdate,callenddate,originated,clid,src,dst,ani,ani2,dialplan,myuuid,destuuid,srcchannel,dstchannel,lastapp,lastdata,billusec,disposition,hangupcause,amaflags";
+ tmp_sql_query = "INSERT INTO freeswitchcdr (callstartdate,callanswerdate,callenddate,originated,clid,src,dst,ani,aniii,dialplan,myuuid,destuuid,srcchannel,dstchannel,lastapp,lastdata,billusec,disposition,hangupcause,amaflags";
int items_appended = 0;
@@ -324,7 +324,7 @@
add_string_parameter(src,src_length,MYSQL_TYPE_VAR_STRING,0);
add_string_parameter(dst,dst_length,MYSQL_TYPE_VAR_STRING,0);
add_string_parameter(ani,ani_length,MYSQL_TYPE_VAR_STRING,0);
- add_string_parameter(ani2,ani2_length,MYSQL_TYPE_VAR_STRING,0);
+ add_string_parameter(aniii,aniii_length,MYSQL_TYPE_VAR_STRING,0);
add_string_parameter(dialplan,dialplan_length,MYSQL_TYPE_VAR_STRING,0);
add_string_parameter(myuuid,myuuid_length,MYSQL_TYPE_VAR_STRING,0);
add_string_parameter(destuuid,destuuid_length,MYSQL_TYPE_VAR_STRING,0);
@@ -625,3 +625,14 @@
}
AUTO_REGISTER_BASECDR(MysqlCDR);
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.h (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/mysqlcdr.h Sun Dec 3 17:55:28 2006
@@ -99,3 +99,14 @@
};
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/pddcdr.cpp
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/pddcdr.cpp (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/pddcdr.cpp Sun Dec 3 17:55:28 2006
@@ -214,3 +214,14 @@
}
AUTO_REGISTER_BASECDR(PddCDR);
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/pddcdr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/pddcdr.h (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/pddcdr.h Sun Dec 3 17:55:28 2006
@@ -69,3 +69,14 @@
};
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.cpp Sun Dec 3 17:55:28 2006
@@ -219,3 +219,14 @@
}
AUTO_REGISTER_BASECDR(XmlCDR);
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_cdr/xmlcdr.h Sun Dec 3 17:55:28 2006
@@ -70,3 +70,14 @@
};
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_multicast/mod_event_multicast.c Sun Dec 3 17:55:28 2006
@@ -331,5 +331,13 @@
return SWITCH_STATUS_TERM;
}
-
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c Sun Dec 3 17:55:28 2006
@@ -1041,5 +1041,13 @@
return SWITCH_STATUS_TERM;
}
-
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_event_test/mod_event_test.c Sun Dec 3 17:55:28 2006
@@ -153,3 +153,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_xmpp_event/mod_xmpp_event.c Sun Dec 3 17:55:28 2006
@@ -439,3 +439,14 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "disconnecting client %d\n", RUNNING);
return RUNNING ? SWITCH_STATUS_SUCCESS : SWITCH_STATUS_TERM;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/event_handlers/mod_zeroconf/mod_zeroconf.c Sun Dec 3 17:55:28 2006
@@ -318,3 +318,14 @@
RUNNING = 0;
return SWITCH_STATUS_TERM;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/formats/mod_native_file/mod_native_file.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/formats/mod_native_file/mod_native_file.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/formats/mod_native_file/mod_native_file.c Sun Dec 3 17:55:28 2006
@@ -180,3 +180,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/formats/mod_sndfile/mod_sndfile.c Sun Dec 3 17:55:28 2006
@@ -350,3 +350,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_mono/mod_mono.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_mono/mod_mono.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_mono/mod_mono.c Sun Dec 3 17:55:28 2006
@@ -283,3 +283,14 @@
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, msg);
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_perl/mod_perl.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_perl/mod_perl.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_perl/mod_perl.c Sun Dec 3 17:55:28 2006
@@ -137,3 +137,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_perl/switch_swig_wrap.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_perl/switch_swig_wrap.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_perl/switch_swig_wrap.c Sun Dec 3 17:55:28 2006
@@ -43,7 +43,6 @@
************************************************************************/
#include <string.h>
-#include <switch.h>
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# if defined(_MSC_VER) || defined(__GNUC__)
@@ -808,7 +807,7 @@
extern void fs_channel_get_variable(switch_core_session_t *,char *);
extern void fs_channel_set_state(switch_core_session_t *,char *);
extern int fs_ivr_play_file(switch_core_session_t *,char *,char *,switch_input_callback_function_t,void *,unsigned int);
-extern int fs_switch_ivr_record_file(switch_core_session_t *,switch_file_handle_t *,char *,switch_input_callback_function_t,void *,unsigned int);
+extern int fs_switch_ivr_record_file(switch_core_session_t *,switch_file_handle_t *,char *,switch_input_callback_function_t,void *,unsigned int,unsigned int);
extern int fs_switch_ivr_sleep(switch_core_session_t *,uint32_t);
extern int fs_ivr_play_file2(switch_core_session_t *,char *);
extern int fs_switch_ivr_collect_digits_callback(switch_core_session_t *,switch_input_callback_function_t,void *,unsigned int,unsigned int);
@@ -1263,12 +1262,13 @@
switch_input_callback_function_t arg4 ;
void *arg5 = (void *) 0 ;
unsigned int arg6 ;
+ unsigned int arg7 ;
int result;
int argvi = 0;
dXSARGS;
- if ((items < 6) || (items > 6)) {
- SWIG_croak("Usage: fs_switch_ivr_record_file(session,fh,file,dtmf_callback,buf,buflen);");
+ if ((items < 7) || (items > 7)) {
+ SWIG_croak("Usage: fs_switch_ivr_record_file(session,fh,file,dtmf_callback,buf,buflen,limit);");
}
{
if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) {
@@ -1295,7 +1295,8 @@
}
}
arg6 = (unsigned int) SvUV(ST(5));
- result = (int)fs_switch_ivr_record_file(arg1,arg2,arg3,arg4,arg5,arg6);
+ arg7 = (unsigned int) SvUV(ST(6));
+ result = (int)fs_switch_ivr_record_file(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
ST(argvi) = sv_newmortal();
sv_setiv(ST(argvi++), (IV) result);
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_php/mod_php.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_php/mod_php.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_php/mod_php.c Sun Dec 3 17:55:28 2006
@@ -307,3 +307,14 @@
}
*/
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_php/switch_swig_wrap.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_php/switch_swig_wrap.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_php/switch_swig_wrap.c Sun Dec 3 17:55:28 2006
@@ -577,7 +577,7 @@
extern void fs_channel_get_variable(switch_core_session_t *,char *);
extern void fs_channel_set_state(switch_core_session_t *,char *);
extern int fs_ivr_play_file(switch_core_session_t *,char *,char *,switch_input_callback_function_t,void *,unsigned int);
-extern int fs_switch_ivr_record_file(switch_core_session_t *,switch_file_handle_t *,char *,switch_input_callback_function_t,void *,unsigned int);
+extern int fs_switch_ivr_record_file(switch_core_session_t *,switch_file_handle_t *,char *,switch_input_callback_function_t,void *,unsigned int,unsigned int);
extern int fs_switch_ivr_sleep(switch_core_session_t *,uint32_t);
extern int fs_ivr_play_file2(switch_core_session_t *,char *);
extern int fs_switch_ivr_collect_digits_callback(switch_core_session_t *,switch_input_callback_function_t,void *,unsigned int,unsigned int);
@@ -1143,15 +1143,16 @@
switch_input_callback_function_t arg4 ;
void *arg5 = (void *) 0 ;
unsigned int arg6 ;
+ unsigned int arg7 ;
int result;
- zval **args[7];
+ zval **args[8];
int argbase=0 ;
if (this_ptr && this_ptr->type==IS_OBJECT) {
/* fake this_ptr as first arg (till we can work out how to do it better */
argbase++;
}
- if(((ZEND_NUM_ARGS() + argbase )!= 6) || (zend_get_parameters_array_ex(6-argbase, args)!= SUCCESS)) {
+ if(((ZEND_NUM_ARGS() + argbase )!= 7) || (zend_get_parameters_array_ex(7-argbase, args)!= SUCCESS)) {
WRONG_PARAM_COUNT;
}
@@ -1187,7 +1188,11 @@
convert_to_long_ex(args[5-argbase]);
arg6 = (unsigned int) Z_LVAL_PP(args[5-argbase]);
- result = (int)fs_switch_ivr_record_file(arg1,arg2,arg3,arg4,arg5,arg6);
+
+ convert_to_long_ex(args[6-argbase]);
+ arg7 = (unsigned int) Z_LVAL_PP(args[6-argbase]);
+
+ result = (int)fs_switch_ivr_record_file(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
ZVAL_LONG(return_value,result);
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/mod_python.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/mod_python.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/mod_python.c Sun Dec 3 17:55:28 2006
@@ -110,3 +110,14 @@
/* Return the number of arguments of the application command line */
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/switch_swig_wrap.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/switch_swig_wrap.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_python/switch_swig_wrap.c Sun Dec 3 17:55:28 2006
@@ -716,7 +716,7 @@
extern void fs_channel_get_variable(switch_core_session_t *,char *);
extern void fs_channel_set_state(switch_core_session_t *,char *);
extern int fs_ivr_play_file(switch_core_session_t *,char *,char *,switch_input_callback_function_t,void *,unsigned int);
-extern int fs_switch_ivr_record_file(switch_core_session_t *,switch_file_handle_t *,char *,switch_input_callback_function_t,void *,unsigned int);
+extern int fs_switch_ivr_record_file(switch_core_session_t *,switch_file_handle_t *,char *,switch_input_callback_function_t,void *,unsigned int,unsigned int);
extern int fs_switch_ivr_sleep(switch_core_session_t *,uint32_t);
extern int fs_ivr_play_file2(switch_core_session_t *,char *);
extern int fs_switch_ivr_collect_digits_callback(switch_core_session_t *,switch_input_callback_function_t,void *,unsigned int,unsigned int);
@@ -1000,6 +1000,7 @@
switch_input_callback_function_t arg4 ;
void *arg5 = (void *) 0 ;
unsigned int arg6 ;
+ unsigned int arg7 ;
int result;
switch_input_callback_function_t *argp4 ;
PyObject * obj0 = 0 ;
@@ -1007,8 +1008,9 @@
PyObject * obj3 = 0 ;
PyObject * obj4 = 0 ;
PyObject * obj5 = 0 ;
+ PyObject * obj6 = 0 ;
- if(!PyArg_ParseTuple(args,(char *)"OOsOOO:fs_switch_ivr_record_file",&obj0,&obj1,&arg3,&obj3,&obj4,&obj5)) goto fail;
+ if(!PyArg_ParseTuple(args,(char *)"OOsOOOO:fs_switch_ivr_record_file",&obj0,&obj1,&arg3,&obj3,&obj4,&obj5,&obj6)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_switch_core_session_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_switch_file_handle_t,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
if ((SWIG_ConvertPtr(obj3,(void **) &argp4, SWIGTYPE_p_switch_input_callback_function_t,SWIG_POINTER_EXCEPTION) == -1)) SWIG_fail;
@@ -1016,7 +1018,9 @@
if ((SWIG_ConvertPtr(obj4,(void **) &arg5, 0, SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
arg6 = (unsigned int) PyInt_AsLong(obj5);
if (PyErr_Occurred()) SWIG_fail;
- result = (int)fs_switch_ivr_record_file(arg1,arg2,arg3,arg4,arg5,arg6);
+ arg7 = (unsigned int) PyInt_AsLong(obj6);
+ if (PyErr_Occurred()) SWIG_fail;
+ result = (int)fs_switch_ivr_record_file(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
resultobj = PyInt_FromLong((long)result);
return resultobj;
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_ruby/mod_ruby.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_ruby/mod_ruby.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_ruby/mod_ruby.c Sun Dec 3 17:55:28 2006
@@ -102,3 +102,14 @@
/* indicate that the module should continue to be loaded */
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_ruby/switch_swig_wrap.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_ruby/switch_swig_wrap.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_ruby/switch_swig_wrap.c Sun Dec 3 17:55:28 2006
@@ -628,7 +628,7 @@
extern void fs_channel_get_variable(switch_core_session_t *,char *);
extern void fs_channel_set_state(switch_core_session_t *,char *);
extern int fs_ivr_play_file(switch_core_session_t *,char *,char *,switch_input_callback_function_t,void *,unsigned int);
-extern int fs_switch_ivr_record_file(switch_core_session_t *,switch_file_handle_t *,char *,switch_input_callback_function_t,void *,unsigned int);
+extern int fs_switch_ivr_record_file(switch_core_session_t *,switch_file_handle_t *,char *,switch_input_callback_function_t,void *,unsigned int,unsigned int);
extern int fs_switch_ivr_sleep(switch_core_session_t *,uint32_t);
extern int fs_ivr_play_file2(switch_core_session_t *,char *);
extern int fs_switch_ivr_collect_digits_callback(switch_core_session_t *,switch_input_callback_function_t,void *,unsigned int,unsigned int);
@@ -893,11 +893,12 @@
switch_input_callback_function_t arg4 ;
void *arg5 = (void *) 0 ;
unsigned int arg6 ;
+ unsigned int arg7 ;
int result;
VALUE vresult = Qnil;
- if ((argc < 6) || (argc > 6))
- rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
+ if ((argc < 7) || (argc > 7))
+ rb_raise(rb_eArgError, "wrong # of arguments(%d for 7)",argc);
SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_switch_core_session_t, 1);
SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_switch_file_handle_t, 1);
arg3 = StringValuePtr(argv[2]);
@@ -908,7 +909,8 @@
}
SWIG_ConvertPtr(argv[4], (void **) &arg5, 0, 1);
arg6 = NUM2UINT(argv[5]);
- result = (int)fs_switch_ivr_record_file(arg1,arg2,arg3,arg4,arg5,arg6);
+ arg7 = NUM2UINT(argv[6]);
+ result = (int)fs_switch_ivr_record_file(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
vresult = INT2NUM(result);
return vresult;
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/Makefile
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/Makefile (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/Makefile Sun Dec 3 17:55:28 2006
@@ -1,5 +1,5 @@
include sm.mak
-OBJS=$(BASE)/libs/mozilla/js/src/$(OS_CONFIG)_$(VER).OBJ/libjs.a $(BASE)/libs/mozilla/nsprpub/dist/lib/libnspr4.a -lcurl -letpan
+OBJS=$(BASE)/libs/mozilla/js/src/$(OS_CONFIG)_$(VER).OBJ/libjs.a $(BASE)/libs/mozilla/nsprpub/dist/lib/libnspr4.a -lcurl
LINKER=$(CC)
@@ -8,7 +8,6 @@
depends:
BUILD_OPT=$(BO) MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) mozilla.tar.gz --prefix=$(PREFIX)
MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install curl-7.15.2.tar.gz --prefix=$(PREFIX) --without-libidn
- MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libetpan-0.45.tar.gz --prefix=$(PREFIX)
$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).c
$(CC) $(CFLAGS) -fPIC -c $(MODNAME).c -o $(MODNAME).o
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Sun Dec 3 17:55:28 2006
@@ -94,6 +94,7 @@
jsval ret;
JSContext *cx;
JSObject *obj;
+ jsrefcount saveDepth;
void *extra;
};
@@ -409,7 +410,7 @@
}
-static switch_status_t sm_load_file(char *filename, sm_loadable_module_t **new_module)
+static switch_status_t sm_load_file(char *filename)
{
sm_loadable_module_t *module = NULL;
apr_dso_handle_t *dso = NULL;
@@ -424,7 +425,6 @@
assert(filename != NULL);
- *new_module = NULL;
status = apr_dso_load(&dso, filename, module_manager.pool);
while (loading) {
@@ -447,7 +447,7 @@
break;
}
- if ((module = switch_core_permanent_alloc(sizeof(sm_loadable_module_t))) == 0) {
+ if (!(module = (sm_loadable_module_t *) switch_core_permanent_alloc(sizeof(*module)))) {
err = "Could not allocate memory\n";
break;
}
@@ -465,11 +465,10 @@
module->module_interface = module_interface;
module->lib = dso;
- *new_module = module;
switch_core_hash_insert(module_manager.mod_hash, (char *) module->filename, (void *) module);
- for (mp = module_interface; mp; mp = mp->next) {
+ for (mp = module->module_interface; mp; mp = mp->next) {
switch_core_hash_insert(module_manager.load_hash, (char *)mp->name, (void *) mp);
}
@@ -484,7 +483,6 @@
switch_size_t len = 0;
char *path;
char *file;
- sm_loadable_module_t *new_module = NULL;
#ifdef WIN32
const char *ext = ".dll";
@@ -517,7 +515,7 @@
}
}
- return sm_load_file(path, &new_module);
+ return sm_load_file(path);
}
static switch_status_t load_modules(void)
@@ -644,7 +642,9 @@
argv[argc++] = cb_state->arg;
}
+ JS_ResumeRequest(cb_state->cx, cb_state->saveDepth);
JS_CallFunction(cb_state->cx, cb_state->obj, cb_state->function, argc, argv, &cb_state->ret);
+ cb_state->saveDepth = JS_SuspendRequest(cb_state->cx);
return SWITCH_STATUS_SUCCESS;
}
@@ -827,13 +827,13 @@
struct js_session *jss = JS_GetPrivate(cx, obj);
switch_channel_t *channel;
char *file_name = NULL;
- char *input_callback = NULL;
void *bp = NULL;
int len = 0;
switch_input_callback_function_t dtmf_func = NULL;
struct input_callback_state cb_state = {0};
- switch_file_handle_t fh;
+ switch_file_handle_t fh = {0};
JSFunction *function;
+ int32 limit = 0;
channel = switch_core_session_get_channel(jss->session);
assert(channel != NULL);
@@ -847,7 +847,6 @@
if (argc > 1) {
if ((function = JS_ValueToFunction(cx, argv[1]))) {
memset(&cb_state, 0, sizeof(cb_state));
- switch_copy_string(cb_state.code_buffer, input_callback, sizeof(cb_state.code_buffer));
cb_state.session_state = jss;
cb_state.function = function;
cb_state.cx = cx;
@@ -860,12 +859,30 @@
bp = &cb_state;
len = sizeof(cb_state);
}
+
+ if (argc > 3) {
+ JS_ValueToInt32(cx, argv[3], &limit);
+ }
+
+ if (argc > 4) {
+ int32 thresh;
+ JS_ValueToInt32(cx, argv[4], &thresh);
+ fh.thresh = thresh;
+ }
+
+ if (argc > 5) {
+ int32 silence_hits;
+ JS_ValueToInt32(cx, argv[5], &silence_hits);
+ fh.silence_hits = silence_hits;
+ }
}
- memset(&fh, 0, sizeof(fh));
+
cb_state.extra = &fh;
cb_state.ret = BOOLEAN_TO_JSVAL( JS_FALSE );
- switch_ivr_record_file(jss->session, &fh, file_name, dtmf_func, bp, len);
+ cb_state.saveDepth = JS_SuspendRequest(cx);
+ switch_ivr_record_file(jss->session, &fh, file_name, dtmf_func, bp, len, limit);
+ JS_ResumeRequest(cx, cb_state.saveDepth);
*rval = cb_state.ret;
return (switch_channel_ready(channel)) ? JS_TRUE : JS_FALSE;
@@ -908,7 +925,10 @@
JS_ValueToInt32(jss->cx, argv[2], &to);
}
+ cb_state.saveDepth = JS_SuspendRequest(cx);
switch_ivr_collect_digits_callback(jss->session, dtmf_func, bp, len, to);
+ JS_ResumeRequest(cx, cb_state.saveDepth);
+
*rval = cb_state.ret;
return (switch_channel_ready(channel)) ? JS_TRUE : JS_FALSE;
@@ -925,7 +945,7 @@
int len = 0;
switch_input_callback_function_t dtmf_func = NULL;
struct input_callback_state cb_state = {0};
- switch_file_handle_t fh;
+ switch_file_handle_t fh = {0};
JSFunction *function;
channel = switch_core_session_get_channel(jss->session);
@@ -961,10 +981,17 @@
}
}
- memset(&fh, 0, sizeof(fh));
+ if (argc > 4) {
+ int32 samps;
+ JS_ValueToInt32(cx, argv[4], &samps);
+ fh.samples = samps;
+ }
+
cb_state.extra = &fh;
cb_state.ret = BOOLEAN_TO_JSVAL( JS_FALSE );
+ cb_state.saveDepth = JS_SuspendRequest(cx);
switch_ivr_play_file(jss->session, &fh, file_name, timer_name, dtmf_func, bp, len);
+ JS_ResumeRequest(cx, cb_state.saveDepth);
*rval = cb_state.ret;
return (switch_channel_ready(channel)) ? JS_TRUE : JS_FALSE;
@@ -1073,6 +1100,7 @@
codec = switch_core_session_get_read_codec(jss->session);
cb_state.ret = BOOLEAN_TO_JSVAL( JS_FALSE );
+ cb_state.saveDepth = JS_SuspendRequest(cx);
switch_ivr_speak_text(jss->session,
tts_name,
voice_name && strlen(voice_name) ? voice_name : NULL,
@@ -1082,7 +1110,7 @@
text,
bp,
len);
-
+ JS_ResumeRequest(cx, cb_state.saveDepth);
*rval = cb_state.ret;
return (switch_channel_ready(channel)) ? JS_TRUE : JS_FALSE;
@@ -1979,20 +2007,6 @@
return JS_FALSE;
}
-#define B64BUFFLEN 1024
-static const char c64[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-static int write_buf(int fd, char *buf) {
-
- int len = (int)strlen(buf);
- if (fd && write(fd, buf, len) != len) {
- close(fd);
- return 0;
- }
-
- return 1;
-}
-
static JSBool js_api_use(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
char *mod_name = NULL;
@@ -2099,140 +2113,18 @@
}
}
+ cb_state.saveDepth = JS_SuspendRequest(cx);
switch_ivr_multi_threaded_bridge(jss_a->session, jss_b->session, dtmf_func, bp, bp);
+ JS_ResumeRequest(cx, cb_state.saveDepth);
+
return JS_TRUE;
}
-static JSBool js_email(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
-{
- char *to = NULL, *from = NULL, *headers, *body = NULL, *file = NULL;
- char *bound = "XXXX_boundary_XXXX";
- char filename[80], buf[B64BUFFLEN];
- int fd = 0, ifd = 0;
- int x=0, y=0, bytes=0, ilen=0;
- unsigned int b=0, l=0;
- unsigned char in[B64BUFFLEN];
- unsigned char out[B64BUFFLEN+512];
- char *path = NULL;
-
-
- if (
- argc > 3 &&
- (from = JS_GetStringBytes(JS_ValueToString(cx, argv[0]))) &&
- (to = JS_GetStringBytes(JS_ValueToString(cx, argv[1]))) &&
- (headers = JS_GetStringBytes(JS_ValueToString(cx, argv[2]))) &&
- (body = JS_GetStringBytes(JS_ValueToString(cx, argv[3])))
- ) {
- if ( argc > 4) {
- file = JS_GetStringBytes(JS_ValueToString(cx, argv[4]));
- }
- snprintf(filename, 80, "%smail.%ld%04x", SWITCH_GLOBAL_dirs.temp_dir, time(NULL), rand() & 0xffff);
-
- if ((fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644))) {
- if (file) {
- path = file;
- if ((ifd = open(path, O_RDONLY)) < 1) {
- return JS_FALSE;
- }
-
- snprintf(buf, B64BUFFLEN, "MIME-Version: 1.0\nContent-Type: multipart/mixed; boundary=\"%s\"\n", bound);
- if (!write_buf(fd, buf)) {
- return JS_FALSE;
- }
- }
-
- if (!write_buf(fd, headers))
- return JS_FALSE;
-
- if (!write_buf(fd, "\n\n"))
- return JS_FALSE;
-
- if (file) {
- snprintf(buf, B64BUFFLEN, "--%s\nContent-Type: text/plain\n\n", bound);
- if (!write_buf(fd, buf))
- return JS_FALSE;
- }
-
- if (!write_buf(fd, body))
- return JS_FALSE;
-
- if (file) {
- snprintf(buf, B64BUFFLEN, "\n\n--%s\nContent-Type: application/octet-stream\n"
- "Content-Transfer-Encoding: base64\n"
- "Content-Description: Sound attachment.\n"
- "Content-Disposition: attachment; filename=\"%s\"\n\n", bound, file);
- if (!write_buf(fd, buf))
- return JS_FALSE;
-
- while((ilen=read(ifd, in, B64BUFFLEN))) {
- for (x=0;x<ilen;x++) {
- b = (b<<8) + in[x];
- l += 8;
- while (l >= 6) {
- out[bytes++] = c64[(b>>(l-=6))%64];
- if (++y!=72)
- continue;
- out[bytes++] = '\n';
- y=0;
- }
- }
- if (write(fd, &out, bytes) != bytes) {
- return -1;
- } else
- bytes=0;
-
- }
-
- if (l > 0) {
- out[bytes++] = c64[((b%16)<<(6-l))%64];
- }
- if (l != 0) while (l < 6) {
- out[bytes++] = '=', l += 2;
- }
- if (write(fd, &out, bytes) != bytes) {
- return -1;
- }
-
- }
-
-
-
- if (file) {
- snprintf(buf, B64BUFFLEN, "\n\n--%s--\n.\n", bound);
- if (!write_buf(fd, buf))
- return JS_FALSE;
- }
- }
-
- if (fd) {
- close(fd);
- }
- if (ifd) {
- close(ifd);
- }
- snprintf(buf, B64BUFFLEN, "/bin/cat %s | /usr/sbin/sendmail -tf \"%s\" %s", filename, from, to);
- system(buf);
- unlink(filename);
-
-
- if (file) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Emailed file [%s] to [%s]\n", filename, to);
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Emailed data to [%s]\n", to);
- }
- return JS_TRUE;
- }
-
-
- return JS_FALSE;
-}
-
static JSFunctionSpec fs_functions[] = {
{"console_log", js_log, 2},
{"exit", js_exit, 0},
{"include", js_include, 1},
- {"email", js_email, 2},
{"bridge", js_bridge, 2},
{"apiExecute", js_api_execute, 2},
{"use", js_api_use, 1},
@@ -2475,3 +2367,14 @@
curl_global_cleanup();
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.h (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.h Sun Dec 3 17:55:28 2006
@@ -50,7 +50,6 @@
#include "jsparse.h"
#include "jsscope.h"
#include "jsscript.h"
-#include <libteletone.h>
SWITCH_BEGIN_EXTERN_C
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_core_db/mod_spidermonkey_core_db.c Sun Dec 3 17:55:28 2006
@@ -31,7 +31,7 @@
*/
#include "mod_spidermonkey.h"
-static const char modname[] = "DB";
+static const char modname[] = "CoreDB";
struct db_obj {
switch_memory_pool_t *pool;
@@ -148,10 +148,9 @@
{
struct db_obj *dbo = JS_GetPrivate(cx, obj);
*rval = BOOLEAN_TO_JSVAL( JS_FALSE );
-
- if (dbo->stmt) {
- int running = 1;
+ if (dbo->stmt) {
+ int running = 1;
while (running < 5000) {
int result = switch_core_db_step(dbo->stmt);
if (result == SQLITE_ROW) {
@@ -210,10 +209,9 @@
dbo->stmt = NULL;
}
- if (argc > 0) {
+ if (argc > 0) {
char *sql = JS_GetStringBytes(JS_ValueToString(cx, argv[0]));
-
- if(switch_core_db_prepare(dbo->db, sql, 0, &dbo->stmt, 0)) {
+ if(switch_core_db_prepare(dbo->db, sql, -1, &dbo->stmt, 0)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error %s\n", switch_core_db_errmsg(dbo->db));
} else {
*rval = BOOLEAN_TO_JSVAL( JS_TRUE );
@@ -266,18 +264,14 @@
}
JSClass db_class = {
- "DB", JSCLASS_HAS_PRIVATE,
+ modname, JSCLASS_HAS_PRIVATE,
JS_PropertyStub, JS_PropertyStub, db_getProperty, JS_PropertyStub,
JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, db_destroy, NULL, NULL, NULL,
db_construct
};
-
-
-
-
-switch_status_t spidermonkey_load(JSContext *cx, JSObject *obj)
+switch_status_t db_load(JSContext *cx, JSObject *obj)
{
JS_InitClass(cx,
@@ -291,14 +285,13 @@
db_props,
db_methods
);
-
return SWITCH_STATUS_SUCCESS;
}
const sm_module_interface_t DB_module_interface = {
/*.name = */ modname,
- /*.spidermonkey_load*/ spidermonkey_load,
+ /*.spidermonkey_load*/ db_load,
/*.next*/ NULL
};
@@ -307,3 +300,14 @@
*module_interface = &DB_module_interface;
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_skel/mod_spidermonkey_skel.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_skel/mod_spidermonkey_skel.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_skel/mod_spidermonkey_skel.c Sun Dec 3 17:55:28 2006
@@ -108,3 +108,14 @@
*module_interface = &skel_module_interface;
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/languages/mod_spidermonkey_teletone/mod_spidermonkey_teletone.c Sun Dec 3 17:55:28 2006
@@ -30,6 +30,7 @@
*
*/
#include "mod_spidermonkey.h"
+#include <libteletone.h>
static const char modname[] = "TeleTone";
@@ -357,7 +358,7 @@
};
-switch_status_t spidermonkey_load(JSContext *cx, JSObject *obj)
+switch_status_t teletone_load(JSContext *cx, JSObject *obj)
{
JS_InitClass(cx,
obj,
@@ -376,7 +377,7 @@
const sm_module_interface_t teletone_module_interface = {
/*.name = */ modname,
- /*.spidermonkey_load*/ spidermonkey_load,
+ /*.spidermonkey_load*/ teletone_load,
/*.next*/ NULL
};
@@ -385,3 +386,14 @@
*module_interface = &teletone_module_interface;
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/loggers/mod_console/mod_console.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/loggers/mod_console/mod_console.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/loggers/mod_console/mod_console.c Sun Dec 3 17:55:28 2006
@@ -158,3 +158,13 @@
return SWITCH_STATUS_SUCCESS;
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/loggers/mod_syslog/mod_syslog.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/loggers/mod_syslog/mod_syslog.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/loggers/mod_syslog/mod_syslog.c Sun Dec 3 17:55:28 2006
@@ -171,3 +171,13 @@
return SWITCH_STATUS_SUCCESS;
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c Sun Dec 3 17:55:28 2006
@@ -222,3 +222,14 @@
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c Sun Dec 3 17:55:28 2006
@@ -349,3 +349,13 @@
return SWITCH_STATUS_SUCCESS;
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch.c Sun Dec 3 17:55:28 2006
@@ -309,3 +309,14 @@
return switch_core_destroy(vg);
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_buffer.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_buffer.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_buffer.c Sun Dec 3 17:55:28 2006
@@ -255,3 +255,14 @@
*buffer = NULL;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_caller.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_caller.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_caller.c Sun Dec 3 17:55:28 2006
@@ -248,3 +248,14 @@
}
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_channel.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_channel.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_channel.c Sun Dec 3 17:55:28 2006
@@ -108,20 +108,12 @@
uint32_t flags;
uint32_t state_flags;
switch_caller_profile_t *caller_profile;
- switch_caller_profile_t *originator_caller_profile;
- switch_caller_profile_t *originatee_caller_profile;
switch_caller_extension_t *caller_extension;
const switch_state_handler_table_t *state_handlers[SWITCH_MAX_STATE_HANDLERS];
int state_handler_index;
switch_hash_t *variables;
switch_hash_t *private_hash;
- switch_channel_timetable_t *times;
switch_call_cause_t hangup_cause;
- int freq;
- int bits;
- int channels;
- int ms;
- int kbps;
};
@@ -160,8 +152,16 @@
SWITCH_DECLARE(switch_channel_timetable_t *) switch_channel_get_timetable(switch_channel_t *channel)
{
+ switch_channel_timetable_t *times = NULL;
+
assert(channel != NULL);
- return channel->times;
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ times = channel->caller_profile->times;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
+
+ return times;
}
SWITCH_DECLARE(switch_status_t) switch_channel_alloc(switch_channel_t **channel, switch_memory_pool_t *pool)
@@ -184,46 +184,6 @@
return SWITCH_STATUS_SUCCESS;
}
-SWITCH_DECLARE(switch_status_t) switch_channel_set_raw_mode(switch_channel_t *channel, int freq, int bits, int channels,
- int ms, int kbps)
-{
-
- assert(channel != NULL);
-
- channel->freq = freq;
- channel->bits = bits;
- channel->channels = channels;
- channel->ms = ms;
- channel->kbps = kbps;
-
-
- return SWITCH_STATUS_SUCCESS;
-}
-
-SWITCH_DECLARE(switch_status_t) switch_channel_get_raw_mode(switch_channel_t *channel, int *freq, int *bits, int *channels,
- int *ms, int *kbps)
-{
- if (freq) {
- *freq = channel->freq;
- }
- if (bits) {
- *bits = channel->bits;
- }
- if (channels) {
- *channels = channel->channels;
- }
- if (ms) {
- *ms = channel->ms;
- }
- if (kbps) {
- *kbps = channel->kbps;
- }
-
- return SWITCH_STATUS_SUCCESS;
-
-}
-
-
SWITCH_DECLARE(switch_size_t) switch_channel_has_dtmf(switch_channel_t *channel)
{
switch_size_t has;
@@ -306,7 +266,6 @@
channel->state = state;
channel->flags = flags;
channel->session = session;
- switch_channel_set_raw_mode(channel, 8000, 16, 1, 20, 8);
return SWITCH_STATUS_SUCCESS;
}
@@ -348,7 +307,7 @@
assert(channel != NULL);
if (!(v=switch_core_hash_find(channel->variables, varname))) {
- if (!(v = switch_caller_get_field_by_name(channel->caller_profile, varname))) {
+ if (!channel->caller_profile || !(v = switch_caller_get_field_by_name(channel->caller_profile, varname))) {
if (!strcmp(varname, "base_dir")) {
return SWITCH_GLOBAL_dirs.base_dir;
}
@@ -710,16 +669,17 @@
SWITCH_DECLARE(void) switch_channel_event_set_data(switch_channel_t *channel, switch_event_t *event)
{
- switch_caller_profile_t *caller_profile, *originator_caller_profile, *originatee_caller_profile;
+ switch_caller_profile_t *caller_profile, *originator_caller_profile = NULL, *originatee_caller_profile = NULL;
switch_hash_index_t *hi;
switch_codec_t *codec;
void *val;
const void *var;
char state_num[25];
- caller_profile = switch_channel_get_caller_profile(channel);
- originator_caller_profile = switch_channel_get_originator_caller_profile(channel);
- originatee_caller_profile = switch_channel_get_originatee_caller_profile(channel);
+ if ((caller_profile = switch_channel_get_caller_profile(channel))) {
+ originator_caller_profile = caller_profile->originator_caller_profile;
+ originatee_caller_profile = caller_profile->originatee_caller_profile;
+ }
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Channel-State", (char *) switch_channel_state_name(channel->state));
snprintf(state_num, sizeof(state_num), "%d", channel->state);
@@ -767,11 +727,10 @@
SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel, switch_caller_profile_t *caller_profile)
{
- switch_channel_timetable_t *times;
-
assert(channel != NULL);
assert(channel->session != NULL);
switch_mutex_lock(channel->profile_mutex);
+ assert(caller_profile != NULL);
if (!caller_profile->uuid) {
caller_profile->uuid = switch_core_session_strdup(channel->session, switch_core_session_get_uuid(channel->session));
@@ -793,13 +752,15 @@
switch_event_fire(&event);
}
}
-
- if ((times = (switch_channel_timetable_t *) switch_core_session_alloc(channel->session, sizeof(*times)))) {
- times->next = channel->times;
- channel->times = times;
- }
- channel->times->created = switch_time_now();
+
+ caller_profile->times = (switch_channel_timetable_t *) switch_core_session_alloc(channel->session, sizeof(*caller_profile->times));
+ caller_profile->times->created = switch_time_now();
+ if (channel->caller_profile && channel->caller_profile->times) {
+ channel->caller_profile->times->transferred = switch_time_now();
+ caller_profile->times->answered = channel->caller_profile->times->answered;
+ }
+
caller_profile->next = channel->caller_profile;
channel->caller_profile = caller_profile;
@@ -822,53 +783,61 @@
switch_caller_profile_t *caller_profile)
{
assert(channel != NULL);
- switch_mutex_lock(channel->profile_mutex);
- caller_profile->next = channel->originator_caller_profile;
- channel->originator_caller_profile = caller_profile;
- switch_mutex_unlock(channel->profile_mutex);
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ caller_profile->next = channel->caller_profile->originator_caller_profile;
+ channel->caller_profile->originator_caller_profile = caller_profile;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
}
SWITCH_DECLARE(void) switch_channel_set_originatee_caller_profile(switch_channel_t *channel,
switch_caller_profile_t *caller_profile)
{
assert(channel != NULL);
- switch_mutex_lock(channel->profile_mutex);
- caller_profile->next = channel->originatee_caller_profile;
- channel->originatee_caller_profile = caller_profile;
- switch_mutex_unlock(channel->profile_mutex);
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ caller_profile->next = channel->caller_profile->originatee_caller_profile;
+ channel->caller_profile->originatee_caller_profile = caller_profile;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
}
SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originator_caller_profile(switch_channel_t *channel)
{
- switch_caller_profile_t *profile;
+ switch_caller_profile_t *profile = NULL;
assert(channel != NULL);
- switch_mutex_lock(channel->profile_mutex);
- profile = channel->originator_caller_profile;
- switch_mutex_unlock(channel->profile_mutex);
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ profile = channel->caller_profile->originator_caller_profile;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
return profile;
}
-SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel_t *channel)
-{
- assert(channel != NULL);
- assert(channel->session != NULL);
- return switch_core_session_get_uuid(channel->session);
-}
-
SWITCH_DECLARE(switch_caller_profile_t *) switch_channel_get_originatee_caller_profile(switch_channel_t *channel)
{
- switch_caller_profile_t *profile;
+ switch_caller_profile_t *profile = NULL;
assert(channel != NULL);
- switch_mutex_lock(channel->profile_mutex);
- profile = channel->originatee_caller_profile;
- switch_mutex_unlock(channel->profile_mutex);
+ if (channel->caller_profile) {
+ switch_mutex_lock(channel->profile_mutex);
+ profile = channel->caller_profile->originatee_caller_profile;
+ switch_mutex_unlock(channel->profile_mutex);
+ }
return profile;
}
+SWITCH_DECLARE(char *) switch_channel_get_uuid(switch_channel_t *channel)
+{
+ assert(channel != NULL);
+ assert(channel->session != NULL);
+ return switch_core_session_get_uuid(channel->session);
+}
+
SWITCH_DECLARE(int) switch_channel_add_state_handler(switch_channel_t *channel,
const switch_state_handler_table_t *state_handler)
{
@@ -974,8 +943,10 @@
assert(channel != NULL);
switch_mutex_lock(channel->flag_mutex);
- if (channel->times && !channel->times->hungup) {
- channel->times->hungup = switch_time_now();
+ if (channel->caller_profile && channel->caller_profile->times && !channel->caller_profile->times->hungup) {
+ switch_mutex_lock(channel->profile_mutex);
+ channel->caller_profile->times->hungup = switch_time_now();
+ switch_mutex_unlock(channel->profile_mutex);
}
if (channel->state < CS_HANGUP) {
@@ -1096,7 +1067,12 @@
if (switch_core_session_answer_channel(channel->session) == SWITCH_STATUS_SUCCESS) {
switch_event_t *event;
- channel->times->answered = switch_time_now();
+ if (channel->caller_profile && channel->caller_profile->times) {
+ switch_mutex_lock(channel->profile_mutex);
+ channel->caller_profile->times->answered = switch_time_now();
+ switch_mutex_unlock(channel->profile_mutex);
+ }
+
switch_channel_set_flag(channel, CF_ANSWERED);
switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *) file, func, line, SWITCH_LOG_NOTICE, "Answer %s!\n", channel->name);
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_ANSWER) == SWITCH_STATUS_SUCCESS) {
@@ -1196,19 +1172,22 @@
return in;
}
}
- nlen = sub_val ? strlen(sub_val) : 0;
+ if ((nlen = sub_val ? strlen(sub_val) : 0)) {
+ if (len + nlen >= olen) {
+ char *dp;
+ olen += (len + nlen + block);
+ cpos = c - data;
+ if ((dp = realloc(data, olen))) {
+ data = dp;
+ c = data + cpos;
+ memset(c, 0, olen - cpos);
+ }
+ }
- if (len + nlen >= olen) {
- olen = (olen + len + nlen + block);
- cpos = c - data;
- data = realloc(data, olen);
- c = data + cpos;
- memset(c, 0, olen - cpos);
- }
- if (nlen) {
len += nlen;
strcat(c, sub_val);
c += nlen;
+
}
switch_safe_free(func_val);
@@ -1230,3 +1209,14 @@
free(indup);
return data;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_config.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_config.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_config.c Sun Dec 3 17:55:28 2006
@@ -205,3 +205,14 @@
return ret;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_console.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_console.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_console.c Sun Dec 3 17:55:28 2006
@@ -250,3 +250,14 @@
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_core.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_core.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_core.c Sun Dec 3 17:55:28 2006
@@ -2673,7 +2673,8 @@
}
while (switch_channel_get_state(session->channel) == CS_EXECUTE && extension->current_application) {
- char *expanded;
+ char *expanded = NULL;
+
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Execute %s(%s)\n",
extension->current_application->application_name,
extension->current_application->application_data);
@@ -2720,7 +2721,7 @@
application_interface->application_function(session, expanded);
if (expanded != extension->current_application->application_data) {
- free(expanded);
+ switch_safe_free(expanded);
}
extension->current_application = extension->current_application->next;
}
@@ -4187,3 +4188,14 @@
return SWITCH_STATUS_SUCCESS;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_event.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_event.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_event.c Sun Dec 3 17:55:28 2006
@@ -600,19 +600,52 @@
{
switch_size_t len = 0;
switch_event_header_t *hp;
- switch_size_t llen = 0, dlen = 0, blocksize = 512;
+ switch_size_t llen = 0, dlen = 0, blocksize = 512, encode_len = 1024;
char *buf;
+ char *encode_buf = NULL; /* used for url encoding of variables to make sure unsafe things stay out of the serialzed copy */
*str = NULL;
- if (!(buf = malloc(blocksize))) {
+ dlen = blocksize * 2;
+
+ if (!(buf = malloc(dlen))) {
return SWITCH_STATUS_MEMERR;
}
- dlen = blocksize;
+ /* go ahead and give ourselves some space to work with, should save a few reallocs */
+ if(!(encode_buf = malloc(encode_len))) {
+ return SWITCH_STATUS_MEMERR;
+ }
+ //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "hit serialze!.\n");
for (hp = event->headers; hp; hp = hp->next) {
- llen = strlen(hp->name) + strlen(hp->value) + 2;
+ /*
+ * grab enough memory to store 3x the string (url encode takes one char and turns it into %XX)
+ * so we could end up with a string that is 3 times the original's length, unlikely but rather
+ * be safe than destroy the string, also add one for the null. And try to be smart about using
+ * the memory, allocate and only reallocate if we need more. This avoids an alloc, free CPU
+ * destroying loop.
+ */
+ if(encode_len < ((strlen(hp->value) * 3) + 1)) {
+ char* tmp;
+ //switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Allocing %d was %d.\n", ((strlen(hp->value) * 3) + 1), encode_len);
+ /* we can use realloc for initial alloc as well, if encode_buf is zero it treats it as a malloc */
+ if(!(tmp = realloc(encode_buf, ((strlen(hp->value) * 3) + 1)))) {
+ /* oh boy, ram's gone, give back what little we grabbed and bail */
+ switch_safe_free(buf);
+ return SWITCH_STATUS_MEMERR;
+ }
+
+ /* keep track of the size of our allocation */
+ encode_len = (strlen(hp->value) * 3) + 1;
+
+ encode_buf = tmp;
+ }
+
+ /* handle any bad things in the string like newlines : etc that screw up the serialized format */
+ switch_url_encode(hp->value, encode_buf, encode_len - 1);
+
+ llen = strlen(hp->name) + strlen(encode_buf) + 2;
if ((len + llen) > dlen) {
char *m;
@@ -620,15 +653,21 @@
if ((m = realloc(buf, dlen))) {
buf = m;
} else {
+ /* we seem to be out of memory trying to resize the serialize string, give back what we already have and give up */
switch_safe_free(buf);
+ switch_safe_free(encode_buf);
return SWITCH_STATUS_MEMERR;
}
}
- snprintf(buf + len, dlen - len, "%s: %s\n", hp->name, hp->value);
+ snprintf(buf + len, dlen - len, "%s: %s\n", hp->name, encode_buf);
len = strlen(buf);
+
}
+ /* we are done with the memory we used for encoding, give it back */
+ switch_safe_free(encode_buf);
+
if (event->body) {
int blen = (int) strlen(event->body);
llen = blen;
@@ -848,3 +887,14 @@
return SWITCH_STATUS_MEMERR;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_ivr.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_ivr.c Sun Dec 3 17:55:28 2006
@@ -26,6 +26,7 @@
* Anthony Minessale II <anthmct(a)yahoo.com>
* Paul D. Tinsley <pdt at jackhammer.org>
* Neal Horman <neal at wanlink dot com>
+ * Matt Klein <mklein(a)nmedia.net>
*
* switch_ivr.c -- IVR Library
*
@@ -136,7 +137,7 @@
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_channel_t *channel;
switch_frame_t *frame;
- int stream_id;
+ int stream_id = 0;
switch_event_t *event;
channel = switch_core_session_get_channel(session);
@@ -151,19 +152,18 @@
switch_channel_set_flag(channel, CF_CONTROLLED);
while (switch_channel_ready(channel)) {
- for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
- if ((status = switch_core_session_read_frame(session, &frame, -1, stream_id)) == SWITCH_STATUS_SUCCESS) {
- if (!SWITCH_READ_ACCEPTABLE(status)) {
- break;
- }
-
- if (switch_core_session_dequeue_private_event(session, &event) == SWITCH_STATUS_SUCCESS) {
- switch_ivr_parse_event(session, event);
- switch_event_destroy(&event);
- }
-
- }
- }
+
+ if ((status = switch_core_session_read_frame(session, &frame, -1, stream_id)) == SWITCH_STATUS_SUCCESS) {
+ if (!SWITCH_READ_ACCEPTABLE(status)) {
+ break;
+ }
+
+ if (switch_core_session_dequeue_private_event(session, &event) == SWITCH_STATUS_SUCCESS) {
+ switch_ivr_parse_event(session, event);
+ switch_event_destroy(&event);
+ }
+ }
+
}
switch_channel_clear_flag(channel, CF_CONTROLLED);
@@ -327,11 +327,12 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_record_file(switch_core_session_t *session,
- switch_file_handle_t *fh,
- char *file,
- switch_input_callback_function_t input_callback,
- void *buf,
- uint32_t buflen)
+ switch_file_handle_t *fh,
+ char *file,
+ switch_input_callback_function_t input_callback,
+ void *buf,
+ uint32_t buflen,
+ uint32_t limit)
{
switch_channel_t *channel;
char dtmf[128];
@@ -342,6 +343,7 @@
switch_status_t status = SWITCH_STATUS_SUCCESS;
char *p;
const char *vval;
+ time_t start = 0;
if (!fh) {
fh = &lfh;
@@ -424,17 +426,29 @@
return SWITCH_STATUS_GENERR;
}
+ if (limit) {
+ start = time(NULL);
+ }
+ if (fh->thresh) {
+ if (!fh->silence_hits) {
+ fh->silence_hits = 20;
+ }
+ }
+
while(switch_channel_ready(channel)) {
switch_size_t len;
switch_event_t *event;
-
- if (switch_core_session_dequeue_private_event(session, &event) == SWITCH_STATUS_SUCCESS) {
+ if (switch_core_session_dequeue_private_event(session, &event) == SWITCH_STATUS_SUCCESS) {
switch_ivr_parse_event(session, event);
switch_event_destroy(&event);
}
+ if (start && (time(NULL) - start) > limit) {
+ break;
+ }
+
if (input_callback || buf || buflen) {
/*
dtmf handler function you can hook up to be executed when a digit is dialed during playback
@@ -471,6 +485,26 @@
if (!SWITCH_READ_ACCEPTABLE(status)) {
break;
}
+
+ if (fh->thresh) {
+ int16_t *fdata = (int16_t *) read_frame->data;
+ uint32_t samples = read_frame->datalen / sizeof(*fdata);
+ uint32_t score, count = 0, j = 0;
+ double energy = 0;
+
+ for (count = 0; count < samples; count++) {
+ energy += abs(fdata[j]);
+ j += read_codec->implementation->number_of_channels;
+ }
+
+ score = (uint32_t)(energy / samples);
+ if (score < fh->thresh) {
+ if (!--fh->silence_hits) {
+ break;
+ }
+ }
+ }
+
if (!switch_test_flag(fh, SWITCH_FILE_PAUSE)) {
len = (switch_size_t) read_frame->datalen / 2;
switch_core_file_write(fh, read_frame->data, &len);
@@ -924,7 +958,7 @@
switch_channel_t *channel;
int16_t abuf[FILE_STARTSAMPLES];
char dtmf[128];
- uint32_t interval = 0, samples = 0, framelen;
+ uint32_t interval = 0, samples = 0, framelen, sample_start = 0;
uint32_t ilen = 0;
switch_size_t olen = 0;
switch_frame_t write_frame = {0};
@@ -933,7 +967,7 @@
switch_codec_t codec;
switch_memory_pool_t *pool = switch_core_session_get_pool(session);
char *codec_name;
- int stream_id;
+ int stream_id = 0;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_file_handle_t lfh;
switch_codec_t *read_codec = switch_core_session_get_read_codec(session);
@@ -962,6 +996,13 @@
memset(fh, 0, sizeof(lfh));
}
+
+ if (fh->samples > 0) {
+ sample_start = fh->samples;
+ fh->samples = 0;
+ }
+
+
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
@@ -977,6 +1018,10 @@
write_frame.data = abuf;
write_frame.buflen = sizeof(abuf);
+ if (sample_start > 0) {
+ uint32_t pos = 0;
+ switch_core_file_seek(fh, &pos, sample_start, SEEK_CUR);
+ }
if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_TITLE, &p) == SWITCH_STATUS_SUCCESS) {
title = (char *) switch_core_session_strdup(session, (char *)p);
@@ -1218,21 +1263,23 @@
if (!asis) {switch_swap_linear(write_frame.data, (int) write_frame.datalen / 2);}
#endif
#endif
- for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
- status = switch_core_session_write_frame(session, &write_frame, -1, stream_id);
+ stream_id = 0;
- if (status == SWITCH_STATUS_MORE_DATA) {
- status = SWITCH_STATUS_SUCCESS;
- continue;
- } else if (status != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
- done = 1;
- break;
- }
- if (done) {
- break;
- }
- }
+ status = switch_core_session_write_frame(session, &write_frame, -1, stream_id);
+
+ if (status == SWITCH_STATUS_MORE_DATA) {
+ status = SWITCH_STATUS_SUCCESS;
+ continue;
+ } else if (status != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
+ done = 1;
+ break;
+ }
+
+ if (done) {
+ break;
+ }
+
if (timer_name) {
if (switch_core_timer_next(&timer) < 0) {
@@ -1446,7 +1493,7 @@
switch_size_t ilen = 0;
switch_frame_t write_frame = {0};
int x;
- int stream_id;
+ int stream_id = 0;
int done = 0;
int lead_in_out = 10;
switch_status_t status = SWITCH_STATUS_SUCCESS;
@@ -1481,13 +1528,11 @@
write_frame.codec = codec;
for( x = 0; !done && x < lead_in_out; x++) {
- for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
- if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
- done = 1;
- break;
- }
- }
+ if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
+ done = 1;
+ break;
+ }
}
ilen = len;
@@ -1565,13 +1610,11 @@
if (status != SWITCH_STATUS_SUCCESS) {
for( x = 0; !done && x < lead_in_out; x++) {
- for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
- if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
- done = 1;
- break;
- }
- }
+ if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
+ done = 1;
+ break;
+ }
}
if (status == SWITCH_STATUS_BREAK) {
status = SWITCH_STATUS_SUCCESS;
@@ -1586,17 +1629,15 @@
write_frame.datalen = (uint32_t)ilen;
write_frame.samples = (uint32_t)(ilen / 2);
- for (stream_id = 0; stream_id < switch_core_session_get_stream_count(session); stream_id++) {
- if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
- done = 1;
- break;
- }
+ if (switch_core_session_write_frame(session, &write_frame, -1, stream_id) != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Bad Write\n");
+ done = 1;
+ break;
+ }
- if (done) {
- break;
- }
- }
+ if (done) {
+ break;
+ }
if (timer) {
if ((x = switch_core_timer_next(timer)) < 0) {
@@ -1645,7 +1686,7 @@
switch_codec_t codec;
switch_memory_pool_t *pool = switch_core_session_get_pool(session);
char *codec_name;
- int stream_id;
+ int stream_id = 0;
switch_status_t status = SWITCH_STATUS_SUCCESS;
switch_speech_handle_t sh;
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_NONE;
@@ -1841,6 +1882,8 @@
switch_core_session_receive_message(session_a, message);
if (switch_test_flag(message, SCSMF_DYNAMIC)) {
switch_safe_free(message);
+ } else {
+ message = NULL;
}
}
@@ -2154,7 +2197,8 @@
uint32_t len,
int32_t *idx,
char *file,
- char *key)
+ char *key,
+ char *ringback_data)
{
uint32_t i;
@@ -2167,7 +2211,8 @@
}
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))) &&
+ } else if ((switch_channel_test_flag(peer_channels[i], CF_ANSWERED) ||
+ (!ringback_data && len == 1 && switch_channel_test_flag(peer_channels[0], CF_EARLY_MEDIA))) &&
!switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
if (key) {
@@ -2264,6 +2309,7 @@
char *ringback_data = NULL;
switch_codec_t *read_codec = NULL;
uint8_t sent_ring = 0;
+ switch_core_session_message_t *message = NULL;
write_frame.data = fdata;
@@ -2434,13 +2480,15 @@
peer_sessions[i] = NULL;
continue;
}
-
+
switch_core_session_read_lock(peer_sessions[i]);
pool = NULL;
peer_channels[i] = switch_core_session_get_channel(peer_sessions[i]);
assert(peer_channels[i] != NULL);
-
+
+ //switch_channel_set_flag(peer_channels[i], CF_NO_INDICATE);
+
if (table == &noop_state_handler) {
table = NULL;
} else if (!table) {
@@ -2499,7 +2547,7 @@
switch_channel_pre_answer(caller_channel);
}
- if (session && !switch_channel_test_flag(caller_channel, CF_NOMEDIA)) {
+ if (session && (ringback_data || !switch_channel_test_flag(caller_channel, CF_NOMEDIA))) {
read_codec = switch_core_session_get_read_codec(session);
assert(read_codec != NULL);
@@ -2525,6 +2573,7 @@
if (ringback_data) {
char *tmp_data = NULL;
+
switch_buffer_create_dynamic(&ringback.audio_buffer, 512, 1024, 0);
switch_buffer_create_dynamic(&ringback.loop_buffer, 512, 1024, 0);
@@ -2579,33 +2628,36 @@
}
}
}
-
+
while ((!caller_channel || switch_channel_ready(caller_channel)) &&
- check_channel_status(peer_channels, peer_sessions, and_argc, &idx, file, key)) {
+ check_channel_status(peer_channels, peer_sessions, and_argc, &idx, file, key, ringback_data)) {
if ((to = (uint8_t)((time(NULL) - start) >= (time_t)timelimit_sec))) {
idx = IDX_CANCEL;
goto notready;
}
- if (session && or_argc == 1 && and_argc == 1) { /* when there is only 1 channel to call and bridge */
- switch_core_session_message_t *message = NULL;
- if (switch_core_session_dequeue_message(peer_sessions[0], &message) == SWITCH_STATUS_SUCCESS) {
+ if (switch_core_session_dequeue_message(peer_sessions[0], &message) == SWITCH_STATUS_SUCCESS) {
+ if (session && !ringback_data && or_argc == 1 && and_argc == 1) { /* when there is only 1 channel to call and bridge and no ringback */
switch_core_session_receive_message(session, message);
- if (switch_test_flag(message, SCSMF_DYNAMIC)) {
- switch_safe_free(message);
- }
}
+
+ if (switch_test_flag(message, SCSMF_DYNAMIC)) {
+ switch_safe_free(message);
+ } else {
+ message = NULL;
+ }
}
/* read from the channel while we wait if the audio is up on it */
- if (session && !switch_channel_test_flag(caller_channel, CF_NOMEDIA) &&
+ if (session && (ringback_data || !switch_channel_test_flag(caller_channel, CF_NOMEDIA)) &&
(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 && !pass && !switch_test_flag(read_frame, SFF_CNG) && read_frame->datalen > 1) {
if (ringback.fh) {
uint8_t abuf[1024];
@@ -2649,7 +2701,8 @@
break;
}
}
- }
+ }
+
if (switch_core_session_write_frame(session, &write_frame, 1000, 0) != SWITCH_STATUS_SUCCESS) {
break;
}
@@ -2670,7 +2723,7 @@
idx = IDX_CANCEL;
}
- if (session && !switch_channel_test_flag(caller_channel, CF_NOMEDIA)) {
+ if (session && (ringback_data || !switch_channel_test_flag(caller_channel, CF_NOMEDIA))) {
switch_core_session_reset(session);
}
@@ -3077,8 +3130,6 @@
/*.on_hibernate*/ signal_bridge_on_hibernate
};
-
-
SWITCH_DECLARE(switch_status_t) switch_ivr_signal_bridge(switch_core_session_t *session, switch_core_session_t *peer_session)
{
switch_channel_t *caller_channel, *peer_channel;
@@ -3266,9 +3317,15 @@
switch_channel_get_name(peer_channel)
);
switch_channel_hangup(peer_channel, SWITCH_CAUSE_NO_ANSWER);
- }
+ }
done:
+
+ if (switch_channel_get_state(caller_channel) < CS_HANGUP &&
+ switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
+ switch_channel_hangup(caller_channel, SWITCH_CAUSE_NORMAL_CLEARING);
+ }
+
return status;
}
@@ -4230,3 +4287,14 @@
return status;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_loadable_module.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_loadable_module.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_loadable_module.c Sun Dec 3 17:55:28 2006
@@ -380,7 +380,12 @@
snprintf(path, len, "%s%s%s%s", dir, SWITCH_PATH_SEPARATOR, file, ext);
}
}
-
+
+ if (switch_core_hash_find(loadable_modules.module_hash, file)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Module %s Already Loaded!\n", file);
+ return SWITCH_STATUS_FALSE;
+ }
+
if ((status = switch_loadable_module_load_file(path, &new_module) == SWITCH_STATUS_SUCCESS)) {
return switch_loadable_module_process((char *) file, new_module);
} else {
@@ -800,3 +805,14 @@
return status;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_log.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_log.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_log.c Sun Dec 3 17:55:28 2006
@@ -287,3 +287,13 @@
return SWITCH_STATUS_SUCCESS;
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_resample.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_resample.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_resample.c Sun Dec 3 17:55:28 2006
@@ -216,3 +216,13 @@
}
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_rtp.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_rtp.c Sun Dec 3 17:55:28 2006
@@ -1429,3 +1429,14 @@
{
return rtp_session->private_data;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_stun.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_stun.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_stun.c Sun Dec 3 17:55:28 2006
@@ -370,3 +370,14 @@
return SWITCH_STATUS_FALSE;
}
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_swig.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_swig.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_swig.c Sun Dec 3 17:55:28 2006
@@ -88,17 +88,17 @@
void fs_consol_log(char *level_str, char *msg)
{
- switch_log_level_t level = SWITCH_LOG_DEBUG;
- if (level_str) {
- level = switch_log_str2level(level_str);
+ switch_log_level_t level = SWITCH_LOG_DEBUG;
+ if (level_str) {
+ level = switch_log_str2level(level_str);
}
- switch_log_printf(SWITCH_CHANNEL_LOG, level, msg);
+ switch_log_printf(SWITCH_CHANNEL_LOG, level, msg);
}
void fs_consol_clean(char *msg)
{
- switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, msg);
+ switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_DEBUG, msg);
}
switch_core_session_t *fs_core_session_locate(char *uuid)
@@ -154,7 +154,7 @@
/*
-IVR Routines! You can do IVR in PHP NOW!
+ IVR Routines! You can do IVR in PHP NOW!
*/
int fs_ivr_play_file(switch_core_session_t *session,
@@ -174,20 +174,22 @@
}
int fs_switch_ivr_record_file(switch_core_session_t *session,
- switch_file_handle_t *fh,
- char *file,
- switch_input_callback_function_t dtmf_callback,
- void *buf,
- unsigned int buflen)
+ switch_file_handle_t *fh,
+ char *file,
+ switch_input_callback_function_t dtmf_callback,
+ void *buf,
+ unsigned int buflen,
+ unsigned int limit
+ )
{
switch_status_t status;
- status = switch_ivr_record_file(session, fh, file, dtmf_callback, buf, buflen);
- return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+ status = switch_ivr_record_file(session, fh, file, dtmf_callback, buf, buflen, limit);
+ return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
int fs_switch_ivr_sleep(switch_core_session_t *session,
- uint32_t ms)
+ uint32_t ms)
{
switch_status_t status;
status = switch_ivr_sleep(session, ms);
@@ -211,98 +213,98 @@
unsigned int buflen,
unsigned int timeout)
{
- switch_status_t status;
+ switch_status_t status;
- status = switch_ivr_collect_digits_callback(session, dtmf_callback, buf, buflen, timeout);
- return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+ status = switch_ivr_collect_digits_callback(session, dtmf_callback, buf, buflen, timeout);
+ return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
int fs_switch_ivr_collect_digits_count (switch_core_session_t *session,
- char *buf,
- unsigned int buflen,
- unsigned int maxdigits,
- const char *terminators,
- char *terminator,
- unsigned int timeout)
+ char *buf,
+ unsigned int buflen,
+ unsigned int maxdigits,
+ const char *terminators,
+ char *terminator,
+ unsigned int timeout)
{
- switch_status_t status;
+ switch_status_t status;
- status = switch_ivr_collect_digits_count(session, buf, buflen, maxdigits, terminators, terminator, timeout);
- return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+ status = switch_ivr_collect_digits_count(session, buf, buflen, maxdigits, terminators, terminator, timeout);
+ return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
/*int fs_switch_ivr_multi_threaded_bridge (switch_core_session_t *session,
- switch_core_session_t *peer_session,
- switch_input_callback_function_t dtmf_callback,
- void *session_data,
- void *peer_session_data)
-{
- switch_status_t status;
+ switch_core_session_t *peer_session,
+ switch_input_callback_function_t dtmf_callback,
+ void *session_data,
+ void *peer_session_data)
+ {
+ switch_status_t status;
- status = switch_ivr_multi_threaded_bridge(session, peer_session, dtmf_callback, session_data, peer_session_data);
- return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
-}
+ status = switch_ivr_multi_threaded_bridge(session, peer_session, dtmf_callback, session_data, peer_session_data);
+ return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+ }
*/
int fs_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_caller_profile_t *caller_profile_override) */
+ 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_caller_profile_t *caller_profile_override) */
{
- switch_channel_t *caller_channel;
- switch_core_session_t *peer_session;
- unsigned int timelimit = 60;
- char *var;
- switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
+ switch_channel_t *caller_channel;
+ switch_core_session_t *peer_session;
+ unsigned int timelimit = 60;
+ char *var;
+ switch_call_cause_t cause = SWITCH_CAUSE_NORMAL_CLEARING;
- caller_channel = switch_core_session_get_channel(session);
- assert(caller_channel != NULL);
+ caller_channel = switch_core_session_get_channel(session);
+ assert(caller_channel != NULL);
- if ((var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
- timelimit = atoi(var);
- }
+ if ((var = switch_channel_get_variable(caller_channel, "call_timeout"))) {
+ timelimit = atoi(var);
+ }
- if (switch_ivr_originate(session, &peer_session, &cause, bridgeto, timelimit, NULL, 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 {
- switch_ivr_multi_threaded_bridge(session, peer_session, NULL, NULL, NULL);
- }
+ if (switch_ivr_originate(session, &peer_session, &cause, bridgeto, timelimit, NULL, 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 {
+ switch_ivr_multi_threaded_bridge(session, peer_session, NULL, NULL, NULL);
+ }
}
int fs_switch_ivr_session_transfer(switch_core_session_t *session,
- char *extension,
- char *dialplan,
- char *context)
+ char *extension,
+ char *dialplan,
+ char *context)
{
- switch_status_t status;
+ switch_status_t status;
- status = switch_ivr_session_transfer(session,extension,dialplan,context);
- return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+ status = switch_ivr_session_transfer(session,extension,dialplan,context);
+ return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
int fs_switch_ivr_speak_text (switch_core_session_t *session,
- char *tts_name,
- char *voice_name,
- char *timer_name,
- uint32_t rate,
- switch_input_callback_function_t dtmf_callback,
- char *text,
- void *buf,
- unsigned int buflen)
+ char *tts_name,
+ char *voice_name,
+ char *timer_name,
+ uint32_t rate,
+ switch_input_callback_function_t dtmf_callback,
+ char *text,
+ void *buf,
+ unsigned int buflen)
{
- switch_status_t status;
+ switch_status_t status;
- status = switch_ivr_speak_text(session,tts_name,voice_name,timer_name,rate,dtmf_callback,text,buf,buflen);
- return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+ status = switch_ivr_speak_text(session,tts_name,voice_name,timer_name,rate,dtmf_callback,text,buf,buflen);
+ return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
@@ -320,9 +322,19 @@
int fs_switch_channel_set_variable(switch_channel_t *channel, char *varname, char *value)
{
- switch_status_t status;
+ switch_status_t status;
- status = switch_channel_set_variable(channel, varname, value);
- return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
+ status = switch_channel_set_variable(channel, varname, value);
+ return status == SWITCH_STATUS_SUCCESS ? 1 : 0;
}
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_utils.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_utils.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_utils.c Sun Dec 3 17:55:28 2006
@@ -35,6 +35,92 @@
#include <stdlib.h>
+
+SWITCH_DECLARE(int) switch_perform_regex(char *field, char *expression, pcre **new_re, int *ovector, uint32_t olen)
+{
+ const char *error = NULL;
+ int erroffset = 0;
+ pcre *re = NULL;
+ int match_count = 0;
+
+ if (!(field && expression)) {
+ return 0;
+ }
+
+ re = pcre_compile(expression, /* the pattern */
+ 0, /* default options */
+ &error, /* for error message */
+ &erroffset, /* for error offset */
+ NULL); /* use default character tables */
+ if (error) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "COMPILE ERROR: %d [%s]\n", erroffset, error);
+ switch_clean_re(re);
+ return 0;
+ }
+
+ match_count = pcre_exec(re, /* result of pcre_compile() */
+ NULL, /* we didn't study the pattern */
+ field, /* the subject string */
+ (int) strlen(field), /* the length of the subject string */
+ 0, /* start at offset 0 in the subject */
+ 0, /* default options */
+ ovector, /* vector of integers for substring information */
+ olen); /* number of elements (NOT size in bytes) */
+
+ if (match_count <= 0) {
+ switch_clean_re(re);
+ match_count = 0;
+ }
+
+ *new_re = re;
+
+ return match_count;
+}
+
+
+SWITCH_DECLARE(void) switch_perform_substitution(pcre *re, int match_count, char *data, char *field_data, char *substituted, uint32_t len, int *ovector)
+{
+ char index[10] = "";
+ char replace[1024] = "";
+ uint32_t x, y = 0, z = 0, num = 0;
+
+ for (x = 0; x < (len-1) && x < strlen(data);) {
+ if (data[x] == '$') {
+ x++;
+
+ if (!(data[x] > 47 && data[x] < 58)) {
+ substituted[y++] = data[x-1];
+ continue;
+ }
+
+ while (data[x] > 47 && data[x] < 58) {
+ index[z++] = data[x];
+ x++;
+ }
+ index[z++] = '\0';
+ z = 0;
+ num = atoi(index);
+
+ if (pcre_copy_substring(field_data,
+ ovector,
+ match_count,
+ num,
+ replace,
+ sizeof(replace)) > 0) {
+ unsigned int r;
+ for (r = 0; r < strlen(replace); r++) {
+ substituted[y++] = replace[r];
+ }
+ }
+ } else {
+ substituted[y++] = data[x];
+ x++;
+ }
+ }
+ substituted[y++] = '\0';
+}
+
+
SWITCH_DECLARE(char *) switch_priority_name(switch_priority_t priority)
{
switch(priority) { /*lol*/
@@ -297,7 +383,7 @@
{
char *p;
size_t x = 0;
- const char urlunsafe[] = " \"#%&+:;<=>?@[\\]^`{|}";
+ const char urlunsafe[] = "\r\n \"#%&+:;<=>?@[\\]^`{|}";
const char hex[] = "0123456789ABCDEF";
memset(buf, 0, len);
@@ -347,3 +433,14 @@
apr_socket_opt_set(NULL, 0, 0);
}
#endif
+
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/src/switch_xml.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_xml.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_xml.c Sun Dec 3 17:55:28 2006
@@ -1336,4 +1336,13 @@
switch_xml_free(xml);
}
-
+/* For Emacs:
+ * Local Variables:
+ * mode:c
+ * indent-tabs-mode:nil
+ * tab-width:4
+ * c-basic-offset:4
+ * End:
+ * For VIM:
+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
+ */
Modified: freeswitch/branches/knhor/trunk/support/freeswitch.pub
==============================================================================
--- freeswitch/branches/knhor/trunk/support/freeswitch.pub (original)
+++ freeswitch/branches/knhor/trunk/support/freeswitch.pub Sun Dec 3 17:55:28 2006
@@ -1 +1 @@
-ssh-dss AAAAB3NzaC1kc3MAAAEBAOWKsqPrtDlTVwuZa2GnGR9iTqPGI5dfHRwiJ33WVUIz5LdwqwDPQ1799cF1282YCL6eH55EXODUNskMWdmCe4lqFbW35aCepOL917p7oaf8KchWA5KRNyySlydr2WS51jNpZ47yICrf51nuBgmKchTh0AuBB50PcVff0SOvTuhTAdDdId6gsELdzLHDb+uSPdV77puQRhk7E5t1gy5y3Kfdz5SznCd+FLocYdliWSkduq04B6vZKc1fGkdu4zOfXy7dLp3ISj9Ci3AEqTnB7Ov9xpx5rkhbLDNmkac480IYdMw1M1JHRdK56uAzZgcwOetrN6K/6faBgKcPHDE2SwMAAAAVAN+ipXk7qhjA2SF20p02ZNrcEXujAAABAQDOwfZ22lfjnwkxgIgZjjdIAX0711e30UMyjQvCl2eKaLFharVMyzMFKER1hdjkd2UiU/rKgTKf/9qh8a6gqzaY5O19ZenXlPvVmgLLmwk21vGGrvXEVlacv18JdrkBharZbIrWx+TnxL0iJ7mKtxfafAJRpUMW+Jt9cklAVKOWAnLbXHZisbGamzjUnEfZrsdJl90MQ+3by2htBSdv3lVEXIuqw0duWNj23mW9BN2l3U6uumDFVjNSxf6apppekeprzXn1NXbPTgXp50ejGYnZWm0/sq1zB7ENMnsvpthrxTSeckTDkNVaoV+klJuMDUt1RTSxZQQS776+CcOIxXb5AAABAQCoa7+B2WPk/tToNoI9exb7UVmBYVmdWyIG+9q4apI1AA4VRz2HGqK233qe38VHsDjE8G7chXJrlu9RVHIvRVgZYjtBkLgPBPhcOFrrW/1TjrYLbIVJp/2fIHAZP41pbofwP/Mw8rgmoftWDMh4nx7zEYdGwxz9azgQWPKpPGf0SxLWaIjFqKsB2CFp/uAuMD6+g8LEf30hJ+tCsY4VY0zGGq8Ivofflqt1ZW/1g3AhZSH8DGp1hfOt3o3ZqPd7xg0T1RK+IHgy4FK2np1S7eavPw7fZ6L7QbYIJC5zoCq9IshmrGfSebkUH1XgSUdmDNdFXxHEueej9P79VpKDPtnW FreeSWITCH Public SSH Key
+ssh-dss AAAAB3NzaC1kc3MAAAEBALai7vFlKP9jcy8tb/UTvCvVUN5rCiPTux8vjaWY3uZAbGvfeKtbRLeSI1LGkujh/WRJTZdgRYyHaB0SqnR0Ifesw+bD0n4vhH64inESSVaCmgKaAblBiDloVxZNIa6KMzmCXoXLogSHD6FD/r1/LBvRV3Fsk7YwATltMzwug2tZxeKQBaRbsSYtwKR/7KdIlN9R3ieXaesEjvYgxcp/6UN8VOqqgxi6uHnBSYFhpOOXqFAm1Q92eC3NBtxD6KBjWzJmI4WgLTrVLXfUkVmWqkLtKLovpj4oMtM1pGk8rmb1N+vkB57utqpPqrQdgqMUMvPCufb7shHfwoA755yw/1MAAAAVAOCIbu71sK9dCY6sBPZEvDzIpvkjAAABAQCcGCIjWd+0U5LwYIRZjpicsWgetIvd0vTJ6/6mZwfEpB64IV3yqMOlzA/oOTjCHErs2insz0l6FqAVSp2BbQMD13ZULTuhb8G0Rlh2kwXJvFx+JVsJ+j1SMOJPaLp6ZN1xTQXJ3j+fmvLAzd3cPE/XHWOuvvCCmKV2sIA+nti6gR8WcqTyWrbWuooVBMRwTkajS7qZfwVZxtIvVvAh3FF9DtDfrECLMJ0dOg5W0aTtwqRIsL2f1QMI0pXQqrr+v6rQ+ml7L6fvcJQ1zXqk+zCqKBexG98q3p3MQfNEwusQuQ7WtK31crCPryTMjCo0rHbvo3akJEEraeSQLl1PBNP5AAABAA29RnQ6Yt/DaTq8F057IzI6dX2JSbUaAr26qXV05F6Tsm18PsBaTSaur/FSlGf5DovXwMGvWCg1aZpdOd6fAsrcFXomNH/lHaEqr55qn5zKEsImUD7+gmZl32syLPZLa+qTwARqAqk6WAK3j+6Q/QxsAJpLjmKwvvUMWFLbDWjYEWdUSvaBWACBop0qd6Xy1VVu28EYZeZAAiGKg93P1K3a0Ji0gUS+C+zZ/JwMtRQZXQXgiAOooawechf/SDuSnszrANQlk/2T+uQrN87HJrvLlx+p9TIGfu9NrcAPDsdAbKPZOwEaz+WniccMqGNha0wcSYXLSa1EHCyB3Y80FDM= FreeSWITCH Public SSH Key
1
0
[commit] r3521 - freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference
by Freeswitch SVN 03 Dec '06
by Freeswitch SVN 03 Dec '06
03 Dec '06
Author: knhor
Date: Sun Dec 3 17:26:32 2006
New Revision: 3521
Modified:
freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
Log:
add lots of comments
rename the thread functions
add conference pin retries
don't make outbound calls enter pin's to join
let outbound calls join locked conferences
reduce the number of parameters to many of the conference_loop_fn_xxx functions
Modified: freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c (original)
+++ freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c Sun Dec 3 17:26:32 2006
@@ -51,6 +51,9 @@
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
+// this doesn't work correctly yet, don't bother trying!
+//#define OPTION_IVR_MENU_SUPPORT
+
typedef enum {
FILE_STOP_CURRENT,
FILE_STOP_ALL
@@ -240,7 +243,7 @@
static switch_status_t conference_add_member(conference_obj_t *conference, conference_member_t *member);
static void conference_del_member(conference_obj_t *conference, conference_member_t *member);
static void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *obj);
-static void conference_loop(conference_member_t *member);
+static void conference_loop_output(conference_member_t *member);
static uint32_t conference_stop_file(conference_obj_t *conference, file_stop_t stop);
static switch_status_t conference_play_file(conference_obj_t *conference, char *file, uint32_t leadin);
static switch_status_t conference_say(conference_obj_t *conference, char *text, uint32_t leadin);
@@ -256,10 +259,10 @@
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);
+static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *obj);
static switch_status_t conference_local_play_file(switch_core_session_t *session, char *path, uint32_t leadin, char *buf, switch_size_t len);
static switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin);
-static switch_status_t conference_member_say(conference_obj_t *conference, conference_member_t *member, char *text, uint32_t leadin);
+static switch_status_t conference_member_say(conference_member_t *member, char *text, uint32_t leadin);
static uint32_t conference_member_stop_file(conference_member_t *member, file_stop_t stop);
static conference_obj_t *conference_new(char *name, switch_xml_t profile, switch_memory_pool_t *pool);
static switch_status_t chat_send(char *proto, char *from, char *to, char *subject, char *body, char *hint);
@@ -766,7 +769,9 @@
switch_core_hash_delete(globals.conference_hash, conference->name);
switch_mutex_unlock(globals.hash_mutex);
- switch_ivr_digit_stream_parser_destroy(&conference->dtmf_parser);
+ // this probably should be done, but doing it causes "shutdown" to hang until you kill it
+ // XXX - i'll chase this down later
+// switch_ivr_digit_stream_parser_destroy(&conference->dtmf_parser);
if (conference->pool) {
switch_memory_pool_t *pool = conference->pool;
@@ -795,7 +800,6 @@
{
if (switch_test_flag(member, MFLAG_CAN_SPEAK)) {
conf_api_sub_mute(member, NULL, NULL);
-// conf_api_sub_deaf(member, NULL, NULL);
} else {
conf_api_sub_unmute(member, NULL, NULL);
}
@@ -823,7 +827,7 @@
}
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Energy level %d", member->energy_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_energy_equ_conf(conference_member_t *member, void *data)
@@ -834,7 +838,7 @@
member->energy_level = member->conference->energy_level;
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Energy level %d", member->energy_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_energy_dn(conference_member_t *member, void *data)
@@ -848,7 +852,7 @@
}
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Energy level %d", member->energy_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_volume_talk_up(conference_member_t *member, void *data)
@@ -860,7 +864,7 @@
switch_normalize_volume(member->volume_out_level);
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Volume level %d", member->volume_out_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_volume_talk_zero(conference_member_t *member, void *data)
@@ -871,7 +875,7 @@
member->volume_out_level = 0;
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Volume level %d", member->volume_out_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_volume_talk_dn(conference_member_t *member, void *data)
@@ -883,7 +887,7 @@
switch_normalize_volume(member->volume_out_level);
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Volume level %d", member->volume_out_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_volume_listen_up(conference_member_t *member, void *data)
@@ -895,7 +899,7 @@
switch_normalize_volume(member->volume_in_level);
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Gain level %d", member->volume_in_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_volume_listen_zero(conference_member_t *member, void *data)
@@ -906,7 +910,7 @@
member->volume_in_level = 0;
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Gain level %d", member->volume_in_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_volume_listen_dn(conference_member_t *member, void *data)
@@ -918,7 +922,7 @@
switch_normalize_volume(member->volume_in_level);
switch_mutex_unlock(member->flag_mutex);
snprintf(msg, sizeof(msg), "Gain level %d", member->volume_in_level);
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
static void conference_loop_fn_hangup(conference_member_t *member, void *data)
@@ -926,6 +930,7 @@
switch_clear_flag_locked(member, MFLAG_RUNNING);
}
+#ifdef OPTION_IVR_MENU_SUPPORT
typedef struct caller_control_menu_ctx {
switch_ivr_menu_xml_ctx_t *xml_ctx;
switch_ivr_menu_t *menu_stack;
@@ -948,6 +953,7 @@
}
}
}
+#endif
static void conference_loop_fn_dial(conference_member_t *member, void *data)
{
@@ -973,6 +979,152 @@
}
}
+// marshall frames from the call leg to the conference thread for muxing to other call legs
+static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *obj)
+{
+ conference_member_t *member = obj;
+ switch_channel_t *channel;
+ switch_status_t status;
+ switch_frame_t *read_frame = NULL;
+ switch_codec_t *read_codec;
+ uint32_t hangover = 40,
+ hangunder = 15,
+ hangover_hits = 0,
+ hangunder_hits = 0,
+ energy_level = 0,
+ diff_level = 400;
+ uint8_t talking = 0;
+
+ assert(member != NULL);
+
+ channel = switch_core_session_get_channel(member->session);
+ assert(channel != NULL);
+
+ read_codec = switch_core_session_get_read_codec(member->session);
+ assert(read_codec != NULL);
+
+ /* As long as we have a valid read, feed that data into an input buffer where the conference thread will take it
+ and mux it with any audio from other channels. */
+
+ while(switch_test_flag(member, MFLAG_RUNNING) && switch_channel_ready(channel)) {
+ /* Read a frame. */
+ status = switch_core_session_read_frame(member->session, &read_frame, -1, 0);
+
+ /* end the loop, if appropriate */
+ if (!SWITCH_READ_ACCEPTABLE(status) || !switch_test_flag(member, MFLAG_RUNNING)) {
+ break;
+ }
+
+ if (switch_test_flag(read_frame, SFF_CNG)) {
+ continue;
+ }
+
+ energy_level = member->energy_level;
+
+ // if the member can speak, compute the audio energy level and
+ // generate events when the level crosses the threshold
+ if (switch_test_flag(member, MFLAG_CAN_SPEAK) && energy_level) {
+ uint32_t energy = 0, i = 0, samples = 0, j = 0, score = 0;
+ int16_t *data;
+
+ data = read_frame->data;
+ samples = read_frame->datalen / sizeof(*data);
+
+ for (i = 0; i < samples; i++) {
+ energy += abs(data[j]);
+ j += read_codec->implementation->number_of_channels;
+ }
+
+ score = energy / samples;
+
+ if (score > energy_level) {
+ uint32_t diff = score - energy_level;
+ if (hangover_hits) {
+ hangover_hits--;
+ }
+
+ if (diff >= diff_level || ++hangunder_hits >= hangunder) {
+ hangover_hits = hangunder_hits = 0;
+
+ if (!talking) {
+ switch_event_t *event;
+ talking = 1;
+ if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
+ switch_channel_event_set_data(channel, event);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Name", member->conference->name);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "start-talking");
+ switch_event_fire(&event);
+ }
+ }
+ }
+ } else {
+ if (hangunder_hits) {
+ hangunder_hits--;
+ }
+ if (talking) {
+ switch_event_t *event;
+ if (++hangover_hits >= hangover) {
+ hangover_hits = hangunder_hits = 0;
+ talking = 0;
+
+ if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
+ switch_channel_event_set_data(channel, event);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Name", member->conference->name);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
+ switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "stop-talking");
+ switch_event_fire(&event);
+ }
+ }
+ }
+ }
+ }
+
+ /* skip frames that are not actual media or when we are muted or silent */
+ if ((talking || energy_level == 0) && switch_test_flag(member, MFLAG_CAN_SPEAK)) {
+ if (member->read_resampler) {
+ int16_t *bptr = (int16_t *) read_frame->data;
+ int len = (int) read_frame->datalen;;
+
+ member->read_resampler->from_len = switch_short_to_float(bptr, member->read_resampler->from, (int) len / 2);
+ member->read_resampler->to_len = switch_resample_process(member->read_resampler, member->read_resampler->from,
+ member->read_resampler->from_len, member->read_resampler->to,
+ member->read_resampler->to_size, 0);
+ switch_float_to_short(member->read_resampler->to, read_frame->data, len);
+ len = member->read_resampler->to_len * 2;
+ read_frame->datalen = len;
+ read_frame->samples = len / 2;
+ }
+ /* Check for input volume adjustments */
+ if (member->volume_in_level) {
+ switch_change_sln_volume(read_frame->data, read_frame->datalen / 2, member->volume_in_level);
+ }
+
+ /* Write the audio into the input buffer */
+ switch_mutex_lock(member->audio_in_mutex);
+ switch_buffer_write(member->audio_buffer, read_frame->data, read_frame->datalen);
+ switch_mutex_unlock(member->audio_in_mutex);
+ }
+ }
+
+ switch_clear_flag_locked(member, MFLAG_ITHREAD);
+
+ return NULL;
+}
+
+// launch an input thread for the call leg
+static void launch_conference_loop_input(conference_member_t *member, switch_memory_pool_t *pool)
+{
+ switch_thread_t *thread;
+ switch_threadattr_t *thd_attr = NULL;
+
+ switch_threadattr_create(&thd_attr, pool);
+ switch_threadattr_detach_set(thd_attr, 1);
+ switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
+ switch_set_flag_locked(member, MFLAG_ITHREAD);
+ switch_thread_create(&thread, thd_attr, conference_loop_input, member, pool);
+}
+
static struct caller_control_fn_table {
char *key;
char *digits;
@@ -991,27 +1143,17 @@
{"vol listen zero", "5", CALLER_CONTROL_VOL_LISTEN_ZERO, conference_loop_fn_volume_listen_zero},
{"vol listen dn", "4", CALLER_CONTROL_VOL_LISTEN_DN, conference_loop_fn_volume_listen_dn},
{"hangup", "#", CALLER_CONTROL_HANGUP, conference_loop_fn_hangup},
+#ifdef OPTION_IVR_MENU_SUPPORT
{"menu", NULL, CALLER_CONTROL_MENU, conference_loop_fn_menu},
+#endif
{"dial", NULL, CALLER_CONTROL_DIAL, conference_loop_fn_dial},
};
#define CCFNTBL_QTY (sizeof(ccfntbl)/sizeof(ccfntbl[0]))
-/* Create a thread for the conference and launch it */
-static void launch_input_thread(conference_member_t *member, switch_memory_pool_t *pool)
+// marshall frames from the conference (or file or tts output) to the call leg
+// NB. this starts the input thread after some initial setup for the call leg
+static void conference_loop_output(conference_member_t *member)
{
- switch_thread_t *thread;
- switch_threadattr_t *thd_attr = NULL;
-
- switch_threadattr_create(&thd_attr, pool);
- switch_threadattr_detach_set(thd_attr, 1);
- switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);
- switch_set_flag_locked(member, MFLAG_ITHREAD);
- switch_thread_create(&thread, thd_attr, input_thread_run, member, pool);
-}
-
-/* Sub-Routine called by a channel inside a conference */
-static void conference_loop(conference_member_t *member)
-{
switch_channel_t *channel;
switch_frame_t write_frame = {0};
uint8_t data[SWITCH_RECCOMMENDED_BUFFER_SIZE];
@@ -1045,9 +1187,11 @@
switch_channel_answer(channel);
}
- /* Start a thread to read data and feed it into the buffer and use this thread to generate output */
- launch_input_thread(member, switch_core_session_get_pool(member->session));
+ // Start the input thread
+ launch_conference_loop_input(member, switch_core_session_get_pool(member->session));
+ // Fair WARNING, If you expect the caller to hear anything or for digit handling to be proccessed,
+ // you better not block this thread loop for more than the duration of member->conference->timer_name!
while(switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(member, MFLAG_ITHREAD) && switch_channel_ready(channel)) {
char dtmf[128] = "";
uint8_t file_frame[CONF_BUFFER_SIZE] = {0};
@@ -1055,6 +1199,7 @@
switch_size_t file_sample_len = samples;
char *digit;
switch_event_t *event;
+ caller_control_action_t *caller_action = NULL;
if (switch_core_session_dequeue_event(member->session, &event) == SWITCH_STATUS_SUCCESS) {
char *from = switch_event_get_header(event, "from");
@@ -1088,32 +1233,44 @@
}
}
+ // if we have caller digits, feed them to the parser to find an action
if (switch_channel_has_dtmf(channel)) {
switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf));
if(member->conference->dtmf_parser != NULL) {
- caller_control_action_t *action;
- for (digit = dtmf; *digit; digit++) {
- action = (caller_control_action_t *)switch_ivr_digit_stream_parser_feed(member->conference->dtmf_parser, *digit);
-// switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "digit_stream_parser_feed result != NULL %u\n",action != NULL);
- if (action != NULL && action->handler != NULL) {
- int i,found=0;
+ for (digit = dtmf; *digit && caller_action == NULL; digit++) {
+ caller_action = (caller_control_action_t *)switch_ivr_digit_stream_parser_feed(member->conference->dtmf_parser, *digit);
+ }
+ }
+ // otherwise, clock the parser so that it can handle digit timeout detection
+ } else if(member->conference->dtmf_parser != NULL) {
+ caller_action = (caller_control_action_t *)switch_ivr_digit_stream_parser_feed(member->conference->dtmf_parser, '\0');
+ }
- for(i=0; i<CCFNTBL_QTY; i++) {
- if (action->handler == ccfntbl[i].handler) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "excuting caller control '%s' param '%s'\n",ccfntbl[i].key,(ccfntbl[i].action != CALLER_CONTROL_MENU ? action->data : ""));
- found = 1;
- }
- }
+ // if a caller action has been detected, handle it
+ if (caller_action != NULL) {
+
+ if (caller_action->handler != NULL) {
+ int i,found;
- action->handler(member,action->data);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "digit_stream_parser_feed result != NULL %u\n",caller_action != NULL);
+ for(i=0,found=0; i<CCFNTBL_QTY && !found; i++) {
+ if (caller_action->handler == ccfntbl[i].handler) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "excuting caller control '%s' param '%s'\n",ccfntbl[i].key,(ccfntbl[i].action != CALLER_CONTROL_MENU ? caller_action->data : ""));
+ found = 1;
}
}
+
+ caller_action->handler(member,caller_action->data);
}
+ // set up for next pass
+ caller_action = NULL;
}
+ // handle file and TTS frames
if (member->fnode) {
+ // if we are done, clean it up
if (member->fnode->done) {
confernce_file_node_t *fnode;
switch_memory_pool_t *pool;
@@ -1135,9 +1292,10 @@
switch_core_destroy_memory_pool(&pool);
} else {
+ // skip this frame until leadin time has expired
if (member->fnode->leadin) {
member->fnode->leadin--;
- } else {
+ } else { // send the node frame instead of the conference frame to the call leg
if (member->fnode->type == NODE_TYPE_SPEECH) {
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_BLOCKING;
uint32_t rate = member->conference->rate;
@@ -1176,7 +1334,7 @@
switch_core_timer_next(&timer);
}
}
- } else {
+ } else { // send the conferecne frame to the call leg
switch_buffer_t *use_buffer = NULL;
uint32_t mux_used = (uint32_t)switch_buffer_inuse(member->mux_buffer);
@@ -1355,6 +1513,7 @@
return count;
}
+// stop playing a file for the member of the conference
static uint32_t conference_member_stop_file(conference_member_t *member, file_stop_t stop)
{
confernce_file_node_t *nptr;
@@ -1379,7 +1538,7 @@
return count;
}
-/* Play a file in the conference rooom */
+/* Play a file in the conference room */
static switch_status_t conference_play_file(conference_obj_t *conference, char *file, uint32_t leadin)
{
confernce_file_node_t *fnode, *nptr;
@@ -1445,14 +1604,14 @@
return SWITCH_STATUS_SUCCESS;
}
-/* Play a file in the conference rooom to a member */
+/* Play a file in the conference room to a member */
static switch_status_t conference_member_play_file(conference_member_t *member, char *file, uint32_t leadin)
{
confernce_file_node_t *fnode, *nptr;
switch_memory_pool_t *pool;
if (*file != '/') {
- return conference_member_say(member->conference, member, file, leadin);
+ return conference_member_say(member, file, leadin);
}
/* Setup a memory pool to use. */
@@ -1483,6 +1642,7 @@
fnode->pool = pool;
/* Queue the node */
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "queueing file '%s' for play\n",file);
switch_mutex_lock(member->flag_mutex);
for (nptr = member->fnode; nptr && nptr->next; nptr = nptr->next);
@@ -1496,13 +1656,18 @@
return SWITCH_STATUS_SUCCESS;
}
-/* Say some thing with TTS in the conference rooom */
-static switch_status_t conference_member_say(conference_obj_t *conference, conference_member_t *member, char *text, uint32_t leadin)
+/* Say some thing with TTS in the conference room */
+static switch_status_t conference_member_say(conference_member_t *member, char *text, uint32_t leadin)
{
+ conference_obj_t *conference = (member != NULL ? member->conference : NULL);
confernce_file_node_t *fnode, *nptr;
switch_memory_pool_t *pool;
switch_speech_flag_t flags = SWITCH_SPEECH_FLAG_NONE;
+ if (conference == NULL) {
+ return SWITCH_STATUS_FALSE;
+ }
+
if (!(conference->tts_engine && conference->tts_voice)) {
return SWITCH_STATUS_SUCCESS;
}
@@ -1555,7 +1720,7 @@
return SWITCH_STATUS_SUCCESS;
}
-/* Say some thing with TTS in the conference rooom */
+/* Say some thing with TTS in the conference room */
static switch_status_t conference_say(conference_obj_t *conference, char *text, uint32_t leadin)
{
confernce_file_node_t *fnode, *nptr;
@@ -1623,6 +1788,7 @@
return SWITCH_STATUS_SUCCESS;
}
+// execute a callback for every member of the conference
static void conference_member_itterator(conference_obj_t *conference, switch_stream_handle_t *stream, conf_api_member_cmd_t pfncallback, void *data)
{
conference_member_t *member = NULL;
@@ -1696,7 +1862,7 @@
char msg[512];
snprintf(msg, sizeof(msg), "Muted");
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
if(stream != NULL) {
stream->write_function(stream, "OK mute %u\n", member->id);
@@ -1734,7 +1900,7 @@
char msg[512];
snprintf(msg, sizeof(msg), "Un-Muted");
- conference_member_say(member->conference, member, msg, 0);
+ conference_member_say(member, msg, 0);
}
if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
switch_channel_t *channel = switch_core_session_get_channel(member->session);
@@ -2070,7 +2236,7 @@
}
if (id != 0 && (member = conference_member_get(conference, id))) {
- if (text && conference_member_say(conference, member, text, 0) == SWITCH_STATUS_SUCCESS) {
+ if (text && conference_member_say(member, text, 0) == SWITCH_STATUS_SUCCESS) {
switch_event_t *event;
stream->write_function(stream, "(saymember) OK\n");
@@ -2370,28 +2536,34 @@
return err;
}
+enum {
+ CONF_API_SUB_ARGS_SPLIT,
+ CONF_API_SUB_MEMBER_TARGET,
+ CONF_API_SUB_ARGS_AS_ONE,
+};
+
/* API Interface Function sub-commands */
static api_command_t conf_api_sub_commands[] = {
- {"list", &conf_api_sub_list, 0, "<confname> list [delim <string>]"},
- {"energy", &conf_api_sub_energy, 1, "<confname> energy <member_id|all|last> [<newval>]"},
- {"volume in", &conf_api_sub_volume_in, 1, "<confname> volume_in <member_id|all|last> [<newval>]"},
- {"volume out", &conf_api_sub_volume_out, 1, "<confname> volume_out <member_id|all|last> [<newval>]"},
- {"play", &conf_api_sub_play, 0, "<confname> play <file_path> [<member_id>]"},
- {"say", &conf_api_sub_say, 2, "<confname> say <text>"},
- {"saymember", &conf_api_sub_saymember, 2, "<confname> saymember <member_id><text>"},
- {"stop", &conf_api_sub_stop, 1, "<confname> stop <[current|all|last]> [<member_id>]"},
- {"kick", &conf_api_sub_kick, 1, "<confname> kick <[member_id|all|last]>"},
- {"mute", &conf_api_sub_mute, 1, "<confname> mute <[member_id|all]|last>"},
- {"unmute", &conf_api_sub_unmute, 1, "<confname> unmute <[member_id|all]|last>"},
- {"deaf", &conf_api_sub_deaf, 1, "<confname> deaf <[member_id|all]|last>"},
- {"undeaf", &conf_api_sub_undeaf, 1, "<confname> undef <[member_id|all]|last>"},
- {"relate", &conf_api_sub_relate, 0, "<confname> relate <member_id> <other_member_id> [nospeak|nohear|clear]"},
- {"lock", &conf_api_sub_lock, 0, "<confname> lock"},
- {"unlock", &conf_api_sub_unlock, 0, "<confname> unlock"},
- {"dial", &conf_api_sub_dial, 0, "<confname> dial <endpoint_module_name>/<destination> <callerid number> <callerid name>"},
- {"transfer", &conf_api_sub_transfer, 0, "<confname> transfer <member_id> <conference_name>"},
- {"record", &conf_api_sub_record, 0, "<confname> record <filename>"},
- {"norecord", &conf_api_sub_norecord, 0, "<confname> norecord <[filename|all]>"},
+ {"list", &conf_api_sub_list, CONF_API_SUB_ARGS_SPLIT, "<confname> list [delim <string>]"},
+ {"energy", &conf_api_sub_energy, CONF_API_SUB_MEMBER_TARGET, "<confname> energy <member_id|all|last> [<newval>]"},
+ {"volume in", &conf_api_sub_volume_in, CONF_API_SUB_MEMBER_TARGET, "<confname> volume_in <member_id|all|last> [<newval>]"},
+ {"volume out", &conf_api_sub_volume_out, CONF_API_SUB_MEMBER_TARGET, "<confname> volume_out <member_id|all|last> [<newval>]"},
+ {"play", &conf_api_sub_play, CONF_API_SUB_ARGS_SPLIT, "<confname> play <file_path> [<member_id>]"},
+ {"say", &conf_api_sub_say, CONF_API_SUB_ARGS_AS_ONE, "<confname> say <text>"},
+ {"saymember", &conf_api_sub_saymember, CONF_API_SUB_ARGS_AS_ONE, "<confname> saymember <member_id><text>"},
+ {"stop", &conf_api_sub_stop, CONF_API_SUB_MEMBER_TARGET, "<confname> stop <[current|all|last]> [<member_id>]"},
+ {"kick", &conf_api_sub_kick, CONF_API_SUB_MEMBER_TARGET, "<confname> kick <[member_id|all|last]>"},
+ {"mute", &conf_api_sub_mute, CONF_API_SUB_MEMBER_TARGET, "<confname> mute <[member_id|all]|last>"},
+ {"unmute", &conf_api_sub_unmute, CONF_API_SUB_MEMBER_TARGET, "<confname> unmute <[member_id|all]|last>"},
+ {"deaf", &conf_api_sub_deaf, CONF_API_SUB_MEMBER_TARGET, "<confname> deaf <[member_id|all]|last>"},
+ {"undeaf", &conf_api_sub_undeaf, CONF_API_SUB_MEMBER_TARGET, "<confname> undef <[member_id|all]|last>"},
+ {"relate", &conf_api_sub_relate, CONF_API_SUB_ARGS_SPLIT, "<confname> relate <member_id> <other_member_id> [nospeak|nohear|clear]"},
+ {"lock", &conf_api_sub_lock, CONF_API_SUB_ARGS_SPLIT, "<confname> lock"},
+ {"unlock", &conf_api_sub_unlock, CONF_API_SUB_ARGS_SPLIT, "<confname> unlock"},
+ {"dial", &conf_api_sub_dial, CONF_API_SUB_ARGS_SPLIT, "<confname> dial <endpoint_module_name>/<destination> <callerid number> <callerid name>"},
+ {"transfer", &conf_api_sub_transfer, CONF_API_SUB_ARGS_SPLIT, "<confname> transfer <member_id> <conference_name>"},
+ {"record", &conf_api_sub_record, CONF_API_SUB_ARGS_SPLIT, "<confname> record <filename>"},
+ {"norecord", &conf_api_sub_norecord, CONF_API_SUB_ARGS_SPLIT, "<confname> norecord <[filename|all]>"},
};
#define CONFFUNCAPISIZE (sizeof(conf_api_sub_commands)/sizeof(conf_api_sub_commands[0]))
@@ -2437,7 +2609,9 @@
if (strcasecmp(argv[argn],conf_api_sub_commands[i].pname) == 0) {
found = 1;
switch(conf_api_sub_commands[i].fntype) {
- case 0: // commands that we've broken the command line into arguments for
+
+ // commands that we've broken the command line into arguments for
+ case CONF_API_SUB_ARGS_SPLIT:
{ conf_api_args_cmd_t pfn = (conf_api_args_cmd_t)conf_api_sub_commands[i].pfnapicmd;
if (pfn(conference, stream, argc, &argv[0]) != 0) {
@@ -2446,7 +2620,9 @@
}
}
break;
- case 1: // member specific command that can be itteratted
+
+ // member specific command that can be itteratted
+ case CONF_API_SUB_MEMBER_TARGET:
{
uint32_t id = atoi(argv[argn+1]);
int all = ( id == 0 && strcasecmp(argv[argn+1], "all") == 0 );
@@ -2492,7 +2668,9 @@
}
}
break;
- case 2: // commands that deals with all text after command
+
+ // commands that deals with all text after command
+ case CONF_API_SUB_ARGS_AS_ONE:
{ conf_api_text_cmd_t pfn = (conf_api_text_cmd_t)conf_api_sub_commands[i].pfnapicmd;
char *pstr = lbuf+strlen(conf_api_sub_commands[i].pname)+1;
@@ -2511,6 +2689,7 @@
}
}
}
+
// no command found
if(!found) {
stream->write_function(stream, "Confernece command '%s' not found.\nTry 'help conference'\n", argv[argn]);
@@ -2746,10 +2925,12 @@
conf_name = mydata;
+ // is there a conference pin ?
if ((dpin = strchr(conf_name, '+'))) {
*dpin++ = '\0';
}
+ // is there profile specification ?
if ((profile_name = strchr(conf_name, '@'))) {
*profile_name++ = '\0';
@@ -2789,6 +2970,7 @@
/* Set the minimum number of members (once you go above it you cannot go below it) */
conference->min = 2;
+ // if the dialplan specified a pin, override the profile's value
if (dpin) {
conference->pin = switch_core_strdup(conference->pool, dpin);
}
@@ -2812,6 +2994,7 @@
goto done;
}
+ // if the dialplan specified a pin, override the profile's value
if (dpin) {
conference->pin = switch_core_strdup(conference->pool, dpin);
}
@@ -2826,38 +3009,54 @@
launch_conference_thread(conference);
}
- // deal with conference pins
- if (conference->pin) {
- char term = '\0';
- char pin[80] = "";
- char *buf;
+ // if this is not an outbound call, deal with conference pins
+ if (!switch_channel_test_flag(channel, CF_OUTBOUND) && conference->pin) {
+ char pin_buf[80] = "";
+ int pin_retries = 3; // XXX - this should be configurable - i'm too lazy to do it right now...
+ int pin_valid = 0;
+ switch_status_t status = SWITCH_STATUS_SUCCESS;
/* Answer the channel */
switch_channel_answer(channel);
- if (conference->pin_sound) {
- conference_local_play_file(session, conference->pin_sound, 20, pin, sizeof(pin));
- }
+ while(!pin_valid && pin_retries && status == SWITCH_STATUS_SUCCESS) {
- if (strlen(pin) < strlen(conference->pin)) {
- buf = pin + strlen(pin);
- switch_ivr_collect_digits_count(session,
+ // be friendly
+ if (conference->pin_sound) {
+ conference_local_play_file(session, conference->pin_sound, 20, pin_buf, sizeof(pin_buf));
+ }
+ // wait for them if neccessary
+ if (strlen(pin_buf) < strlen(conference->pin)) {
+ char *buf = pin_buf + strlen(pin_buf);
+ char term = '\0';
+
+ status = switch_ivr_collect_digits_count(session,
buf,
- sizeof(pin) - (unsigned int)strlen(pin),
- (unsigned int)strlen(conference->pin) - (unsigned int)strlen(pin),
+ sizeof(pin_buf) - (unsigned int)strlen(pin_buf),
+ (unsigned int)strlen(conference->pin) - (unsigned int)strlen(pin_buf),
"#", &term, 10000);
- }
+ }
- if (strcmp(pin, conference->pin)) {
- if (conference->bad_pin_sound) {
- conference_local_play_file(session, conference->bad_pin_sound, 20, NULL, 0);
+ pin_valid = (status == SWITCH_STATUS_SUCCESS && strcmp(pin_buf, conference->pin) == 0);
+ if (!pin_valid) {
+ // zero the collected pin
+ memset(pin_buf,0,sizeof(pin_buf));
+
+ // more friendliness
+ if (conference->bad_pin_sound) {
+ conference_local_play_file(session, conference->bad_pin_sound, 20, pin_buf, sizeof(pin_buf));
+ }
}
+ pin_retries --;
+ }
+
+ if (!pin_valid) {
goto done;
}
}
- // don't allow more callers if the conference is locked
- if (switch_test_flag(conference, CFLAG_LOCKED)) {
+ // don't allow more callers if the conference is locked, unless we invited them
+ if (switch_test_flag(conference, CFLAG_LOCKED) && !switch_channel_test_flag(channel, CF_OUTBOUND)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Conference %s is locked.\n", conf_name);
if (conference->locked_sound) {
/* Answer the channel */
@@ -2985,7 +3184,7 @@
switch_core_session_receive_message(session, &msg);
/* Run the confernece loop */
- conference_loop(&member);
+ conference_loop_output(&member);
/* Tell the channel we are no longer going to be in a bridge */
msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
@@ -3069,138 +3268,6 @@
switch_thread_create(&thread, thd_attr, conference_record_thread_run, rec, rec->pool);
}
-static void *SWITCH_THREAD_FUNC input_thread_run(switch_thread_t *thread, void *obj)
-{
- conference_member_t *member = obj;
- switch_channel_t *channel;
- switch_status_t status;
- switch_frame_t *read_frame = NULL;
- switch_codec_t *read_codec;
- uint32_t hangover = 40,
- hangunder = 15,
- hangover_hits = 0,
- hangunder_hits = 0,
- energy_level = 0,
- diff_level = 400;
- uint8_t talking = 0;
-
- assert(member != NULL);
-
- channel = switch_core_session_get_channel(member->session);
- assert(channel != NULL);
-
- read_codec = switch_core_session_get_read_codec(member->session);
- assert(read_codec != NULL);
-
- /* As long as we have a valid read, feed that data into an input buffer where the conference thread will take it
- and mux it with any audio from other channels. */
-
- while(switch_test_flag(member, MFLAG_RUNNING) && switch_channel_ready(channel)) {
- /* Read a frame. */
- status = switch_core_session_read_frame(member->session, &read_frame, -1, 0);
-
- /* end the loop, if appropriate */
- if (!SWITCH_READ_ACCEPTABLE(status) || !switch_test_flag(member, MFLAG_RUNNING)) {
- break;
- }
-
- if (switch_test_flag(read_frame, SFF_CNG)) {
- continue;
- }
-
- energy_level = member->energy_level;
-
- // if the member can speak, compute the audio energy level and
- // generate events when the level crosses the threshold
- if (switch_test_flag(member, MFLAG_CAN_SPEAK) && energy_level) {
- uint32_t energy = 0, i = 0, samples = 0, j = 0, score = 0;
- int16_t *data;
-
- data = read_frame->data;
- samples = read_frame->datalen / sizeof(*data);
-
- for (i = 0; i < samples; i++) {
- energy += abs(data[j]);
- j += read_codec->implementation->number_of_channels;
- }
-
- score = energy / samples;
-
- if (score > energy_level) {
- uint32_t diff = score - energy_level;
- if (hangover_hits) {
- hangover_hits--;
- }
-
- if (diff >= diff_level || ++hangunder_hits >= hangunder) {
- hangover_hits = hangunder_hits = 0;
-
- if (!talking) {
- switch_event_t *event;
- talking = 1;
- if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
- switch_channel_event_set_data(channel, event);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Name", member->conference->name);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "start-talking");
- switch_event_fire(&event);
- }
- }
- }
- } else {
- if (hangunder_hits) {
- hangunder_hits--;
- }
- if (talking) {
- switch_event_t *event;
- if (++hangover_hits >= hangover) {
- hangover_hits = hangunder_hits = 0;
- talking = 0;
-
- if (switch_event_create_subclass(&event, SWITCH_EVENT_CUSTOM, CONF_EVENT_MAINT) == SWITCH_STATUS_SUCCESS) {
- switch_channel_event_set_data(channel, event);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Conference-Name", member->conference->name);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Member-ID", "%u", member->id);
- switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Action", "stop-talking");
- switch_event_fire(&event);
- }
- }
- }
- }
- }
-
- /* skip frames that are not actual media or when we are muted or silent */
- if ((talking || energy_level == 0) && switch_test_flag(member, MFLAG_CAN_SPEAK)) {
- if (member->read_resampler) {
- int16_t *bptr = (int16_t *) read_frame->data;
- int len = (int) read_frame->datalen;;
-
- member->read_resampler->from_len = switch_short_to_float(bptr, member->read_resampler->from, (int) len / 2);
- member->read_resampler->to_len = switch_resample_process(member->read_resampler, member->read_resampler->from,
- member->read_resampler->from_len, member->read_resampler->to,
- member->read_resampler->to_size, 0);
- switch_float_to_short(member->read_resampler->to, read_frame->data, len);
- len = member->read_resampler->to_len * 2;
- read_frame->datalen = len;
- read_frame->samples = len / 2;
- }
- /* Check for input volume adjustments */
- if (member->volume_in_level) {
- switch_change_sln_volume(read_frame->data, read_frame->datalen / 2, member->volume_in_level);
- }
-
- /* Write the audio into the input buffer */
- switch_mutex_lock(member->audio_in_mutex);
- switch_buffer_write(member->audio_buffer, read_frame->data, read_frame->datalen);
- switch_mutex_unlock(member->audio_in_mutex);
- }
- }
-
- switch_clear_flag_locked(member, MFLAG_ITHREAD);
-
- return NULL;
-}
-
static const switch_application_interface_t conference_application_interface = {
/*.interface_name */ global_app_name,
/*.application_function */ conference_function,
@@ -3306,6 +3373,7 @@
/*.chat_interface */ &conference_chat_interface
};
+#ifdef OPTION_IVR_MENU_SUPPORT
static switch_ivr_action_t conference_caller_control_menu_handler(switch_ivr_menu_t *menu, char *param, char *buf, size_t buflen, void *obj)
{
switch_ivr_action_t action = SWITCH_IVR_ACTION_NOOP;
@@ -3353,6 +3421,27 @@
return action;
}
+/*
+static switch_status_t ivr_menu_callback_play_file(char *file, uint32_t leadin, void *member)
+{
+ switch_status_t status;
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ivr_menu_callback_play_file\n");
+ status = conference_member_play_file((conference_member_t *)member, file, leadin);
+ if (status != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ivr_menu_callback_play_file ERROR\n");
+ }
+
+ return status;
+}
+
+static switch_status_t ivr_menu_callback_say(char *file, uint32_t leadin, void *member)
+{
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "ivr_menu_callback_say\n");
+ return conference_member_say((conference_member_t *)member, file, leadin);
+}
+*/
+
static switch_status_t conference_caller_control_menu_build(caller_control_menu_ctx_t **ctx, conference_obj_t *conference, switch_xml_t profile, char *menu_name)
{
switch_status_t status = SWITCH_STATUS_FALSE;
@@ -3382,6 +3471,16 @@
status = switch_ivr_menu_stack_xml_build((*ctx)->xml_ctx, &(*ctx)->menu_stack, xml_menus, xml_menu, conference->timer_name);
if (status != SWITCH_STATUS_SUCCESS)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to build xml menu stack\n");
+
+/*
+ // instruct ivr menu to use our file play and tts routines
+ status = switch_ivr_menu_set_fileplay_callback((*ctx)->menu_stack, &ivr_menu_callback_play_file);
+ if (status != SWITCH_STATUS_SUCCESS)
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to set file play calback\n");
+ status = switch_ivr_menu_set_tts_callback((*ctx)->menu_stack, &ivr_menu_callback_say);
+ if (status != SWITCH_STATUS_SUCCESS)
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to set tts calback\n");
+*/
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to init xml menu context\n");
}
@@ -3400,14 +3499,107 @@
return status;
}
+#endif
+static switch_status_t conference_new_install_caller_controls_default(conference_obj_t *conference)
+{
+ switch_status_t status = SWITCH_STATUS_FALSE;
+
+ if(conference != NULL) {
+ int i;
+ caller_control_action_t *action;
+
+ for(i=0,status=SWITCH_STATUS_SUCCESS; status == SWITCH_STATUS_SUCCESS && i<CCFNTBL_QTY; i++) {
+ if (!switch_strlen_zero(ccfntbl[i].digits)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Installing default caller control action '%s' bound to '%s'.\n",
+ ccfntbl[i].key,
+ ccfntbl[i].digits);
+ action = (caller_control_action_t *)switch_core_alloc(conference->pool,sizeof(caller_control_action_t));
+ if (action != NULL) {
+ action->handler = ccfntbl[i].handler;
+ action->data = NULL;
+ status = switch_ivr_digit_stream_parser_set_event(conference->dtmf_parser,ccfntbl[i].digits,action);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to alloc memory for caller control binding '%s' to '%s'\n",ccfntbl[i].key,ccfntbl[i].digits);
+ status = SWITCH_STATUS_MEMERR;
+ }
+ }
+ }
+ }
+
+ return status;
+}
+
+static switch_status_t conference_new_install_caller_controls_custom(conference_obj_t *conference, switch_xml_t profile, switch_xml_t xml_controls)
+{
+ switch_status_t status = SWITCH_STATUS_FALSE;
+
+ if (conference != NULL && profile != NULL && xml_controls != NULL) {
+ switch_xml_t xml_kvp;
+
+ // parse the controls tree for caller control digit strings
+ for (xml_kvp = switch_xml_child(xml_controls, "control"); xml_kvp; xml_kvp = xml_kvp->next) {
+ char *key = (char *) switch_xml_attr(xml_kvp, "action");
+ char *val = (char *) switch_xml_attr(xml_kvp, "digits");
+ char *data = (char *)switch_xml_attr_soft(xml_kvp, "data");
+
+ if(!switch_strlen_zero(key) && !switch_strlen_zero(val)) {
+ int i;
+
+ // scan through all of the valid actions, and if found,
+ // set the new caller control action digit string, then
+ // stop scanning the table, and go to the next xml kvp.
+ for(i=0,status=SWITCH_STATUS_NOOP; i<CCFNTBL_QTY && status == SWITCH_STATUS_NOOP; i++) {
+
+ if(strcasecmp(ccfntbl[i].key,key) == 0) {
+ status = SWITCH_STATUS_SUCCESS;
+#ifdef OPTION_IVR_MENU_SUPPORT
+ if (ccfntbl[i].action == CALLER_CONTROL_MENU) {
+ caller_control_menu_ctx_t *menu_ctx = NULL;
+
+ status = conference_caller_control_menu_build(&menu_ctx,conference,profile,data);
+ data = (char *)menu_ctx;
+
+ if (status != SWITCH_STATUS_SUCCESS) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to build menu '%s' bound to '%s'\n",data,val);
+ }
+ }
+#endif
+
+ if (status == SWITCH_STATUS_SUCCESS) {
+ caller_control_action_t *action;
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Installing caller control action '%s' bound to '%s'.\n",key,val);
+ action = (caller_control_action_t *)switch_core_alloc(conference->pool,sizeof(caller_control_action_t));
+ if (action != NULL) {
+ action->handler = ccfntbl[i].handler;
+ action->data = (void *)data;
+ status = switch_ivr_digit_stream_parser_set_event(conference->dtmf_parser,val,action);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to alloc memory for caller control binding '%s' to '%s'\n",ccfntbl[i].key,ccfntbl[i].digits);
+ status = SWITCH_STATUS_MEMERR;
+ }
+ }
+ }
+ }
+ if(status == SWITCH_STATUS_NOOP) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid caller control action name '%s'.\n",key);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid caller control config entry pair action='%s' digits='%s'\n",key,val);
+ }
+ }
+ }
+
+ return status;
+}
+
/* create a new conferene with a specific profile */
static conference_obj_t *conference_new(char *name, switch_xml_t profile, switch_memory_pool_t *pool)
{
conference_obj_t *conference;
switch_xml_t xml_kvp;
switch_xml_t xml_controls;
- switch_xml_t xml_menus;
char *controls_set = NULL;
char *rate_name = NULL;
char *interval_name = NULL;
@@ -3620,97 +3812,30 @@
conference->rate = rate;
conference->interval = interval;
+ // caller control configuration chores
xml_controls = switch_xml_child(profile, "controls");
controls_set = (xml_controls != NULL ? (char *) switch_xml_attr_soft(xml_controls, "set") : NULL);
+ // if no controls specified in the config, assume all should be specified
+ if (xml_controls == NULL) {
+ status = conference_new_install_caller_controls_default(conference);
+ } else if (xml_controls != NULL && controls_set != NULL && strcasecmp(controls_set,"none") != 0) {
// try to build caller control if the set has been specified and != "none"
- if (xml_controls != NULL && controls_set != NULL && strcasecmp(controls_set,"none") != 0) {
if(switch_ivr_digit_stream_parser_new(conference->pool,&conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
// map in the default control handler strings if specified
if (strcasecmp(controls_set,"default") == 0) {
- int i;
- caller_control_action_t *action;
-
- for(i=0,status=SWITCH_STATUS_SUCCESS; status == SWITCH_STATUS_SUCCESS && i<CCFNTBL_QTY; i++) {
- if (!switch_strlen_zero(ccfntbl[i].digits)) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Installing default caller control action '%s' bound to '%s'.\n",
- ccfntbl[i].key,
- ccfntbl[i].digits);
- action = (caller_control_action_t *)switch_core_alloc(conference->pool,sizeof(caller_control_action_t));
- if (action != NULL) {
- action->handler = ccfntbl[i].handler;
- action->data = NULL;
- status = switch_ivr_digit_stream_parser_set_event(conference->dtmf_parser,ccfntbl[i].digits,action);
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to alloc memory for caller control binding '%s' to '%s'\n",ccfntbl[i].key,ccfntbl[i].digits);
- status = SWITCH_STATUS_MEMERR;
- }
- }
- }
+ status = conference_new_install_caller_controls_default(conference);
} else if (strcasecmp(controls_set,"custom") == 0) {
- // parse the controls tree for caller control digit strings
- for (xml_kvp = switch_xml_child(xml_controls, "control"); xml_kvp; xml_kvp = xml_kvp->next) {
- char *key = (char *) switch_xml_attr(xml_kvp, "action");
- char *val = (char *) switch_xml_attr(xml_kvp, "digits");
- char *data = (char *)switch_xml_attr_soft(xml_kvp, "data");
-
- if(!switch_strlen_zero(key) && !switch_strlen_zero(val)) {
- int i;
-
- // scan through all of the valid actions, and if found,
- // set the new caller control action digit string, then
- // stop scanning the table, and go to the next xml kvp.
- for(i=0,status=SWITCH_STATUS_NOOP; i<CCFNTBL_QTY && status == SWITCH_STATUS_NOOP; i++) {
-
- if(strcasecmp(ccfntbl[i].key,key) == 0) {
- status = SWITCH_STATUS_SUCCESS;
-
- if (ccfntbl[i].action == CALLER_CONTROL_MENU) {
- caller_control_menu_ctx_t *menu_ctx = NULL;
-
- status = conference_caller_control_menu_build(&menu_ctx,conference,profile,data);
- data = (char *)menu_ctx;
-
- if (status != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to build menu '%s' bound to '%s'\n",data,val);
- }
- }
-
- if (status == SWITCH_STATUS_SUCCESS) {
- caller_control_action_t *action;
-
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Installing caller control action '%s' bound to '%s'.\n",key,val);
- action = (caller_control_action_t *)switch_core_alloc(conference->pool,sizeof(caller_control_action_t));
- if (action != NULL) {
- action->handler = ccfntbl[i].handler;
- action->data = (void *)data;
- status = switch_ivr_digit_stream_parser_set_event(conference->dtmf_parser,val,action);
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to alloc memory for caller control binding '%s' to '%s'\n",ccfntbl[i].key,ccfntbl[i].digits);
- status = SWITCH_STATUS_MEMERR;
- }
- }
- }
- }
- if(status == SWITCH_STATUS_NOOP) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid caller control action name '%s'.\n",key);
- }
- } else {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid caller control config entry pair action='%s' digits='%s'\n",key,val);
- }
- }
+ status = conference_new_install_caller_controls_custom(conference,profile,xml_controls);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unknown caller control set.\n");
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to allocate caller control digit parser.\n");
}
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "no caller controls intalled.\n");
- }
-
- xml_menus = switch_xml_child(profile, "menus");
- if (xml_menus != NULL) {
-// switch_xml_t xml_menu;
}
/* Activate the conference mutex for exclusivity */
1
0
Author: knhor
Date: Sun Dec 3 17:07:21 2006
New Revision: 3520
Modified:
freeswitch/branches/knhor/trunk/src/switch_ivr.c
Log:
switch_ivr_collect_digits_count should not always return SUCCESS if there was a failure to collect digits
switch_ivr_collect_digits_count should not assume that a terminator set was supplied
add digit timeout support to switch_ivr_digit_stream_parser
Modified: freeswitch/branches/knhor/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/branches/knhor/trunk/src/switch_ivr.c (original)
+++ freeswitch/branches/knhor/trunk/src/switch_ivr.c Sun Dec 3 17:07:21 2006
@@ -27,7 +27,7 @@
* Paul D. Tinsley <pdt at jackhammer.org>
* Neal Horman <neal at wanlink dot com>
*
- * switch_ivr_api.c -- IVR Library
+ * switch_ivr.c -- IVR Library
*
*/
#include <switch.h>
@@ -253,18 +253,19 @@
{
uint32_t i = 0, x = (uint32_t) strlen(buf);
switch_channel_t *channel;
- switch_status_t status = SWITCH_STATUS_SUCCESS;
+ switch_status_t status = SWITCH_STATUS_FALSE;
switch_time_t started = 0;
uint32_t elapsed;
channel = switch_core_session_get_channel(session);
- assert(channel != NULL);
+ assert(channel != NULL);
- *terminator = '\0';
+ if (terminator != NULL)
+ *terminator = '\0';
- if (terminators) {
+ if (!switch_strlen_zero(terminators)) {
for (i = 0 ; i < x; i++) {
- if (strchr(terminators, buf[i])) {
+ if (strchr(terminators, buf[i]) && terminator != NULL) {
*terminator = buf[i];
return SWITCH_STATUS_SUCCESS;
}
@@ -293,10 +294,11 @@
if (switch_channel_has_dtmf(channel)) {
char dtmf[128];
+
switch_channel_dequeue_dtmf(channel, dtmf, sizeof(dtmf));
for(i =0 ; i < (uint32_t) strlen(dtmf); i++) {
- if (strchr(terminators, dtmf[i])) {
+ if (!switch_strlen_zero(terminators) && strchr(terminators, dtmf[i]) && terminator != NULL) {
*terminator = dtmf[i];
return SWITCH_STATUS_SUCCESS;
}
@@ -3413,6 +3415,8 @@
return SWITCH_STATUS_SUCCESS;
}
+/******************************************************************************************************/
+
struct switch_ivr_digit_stream_parser {
int pool_auto_created;
switch_memory_pool_t *pool;
@@ -3420,6 +3424,9 @@
char *digits;
char terminator;
switch_size_t maxlen;
+ switch_size_t minlen;
+ unsigned int digit_timeout_ms;
+ switch_time_t last_digit_time;
};
SWITCH_DECLARE(switch_status_t) switch_ivr_digit_stream_parser_new(switch_memory_pool_t *pool, switch_ivr_digit_stream_parser_t **parser)
@@ -3431,6 +3438,7 @@
// if the caller didn't provide a pool, make one
if (pool == NULL) {
switch_core_new_memory_pool(&pool);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "created a memory pool\n");
if (pool != NULL) {
pool_auto_created = 1;
}
@@ -3446,12 +3454,13 @@
memset(*parser,0,sizeof(switch_ivr_digit_stream_parser_t));
(*parser)->pool_auto_created = pool_auto_created;
(*parser)->pool = pool;
+ (*parser)->digit_timeout_ms = 1000;
switch_core_hash_init(&(*parser)->hash,(*parser)->pool);
status = SWITCH_STATUS_SUCCESS;
} else {
status = SWITCH_STATUS_MEMERR;
- // clean up the pool if we created it
+ // if we can't create a parser object,clean up the pool if we created it
if (pool != NULL && pool_auto_created) {
switch_core_destroy_memory_pool(&pool);
}
@@ -3484,11 +3493,29 @@
{ switch_status_t status = SWITCH_STATUS_FALSE;
if (parser != NULL && digits != NULL && *digits && parser->hash != NULL) {
- switch_size_t len;
status = switch_core_hash_insert_dup(parser->hash,digits,data);
- if (status == SWITCH_STATUS_SUCCESS && parser->terminator == '\0' && (len = strlen(digits)) > parser->maxlen) {
- parser->maxlen = len;
+ if (status == SWITCH_STATUS_SUCCESS) {
+ switch_size_t len = strlen(digits);
+
+ // if we don't have a terminator, then we have to try and
+ // figure out when a digit set is completed, therefore we
+ // keep track of the min and max digit lengths
+ if (parser->terminator == '\0') {
+ if (len > parser->maxlen) {
+ parser->maxlen = len;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "max len %u\n",parser->maxlen);
+ }
+ if (parser->minlen == 0 || len < parser->minlen) {
+ parser->minlen = len;
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "min len %u\n",parser->minlen);
+ }
+ } else {
+ // since we have a terminator, reset min and max
+ parser->minlen = 0;
+ parser->maxlen = 0;
+ }
+
}
}
if (status != SWITCH_STATUS_SUCCESS) {
@@ -3515,28 +3542,40 @@
SWITCH_DECLARE(void *) switch_ivr_digit_stream_parser_feed(switch_ivr_digit_stream_parser_t *parser, char digit)
{ void *result = NULL;
- if (parser != NULL && digit != '\0') {
+ if (parser != NULL) {
switch_size_t len = (parser->digits != NULL ? strlen(parser->digits) : 0);
- // if it's not a terminator digit, add it to the collected digits
- if (digit != parser->terminator) {
- // if collected digits length >= the max length of the keys
- // in the hash table, then left shift the digit string
- if ( len > 0 && parser->maxlen != 0 && len >= parser->maxlen) {
- char *src = parser->digits + 1;
- char *dst = parser->digits;
+ // handle new digit arrivals
+ if(digit != '\0') {
- while (*src) {
- *(dst++) = *(src++);
+ // if it's not a terminator digit, add it to the collected digits
+ if (digit != parser->terminator) {
+ // if collected digits length >= the max length of the keys
+ // in the hash table, then left shift the digit string
+ if (len > 0 && parser->maxlen != 0 && len >= parser->maxlen) {
+ char *src = parser->digits + 1;
+ char *dst = parser->digits;
+
+ while (*src) {
+ *(dst++) = *(src++);
+ }
+ *dst = digit;
+ } else {
+ parser->digits = realloc(parser->digits,len+2);
+ *(parser->digits+(len++)) = digit;
+ *(parser->digits+len) = '\0';
+ parser->last_digit_time = switch_time_now() / 1000;
}
- *dst = digit;
- } else {
- parser->digits = realloc(parser->digits,len+2);
- *(parser->digits+(len++)) = digit;
- *(parser->digits+len) = '\0';
}
}
+ // don't allow collected digit string testing if there are varying sized keys until timeout
+ if ( parser->maxlen - parser->minlen > 0
+ && (switch_time_now() / 1000) - parser->last_digit_time < parser->digit_timeout_ms
+ ) {
+ len = 0;
+ }
+
// if we have digits to test
if (len) {
result = switch_core_hash_find(parser->hash,parser->digits);
@@ -3547,7 +3586,7 @@
parser->digits = NULL;
}
}
- }
+}
return result;
}
@@ -3569,6 +3608,8 @@
if (parser != NULL) {
parser->terminator = digit;
+ // since we have a terminator, reset min and max
+ parser->minlen = 0;
parser->maxlen = 0;
status = SWITCH_STATUS_SUCCESS;
}
@@ -3576,6 +3617,8 @@
return status;
}
+/******************************************************************************************************/
+
struct switch_ivr_menu_action;
struct switch_ivr_menu {
@@ -3721,7 +3764,6 @@
return SWITCH_STATUS_SUCCESS;
}
-
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_action(switch_ivr_menu_t *menu, switch_ivr_action_t ivr_action, char *arg, char *bind)
{
switch_ivr_menu_action_t *action;
@@ -3743,7 +3785,6 @@
return SWITCH_STATUS_MEMERR;
}
-
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_function(switch_ivr_menu_t *menu, switch_ivr_menu_action_function_t *function, char *arg, char *bind)
{
switch_ivr_menu_action_t *action;
@@ -3809,9 +3850,9 @@
}
if (need) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "waiting for %u digits\n",need);
menu->ptr += strlen(menu->buf);
if (strlen(menu->buf) < need) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "waiting for %u digits\n",need);
status = switch_ivr_collect_digits_count(session, menu->ptr, menu->inlen - strlen(menu->buf), need, "#", &terminator, menu->timeout);
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "digits '%s'\n",menu->buf);
@@ -3824,7 +3865,7 @@
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_execute(switch_core_session_t *session, switch_ivr_menu_t *stack, char *name, void *obj)
{
int reps = 0, errs = 0, match = 0, running = 1;
- char *greeting_sound = NULL, *aptr;
+ char *greeting_sound = NULL, *aptr = NULL;
char arg[512];
switch_ivr_action_t todo = SWITCH_IVR_ACTION_DIE;
switch_ivr_menu_action_t *ap;
@@ -3851,8 +3892,6 @@
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Executing IVR menu %s\n", menu->name);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "stack timer name '%s'\n",stack->timer_name);
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "menu timer name '%s'\n",menu->timer_name);
for (reps = 0 ; (running && status == SWITCH_STATUS_SUCCESS && errs < menu->max_failures) ; reps++) {
if (!switch_channel_ready(channel)) {
@@ -3870,8 +3909,8 @@
memset(arg, 0, sizeof(arg));
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "want %d digits\n",menu->inlen);
- play_or_say(session, menu, greeting_sound, menu->inlen, stack->timer_name);
+ memset(menu->buf, 0, menu->inlen);
+ status = play_or_say(session, menu, greeting_sound, menu->inlen, stack->timer_name);
if (!switch_strlen_zero(menu->buf)) {
for(ap = menu->actions; ap ; ap = ap->next) {
@@ -3898,9 +3937,7 @@
status = switch_ivr_play_file(session, NULL, aptr, stack->timer_name, NULL, NULL, 0);
break;
case SWITCH_IVR_ACTION_SAYTEXT:
- if (menu->tts_engine && menu->tts_voice) {
- switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, NULL, 0, NULL, aptr, NULL, 0);
- }
+ status = switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, NULL, 0, NULL, aptr, NULL, 0);
break;
case SWITCH_IVR_ACTION_TRANSFER:
switch_ivr_session_transfer(session, aptr, NULL, NULL);
@@ -3960,7 +3997,7 @@
}
}
}
- if (!match) {
+ if (*menu->buf && !match) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "IVR menu '%s' caught invalid input '%s'\n", menu->name, menu->buf);
if (menu->invalid_sound) {
@@ -3975,14 +4012,17 @@
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "exit-sound '%s'\n",menu->exit_sound);
- if (!switch_strlen_zero(menu->exit_sound))
+ if (!switch_strlen_zero(menu->exit_sound)) {
status = switch_ivr_play_file(session, NULL, menu->exit_sound, stack->timer_name, NULL, NULL, 0);
+ }
switch_safe_free(menu->buf);
return status;
}
+/******************************************************************************************************/
+
typedef struct switch_ivr_menu_xml_map {
char *name;
switch_ivr_action_t action;
@@ -4016,8 +4056,7 @@
if (xml_ctx != NULL && name != NULL && xml_ctx->pool != NULL && switch_ivr_menu_stack_xml_find(xml_ctx,name) == NULL) {
switch_ivr_menu_xml_map_t *map = switch_core_alloc(xml_ctx->pool,sizeof(switch_ivr_menu_xml_map_t));
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
- "switch_ivr_menu_stack_xml_add bindng '%s'\n",name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "switch_ivr_menu_stack_xml_add bindng '%s'\n",name);
// and we have memory
if (map != NULL) {
map->name = switch_core_strdup(xml_ctx->pool,name);
@@ -4191,17 +4230,3 @@
return status;
}
-/*
-SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_free(switch_ivr_menu_xml_ctx_t **xml_menu_ctx,
- switch_ivr_menu_t **menu_stack)
-{
- switch_status_t status = SWITCH_STATUS_FALSE;
-
- if (xml_menu_ctx != NULL && *xml_menu_ctx != NULL ) {
- }
-
- status = switch_ivr_menu_stack_free(menu_stack);
-
- return status
-}
-*/
1
0
03 Dec '06
Author: knhor
Date: Sun Dec 3 17:04:19 2006
New Revision: 3519
Modified:
freeswitch/branches/knhor/trunk/src/include/switch_ivr.h
Log:
dox
Modified: freeswitch/branches/knhor/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/branches/knhor/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/branches/knhor/trunk/src/include/switch_ivr.h Sun Dec 3 17:04:19 2006
@@ -566,15 +566,15 @@
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_free(switch_ivr_menu_t *stack);
-
struct switch_ivr_menu_xml_ctx;
typedef struct switch_ivr_menu_xml_ctx switch_ivr_menu_xml_ctx_t;
/*!
*\brief Build a menu stack from an xml source
+ *\param xml_menu_ctx The XML menu parser context previously created by switch_ivr_menu_stack_xml_init
*\param menu_stack The menu stack object that will be created for you
*\param xml_menus The xml Menus source
*\param xml_menu The xml Menu source of the menu to be created
- *\param pool memory pool (NULL to create one)
+ *\param timer_name The name of a timer that should be used - in almost all cases this should be NULL
*\return SWITCH_STATUS_SUCCESS if all is well
*/
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_xml_ctx_t *xml_menu_ctx,
@@ -583,10 +583,21 @@
switch_xml_t xml_menu,
char *timer_name);
+/*!
+ *\param xml_menu_ctx The XML menu parser context previously created by switch_ivr_menu_stack_xml_init
+ *\param name The xml tag name to add to the parser engine
+ *\param function The menu function callback that will be executed when menu digits are bound to this name
+ *\return SWITCH_STATUS_SUCCESS if all is well
+ */
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_add_custom(switch_ivr_menu_xml_ctx_t *xml_menu_ctx,
char *name,
switch_ivr_menu_action_function_t *function);
+/*!
+ *\param xml_menu_ctx A pointer of a XML menu parser context to be created
+ *\param pool memory pool (NULL to create one)
+ *\return SWITCH_STATUS_SUCCESS if all is well
+ */
SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_init(switch_ivr_menu_xml_ctx_t **xml_menu_ctx, switch_memory_pool_t *pool);
/** @} */
1
0
Author: sphere
Date: Sat Dec 2 05:53:26 2006
New Revision: 3517
Added:
freeswitch/branches/javyer/
Log:
Creating empty folder for javyer
1
0
[commit] r3516 - freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr
by Freeswitch SVN 02 Dec '06
by Freeswitch SVN 02 Dec '06
02 Dec '06
Author: mishehu
Date: Sat Dec 2 03:08:12 2006
New Revision: 3516
Modified:
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
Log:
Fixed up mod_cdr so at least it compiles. Am getting a segfault because switch_channel_t::caller_extension seems to be coming back null for some reason even on normal bridged calls.
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp Sat Dec 2 03:08:12 2006
@@ -77,16 +77,17 @@
memset(lastapp,0,80);
memset(lastdata,0,255);
- switch_channel_timetable_t *timetable;
+ // switch_channel_timetable_t *timetable = switch_channel_get_timetable(newchannel->channel->caller_profile);
coresession = newchannel->session;
- timetable = switch_channel_get_timetable(newchannel->channel->caller_profile);
- callstartdate= timetable->created;
- callanswerdate = timetable->answered;
- callenddate = timetable->hungup;
if (newchannel->callerprofile)
{
+ callstartdate= newchannel->callerprofile->times->created;
+ callanswerdate = newchannel->callerprofile->times->answered;
+ calltransferdate = newchannel->callerprofile->times->transferred;
+ callenddate = newchannel->callerprofile->times->hungup;
+
if(newchannel->callerprofile->caller_id_name != 0)
{
strncpy(clid,newchannel->callerprofile->caller_id_name,strlen(newchannel->callerprofile->caller_id_name));
@@ -109,14 +110,14 @@
strncpy(network_addr,newchannel->callerprofile->network_addr,strlen(newchannel->callerprofile->network_addr));
}
- switch_caller_profile_t *originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel->callerprofile);
+ //switch_caller_profile_t *originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel->callerprofile);
// Were we the receiver of the call?
- if(originateprofile)
+ if(newchannel->callerprofile->originator_caller_profile)
{
originated = 0;
- if(newchannel->originateprofile->uuid != 0)
- strncpy(destuuid,originateprofile->uuid,strlen(originateprofile->uuid));
+ if(newchannel->callerprofile->originator_caller_profile->uuid != 0)
+ strncpy(destuuid,newchannel->callerprofile->originator_caller_profile->uuid,strlen(newchannel->callerprofile->originator_caller_profile->uuid));
if(newchannel->callerprofile)
{
if(newchannel->callerprofile->destination_number)
@@ -127,9 +128,9 @@
}
else
{
- originateprofile = switch_channel_get_originatee_profile(newchannel->channel->callerprofile);
+ //originateprofile = switch_channel_get_originatee_profile(newchannel->channel->callerprofile);
// Or were we maybe we were the caller?
- if(originateprofile)
+ if(newchannel->callerprofile->originatee_caller_profile)
{
originated = 1;
if (newchannel->callerprofile) {
@@ -138,8 +139,8 @@
if(newchannel->callerprofile->destination_number != 0)
strncpy(dst,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
}
- if(originateprofile->chan_name != 0)
- strncpy(dstchannel,newchannel->originateprofile->chan_name,strlen(newchannel->originateprofile->chan_name));
+ if(newchannel->callerprofile->originatee_caller_profile->chan_name != 0)
+ strncpy(dstchannel,newchannel->callerprofile->originatee_caller_profile->chan_name,strlen(newchannel->callerprofile->originatee_caller_profile->chan_name));
}
}
@@ -149,7 +150,15 @@
if(switch_channel_test_flag(newchannel->channel,CF_ANSWERED))
{
disposition=1;
- billusec = timetable->hungup - timetable->answered;
+ if(callstartdate)
+ billusec = callenddate - callanswerdate;
+ else
+ billusec = callenddate - calltransferdate;
+ }
+ else if(switch_channel_test_flag(newchannel->channel,CF_TRANSFER))
+ {
+ disposition=1;
+ billusec = callenddate - calltransferdate;
}
else
{
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h Sat Dec 2 03:08:12 2006
@@ -78,6 +78,7 @@
switch_time_t callstartdate;
switch_time_t callanswerdate;
switch_time_t callenddate;
+ switch_time_t calltransferdate;
switch_call_cause_t hangupcause;
char *hangupcause_text;
char clid[80];
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp Sat Dec 2 03:08:12 2006
@@ -45,6 +45,8 @@
static switch_memory_pool_t *module_pool;
static switch_status_t my_on_hangup(switch_core_session_t *session);
static switch_status_t modcdr_reload(char *dest, switch_core_session_t *isession, switch_stream_handle_t *stream);
+static switch_status_t modcdr_queue_pause(char *dest, switch_core_session_t *isession, switch_stream_handle_t *stream);
+static switch_status_t modcdr_queue_resume(char *dest, switch_core_session_t *isession, switch_stream_handle_t *stream);
static switch_thread_rwlock_t *cdr_rwlock;
/* Now begins the glue that will tie this into the system.
@@ -59,28 +61,28 @@
/*.on_transmit */ NULL
};
-static switch_api_interface_t modcdr_reload_interface = {
- /*.interface_name */ "modcdr_reload",
- /*.desc */ "Reload mod_cdr's configuration",
- /*.function */ modcdr_reload,
- /*.syntax */ "modcdr_reload",
- /*.next */ &modcdr_queue_pause
+static switch_api_interface_t modcdr_queue_resume_api = {
+ /*.interface_name */ "modcdr_queue_resume",
+ /*.desc */ "Manually resumes the popping of objects from the queue.",
+ /*.function */ modcdr_queue_resume,
+ /*.syntax */ "modcdr_queue_resume",
+ /*.next */ 0
};
-static switch_api_interface_t modcdr_queue_pause = {
+static switch_api_interface_t modcdr_queue_pause_api = {
/*.interface_name */ "modcdr_queue_pause",
/*.desc */ "Manually pauses the popping of objects from the queue. (DANGER: Can suck your memory away rather quickly.)",
/*.function */ modcdr_queue_pause,
/*.syntax */ "modcdr_queue_pause",
- /*.next */ &modcdr_queue_resume
+ /*.next */ &modcdr_queue_resume_api
};
-static switch_api_interface_t modcdr_queue_resume = {
- /*.interface_name */ "modcdr_queue_pause",
- /*.desc */ "Manually resumes the popping of objects from the queue.",
- /*.function */ modcdr_queue_resume,
- /*.syntax */ "modcdr_queue_resume",
- /*.next */ 0
+static switch_api_interface_t modcdr_reload_interface_api = {
+ /*.interface_name */ "modcdr_reload",
+ /*.desc */ "Reload mod_cdr's configuration",
+ /*.function */ modcdr_reload,
+ /*.syntax */ "modcdr_reload",
+ /*.next */ &modcdr_queue_pause_api
};
static const switch_loadable_module_interface_t cdr_module_interface = {
@@ -90,7 +92,7 @@
/*.dialplan_interface */ NULL,
/*.codec_interface */ NULL,
/*.application_interface */ NULL,
- /* api_interface */ &modcdr_reload_interface
+ /* api_interface */ &modcdr_reload_interface_api
};
static switch_status_t my_on_hangup(switch_core_session_t *session)
1
0
Author: sphere
Date: Fri Dec 1 17:17:38 2006
New Revision: 3512
Added:
freeswitch/branches/rbays/
Log:
Creating empty folder for rbays
1
0
[commit] r3509 - freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr
by Freeswitch SVN 01 Dec '06
by Freeswitch SVN 01 Dec '06
01 Dec '06
Author: mishehu
Date: Fri Dec 1 13:46:41 2006
New Revision: 3509
Modified:
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/README
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.h
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
Log:
Fixed mod_cdr for changes to switch_channel_t effected by anthm today. Also added in the ability to manually pause and unpause the popping of BaseCDR objects from the queue.
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/README
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/README (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/README Fri Dec 1 13:46:41 2006
@@ -85,9 +85,14 @@
Q: What would an example configuration look like?
A: Here is an excerpt from the freeswitch XML configuration file:
+Q: What about one-legged calls, such as calls to voicemail or playback?
+A: With the current changes in place (as of 2006-12-01), the value of originated will always be set to 0, but destuuid will always be blank. This will provide you with a method to bill for specific applications and/or calls if you so desire.
+
Q: What happened to the ani2 field?
A: Oops, you caught us. The real name for is it aniii. You will need to update any database schemas or external handlers for this change.
+Example configuration:
+
<configuration name="mod_cdr.conf" description="CDR Configuration">
<pddcdr>
<param name="path" value="/work/temp/pddcdr"/>
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.cpp Fri Dec 1 13:46:41 2006
@@ -76,13 +76,17 @@
memset(aniii,0,80);
memset(lastapp,0,80);
memset(lastdata,0,255);
-
+
+ switch_channel_timetable_t *timetable;
+
coresession = newchannel->session;
- callstartdate= newchannel->timetable->created;
- callanswerdate = newchannel->timetable->answered;
- callenddate = newchannel->timetable->hungup;
+ timetable = switch_channel_get_timetable(newchannel->channel->caller_profile);
+ callstartdate= timetable->created;
+ callanswerdate = timetable->answered;
+ callenddate = timetable->hungup;
- if (newchannel->callerprofile) {
+ if (newchannel->callerprofile)
+ {
if(newchannel->callerprofile->caller_id_name != 0)
{
strncpy(clid,newchannel->callerprofile->caller_id_name,strlen(newchannel->callerprofile->caller_id_name));
@@ -104,34 +108,39 @@
if(newchannel->callerprofile->network_addr != 0)
strncpy(network_addr,newchannel->callerprofile->network_addr,strlen(newchannel->callerprofile->network_addr));
}
-
- originated = newchannel->originate;
-
- if(newchannel->originateprofile && newchannel->originateprofile->uuid != 0)
- strncpy(destuuid,newchannel->originateprofile->uuid,strlen(newchannel->originateprofile->uuid));
-
- // We still need to check if this is originated or not
- if(originated == 0)
+
+ switch_caller_profile_t *originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel->callerprofile);
+
+ // Were we the receiver of the call?
+ if(originateprofile)
{
- if (newchannel->callerprofile) {
- if(newchannel->callerprofile->destination_number != 0)
+ originated = 0;
+ if(newchannel->originateprofile->uuid != 0)
+ strncpy(destuuid,originateprofile->uuid,strlen(originateprofile->uuid));
+ if(newchannel->callerprofile)
+ {
+ if(newchannel->callerprofile->destination_number)
strncpy(src,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
if(newchannel->callerprofile->caller_id_number != 0)
strncpy(dst,newchannel->callerprofile->caller_id_number,strlen(newchannel->callerprofile->caller_id_number));
}
- if(newchannel->originateprofile && newchannel->originateprofile->chan_name != 0)
- strncpy(dstchannel,newchannel->originateprofile->chan_name,strlen(newchannel->originateprofile->chan_name));
}
else
{
- if (newchannel->callerprofile) {
- if(newchannel->callerprofile->caller_id_number != 0)
- strncpy(src,newchannel->callerprofile->caller_id_number,strlen(newchannel->callerprofile->caller_id_number));
- if(newchannel->callerprofile->destination_number != 0)
- strncpy(dst,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
+ originateprofile = switch_channel_get_originatee_profile(newchannel->channel->callerprofile);
+ // Or were we maybe we were the caller?
+ if(originateprofile)
+ {
+ originated = 1;
+ if (newchannel->callerprofile) {
+ if(newchannel->callerprofile->caller_id_number != 0)
+ strncpy(src,newchannel->callerprofile->caller_id_number,strlen(newchannel->callerprofile->caller_id_number));
+ if(newchannel->callerprofile->destination_number != 0)
+ strncpy(dst,newchannel->callerprofile->destination_number,strlen(newchannel->callerprofile->destination_number));
+ }
+ if(originateprofile->chan_name != 0)
+ strncpy(dstchannel,newchannel->originateprofile->chan_name,strlen(newchannel->originateprofile->chan_name));
}
- if(newchannel->originateprofile && newchannel->originateprofile->chan_name != 0)
- strncpy(dstchannel,newchannel->originateprofile->chan_name,strlen(newchannel->originateprofile->chan_name));
}
strncpy(myuuid,newchannel->callerprofile->uuid,strlen(newchannel->callerprofile->uuid));
@@ -140,7 +149,7 @@
if(switch_channel_test_flag(newchannel->channel,CF_ANSWERED))
{
disposition=1;
- billusec = newchannel->timetable->hungup - newchannel->timetable->answered;
+ billusec = timetable->hungup - timetable->answered;
}
else
{
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/basecdr.h Fri Dec 1 13:46:41 2006
@@ -50,11 +50,11 @@
{
switch_core_session_t *session;
switch_channel_t *channel;
- switch_channel_timetable_t *timetable;
+ //switch_channel_timetable_t *timetable;
switch_caller_extension_t *callerextension;
switch_caller_profile_t *callerprofile;
- switch_caller_profile_t *originateprofile;
- bool originate;
+ //switch_caller_profile_t *originateprofile;
+ //bool originate;
};
enum switch_mod_cdr_sql_types_t { CDR_INTEGER,CDR_STRING,CDR_DECIMAL,CDR_DOUBLE,CDR_TINY };
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp Fri Dec 1 13:46:41 2006
@@ -45,6 +45,8 @@
// Create the APR threadsafe queue, though I don't know if this is the current memory pool.
switch_queue_create(&cdrqueue,5224288, module_pool);
+ queue_paused = 0;
+
strcpy(configfile,"mod_cdr.conf");
switch_mod_cdr_newchannel_t *newchannel; // = new switch_mod_cdr_newchannel_t;
@@ -90,8 +92,14 @@
switch_console_printf(SWITCH_CHANNEL_LOG,"mod_cdr shutdown gracefully.");
}
-void CDRContainer::reload()
+void CDRContainer::reload(switch_stream_handle_t *stream)
{
+ // The queue can't be paused otherwise it will never be able to reload safely.
+ if(queue_paused)
+ {
+ stream->write_function(stream,"The queue is currently paused, resuming it.\n");
+ queue_resume(stream);
+ }
// Something tells me I still need to figure out what to do if there are items still in queue after reload that are no longer active in the configuration.
switch_queue_isempty(cdrqueue); // Waits for the queue to be empty
@@ -138,6 +146,31 @@
switch_console_printf(SWITCH_CHANNEL_LOG,"mod_cdr configuration reloaded.");
}
+void CDRContainer::queue_pause(switch_stream_handle_t *stream)
+{
+ if(queue_paused)
+ stream->write_function(stream,"Queue is already paused.\n");
+ else
+ {
+ queue_paused = 1;
+ switch_queue_blockpop(cdrqueue);
+ stream->write_function(stream,"CDR queue is now paused. Beware that this can waste resources the longer you keep it paused.\n");
+ }
+}
+
+void CDRContainer::queue_resume(switch_stream_handle_t *stream)
+{
+ if(!queue_paused)
+ stream->write_function(stream,"Queue is currently running, no need to resume it.\n");
+ else
+ {
+ queue_paused = 0;
+ switch_queue_unblockpop(cdrqueue);
+ stream->write_function(stream,"CDR queue has now resumed processing CDR records.\n");
+ }
+
+}
+
void CDRContainer::add_cdr(switch_core_session_t *session)
{
switch_mod_cdr_newchannel_t *newchannel = new switch_mod_cdr_newchannel_t;
@@ -146,60 +179,31 @@
newchannel->channel = switch_core_session_get_channel(session);
assert(newchannel->channel != 0);
+ // Need to fix this up a bit so that it reflects a change to switch_caller_profile_t
+ // switch_channel_t will contain caller_profile, and caller_profile will contain
+ // the originator and originatee profile
newchannel->session = session;
- newchannel->timetable = switch_channel_get_timetable(newchannel->channel);
+ //newchannel->timetable = switch_channel_get_timetable(newchannel->channel);
newchannel->callerextension = switch_channel_get_caller_extension(newchannel->channel);
newchannel->callerprofile = switch_channel_get_caller_profile(newchannel->channel);
- newchannel->originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel);
+ //newchannel->originateprofile = switch_channel_get_originator_caller_profile(newchannel->channel);
BaseRegistry& registry(BaseRegistry::get());
for(BaseRegistry::iterator it = registry.active_begin(); it != registry.active_end(); ++it)
{
- /*
- First time it might be originator profile, or originatee. Second and
- after is always going to be originatee profile.
- */
-
basecdr_creator func = *it;
- if(newchannel->originateprofile != 0 )
+ do
{
BaseCDR* newloggerobject = func(newchannel);
switch_console_printf(SWITCH_CHANNEL_LOG,"Adding a new logger object to the queue.\n");
switch_queue_push(cdrqueue,newloggerobject);
-
- if(newchannel->timetable->next != 0)
- {
- newchannel->originateprofile = switch_channel_get_originatee_caller_profile(newchannel->channel);
- newchannel->originate = 1;
- }
- }
- else
- {
- newchannel->originateprofile = switch_channel_get_originatee_caller_profile(newchannel->channel);
- if(newchannel->originateprofile != 0)
- {
- newchannel->originate = 1;
-
- BaseCDR* newloggerobject = func(newchannel);
- switch_console_printf(SWITCH_CHANNEL_LOG,"Adding a new logger object to the queue.\n");
- switch_queue_push(cdrqueue,newloggerobject);
- }
- }
-
- while (newchannel->timetable->next != 0 && newchannel->callerextension->next != 0 && newchannel->callerprofile->next != 0 && newchannel->originateprofile->next != 0 )
- {
- newchannel->timetable = newchannel->timetable->next;
newchannel->callerprofile = newchannel->callerprofile->next;
newchannel->callerextension = newchannel->callerextension->next;
- newchannel->originateprofile = newchannel->originateprofile->next;
-
- BaseCDR* newloggerobject = func(newchannel);
- switch_console_printf(SWITCH_CHANNEL_LOG,"Adding a new logger object to the queue.\n");
- switch_queue_push(cdrqueue,newloggerobject);
- }
+ } while (newchannel->callerprofile && newchannel->callerextension);
+
}
-
+
delete newchannel;
}
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.h
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.h (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.h Fri Dec 1 13:46:41 2006
@@ -58,13 +58,16 @@
~CDRContainer();
void add_cdr(switch_core_session_t *session);
void process_records();
- void reload();
+ void reload(switch_stream_handle_t *stream);
+ void queue_pause(switch_stream_handle_t *stream);
+ void queue_resume(switch_stream_handle_t *stream);
protected:
private:
switch_xml_t cfg, xml, settings, param;
switch_queue_t *cdrqueue;
std::string tempfilepath;
char configfile[13];
+ bool queue_paused;
};
#ifdef __cplusplus
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/mod_cdr.cpp Fri Dec 1 13:46:41 2006
@@ -64,6 +64,22 @@
/*.desc */ "Reload mod_cdr's configuration",
/*.function */ modcdr_reload,
/*.syntax */ "modcdr_reload",
+ /*.next */ &modcdr_queue_pause
+};
+
+static switch_api_interface_t modcdr_queue_pause = {
+ /*.interface_name */ "modcdr_queue_pause",
+ /*.desc */ "Manually pauses the popping of objects from the queue. (DANGER: Can suck your memory away rather quickly.)",
+ /*.function */ modcdr_queue_pause,
+ /*.syntax */ "modcdr_queue_pause",
+ /*.next */ &modcdr_queue_resume
+};
+
+static switch_api_interface_t modcdr_queue_resume = {
+ /*.interface_name */ "modcdr_queue_pause",
+ /*.desc */ "Manually resumes the popping of objects from the queue.",
+ /*.function */ modcdr_queue_resume,
+ /*.syntax */ "modcdr_queue_resume",
/*.next */ 0
};
@@ -117,9 +133,21 @@
static switch_status_t modcdr_reload(char *dest=0, switch_core_session_t *isession=0, switch_stream_handle_t *stream=0)
{
switch_thread_rwlock_wrlock(cdr_rwlock);
- newcdrcontainer->reload();
+ newcdrcontainer->reload(stream);
switch_thread_rwlock_unlock(cdr_rwlock);
stream->write_function(stream, "XML Reloaded and mod_cdr reloaded.\n");
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static switch_status_t modcdr_queue_pause(char *dest=0, switch_core_session_t *isession=0, switch_stream_handle_t *stream=0)
+{
+ newcdrcontainer->queue_pause(stream);
+ return SWITCH_STATUS_SUCCESS;
+}
+
+static switch_status_t modcdr_queue_resume(char *dest=0, switch_core_session_t *isession=0, switch_stream_handle_t *stream=0)
+{
+ newcdrcontainer->queue_resume(stream);
return SWITCH_STATUS_SUCCESS;
}
1
0
Author: sphere
Date: Fri Dec 1 00:20:28 2006
New Revision: 3502
Added:
freeswitch/branches/pgupta35/
Log:
Creating empty folder for pgupta35
1
0