提交 087d7313 authored 作者: Michael Jerris's avatar Michael Jerris

add answer application, change playback to preanswer by default.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2403 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 f83a8ecf
......@@ -45,6 +45,14 @@ static void sleep_function(switch_core_session_t *session, char *data)
}
}
static void answer_function(switch_core_session_t *session, char *data)
{
switch_channel_t *channel;
channel = switch_core_session_get_channel(session);
assert(channel != NULL);
switch_channel_answer(channel);
}
static void set_function(switch_core_session_t *session, char *data)
{
switch_channel_t *channel;
......@@ -118,11 +126,19 @@ static const switch_application_interface_t set_application_interface = {
/*.application_function */ set_function
};
static const switch_application_interface_t answer_application_interface = {
/*.interface_name */ "answer",
/*.application_function */ answer_function,
NULL,NULL,NULL,
&set_application_interface
};
static const switch_application_interface_t strftime_application_interface = {
/*.interface_name */ "strftime",
/*.application_function */ strftime_function,
NULL,NULL,NULL,
&set_application_interface
&answer_application_interface
};
......
......@@ -91,7 +91,7 @@ static void speak_function(switch_core_session_t *session, char *data)
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
}
switch_channel_answer(channel);
switch_channel_pre_answer(channel);
switch_ivr_speak_text(session, engine, voice, timer_name, codec->implementation->samples_per_second, on_dtmf, text, buf, sizeof(buf));
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论