Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
9cf88256
提交
9cf88256
authored
4月 02, 2010
作者:
Mathieu Parent
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Skinny: security
- Avoid writing outside of fields - tab ident
上级
8950d00b
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
1891 行增加
和
1844 行删除
+1891
-1844
mod_skinny.c
src/mod/endpoints/mod_skinny/mod_skinny.c
+7
-7
skinny_api.c
src/mod/endpoints/mod_skinny/skinny_api.c
+3
-3
skinny_protocol.c
src/mod/endpoints/mod_skinny/skinny_protocol.c
+1848
-1818
skinny_protocol.h
src/mod/endpoints/mod_skinny/skinny_protocol.h
+32
-15
skinny_tables.c
src/mod/endpoints/mod_skinny/skinny_tables.c
+1
-1
没有找到文件。
src/mod/endpoints/mod_skinny/mod_skinny.c
浏览文件 @
9cf88256
...
@@ -628,17 +628,17 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN
...
@@ -628,17 +628,17 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN
skinny_profile_find_listener_by_device_name_and_instance
(
helper
->
tech_pvt
->
profile
,
device_name
,
device_instance
,
&
listener
);
skinny_profile_find_listener_by_device_name_and_instance
(
helper
->
tech_pvt
->
profile
,
device_name
,
device_instance
,
&
listener
);
if
(
listener
)
{
if
(
listener
)
{
if
(
call_state
==
SKINNY_CONNECTED
)
{
if
(
call_state
==
SKINNY_CONNECTED
)
{
stop_tone
(
listener
,
line_instance
,
call_id
);
s
end_s
top_tone
(
listener
,
line_instance
,
call_id
);
}
}
set_lamp
(
listener
,
SKINNY_BUTTON_LINE
,
line_instance
,
SKINNY_LAMP_OFF
);
se
nd_se
t_lamp
(
listener
,
SKINNY_BUTTON_LINE
,
line_instance
,
SKINNY_LAMP_OFF
);
clear_prompt_status
(
listener
,
line_instance
,
call_id
);
send_
clear_prompt_status
(
listener
,
line_instance
,
call_id
);
if
(
call_state
==
SKINNY_CONNECTED
)
{
/* calling parties */
if
(
call_state
==
SKINNY_CONNECTED
)
{
/* calling parties */
close_receive_channel
(
listener
,
send_
close_receive_channel
(
listener
,
call_id
,
/* uint32_t conference_id, */
call_id
,
/* uint32_t conference_id, */
helper
->
tech_pvt
->
party_id
,
/* uint32_t pass_thru_party_id, */
helper
->
tech_pvt
->
party_id
,
/* uint32_t pass_thru_party_id, */
call_id
/* uint32_t conference_id2, */
call_id
/* uint32_t conference_id2, */
);
);
stop_media_transmission
(
listener
,
s
end_s
top_media_transmission
(
listener
,
call_id
,
/* uint32_t conference_id, */
call_id
,
/* uint32_t conference_id, */
helper
->
tech_pvt
->
party_id
,
/* uint32_t pass_thru_party_id, */
helper
->
tech_pvt
->
party_id
,
/* uint32_t pass_thru_party_id, */
call_id
/* uint32_t conference_id2, */
call_id
/* uint32_t conference_id2, */
...
@@ -648,8 +648,8 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN
...
@@ -648,8 +648,8 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN
skinny_line_set_state
(
listener
,
line_instance
,
call_id
,
SKINNY_ON_HOOK
);
skinny_line_set_state
(
listener
,
line_instance
,
call_id
,
SKINNY_ON_HOOK
);
send_select_soft_keys
(
listener
,
line_instance
,
call_id
,
SKINNY_KEY_SET_ON_HOOK
,
0xffff
);
send_select_soft_keys
(
listener
,
line_instance
,
call_id
,
SKINNY_KEY_SET_ON_HOOK
,
0xffff
);
/* TODO: DefineTimeDate */
/* TODO: DefineTimeDate */
set_speaker_mode
(
listener
,
SKINNY_SPEAKER_OFF
);
se
nd_se
t_speaker_mode
(
listener
,
SKINNY_SPEAKER_OFF
);
set_ringer
(
listener
,
SKINNY_RING_OFF
,
SKINNY_RING_FOREVER
,
0
,
call_id
);
se
nd_se
t_ringer
(
listener
,
SKINNY_RING_OFF
,
SKINNY_RING_FOREVER
,
0
,
call_id
);
}
}
return
0
;
return
0
;
...
...
src/mod/endpoints/mod_skinny/skinny_api.c
浏览文件 @
9cf88256
...
@@ -249,7 +249,7 @@ static switch_status_t skinny_api_cmd_profile_device_send_ringer_message(const c
...
@@ -249,7 +249,7 @@ static switch_status_t skinny_api_cmd_profile_device_send_ringer_message(const c
listener_t
*
listener
=
NULL
;
listener_t
*
listener
=
NULL
;
skinny_profile_find_listener_by_device_name
(
profile
,
device_name
,
&
listener
);
skinny_profile_find_listener_by_device_name
(
profile
,
device_name
,
&
listener
);
if
(
listener
)
{
if
(
listener
)
{
set_ringer
(
listener
,
skinny_str2ring_type
(
ring_type
),
skinny_str2ring_mode
(
ring_mode
),
0
,
0
);
se
nd_se
t_ringer
(
listener
,
skinny_str2ring_type
(
ring_type
),
skinny_str2ring_mode
(
ring_mode
),
0
,
0
);
}
else
{
}
else
{
stream
->
write_function
(
stream
,
"Listener not found!
\n
"
);
stream
->
write_function
(
stream
,
"Listener not found!
\n
"
);
}
}
...
@@ -268,7 +268,7 @@ static switch_status_t skinny_api_cmd_profile_device_send_lamp_message(const cha
...
@@ -268,7 +268,7 @@ static switch_status_t skinny_api_cmd_profile_device_send_lamp_message(const cha
listener_t
*
listener
=
NULL
;
listener_t
*
listener
=
NULL
;
skinny_profile_find_listener_by_device_name
(
profile
,
device_name
,
&
listener
);
skinny_profile_find_listener_by_device_name
(
profile
,
device_name
,
&
listener
);
if
(
listener
)
{
if
(
listener
)
{
set_lamp
(
listener
,
skinny_str2button
(
stimulus
),
atoi
(
instance
),
skinny_str2lamp_mode
(
lamp_mode
));
se
nd_se
t_lamp
(
listener
,
skinny_str2button
(
stimulus
),
atoi
(
instance
),
skinny_str2lamp_mode
(
lamp_mode
));
}
else
{
}
else
{
stream
->
write_function
(
stream
,
"Listener not found!
\n
"
);
stream
->
write_function
(
stream
,
"Listener not found!
\n
"
);
}
}
...
@@ -287,7 +287,7 @@ static switch_status_t skinny_api_cmd_profile_device_send_speaker_mode_message(c
...
@@ -287,7 +287,7 @@ static switch_status_t skinny_api_cmd_profile_device_send_speaker_mode_message(c
listener_t
*
listener
=
NULL
;
listener_t
*
listener
=
NULL
;
skinny_profile_find_listener_by_device_name
(
profile
,
device_name
,
&
listener
);
skinny_profile_find_listener_by_device_name
(
profile
,
device_name
,
&
listener
);
if
(
listener
)
{
if
(
listener
)
{
set_speaker_mode
(
listener
,
skinny_str2speaker_mode
(
speaker_mode
));
se
nd_se
t_speaker_mode
(
listener
,
skinny_str2speaker_mode
(
speaker_mode
));
}
else
{
}
else
{
stream
->
write_function
(
stream
,
"Listener not found!
\n
"
);
stream
->
write_function
(
stream
,
"Listener not found!
\n
"
);
}
}
...
...
src/mod/endpoints/mod_skinny/skinny_protocol.c
浏览文件 @
9cf88256
差异被折叠。
点击展开。
src/mod/endpoints/mod_skinny/skinny_protocol.h
浏览文件 @
9cf88256
...
@@ -347,8 +347,8 @@ struct button_template_message {
...
@@ -347,8 +347,8 @@ struct button_template_message {
#define CAPABILITIES_REQ_MESSAGE 0x009B
#define CAPABILITIES_REQ_MESSAGE 0x009B
/* RegisterRejectMessage */
/* RegisterRejectMessage */
#define REGISTER_REJ_MESSAGE 0x009D
#define REGISTER_REJ
ECT
_MESSAGE 0x009D
struct
register_rej_message
{
struct
register_rej
ect
_message
{
char
error
[
33
];
char
error
[
33
];
};
};
...
@@ -528,7 +528,7 @@ union skinny_data {
...
@@ -528,7 +528,7 @@ union skinny_data {
struct
config_stat_res_message
config_res
;
struct
config_stat_res_message
config_res
;
struct
define_time_date_message
define_time_date
;
struct
define_time_date_message
define_time_date
;
struct
button_template_message
button_template
;
struct
button_template_message
button_template
;
struct
register_rej_message
reg_rej
;
struct
register_rej
ect
_message
reg_rej
;
struct
reset_message
reset
;
struct
reset_message
reset
;
struct
open_receive_channel_message
open_receive_channel
;
struct
open_receive_channel_message
open_receive_channel
;
struct
close_receive_channel_message
close_receive_channel
;
struct
close_receive_channel_message
close_receive_channel
;
...
@@ -642,26 +642,32 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re
...
@@ -642,26 +642,32 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re
/*****************************************************************************/
/*****************************************************************************/
/* SKINNY MESSAGE HELPER */
/* SKINNY MESSAGE HELPER */
/*****************************************************************************/
/*****************************************************************************/
switch_status_t
start_tone
(
listener_t
*
listener
,
switch_status_t
send_register_ack
(
listener_t
*
listener
,
uint32_t
keep_alive
,
char
*
date_format
,
char
*
reserved
,
uint32_t
secondary_keep_alive
,
char
*
reserved2
);
switch_status_t
send_start_tone
(
listener_t
*
listener
,
uint32_t
tone
,
uint32_t
tone
,
uint32_t
reserved
,
uint32_t
reserved
,
uint32_t
line_instance
,
uint32_t
line_instance
,
uint32_t
call_id
);
uint32_t
call_id
);
switch_status_t
stop_tone
(
listener_t
*
listener
,
switch_status_t
s
end_s
top_tone
(
listener_t
*
listener
,
uint32_t
line_instance
,
uint32_t
line_instance
,
uint32_t
call_id
);
uint32_t
call_id
);
switch_status_t
set_ringer
(
listener_t
*
listener
,
switch_status_t
se
nd_se
t_ringer
(
listener_t
*
listener
,
uint32_t
ring_type
,
uint32_t
ring_type
,
uint32_t
ring_mode
,
uint32_t
ring_mode
,
uint32_t
line_instance
,
uint32_t
line_instance
,
uint32_t
call_id
);
uint32_t
call_id
);
switch_status_t
set_lamp
(
listener_t
*
listener
,
switch_status_t
se
nd_se
t_lamp
(
listener_t
*
listener
,
uint32_t
stimulus
,
uint32_t
stimulus
,
uint32_t
stimulus_instance
,
uint32_t
stimulus_instance
,
uint32_t
mode
);
uint32_t
mode
);
switch_status_t
set_speaker_mode
(
listener_t
*
listener
,
switch_status_t
se
nd_se
t_speaker_mode
(
listener_t
*
listener
,
uint32_t
mode
);
uint32_t
mode
);
switch_status_t
start_media_transmission
(
listener_t
*
listener
,
switch_status_t
s
end_s
tart_media_transmission
(
listener_t
*
listener
,
uint32_t
conference_id
,
uint32_t
conference_id
,
uint32_t
pass_thru_party_id
,
uint32_t
pass_thru_party_id
,
uint32_t
remote_ip
,
uint32_t
remote_ip
,
...
@@ -672,7 +678,7 @@ switch_status_t start_media_transmission(listener_t *listener,
...
@@ -672,7 +678,7 @@ switch_status_t start_media_transmission(listener_t *listener,
uint32_t
silence_suppression
,
uint32_t
silence_suppression
,
uint16_t
max_frames_per_packet
,
uint16_t
max_frames_per_packet
,
uint32_t
g723_bitrate
);
uint32_t
g723_bitrate
);
switch_status_t
stop_media_transmission
(
listener_t
*
listener
,
switch_status_t
s
end_s
top_media_transmission
(
listener_t
*
listener
,
uint32_t
conference_id
,
uint32_t
conference_id
,
uint32_t
pass_thru_party_id
,
uint32_t
pass_thru_party_id
,
uint32_t
conference_id2
);
uint32_t
conference_id2
);
...
@@ -697,7 +703,18 @@ switch_status_t send_call_info(listener_t *listener,
...
@@ -697,7 +703,18 @@ switch_status_t send_call_info(listener_t *listener,
uint32_t
call_instance
,
uint32_t
call_instance
,
uint32_t
call_security_status
,
uint32_t
call_security_status
,
uint32_t
party_pi_restriction_bits
);
uint32_t
party_pi_restriction_bits
);
switch_status_t
open_receive_channel
(
listener_t
*
listener
,
switch_status_t
send_define_time_date
(
listener_t
*
listener
,
uint32_t
year
,
uint32_t
month
,
uint32_t
day_of_week
,
/* monday = 1 */
uint32_t
day
,
uint32_t
hour
,
uint32_t
minute
,
uint32_t
seconds
,
uint32_t
milliseconds
,
uint32_t
timestamp
);
switch_status_t
send_define_current_time_date
(
listener_t
*
listener
);
switch_status_t
send_open_receive_channel
(
listener_t
*
listener
,
uint32_t
conference_id
,
uint32_t
conference_id
,
uint32_t
pass_thru_party_id
,
uint32_t
pass_thru_party_id
,
uint32_t
packets
,
uint32_t
packets
,
...
@@ -706,7 +723,7 @@ switch_status_t open_receive_channel(listener_t *listener,
...
@@ -706,7 +723,7 @@ switch_status_t open_receive_channel(listener_t *listener,
uint32_t
g723_bitrate
,
uint32_t
g723_bitrate
,
uint32_t
conference_id2
,
uint32_t
conference_id2
,
uint32_t
reserved
[
10
]);
uint32_t
reserved
[
10
]);
switch_status_t
close_receive_channel
(
listener_t
*
listener
,
switch_status_t
send_
close_receive_channel
(
listener_t
*
listener
,
uint32_t
conference_id
,
uint32_t
conference_id
,
uint32_t
pass_thru_party_id
,
uint32_t
pass_thru_party_id
,
uint32_t
conference_id2
);
uint32_t
conference_id2
);
...
@@ -719,15 +736,15 @@ switch_status_t send_call_state(listener_t *listener,
...
@@ -719,15 +736,15 @@ switch_status_t send_call_state(listener_t *listener,
uint32_t
call_state
,
uint32_t
call_state
,
uint32_t
line_instance
,
uint32_t
line_instance
,
uint32_t
call_id
);
uint32_t
call_id
);
switch_status_t
display_prompt_status
(
listener_t
*
listener
,
switch_status_t
send_
display_prompt_status
(
listener_t
*
listener
,
uint32_t
timeout
,
uint32_t
timeout
,
char
display
[
32
],
char
display
[
32
],
uint32_t
line_instance
,
uint32_t
line_instance
,
uint32_t
call_id
);
uint32_t
call_id
);
switch_status_t
clear_prompt_status
(
listener_t
*
listener
,
switch_status_t
send_
clear_prompt_status
(
listener_t
*
listener
,
uint32_t
line_instance
,
uint32_t
line_instance
,
uint32_t
call_id
);
uint32_t
call_id
);
switch_status_t
activate_call_plane
(
listener_t
*
listener
,
switch_status_t
send_
activate_call_plane
(
listener_t
*
listener
,
uint32_t
line_instance
);
uint32_t
line_instance
);
switch_status_t
send_dialed_number
(
listener_t
*
listener
,
switch_status_t
send_dialed_number
(
listener_t
*
listener
,
char
called_party
[
24
],
char
called_party
[
24
],
...
...
src/mod/endpoints/mod_skinny/skinny_tables.c
浏览文件 @
9cf88256
...
@@ -73,7 +73,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
...
@@ -73,7 +73,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
{
"DefineTimeDateMessage"
,
DEFINE_TIME_DATE_MESSAGE
},
{
"DefineTimeDateMessage"
,
DEFINE_TIME_DATE_MESSAGE
},
{
"ButtonTemplateResMessage"
,
BUTTON_TEMPLATE_RES_MESSAGE
},
{
"ButtonTemplateResMessage"
,
BUTTON_TEMPLATE_RES_MESSAGE
},
{
"CapabilitiesReqMessage"
,
CAPABILITIES_REQ_MESSAGE
},
{
"CapabilitiesReqMessage"
,
CAPABILITIES_REQ_MESSAGE
},
{
"RegisterRej
Message"
,
REGISTER_REJ
_MESSAGE
},
{
"RegisterRej
ectMessage"
,
REGISTER_REJECT
_MESSAGE
},
{
"ResetMessage"
,
RESET_MESSAGE
},
{
"ResetMessage"
,
RESET_MESSAGE
},
{
"KeepAliveAckMessage"
,
KEEP_ALIVE_ACK_MESSAGE
},
{
"KeepAliveAckMessage"
,
KEEP_ALIVE_ACK_MESSAGE
},
{
"OpenReceiveChannelMessage"
,
OPEN_RECEIVE_CHANNEL_MESSAGE
},
{
"OpenReceiveChannelMessage"
,
OPEN_RECEIVE_CHANNEL_MESSAGE
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论