Bug#920533: asterisk: on upgrade from 13.23.1 to 16.1.1 RTP streams get misdirected to NAT devices
James Bottomley
James.Bottomley at HansenPartnership.com
Sat Jan 26 19:15:49 GMT 2019
Tags: patch
This is the patch I have applied to my system which fixes the problem
locally
James
---
Index: BUILD/channels/chan_sip.c
===================================================================
--- BUILD.orig/channels/chan_sip.c
+++ BUILD/channels/chan_sip.c
@@ -10997,6 +10997,8 @@ static int process_sdp(struct sip_pvt *p
if (req->method == SIP_RESPONSE) {
start_ice(p->rtp, 1);
}
+ if (p->natdetected)
+ ast_sockaddr_copy(sa, &p->recv);
ast_sockaddr_set_port(sa, portno);
ast_rtp_instance_set_remote_address(p->rtp, sa);
if (debug) {
@@ -23891,6 +23893,8 @@ static void handle_response_invite(struc
int rtn;
struct ast_party_connected_line connected;
struct ast_set_party_connected_line update_connected;
+ char domain[MAXHOSTNAMELEN];
+ struct ast_sockaddr addr;
if (reinvite) {
ast_debug(4, "SIP response %d to RE-invite on %s call %s\n", resp, outgoing ? "outgoing" : "incoming", p->callid);
@@ -23945,6 +23949,9 @@ static void handle_response_invite(struc
if (!reinvite) {
set_pvt_allowed_methods(p, req);
}
+ get_domain(sip_get_header(req, "To"), domain, sizeof(domain));
+ ast_sockaddr_resolve_first(&addr, domain, 0);
+ check_for_nat(&addr, p);
switch (resp) {
case 100: /* Trying */
More information about the Pkg-voip-maintainers
mailing list