mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 02:26:23 +00:00
chan_sip: Make direct media reinvites for T38 put Asterisk in the media path
Prior to this patch, Asterisk would incorrectly use the previous endpoint addresses in SDP in spite of providing its own port. T38 is never meant to be done through directmedia and Asterisk should always be in the media path for these streams. (closes issue ASTERISK-17273) Reported by: Kevin Stewart (closes issue ASTERISK-18706) Reported by: Jeremy Kister Review: https://reviewboard.asterisk.org/r/2853/ ........ Merged revisions 399456 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 399457 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@399458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -13438,13 +13438,9 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int
|
|||||||
/* Our T.38 end is */
|
/* Our T.38 end is */
|
||||||
ast_udptl_get_us(p->udptl, &udptladdr);
|
ast_udptl_get_us(p->udptl, &udptladdr);
|
||||||
|
|
||||||
/* Determine T.38 UDPTL destination */
|
/* We don't use directmedia for T.38, so keep the destination the same as our IP address. */
|
||||||
if (!ast_sockaddr_isnull(&p->udptlredirip)) {
|
ast_sockaddr_copy(&udptldest, &p->ourip);
|
||||||
ast_sockaddr_copy(&udptldest, &p->udptlredirip);
|
ast_sockaddr_set_port(&udptldest, ast_sockaddr_port(&udptladdr));
|
||||||
} else {
|
|
||||||
ast_sockaddr_copy(&udptldest, &p->ourip);
|
|
||||||
ast_sockaddr_set_port(&udptldest, ast_sockaddr_port(&udptladdr));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug) {
|
if (debug) {
|
||||||
ast_debug(1, "T.38 UDPTL is at %s port %d\n", ast_sockaddr_stringify_addr(&p->ourip), ast_sockaddr_port(&udptladdr));
|
ast_debug(1, "T.38 UDPTL is at %s port %d\n", ast_sockaddr_stringify_addr(&p->ourip), ast_sockaddr_port(&udptladdr));
|
||||||
@@ -13455,9 +13451,9 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int
|
|||||||
|
|
||||||
ast_str_append(&m_modem, 0, "m=image %d udptl t38\r\n", ast_sockaddr_port(&udptldest));
|
ast_str_append(&m_modem, 0, "m=image %d udptl t38\r\n", ast_sockaddr_port(&udptldest));
|
||||||
|
|
||||||
if (!ast_sockaddr_cmp(&udptldest, &dest)) {
|
if (ast_sockaddr_cmp(&udptldest, &dest)) {
|
||||||
ast_str_append(&m_modem, 0, "c=IN %s %s\r\n",
|
ast_str_append(&m_modem, 0, "c=IN %s %s\r\n",
|
||||||
(ast_sockaddr_is_ipv6(&dest) && !ast_sockaddr_is_ipv4_mapped(&dest)) ?
|
(ast_sockaddr_is_ipv6(&udptldest) && !ast_sockaddr_is_ipv4_mapped(&udptldest)) ?
|
||||||
"IP6" : "IP4", ast_sockaddr_stringify_addr_remote(&udptldest));
|
"IP6" : "IP4", ast_sockaddr_stringify_addr_remote(&udptldest));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user