diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-29 15:32:02 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-08-29 15:32:02 +0000 |
commit | acf010d4bc52650753ef3462d855f1130aec9d22 (patch) | |
tree | 1f6c5423708315ea581e37f99a6280b040ad09ba /channels | |
parent | 80ece487c28cb5a7c590497285f62a0267ba8c3f (diff) |
Merged revisions 140417 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r140417 | mmichelson | 2008-08-29 10:26:52 -0500 (Fri, 29 Aug 2008) | 10 lines
Fix SIP's parsing so that if a port is specified
in a string to Dial(), it is not ignored.
(closes issue #13355)
Reported by: acunningham
Patches:
13355v2.patch uploaded by putnopvut (license 60)
Tested by: acunningham
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140418 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 681f97059..804599c76 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4325,6 +4325,11 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer, struct sockadd if (newdialog) dialog->socket.type = 0; res = create_addr_from_peer(dialog, peer); + if (!ast_strlen_zero(port)) { + if ((portno = atoi(port))) { + dialog->sa.sin_port = dialog->recv.sin_port = htons(portno); + } + } unref_peer(peer, "create_addr: unref peer from find_peer hashtab lookup"); return res; } |