mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-07 05:29:22 +00:00
merge
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1579 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
21f0c64dc3
commit
b3e047f386
@ -135,7 +135,7 @@ static void rss_function(switch_core_session_t *session, char *data)
|
|||||||
const char *err = NULL;
|
const char *err = NULL;
|
||||||
struct dtmf_buffer dtb = {0};
|
struct dtmf_buffer dtb = {0};
|
||||||
switch_xml_t xml = NULL, item, xchannel = NULL;
|
switch_xml_t xml = NULL, item, xchannel = NULL;
|
||||||
struct shashdot_entry entries[TTS_MAX_ENTRIES] = {0};
|
struct shashdot_entry entries[TTS_MAX_ENTRIES] = {{0}};
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
char *title_txt = "", *description_txt = "", *rights_txt = "";
|
char *title_txt = "", *description_txt = "", *rights_txt = "";
|
||||||
switch_codec_t speech_codec, *codec = switch_core_session_get_read_codec(session);
|
switch_codec_t speech_codec, *codec = switch_core_session_get_read_codec(session);
|
||||||
@ -158,6 +158,10 @@ static void rss_function(switch_core_session_t *session, char *data)
|
|||||||
char buf[1024];
|
char buf[1024];
|
||||||
int32_t jumpto = -1;
|
int32_t jumpto = -1;
|
||||||
|
|
||||||
|
channel = switch_core_session_get_channel(session);
|
||||||
|
assert(channel != NULL);
|
||||||
|
|
||||||
|
|
||||||
if (!(cxml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
if (!(cxml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "open of %s failed\n", cf);
|
||||||
return;
|
return;
|
||||||
@ -179,6 +183,17 @@ static void rss_function(switch_core_session_t *session, char *data)
|
|||||||
|
|
||||||
switch_xml_free(cxml);
|
switch_xml_free(cxml);
|
||||||
|
|
||||||
|
switch_channel_answer(channel);
|
||||||
|
|
||||||
|
|
||||||
|
for (dtb.index = 0; dtb.index < 10; dtb.index++) {
|
||||||
|
if ((status = switch_core_session_read_frame(session, &read_frame, -1, 0)) != SWITCH_STATUS_SUCCESS) {
|
||||||
|
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!switch_strlen_zero(data)) {
|
if (!switch_strlen_zero(data)) {
|
||||||
if ((mydata = switch_core_session_strdup(session, data))) {
|
if ((mydata = switch_core_session_strdup(session, data))) {
|
||||||
argc = switch_separate_string(mydata, ' ', argv, sizeof(argv)/sizeof(argv[0]));
|
argc = switch_separate_string(mydata, ' ', argv, sizeof(argv)/sizeof(argv[0]));
|
||||||
@ -207,13 +222,6 @@ static void rss_function(switch_core_session_t *session, char *data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
channel = switch_core_session_get_channel(session);
|
|
||||||
assert(channel != NULL);
|
|
||||||
|
|
||||||
|
|
||||||
switch_channel_answer(channel);
|
|
||||||
|
|
||||||
|
|
||||||
memset(&sh, 0, sizeof(sh));
|
memset(&sh, 0, sizeof(sh));
|
||||||
if (switch_core_speech_open(&sh,
|
if (switch_core_speech_open(&sh,
|
||||||
engine,
|
engine,
|
||||||
@ -403,13 +411,6 @@ static void rss_function(switch_core_session_t *session, char *data)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (dtb.index = 0; dtb.index < 10; dtb.index++) {
|
|
||||||
if ((status = switch_core_session_read_frame(session, &read_frame, -1, 0)) != SWITCH_STATUS_SUCCESS) {
|
|
||||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
|
||||||
goto done;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (switch_channel_ready(channel)) {
|
if (switch_channel_ready(channel)) {
|
||||||
switch_time_exp_t tm;
|
switch_time_exp_t tm;
|
||||||
char date[80] = "";
|
char date[80] = "";
|
||||||
@ -438,6 +439,9 @@ static void rss_function(switch_core_session_t *session, char *data)
|
|||||||
case '0':
|
case '0':
|
||||||
switch_set_flag(&dtb, SFLAG_INSTRUCT);
|
switch_set_flag(&dtb, SFLAG_INSTRUCT);
|
||||||
break;
|
break;
|
||||||
|
case '#':
|
||||||
|
goto main_menu;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user