提交 09d42df7 authored 作者: Anthony Minessale's avatar Anthony Minessale

add urgentness

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5855 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 cf58dd44
......@@ -23,6 +23,10 @@
<param name="delete-file-key" value="7"/>
<param name="undelete-file-key" value="8"/>
<param name="email-key" value="4"/>
<param name="pause-key" value="0"/>
<param name="restart-key" value="1"/>
<param name="ff-key" value="6"/>
<param name="rew-key" value="4"/>
<!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
</profile>
</profiles>
......
......@@ -47,23 +47,14 @@
</input>
</macro>
<macro name="voicemail_new_message_count">
<input pattern="(.*)">
<match>
<action function="speak-text" data="you have $1 new messages in folder ${voicemail_current_folder}"/>
</match>
</input>
</macro>
<macro name="voicemail_saved_message_count">
<input pattern="(.*)">
<macro name="voicemail_message_count">
<input pattern="^([^:]+):([^:]+):{0,1}(.*)">
<match>
<action function="speak-text" data="you have $1 saved messages in folder ${voicemail_current_folder}"/>
<action function="speak-text" data="you have $1 $2 $3 messages in folder ${voicemail_current_folder}"/>
</match>
</input>
</macro>
<macro name="voicemail_menu">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>
......@@ -102,6 +93,15 @@
</input>
</macro>
<macro name="voicemail_record_urgent_check">
<input pattern="^([0-9#*]):([0-9#*])$">
<match>
<action function="speak-text"
data="press $1 to mark this message urgent or press $2 to continue"/>
</match>
</input>
</macro>
<macro name="voicemail_listen_file_check">
<input pattern="^([0-9#*]):([0-9#*]):([0-9#*]):([0-9#*])$">
<match>
......@@ -202,7 +202,7 @@
<macro name="voicemail_say_date">
<input pattern="^(.*)$">
<match>
<action function="speak-text" data="$strftime($1|%A, %B %d %Y, %I %m %p)"/>
<action function="speak-text" data="$strftime($1|%A, %B %d %Y, %I %M %p)"/>
</match>
</input>
</macro>
......
......@@ -211,7 +211,14 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
for (hp = event->headers; hp; hp = hp->next) {
if (!strncasecmp(hp->name, "mwi-", 4)) {
stream.write_function(&stream, "%s: %s\r\n", hp->name + 4, hp->value);
char *tmp = NULL;
char *value = hp->value;
if (!strcasecmp(hp->name, "mwi-message-account") && strncasecmp(hp->value, "sip:", 4)) {
tmp = switch_mprintf("sip:%s", hp->value);
value = tmp;
}
stream.write_function(&stream, "%s: %s\r\n", hp->name + 4, value);
switch_safe_free(tmp);
}
}
......@@ -223,7 +230,6 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
switch_safe_free(stream.data);
assert (sql != NULL);
sofia_glue_execute_sql_callback(profile,
SWITCH_FALSE,
profile->ireg_mutex,
......@@ -603,6 +609,8 @@ static int sofia_presence_mwi_callback(void *pArg, int argc, char **argv, char *
contact = sofia_glue_get_url_from_contact(tmp, 0);
nua_notify(nh,
NUTAG_WITH_THIS(profile->nua),
NUTAG_NEWSUB(1),
NUTAG_URL(contact),
SIPTAG_TO_STR(full_from),
SIPTAG_FROM_STR(id),
......
......@@ -156,8 +156,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
tts_engine = (char *) switch_xml_attr_soft(language, "tts_engine");
tts_voice = (char *) switch_xml_attr_soft(language, "tts_voice");
old_sound_prefix = switch_channel_get_variable(channel, "sound_prefix");
switch_channel_set_variable(channel, "sound_prefix", sound_path);
if (sound_path) {
old_sound_prefix = switch_channel_get_variable(channel, "sound_prefix");
switch_channel_set_variable(channel, "sound_prefix", sound_path);
}
if (!(macro = switch_xml_child(language, "macro"))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "can't find any macro tags.\n");
......@@ -269,9 +271,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
}
done:
switch_channel_set_variable(channel, "sound_prefix", old_sound_prefix);
if (old_sound_prefix) {
switch_channel_set_variable(channel, "sound_prefix", old_sound_prefix);
}
if (xml) {
switch_xml_free(xml);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论