Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
b24c2ac9
提交
b24c2ac9
authored
9月 30, 2016
作者:
Piotr Gregor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-9595 [avmd] Extend avmd show api
Add number of sessions currently running to output of avmd show api.
上级
de223ea2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
81 行增加
和
2 行删除
+81
-2
mod_avmd.c
src/mod/applications/mod_avmd/mod_avmd.c
+1
-0
avmd_originate_multiple.pl
.../applications/mod_avmd/scripts/avmd_originate_multiple.pl
+1
-1
avmd_originate_multiple_loopback.pl
...ions/mod_avmd/scripts/avmd_originate_multiple_loopback.pl
+78
-0
avmd_test.pl
src/mod/applications/mod_avmd/scripts/avmd_test.pl
+1
-1
没有找到文件。
src/mod/applications/mod_avmd/mod_avmd.c
浏览文件 @
b24c2ac9
...
...
@@ -943,6 +943,7 @@ static void avmd_show(switch_stream_handle_t *stream, switch_mutex_t *mutex) {
stream
->
write_function
(
stream
,
"inbound channel
\t
%u
\n
"
,
avmd_globals
.
settings
.
inbound_channnel
);
stream
->
write_function
(
stream
,
"outbound channel
\t
%u
\n
"
,
avmd_globals
.
settings
.
outbound_channnel
);
stream
->
write_function
(
stream
,
"detection mode
\t
%u
\n
"
,
avmd_globals
.
settings
.
mode
);
stream
->
write_function
(
stream
,
"sessions
\t
%"
PRId64
"
\n
"
,
avmd_globals
.
session_n
);
stream
->
write_function
(
stream
,
"
\n\n
"
);
if
(
mutex
!=
NULL
)
{
...
...
src/mod/applications/mod_avmd/scripts/avmd_originate_multiple.pl
浏览文件 @
b24c2ac9
...
...
@@ -16,7 +16,7 @@ use Time::HiRes;
my
$host
=
"127.0.0.1"
;
my
$port
=
"8021"
;
my
$pass
=
"ClueCon"
;
my
$extension_base
=
"sofia/internal/1000\@192.168.1.
60
"
;
my
$extension_base
=
"sofia/internal/1000\@192.168.1.
1
"
;
my
$playback
=
'local_stream://moh'
;
my
$context
=
'default'
;
...
...
src/mod/applications/mod_avmd/scripts/avmd_originate_multiple_loopback.pl
0 → 100644
浏览文件 @
b24c2ac9
#!/usr/bin/perl -w
#brief Call (possibly) multiple voicemails
# and print detection result to the console.
#author Piotr Gregor <piotrgregor@rsyncme.org>
#date 15 Sept 2016 02:44 PM
use
strict
;
use
warnings
;
require
ESL
;
use
POSIX
;
use
Time::
HiRes
;
my
$host
=
"127.0.0.1"
;
my
$port
=
"8021"
;
my
$pass
=
"ClueCon"
;
my
$extension_base
=
"sofia/internal/1000\@192.168.1.1"
;
my
$playback
=
'local_stream://moh'
;
my
$context
=
'default'
;
my
$gateway
;
my
$dest
;
my
$callerid
;
my
$thread_n
;
my
$idx
=
0
;
if
(
$#ARGV
+
1
eq
3
)
{
$dest
=
$ARGV
[
0
];
$callerid
=
$ARGV
[
1
];
$thread_n
=
$ARGV
[
2
];
print
"Dialing ["
.
$thread_n
.
"] calls simultaneously to [loopback]["
.
$dest
.
"] as ["
.
$callerid
.
"]\n"
;
}
else
{
die
"Please specify destination number, caller id and number of calls to make\n"
;
}
my
$con
=
new
ESL::
ESLconnection
(
$host
,
$port
,
$pass
);
if
(
!
$con
)
{
die
"Unable to establish connection to $host:$port\n"
;
}
if
(
$con
->
connected
())
{
print
"OK, Connected.\n"
;
}
else
{
die
"Connection failure.\n"
;
}
while
(
$con
->
connected
()
&&
(
$idx
<
$thread_n
))
{
call_once
(
$dest
,
$callerid
,
$idx
);
$idx
++
;
Time::HiRes::
sleep
(
0.11
);
# avoid switch_core_session.c:2265 Throttle Error! 33, switch_time.c:1227 Over Session Rate of 30!
}
print
"Disconnected.\n\n"
;
sub
call_once
{
my
(
$dest
,
$callerid
,
$idx
)
=
@_
;
my
$uuid
=
my
$originate_string
=
'originate '
.
'{ignore_early_media=true,'
.
'originator_codec=PCMA,'
.
'origination_uuid=%s,'
.
'originate_timeout=60,'
.
'origination_caller_id_number='
.
$callerid
.
','
.
'origination_caller_id_name='
.
$callerid
.
'}'
;
$originate_string
.=
'loopback/'
.
$dest
.
'/'
.
$context
;
$originate_string
.=
' '
.
'&playback('
.
$playback
.
')'
;
my
$uuid
=
$con
->
api
(
'create_uuid'
)
->
getBody
();
my
(
$time_epoch
,
$time_hires
)
=
Time::HiRes::
gettimeofday
();
printf
(
"[%s]\tCalling with uuid [%s] [%s]... [%s]\n"
,
$idx
+
1
,
$uuid
,
POSIX::
strftime
(
'%Y-%m-%d %H:%M:%S'
,
localtime
(
$time_epoch
)),
$originate_string
);
$con
->
bgapi
(
sprintf
(
$originate_string
,
$uuid
));
$con
->
api
(
'uuid_setvar '
.
$uuid
.
' execute_on_answer avmd_start'
);
}
src/mod/applications/mod_avmd/scripts/avmd_test.pl
浏览文件 @
b24c2ac9
...
...
@@ -169,7 +169,7 @@ $con->events("plain", "CHANNEL_HANGUP");
print
"OK.\n\n"
;
printf
(
"\nRunning ["
.
keys
(
%
numbers
)
.
"] tests.\n\n"
);
printf
(
"outbound uuid | destination number | timestamp | expectation | test result | freq | f-variance | amplitude | a-variance\n\n"
);
printf
(
"outbound uuid | destination number | timestamp | expectation | test result | freq | f-variance | amplitude | a-variance
| resolution | offset | idx
\n\n"
);
foreach
$dest
(
sort
keys
%
numbers
)
{
if
(
!
$con
->
connected
())
{
last
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论