Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
319d3661
提交
319d3661
authored
4月 27, 2007
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@5030
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
e90d0380
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
267 行增加
和
226 行删除
+267
-226
mod_alsa.c
src/mod/endpoints/mod_alsa/mod_alsa.c
+180
-226
sofia.c
src/mod/endpoints/mod_sofia/sofia.c
+8
-0
mod_xml_rpc.c
src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
+79
-0
没有找到文件。
src/mod/endpoints/mod_alsa/mod_alsa.c
浏览文件 @
319d3661
差异被折叠。
点击展开。
src/mod/endpoints/mod_sofia/sofia.c
浏览文件 @
319d3661
...
...
@@ -254,11 +254,15 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
profile
->
s_root
=
su_root_create
(
NULL
);
profile
->
home
=
su_home_new
(
sizeof
(
*
profile
->
home
));
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Creating agent for %s
\n
"
,
profile
->
name
);
profile
->
nua
=
nua_create
(
profile
->
s_root
,
/* Event loop */
sofia_event_callback
,
/* Callback for processing events */
profile
,
/* Additional data to pass to callback */
NUTAG_URL
(
profile
->
bindurl
),
NTATAG_UDP_MTU
(
65536
),
TAG_END
());
/* Last tag should always finish the sequence */
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Created agent for %s
\n
"
,
profile
->
name
);
nua_set_params
(
profile
->
nua
,
//NUTAG_EARLY_MEDIA(1),
NUTAG_AUTOANSWER
(
0
),
...
...
@@ -275,6 +279,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
TAG_IF
((
profile
->
pflags
&
PFLAG_PRESENCE
),
NUTAG_ALLOW_EVENTS
(
"message-summary"
)),
SIPTAG_SUPPORTED_STR
(
"100rel, precondition"
),
SIPTAG_USER_AGENT_STR
(
SOFIA_USER_AGENT
),
TAG_END
());
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Set params for %s
\n
"
,
profile
->
name
);
for
(
node
=
profile
->
aliases
;
node
;
node
=
node
->
next
)
{
node
->
nua
=
nua_create
(
profile
->
s_root
,
/* Event loop */
...
...
@@ -301,6 +306,7 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
goto
end
;
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"activated db for %s
\n
"
,
profile
->
name
);
switch_mutex_init
(
&
profile
->
ireg_mutex
,
SWITCH_MUTEX_NESTED
,
profile
->
pool
);
switch_mutex_init
(
&
profile
->
gateway_mutex
,
SWITCH_MUTEX_NESTED
,
profile
->
pool
);
...
...
@@ -332,6 +338,8 @@ void *SWITCH_THREAD_FUNC sofia_profile_thread_run(switch_thread_t *thread, void
sofia_presence_establish_presence
(
profile
);
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Starting thread for %s
\n
"
,
profile
->
name
);
while
(
mod_sofia_globals
.
running
==
1
)
{
if
(
++
ireg_loops
>=
IREG_SECONDS
)
{
sofia_reg_check_expire
(
profile
,
time
(
NULL
));
...
...
src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
浏览文件 @
319d3661
...
...
@@ -169,6 +169,9 @@ abyss_bool HandleHook(TSession * r)
}
if
(
switch_event_create
(
&
stream
.
event
,
SWITCH_EVENT_API
)
==
SWITCH_STATUS_SUCCESS
)
{
const
char
*
const
content_length
=
RequestHeaderValue
(
r
,
"content-length"
);
if
(
r
->
uri
)
switch_event_add_header
(
stream
.
event
,
SWITCH_STACK_BOTTOM
,
"HTTP-URI"
,
"%s"
,
r
->
uri
);
if
(
r
->
query
)
...
...
@@ -187,6 +190,82 @@ abyss_bool HandleHook(TSession * r)
switch_event_add_header
(
stream
.
event
,
SWITCH_STACK_BOTTOM
,
"HTTP-USER"
,
"%s"
,
r
->
user
);
if
(
r
->
port
)
switch_event_add_header
(
stream
.
event
,
SWITCH_STACK_BOTTOM
,
"HTTP-PORT"
,
"%u"
,
r
->
port
);
if
(
r
->
query
||
content_length
)
{
char
*
q
,
*
qd
;
char
*
next
;
char
*
query
=
r
->
query
;
char
*
name
,
*
val
;
char
qbuf
[
8192
]
=
""
;
if
(
r
->
method
==
m_post
&&
content_length
)
{
int
len
=
atoi
(
content_length
);
int
qlen
=
0
;
if
(
len
>
0
)
{
int
succeeded
;
char
*
qp
=
qbuf
;
do
{
int
blen
=
r
->
conn
->
buffersize
-
r
->
conn
->
bufferpos
;
if
((
qlen
+
blen
)
>
len
)
{
blen
=
len
-
qlen
;
}
qlen
+=
blen
;
if
(
qlen
>
sizeof
(
qbuf
)
)
{
break
;
}
memcpy
(
qp
,
r
->
conn
->
buffer
+
r
->
conn
->
bufferpos
,
blen
);
qp
+=
blen
;
if
(
qlen
>=
len
)
{
break
;
}
}
while
((
succeeded
=
ConnRead
(
r
->
conn
,
r
->
server
->
timeout
)));
query
=
qbuf
;
}
}
if
(
query
)
{
switch_event_add_header
(
stream
.
event
,
SWITCH_STACK_BOTTOM
,
"HTTP-QUERY"
,
"%s"
,
query
);
qd
=
strdup
(
query
);
assert
(
qd
!=
NULL
);
q
=
qd
;
next
=
q
;
do
{
char
*
p
;
if
((
next
=
strchr
(
next
,
'&'
)))
{
*
next
++
=
'\0'
;
}
for
(
p
=
q
;
p
&&
*
p
;
p
++
)
{
if
(
*
p
==
'+'
)
{
*
p
=
' '
;
}
}
switch_url_decode
(
q
);
name
=
q
;
if
((
val
=
strchr
(
name
,
'='
)))
{
*
val
++
=
'\0'
;
switch_event_add_header
(
stream
.
event
,
SWITCH_STACK_BOTTOM
,
name
,
"%s"
,
val
);
}
q
=
next
;
}
while
(
q
!=
NULL
);
free
(
qd
);
}
}
}
command
=
r
->
uri
+
5
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论