]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue #6597 - sip show registry shows incorrect port
authorOlle Johansson <oej@edvina.net>
Mon, 27 Mar 2006 23:29:55 +0000 (23:29 +0000)
committerOlle Johansson <oej@edvina.net>
Mon, 27 Mar 2006 23:29:55 +0000 (23:29 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@15376 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 2a62f6af2aaa2d22e5b162011d87a453c317be13..a1c6b6136b7265114576c2aac087ac84f7c406f1 100644 (file)
@@ -5374,6 +5374,8 @@ static int transmit_register(struct sip_registry *r, int sipmethod, char *auth,
                ast_copy_string(r->callid, p->callid, sizeof(r->callid));
                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 */
+                       r->portno = p->sa.sin_port;
                ast_set_flag(p, SIP_OUTGOING);  /* Registration is outgoing call */
                r->call=p;                      /* Save pointer to SIP packet */
                p->registry=ASTOBJ_REF(r);      /* Add pointer to registry in packet */