Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ab292dc3
提交
ab292dc3
authored
7月 14, 2014
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add some more signal tracking to verto
上级
236233d2
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
39 行增加
和
11 行删除
+39
-11
index.html
html5/verto/demo/index.html
+1
-0
verto-min.js
html5/verto/demo/js/verto-min.js
+0
-0
verto.js
html5/verto/demo/verto.js
+4
-0
jquery.verto.js
html5/verto/js/src/jquery.verto.js
+28
-10
mod_verto.c
src/mod/endpoints/mod_verto/mod_verto.c
+6
-1
没有找到文件。
html5/verto/demo/index.html
浏览文件 @
ab292dc3
...
...
@@ -156,6 +156,7 @@
<button
data-inline=
"true"
id=
"clearbtn"
>
Clear
</button>
<button
data-inline=
"true"
id=
"callbtn"
>
Call
</button>
<br><br>
<div
style=
"color:blue"
id=
"main_info"
>
</div><br><br>
<img
src=
"img/verto_black_web.gif"
width=
"300"
><br><br>
<button
data-inline=
"true"
id=
"logoutbtn"
>
Log Out
</button>
</div>
...
...
html5/verto/demo/js/verto-min.js
浏览文件 @
ab292dc3
This diff was suppressed by a .gitattributes entry.
html5/verto/demo/verto.js
浏览文件 @
ab292dc3
...
...
@@ -145,7 +145,9 @@ var callbacks = {
goto_page
(
"incall"
);
break
;
case
$
.
verto
.
enum
.
state
.
hangup
:
$
(
"#main_info"
).
html
(
"Call ended with cause: "
+
d
.
cause
);
case
$
.
verto
.
enum
.
state
.
destroy
:
$
(
"#hangup_cause"
).
html
(
""
);
clearConfMan
();
goto_page
(
"main"
);
cur_call
=
null
;
...
...
@@ -251,6 +253,8 @@ $("#callbtn").click(function() {
return
;
}
$
(
"#main_info"
).
html
(
"Trying"
);
cur_call
=
verto
.
newCall
({
destination_number
:
$
(
"#ext"
).
val
(),
caller_id_name
:
$
(
"#name"
).
val
(),
...
...
html5/verto/js/src/jquery.verto.js
浏览文件 @
ab292dc3
...
...
@@ -421,13 +421,13 @@
switch
(
data
.
method
)
{
case
'verto.bye'
:
dialog
.
hangup
();
dialog
.
hangup
(
data
.
params
);
break
;
case
'verto.answer'
:
dialog
.
handleAnswer
(
data
.
params
.
sdp
);
dialog
.
handleAnswer
(
data
.
params
);
break
;
case
'verto.media'
:
dialog
.
handleMedia
(
data
.
params
.
sdp
);
dialog
.
handleMedia
(
data
.
params
);
break
;
case
'verto.display'
:
dialog
.
handleDisplay
(
data
.
params
);
...
...
@@ -1537,6 +1537,14 @@
dialog
.
lastState
=
dialog
.
state
;
dialog
.
state
=
state
;
if
(
!
dialog
.
causeCode
)
{
dialog
.
causeCode
=
16
;
}
if
(
!
dialog
.
cause
)
{
dialog
.
cause
=
"NORMAL CLEARING"
;
}
if
(
dialog
.
callbacks
.
onDialogState
)
{
dialog
.
callbacks
.
onDialogState
(
this
);
...
...
@@ -1613,9 +1621,19 @@
};
$
.
verto
.
dialog
.
prototype
.
hangup
=
function
(
sdp
)
{
$
.
verto
.
dialog
.
prototype
.
hangup
=
function
(
params
)
{
var
dialog
=
this
;
if
(
params
)
{
if
(
params
.
causeCode
)
{
dialog
.
causeCode
=
params
.
causeCode
;
}
if
(
params
.
cause
)
{
dialog
.
cause
=
params
.
cause
;
}
}
if
(
dialog
.
state
.
val
>
$
.
verto
.
enum
.
state
.
new
.
val
&&
dialog
.
state
.
val
<
$
.
verto
.
enum
.
state
.
hangup
.
val
)
{
dialog
.
setState
(
$
.
verto
.
enum
.
state
.
hangup
);
}
else
if
(
dialog
.
state
.
val
<
$
.
verto
.
enum
.
state
.
destroy
)
{
...
...
@@ -1761,7 +1779,7 @@
}
};
$
.
verto
.
dialog
.
prototype
.
handleAnswer
=
function
(
sdp
)
{
$
.
verto
.
dialog
.
prototype
.
handleAnswer
=
function
(
params
)
{
var
dialog
=
this
;
if
(
dialog
.
state
.
val
>=
$
.
verto
.
enum
.
state
.
active
.
val
)
{
...
...
@@ -1771,14 +1789,14 @@
if
(
dialog
.
state
.
val
>=
$
.
verto
.
enum
.
state
.
early
.
val
)
{
dialog
.
setState
(
$
.
verto
.
enum
.
state
.
active
);
}
else
{
dialog
.
rtc
.
answer
(
sdp
,
function
()
{
dialog
.
rtc
.
answer
(
params
.
sdp
,
function
()
{
dialog
.
setState
(
$
.
verto
.
enum
.
state
.
active
);
},
function
(
e
)
{
console
.
error
(
e
);
dialog
.
hangup
();
});
console
.
log
(
"ANSWER SDP"
,
sdp
);
console
.
log
(
"ANSWER SDP"
,
params
.
sdp
);
}
};
...
...
@@ -1815,21 +1833,21 @@
dialog
.
sendMessage
(
$
.
verto
.
enum
.
message
.
display
,
{});
};
$
.
verto
.
dialog
.
prototype
.
handleMedia
=
function
(
sdp
)
{
$
.
verto
.
dialog
.
prototype
.
handleMedia
=
function
(
params
)
{
var
dialog
=
this
;
if
(
dialog
.
state
.
val
>=
$
.
verto
.
enum
.
state
.
early
.
val
)
{
return
;
}
dialog
.
rtc
.
answer
(
sdp
,
function
()
{
dialog
.
rtc
.
answer
(
params
.
sdp
,
function
()
{
dialog
.
setState
(
$
.
verto
.
enum
.
state
.
early
);
},
function
(
e
)
{
console
.
error
(
e
);
dialog
.
hangup
();
});
console
.
log
(
"EARLY SDP"
,
sdp
);
console
.
log
(
"EARLY SDP"
,
params
.
sdp
);
};
$
.
verto
.
ENUM
=
function
(
s
)
{
...
...
src/mod/endpoints/mod_verto/mod_verto.c
浏览文件 @
ab292dc3
...
...
@@ -1416,7 +1416,12 @@ static switch_status_t verto_on_hangup(switch_core_session_t *session)
// get the jsock and send hangup notice
if
(
!
tech_pvt
->
remote_hangup_cause
&&
(
jsock
=
get_jsock
(
tech_pvt
->
jsock_uuid
)))
{
cJSON
*
msg
=
jrpc_new_req
(
"verto.bye"
,
tech_pvt
->
call_id
,
NULL
);
cJSON
*
params
=
NULL
;
cJSON
*
msg
=
jrpc_new_req
(
"verto.bye"
,
tech_pvt
->
call_id
,
&
params
);
switch_call_cause_t
cause
=
switch_channel_get_cause
(
tech_pvt
->
channel
);
cJSON_AddItemToObject
(
params
,
"causeCode"
,
cJSON_CreateNumber
(
cause
));
cJSON_AddItemToObject
(
params
,
"cause"
,
cJSON_CreateString
(
switch_channel_cause2str
(
cause
)));
ws_write_json
(
jsock
,
&
msg
,
SWITCH_TRUE
);
switch_thread_rwlock_unlock
(
jsock
->
rwlock
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论