Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
cb076e6b
提交
cb076e6b
authored
1月 13, 2013
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fucked
上级
5490cdf4
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
781 行增加
和
59 行删除
+781
-59
switch_core_media.h
src/include/switch_core_media.h
+6
-0
switch_rtp.h
src/include/switch_rtp.h
+7
-2
switch_stun.h
src/include/switch_stun.h
+31
-3
mod_skel.c
src/mod/applications/mod_skel/mod_skel.c
+57
-0
switch_core_media.c
src/switch_core_media.c
+82
-21
switch_rtp.c
src/switch_rtp.c
+120
-17
switch_stun.c
src/switch_stun.c
+478
-16
没有找到文件。
src/include/switch_core_media.h
浏览文件 @
cb076e6b
...
...
@@ -40,6 +40,12 @@ SWITCH_BEGIN_EXTERN_C
#define SWITCH_MAX_CAND_ACL 25
typedef
enum
{
ICE_GOOGLE_JINGLE
=
(
1
<<
0
),
ICE_VANILLA
=
(
1
<<
1
),
ICE_CONTROLLED
=
(
1
<<
2
)
}
switch_core_media_ice_type_t
;
typedef
enum
{
DTMF_2833
,
DTMF_INFO
,
...
...
src/include/switch_rtp.h
浏览文件 @
cb076e6b
...
...
@@ -40,6 +40,9 @@
#define SWITCH_RTP_H
SWITCH_BEGIN_EXTERN_C
#include <switch_core_media.h>
#define SWITCH_RTP_MAX_BUF_LEN 16384
#define SWITCH_RTCP_MAX_BUF_LEN 16384
#define SWITCH_RTP_MAX_BUF_LEN_WORDS 4094
/* (max / 4) - 2 */
...
...
@@ -216,8 +219,10 @@ SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session);
\brief Acvite ICE on an RTP session
\return SWITCH_STATUS_SUCCESS
*/
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_activate_ice
(
switch_rtp_t
*
rtp_session
,
char
*
login
,
char
*
rlogin
,
const
char
*
password
);
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_activate_rtcp_ice
(
switch_rtp_t
*
rtp_session
,
char
*
login
,
char
*
rlogin
,
const
char
*
password
);
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_activate_ice
(
switch_rtp_t
*
rtp_session
,
char
*
login
,
char
*
rlogin
,
const
char
*
password
,
switch_core_media_ice_type_t
type
,
uint32_t
priority
);
SWITCH_DECLARE
(
switch_status_t
)
switch_rtp_activate_rtcp_ice
(
switch_rtp_t
*
rtp_session
,
char
*
login
,
char
*
rlogin
,
const
char
*
password
,
switch_core_media_ice_type_t
type
,
uint32_t
priority
);
/*!
\brief Activate sending RTCP Sender Reports (SR's)
...
...
src/include/switch_stun.h
浏览文件 @
cb076e6b
...
...
@@ -81,6 +81,21 @@ typedef enum {
SWITCH_STUN_ATTR_DATA
=
0x0013
,
/* ByteString */
SWITCH_STUN_ATTR_OPTIONS
=
0x8001
,
/* UInt32 */
SWITCH_STUN_ATTR_XOR_MAPPED_ADDRESS
=
0x0020
,
/* Address */
/* ice crap */
SWITCH_STUN_ATTR_PRIORITY
=
0x0024
,
SWITCH_STUN_ATTR_USE_CAND
=
0x0025
,
SWITCH_STUN_ATTR_PADDING
=
0x0026
,
SWITCH_STUN_ATTR_RESP_PORT
=
0x0027
,
SWITCH_STUN_ATTR_SOFTWARE
=
0x8022
,
SWITCH_STUN_ATTR_ALT_SERVER
=
0x8023
,
SWITCH_STUN_ATTR_FINGERPRINT
=
0x8028
,
SWITCH_STUN_ATTR_CONTROLLED
=
0x8029
,
SWITCH_STUN_ATTR_CONTROLLING
=
0x802a
,
SWITCH_STUN_ATTR_RESP_ORIGIN
=
0x802b
,
SWITCH_STUN_ATTR_OTHER_ADDR
=
0x802c
}
switch_stun_attribute_t
;
typedef
enum
{
...
...
@@ -190,7 +205,7 @@ SWITCH_DECLARE(switch_stun_packet_t *) switch_stun_packet_build_header(switch_st
*/
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_username
(
switch_stun_packet_t
*
packet
,
char
*
username
,
uint16_t
ulen
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_password
(
switch_stun_packet_t
*
packet
,
char
*
password
,
uint16_t
ulen
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_software
(
switch_stun_packet_t
*
packet
,
char
*
software
,
uint16_t
ulen
);
/*!
\brief Add a binded address packet attribute
...
...
@@ -202,6 +217,15 @@ SWITCH_DECLARE(uint8_t) switch_stun_packet_attribute_add_password(switch_stun_pa
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_binded_address
(
switch_stun_packet_t
*
packet
,
char
*
ipstr
,
uint16_t
port
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_xor_binded_address
(
switch_stun_packet_t
*
packet
,
char
*
ipstr
,
uint16_t
port
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_integrity
(
switch_stun_packet_t
*
packet
,
const
char
*
pass
);
SWITCH_DECLARE
(
uint32_t
)
switch_crc32_8bytes
(
const
void
*
data
,
size_t
length
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_fingerprint
(
switch_stun_packet_t
*
packet
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_use_candidate
(
switch_stun_packet_t
*
packet
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_controlling
(
switch_stun_packet_t
*
packet
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_controlled
(
switch_stun_packet_t
*
packet
);
SWITCH_DECLARE
(
uint8_t
)
switch_stun_packet_attribute_add_priority
(
switch_stun_packet_t
*
packet
,
uint32_t
priority
);
/*!
\brief Perform a stun lookup
\param ip the local ip to use (replaced with stun results)
...
...
@@ -221,7 +245,9 @@ SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
\param attribute the attribute
\return the padded size in bytes
*/
#define switch_stun_attribute_padded_length(attribute) ((uint16_t)(attribute->length + (sizeof(uint32_t)-1)) & ~sizeof(uint32_t))
#define switch_stun_attribute_padded_length(attribute) (int16_t)((attribute->length & 0x3) ? 0x4 + (attribute->length & ~0x3) : attribute->length)
#define switch_stun_attribute_padded_length_hbo(attribute) (int16_t)((ntohs(attribute->length) & 0x3) ? 0x4 + (ntohs(attribute->length) & ~0x3) : ntohs(attribute->length))
/*!
\brief set a switch_stun_packet_attribute_t pointer to point at the first attribute in a packet
...
...
@@ -236,7 +262,9 @@ SWITCH_DECLARE(switch_status_t) switch_stun_lookup(char **ip,
\param end pointer to the end of the buffer
\return true or false depending on if there are any more attributes
*/
#define switch_stun_packet_next_attribute(attribute, end) (attribute && (attribute = (switch_stun_packet_attribute_t *) (attribute->value + switch_stun_attribute_padded_length(attribute))) && ((void *)attribute < end) && attribute->length && ((void *)(attribute + switch_stun_attribute_padded_length(attribute)) < end))
#define switch_stun_packet_next_attribute(attribute, end) (attribute && (attribute = (switch_stun_packet_attribute_t *) (attribute->value + switch_stun_attribute_padded_length(attribute))) && ((void *)attribute < end) && attribute->type && ((void *)(attribute + switch_stun_attribute_padded_length(attribute)) < end))
#define switch_stun_packet_next_attribute_hbo(attribute, end) (attribute && (attribute = (switch_stun_packet_attribute_t *) (attribute->value + switch_stun_attribute_padded_length_hbo(attribute))) && ((void *)attribute < end) && attribute->type && ((void *)(attribute + switch_stun_attribute_padded_length_hbo(attribute)) < end))
/*!
\brief Obtain the correct length in bytes of a stun packet
...
...
src/mod/applications/mod_skel/mod_skel.c
浏览文件 @
cb076e6b
...
...
@@ -109,11 +109,68 @@ static switch_status_t do_config(switch_bool_t reload)
return
SWITCH_STATUS_SUCCESS
;
}
#include "switch_stun.h"
#define _switch_stun_packet_next_attribute(attribute, end) (attribute && (attribute = (switch_stun_packet_attribute_t *) (attribute->value + ntohs(attribute->length))) && ((void *)attribute < end) && ntohs(attribute->length) && ((void *)(attribute + ntohs(attribute->length)) < end))
#define _switch_stun_attribute_padded_length(attribute) ((uint16_t)(ntohs(attribute->length) + (sizeof(uint32_t)-1)) & ~sizeof(uint32_t))
//#define _switch_stun_packet_next_attribute(attribute, end) (attribute && (attribute = (switch_stun_packet_attribute_t *) (attribute->value + _switch_stun_attribute_padded_length(attribute))) && ((void *)attribute < end) && ((void *)(attribute + _switch_stun_attribute_padded_length(attribute)) < end))
SWITCH_STANDARD_API
(
skel_function
)
{
switch_event_t
*
event
;
unsigned
char
frame_buffer
[
8192
]
=
{
0
};
uint8_t
buf
[
256
]
=
{
0
};
switch_stun_packet_t
*
packet
;
char
user_name
[]
=
"0000000000000000:1111111111111111"
;
//char user_name[] = "0000000000000000";
void
*
end_buf
;
switch_stun_packet_attribute_t
*
attr
;
int
xlen
=
0
;
packet
=
switch_stun_packet_build_header
(
SWITCH_STUN_BINDING_REQUEST
,
NULL
,
buf
);
printf
(
"1len %d %d
\n
"
,
ntohs
(
packet
->
header
.
length
),
xlen
);
switch_stun_packet_attribute_add_username
(
packet
,
user_name
,
strlen
(
user_name
));
printf
(
"2len %d %d
\n
"
,
ntohs
(
packet
->
header
.
length
),
xlen
);
switch_stun_packet_attribute_add_controlled
(
packet
);
//switch_stun_packet_attribute_add_password(packet, user_name, strlen(user_name));
//printf("3len %d %d\n", ntohs(packet->header.length), xlen);
//switch_stun_packet_attribute_add_use_candidate(packet);
switch_stun_packet_attribute_add_integrity
(
packet
,
"FUCK"
);
switch_stun_packet_attribute_add_fingerprint
(
packet
);
end_buf
=
buf
+
((
sizeof
(
buf
)
>
packet
->
header
.
length
)
?
packet
->
header
.
length
:
sizeof
(
buf
));
switch_stun_packet_first_attribute
(
packet
,
attr
);
xlen
=
sizeof
(
switch_stun_packet_header_t
);
printf
(
"len %d %d
\n
"
,
ntohs
(
packet
->
header
.
length
),
xlen
);
do
{
printf
(
"WTF %p %d %d:(%d)
\n
"
,
(
void
*
)
attr
,
ntohs
(
attr
->
type
),
ntohs
(
attr
->
length
),
switch_stun_attribute_padded_length_hbo
(
attr
));
if
(
!
switch_stun_packet_next_attribute_hbo
(
attr
,
end_buf
))
{
break
;
}
xlen
+=
4
+
switch_stun_attribute_padded_length_hbo
(
attr
);
}
while
(
xlen
<=
ntohs
(
packet
->
header
.
length
));
return
SWITCH_STATUS_SUCCESS
;
do_config
(
SWITCH_TRUE
);
...
...
src/switch_core_media.c
浏览文件 @
cb076e6b
...
...
@@ -97,7 +97,7 @@ typedef struct ice_s {
char
*
foundation
;
int
component_id
;
char
*
transport
;
in
t
priority
;
uint32_
t
priority
;
char
*
con_addr
;
switch_port_t
con_port
;
char
*
cand_type
;
...
...
@@ -774,7 +774,6 @@ SWITCH_DECLARE(int) switch_core_session_check_incoming_crypto(switch_core_sessio
switch_rtp_add_crypto_key
(
engine
->
rtp_session
,
SWITCH_RTP_CRYPTO_SEND
,
atoi
(
crypto
),
engine
->
ssec
.
crypto_type
,
engine
->
ssec
.
local_raw_key
,
SWITCH_RTP_KEY_LEN
);
}
else
if
(
switch_stristr
(
SWITCH_RTP_CRYPTO_KEY_80
,
crypto
))
{
switch_channel_set_variable
(
session
->
channel
,
varname
,
SWITCH_RTP_CRYPTO_KEY_80
);
switch_core_media_build_crypto
(
session
->
media_handle
,
&
engine
->
ssec
,
crypto_tag
,
AES_CM_128_HMAC_SHA1_80
,
SWITCH_RTP_CRYPTO_SEND
);
switch_rtp_add_crypto_key
(
engine
->
rtp_session
,
SWITCH_RTP_CRYPTO_SEND
,
atoi
(
crypto
),
engine
->
ssec
.
crypto_type
,
...
...
@@ -3196,13 +3195,17 @@ static void gen_ice(switch_core_session_t *session, switch_media_type_t type, co
}
if
(
!
engine
->
ice_out
.
foundation
)
{
tmp
[
10
]
=
'\0'
;
switch_stun_random_string
(
tmp
,
10
,
"0123456789"
);
engine
->
ice_out
.
foundation
=
switch_core_session_strdup
(
session
,
tmp
);
}
engine
->
ice_out
.
component_id
=
1
;
engine
->
ice_out
.
transport
=
"udp"
;
engine
->
ice_out
.
priority
=
100
;
if
(
!
engine
->
ice_out
.
component_id
)
{
engine
->
ice_out
.
component_id
=
1
;
engine
->
ice_out
.
priority
=
(
2
^
24
)
*
126
+
(
2
^
8
)
*
65535
+
(
2
^
0
)
*
(
256
-
engine
->
ice_out
.
component_id
);
}
if
(
ip
)
{
engine
->
ice_out
.
con_addr
=
switch_core_session_strdup
(
session
,
ip
);
...
...
@@ -3462,6 +3465,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
if
((
ssrc
=
switch_channel_get_variable
(
session
->
channel
,
"rtp_use_ssrc"
)))
{
uint32_t
ssrc_ul
=
(
uint32_t
)
strtoul
(
ssrc
,
NULL
,
10
);
switch_rtp_set_ssrc
(
a_engine
->
rtp_session
,
ssrc_ul
);
a_engine
->
ssrc
=
ssrc_ul
;
}
...
...
@@ -3691,8 +3695,33 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
switch_rtp_activate_ice
(
a_engine
->
rtp_session
,
a_engine
->
ice_in
.
ufrag
,
a_engine
->
ice_out
.
ufrag
,
a_engine
->
ice_out
.
pwd
);
}
a_engine
->
ice_in
.
pwd
,
#ifdef GOOGLE_ICE
ICE_GOOGLE_JINGLE
,
0
#else
ICE_VANILLA
|
ICE_CONTROLLED
,
a_engine
->
ice_out
.
priority
#endif
);
switch_rtp_activate_rtcp_ice
(
a_engine
->
rtp_session
,
a_engine
->
ice_in
.
ufrag
,
a_engine
->
ice_out
.
ufrag
,
a_engine
->
ice_in
.
pwd
,
#ifdef GOOGLE_ICE
ICE_GOOGLE_JINGLE
,
0
#else
ICE_VANILLA
|
ICE_CONTROLLED
,
a_engine
->
ice_out
.
priority
-
1
#endif
);
}
...
...
@@ -3854,6 +3883,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_activate_rtp(switch_core_sessi
if
((
ssrc
=
switch_channel_get_variable
(
session
->
channel
,
"rtp_use_video_ssrc"
)))
{
uint32_t
ssrc_ul
=
(
uint32_t
)
strtoul
(
ssrc
,
NULL
,
10
);
switch_rtp_set_ssrc
(
v_engine
->
rtp_session
,
ssrc_ul
);
v_engine
->
ssrc
=
ssrc_ul
;
}
...
...
@@ -4383,27 +4413,56 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"
\n
"
);
if
(
switch_channel_test_flag
(
session
->
channel
,
CF_WEBRTC
)
)
{
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"c=IN %s %s
\n
"
,
family
,
ip
);
}
// if (smh->mparams->rtcp_audio_interval_msec
) {
// switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=rtcp:%d IN %s %s\n", port + 1
, family, ip);
//
}
//switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=ssrc:%u\n", a_engine->ssrc);
if
(
smh
->
mparams
->
rtcp_audio_interval_msec
)
{
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=rtcp:%d IN %s %s
\n
"
,
port
+
1
,
family
,
ip
);
}
if
(
a_engine
->
ice_out
.
ready
)
{
char
tmp1
[
11
]
=
""
;
char
tmp2
[
11
]
=
""
;
uint32_t
c1
=
(
2
^
24
)
*
126
+
(
2
^
8
)
*
65535
+
(
2
^
0
)
*
(
256
-
1
);
uint32_t
c2
=
(
2
^
24
)
*
126
+
(
2
^
8
)
*
65535
+
(
2
^
0
)
*
(
256
-
2
);
uint32_t
c3
=
(
2
^
24
)
*
126
+
(
2
^
8
)
*
65534
+
(
2
^
0
)
*
(
256
-
1
);
uint32_t
c4
=
(
2
^
24
)
*
126
+
(
2
^
8
)
*
65534
+
(
2
^
0
)
*
(
256
-
2
);
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=ssrc:%u cname:abc1234
\n
"
,
a_engine
->
ssrc
);
tmp1
[
10
]
=
'\0'
;
tmp2
[
10
]
=
'\0'
;
switch_stun_random_string
(
tmp1
,
10
,
"0123456789"
);
switch_stun_random_string
(
tmp2
,
10
,
"0123456789"
);
if
(
a_engine
->
ice_out
.
ready
)
{
ice_out
=
&
a_engine
->
ice_out
;
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=candidate:%s %d %s %d %s %d typ host generation 0
\n
"
,
ice_out
->
foundation
,
ice_out
->
component_id
,
ice_out
->
transport
,
ice_out
->
priority
,
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=candidate:%s 1 %s %u %s %d typ host generation 0
\n
"
,
tmp1
,
ice_out
->
transport
,
c1
,
ice_out
->
con_addr
,
ice_out
->
con_port
);
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=candidate:%s 1 %s %u %s %d typ srflx generation 0
\n
"
,
tmp2
,
ice_out
->
transport
,
c3
,
ice_out
->
con_addr
,
ice_out
->
con_port
);
#if 1
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=candidate:%s 2 %s %u %s %d typ host generation 0
\n
"
,
tmp1
,
ice_out
->
transport
,
c2
,
ice_out
->
con_addr
,
ice_out
->
con_port
+
1
);
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=candidate:%s 2 %s %u %s %d typ srflx generation 0
\n
"
,
tmp2
,
ice_out
->
transport
,
c4
,
ice_out
->
con_addr
,
ice_out
->
con_port
+
1
);
#endif
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=ice-ufrag:%s
\n
"
,
ice_out
->
ufrag
);
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=ice-pwd:%s
\n
"
,
ice_out
->
pwd
);
//switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=ice-options:google-ice\n");
#ifdef GOOGLE_ICE
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=ice-options:google-ice
\n
"
);
#endif
}
...
...
@@ -4581,9 +4640,9 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"
\n
"
);
if
(
smh
->
mparams
->
rtcp_audio_interval_msec
)
{
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=rtcp:%d IN %s %s
\n
"
,
v_port
+
1
,
family
,
ip
);
}
//
if (smh->mparams->rtcp_audio_interval_msec) {
//
switch_snprintf(buf + strlen(buf), SDPBUFLEN - strlen(buf), "a=rtcp:%d IN %s %s\n", v_port + 1, family, ip);
//
}
if
(
v_engine
->
codec_params
.
rm_encoding
)
{
const
char
*
of
;
...
...
@@ -4591,14 +4650,16 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
if
(
v_engine
->
ice_out
.
ready
)
{
ice_out
=
&
v_engine
->
ice_out
;
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=candidate:%s %d %s %
d
%s %d typ host generation 0
\n
"
,
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=candidate:%s %d %s %
u
%s %d typ host generation 0
\n
"
,
ice_out
->
foundation
,
ice_out
->
component_id
,
ice_out
->
transport
,
ice_out
->
priority
,
ice_out
->
con_addr
,
ice_out
->
con_port
);
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=ice-ufrag:%s
\n
"
,
ice_out
->
ufrag
);
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=ice-pwd:%s
\n
"
,
ice_out
->
pwd
);
#ifdef GOOGLE_ICE
switch_snprintf
(
buf
+
strlen
(
buf
),
SDPBUFLEN
-
strlen
(
buf
),
"a=ice-options:google-ice
\n
"
);
#endif
}
...
...
src/switch_rtp.c
浏览文件 @
cb076e6b
差异被折叠。
点击展开。
src/switch_stun.c
浏览文件 @
cb076e6b
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论