Freeswitch-svn
Threads by month
- ----- 2026 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
December 2006
- 10 participants
- 350 discussions
[commit] r3530 - 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: mikej
Date: Mon Dec 4 02:24:45 2006
New Revision: 3530
Modified:
freeswitch/branches/knhor/trunk/src/mod/applications/mod_conference/mod_conference.c
Log:
// => /* */
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 Mon Dec 4 02:24:45 2006
@@ -51,8 +51,8 @@
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif
-// this doesn't work correctly yet, don't bother trying!
-//#define OPTION_IVR_MENU_SUPPORT
+/* this doesn't work correctly yet, don't bother trying! */
+//#define OPTION_IVR_MENU_SUPPORT */
typedef enum {
FILE_STOP_CURRENT,
@@ -88,7 +88,7 @@
CALLER_CONTROL_DIAL,
} caller_control_t;
-// forward declaration for conference_obj and caller_control
+/* forward declaration for conference_obj and caller_control */
struct conference_member;
typedef struct conference_member conference_member_t;
@@ -233,7 +233,7 @@
switch_memory_pool_t *pool;
} conference_record_t;
-// API command parser
+/* API command parser */
typedef struct api_command {
char *pname;
void *pfnapicmd;
@@ -341,12 +341,13 @@
return rel;
}
-// traverse the conference member list for the specified member id and return it's pointer
+/* traverse the conference member list for the specified member id and return it's pointer */
static conference_member_t *conference_member_get(conference_obj_t *conference, uint32_t id)
{
conference_member_t *member = NULL;
for(member = conference->members; member; member = member->next) {
+
if (switch_test_flag(member, MFLAG_NOCHANNEL)) {
continue;
}
@@ -359,7 +360,7 @@
return member;
}
-// stop the specified recording
+/* stop the specified recording */
static int conference_record_stop(conference_obj_t *conference, char *path)
{
conference_member_t *member = NULL;
@@ -433,6 +434,7 @@
member->energy_level = conference->energy_level;
conference->members = member;
+
if (!switch_test_flag(member, MFLAG_NOCHANNEL)) {
conference->count++;
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
@@ -444,6 +446,7 @@
switch_event_fire(&event);
}
+
if (conference->enter_sound) {
conference_play_file(conference, conference->enter_sound, CONF_DEFAULT_LEADIN);
}
@@ -499,6 +502,7 @@
last = imember;
}
+
member->conference = NULL;
if (!switch_test_flag(member, MFLAG_NOCHANNEL)) {
@@ -539,7 +543,10 @@
switch_mutex_unlock(member->audio_in_mutex);
switch_mutex_unlock(conference->member_mutex);
switch_mutex_unlock(conference->mutex);
+
+
switch_thread_rwlock_unlock(conference->rwlock);
+
}
/* Main monitor thread (1 per distinct conference room) */
@@ -750,12 +757,12 @@
if (!switch_test_flag(imember, MFLAG_NOCHANNEL)) {
channel = switch_core_session_get_channel(imember->session);
- // add this little bit to preserve the bridge cause code in case of an early media call that
- // never answers
+ /* add this little bit to preserve the bridge cause code in case of an early media call that */
+ /* never answers */
if (switch_test_flag(conference, CFLAG_ANSWERED)) {
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
} else {
- // put actual cause code from outbound channel hangup here
+ /* put actual cause code from outbound channel hangup here */
switch_channel_hangup(channel, conference->bridge_hangup_cause);
}
}
@@ -778,7 +785,7 @@
// 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);
+ // switch_ivr_digit_stream_parser_destroy(&conference->dtmf_parser);
if (conference->pool) {
switch_memory_pool_t *pool = conference->pool;
@@ -986,7 +993,7 @@
}
}
-// marshall frames from the call leg to the conference thread for muxing to other call legs
+/* 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;
@@ -1028,8 +1035,8 @@
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 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;
@@ -1119,7 +1126,7 @@
return NULL;
}
-// launch an input thread for the call leg
+/* 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;
@@ -1152,8 +1159,8 @@
};
#define CCFNTBL_QTY (sizeof(ccfntbl)/sizeof(ccfntbl[0]))
-// 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
+/* 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_channel_t *channel;
@@ -1189,11 +1196,11 @@
switch_channel_answer(channel);
}
- // Start the input thread
+ /* 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!
+ /* 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};
@@ -1224,6 +1231,7 @@
}
if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
+ /* test to see if outbound channel has answered */
if (switch_channel_test_flag(channel, CF_ANSWERED) && !switch_test_flag(member->conference, CFLAG_ANSWERED)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Outbound conference channel answered, setting CFLAG_ANSWERED");
switch_set_flag(member->conference, CFLAG_ANSWERED);
@@ -1235,7 +1243,7 @@
}
}
- // if we have caller digits, feed them to the parser to find an action
+ /* 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));
@@ -1245,12 +1253,12 @@
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
+ /* 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');
}
- // if a caller action has been detected, handle it
+ /* if a caller action has been detected, handle it */
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);
@@ -1267,13 +1275,13 @@
);
caller_action->fndesc->handler(member,caller_action->data);
- // set up for next pass
+ /* set up for next pass */
caller_action = NULL;
}
- // handle file and TTS frames
+ /* handle file and TTS frames */
if (member->fnode) {
- // if we are done, clean it up
+ /* if we are done, clean it up */
if (member->fnode->done) {
confernce_file_node_t *fnode;
switch_memory_pool_t *pool;
@@ -1295,10 +1303,10 @@
switch_core_destroy_memory_pool(&pool);
} else {
- // skip this frame until leadin time has expired
+ /* skip this frame until leadin time has expired */
if (member->fnode->leadin) {
member->fnode->leadin--;
- } else { // send the node frame instead of the conference frame to the call leg
+ } 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;
@@ -1337,7 +1345,7 @@
switch_core_timer_next(&timer);
}
}
- } else { // send the conferecne frame to the call leg
+ } 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);
@@ -1373,7 +1381,7 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel leaving conference, cause: %s\n",
switch_channel_cause2str(switch_channel_get_cause(channel)));
- // if it's an outbound channel, store the release cause in the conference struct, we might need it
+ /* if it's an outbound channel, store the release cause in the conference struct, we might need it */
if (switch_channel_test_flag(channel, CF_OUTBOUND)) {
member->conference->bridge_hangup_cause = switch_channel_get_cause(channel);
}
@@ -1516,7 +1524,7 @@
return count;
}
-// stop playing a file for the member of the conference
+/* 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;
@@ -1791,7 +1799,7 @@
return SWITCH_STATUS_SUCCESS;
}
-// execute a callback for every member of the conference
+/* 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;
@@ -2436,12 +2444,12 @@
channel = switch_core_session_get_channel(member->session);
- // build a new conference if it doesn't exist
+ /* build a new conference if it doesn't exist */
if (!(new_conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, argv[3]))) {
switch_memory_pool_t *pool;
char *conf_name;
- // Setup a memory pool to use.
+ /* Setup a memory pool to use. */
if (switch_core_new_memory_pool(&pool) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Pool Failure\n");
goto done;
@@ -2452,7 +2460,7 @@
if ((profile_name = strchr(conf_name, '@'))) {
*profile_name++ = '\0';
- // Open the config from the xml registry
+ /* Open the config from the xml registry */
if (!(cxml = switch_xml_open_cfg(global_cf_name, &cfg, NULL))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", global_cf_name);
goto done;
@@ -2463,13 +2471,13 @@
}
}
- // Release the config registry handle
+ /* Release the config registry handle */
if (cxml) {
switch_xml_free(cxml);
cxml = NULL;
}
- // Create the conference object.
+ /* Create the conference object. */
new_conference = conference_new(conf_name, profile, pool);
if (!new_conference) {
@@ -2477,23 +2485,23 @@
goto done;
}
- // Set the minimum number of members (once you go above it you cannot go below it)
+ /* Set the minimum number of members (once you go above it you cannot go below it) */
new_conference->min = 1;
- // Indicate the conference is dynamic
+ /* Indicate the conference is dynamic */
switch_set_flag_locked(new_conference, CFLAG_DYNAMIC);
- // Start the conference thread for this conference
+ /* Start the conference thread for this conference */
launch_conference_thread(new_conference);
}
- // move the member from the old conference to the new one
+ /* move the member from the old conference to the new one */
conference_del_member(member->last_conference, member);
conference_add_member(new_conference, member);
stream->write_function(stream, "OK Member %u sent to conference %s.\n", id, argv[3]);
- // tell them what happened
+ /* tell them what happened */
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, "Member-ID", "%u", member->id);
@@ -2598,7 +2606,7 @@
memset(argv,0,sizeof(argv));
argc = switch_separate_string(lbuf, ' ', argv, (sizeof(argv) / sizeof(argv[0])));
- // try to find a command to execute
+ /* try to find a command to execute */
if (argc) {
int i,found=0;
uint32_t cnum = atoi(argv[0]);
@@ -2607,24 +2615,24 @@
if(cnum == 0 || (cnum != 0 && conference != NULL && argc >= 3)) {
int argn = (cnum != 0 ? 1 : 0);
- // loop through the command table to find a match
+ /* loop through the command table to find a match */
for (i=0; i<CONFFUNCAPISIZE && !found; i++) {
if (strcasecmp(argv[argn],conf_api_sub_commands[i].pname) == 0) {
found = 1;
switch(conf_api_sub_commands[i].fntype) {
- // 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) {
- // command returned error, so show syntax usage
+ /* command returned error, so show syntax usage */
stream->write_function(stream,conf_api_sub_commands[i].psyntax);
}
}
break;
- // 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]);
@@ -2639,7 +2647,7 @@
switch_mutex_lock(conference->member_mutex);
- // find last (oldest) member
+ /* find last (oldest) member */
member = conference->members;
while (member != NULL) {
if (last_member == NULL || member->id > last_member->id) {
@@ -2648,7 +2656,7 @@
member = member->next;
}
- // exec functio on last (oldest) member
+ /* exec functio on last (oldest) member */
if (last_member != NULL) {
conf_api_member_cmd_t pfn = (conf_api_member_cmd_t)conf_api_sub_commands[i].pfnapicmd;
pfn(last_member, stream, argv[argn+2]);
@@ -2672,19 +2680,19 @@
}
break;
- // 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;
- // advance past all leading white space after command
+ /* advance past all leading white space after command */
while(*pstr == ' ' || *pstr == '\t') {
pstr++;
}
- // call the command handler
+ /* call the command handler */
if (pfn(conference, stream, pstr) != 0) {
- // command returned error, so show syntax usage
+ /* command returned error, so show syntax usage */
stream->write_function(stream,conf_api_sub_commands[i].psyntax);
}
}
@@ -2693,7 +2701,7 @@
}
}
- // no command found
+ /* no command found */
if(!found) {
stream->write_function(stream, "Confernece command '%s' not found.\nTry 'help conference'\n", argv[argn]);
}
@@ -2715,9 +2723,10 @@
}
return status;
+
}
-// outbound call bridge progress call state callback handler
+/* outbound call bridge progress call state callback handler */
static switch_status_t audio_bridge_on_ring(switch_core_session_t *session)
{
switch_channel_t *channel = NULL;
@@ -2729,7 +2738,6 @@
/* put the channel in a passive state so we can loop audio to it */
switch_channel_set_state(channel, CS_TRANSMIT);
-
return SWITCH_STATUS_FALSE;
}
@@ -2743,7 +2751,7 @@
/*.on_hold */ NULL,
};
-// generate an outbound call from the conference
+/* generate an outbound call from the conference */
static switch_status_t conference_outcall(conference_obj_t *conference,
switch_core_session_t *session,
char *bridgeto,
@@ -2770,7 +2778,7 @@
}
- // establish an outbound call leg
+ /* establish an outbound call leg */
if (switch_ivr_originate(session,
&peer_session,
&cause,
@@ -2788,10 +2796,11 @@
goto done;
}
+
peer_channel = switch_core_session_get_channel(peer_session);
assert(peer_channel != NULL);
- // make sure the conference still exists
+ /* make sure the conference still exists */
if (!switch_test_flag(conference, CFLAG_RUNNING)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Conference is gone now, nevermind..\n");
if (caller_channel) {
@@ -2805,17 +2814,16 @@
switch_channel_answer(caller_channel);
}
- // if the outbound call leg is ready
+ /* if the outbound call leg is ready */
if (switch_channel_test_flag(peer_channel, CF_ANSWERED) || switch_channel_test_flag(peer_channel, CF_EARLY_MEDIA)) {
switch_caller_extension_t *extension = NULL;
- // build an extension name object
+ /* build an extension name object */
if ((extension = switch_caller_extension_new(peer_session, conference->name, conference->name)) == 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "memory error!\n");
status = SWITCH_STATUS_MEMERR;
goto done;
}
-
/* add them to the conference */
if (flags) {
snprintf(appdata, sizeof(appdata), "%s +flags{%s}", conference->name, flags);
@@ -2826,6 +2834,7 @@
switch_channel_set_caller_extension(peer_channel, extension);
switch_channel_set_state(peer_channel, CS_EXECUTE);
+
} else {
switch_channel_hangup(peer_channel, SWITCH_CAUSE_NO_ANSWER);
status = SWITCH_STATUS_FALSE;
@@ -2843,7 +2852,7 @@
uint32_t x = 0;
switch_status_t status = SWITCH_STATUS_SUCCESS;
- // generate some space infront of the file to be played
+ /* generate some space infront of the file to be played */
for (x = 0; x < leadin; x++) {
switch_frame_t *read_frame;
switch_status_t status = switch_core_session_read_frame(session, &read_frame, 1000, 0);
@@ -2853,7 +2862,7 @@
}
}
- // if all is well, really play the file
+ /* if all is well, really play the file */
if (status == SWITCH_STATUS_SUCCESS) {
status = switch_ivr_play_file(session, NULL, path, NULL, NULL, NULL, 0);
}
@@ -2897,7 +2906,7 @@
return;
}
- // Start the conference muted or deaf ?
+ /* Start the conference muted or deaf ? */
if ((flags_str=strstr(mydata, flags_prefix))) {
char *p;
@@ -2914,7 +2923,7 @@
}
}
- // is this a bridging conference ?
+ /* is this a bridging conference ? */
if (!strncasecmp(mydata, bridge_prefix, strlen(bridge_prefix))) {
isbr = 1;
mydata += strlen(bridge_prefix);
@@ -2928,12 +2937,12 @@
conf_name = mydata;
- // is there a conference pin ?
+ /* is there a conference pin ? */
if ((dpin = strchr(conf_name, '+'))) {
*dpin++ = '\0';
}
- // is there profile specification ?
+ /* is there profile specification ? */
if ((profile_name = strchr(conf_name, '@'))) {
*profile_name++ = '\0';
@@ -2948,8 +2957,8 @@
}
}
- // if this is a bridging call, and it's not a duplicate, build a
- // conference object, and skip pin handling, and locked checking
+ /* if this is a bridging call, and it's not a duplicate, build a */
+ /* conference object, and skip pin handling, and locked checking */
if (isbr) {
char *uuid = switch_core_session_get_uuid(session);
@@ -2973,7 +2982,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 the dialplan specified a pin, override the profile's value */
if (dpin) {
conference->pin = switch_core_strdup(conference->pool, dpin);
}
@@ -2985,10 +2994,10 @@
launch_conference_thread(conference);
} else {
- // if the conference exists, get the pointer to it
+ /* if the conference exists, get the pointer to it */
if ((conference = (conference_obj_t *) switch_core_hash_find(globals.conference_hash, conf_name))) {
freepool = pool;
- // couldn't find the conference, create one
+ /* couldn't find the conference, create one */
} else {
conference = conference_new(conf_name, profile, pool);
@@ -2997,7 +3006,7 @@
goto done;
}
- // if the dialplan specified a pin, override the profile's value
+ /* if the dialplan specified a pin, override the profile's value */
if (dpin) {
conference->pin = switch_core_strdup(conference->pool, dpin);
}
@@ -3012,10 +3021,10 @@
launch_conference_thread(conference);
}
- // if this is not an outbound call, deal with conference pins
+ /* 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_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;
@@ -3024,11 +3033,11 @@
while(!pin_valid && pin_retries && status == SWITCH_STATUS_SUCCESS) {
- // be friendly
+ /* 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
+ /* wait for them if neccessary */
if (strlen(pin_buf) < strlen(conference->pin)) {
char *buf = pin_buf + strlen(pin_buf);
char term = '\0';
@@ -3042,10 +3051,10 @@
pin_valid = (status == SWITCH_STATUS_SUCCESS && strcmp(pin_buf, conference->pin) == 0);
if (!pin_valid) {
- // zero the collected pin
+ /* zero the collected pin */
memset(pin_buf,0,sizeof(pin_buf));
- // more friendliness
+ /* more friendliness */
if (conference->bad_pin_sound) {
conference_local_play_file(session, conference->bad_pin_sound, 20, pin_buf, sizeof(pin_buf));
}
@@ -3058,7 +3067,7 @@
}
}
- // don't allow more callers if the conference is locked, unless we invited them
+ /* 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) {
@@ -3076,14 +3085,14 @@
cxml = NULL;
}
- // if we're using "bridge:" make an outbound call and bridge it in
+ /* if we're using "bridge:" make an outbound call and bridge it in */
if (!switch_strlen_zero(bridgeto) && strcasecmp(bridgeto, "none")) {
if (conference_outcall(conference, session, bridgeto, 60, NULL, NULL, NULL) != SWITCH_STATUS_SUCCESS) {
goto done;
}
} else {
- // if we're not using "bridge:" set the conference answered flag
- // and this isn't an outbound channel, answer the call
+ /* if we're not using "bridge:" set the conference answered flag */
+ /* and this isn't an outbound channel, answer the call */
if (!switch_channel_test_flag(channel, CF_OUTBOUND))
switch_set_flag(conference, CFLAG_ANSWERED);
}
@@ -3096,9 +3105,7 @@
if (switch_core_codec_init(&member.read_codec,
"L16",
NULL,
- //conference->rate,
read_codec->implementation->samples_per_second,
- //conference->interval,
read_codec->implementation->microseconds_per_frame / 1000,
1,
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
@@ -3135,9 +3142,7 @@
"L16",
NULL,
conference->rate,
- //read_codec->implementation->samples_per_second,
conference->interval,
- //read_codec->implementation->microseconds_per_frame / 1000,
1,
SWITCH_CODEC_FLAG_ENCODE | SWITCH_CODEC_FLAG_DECODE,
NULL,
@@ -3282,7 +3287,7 @@
/*.interface_name */ "conference",
/*.desc */ "Conference module commands",
/*.function */ conf_api_main,
- /*.syntax */ // see switch_module_load
+ /*.syntax */ /* see switch_module_load, this is built on the fly */
/*.next */
};
@@ -3332,6 +3337,7 @@
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invaid Chat Interface [%s]!\n", proto);
}
+
if ((p = strchr(to, '@'))) {
switch_copy_string(name, to, ++p-to);
} else {
@@ -3354,12 +3360,15 @@
ci->chat_send(CONF_CHAT_PROTO, to, from, "", stream.data, NULL);
switch_safe_free(stream.data);
+
+
return SWITCH_STATUS_SUCCESS;
}
static const switch_chat_interface_t conference_chat_interface = {
/*.name */ CONF_CHAT_PROTO,
/*.chat_send */ chat_send,
+
};
static switch_loadable_module_interface_t conference_module_interface = {
@@ -3389,12 +3398,12 @@
if (action_name != NULL) {
char *sep = (action_name != NULL ? strchr(action_name,' ') : NULL);
- // split the action from any parameters
+ /* split the action from any parameters */
if (sep != NULL) {
*sep ='\0';
}
- // find and execute the caller control handler
+ /* find and execute the caller control handler */
for(i=0,found=0; !found && i<CCFNTBL_QTY; i++) {
found = (ccfntbl[i].action != CALLER_CONTROL_MENU && strcasecmp(ccfntbl[i].key,action_name) == 0);
if (found) {
@@ -3453,30 +3462,30 @@
switch_xml_t xml_menus = switch_xml_child(profile, "menus");
switch_xml_t xml_menu = (xml_menus != NULL ? switch_xml_find_child(xml_menus, "menu", "name", menu_name) : NULL);
- // if we found the requested menu in our profile
+ /* if we found the requested menu in our profile */
if (xml_menu != NULL && xml_menu != NULL) {
*ctx = (caller_control_menu_ctx_t *)switch_core_alloc(conference->pool,sizeof(caller_control_menu_ctx_t));
if (*ctx != NULL) {
memset(*ctx,0,sizeof(caller_control_menu_ctx_t));
- // setup an xml parser context, and a menu stack context for the specified menu in our memory pool
+ /* setup an xml parser context, and a menu stack context for the specified menu in our memory pool */
status = switch_ivr_menu_stack_xml_init(&(*ctx)->xml_ctx, conference->pool);
if (status == SWITCH_STATUS_SUCCESS) {
(*ctx)->name = switch_core_strdup(conference->pool,menu_name);
- // add our xml menu handler to the xml stack parser
+ /* add our xml menu handler to the xml stack parser */
status = switch_ivr_menu_stack_xml_add_custom((*ctx)->xml_ctx, "control", &conference_caller_control_menu_handler);
if (status != SWITCH_STATUS_SUCCESS)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "unable to add custom xml handler\n");
- // parse the xml stack to build the menu stack
+ /* parse the xml stack to build the menu stack */
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
+ /* 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");
@@ -3540,7 +3549,7 @@
if (conference != NULL && profile != NULL && xml_controls != NULL) {
switch_xml_t xml_kvp;
- // parse the controls tree for caller control digit strings
+ /* 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");
@@ -3549,9 +3558,9 @@
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.
+ /* 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) {
@@ -3628,13 +3637,13 @@
uint32_t rate = 8000, interval = 20;
switch_status_t status;
- // Validate the conference name
+ /* Validate the conference name */
if (switch_strlen_zero(name)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Record! no name.\n");
return NULL;
}
- // parse the profile tree for param values
+ /* parse the profile tree for param values */
for (xml_kvp = switch_xml_child(profile, "param"); xml_kvp; xml_kvp = xml_kvp->next) {
char *var = (char *) switch_xml_attr_soft(xml_kvp, "name");
char *val = (char *) switch_xml_attr_soft(xml_kvp, "value");
@@ -3745,7 +3754,7 @@
return NULL;
}
- // initialize the conference object with settings from the specified profile
+ /* initialize the conference object with settings from the specified profile */
conference->pool = pool;
conference->timer_name = switch_core_strdup(conference->pool, timer_name);
conference->tts_engine = switch_core_strdup(conference->pool, tts_engine);
@@ -3815,18 +3824,18 @@
conference->rate = rate;
conference->interval = interval;
- // caller control configuration chores
+ /* 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 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"
+ /* try to build caller control if the set has been specified and != "none" */
if(switch_ivr_digit_stream_parser_new(conference->pool,&conference->dtmf_parser) == SWITCH_STATUS_SUCCESS) {
- // map in the default control handler strings if specified
+ /* map in the default control handler strings if specified */
if (strcasecmp(controls_set,"default") == 0) {
status = conference_new_install_caller_controls_default(conference);
} else if (strcasecmp(controls_set,"custom") == 0) {
@@ -3861,7 +3870,7 @@
memset(&globals, 0, sizeof(globals));
- // build api interface help ".syntax" field string
+ /* build api interface help ".syntax" field string */
p=strdup("list\n");
for (i=0; i<CONFFUNCAPISIZE; i++) {
nl=strlen(conf_api_sub_commands[i].psyntax)+4;
@@ -3876,14 +3885,14 @@
}
}
- // install api interface help ".syntax" field string
+ /* install api interface help ".syntax" field string */
if(p != NULL)
conf_api_interface.syntax = p;
/* Connect my internal structure to the blank pointer passed to me */
*module_interface = &conference_module_interface;
- // create/register custom event message type
+ /* create/register custom event message type */
if (switch_event_reserve_subclass(CONF_EVENT_MAINT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!", CONF_EVENT_MAINT);
return SWITCH_STATUS_TERM;
@@ -3911,15 +3920,15 @@
if (globals.running) {
- // signal all threads to shutdown
+ /* signal all threads to shutdown */
globals.running = 0;
- // wait for all threads
+ /* wait for all threads */
while (globals.threads) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Waiting for %d threads\n", globals.threads);
switch_yield(100000);
}
- // free api interface help ".syntax" field string
+ /* free api interface help ".syntax" field string */
if (conf_api_interface.syntax != NULL)
free((char *)conf_api_interface.syntax);
}
1
0
[commit] r3529 - in freeswitch/branches/knhor/trunk: . src src/mod/applications/mod_dptools
by Freeswitch SVN 04 Dec '06
by Freeswitch SVN 04 Dec '06
04 Dec '06
Author: knhor
Date: Mon Dec 4 01:31:54 2006
New Revision: 3529
Modified:
freeswitch/branches/knhor/trunk/ (props changed)
freeswitch/branches/knhor/trunk/src/mod/applications/mod_dptools/mod_dptools.c
freeswitch/branches/knhor/trunk/src/switch_ivr.c
Log:
Merged revisions 3522-3528 via svnmerge from trunk
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 Mon Dec 4 01:31:54 2006
@@ -26,8 +26,8 @@
* Anthony Minessale II <anthmct(a)yahoo.com>
* Ken Rice, Asteria Solutions Group, Inc <ken(a)asteriasgi.com>
* Michael Murdock <mike at mmurdock dot org>
+ * Neal Horman <neal at wanlink dot com>
*
- *
* mod_dptools.c -- Raw Audio File Streaming Application Module
*
*/
@@ -306,7 +306,63 @@
return SWITCH_STATUS_SUCCESS;
}
+static char *ivr_cf_name = "ivr.conf";
+#ifdef _TEST_CALLBACK_
+static switch_ivr_action_t 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;
+
+ if (param != NULL) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "menu_handler '%s'\n",param);
+ }
+
+ return action;
+}
+#endif
+
+static void ivr_application_function(switch_core_session_t *session, char *data)
+{
+ switch_channel_t *channel = switch_core_session_get_channel(session);
+ char *params = switch_core_session_strdup(session,data);
+
+ if (channel != NULL && params != NULL) {
+ switch_xml_t cxml = NULL, cfg = NULL, xml_menus = NULL, xml_menu = NULL;
+
+ // Open the config from the xml registry
+ if ((cxml = switch_xml_open_cfg(ivr_cf_name, &cfg, NULL)) != NULL) {
+ switch_xml_free(cxml);
+ if ((xml_menus = switch_xml_child(cfg, "menus"))) {
+ xml_menu = switch_xml_find_child(xml_menus, "menu", "name", params);
+
+ // if the menu was found
+ if (xml_menu != NULL) {
+ switch_ivr_menu_xml_ctx_t *xml_ctx = NULL;
+ switch_ivr_menu_t *menu_stack = NULL;
+
+ // build a menu tree and execute it
+ if (switch_ivr_menu_stack_xml_init(&xml_ctx,NULL) == SWITCH_STATUS_SUCCESS
+#ifdef _TEST_CALLBACK_
+ && switch_ivr_menu_stack_xml_add_custom(xml_ctx, "custom", &menu_handler) == SWITCH_STATUS_SUCCESS
+#endif
+ && switch_ivr_menu_stack_xml_build(xml_ctx,&menu_stack,xml_menus,xml_menu,NULL) == SWITCH_STATUS_SUCCESS)
+ {
+ switch_channel_answer(channel);
+ switch_ivr_menu_execute(session,menu_stack,params,NULL);
+ switch_ivr_menu_stack_free(menu_stack);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to create menu '%s'\n", params);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to find menu '%s'\n", params);
+ }
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", ivr_cf_name);
+ }
+ }
+}
+
static switch_api_interface_t chat_api_interface = {
/*.interface_name */ "chat",
/*.desc */ "chat",
@@ -329,6 +385,15 @@
/*.function */ presence_api_function,
/*.syntax */ "<user> <rpid> <message>",
/*.next */ &dptools_api_interface
+};
+
+static const switch_application_interface_t ivr_application_interface = {
+ /*.interface_name */ "ivr",
+ /*.application_function */ ivr_application_function,
+ /* long_desc */ "Run an ivr menu.",
+ /* short_desc */ "Run an ivr menu",
+ /* syntax */ "<menu_name>",
+ /*.next */ NULL
};
static const switch_application_interface_t detect_speech_application_interface = {
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 Mon Dec 4 01:31:54 2006
@@ -2212,7 +2212,7 @@
if (switch_channel_get_state(peer_channels[i]) >= CS_HANGUP) {
hups++;
} 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))) &&
+ (!ringback_data && len == 1 && switch_channel_test_flag(peer_channels[i], CF_EARLY_MEDIA))) &&
!switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
if (key) {
@@ -2637,7 +2637,7 @@
goto notready;
}
- if (switch_core_session_dequeue_message(peer_sessions[0], &message) == SWITCH_STATUS_SUCCESS) {
+ if (peer_sessions[0] && 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);
}
1
0
04 Dec '06
Author: mikej
Date: Mon Dec 4 00:50:41 2006
New Revision: 3528
Modified:
freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
Log:
add ivr application that uses the switch_ivr_menu functions, from Neal Horman.
Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c Mon Dec 4 00:50:41 2006
@@ -26,8 +26,8 @@
* Anthony Minessale II <anthmct(a)yahoo.com>
* Ken Rice, Asteria Solutions Group, Inc <ken(a)asteriasgi.com>
* Michael Murdock <mike at mmurdock dot org>
+ * Neal Horman <neal at wanlink dot com>
*
- *
* mod_dptools.c -- Raw Audio File Streaming Application Module
*
*/
@@ -306,7 +306,63 @@
return SWITCH_STATUS_SUCCESS;
}
+static char *ivr_cf_name = "ivr.conf";
+#ifdef _TEST_CALLBACK_
+static switch_ivr_action_t 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;
+
+ if (param != NULL) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "menu_handler '%s'\n",param);
+ }
+
+ return action;
+}
+#endif
+
+static void ivr_application_function(switch_core_session_t *session, char *data)
+{
+ switch_channel_t *channel = switch_core_session_get_channel(session);
+ char *params = switch_core_session_strdup(session,data);
+
+ if (channel != NULL && params != NULL) {
+ switch_xml_t cxml = NULL, cfg = NULL, xml_menus = NULL, xml_menu = NULL;
+
+ // Open the config from the xml registry
+ if ((cxml = switch_xml_open_cfg(ivr_cf_name, &cfg, NULL)) != NULL) {
+ switch_xml_free(cxml);
+ if ((xml_menus = switch_xml_child(cfg, "menus"))) {
+ xml_menu = switch_xml_find_child(xml_menus, "menu", "name", params);
+
+ // if the menu was found
+ if (xml_menu != NULL) {
+ switch_ivr_menu_xml_ctx_t *xml_ctx = NULL;
+ switch_ivr_menu_t *menu_stack = NULL;
+
+ // build a menu tree and execute it
+ if (switch_ivr_menu_stack_xml_init(&xml_ctx,NULL) == SWITCH_STATUS_SUCCESS
+#ifdef _TEST_CALLBACK_
+ && switch_ivr_menu_stack_xml_add_custom(xml_ctx, "custom", &menu_handler) == SWITCH_STATUS_SUCCESS
+#endif
+ && switch_ivr_menu_stack_xml_build(xml_ctx,&menu_stack,xml_menus,xml_menu,NULL) == SWITCH_STATUS_SUCCESS)
+ {
+ switch_channel_answer(channel);
+ switch_ivr_menu_execute(session,menu_stack,params,NULL);
+ switch_ivr_menu_stack_free(menu_stack);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to create menu '%s'\n", params);
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to find menu '%s'\n", params);
+ }
+ }
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", ivr_cf_name);
+ }
+ }
+}
+
static switch_api_interface_t chat_api_interface = {
/*.interface_name */ "chat",
/*.desc */ "chat",
@@ -329,6 +385,15 @@
/*.function */ presence_api_function,
/*.syntax */ "<user> <rpid> <message>",
/*.next */ &dptools_api_interface
+};
+
+static const switch_application_interface_t ivr_application_interface = {
+ /*.interface_name */ "ivr",
+ /*.application_function */ ivr_application_function,
+ /* long_desc */ "Run an ivr menu.",
+ /* short_desc */ "Run an ivr menu",
+ /* syntax */ "<menu_name>",
+ /*.next */ NULL
};
static const switch_application_interface_t detect_speech_application_interface = {
1
0
Author: mikej
Date: Mon Dec 4 00:41:03 2006
New Revision: 3527
Modified:
freeswitch/trunk/src/include/switch_ivr.h
freeswitch/trunk/src/switch_ivr.c
Log:
refinements and additions to switch_ivr_menu from Neal Horman.
Modified: freeswitch/trunk/src/include/switch_ivr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_ivr.h (original)
+++ freeswitch/trunk/src/include/switch_ivr.h Mon Dec 4 00:41:03 2006
@@ -482,15 +482,16 @@
typedef enum {
SWITCH_IVR_ACTION_DIE, /* Exit the menu. */
SWITCH_IVR_ACTION_EXECMENU, /* Goto another menu in the stack. */
- SWITCH_IVR_ACTION_EXECAPP, /* Execute an application. */
+ SWITCH_IVR_ACTION_EXECAPP, /* Execute an application. */
SWITCH_IVR_ACTION_PLAYSOUND, /* Play a sound. */
- SWITCH_IVR_ACTION_SAYTEXT, /* say text. */
+ SWITCH_IVR_ACTION_SAYTEXT, /* say text. */
SWITCH_IVR_ACTION_BACK, /* Go back 1 menu. */
- SWITCH_IVR_ACTION_TOMAIN, /* Go back to the top level menu. */
+ SWITCH_IVR_ACTION_TOMAIN, /* Go back to the top level menu. */
SWITCH_IVR_ACTION_TRANSFER, /* Transfer caller to another ext. */
+ SWITCH_IVR_ACTION_NOOP, /* No operation */
} switch_ivr_action_t;
struct switch_ivr_menu;
-typedef switch_ivr_action_t switch_ivr_menu_action_function_t(struct switch_ivr_menu *, char *, size_t, void *);
+typedef switch_ivr_action_t switch_ivr_menu_action_function_t(struct switch_ivr_menu *, char *, char *, size_t, void *);
typedef struct switch_ivr_menu switch_ivr_menu_t;
typedef struct switch_ivr_menu_action switch_ivr_menu_action_t;
/******************************************************************************************************/
@@ -502,11 +503,13 @@
*\param name A pointer to the name of this menu.
*\param greeting_sound Optional pointer to a main sound (press 1 for this 2 for that).
*\param short_greeting_sound Optional pointer to a shorter main sound for subsequent loops.
+ *\param exit_sound Optional pointer to a sound to play upon exiting the menu
*\param invalid_sound Optional pointer to a sound to play after invalid input.
*\param tts_engine Text To Speech engine name
*\param tts_voice Text To Speech engine voice name
*\param timeout A number of milliseconds to pause before looping.
*\param max_failures Maximum number of failures to withstand before hangingup This resets everytime you enter the menu.
+ *\param timer_name A pointer to a timer name
*\param pool memory pool (NULL to create one)
*\return SWITCH_STATUS_SUCCESS if the menu was created
*/
@@ -515,11 +518,13 @@
char *name,
char *greeting_sound,
char *short_greeting_sound,
+ char *exit_sound,
char *invalid_sound,
char *tts_engine,
char *tts_voice,
int timeout,
int max_failures,
+ char *timer_name,
switch_memory_pool_t *pool);
/*!
@@ -537,13 +542,14 @@
*\brief Bind a keystroke to a callback function.
*\param menu The menu obj you wish to bind to.
*\param function The function to call [int proto(struct switch_ivr_menu *, char *, size_t, void *)]
+ *\param arg Optional (sometimes necessary) string arguement.
*\param bind KeyStrokes to bind the action to.
*\note The function is passed a buffer to fill in with any required argument data.
*\note The function is also passed an optional void pointer to an object set upon menu execution. (think threads)
*\note The function returns an switch_ivr_action_t enum of what you want to do. and looks to your buffer for args.
*\return SWUTCH_STATUS_SUCCESS if the function was binded
*/
-SWITCH_DECLARE(switch_status_t) switch_ivr_menu_bind_function(switch_ivr_menu_t *menu, switch_ivr_menu_action_function_t *function, char *bind);
+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);
/*!
@@ -561,20 +567,42 @@
*\param stack The top level menu you wish to destroy.
*\return SWITCH_STATUS_SUCCESS if the object was a top level menu and it was freed
*/
-SWITCH_DECLARE(switch_status_t) switch_ivr_menu_free_stack(switch_ivr_menu_t *stack);
+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
+ *\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_build_xml_menu_stack(switch_ivr_menu_t **menu_stack,
+SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_xml_ctx_t *xml_menu_ctx,
+ switch_ivr_menu_t **menu_stack,
switch_xml_t xml_menus,
switch_xml_t xml_menu,
- switch_memory_pool_t *pool);
+ 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);
+
/** @} */
SWITCH_END_EXTERN_C
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Mon Dec 4 00:41:03 2006
@@ -28,7 +28,7 @@
* Neal Horman <neal at wanlink dot com>
* Matt Klein <mklein(a)nmedia.net>
*
- * switch_ivr_api.c -- IVR Library
+ * switch_ivr.c -- IVR Library
*
*/
#include <switch.h>
@@ -187,7 +187,7 @@
uint32_t elapsed;
channel = switch_core_session_get_channel(session);
- assert(channel != NULL);
+ assert(channel != NULL);
if (!input_callback) {
return SWITCH_STATUS_GENERR;
@@ -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;
}
@@ -3469,6 +3471,8 @@
return SWITCH_STATUS_SUCCESS;
}
+/******************************************************************************************************/
+
struct switch_ivr_digit_stream_parser {
int pool_auto_created;
switch_memory_pool_t *pool;
@@ -3476,6 +3480,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)
@@ -3487,6 +3494,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;
}
@@ -3502,12 +3510,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);
}
@@ -3540,11 +3549,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) {
@@ -3571,28 +3598,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') {
- size_t len = (parser->digits != NULL ? strlen(parser->digits) : 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 > 1 && 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);
@@ -3603,7 +3642,7 @@
parser->digits = NULL;
}
}
- }
+}
return result;
}
@@ -3625,6 +3664,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;
}
@@ -3632,6 +3673,8 @@
return status;
}
+/******************************************************************************************************/
+
struct switch_ivr_menu_action;
struct switch_ivr_menu {
@@ -3639,10 +3682,12 @@
char *greeting_sound;
char *short_greeting_sound;
char *invalid_sound;
+ char *exit_sound;
char *tts_engine;
char *tts_voice;
char *buf;
char *ptr;
+ char *timer_name;
int max_failures;
int timeout;
uint32_t inlen;
@@ -3652,7 +3697,6 @@
switch_memory_pool_t *pool;
};
-
struct switch_ivr_menu_action {
switch_ivr_menu_action_function_t *function;
switch_ivr_action_t ivr_action;
@@ -3661,7 +3705,7 @@
struct switch_ivr_menu_action *next;
};
-static switch_ivr_menu_t *switch_ivr_find_menu(switch_ivr_menu_t *stack, char *name) {
+static switch_ivr_menu_t *switch_ivr_menu_find(switch_ivr_menu_t *stack, char *name) {
switch_ivr_menu_t *ret;
for(ret = stack; ret ; ret = ret->next) {
if (!name || !strcmp(ret->name, name))
@@ -3670,8 +3714,7 @@
return ret;
}
-
-static void switch_ivr_menu_stack(switch_ivr_menu_t **top, switch_ivr_menu_t *bottom)
+static void switch_ivr_menu_stack_add(switch_ivr_menu_t **top, switch_ivr_menu_t *bottom)
{
switch_ivr_menu_t *ptr;
@@ -3691,10 +3734,12 @@
char *greeting_sound,
char *short_greeting_sound,
char *invalid_sound,
+ char *exit_sound,
char *tts_engine,
char *tts_voice,
int timeout,
int max_failures,
+ char *timer_name,
switch_memory_pool_t *pool)
{
switch_ivr_menu_t *menu;
@@ -3718,30 +3763,38 @@
menu->pool = pool;
- if (name) {
+ if (!switch_strlen_zero(name)) {
menu->name = switch_core_strdup(menu->pool, name);
}
- if (greeting_sound) {
+ if (!switch_strlen_zero(greeting_sound)) {
menu->greeting_sound = switch_core_strdup(menu->pool, greeting_sound);
}
- if (short_greeting_sound) {
+ if (!switch_strlen_zero(short_greeting_sound)) {
menu->short_greeting_sound = switch_core_strdup(menu->pool, short_greeting_sound);
}
- if (invalid_sound) {
+ if (!switch_strlen_zero(invalid_sound)) {
menu->invalid_sound = switch_core_strdup(menu->pool, invalid_sound);
}
- if (tts_engine) {
+ if (!switch_strlen_zero(exit_sound)) {
+ menu->exit_sound = switch_core_strdup(menu->pool, exit_sound);
+ }
+
+ if (!switch_strlen_zero(tts_engine)) {
menu->tts_engine = switch_core_strdup(menu->pool, tts_engine);
}
- if (tts_voice) {
+ if (!switch_strlen_zero(tts_voice)) {
menu->tts_voice = switch_core_strdup(menu->pool, tts_voice);
}
+ if (!switch_strlen_zero(timer_name)) {
+ menu->timer_name = switch_core_strdup(menu->pool, timer_name);
+ }
+
menu->max_failures = max_failures;
menu->timeout = timeout;
@@ -3757,7 +3810,7 @@
}
if (main) {
- switch_ivr_menu_stack(&main, menu);
+ switch_ivr_menu_stack_add(&main, menu);
} else {
menu->flags |= SWITCH_IVR_MENU_FLAG_STACK;
}
@@ -3767,11 +3820,11 @@
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;
uint32_t len;
+
if ((action = switch_core_alloc(menu->pool, sizeof(*action)))) {
action->bind = switch_core_strdup(menu->pool, bind);
action->next = menu->actions;
@@ -3788,16 +3841,20 @@
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 *bind)
+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;
+ uint32_t len;
-
if ((action = switch_core_alloc(menu->pool, sizeof(*action)))) {
action->bind = bind;
- action->function = function;
action->next = menu->actions;
+ action->arg = switch_core_strdup(menu->pool, arg);
+ len = (uint32_t)strlen(action->bind);
+ if (len > menu->inlen) {
+ menu->inlen = len;
+ }
+ action->function = function;
menu->actions = action;
return SWITCH_STATUS_SUCCESS;
}
@@ -3805,63 +3862,66 @@
return SWITCH_STATUS_MEMERR;
}
-SWITCH_DECLARE(switch_status_t) switch_ivr_menu_free_stack(switch_ivr_menu_t *stack)
+SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_free(switch_ivr_menu_t *stack)
{
- switch_memory_pool_t *pool;
+ switch_status_t status = SWITCH_STATUS_FALSE;
- if (!switch_test_flag(stack, SWITCH_IVR_MENU_FLAG_STACK) || switch_test_flag(stack, SWITCH_IVR_MENU_FLAG_FREEPOOL)) {
- return SWITCH_STATUS_FALSE;
+ if (stack != NULL && stack->pool != NULL) {
+ if (switch_test_flag(stack, SWITCH_IVR_MENU_FLAG_STACK) && switch_test_flag(stack, SWITCH_IVR_MENU_FLAG_FREEPOOL)) {
+ switch_memory_pool_t *pool = stack->pool;
+ status = switch_core_destroy_memory_pool(&pool);
+ } else {
+ status = SWITCH_STATUS_SUCCESS;
+ }
}
- pool = stack->pool;
- switch_core_destroy_memory_pool(&pool);
- pool = NULL;
-
- return SWITCH_STATUS_SUCCESS;
-
+ return status;
}
-static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_menu_t *menu, char *sound, uint32_t need)
+static switch_status_t play_or_say(switch_core_session_t *session, switch_ivr_menu_t *menu, char *sound, uint32_t need, char *timer_name)
{
char terminator;
uint32_t len;
char *ptr;
- switch_status_t status = SWITCH_STATUS_SUCCESS;
+ switch_status_t status = SWITCH_STATUS_FALSE;
- memset(menu->buf, 0, menu->inlen);
- menu->ptr = menu->buf;
+ if (session != NULL && menu != NULL && !switch_strlen_zero(sound)) {
+ memset(menu->buf, 0, menu->inlen);
+ menu->ptr = menu->buf;
- if (!need) {
- len = 1;
- ptr = NULL;
- } else {
- len = menu->inlen + 1;
- ptr = menu->ptr;
- }
+ if (!need) {
+ len = 1;
+ ptr = NULL;
+ } else {
+ len = menu->inlen + 1;
+ ptr = menu->ptr;
+ }
- if (*sound == '/' || *sound == '\\') {
- switch_ivr_play_file(session, NULL, sound, NULL, NULL, ptr, len);
- } else {
- if (menu->tts_engine && menu->tts_voice) {
- switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, NULL, 0, NULL, sound, ptr, len);
+ if (*sound == '/' || *sound == '\\') {
+ status = switch_ivr_play_file(session, NULL, sound, timer_name, NULL, ptr, need ? 1 : 0);
+ } else {
+ if (menu->tts_engine && menu->tts_voice) {
+ status = switch_ivr_speak_text(session, menu->tts_engine, menu->tts_voice, NULL, 0, NULL, sound, ptr, len);
+ }
}
- }
- if (need) {
- menu->ptr += strlen(menu->buf);
- if (strlen(menu->buf) < need) {
- status = switch_ivr_collect_digits_count(session, menu->ptr, menu->inlen - strlen(menu->buf), need, "#", &terminator, menu->timeout);
+ if (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);
}
}
return status;
-
}
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;
@@ -3869,18 +3929,22 @@
switch_channel_t *channel;
switch_status_t status = SWITCH_STATUS_SUCCESS;
+ if (session == NULL || stack == NULL || switch_strlen_zero(name)) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid menu context\n");
+ return SWITCH_STATUS_FALSE;
+ }
+
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
-
- if (!(menu = switch_ivr_find_menu(stack, name))) {
+ if (!(menu = switch_ivr_menu_find(stack, name))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Menu!\n");
- return -1;
+ return SWITCH_STATUS_FALSE;
}
if (!(menu->buf = malloc(menu->inlen))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Memory!\n");
- return -1;
+ return SWITCH_STATUS_FALSE;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Executing IVR menu %s\n", menu->name);
@@ -3901,10 +3965,9 @@
memset(arg, 0, sizeof(arg));
+ memset(menu->buf, 0, menu->inlen);
+ status = play_or_say(session, menu, greeting_sound, menu->inlen, stack->timer_name);
- play_or_say(session, menu, greeting_sound, menu->inlen);
-
-
if (!switch_strlen_zero(menu->buf)) {
for(ap = menu->actions; ap ; ap = ap->next) {
if (!strcmp(menu->buf, ap->bind)) {
@@ -3913,9 +3976,9 @@
match++;
errs = 0;
if (ap->function) {
- todo = ap->function(menu, arg, sizeof(arg), obj);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "IVR function on menu '%s' matched '%s' param '%s'\n", menu->name, menu->buf, ap->arg);
+ todo = ap->function(menu, ap->arg, arg, sizeof(arg), obj);
aptr = arg;
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "IVR function on menu '%s' matched '%s'\n", menu->name, menu->buf);
} else {
todo = ap->ivr_action;
aptr = ap->arg;
@@ -3927,12 +3990,10 @@
status = SWITCH_STATUS_FALSE;
break;
case SWITCH_IVR_ACTION_PLAYSOUND:
- status = switch_ivr_play_file(session, NULL, aptr, NULL, NULL, NULL, 0);
+ 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);
@@ -3972,6 +4033,9 @@
switch_set_flag(stack, SWITCH_IVR_MENU_FLAG_FALLTOMAIN);
status = SWITCH_STATUS_BREAK;
break;
+ case SWITCH_IVR_ACTION_NOOP:
+ status = SWITCH_STATUS_SUCCESS;
+ break;
default:
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid TODO!\n");
break;
@@ -3980,8 +4044,8 @@
}
- if (switch_test_flag(menu, SWITCH_IVR_MENU_FLAG_STACK)) { /* top level */
- if (switch_test_flag(stack, SWITCH_IVR_MENU_FLAG_FALLTOMAIN)) { /* catch the fallback and recover */
+ if (switch_test_flag(menu, SWITCH_IVR_MENU_FLAG_STACK)) { // top level
+ if (switch_test_flag(stack, SWITCH_IVR_MENU_FLAG_FALLTOMAIN)) { // catch the fallback and recover
switch_clear_flag(stack, SWITCH_IVR_MENU_FLAG_FALLTOMAIN);
status = SWITCH_STATUS_SUCCESS;
running = 1;
@@ -3989,11 +4053,11 @@
}
}
}
- if (!match) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "IVR menu %s caught invalid input %s\n", menu->name, menu->buf);
+ 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) {
- play_or_say(session, menu, menu->invalid_sound, 0);
+ play_or_say(session, menu, menu->invalid_sound, 0, stack->timer_name);
}
errs++;
@@ -4001,98 +4065,223 @@
status = switch_ivr_sleep(session, 1000);
}
}
-
}
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "exit-sound '%s'\n",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;
}
-SWITCH_DECLARE(switch_status_t) switch_ivr_build_xml_menu_stack(switch_ivr_menu_t **menu_stack,
- switch_xml_t xml_menus,
- switch_xml_t xml_menu,
- switch_memory_pool_t *pool)
+/******************************************************************************************************/
+
+typedef struct switch_ivr_menu_xml_map {
+ char *name;
+ switch_ivr_action_t action;
+ switch_ivr_menu_action_function_t *function;
+ struct switch_ivr_menu_xml_map *next;
+} switch_ivr_menu_xml_map_t;
+
+struct switch_ivr_menu_xml_ctx {
+ switch_memory_pool_t *pool;
+ struct switch_ivr_menu_xml_map *map;
+ int autocreated;
+};
+
+static switch_ivr_menu_xml_map_t *switch_ivr_menu_stack_xml_find(switch_ivr_menu_xml_ctx_t *xml_ctx, char *name)
{
+ switch_ivr_menu_xml_map_t *map = (xml_ctx != NULL ? xml_ctx->map : NULL);
+ int rc = -1;
+
+ while (map != NULL && (rc = strcasecmp(map->name,name)) != 0) {
+ map = map->next;
+ }
+
+ return (rc == 0 ? map : NULL);
+}
+
+static switch_status_t switch_ivr_menu_stack_xml_add(switch_ivr_menu_xml_ctx_t *xml_ctx, char*name, int action, switch_ivr_menu_action_function_t *function)
+{
+ switch_status_t status = SWITCH_STATUS_FALSE;
+
+ // if this action/function does not exist yet
+ 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);
+ // and we have memory
+ if (map != NULL) {
+ map->name = switch_core_strdup(xml_ctx->pool,name);
+ map->action = action;
+ map->function = function;
+
+ if (map->name != NULL) {
+ // insert map item at top of list
+ map->next = xml_ctx->map;
+ xml_ctx->map = map;
+ status = SWITCH_STATUS_SUCCESS;
+ } else {
+ status = SWITCH_STATUS_MEMERR;
+ }
+ } else {
+ status = SWITCH_STATUS_MEMERR;
+ }
+ }
+
+ return status;
+}
+
+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)
+{
switch_status_t status = SWITCH_STATUS_FALSE;
- char *menu_name = (char *)switch_xml_attr_soft(xml_menu,"name"); // if the attr doesn't exist, return ""
- char *greet_long = (char *)switch_xml_attr(xml_menu,"greet-long"); // if the attr doesn't exist, return NULL
- char *greet_short = (char *)switch_xml_attr(xml_menu,"greet-short"); // if the attr doesn't exist, return NULL
- char *invalid_sound = (char *)switch_xml_attr(xml_menu,"invalid-sound"); // if the attr doesn't exist, return NULL
- char *tts_engine = (char *)switch_xml_attr(xml_menu,"tts-engine"); // if the attr doesn't exist, return NULL
- char *tts_voice = (char *)switch_xml_attr(xml_menu,"tts-voice"); // if the attr doesn't exist, return NULL
- char *timeout = (char *)switch_xml_attr_soft(xml_menu,"timeout"); // if the attr doesn't exist, return ""
- char *max_failures = (char *)switch_xml_attr_soft(xml_menu,"max-failures"); // if the attr doesn't exist, return ""
- switch_ivr_menu_t *menu = NULL;
+ int autocreated = 0;
- status = switch_ivr_menu_init(&menu,
- *menu_stack,
- menu_name,
- greet_long,
- greet_short,
- invalid_sound,
- tts_engine,
- tts_voice,
- atoi(timeout)*1000,
- atoi(max_failures),
- pool
- );
- if (status == SWITCH_STATUS_SUCCESS) {
- switch_xml_t xml_kvp;
- struct ivr_action_map {
+ // build a memory pool ?
+ if (pool == NULL) {
+ status = switch_core_new_memory_pool(&pool);
+ autocreated = 1;
+ }
+
+ // allocate the xml context
+ if (xml_menu_ctx != NULL && pool != NULL) {
+ *xml_menu_ctx = switch_core_alloc(pool,sizeof(switch_ivr_menu_xml_ctx_t));
+ if (*xml_menu_ctx != NULL) {
+ (*xml_menu_ctx)->pool = pool;
+ (*xml_menu_ctx)->autocreated = autocreated;
+ (*xml_menu_ctx)->map = NULL;
+ status = SWITCH_STATUS_SUCCESS;
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to alloc xml_ctx\n");
+ status = SWITCH_STATUS_FALSE;
+ }
+ }
+
+ // build the standard/default xml menu handler mappings
+ if (status == SWITCH_STATUS_SUCCESS && xml_menu_ctx != NULL && *xml_menu_ctx != NULL) {
+ struct iam_s {
char *name;
switch_ivr_action_t action;
} iam [] = {
- {"exit", SWITCH_IVR_ACTION_DIE},
+ {"menu-exit", SWITCH_IVR_ACTION_DIE},
{"menu-sub", SWITCH_IVR_ACTION_EXECMENU},
- {"exec-api", SWITCH_IVR_ACTION_EXECAPP},
- {"play-sound", SWITCH_IVR_ACTION_PLAYSOUND},
- {"say-text", SWITCH_IVR_ACTION_SAYTEXT},
+ {"menu-exec-api", SWITCH_IVR_ACTION_EXECAPP},
+ {"menu-play-sound", SWITCH_IVR_ACTION_PLAYSOUND},
+ {"menu-say-text", SWITCH_IVR_ACTION_SAYTEXT},
{"menu-back", SWITCH_IVR_ACTION_BACK},
{"menu-top", SWITCH_IVR_ACTION_TOMAIN},
- {"call-transfer", SWITCH_IVR_ACTION_TRANSFER},
+ {"menu-call-transfer", SWITCH_IVR_ACTION_TRANSFER},
};
- int iam_qty = sizeof(iam)/sizeof(iam[0]);
+ int iam_qty = (sizeof(iam)/sizeof(iam[0]));
+ int i;
- // set the menu stack for the caller
- if (*menu_stack == NULL) {
+ for(i=0; i<iam_qty && status == SWITCH_STATUS_SUCCESS; i++) {
+ status = switch_ivr_menu_stack_xml_add(*xml_menu_ctx,iam[i].name,iam[i].action,NULL);
+ }
+ }
+
+ return status;
+}
+
+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)
+{
+ return switch_ivr_menu_stack_xml_add(xml_menu_ctx, name, -1, function);
+}
+
+SWITCH_DECLARE(switch_status_t) switch_ivr_menu_stack_xml_build(switch_ivr_menu_xml_ctx_t *xml_menu_ctx,
+ switch_ivr_menu_t **menu_stack,
+ switch_xml_t xml_menus,
+ switch_xml_t xml_menu,
+ char *timer_name)
+{
+ switch_status_t status = SWITCH_STATUS_FALSE;
+
+ if (xml_menu_ctx != NULL && menu_stack != NULL && xml_menu != NULL) {
+ char *menu_name = (char *)switch_xml_attr_soft(xml_menu,"name"); // if the attr doesn't exist, return ""
+ char *greet_long = (char *)switch_xml_attr(xml_menu,"greet-long"); // if the attr doesn't exist, return NULL
+ char *greet_short = (char *)switch_xml_attr(xml_menu,"greet-short"); // if the attr doesn't exist, return NULL
+ char *invalid_sound = (char *)switch_xml_attr(xml_menu,"invalid-sound"); // if the attr doesn't exist, return NULL
+ char *exit_sound = (char *)switch_xml_attr(xml_menu,"exit-sound"); // if the attr doesn't exist, return NULL
+ char *tts_engine = (char *)switch_xml_attr(xml_menu,"tts-engine"); // if the attr doesn't exist, return NULL
+ char *tts_voice = (char *)switch_xml_attr(xml_menu,"tts-voice"); // if the attr doesn't exist, return NULL
+ char *timeout = (char *)switch_xml_attr_soft(xml_menu,"timeout"); // if the attr doesn't exist, return ""
+ char *max_failures = (char *)switch_xml_attr_soft(xml_menu,"max-failures"); // if the attr doesn't exist, return ""
+ switch_ivr_menu_t *menu = NULL;
+
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "building menu '%s'\n",menu_name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "timer_name '%s'\n",timer_name);
+ status = switch_ivr_menu_init(&menu,
+ *menu_stack,
+ menu_name,
+ greet_long,
+ greet_short,
+ invalid_sound,
+ exit_sound,
+ tts_engine,
+ tts_voice,
+ atoi(timeout)*1000,
+ atoi(max_failures),
+ timer_name,
+ xml_menu_ctx->pool
+ );
+ // set the menu_stack for the caller
+ if (status == SWITCH_STATUS_SUCCESS && *menu_stack == NULL) {
*menu_stack = menu;
}
- // build menu entries
- for(xml_kvp = switch_xml_child(xml_menu, "entry"); xml_kvp != NULL && status == SWITCH_STATUS_SUCCESS; xml_kvp = xml_kvp->next) {
- char *action = (char *)switch_xml_attr(xml_kvp, "action");
- char *digits = (char *)switch_xml_attr(xml_kvp, "digits");
- char *param = (char *)switch_xml_attr_soft(xml_kvp, "param");
+ if (status == SWITCH_STATUS_SUCCESS && menu != NULL) {
+ switch_xml_t xml_kvp;
- if (!switch_strlen_zero(action) && !switch_strlen_zero(digits)) {
- int i,found;
+ // build menu entries
+ for(xml_kvp = switch_xml_child(xml_menu, "entry"); xml_kvp != NULL && status == SWITCH_STATUS_SUCCESS; xml_kvp = xml_kvp->next) {
+ char *action = (char *)switch_xml_attr(xml_kvp, "action");
+ char *digits = (char *)switch_xml_attr(xml_kvp, "digits");
+ char *param = (char *)switch_xml_attr_soft(xml_kvp, "param");
- for(i=0,found=0; i<iam_qty && !found; i++) {
- found = (strcasecmp(iam[i].name,action) == 0);
- }
+ if (!switch_strlen_zero(action) && !switch_strlen_zero(digits)) {
+ switch_ivr_menu_xml_map_t *xml_map = xml_menu_ctx->map;
+ int found = 0;
- if (found) {
- i--;
- // do we need to build a new sub-menu ?
- if (iam[i].action == SWITCH_IVR_ACTION_EXECMENU && switch_ivr_find_menu(*menu_stack, param) == NULL) {
- if ((xml_menu = switch_xml_find_child(xml_menus, "menu", "name", param)) != NULL) {
- status = switch_ivr_build_xml_menu_stack(menu_stack, xml_menus, xml_menu, pool);
+ // find and appropriate xml handler
+ while(xml_map != NULL && !found) {
+ if (!(found = (strcasecmp(xml_map->name,action) == 0))) {
+ xml_map = xml_map->next;
}
}
- // finally bind the menu entry
- if (status == SWITCH_STATUS_SUCCESS) {
- status = switch_ivr_menu_bind_action(menu, iam[i].action, param, digits);
+
+ if (found && xml_map != NULL) {
+ // do we need to build a new sub-menu ?
+ if (xml_map->action == SWITCH_IVR_ACTION_EXECMENU && switch_ivr_menu_find(*menu_stack, param) == NULL) {
+ if ((xml_menu = switch_xml_find_child(xml_menus, "menu", "name", param)) != NULL) {
+ status = switch_ivr_menu_stack_xml_build(xml_menu_ctx, menu_stack, xml_menus, xml_menu, timer_name);
+ }
+ }
+
+ // finally bind the menu entry
+ if (status == SWITCH_STATUS_SUCCESS) {
+ if (xml_map->function != NULL) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "binding menu caller control '%s'/'%s' to '%s'\n", xml_map->name, param, digits);
+ status = switch_ivr_menu_bind_function(menu, xml_map->function, param, digits);
+ } else {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,
+ "binding menu action '%s' to '%s'\n", xml_map->name, digits);
+ status = switch_ivr_menu_bind_action(menu, xml_map->action, param, digits);
+ }
+ }
}
+ } else {
+ status = SWITCH_STATUS_FALSE;
}
- } else {
- status = SWITCH_STATUS_FALSE;
}
}
}
if (status != SWITCH_STATUS_SUCCESS) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to build xml menu '%s'\n",menu_name);
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to build xml menu\n");
}
return status;
1
0
[commit] r3526 - freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr
by Freeswitch SVN 04 Dec '06
by Freeswitch SVN 04 Dec '06
04 Dec '06
Author: mishehu
Date: Sun Dec 3 23:06:03 2006
New Revision: 3526
Modified:
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/cdrcontainer.cpp
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/csvcdr.cpp
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/pddcdr.cpp
freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/xmlcdr.cpp
Log:
Pausing and resuming pop on the queue works fine, made changes in all current loggers to support reloading. Also fixed it so that files are not created on pddcdr.cpp and xmlcdr.cpp until ::process_record() occurs.
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 Sun Dec 3 23:06:03 2006
@@ -179,14 +179,9 @@
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->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);
BaseRegistry& registry(BaseRegistry::get());
for(BaseRegistry::iterator it = registry.active_begin(); it != registry.active_end(); ++it)
@@ -199,8 +194,9 @@
switch_console_printf(SWITCH_CHANNEL_LOG,"Adding a new logger object to the queue.\n");
switch_queue_push(cdrqueue,newloggerobject);
newchannel->callerprofile = newchannel->callerprofile->next;
- newchannel->callerextension = newchannel->callerextension->next;
- } while (newchannel->callerprofile && newchannel->callerextension);
+ if(newchannel->callerextension)
+ newchannel->callerextension = newchannel->callerextension->next;
+ } while (newchannel->callerprofile);
}
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/csvcdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/csvcdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/csvcdr.cpp Sun Dec 3 23:06:03 2006
@@ -280,6 +280,13 @@
void CsvCDR::disconnect()
{
outputfile.close();
+ activated = 0;
+ logchanvars = 0;
+ repeat_fixed_in_supp = 0;
+ outfile_path.clear();
+ chanvars_fixed_list.clear();
+ chanvars_supp_list.clear();
+ connectionstate = 0;
switch_console_printf(SWITCH_CHANNEL_LOG,"Shutting down CsvCDR... Done!");
}
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/pddcdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/pddcdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/pddcdr.cpp Sun Dec 3 23:06:03 2006
@@ -74,10 +74,7 @@
outputfile_name.append(callenddate_forfile); // Make sorting a bit easier, kinda like Maildir does
outputfile_name.append(".");
outputfile_name.append(myuuid); // The goal is to have a resulting filename of "/path/to/myuuid"
- outputfile_name.append(".pdd"); // .pdd - "perl data dumper"
-
- outputfile.open(outputfile_name.c_str());
-
+ outputfile_name.append(".pdd"); // .pdd - "perl data dumper"
bool repeat = 1;
process_channel_variables(chanvars_supp_list,chanvars_fixed_list,newchannel->channel,repeat);
}
@@ -148,6 +145,8 @@
bool PddCDR::process_record()
{
+ outputfile.open(outputfile_name.c_str());
+
bool retval = 0;
if(!outputfile)
switch_console_printf(SWITCH_CHANNEL_LOG, "PddCDR::process_record(): Unable to open file %s to commit the call record to. Invalid path name, invalid permissions, or no space available?\n",outputfile_name.c_str());
Modified: freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/xmlcdr.cpp
==============================================================================
--- freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/xmlcdr.cpp (original)
+++ freeswitch/branches/mishehu/src/mod/event_handlers/mod_cdr/xmlcdr.cpp Sun Dec 3 23:06:03 2006
@@ -76,9 +76,7 @@
outputfile_name.append(".");
outputfile_name.append(myuuid); // The goal is to have a resulting filename of "/path/to/myuuid"
outputfile_name.append(".xml"); // .xml - "XML Data Dumper"
-
- outputfile.open(outputfile_name.c_str());
-
+
bool repeat = 1;
process_channel_variables(chanvars_supp_list,chanvars_fixed_list,newchannel->channel,repeat);
}
@@ -150,6 +148,8 @@
bool XmlCDR::process_record()
{
bool retval = 0;
+ outputfile.open(outputfile_name.c_str());
+
if(!outputfile)
switch_console_printf(SWITCH_CHANNEL_LOG, "XmlCDR::process_record(): Unable to open file %s to commit the call record to. Invalid path name, invalid permissions, or no space available?\n",outputfile_name.c_str());
else
@@ -215,6 +215,11 @@
void XmlCDR::disconnect()
{
+ activated = 0;
+ connectionstate = 0;
+ logchanvars = 0;
+ outputfile_path.clear();
+ chanvars_supp_list.clear();
switch_console_printf(SWITCH_CHANNEL_LOG,"Shutting down XmlCDR... Done!");
}
1
0
[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: anthm
Date: Sun Dec 3 19:04:20 2006
New Revision: 3524
Modified:
freeswitch/trunk/src/switch_ivr.c
Log:
fix
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Sun Dec 3 19:04:20 2006
@@ -2209,7 +2209,7 @@
if (switch_channel_get_state(peer_channels[i]) >= CS_HANGUP) {
hups++;
} 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))) &&
+ (!ringback_data && len == 1 && switch_channel_test_flag(peer_channels[i], CF_EARLY_MEDIA))) &&
!switch_channel_test_flag(peer_channels[i], CF_TAGGED)) {
if (key) {
1
0
Author: anthm
Date: Sun Dec 3 18:58:01 2006
New Revision: 3523
Modified:
freeswitch/trunk/src/switch_ivr.c
Log:
fix
Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c (original)
+++ freeswitch/trunk/src/switch_ivr.c Sun Dec 3 18:58:01 2006
@@ -2634,7 +2634,7 @@
goto notready;
}
- if (switch_core_session_dequeue_message(peer_sessions[0], &message) == SWITCH_STATUS_SUCCESS) {
+ if (peer_sessions[0] && 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);
}
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