Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
cb42c09b
提交
cb42c09b
authored
7月 19, 2010
作者:
cypromis
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
ssh://git.freeswitch.org/freeswitch
上级
04e3b221
c8e8f265
全部展开
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
513 行增加
和
32 行删除
+513
-32
hash.conf.xml
conf/autoload_configs/hash.conf.xml
+6
-0
esl_event.c
libs/esl/src/esl_event.c
+1
-1
esl_event.h
libs/esl/src/include/esl_event.h
+1
-1
mod_freetdm.c
libs/freetdm/mod_freetdm/mod_freetdm.c
+8
-8
mod_fifo.c
src/mod/applications/mod_fifo/mod_fifo.c
+1
-1
Makefile
src/mod/applications/mod_hash/Makefile
+4
-0
mod_hash.c
src/mod/applications/mod_hash/mod_hash.c
+468
-11
switch_limit.c
src/switch_limit.c
+2
-2
switch_rtp.c
src/switch_rtp.c
+22
-8
没有找到文件。
conf/autoload_configs/hash.conf.xml
0 → 100644
浏览文件 @
cb42c09b
<configuration
name=
"hash.conf"
description=
"Hash Configuration"
>
<remotes>
<!-- List of hosts from where to pull usage data -->
<!-- <remote name="Test1" host="10.0.0.10" port="8021" password="ClueCon" interval="1000" /> -->
</remotes>
</configuration>
libs/esl/src/esl_event.c
浏览文件 @
cb42c09b
...
...
@@ -307,7 +307,7 @@ static esl_status_t esl_event_base_add_header(esl_event_t *event, esl_stack_t st
header
=
ALLOC
(
sizeof
(
*
header
));
esl_assert
(
header
);
if
((
event
->
flags
&
E
F
_UNIQ_HEADERS
))
{
if
((
event
->
flags
&
E
SL
_UNIQ_HEADERS
))
{
esl_event_del_header
(
event
,
header_name
);
}
...
...
libs/esl/src/include/esl_event.h
浏览文件 @
cb42c09b
...
...
@@ -172,7 +172,7 @@ struct esl_event {
};
typedef
enum
{
E
F
_UNIQ_HEADERS
=
(
1
<<
0
)
E
SL
_UNIQ_HEADERS
=
(
1
<<
0
)
}
esl_event_flag_t
;
...
...
libs/freetdm/mod_freetdm/mod_freetdm.c
浏览文件 @
cb42c09b
...
...
@@ -1158,12 +1158,12 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-ANI-TON"
);
if
(
sipvar
)
{
caller_data
.
ani
.
type
=
atoi
(
sipvar
);
caller_data
.
ani
.
type
=
(
uint8_t
)
atoi
(
sipvar
);
}
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-ANI-Plan"
);
if
(
sipvar
)
{
caller_data
.
ani
.
plan
=
atoi
(
sipvar
);
caller_data
.
ani
.
plan
=
(
uint8_t
)
atoi
(
sipvar
);
}
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-ANI2"
);
...
...
@@ -1178,12 +1178,12 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-DNIS-TON"
);
if
(
sipvar
)
{
caller_data
.
dnis
.
type
=
atoi
(
sipvar
);
caller_data
.
dnis
.
type
=
(
uint8_t
)
atoi
(
sipvar
);
}
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-DNIS-Plan"
);
if
(
sipvar
)
{
caller_data
.
dnis
.
plan
=
atoi
(
sipvar
);
caller_data
.
dnis
.
plan
=
(
uint8_t
)
atoi
(
sipvar
);
}
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-RDNIS"
);
...
...
@@ -1193,22 +1193,22 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-RDNIS-TON"
);
if
(
sipvar
)
{
caller_data
.
rdnis
.
type
=
atoi
(
sipvar
);
caller_data
.
rdnis
.
type
=
(
uint8_t
)
atoi
(
sipvar
);
}
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-RDNIS-Plan"
);
if
(
sipvar
)
{
caller_data
.
rdnis
.
plan
=
atoi
(
sipvar
);
caller_data
.
rdnis
.
plan
=
(
uint8_t
)
atoi
(
sipvar
);
}
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-Screen"
);
if
(
sipvar
)
{
caller_data
.
screen
=
atoi
(
sipvar
);
caller_data
.
screen
=
(
uint8_t
)
atoi
(
sipvar
);
}
sipvar
=
switch_channel_get_variable
(
channel
,
"sip_h_X-FreeTDM-Presentation"
);
if
(
sipvar
)
{
caller_data
.
pres
=
atoi
(
sipvar
);
caller_data
.
pres
=
(
uint8_t
)
atoi
(
sipvar
);
}
}
...
...
src/mod/applications/mod_fifo/mod_fifo.c
浏览文件 @
cb42c09b
...
...
@@ -1115,7 +1115,7 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
char
nstr
[
256
]
=
""
;
if
(
strcasecmp
(
codec
,
"PCMU"
)
&&
strcasecmp
(
codec
,
"PCMA"
))
{
switch_snprintf
(
nstr
,
sizeof
(
nstr
),
"%s@%si@%sh,PCMU
,PCMA"
,
codec
,
ptime
,
rat
e
);
switch_snprintf
(
nstr
,
sizeof
(
nstr
),
"%s@%si@%sh,PCMU
@%di,PCMA@%di"
,
codec
,
ptime
,
rate
,
ptime
,
ptim
e
);
}
else
{
switch_snprintf
(
nstr
,
sizeof
(
nstr
),
"%s@%si@%sh"
,
codec
,
ptime
,
rate
);
}
...
...
src/mod/applications/mod_hash/Makefile
0 → 100644
浏览文件 @
cb42c09b
LOCAL_CFLAGS
=
-I
../../../../libs/esl/src/include
LOCAL_LDFLAGS
=
-L
../../../../libs/esl
-lesl
BASE
=
../../../..
include
$(BASE)/build/modmake.rules
src/mod/applications/mod_hash/mod_hash.c
浏览文件 @
cb42c09b
差异被折叠。
点击展开。
src/switch_limit.c
100755 → 100644
浏览文件 @
cb42c09b
...
...
@@ -98,8 +98,8 @@ static switch_status_t limit_state_handler(switch_core_session_t *session)
switch_limit_release
(
argv
[
x
],
session
,
NULL
,
NULL
);
}
switch_core_event_hook_remove_state_change
(
session
,
limit_state_handler
);
/* Remove limit_
realm
variable so we register another hook if limit is called again */
switch_channel_set_variable
(
channel
,
"limit_realm"
,
NULL
);
/* Remove limit_
backend
variable so we register another hook if limit is called again */
switch_channel_set_variable
(
channel
,
LIMIT_BACKEND_VARIABLE
,
NULL
);
free
(
mydata
);
}
...
...
src/switch_rtp.c
浏览文件 @
cb42c09b
...
...
@@ -2077,7 +2077,9 @@ static switch_status_t read_rtp_packet(switch_rtp_t *rtp_session, switch_size_t
rtp_session
->
stats
.
inbound
.
packet_count
++
;
}
if
(
rtp_session
->
recv_te
&&
rtp_session
->
recv_msg
.
header
.
pt
==
rtp_session
->
recv_te
)
{
if
((
rtp_session
->
recv_te
&&
rtp_session
->
recv_msg
.
header
.
pt
==
rtp_session
->
recv_te
)
||
*
bytes
<
rtp_header_len
||
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_PROXY_MEDIA
)
||
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_UDPTL
))
{
return
SWITCH_STATUS_SUCCESS
;
}
...
...
@@ -2540,6 +2542,12 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
if
(
bytes
)
{
rtp_session
->
missed_count
=
0
;
if
(
bytes
<
rtp_header_len
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_WARNING
,
"Ignoring invalid RTP packet size of %ld bytes.
\n
"
,
(
long
)
bytes
);
bytes
=
0
;
goto
do_continue
;
}
if
(
rtp_session
->
recv_msg
.
header
.
pt
&&
(
rtp_session
->
recv_msg
.
header
.
pt
==
rtp_session
->
cng_pt
||
rtp_session
->
recv_msg
.
header
.
pt
==
13
))
{
return_cng_frame
();
}
...
...
@@ -2667,7 +2675,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
we put up with as much as we can so we don't have to deal with being punished for
doing it right. Nice guys finish last!
*/
if
(
bytes
&&
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_PROXY_MEDIA
)
&&
if
(
bytes
>
rtp_header_len
&&
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_PROXY_MEDIA
)
&&
!
switch_test_flag
(
rtp_session
,
SWITCH_RTP_FLAG_PASS_RFC2833
)
&&
rtp_session
->
recv_msg
.
header
.
pt
==
rtp_session
->
recv_te
)
{
switch_size_t
len
=
bytes
-
rtp_header_len
;
unsigned
char
*
packet
=
(
unsigned
char
*
)
rtp_session
->
recv_msg
.
body
;
...
...
@@ -2959,8 +2967,10 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_read(switch_rtp_t *rtp_session, void
*
datalen
=
0
;
return
SWITCH_STATUS_BREAK
;
}
else
{
if
(
bytes
>
rtp_header_len
)
{
bytes
-=
rtp_header_len
;
}
}
*
datalen
=
bytes
;
...
...
@@ -3069,7 +3079,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read_frame(switch_rtp_t *rtp
if
(
bytes
<
0
)
{
frame
->
datalen
=
0
;
return
bytes
==
-
2
?
SWITCH_STATUS_TIMEOUT
:
SWITCH_STATUS_GENERR
;
}
else
if
(
bytes
==
0
)
{
}
else
if
(
bytes
<
rtp_header_len
)
{
frame
->
datalen
=
0
;
return
SWITCH_STATUS_BREAK
;
}
else
{
...
...
@@ -3098,8 +3108,10 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_zerocopy_read(switch_rtp_t *rtp_sessi
*
datalen
=
0
;
return
SWITCH_STATUS_GENERR
;
}
else
{
if
(
bytes
>
rtp_header_len
)
{
bytes
-=
rtp_header_len
;
}
}
*
datalen
=
bytes
;
return
SWITCH_STATUS_SUCCESS
;
...
...
@@ -3126,7 +3138,9 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
send_msg
->
header
.
pt
=
rtp_session
->
te
;
}
data
=
send_msg
->
body
;
if
(
datalen
>
rtp_header_len
)
{
datalen
-=
rtp_header_len
;
}
}
else
{
uint8_t
m
=
0
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论