Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
2c00f4c5
提交
2c00f4c5
authored
7月 10, 2013
作者:
Michael S Collins
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v1.2.stable' of
ssh://git.freeswitch.org:222/freeswitch
into v1.2.stable
上级
13de330c
2ec821b7
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
105 行增加
和
39 行删除
+105
-39
fs_cli.c
libs/esl/fs_cli.c
+2
-2
mod_commands.c
src/mod/applications/mod_commands/mod_commands.c
+18
-3
mod_h323.cpp
src/mod/endpoints/mod_h323/mod_h323.cpp
+28
-0
mod_say_de.c
src/mod/say/mod_say_de/mod_say_de.c
+56
-33
switch_ivr_play_say.c
src/switch_ivr_play_say.c
+1
-1
没有找到文件。
libs/esl/fs_cli.c
浏览文件 @
2c00f4c5
...
...
@@ -764,8 +764,8 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
SetConsoleTextAttribute
(
hStdout
,
colors
[
level
]);
}
if
(
global_profile
->
log_uuid
&&
!
esl_strlen_zero
(
userdata
))
{
WriteFile
(
hStdout
,
userdata
,
strlen
(
userdata
),
&
outbytes
,
NULL
);
WriteFile
(
hStdout
,
" "
,
strlen
(
" "
),
&
outbytes
,
NULL
);
WriteFile
(
hStdout
,
userdata
,
(
DWORD
)
strlen
(
userdata
),
&
outbytes
,
NULL
);
WriteFile
(
hStdout
,
" "
,
(
DWORD
)
strlen
(
" "
),
&
outbytes
,
NULL
);
}
WriteFile
(
hStdout
,
handle
->
last_event
->
body
,
len
,
&
outbytes
,
NULL
);
if
(
!
(
global_profile
->
batch_mode
))
{
...
...
src/mod/applications/mod_commands/mod_commands.c
浏览文件 @
2c00f4c5
...
...
@@ -4390,7 +4390,11 @@ static int show_as_json_callback(void *pArg, int argc, char **argv, char **colum
}
if
(
holder
->
justcount
)
{
holder
->
count
++
;
if
(
zstr
(
argv
[
0
]))
{
holder
->
count
=
0
;
}
else
{
holder
->
count
=
(
uint32_t
)
atoi
(
argv
[
0
]);
}
return
0
;
}
...
...
@@ -4430,7 +4434,11 @@ static int show_as_xml_callback(void *pArg, int argc, char **argv, char **column
}
if
(
holder
->
justcount
)
{
holder
->
count
++
;
if
(
zstr
(
argv
[
0
]))
{
holder
->
count
=
0
;
}
else
{
holder
->
count
=
(
uint32_t
)
atoi
(
argv
[
0
]);
}
return
0
;
}
...
...
@@ -4468,7 +4476,11 @@ static int show_callback(void *pArg, int argc, char **argv, char **columnNames)
int
x
;
if
(
holder
->
justcount
)
{
holder
->
count
++
;
if
(
zstr
(
argv
[
0
]))
{
holder
->
count
=
0
;
}
else
{
holder
->
count
=
(
uint32_t
)
atoi
(
argv
[
0
]);
}
return
0
;
}
...
...
@@ -4704,6 +4716,7 @@ SWITCH_STANDARD_API(show_function)
if
(
!
strcasecmp
(
command
,
"calls"
))
{
sprintf
(
sql
,
"select * from basic_calls where hostname='%s' order by call_created_epoch"
,
hostname
);
if
(
argv
[
1
]
&&
!
strcasecmp
(
argv
[
1
],
"count"
))
{
sprintf
(
sql
,
"select count(*) from basic_calls where hostname='%s'"
,
hostname
);
holder
.
justcount
=
1
;
if
(
argv
[
3
]
&&
!
strcasecmp
(
argv
[
2
],
"as"
))
{
as
=
argv
[
3
];
...
...
@@ -4712,6 +4725,7 @@ SWITCH_STANDARD_API(show_function)
}
else
if
(
!
strcasecmp
(
command
,
"registrations"
))
{
sprintf
(
sql
,
"select * from registrations where hostname='%s'"
,
hostname
);
if
(
argv
[
1
]
&&
!
strcasecmp
(
argv
[
1
],
"count"
))
{
sprintf
(
sql
,
"select count(*) from registrations where hostname='%s'"
,
hostname
);
holder
.
justcount
=
1
;
if
(
argv
[
3
]
&&
!
strcasecmp
(
argv
[
2
],
"as"
))
{
as
=
argv
[
3
];
...
...
@@ -4743,6 +4757,7 @@ SWITCH_STANDARD_API(show_function)
}
else
if
(
!
strcasecmp
(
command
,
"channels"
))
{
sprintf
(
sql
,
"select * from channels where hostname='%s' order by created_epoch"
,
hostname
);
if
(
argv
[
1
]
&&
!
strcasecmp
(
argv
[
1
],
"count"
))
{
sprintf
(
sql
,
"select count(*) from channels where hostname='%s'"
,
hostname
);
holder
.
justcount
=
1
;
if
(
argv
[
3
]
&&
!
strcasecmp
(
argv
[
2
],
"as"
))
{
as
=
argv
[
3
];
...
...
src/mod/endpoints/mod_h323/mod_h323.cpp
浏览文件 @
2c00f4c5
...
...
@@ -1591,7 +1591,35 @@ switch_status_t FSH323Connection::receive_message(switch_core_session_message_t
}
break
;
}
case
SWITCH_MESSAGE_INDICATE_DEBUG_MEDIA
:{
if
(
switch_rtp_ready
(
tech_pvt
->
rtp_session
)
&&
!
zstr
(
msg
->
string_array_arg
[
0
])
&&
!
zstr
(
msg
->
string_array_arg
[
1
]))
{
switch_rtp_flag_t
flags
=
0
;
int
x
=
0
;
if
(
!
strcasecmp
(
msg
->
string_array_arg
[
0
],
"read"
))
{
x
++
;
flags
|=
SWITCH_RTP_FLAG_DEBUG_RTP_READ
;
}
else
if
(
!
strcasecmp
(
msg
->
string_array_arg
[
0
],
"write"
))
{
x
++
;
flags
|=
SWITCH_RTP_FLAG_DEBUG_RTP_WRITE
;
}
else
if
(
!
strcasecmp
(
msg
->
string_array_arg
[
0
],
"both"
))
{
x
++
;
x
++
;
flags
|=
SWITCH_RTP_FLAG_DEBUG_RTP_READ
|
SWITCH_RTP_FLAG_DEBUG_RTP_WRITE
;
}
else
if
(
*
msg
->
string_array_arg
[
0
]
==
'v'
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
m_fsSession
),
SWITCH_LOG_ERROR
,
"Video is not supported yet
\n
"
);
break
;
}
if
(
x
)
{
if
(
switch_true
(
msg
->
string_array_arg
[
1
]))
{
switch_rtp_set_flag
(
tech_pvt
->
rtp_session
,
flags
);
}
else
{
switch_rtp_clear_flag
(
tech_pvt
->
rtp_session
,
flags
);
}
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
m_fsSession
),
SWITCH_LOG_ERROR
,
"Invalid Options
\n
"
);
}
}
break
;
}
default
:
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Received message id = %d [%p]
\n
"
,
msg
->
message_id
,
this
);
}
...
...
src/mod/say/mod_say_de/mod_say_de.c
浏览文件 @
2c00f4c5
...
...
@@ -91,7 +91,7 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_
}
else
{
say_file
(
"digits/%d.wav"
,
a
);
}
say_file
(
"digits/hundred.wav"
);
say_file
(
"digits/hundred.wav"
);
}
if
(
b
)
{
...
...
@@ -106,13 +106,25 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_
say_file
(
"currency/and.wav"
);
}
if
(
method
==
SSM_COUNTED
)
{
say_file
(
"digits/h-%d0.wav"
,
b
);
if
(
gender
==
SSG_MASCULINE
)
{
say_file
(
"digits/h-%d0_m.wav"
,
b
);
}
else
if
(
gender
==
SSG_NEUTER
)
{
say_file
(
"digits/h-%d0_n.wav"
,
b
);
}
else
{
say_file
(
"digits/h-%d0.wav"
,
b
);
}
}
else
{
say_file
(
"digits/%d0.wav"
,
b
);
}
}
else
{
if
(
method
==
SSM_COUNTED
)
{
say_file
(
"digits/h-%d%d.wav"
,
b
,
c
);
if
(
gender
==
SSG_MASCULINE
)
{
say_file
(
"digits/h-%d%d_m.wav"
,
b
,
c
);
}
else
if
(
gender
==
SSG_NEUTER
)
{
say_file
(
"digits/h-%d%d_n.wav"
,
b
,
c
);
}
else
{
say_file
(
"digits/h-%d%d.wav"
,
b
,
c
);
}
}
else
{
say_file
(
"digits/%d%d.wav"
,
b
,
c
);
}
...
...
@@ -122,12 +134,18 @@ static switch_status_t play_group(switch_say_method_t method, switch_say_gender_
if
(
c
)
{
if
(
method
==
SSM_COUNTED
)
{
say_file
(
"digits/h-%d.wav"
,
c
);
if
(
gender
==
SSG_MASCULINE
)
{
say_file
(
"digits/h-%d_m.wav"
,
c
);
}
else
if
(
gender
==
SSG_NEUTER
)
{
say_file
(
"digits/h-%d_n.wav"
,
c
);
}
else
{
say_file
(
"digits/h-%d.wav"
,
c
);
}
}
else
{
/*"one" used as an article is feminine or masculine in german, e.g. voicemail-message is feminine
only applies to the likes of 1, 101, 1001 etc.*/
if
(
b
==
0
&&
c
==
1
&&
gender
==
SSG_FEMININE
)
{
say_file
(
"digits/
%d_f.wav"
,
c
);
say_file
(
"digits/
1_f.wav"
);
}
else
if
(
b
==
0
&&
c
==
1
&&
what
)
{
say_file
(
"digits/s-1.wav"
);
}
else
{
...
...
@@ -251,10 +269,11 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
}
if
(
hours
)
{
say_num
(
hours
,
SSM_PRONOUNCED
);
if
(
hours
==
1
)
{
say_file
(
"digits/1_f.wav"
);
say_file
(
"time/hour.wav"
);
}
else
{
say_num
(
hours
,
SSM_PRONOUNCED
);
say_file
(
"time/hours.wav"
);
}
}
else
{
...
...
@@ -263,10 +282,11 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
}
if
(
minutes
)
{
say_num
(
minutes
,
SSM_PRONOUNCED
);
if
(
minutes
==
1
)
{
say_file
(
"digits/1_f.wav"
);
say_file
(
"time/minute.wav"
);
}
else
{
say_num
(
minutes
,
SSM_PRONOUNCED
);
say_file
(
"time/minutes.wav"
);
}
}
else
{
...
...
@@ -274,11 +294,13 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
say_file
(
"time/minutes.wav"
);
}
say_file
(
"currency/and.wav"
);
if
(
seconds
)
{
say_num
(
seconds
,
SSM_PRONOUNCED
);
if
(
seconds
==
1
)
{
say_file
(
"digits/1_f.wav"
);
say_file
(
"time/second.wav"
);
}
else
{
say_num
(
seconds
,
SSM_PRONOUNCED
);
say_file
(
"time/seconds.wav"
);
}
}
else
{
...
...
@@ -311,6 +333,7 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
}
if
(
say_date
)
{
say_args
->
gender
=
SSG_MASCULINE
;
say_file
(
"time/day-%d.wav"
,
tm
.
tm_wday
);
say_num
(
tm
.
tm_mday
,
SSM_COUNTED
);
say_file
(
"time/mon-%d.wav"
,
tm
.
tm_mon
);
...
...
@@ -318,29 +341,27 @@ static switch_status_t de_say_time(switch_core_session_t *session, char *tosay,
}
if
(
say_time
)
{
int32_t
hour
=
tm
.
tm_hour
,
pm
=
0
;
if
(
hour
>
12
)
{
hour
-=
12
;
pm
=
1
;
}
else
if
(
hour
==
12
)
{
pm
=
1
;
}
else
if
(
hour
==
0
)
{
hour
=
12
;
pm
=
0
;
if
(
say_date
)
{
say_file
(
"time/at.wav"
);
}
say_num
(
hour
,
SSM_PRONOUNCED
);
say_file
(
"time/oclock.wav"
);
if
(
tm
.
tm_min
>
9
)
{
say_num
(
tm
.
tm_min
,
SSM_PRONOUNCED
);
}
else
if
(
tm
.
tm_min
)
{
say_file
(
"time/oh.wav"
);
say_num
(
tm
.
tm_min
,
SSM_PRONOUNCED
);
if
(
tm
.
tm_hour
==
1
)
{
say_file
(
"digits/s-1.wav"
);
}
else
{
say_num
(
tm
.
tm_hour
,
SSM_PRONOUNCED
);
}
say_file
(
"time/oclock.wav"
);
if
(
tm
.
tm_min
>
0
)
{
say_file
(
"currency/and.wav"
);
if
(
tm
.
tm_min
==
1
)
{
say_file
(
"digits/1_f.wav"
)
say_file
(
"time/minute.wav"
);
}
else
{
say_num
(
tm
.
tm_min
,
SSM_PRONOUNCED
);
say_file
(
"time/minutes.wav"
);
}
}
say_file
(
"time/%s.wav"
,
pm
?
"p-m"
:
"a-m"
);
}
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -378,23 +399,25 @@ static switch_status_t de_say_money(switch_core_session_t *session, char *tosay,
dollars
++
;
}
/* Say dollar amount */
de_say_general_count
(
session
,
dollars
,
say_args
,
args
);
if
(
atoi
(
dollars
)
==
1
)
{
say_file
(
"digits/s-1.wav"
);
say_file
(
"currency/dollar.wav"
);
}
else
{
de_say_general_count
(
session
,
dollars
,
say_args
,
args
);
say_file
(
"currency/dollars.wav"
);
}
/* Say "and" */
say_file
(
"currency/and.wav"
);
/* Say cents */
if
(
cents
)
{
de_say_general_count
(
session
,
cents
,
say_args
,
args
);
/* Say "and" */
say_file
(
"currency/and.wav"
);
if
(
atoi
(
cents
)
==
1
)
{
say_file
(
"digits/s-1.wav"
);
say_file
(
"currency/cent.wav"
);
}
else
{
de_say_general_count
(
session
,
cents
,
say_args
,
args
);
say_file
(
"currency/cents.wav"
);
}
}
else
{
...
...
src/switch_ivr_play_say.c
浏览文件 @
2c00f4c5
...
...
@@ -1704,7 +1704,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess
if
(
read_impl
.
samples_per_second
)
{
switch_channel_set_variable_printf
(
channel
,
"playback_seconds"
,
"%d"
,
fh
->
samples_in
/
fh
->
native_rate
);
switch_channel_set_variable_printf
(
channel
,
"playback_ms"
,
"%d"
,
fh
->
samples_in
/
fh
->
native_rate
);
switch_channel_set_variable_printf
(
channel
,
"playback_ms"
,
"%d"
,
fh
->
samples_in
/
(
fh
->
native_rate
/
1000
)
);
}
switch_channel_set_variable_printf
(
channel
,
"playback_samples"
,
"%d"
,
fh
->
samples_in
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论