Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
d377bc57
提交
d377bc57
authored
8月 23, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@2373
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
1849858f
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
32 行增加
和
13 行删除
+32
-13
mod_exosip.c
src/mod/endpoints/mod_exosip/mod_exosip.c
+32
-13
没有找到文件。
src/mod/endpoints/mod_exosip/mod_exosip.c
浏览文件 @
d377bc57
...
...
@@ -1742,7 +1742,7 @@ static int handle_call_transfer(eXosip_event_t *event)
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"message_send_answer info failed! %d
\n
"
,
event
->
tid
);
}
if
(
1
)
{
{
osip_from_t
*
refer
=
NULL
;
osip_uri_t
*
refer_uri
=
NULL
;
char
*
refer_str
=
NULL
;
...
...
@@ -1829,7 +1829,7 @@ static void handle_answer(eXosip_event_t *event)
char
*
dpayload
=
NULL
,
*
dname
=
NULL
,
*
drate
=
NULL
;
switch_channel_t
*
channel
;
const
switch_codec_implementation_t
*
imp
=
NULL
;
uint8_t
pre_answer
=
0
,
reinvite
=
0
;
uint8_t
pre_answer
=
0
,
reinvite
=
0
,
isack
=
0
;
if
((
tech_pvt
=
get_pvt_by_call_id
(
event
->
cid
))
==
0
)
{
...
...
@@ -1845,24 +1845,31 @@ static void handle_answer(eXosip_event_t *event)
}
}
else
if
(
event
->
type
==
EXOSIP_CALL_REINVITE
)
{
reinvite
=
1
;
}
else
if
(
event
->
type
==
EXOSIP_CALL_ACK
)
{
isack
=
1
;
}
channel
=
switch_core_session_get_channel
(
tech_pvt
->
session
);
assert
(
channel
!=
NULL
);
if
(
!
event
->
response
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Someone answered... with no SDP information - WTF?!?
\n
"
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
return
;
}
if
(
reinvite
)
{
if
(
reinvite
||
isack
)
{
if
((
remote_sdp
=
eXosip_get_sdp_info
(
event
->
request
))
==
0
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Cant Find SDP?
\n
"
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
if
(
!
isack
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Cant Find SDP?
\n
"
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
}
return
;
}
}
else
{
if
(
!
event
->
response
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Someone answered... with no SDP information - WTF?!?
\n
"
);
switch_channel_hangup
(
channel
,
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
);
return
;
}
/* Get all of the remote SDP elements... stuff */
if
((
remote_sdp
=
eXosip_get_sdp_info
(
event
->
response
))
==
0
)
{
/* Exosip is daft, they send the same event for both 180 and 183 WTF!!*/
...
...
@@ -1879,10 +1886,21 @@ static void handle_answer(eXosip_event_t *event)
switch_channel_set_variable
(
channel
,
"endpoint_disposition"
,
"ANSWER"
);
conn
=
eXosip_get_audio_connection
(
remote_sdp
);
remote_med
=
eXosip_get_audio_media
(
remote_sdp
);
if
(
!
strcmp
(
conn
->
c_addr
,
"0.0.0.0"
))
{
eXosip_lock
();
eXosip_call_build_ack
(
event
->
did
,
&
ack
);
eXosip_call_send_ack
(
event
->
did
,
ack
);
eXosip_unlock
();
switch_safe_free
(
dname
);
switch_safe_free
(
drate
);
switch_safe_free
(
dpayload
);
return
;
}
/* Grab IP/port */
tech_pvt
->
remote_sdp_audio_port
=
(
switch_port_t
)
atoi
(
remote_med
->
m_port
);
snprintf
(
tech_pvt
->
remote_sdp_audio_ip
,
50
,
conn
->
c_addr
);
...
...
@@ -1905,7 +1923,7 @@ static void handle_answer(eXosip_event_t *event)
switch_clear_flag_locked
(
tech_pvt
,
TFLAG_USING_CODEC
);
}
if
(
reinvite
)
{
if
(
reinvite
||
isack
)
{
switch_set_flag_locked
(
tech_pvt
,
TFLAG_REINVITE
);
}
...
...
@@ -1957,7 +1975,7 @@ static void handle_answer(eXosip_event_t *event)
}
}
eXosip_lock
();
eXosip_call_build_ack
(
event
->
did
,
&
ack
);
eXosip_call_send_ack
(
event
->
did
,
ack
);
...
...
@@ -2358,6 +2376,7 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_runtime(void)
}
break
;
case
EXOSIP_CALL_ACK
:
handle_answer
(
event
);
/* If audio is not flowing and this has SDP - fire it up! */
break
;
case
EXOSIP_CALL_ANSWERED
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论