I am facing an issue where using TCP with an endpoint causes to have random port in the Contact header when it send out an invite to the endpoint. It should be what is it listening on (5060):
It should be:
Is there a workaround this issue?
You need to mark your SIP samples as being preformatted text, otherwise angle bracketed items get treated as markup.
Here is what I am getting in the contact header on an outbound Invite:
And What I actually Want:
The port 46918 is a randomly chosen port.
This is an issue that was found at SIPit this week. A change to fix it is currently up for review.
 https://issues.asterisk.org/jira/browse/ASTERISK-26374 https://gerrit.asterisk.org/#/c/3900/