Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
613db614
提交
613db614
authored
12月 20, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cdr update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@6916
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
36d84006
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
24 行增加
和
4 行删除
+24
-4
switch_channel.h
src/include/switch_channel.h
+1
-0
mod_cdr_csv.c
src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
+13
-2
switch_channel.c
src/switch_channel.c
+4
-2
switch_ivr.c
src/switch_ivr.c
+6
-0
没有找到文件。
src/include/switch_channel.h
浏览文件 @
613db614
...
...
@@ -41,6 +41,7 @@
#include <switch.h>
SWITCH_BEGIN_EXTERN_C
struct
switch_channel_timetable
{
switch_time_t
profile_created
;
switch_time_t
created
;
switch_time_t
answered
;
switch_time_t
hungup
;
...
...
src/mod/event_handlers/mod_cdr_csv/mod_cdr_csv.c
浏览文件 @
613db614
...
...
@@ -164,10 +164,10 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
switch_app_log_t
*
app_log
,
*
ap
;
char
*
last_app
=
NULL
,
*
last_arg
=
NULL
;
char
start
[
80
]
=
""
,
answer
[
80
]
=
""
,
end
[
80
]
=
""
,
tmp
[
80
]
=
""
;
char
start
[
80
]
=
""
,
answer
[
80
]
=
""
,
end
[
80
]
=
""
,
tmp
[
80
]
=
""
,
profile_start
[
80
]
=
""
;
int32_t
duration
=
0
,
billsec
=
0
,
mduration
=
0
,
billmsec
=
0
;
switch_time_t
uduration
=
0
,
billusec
=
0
;
time_t
tt_created
=
0
,
tt_answered
=
0
,
tt_hungup
=
0
,
mtt_created
=
0
,
mtt_answered
=
0
,
mtt_hungup
=
0
;
time_t
tt_created
=
0
,
tt_answered
=
0
,
tt_hungup
=
0
,
mtt_created
=
0
,
mtt_answered
=
0
,
mtt_hungup
=
0
,
tt_prof_created
,
mtt_prof_created
;
if
(
switch_channel_get_originator_caller_profile
(
channel
))
{
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -207,6 +207,10 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
switch_strftime
(
start
,
&
retsize
,
sizeof
(
start
),
fmt
,
&
tm
);
switch_channel_set_variable
(
channel
,
"start_stamp"
,
start
);
switch_time_exp_lt
(
&
tm
,
caller_profile
->
times
->
profile_created
);
switch_strftime
(
profile_start
,
&
retsize
,
sizeof
(
profile_start
),
fmt
,
&
tm
);
switch_channel_set_variable
(
channel
,
"profile_start_stamp"
,
profile_start
);
switch_time_exp_lt
(
&
tm
,
caller_profile
->
times
->
answered
);
switch_strftime
(
answer
,
&
retsize
,
sizeof
(
answer
),
fmt
,
&
tm
);
switch_channel_set_variable
(
channel
,
"answer_stamp"
,
answer
);
...
...
@@ -217,10 +221,17 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
tt_created
=
(
time_t
)
(
caller_profile
->
times
->
created
/
1000000
);
mtt_created
=
(
time_t
)
(
caller_profile
->
times
->
created
/
1000
);
tt_prof_created
=
(
time_t
)
(
caller_profile
->
times
->
profile_created
/
1000000
);
mtt_prof_created
=
(
time_t
)
(
caller_profile
->
times
->
profile_created
/
1000
);
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%"
TIME_T_FMT
,
tt_created
);
switch_channel_set_variable
(
channel
,
"start_epoch"
,
tmp
);
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%"
SWITCH_TIME_T_FMT
,
caller_profile
->
times
->
created
);
switch_channel_set_variable
(
channel
,
"start_uepoch"
,
tmp
);
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%"
TIME_T_FMT
,
tt_prof_created
);
switch_channel_set_variable
(
channel
,
"profile_start_epoch"
,
tmp
);
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%"
SWITCH_TIME_T_FMT
,
caller_profile
->
times
->
profile_created
);
switch_channel_set_variable
(
channel
,
"profile_start_uepoch"
,
tmp
);
tt_answered
=
(
time_t
)
(
caller_profile
->
times
->
answered
/
1000000
);
mtt_answered
=
(
time_t
)
(
caller_profile
->
times
->
answered
/
1000
);
...
...
src/switch_channel.c
浏览文件 @
613db614
...
...
@@ -957,11 +957,13 @@ SWITCH_DECLARE(void) switch_channel_set_caller_profile(switch_channel_t *channel
}
caller_profile
->
times
=
(
switch_channel_timetable_t
*
)
switch_core_session_alloc
(
channel
->
session
,
sizeof
(
*
caller_profile
->
times
));
caller_profile
->
times
->
created
=
switch_time_now
();
caller_profile
->
times
->
profile_
created
=
switch_time_now
();
if
(
channel
->
caller_profile
&&
channel
->
caller_profile
->
times
)
{
channel
->
caller_profile
->
times
->
transferred
=
caller_profile
->
times
->
created
;
channel
->
caller_profile
->
times
->
transferred
=
caller_profile
->
times
->
profile_
created
;
caller_profile
->
times
->
answered
=
channel
->
caller_profile
->
times
->
answered
;
caller_profile
->
times
->
created
=
channel
->
caller_profile
->
times
->
created
;
caller_profile
->
times
->
hungup
=
channel
->
caller_profile
->
times
->
hungup
;
}
caller_profile
->
next
=
channel
->
caller_profile
;
...
...
src/switch_ivr.c
浏览文件 @
613db614
...
...
@@ -1460,6 +1460,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_generate_xml_cdr(switch_core_session_
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%"
SWITCH_TIME_T_FMT
,
caller_profile
->
times
->
created
);
switch_xml_set_txt_d
(
time_tag
,
tmp
);
if
(
!
(
time_tag
=
switch_xml_add_child_d
(
x_times
,
"profile_created_time"
,
t_off
++
)))
{
goto
error
;
}
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%"
SWITCH_TIME_T_FMT
,
caller_profile
->
times
->
profile_created
);
switch_xml_set_txt_d
(
time_tag
,
tmp
);
if
(
!
(
time_tag
=
switch_xml_add_child_d
(
x_times
,
"answered_time"
,
t_off
++
)))
{
goto
error
;
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论