diff options
author | Olle Johansson <oej@edvina.net> | 2006-03-27 23:32:34 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-03-27 23:32:34 +0000 |
commit | 0b39c351617f5c00dee87a6b21325aa0578b594c (patch) | |
tree | 4a55cc89311914a5e27f5c988a1f387211642417 /channels/chan_sip.c | |
parent | 450bc8dad6d8311808634b2d06f5727af84bafb7 (diff) |
Issue #6597 - Show correct port in "sip show registry" - import from 1.2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bf236f853..5ad3affed 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5582,7 +5582,9 @@ static int transmit_register(struct sip_registry *r, int sipmethod, char *auth, ast_string_field_set(r, callid, p->callid); if (r->portno) p->sa.sin_port = htons(r->portno); - ast_set_flag(&p->flags[0], SIP_OUTGOING); /* Registration is outgoing call */ + 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 */ if (!ast_strlen_zero(r->secret)) /* Secret (password) */ |