Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ba0a2a32
提交
ba0a2a32
authored
9月 01, 2010
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make mod_dingaling compat with google's new free phonecalls thing
上级
75145c9d
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
29 行增加
和
4 行删除
+29
-4
mod_dingaling.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
+29
-4
没有找到文件。
src/mod/endpoints/mod_dingaling/mod_dingaling.c
浏览文件 @
ba0a2a32
...
@@ -1001,7 +1001,13 @@ static int do_candidates(struct private_object *tech_pvt, int force)
...
@@ -1001,7 +1001,13 @@ static int do_candidates(struct private_object *tech_pvt, int force)
cand
[
0
].
protocol
=
"udp"
;
cand
[
0
].
protocol
=
"udp"
;
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_DEBUG
,
"Send Candidate %s:%d [%s]
\n
"
,
cand
[
0
].
address
,
cand
[
0
].
port
,
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
tech_pvt
->
session
),
SWITCH_LOG_DEBUG
,
"Send Candidate %s:%d [%s]
\n
"
,
cand
[
0
].
address
,
cand
[
0
].
port
,
cand
[
0
].
username
);
cand
[
0
].
username
);
if
(
ldl_session_gateway
(
tech_pvt
->
dlsession
))
{
tech_pvt
->
cand_id
=
ldl_session_transport
(
tech_pvt
->
dlsession
,
cand
,
1
);
}
else
{
tech_pvt
->
cand_id
=
ldl_session_candidates
(
tech_pvt
->
dlsession
,
cand
,
1
);
tech_pvt
->
cand_id
=
ldl_session_candidates
(
tech_pvt
->
dlsession
,
cand
,
1
);
}
switch_set_flag_locked
(
tech_pvt
,
TFLAG_TRANSPORT
);
switch_set_flag_locked
(
tech_pvt
,
TFLAG_TRANSPORT
);
switch_set_flag_locked
(
tech_pvt
,
TFLAG_RTP_READY
);
switch_set_flag_locked
(
tech_pvt
,
TFLAG_RTP_READY
);
}
}
...
@@ -1112,6 +1118,7 @@ static switch_status_t negotiate_media(switch_core_session_t *session)
...
@@ -1112,6 +1118,7 @@ static switch_status_t negotiate_media(switch_core_session_t *session)
now
=
switch_micro_time_now
();
now
=
switch_micro_time_now
();
elapsed
=
(
unsigned
int
)
((
now
-
started
)
/
1000
);
elapsed
=
(
unsigned
int
)
((
now
-
started
)
/
1000
);
if
(
switch_channel_down
(
channel
)
||
switch_test_flag
(
tech_pvt
,
TFLAG_BYE
))
{
if
(
switch_channel_down
(
channel
)
||
switch_test_flag
(
tech_pvt
,
TFLAG_BYE
))
{
goto
out
;
goto
out
;
}
}
...
@@ -1643,6 +1650,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
...
@@ -1643,6 +1650,8 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
char
workspace
[
1024
]
=
""
;
char
workspace
[
1024
]
=
""
;
char
*
p
,
*
u
,
ubuf
[
512
]
=
""
,
*
user
=
NULL
,
*
f_cid_msg
=
NULL
;
char
*
p
,
*
u
,
ubuf
[
512
]
=
""
,
*
user
=
NULL
,
*
f_cid_msg
=
NULL
;
const
char
*
cid_msg
=
NULL
;
const
char
*
cid_msg
=
NULL
;
ldl_user_flag_t
flags
=
LDL_FLAG_OUTBOUND
;
switch_copy_string
(
workspace
,
outbound_profile
->
destination_number
,
sizeof
(
workspace
));
switch_copy_string
(
workspace
,
outbound_profile
->
destination_number
,
sizeof
(
workspace
));
profile_name
=
workspace
;
profile_name
=
workspace
;
...
@@ -1711,7 +1720,10 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
...
@@ -1711,7 +1720,10 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
terminate_session
(
new_session
,
__LINE__
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
terminate_session
(
new_session
,
__LINE__
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
return
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
;
return
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
;
}
}
if
(
!
(
full_id
=
ldl_handle_probe
(
mdl_profile
->
handle
,
callto
,
user
,
idbuf
,
sizeof
(
idbuf
))))
{
if
(
switch_stristr
(
"voice.google.com"
,
callto
))
{
full_id
=
callto
;
flags
|=
LDL_FLAG_GATEWAY
;
}
else
if
(
!
(
full_id
=
ldl_handle_probe
(
mdl_profile
->
handle
,
callto
,
user
,
idbuf
,
sizeof
(
idbuf
))))
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
*
new_session
),
SWITCH_LOG_DEBUG
,
"Unknown Recipient!
\n
"
);
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
*
new_session
),
SWITCH_LOG_DEBUG
,
"Unknown Recipient!
\n
"
);
terminate_session
(
new_session
,
__LINE__
,
SWITCH_CAUSE_NO_USER_RESPONSE
);
terminate_session
(
new_session
,
__LINE__
,
SWITCH_CAUSE_NO_USER_RESPONSE
);
return
SWITCH_CAUSE_NO_USER_RESPONSE
;
return
SWITCH_CAUSE_NO_USER_RESPONSE
;
...
@@ -1768,7 +1780,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
...
@@ -1768,7 +1780,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
switch_stun_random_string
(
sess_id
,
10
,
"0123456789"
);
switch_stun_random_string
(
sess_id
,
10
,
"0123456789"
);
tech_pvt
->
us
=
switch_core_session_strdup
(
*
new_session
,
user
);
tech_pvt
->
us
=
switch_core_session_strdup
(
*
new_session
,
user
);
tech_pvt
->
them
=
switch_core_session_strdup
(
*
new_session
,
full_id
);
tech_pvt
->
them
=
switch_core_session_strdup
(
*
new_session
,
full_id
);
ldl_session_create
(
&
dlsession
,
mdl_profile
->
handle
,
sess_id
,
full_id
,
user
,
LDL_FLAG_OUTBOUND
);
ldl_session_create
(
&
dlsession
,
mdl_profile
->
handle
,
sess_id
,
full_id
,
user
,
flags
);
if
(
session
)
{
if
(
session
)
{
switch_channel_t
*
calling_channel
=
switch_core_session_get_channel
(
session
);
switch_channel_t
*
calling_channel
=
switch_core_session_get_channel
(
session
);
...
@@ -1780,6 +1792,10 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
...
@@ -1780,6 +1792,10 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
cid_msg
=
f_cid_msg
;
cid_msg
=
f_cid_msg
;
}
}
if
((
flags
&
LDL_FLAG_GATEWAY
))
{
cid_msg
=
NULL
;
}
if
(
cid_msg
)
{
if
(
cid_msg
)
{
char
*
them
;
char
*
them
;
them
=
strdup
(
tech_pvt
->
them
);
them
=
strdup
(
tech_pvt
->
them
);
...
@@ -3128,6 +3144,11 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
...
@@ -3128,6 +3144,11 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
break
;
break
;
case
LDL_SIGNAL_TRANSPORT_ACCEPT
:
case
LDL_SIGNAL_TRANSPORT_ACCEPT
:
switch_set_flag_locked
(
tech_pvt
,
TFLAG_TRANSPORT_ACCEPT
);
switch_set_flag_locked
(
tech_pvt
,
TFLAG_TRANSPORT_ACCEPT
);
if
(
ldl_session_gateway
(
dlsession
))
{
do_candidates
(
tech_pvt
,
1
);
}
break
;
break
;
case
LDL_SIGNAL_INITIATE
:
case
LDL_SIGNAL_INITIATE
:
if
(
dl_signal
)
{
if
(
dl_signal
)
{
...
@@ -3348,6 +3369,10 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
...
@@ -3348,6 +3369,10 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
goto
done
;
goto
done
;
}
}
break
;
break
;
case
LDL_SIGNAL_REDIRECT
:
do_describe
(
tech_pvt
,
1
);
break
;
case
LDL_SIGNAL_ERROR
:
case
LDL_SIGNAL_ERROR
:
case
LDL_SIGNAL_TERMINATE
:
case
LDL_SIGNAL_TERMINATE
:
if
(
channel
)
{
if
(
channel
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论