Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
a41505f6
提交
a41505f6
authored
2月 23, 2015
作者:
Brian West
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7313 #resolve any further issues in this code it will just be removed
上级
bf8e241c
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
16 行增加
和
0 行删除
+16
-0
mod_voicemail.c
src/mod/applications/mod_voicemail/mod_voicemail.c
+16
-0
没有找到文件。
src/mod/applications/mod_voicemail/mod_voicemail.c
浏览文件 @
a41505f6
...
@@ -5953,6 +5953,7 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
...
@@ -5953,6 +5953,7 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
msg_get_callback_t
cbt
=
{
0
};
msg_get_callback_t
cbt
=
{
0
};
char
*
sql
;
char
*
sql
;
switch_memory_pool_t
*
pool
;
switch_memory_pool_t
*
pool
;
switch_xml_t
x_user
=
NULL
;
switch_core_new_memory_pool
(
&
pool
);
switch_core_new_memory_pool
(
&
pool
);
...
@@ -5972,11 +5973,18 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
...
@@ -5972,11 +5973,18 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
if
(
argv
[
4
])
if
(
argv
[
4
])
email
=
argv
[
4
];
email
=
argv
[
4
];
if
(
!
profile_name
||
!
domain
||
!
id
||
!
uuid
||
!
email
)
{
if
(
!
profile_name
||
!
domain
||
!
id
||
!
uuid
||
!
email
)
{
stream
->
write_function
(
stream
,
"-ERR Missing Arguments
\n
"
);
stream
->
write_function
(
stream
,
"-ERR Missing Arguments
\n
"
);
goto
done
;
goto
done
;
}
}
if
(
switch_xml_locate_user_merged
(
"id"
,
id
,
domain
,
NULL
,
&
x_user
,
NULL
)
!=
SWITCH_STATUS_SUCCESS
)
{
stream
->
write_function
(
stream
,
"-ERR Can't locate user.
\n
"
);
switch_xml_free
(
x_user
);
goto
done
;
}
if
(
!
(
profile
=
get_profile
(
profile_name
)))
{
if
(
!
(
profile
=
get_profile
(
profile_name
)))
{
stream
->
write_function
(
stream
,
"-ERR Profile not found
\n
"
);
stream
->
write_function
(
stream
,
"-ERR Profile not found
\n
"
);
goto
done
;
goto
done
;
...
@@ -5998,6 +6006,7 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
...
@@ -5998,6 +6006,7 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
switch_core_time_duration_t
duration
;
switch_core_time_duration_t
duration
;
char
duration_str
[
80
];
char
duration_str
[
80
];
char
*
formatted_cid_num
=
NULL
;
char
*
formatted_cid_num
=
NULL
;
char
*
msg_uuid
=
NULL
;
sql
=
switch_mprintf
(
"select created_epoch, read_epoch, username, domain, uuid, cid_name, cid_number, in_folder, file_path, message_len, flags, read_flags, forwarded_by from voicemail_msgs WHERE username = '%q' AND domain = '%q' AND uuid = '%q' ORDER BY read_flags, created_epoch"
,
id
,
domain
,
uuid
);
sql
=
switch_mprintf
(
"select created_epoch, read_epoch, username, domain, uuid, cid_name, cid_number, in_folder, file_path, message_len, flags, read_flags, forwarded_by from voicemail_msgs WHERE username = '%q' AND domain = '%q' AND uuid = '%q' ORDER BY read_flags, created_epoch"
,
id
,
domain
,
uuid
);
memset
(
&
cbt
,
0
,
sizeof
(
cbt
));
memset
(
&
cbt
,
0
,
sizeof
(
cbt
));
...
@@ -6005,6 +6014,13 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
...
@@ -6005,6 +6014,13 @@ SWITCH_STANDARD_API(vm_fsdb_msg_email_function)
vm_execute_sql_callback
(
profile
,
profile
->
mutex
,
sql
,
message_get_callback
,
&
cbt
);
vm_execute_sql_callback
(
profile
,
profile
->
mutex
,
sql
,
message_get_callback
,
&
cbt
);
switch_safe_free
(
sql
);
switch_safe_free
(
sql
);
msg_uuid
=
switch_event_get_header
(
cbt
.
my_params
,
"VM-Message-UUID"
);
if
(
!
msg_uuid
)
{
profile_rwunlock
(
profile
);
stream
->
write_function
(
stream
,
"-ERR Invalid Message UUID
\n
"
);
goto
done
;
}
if
(
!
strcasecmp
(
switch_event_get_header
(
cbt
.
my_params
,
"VM-Message-Read-Flags"
),
URGENT_FLAG_STRING
))
{
if
(
!
strcasecmp
(
switch_event_get_header
(
cbt
.
my_params
,
"VM-Message-Read-Flags"
),
URGENT_FLAG_STRING
))
{
priority
=
1
;
priority
=
1
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论