Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
166249b0
提交
166249b0
authored
6月 20, 2012
作者:
Mathieu Rene
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Check in TDM and RTP controllable channels (incomplete)
上级
af39d4c9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
1110 行增加
和
21 行删除
+1110
-21
Makefile.in
libs/freetdm/mod_freetdm/Makefile.in
+1
-0
mod_freetdm.c
libs/freetdm/mod_freetdm/mod_freetdm.c
+2
-2
tdm.c
libs/freetdm/mod_freetdm/tdm.c
+413
-0
sdp_parse.c
libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c
+29
-16
sdp.h
libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp.h
+8
-2
Makefile.am
src/mod/endpoints/mod_sofia/Makefile.am
+1
-1
mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.c
+2
-0
mod_sofia.h
src/mod/endpoints/mod_sofia/mod_sofia.h
+1
-0
rtp.c
src/mod/endpoints/mod_sofia/rtp.c
+653
-0
没有找到文件。
libs/freetdm/mod_freetdm/Makefile.in
浏览文件 @
166249b0
...
@@ -4,6 +4,7 @@ BASE=../../..
...
@@ -4,6 +4,7 @@ BASE=../../..
FT_DIR
=
..
FT_DIR
=
..
VERBOSE
=
1
VERBOSE
=
1
FTLA
=
$(FT_DIR)
/libfreetdm.la
FTLA
=
$(FT_DIR)
/libfreetdm.la
LOCAL_OBJS
=
tdm.o
LOCAL_CFLAGS
=
-I
$(FT_DIR)
/src/include
-I
$(FT_DIR)
/src/isdn/include
$(FT_CFLAGS)
LOCAL_CFLAGS
=
-I
$(FT_DIR)
/src/include
-I
$(FT_DIR)
/src/isdn/include
$(FT_CFLAGS)
LOCAL_LDFLAGS
=
-L
$(FT_DIR)
-lfreetdm
LOCAL_LDFLAGS
=
-L
$(FT_DIR)
-lfreetdm
include
$(BASE)/build/modmake.rules
include
$(BASE)/build/modmake.rules
...
...
libs/freetdm/mod_freetdm/mod_freetdm.c
浏览文件 @
166249b0
...
@@ -873,7 +873,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
...
@@ -873,7 +873,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
if
(
!
tech_pvt
->
ftdmchan
)
{
if
(
!
tech_pvt
->
ftdmchan
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"no ftdmchan set in channel %s!
\n
"
,
name
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"no ftdmchan set in channel %s!
\n
"
,
name
);
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
}
span_id
=
ftdm_channel_get_span_id
(
tech_pvt
->
ftdmchan
);
span_id
=
ftdm_channel_get_span_id
(
tech_pvt
->
ftdmchan
);
chan_id
=
ftdm_channel_get_id
(
tech_pvt
->
ftdmchan
);
chan_id
=
ftdm_channel_get_id
(
tech_pvt
->
ftdmchan
);
...
@@ -906,7 +906,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
...
@@ -906,7 +906,7 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
ftdm_channel_wait
(
tech_pvt
->
ftdmchan
,
&
wflags
,
ftdm_channel_get_io_interval
(
tech_pvt
->
ftdmchan
)
*
10
);
ftdm_channel_wait
(
tech_pvt
->
ftdmchan
,
&
wflags
,
ftdm_channel_get_io_interval
(
tech_pvt
->
ftdmchan
)
*
10
);
if
(
!
(
wflags
&
FTDM_WRITE
))
{
if
(
!
(
wflags
&
FTDM_WRITE
))
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Dropping frame! (write not
e
ready) in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Dropping frame! (write not ready) in channel %s device %d:%d!
\n
"
,
name
,
span_id
,
chan_id
);
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
}
}
...
...
libs/freetdm/mod_freetdm/tdm.c
0 → 100644
浏览文件 @
166249b0
差异被折叠。
点击展开。
libs/sofia-sip/libsofia-sip-ua/sdp/sdp_parse.c
浏览文件 @
166249b0
...
@@ -81,6 +81,7 @@ struct sdp_parser_s {
...
@@ -81,6 +81,7 @@ struct sdp_parser_s {
unsigned
pr_insane
:
1
;
unsigned
pr_insane
:
1
;
unsigned
pr_c_missing
:
1
;
unsigned
pr_c_missing
:
1
;
unsigned
pr_config
:
1
;
unsigned
pr_config
:
1
;
unsigned
pr_megaco
:
1
;
};
};
#define is_posdigit(c) ((c) >= '1' && (c) <= '9')
#define is_posdigit(c) ((c) >= '1' && (c) <= '9')
...
@@ -176,6 +177,7 @@ sdp_parse(su_home_t *home, char const msg[], issize_t msgsize, int flags)
...
@@ -176,6 +177,7 @@ sdp_parse(su_home_t *home, char const msg[], issize_t msgsize, int flags)
if
(
flags
&
sdp_f_config
)
if
(
flags
&
sdp_f_config
)
p
->
pr_c_missing
=
1
,
p
->
pr_config
=
1
;
p
->
pr_c_missing
=
1
,
p
->
pr_config
=
1
;
p
->
pr_mode_manual
=
(
flags
&
sdp_f_mode_manual
)
!=
0
;
p
->
pr_mode_manual
=
(
flags
&
sdp_f_mode_manual
)
!=
0
;
p
->
pr_megaco
=
(
flags
&
sdp_f_megaco
)
!=
0
;
p
->
pr_session_mode
=
sdp_sendrecv
;
p
->
pr_session_mode
=
sdp_sendrecv
;
parse_message
(
p
);
parse_message
(
p
);
...
@@ -1502,8 +1504,18 @@ static void parse_payload(sdp_parser_t *p, char *r, sdp_rtpmap_t **result)
...
@@ -1502,8 +1504,18 @@ static void parse_payload(sdp_parser_t *p, char *r, sdp_rtpmap_t **result)
{
{
while
(
*
r
)
{
while
(
*
r
)
{
unsigned
long
value
;
unsigned
long
value
;
if
(((
p
->
pr_config
&&
r
[
0
]
==
'*'
)
||
(
p
->
pr_megaco
&&
r
[
0
]
==
MEGACO_CHOOSE_TOK
))
&&
(
r
[
1
]
==
' '
||
r
[
1
]
==
'\0'
))
{
PARSE_ALLOC
(
p
,
sdp_rtpmap_t
,
rm
);
*
result
=
rm
;
result
=
&
rm
->
rm_next
;
rm
->
rm_predef
=
1
;
rm
->
rm_any
=
1
;
rm
->
rm_encoding
=
"*"
;
rm
->
rm_rate
=
0
;
if
(
parse_ul
(
p
,
&
r
,
&
value
,
128
)
==
0
)
{
return
;
}
else
if
(
parse_ul
(
p
,
&
r
,
&
value
,
128
)
==
0
&&
value
<
128
)
{
PARSE_ALLOC
(
p
,
sdp_rtpmap_t
,
rm
);
PARSE_ALLOC
(
p
,
sdp_rtpmap_t
,
rm
);
assert
(
0
<=
value
&&
value
<
128
);
assert
(
0
<=
value
&&
value
<
128
);
...
@@ -1519,21 +1531,8 @@ static void parse_payload(sdp_parser_t *p, char *r, sdp_rtpmap_t **result)
...
@@ -1519,21 +1531,8 @@ static void parse_payload(sdp_parser_t *p, char *r, sdp_rtpmap_t **result)
rm
->
rm_encoding
=
""
;
rm
->
rm_encoding
=
""
;
rm
->
rm_rate
=
0
;
rm
->
rm_rate
=
0
;
}
}
}
}
else
{
else
if
(
p
->
pr_config
&&
r
[
0
]
==
'*'
&&
(
r
[
1
]
==
' '
||
r
[
1
]
==
'\0'
))
{
parsing_error
(
p
,
"m= invalid format for RTP/AVP"
);
PARSE_ALLOC
(
p
,
sdp_rtpmap_t
,
rm
);
*
result
=
rm
;
result
=
&
rm
->
rm_next
;
rm
->
rm_predef
=
1
;
rm
->
rm_any
=
1
;
rm
->
rm_encoding
=
"*"
;
rm
->
rm_rate
=
0
;
return
;
}
else
{
parsing_error
(
p
,
"m= invalid format for RTP/AVT"
);
return
;
return
;
}
}
...
@@ -1797,6 +1796,13 @@ static int parse_ul(sdp_parser_t *p, char **r,
...
@@ -1797,6 +1796,13 @@ static int parse_ul(sdp_parser_t *p, char **r,
return
0
;
return
0
;
}
}
if
(
p
->
pr_megaco
&&
*
ul
==
MEGACO_CHOOSE_TOK
)
{
*
result
=
MEGACO_CHOOSE
;
(
*
r
)
++
;
*
r
+=
strspn
(
*
r
,
SPACE
TAB
);
return
0
;
}
return
-
1
;
return
-
1
;
}
}
...
@@ -1824,6 +1830,13 @@ static int parse_ull(sdp_parser_t *p, char **r,
...
@@ -1824,6 +1830,13 @@ static int parse_ull(sdp_parser_t *p, char **r,
return
0
;
return
0
;
}
}
if
(
p
->
pr_megaco
&&
*
s
==
MEGACO_CHOOSE_TOK
)
{
*
result
=
MEGACO_CHOOSE
;
(
*
r
)
++
;
*
r
+=
strspn
(
*
r
,
SPACE
TAB
);
return
0
;
}
return
-
1
;
return
-
1
;
}
}
...
...
libs/sofia-sip/libsofia-sip-ua/sdp/sofia-sip/sdp.h
浏览文件 @
166249b0
...
@@ -24,6 +24,10 @@
...
@@ -24,6 +24,10 @@
#ifndef SDP_H
#ifndef SDP_H
#define SDP_H
#define SDP_H
#define MEGACO_CHOOSE_TOK '$'
#define MEGACO_CHOOSE (UINT16_MAX + 1)
/**@file sofia-sip/sdp.h Simple SDP (RFC 2327) Interface.
/**@file sofia-sip/sdp.h Simple SDP (RFC 2327) Interface.
*
*
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
* @author Pekka Pessi <Pekka.Pessi@nokia.com>
...
@@ -260,7 +264,7 @@ typedef enum {
...
@@ -260,7 +264,7 @@ typedef enum {
/** Media announcement.
/** Media announcement.
*
*
* This structure describes one media type, e.g., audio. The description
* This structure describes one media type, e.g., audio. The description
* contains the transport address (IP address and port) used for the group,
* contains the transport address (IP address and port) used for the group,
/Users/mrene/Downloads
* the transport protocol used, the media formats or RTP payload types, and
* the transport protocol used, the media formats or RTP payload types, and
* optionally media-specific bandwidth specification, encryption key and
* optionally media-specific bandwidth specification, encryption key and
* attributes.
* attributes.
...
@@ -525,7 +529,9 @@ enum sdp_parse_flags_e {
...
@@ -525,7 +529,9 @@ enum sdp_parse_flags_e {
/** Do not generate or parse SDP mode */
/** Do not generate or parse SDP mode */
sdp_f_mode_manual
=
512
,
sdp_f_mode_manual
=
512
,
/** Always generate media-level mode attributes */
/** Always generate media-level mode attributes */
sdp_f_mode_always
=
1024
sdp_f_mode_always
=
1024
,
/** Allow optional (choose) parameters */
sdp_f_megaco
=
2048
};
};
/** SDP parser handle. */
/** SDP parser handle. */
...
...
src/mod/endpoints/mod_sofia/Makefile.am
浏览文件 @
166249b0
...
@@ -9,7 +9,7 @@ SOFIAUA_BUILDDIR=$(SOFIA_BUILDDIR)/libsofia-sip-ua
...
@@ -9,7 +9,7 @@ SOFIAUA_BUILDDIR=$(SOFIA_BUILDDIR)/libsofia-sip-ua
SOFIALA
=
$(SOFIAUA_BUILDDIR)
/libsofia-sip-ua.la
SOFIALA
=
$(SOFIAUA_BUILDDIR)
/libsofia-sip-ua.la
mod_LTLIBRARIES
=
mod_sofia.la
mod_LTLIBRARIES
=
mod_sofia.la
mod_sofia_la_SOURCES
=
mod_sofia.c sofia.c sofia_glue.c sofia_presence.c sofia_reg.c sip-dig.c mod_sofia.h
mod_sofia_la_SOURCES
=
mod_sofia.c sofia.c sofia_glue.c sofia_presence.c sofia_reg.c sip-dig.c
rtp.c
mod_sofia.h
mod_sofia_la_CFLAGS
=
$(AM_CFLAGS)
-I
.
$(SOFIA_CMD_LINE_CFLAGS)
mod_sofia_la_CFLAGS
=
$(AM_CFLAGS)
-I
.
$(SOFIA_CMD_LINE_CFLAGS)
mod_sofia_la_CFLAGS
+=
-I
$(SOFIAUA_DIR)
/bnf
-I
$(SOFIAUA_BUILDDIR)
/bnf
mod_sofia_la_CFLAGS
+=
-I
$(SOFIAUA_DIR)
/bnf
-I
$(SOFIAUA_BUILDDIR)
/bnf
mod_sofia_la_CFLAGS
+=
-I
$(SOFIAUA_DIR)
/http
-I
$(SOFIAUA_BUILDDIR)
/http
mod_sofia_la_CFLAGS
+=
-I
$(SOFIAUA_DIR)
/http
-I
$(SOFIAUA_BUILDDIR)
/http
...
...
src/mod/endpoints/mod_sofia/mod_sofia.c
浏览文件 @
166249b0
...
@@ -5634,6 +5634,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
...
@@ -5634,6 +5634,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
SWITCH_ADD_API
(
api_interface
,
"sofia_count_reg"
,
"Count Sofia registration"
,
sofia_count_reg_function
,
"[profile/]<user>@<domain>"
);
SWITCH_ADD_API
(
api_interface
,
"sofia_count_reg"
,
"Count Sofia registration"
,
sofia_count_reg_function
,
"[profile/]<user>@<domain>"
);
SWITCH_ADD_API
(
api_interface
,
"sofia_dig"
,
"SIP DIG"
,
sip_dig_function
,
"<url>"
);
SWITCH_ADD_API
(
api_interface
,
"sofia_dig"
,
"SIP DIG"
,
sip_dig_function
,
"<url>"
);
SWITCH_ADD_CHAT
(
chat_interface
,
SOFIA_CHAT_PROTO
,
sofia_presence_chat_send
);
SWITCH_ADD_CHAT
(
chat_interface
,
SOFIA_CHAT_PROTO
,
sofia_presence_chat_send
);
crtp_init
(
*
module_interface
);
/* indicate that the module should continue to be loaded */
/* indicate that the module should continue to be loaded */
return
SWITCH_STATUS_SUCCESS
;
return
SWITCH_STATUS_SUCCESS
;
...
...
src/mod/endpoints/mod_sofia/mod_sofia.h
浏览文件 @
166249b0
...
@@ -1152,3 +1152,4 @@ void sofia_process_dispatch_event(sofia_dispatch_event_t **dep);
...
@@ -1152,3 +1152,4 @@ void sofia_process_dispatch_event(sofia_dispatch_event_t **dep);
char
*
sofia_glue_get_host
(
const
char
*
str
,
switch_memory_pool_t
*
pool
);
char
*
sofia_glue_get_host
(
const
char
*
str
,
switch_memory_pool_t
*
pool
);
void
sofia_presence_check_subscriptions
(
sofia_profile_t
*
profile
,
time_t
now
);
void
sofia_presence_check_subscriptions
(
sofia_profile_t
*
profile
,
time_t
now
);
void
sofia_msg_thread_start
(
int
idx
);
void
sofia_msg_thread_start
(
int
idx
);
void
crtp_init
(
switch_loadable_module_interface_t
*
module_interface
);
src/mod/endpoints/mod_sofia/rtp.c
0 → 100644
浏览文件 @
166249b0
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论