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 */

Reply via email to