]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Set port number in received as information for registrations as well.
authorJoshua Colp <jcolp@digium.com>
Fri, 19 Oct 2007 15:08:12 +0000 (15:08 +0000)
committerJoshua Colp <jcolp@digium.com>
Fri, 19 Oct 2007 15:08:12 +0000 (15:08 +0000)
(closes issue #11028)
Reported by: brad-x

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86469 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 5c32d86df09a43a26ff00f2fa4838d22be1dfe1c..e823f6aefc7427a8134a4fe28180d259bfc084b6 100644 (file)
@@ -7406,9 +7406,10 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char *
                }
                /* Copy back Call-ID in case create_addr changed it */
                ast_string_field_set(r, callid, p->callid);
-               if (r->portno)
+               if (r->portno) {
                        p->sa.sin_port = htons(r->portno);
-               else    /* Set registry port to the port set from the peer definition/srv or default */
+                       p->recv.sin_port = htons(r->portno);
+               } else  /* Set registry port to the port set from the peer definition/srv or default */
                        r->portno = ntohs(p->sa.sin_port);
                ast_set_flag(&p->flags[0], SIP_OUTGOING);       /* Registration is outgoing call */
                r->call=p;                      /* Save pointer to SIP packet */