rearrange the furnature

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1846 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2006-07-12 18:39:19 +00:00
1 parent 03ac8289e8
commit d77e574d4e
12 files changed
+490 -310

No files matched your search

+27 -11
View File
@@ -39,16 +39,23 @@ static const char modname[] = "mod_ivrtest";
dtmf handler function you can hook up to be executed when a digit is dialed during playback
if you return anything but SWITCH_STATUS_SUCCESS the playback will stop.
*/
static switch_status_t on_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t on_dtmf(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
switch (itype) {
case SWITCH_INPUT_TYPE_DTMF: {
char *dtmf = (char *) input;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
switch_copy_string((char *)buf, dtmf, buflen);
return SWITCH_STATUS_BREAK;
switch_copy_string((char *)buf, dtmf, buflen);
return SWITCH_STATUS_BREAK;
}
break;
default:
break;
}
return SWITCH_STATUS_SUCCESS;
}
static void disast_function(switch_core_session_t *session, char *data)
{
void *x = NULL;
@@ -107,13 +114,22 @@ static void dirtest_function(switch_core_session_t *session, char *data)
}
static switch_status_t show_dtmf(switch_core_session_t *session, char *dtmf, void *buf, unsigned int buflen)
static switch_status_t show_dtmf(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
switch_copy_string((char *)buf, dtmf, buflen);
return SWITCH_STATUS_SUCCESS;
switch (itype) {
case SWITCH_INPUT_TYPE_DTMF: {
char *dtmf = (char *) input;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Digits %s\n", dtmf);
switch_copy_string((char *)buf, dtmf, buflen);
}
break;
default:
break;
}
return SWITCH_STATUS_SUCCESS;
}
static void tts_function(switch_core_session_t *session, char *data)