mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Merge "res_pjsip_sdp_rtp: Fix setting of address type for rtp_ipv6"
This commit is contained in:
@@ -1335,6 +1335,7 @@ static int create_outgoing_sdp_stream(struct ast_sip_session *session, struct as
|
||||
RAII_VAR(struct ast_format_cap *, caps, NULL, ao2_cleanup);
|
||||
enum ast_media_type media_type = session_media->type;
|
||||
struct ast_sip_session_media *session_media_transport;
|
||||
pj_sockaddr ip;
|
||||
|
||||
int direct_media_enabled = !ast_sockaddr_isnull(&session_media->direct_media_addr) &&
|
||||
ast_format_cap_count(session->direct_media_cap);
|
||||
@@ -1447,14 +1448,10 @@ static int create_outgoing_sdp_stream(struct ast_sip_session *session, struct as
|
||||
media->conn->addr_type = STR_IP4;
|
||||
pj_strdup2(pool, &media->conn->addr, hostip);
|
||||
|
||||
if (!ast_strlen_zero(session->endpoint->media.address)) {
|
||||
pj_sockaddr ip;
|
||||
|
||||
if ((pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &media->conn->addr, &ip) == PJ_SUCCESS) &&
|
||||
(ip.addr.sa_family == pj_AF_INET6())) {
|
||||
media->conn->addr_type = STR_IP6;
|
||||
}
|
||||
}
|
||||
|
||||
/* Add ICE attributes and candidates */
|
||||
add_ice_to_stream(session, session_media, pool, media, 1);
|
||||
|
Reference in New Issue
Block a user