Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
6fc0bb08
提交
6fc0bb08
authored
1月 17, 2011
作者:
Moises Silva
浏览文件
操作
浏览文件
下载
差异文件
Merge remote branch 'fsorig/master'
上级
6734fe71
585cb68a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
72 行增加
和
16 行删除
+72
-16
ftmod_sangoma_isdn_cfg.c
...tdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c
+4
-2
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+1
-1
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+34
-9
sofia_reg.c
src/mod/endpoints/mod_sofia/sofia_reg.c
+2
-2
switch_ivr_originate.c
src/switch_ivr_originate.c
+31
-2
没有找到文件。
libs/freetdm/src/ftmod/ftmod_sangoma_isdn/ftmod_sangoma_isdn_cfg.c
浏览文件 @
6fc0bb08
...
...
@@ -326,9 +326,11 @@ ftdm_status_t ftmod_isdn_parse_cfg(ftdm_conf_parameter_t *ftdm_parameters, ftdm_
ftdm_set_ton
(
val
,
&
span
->
default_caller_data
.
rdnis
.
type
);
}
else
if
(
!
strcasecmp
(
var
,
"outbound-rdnis-npi"
))
{
ftdm_set_npi
(
val
,
&
span
->
default_caller_data
.
rdnis
.
plan
);
}
else
if
(
!
strcasecmp
(
var
,
"outbound-bearer_cap"
))
{
}
else
if
(
!
strcasecmp
(
var
,
"outbound-bearer_cap"
)
||
!
strcasecmp
(
var
,
"outbound-bc-transfer-cap"
))
{
ftdm_set_bearer_capability
(
val
,
(
uint8_t
*
)
&
span
->
default_caller_data
.
bearer_capability
);
}
else
if
(
!
strcasecmp
(
var
,
"outbound-bearer_layer1"
))
{
}
else
if
(
!
strcasecmp
(
var
,
"outbound-bearer_layer1"
)
||
!
strcasecmp
(
var
,
"outbound-bc-user-layer1"
))
{
ftdm_set_bearer_layer1
(
val
,
(
uint8_t
*
)
&
span
->
default_caller_data
.
bearer_layer1
);
}
else
if
(
!
strcasecmp
(
var
,
"channel-restart-on-link-up"
))
{
parse_yesno
(
var
,
val
,
&
signal_data
->
restart_opt
);
...
...
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
6fc0bb08
...
...
@@ -3627,7 +3627,7 @@ SWITCH_STANDARD_API(sofia_function)
"--------------------------------------------------------------------------------
\n
"
"sofia help
\n
"
"sofia profile <profile_name> [[start|stop|restart|rescan]|"
"flush_inbound_reg [<call_id>] [reboot]|"
"flush_inbound_reg [<call_id>
|<[user]@domain>
] [reboot]|"
"[register|unregister] [<gateway name>|all]|"
"killgw <gateway name>|"
"[stun-auto-disable|stun-enabled] [true|false]]|"
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
6fc0bb08
...
...
@@ -70,7 +70,7 @@ void sofia_glue_set_image_sdp(private_object_t *tech_pvt, switch_t38_options_t *
port
=
tech_pvt
->
proxy_sdp_audio_port
;
}
}
if
(
!
port
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_CRIT
,
"%s NO PORT!
\n
"
,
switch_channel_get_name
(
tech_pvt
->
channel
));
return
;
...
...
@@ -377,6 +377,13 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
sofia_glue_check_dtmf_type
(
tech_pvt
);
if
(
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_SUPPRESS_CNG
)
||
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"supress_cng"
))
&&
switch_true
(
val
))
||
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"suppress_cng"
))
&&
switch_true
(
val
)))
{
use_cng
=
0
;
tech_pvt
->
cng_pt
=
0
;
}
if
(
!
tech_pvt
->
payload_space
)
{
int
i
;
...
...
@@ -388,6 +395,13 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
tech_pvt
->
ianacodes
[
i
]
=
imp
->
ianacode
;
if
(
tech_pvt
->
ianacodes
[
i
]
>
64
)
{
if
(
tech_pvt
->
dtmf_type
==
DTMF_2833
&&
tech_pvt
->
te
>
95
&&
tech_pvt
->
te
==
tech_pvt
->
payload_space
)
{
tech_pvt
->
payload_space
++
;
}
if
(
!
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_SUPPRESS_CNG
)
&&
tech_pvt
->
cng_pt
&&
use_cng
&&
tech_pvt
->
cng_pt
==
tech_pvt
->
payload_space
)
{
tech_pvt
->
payload_space
++
;
}
tech_pvt
->
ianacodes
[
i
]
=
tech_pvt
->
payload_space
++
;
}
}
...
...
@@ -401,13 +415,6 @@ void sofia_glue_set_local_sdp(private_object_t *tech_pvt, const char *ip, uint32
verbose_sdp
=
1
;
}
if
(
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_SUPPRESS_CNG
)
||
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"supress_cng"
))
&&
switch_true
(
val
))
||
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"suppress_cng"
))
&&
switch_true
(
val
)))
{
use_cng
=
0
;
tech_pvt
->
cng_pt
=
0
;
}
if
(
!
force
&&
!
ip
&&
!
sr
&&
(
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_PROXY_MODE
)
||
switch_channel_test_flag
(
tech_pvt
->
channel
,
CF_PROXY_MEDIA
)))
{
return
;
...
...
@@ -4040,7 +4047,7 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
sdp_attribute_t
*
attr
;
int
first
=
0
,
last
=
0
;
int
ptime
=
0
,
dptime
=
0
,
maxptime
=
0
,
dmaxptime
=
0
;
int
sendonly
=
0
;
int
sendonly
=
0
,
recvonly
=
0
;
int
greedy
=
0
,
x
=
0
,
skip
=
0
,
mine
=
0
;
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
const
char
*
val
;
...
...
@@ -4108,6 +4115,19 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
if
(
!
strcasecmp
(
attr
->
a_name
,
"sendonly"
)
||
!
strcasecmp
(
attr
->
a_name
,
"inactive"
))
{
sendonly
=
1
;
switch_channel_set_variable
(
tech_pvt
->
channel
,
"media_audio_mode"
,
"recvonly"
);
}
else
if
(
!
strcasecmp
(
attr
->
a_name
,
"recvonly"
))
{
switch_channel_set_variable
(
tech_pvt
->
channel
,
"media_audio_mode"
,
"sendonly"
);
recvonly
=
1
;
if
(
switch_rtp_ready
(
tech_pvt
->
rtp_session
))
{
switch_rtp_set_max_missed_packets
(
tech_pvt
->
rtp_session
,
0
);
tech_pvt
->
max_missed_hold_packets
=
0
;
tech_pvt
->
max_missed_packets
=
0
;
}
else
{
switch_channel_set_variable
(
tech_pvt
->
channel
,
"rtp_timeout_sec"
,
"0"
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
"rtp_hold_timeout_sec"
,
"0"
);
}
}
else
if
(
sendonly
<
2
&&
!
strcasecmp
(
attr
->
a_name
,
"sendrecv"
))
{
sendonly
=
0
;
}
else
if
(
!
strcasecmp
(
attr
->
a_name
,
"ptime"
))
{
...
...
@@ -4117,6 +4137,11 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
}
}
if
(
sendonly
!=
1
&&
recvonly
!=
1
)
{
switch_channel_set_variable
(
tech_pvt
->
channel
,
"media_audio_mode"
,
NULL
);
}
if
(
sofia_test_pflag
(
tech_pvt
->
profile
,
PFLAG_DISABLE_HOLD
)
||
((
val
=
switch_channel_get_variable
(
tech_pvt
->
channel
,
"sip_disable_hold"
))
&&
switch_true
(
val
)))
{
sendonly
=
0
;
...
...
src/mod/endpoints/mod_sofia/sofia_reg.c
浏览文件 @
6fc0bb08
...
...
@@ -606,16 +606,16 @@ void sofia_reg_expire_call_id(sofia_profile_t *profile, const char *call_id, int
sql
=
switch_mprintf
(
"select call_id,sip_user,sip_host,contact,status,rpid,expires"
",user_agent,server_user,server_host,profile_name,network_ip"
",%d from sip_registrations where call_id='%q' %s"
,
reboot
,
call_id
,
sqlextra
);
switch_safe_free
(
sqlextra
);
switch_mutex_lock
(
profile
->
ireg_mutex
);
sofia_glue_execute_sql_callback
(
profile
,
NULL
,
sql
,
sofia_reg_del_callback
,
profile
);
switch_mutex_unlock
(
profile
->
ireg_mutex
);
switch_safe_free
(
sql
);
sql
=
switch_mprintf
(
"delete from sip_registrations where call_id='%q'
or (sip_user='%q' and sip_host='%q')"
,
call_id
,
user
,
host
);
sql
=
switch_mprintf
(
"delete from sip_registrations where call_id='%q'
%s"
,
call_id
,
sqlextra
);
sofia_glue_execute_sql_now
(
profile
,
&
sql
,
SWITCH_FALSE
);
switch_safe_free
(
sqlextra
);
switch_safe_free
(
sql
);
switch_safe_free
(
dup
);
...
...
src/switch_ivr_originate.c
浏览文件 @
6fc0bb08
...
...
@@ -1705,6 +1705,16 @@ static void *SWITCH_THREAD_FUNC early_thread_run(switch_thread_t *thread, void *
switch_channel_get_state(_peer) == CS_RESET || \
!switch_channel_test_flag(_peer, CF_ORIGINATING)))
static
void
wait_for_cause
(
switch_channel_t
*
channel
)
{
int
sanity
=
5
;
while
(
--
sanity
>
0
&&
peer_eligible
(
channel
)
&&
switch_channel_get_cause
(
channel
)
==
SWITCH_CAUSE_NONE
)
{
switch_yield
(
10000
);
}
}
SWITCH_DECLARE
(
switch_status_t
)
switch_ivr_originate
(
switch_core_session_t
*
session
,
switch_core_session_t
**
bleg
,
...
...
@@ -3271,7 +3281,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
if
(
i
!=
oglobals
.
idx
)
{
holding
=
NULL
;
if
(
oglobals
.
idx
==
IDX_TIMEOUT
||
to
)
{
reason
=
SWITCH_CAUSE_NO_ANSWER
;
}
else
{
...
...
@@ -3280,6 +3290,11 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
}
else
{
if
(
and_argc
>
1
)
{
reason
=
SWITCH_CAUSE_LOSE_RACE
;
}
else
if
(
!
switch_channel_ready
(
originate_status
[
i
].
peer_channel
))
{
wait_for_cause
(
originate_status
[
i
].
peer_channel
);
if
(
switch_channel_down
(
originate_status
[
i
].
peer_channel
))
{
reason
=
switch_channel_get_cause
(
originate_status
[
i
].
peer_channel
);
}
}
else
{
reason
=
SWITCH_CAUSE_NO_ANSWER
;
}
...
...
@@ -3385,6 +3400,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
}
if
(
peer_channel
)
{
wait_for_cause
(
peer_channel
);
*
cause
=
switch_channel_get_cause
(
peer_channel
);
}
else
{
for
(
i
=
0
;
i
<
and_argc
;
i
++
)
{
...
...
@@ -3435,6 +3451,19 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
*
cause
=
switch_channel_get_cause
(
caller_channel
);
}
else
{
*
cause
=
SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER
;
for
(
i
=
0
;
i
<
and_argc
;
i
++
)
{
if
(
!
peer_eligible
(
originate_status
[
i
].
peer_channel
))
{
continue
;
}
wait_for_cause
(
originate_status
[
i
].
peer_channel
);
if
(
switch_channel_down
(
originate_status
[
i
].
peer_channel
))
{
*
cause
=
switch_channel_get_cause
(
originate_status
[
i
].
peer_channel
);
break
;
}
}
}
}
...
...
@@ -3529,7 +3558,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
continue
;
}
pchannel
=
switch_core_session_get_channel
(
originate_status
[
i
].
peer_session
);
wait_for_cause
(
pchannel
);
if
(
switch_channel_down
(
pchannel
))
{
cause_str
=
switch_channel_cause2str
(
switch_channel_get_cause
(
pchannel
));
if
(
switch_stristr
(
cause_str
,
fail_on_single_reject_var
))
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论