Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
7088c57a
提交
7088c57a
authored
3月 04, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7779
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
552d9c2d
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
46 行增加
和
43 行删除
+46
-43
mod_dptools.c
src/mod/applications/mod_dptools/mod_dptools.c
+2
-2
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+32
-21
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+7
-0
switch_core_state_machine.c
src/switch_core_state_machine.c
+1
-9
switch_ivr_bridge.c
src/switch_ivr_bridge.c
+4
-11
没有找到文件。
src/mod/applications/mod_dptools/mod_dptools.c
浏览文件 @
7088c57a
...
@@ -1507,8 +1507,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
...
@@ -1507,8 +1507,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
SWITCH_ADD_APP
(
app_interface
,
"strftime"
,
NULL
,
NULL
,
strftime_function
,
NULL
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"strftime"
,
NULL
,
NULL
,
strftime_function
,
NULL
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"phrase"
,
"Say a Phrase"
,
"Say a Phrase"
,
phrase_function
,
"<macro_name>,<data>"
,
SAF_NONE
);
SWITCH_ADD_APP
(
app_interface
,
"phrase"
,
"Say a Phrase"
,
"Say a Phrase"
,
phrase_function
,
"<macro_name>,<data>"
,
SAF_NONE
);
SWITCH_ADD_APP
(
app_interface
,
"eval"
,
"Do Nothing"
,
"Do Nothing"
,
eval_function
,
""
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"eval"
,
"Do Nothing"
,
"Do Nothing"
,
eval_function
,
""
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"pre_answer"
,
"Pre-Answer the call"
,
"Pre-Answer the call for a channel."
,
pre_answer_function
,
""
,
SAF_
SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"pre_answer"
,
"Pre-Answer the call"
,
"Pre-Answer the call for a channel."
,
pre_answer_function
,
""
,
SAF_
NONE
);
SWITCH_ADD_APP
(
app_interface
,
"answer"
,
"Answer the call"
,
"Answer the call for a channel."
,
answer_function
,
""
,
SAF_
SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"answer"
,
"Answer the call"
,
"Answer the call for a channel."
,
answer_function
,
""
,
SAF_
NONE
);
SWITCH_ADD_APP
(
app_interface
,
"hangup"
,
"Hangup the call"
,
"Hangup the call for a channel."
,
hangup_function
,
"[<cause>]"
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"hangup"
,
"Hangup the call"
,
"Hangup the call for a channel."
,
hangup_function
,
"[<cause>]"
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"set_name"
,
"Name the channel"
,
"Name the channel"
,
set_name_function
,
"<name>"
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"set_name"
,
"Name the channel"
,
"Name the channel"
,
set_name_function
,
"<name>"
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"log"
,
"Logs a channel variable"
,
LOG_LONG_DESC
,
log_function
,
"<varname>"
,
SAF_SUPPORT_NOMEDIA
);
SWITCH_ADD_APP
(
app_interface
,
"log"
,
"Logs a channel variable"
,
LOG_LONG_DESC
,
log_function
,
"<varname>"
,
SAF_SUPPORT_NOMEDIA
);
...
...
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
7088c57a
...
@@ -712,13 +712,6 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
...
@@ -712,13 +712,6 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
goto
end
;
goto
end
;
}
}
if
(
msg
->
message_id
==
SWITCH_MESSAGE_INDICATE_ANSWER
||
msg
->
message_id
==
SWITCH_MESSAGE_INDICATE_PROGRESS
)
{
const
char
*
var
;
if
((
var
=
switch_channel_get_variable
(
channel
,
SOFIA_SECURE_MEDIA_VARIABLE
))
&&
switch_true
(
var
))
{
switch_set_flag_locked
(
tech_pvt
,
TFLAG_SECURE
);
}
}
switch
(
msg
->
message_id
)
{
switch
(
msg
->
message_id
)
{
case
SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ
:
case
SWITCH_MESSAGE_INDICATE_VIDEO_REFRESH_REQ
:
{
{
...
@@ -794,10 +787,26 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
...
@@ -794,10 +787,26 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
case
SWITCH_MESSAGE_INDICATE_MEDIA
:
case
SWITCH_MESSAGE_INDICATE_MEDIA
:
{
{
uint32_t
count
=
0
;
uint32_t
count
=
0
,
send_invite
=
1
;
switch_channel_clear_flag
(
channel
,
CF_PROXY_MODE
);
switch_channel_clear_flag
(
channel
,
CF_PROXY_MODE
);
tech_pvt
->
local_sdp_str
=
NULL
;
tech_pvt
->
local_sdp_str
=
NULL
;
if
(
!
switch_channel_media_ready
(
channel
))
{
if
(
!
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_OUTBOUND
))
{
const
char
*
r_sdp
=
switch_channel_get_variable
(
channel
,
SWITCH_R_SDP_VARIABLE
);
tech_pvt
->
num_codecs
=
0
;
sofia_glue_tech_prepare_codecs
(
tech_pvt
);
if
(
sofia_glue_tech_media
(
tech_pvt
,
r_sdp
)
!=
SWITCH_STATUS_SUCCESS
)
{
switch_channel_set_variable
(
channel
,
SWITCH_ENDPOINT_DISPOSITION_VARIABLE
,
"CODEC NEGOTIATION ERROR"
);
status
=
SWITCH_STATUS_FALSE
;
goto
end
;
}
send_invite
=
0
;
}
}
if
(
!
switch_rtp_ready
(
tech_pvt
->
rtp_session
))
{
if
(
!
switch_rtp_ready
(
tech_pvt
->
rtp_session
))
{
sofia_glue_tech_prepare_codecs
(
tech_pvt
);
sofia_glue_tech_prepare_codecs
(
tech_pvt
);
if
((
status
=
sofia_glue_tech_choose_port
(
tech_pvt
,
0
))
!=
SWITCH_STATUS_SUCCESS
)
{
if
((
status
=
sofia_glue_tech_choose_port
(
tech_pvt
,
0
))
!=
SWITCH_STATUS_SUCCESS
)
{
...
@@ -806,20 +815,22 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
...
@@ -806,20 +815,22 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
}
}
}
}
sofia_glue_set_local_sdp
(
tech_pvt
,
NULL
,
0
,
NULL
,
1
);
sofia_glue_set_local_sdp
(
tech_pvt
,
NULL
,
0
,
NULL
,
1
);
sofia_glue_do_invite
(
session
);
/* wait for rtp to start and first real frame to arrive */
if
(
send_invite
)
{
tech_pvt
->
read_frame
.
datalen
=
0
;
sofia_glue_do_invite
(
session
);
while
(
switch_test_flag
(
tech_pvt
,
TFLAG_IO
)
&&
switch_channel_get_state
(
channel
)
<
CS_HANGUP
&&
!
switch_rtp_ready
(
tech_pvt
->
rtp_session
))
{
/* wait for rtp to start and first real frame to arrive */
if
(
++
count
>
1000
)
{
tech_pvt
->
read_frame
.
datalen
=
0
;
status
=
SWITCH_STATUS_FALSE
;
while
(
switch_test_flag
(
tech_pvt
,
TFLAG_IO
)
&&
switch_channel_get_state
(
channel
)
<
CS_HANGUP
&&
!
switch_rtp_ready
(
tech_pvt
->
rtp_session
))
{
goto
end
;
if
(
++
count
>
1000
)
{
}
status
=
SWITCH_STATUS_FALSE
;
if
(
!
switch_rtp_ready
(
tech_pvt
->
rtp_session
))
{
goto
end
;
switch_yield
(
1000
);
}
continue
;
if
(
!
switch_rtp_ready
(
tech_pvt
->
rtp_session
))
{
switch_yield
(
1000
);
continue
;
}
break
;
}
}
break
;
}
}
}
}
break
;
break
;
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
7088c57a
...
@@ -1422,11 +1422,18 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
...
@@ -1422,11 +1422,18 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
uint32_t
rtp_timeout_sec
=
tech_pvt
->
profile
->
rtp_timeout_sec
;
uint32_t
rtp_timeout_sec
=
tech_pvt
->
profile
->
rtp_timeout_sec
;
uint32_t
rtp_hold_timeout_sec
=
tech_pvt
->
profile
->
rtp_hold_timeout_sec
;
uint32_t
rtp_hold_timeout_sec
=
tech_pvt
->
profile
->
rtp_hold_timeout_sec
;
char
*
timer_name
;
char
*
timer_name
;
const
char
*
var
;
switch_assert
(
tech_pvt
!=
NULL
);
switch_assert
(
tech_pvt
!=
NULL
);
switch_core_session_signal_lock
(
tech_pvt
->
session
);
switch_core_session_signal_lock
(
tech_pvt
->
session
);
if
((
var
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
SOFIA_SECURE_MEDIA_VARIABLE
))
&&
switch_true
(
var
))
{
switch_set_flag_locked
(
tech_pvt
,
TFLAG_SECURE
);
}
if
(
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_PROXY_MODE
))
{
if
(
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_PROXY_MODE
))
{
status
=
SWITCH_STATUS_SUCCESS
;
status
=
SWITCH_STATUS_SUCCESS
;
goto
end
;
goto
end
;
...
...
src/switch_core_state_machine.c
浏览文件 @
7088c57a
...
@@ -137,8 +137,7 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
...
@@ -137,8 +137,7 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
while
(
switch_channel_get_state
(
session
->
channel
)
==
CS_EXECUTE
&&
extension
->
current_application
)
{
while
(
switch_channel_get_state
(
session
->
channel
)
==
CS_EXECUTE
&&
extension
->
current_application
)
{
char
*
expanded
=
NULL
;
char
*
expanded
=
NULL
;
int
nomedia
=
0
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"%s Execute %s(%s)
\n
"
,
switch_channel_get_name
(
session
->
channel
),
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"%s Execute %s(%s)
\n
"
,
switch_channel_get_name
(
session
->
channel
),
extension
->
current_application
->
application_name
,
switch_str_nil
(
extension
->
current_application
->
application_data
));
extension
->
current_application
->
application_name
,
switch_str_nil
(
extension
->
current_application
->
application_data
));
if
((
application_interface
=
switch_loadable_module_get_application_interface
(
extension
->
current_application
->
application_name
))
==
0
)
{
if
((
application_interface
=
switch_loadable_module_get_application_interface
(
extension
->
current_application
->
application_name
))
==
0
)
{
...
@@ -155,7 +154,6 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
...
@@ -155,7 +154,6 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
if
(
switch_channel_test_flag
(
session
->
channel
,
CF_PROXY_MODE
)
&&
!
switch_test_flag
(
application_interface
,
SAF_SUPPORT_NOMEDIA
))
{
if
(
switch_channel_test_flag
(
session
->
channel
,
CF_PROXY_MODE
)
&&
!
switch_test_flag
(
application_interface
,
SAF_SUPPORT_NOMEDIA
))
{
switch_ivr_media
(
session
->
uuid_str
,
SMF_NONE
);
switch_ivr_media
(
session
->
uuid_str
,
SMF_NONE
);
nomedia
++
;
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Application %s Requires media on channel %s!
\n
"
,
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Application %s Requires media on channel %s!
\n
"
,
extension
->
current_application
->
application_name
,
switch_channel_get_name
(
session
->
channel
));
extension
->
current_application
->
application_name
,
switch_channel_get_name
(
session
->
channel
));
}
else
if
(
!
switch_test_flag
(
application_interface
,
SAF_SUPPORT_NOMEDIA
)
&&
!
switch_channel_media_ready
(
session
->
channel
))
{
}
else
if
(
!
switch_test_flag
(
application_interface
,
SAF_SUPPORT_NOMEDIA
)
&&
!
switch_channel_media_ready
(
session
->
channel
))
{
...
@@ -189,12 +187,6 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
...
@@ -189,12 +187,6 @@ static void switch_core_standard_on_execute(switch_core_session_t *session)
goto
top
;
goto
top
;
}
}
if
(
nomedia
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"Application %s Releasing media
\n
"
,
extension
->
current_application
->
application_name
);
switch_ivr_nomedia
(
session
->
uuid_str
,
SMF_NONE
);
}
extension
->
current_application
=
extension
->
current_application
->
next
;
extension
->
current_application
=
extension
->
current_application
->
next
;
}
}
...
...
src/switch_ivr_bridge.c
浏览文件 @
7088c57a
...
@@ -496,7 +496,7 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
...
@@ -496,7 +496,7 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
switch_core_session_t
*
other_session
;
switch_core_session_t
*
other_session
;
switch_event_t
*
event
;
switch_event_t
*
event
;
if
(
switch_channel_test_flag
(
channel
,
CF_ORIGINATOR
))
{
if
(
switch_channel_test_flag
(
channel
,
CF_ORIGINATOR
))
{
switch_channel_clear_flag
(
channel
,
CF_ORIGINATOR
);
switch_channel_clear_flag
(
channel
,
CF_ORIGINATOR
);
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_CHANNEL_UNBRIDGE
)
==
SWITCH_STATUS_SUCCESS
)
{
if
(
switch_event_create
(
&
event
,
SWITCH_EVENT_CHANNEL_UNBRIDGE
)
==
SWITCH_STATUS_SUCCESS
)
{
switch_channel_event_set_data
(
channel
,
event
);
switch_channel_event_set_data
(
channel
,
event
);
...
@@ -514,17 +514,10 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
...
@@ -514,17 +514,10 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
switch_channel_set_variable
(
channel
,
SWITCH_BRIDGE_VARIABLE
,
NULL
);
switch_channel_set_variable
(
channel
,
SWITCH_BRIDGE_VARIABLE
,
NULL
);
switch_channel_set_variable
(
other_channel
,
SWITCH_BRIDGE_VARIABLE
,
NULL
);
switch_channel_set_variable
(
other_channel
,
SWITCH_BRIDGE_VARIABLE
,
NULL
);
assert
(
!
switch_channel_test_flag
(
other_channel
,
CF_TRANSFER
));
if
(
switch_channel_get_state
(
other_channel
)
<
CS_HANGUP
)
{
switch_channel_hangup
(
other_channel
,
switch_channel_get_cause
(
channel
));
}
if
(
!
switch_channel_test_flag
(
other_channel
,
CF_TRANSFER
))
{
if
(
switch_channel_test_flag
(
other_channel
,
CF_ANSWERED
)
&&
switch_channel_get_state
(
other_channel
)
<
CS_HANGUP
&&
switch_true
(
switch_channel_get_variable
(
other_channel
,
SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE
)))
{
switch_channel_hangup
(
other_channel
,
switch_channel_get_cause
(
channel
));
}
else
{
switch_channel_set_state
(
other_channel
,
CS_EXECUTE
);
}
}
switch_core_session_rwunlock
(
other_session
);
switch_core_session_rwunlock
(
other_session
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论