diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-27 23:29:55 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-27 23:29:55 +0000 |
commit | 73331b9ea39b25cd4c57e71321a662cdc47a0cf6 (patch) | |
tree | 01a34caa82dd1bbaad87f379f2447f29e2edfa41 /channels/chan_sip.c | |
parent | 736cce740396bb7df4de4ed6fdb1ddd52d92b366 (diff) |
Issue #6597 - sip show registry shows incorrect port
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@15376 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2a62f6af2..a1c6b6136 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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 */ |