(closes issue #13633)
Reported by: performer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@162619
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
/* Set transport and port so the correct contact is built */
p->socket.type = r->transport;
- p->socket.port = htons(r->portno);
+ if (r->transport == SIP_TRANSPORT_TLS || r->transport == SIP_TRANSPORT_TCP) {
+ p->socket.port = sip_tcp_desc.local_address.sin_port;
+ }
/*
check which address we should use in our contact header