Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
83edba53
提交
83edba53
authored
5月 04, 2006
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@1345
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
49e7b1bb
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
51 行增加
和
42 行删除
+51
-42
libdingaling.c
libs/libdingaling/src/libdingaling.c
+5
-1
mod_dingaling.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
+46
-41
没有找到文件。
libs/libdingaling/src/libdingaling.c
浏览文件 @
83edba53
...
@@ -318,10 +318,14 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
...
@@ -318,10 +318,14 @@ static ldl_status parse_session_code(ldl_handle_t *handle, char *id, char *from,
tag
=
iks_child
(
xml
);
tag
=
iks_child
(
xml
);
while
(
tag
)
{
while
(
tag
)
{
if
(
!
strcasecmp
(
type
,
"info_element"
))
{
if
(
!
strcasecmp
(
iks_name
(
tag
)
,
"info_element"
))
{
char
*
name
=
iks_find_attrib
(
tag
,
"name"
);
char
*
name
=
iks_find_attrib
(
tag
,
"name"
);
char
*
value
=
iks_find_attrib
(
tag
,
"value"
);
char
*
value
=
iks_find_attrib
(
tag
,
"value"
);
if
(
globals
.
debug
)
{
globals
.
logger
(
DL_LOG_DEBUG
,
"Info Element [%s]=[%s]
\n
"
,
name
,
value
);
}
ldl_session_set_value
(
session
,
name
,
value
);
ldl_session_set_value
(
session
,
name
,
value
);
}
else
if
(
!
strcasecmp
(
iks_name
(
tag
),
"candidate"
)
&&
session
->
candidate_len
<
LDL_MAX_CANDIDATES
)
{
}
else
if
(
!
strcasecmp
(
iks_name
(
tag
),
"candidate"
)
&&
session
->
candidate_len
<
LDL_MAX_CANDIDATES
)
{
char
*
key
;
char
*
key
;
double
pref
=
0
.
0
;
double
pref
=
0
.
0
;
...
...
src/mod/endpoints/mod_dingaling/mod_dingaling.c
浏览文件 @
83edba53
...
@@ -1523,11 +1523,6 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
...
@@ -1523,11 +1523,6 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
return
LDL_STATUS_FALSE
;
return
LDL_STATUS_FALSE
;
}
}
if
((
session
=
switch_core_session_request
(
&
channel_endpoint_interface
,
NULL
))
!=
0
)
{
if
((
session
=
switch_core_session_request
(
&
channel_endpoint_interface
,
NULL
))
!=
0
)
{
char
*
exten
;
char
*
context
;
char
*
cid_name
;
char
*
cid_num
;
switch_core_session_add_stream
(
session
,
NULL
);
switch_core_session_add_stream
(
session
,
NULL
);
if
((
tech_pvt
=
(
struct
private_object
*
)
switch_core_session_alloc
(
session
,
sizeof
(
struct
private_object
)))
!=
0
)
{
if
((
tech_pvt
=
(
struct
private_object
*
)
switch_core_session_alloc
(
session
,
sizeof
(
struct
private_object
)))
!=
0
)
{
memset
(
tech_pvt
,
0
,
sizeof
(
*
tech_pvt
));
memset
(
tech_pvt
,
0
,
sizeof
(
*
tech_pvt
));
...
@@ -1547,43 +1542,8 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
...
@@ -1547,43 +1542,8 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
return
LDL_STATUS_FALSE
;
return
LDL_STATUS_FALSE
;
}
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Creating a session for %s
\n
"
,
ldl_session_get_id
(
dlsession
));
if
(
!
(
exten
=
ldl_session_get_value
(
dlsession
,
"dnis"
)))
{
exten
=
profile
->
exten
;
}
if
(
!
(
context
=
ldl_session_get_value
(
dlsession
,
"context"
)))
{
context
=
profile
->
context
;
}
if
(
!
(
cid_name
=
ldl_session_get_value
(
dlsession
,
"caller_id_name"
)))
{
cid_name
=
tech_pvt
->
recip
;
}
if
(
!
(
cid_num
=
ldl_session_get_value
(
dlsession
,
"caller_id_number"
)))
{
cid_num
=
tech_pvt
->
recip
;
}
if
((
tech_pvt
->
caller_profile
=
switch_caller_profile_new
(
switch_core_session_get_pool
(
session
),
profile
->
dialplan
,
cid_name
,
cid_num
,
ldl_session_get_ip
(
dlsession
),
ldl_session_get_value
(
dlsession
,
"ani"
),
ldl_session_get_value
(
dlsession
,
"ani2"
),
ldl_session_get_value
(
dlsession
,
"rdnis"
),
(
char
*
)
modname
,
context
,
exten
))
!=
0
)
{
char
name
[
128
];
snprintf
(
name
,
sizeof
(
name
),
"DingaLing/%s-%04x"
,
tech_pvt
->
caller_profile
->
destination_number
,
rand
()
&
0xffff
);
switch_channel_set_name
(
channel
,
name
);
switch_channel_set_caller_profile
(
channel
,
tech_pvt
->
caller_profile
);
}
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Creating a session for %s
\n
"
,
ldl_session_get_id
(
dlsession
));
ldl_session_set_private
(
dlsession
,
session
);
ldl_session_set_private
(
dlsession
,
session
);
tech_pvt
->
dlsession
=
dlsession
;
tech_pvt
->
dlsession
=
dlsession
;
negotiate_thread_launch
(
session
);
negotiate_thread_launch
(
session
);
...
@@ -1711,10 +1671,55 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
...
@@ -1711,10 +1671,55 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
strncasecmp
(
candidates
[
x
].
address
,
"172.31."
,
7
)
strncasecmp
(
candidates
[
x
].
address
,
"172.31."
,
7
)
)))
{
)))
{
ldl_payload_t
payloads
[
5
];
ldl_payload_t
payloads
[
5
];
char
*
exten
;
char
*
context
;
char
*
cid_name
;
char
*
cid_num
;
memset
(
payloads
,
0
,
sizeof
(
payloads
));
memset
(
payloads
,
0
,
sizeof
(
payloads
));
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Acceptable Candidate %s:%d
\n
"
,
candidates
[
x
].
address
,
candidates
[
x
].
port
);
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Acceptable Candidate %s:%d
\n
"
,
candidates
[
x
].
address
,
candidates
[
x
].
port
);
if
(
!
(
exten
=
ldl_session_get_value
(
dlsession
,
"dnis"
)))
{
exten
=
profile
->
exten
;
}
if
(
!
(
context
=
ldl_session_get_value
(
dlsession
,
"context"
)))
{
context
=
profile
->
context
;
}
if
(
!
(
cid_name
=
ldl_session_get_value
(
dlsession
,
"caller_id_name"
)))
{
cid_name
=
tech_pvt
->
recip
;
}
if
(
!
(
cid_num
=
ldl_session_get_value
(
dlsession
,
"caller_id_number"
)))
{
cid_num
=
tech_pvt
->
recip
;
}
if
(
!
tech_pvt
->
caller_profile
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_DEBUG
,
"Creating an identity for %s %s <%s> %s
\n
"
,
ldl_session_get_id
(
dlsession
),
cid_name
,
cid_num
,
exten
);
if
((
tech_pvt
->
caller_profile
=
switch_caller_profile_new
(
switch_core_session_get_pool
(
session
),
profile
->
dialplan
,
cid_name
,
cid_num
,
ldl_session_get_ip
(
dlsession
),
ldl_session_get_value
(
dlsession
,
"ani"
),
ldl_session_get_value
(
dlsession
,
"ani2"
),
ldl_session_get_value
(
dlsession
,
"rdnis"
),
(
char
*
)
modname
,
context
,
exten
))
!=
0
)
{
char
name
[
128
];
snprintf
(
name
,
sizeof
(
name
),
"DingaLing/%s-%04x"
,
tech_pvt
->
caller_profile
->
destination_number
,
rand
()
&
0xffff
);
switch_channel_set_name
(
channel
,
name
);
switch_channel_set_caller_profile
(
channel
,
tech_pvt
->
caller_profile
);
}
}
if
(
lanaddr
)
{
if
(
lanaddr
)
{
switch_set_flag
(
tech_pvt
,
TFLAG_LANADDR
);
switch_set_flag
(
tech_pvt
,
TFLAG_LANADDR
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论