chan_sip: Don't use port derived from fromdomain if it isn't set

If a user does not provide a port in the fromdomain setting, chan_sip will set
the fromdomainport to STANDARD_SIP_PORT (5060). The fromdomainport value will
then get used unilaterally in certain places. This causes issues with TLS,
where the default port is expected to be 5061.

This patch modifies chan_sip such that fromdomainport is only used if it is
not the standard SIP port; otherwise, the port from the SIP pvt's recorded
self IP address is used.

Review: https://reviewboard.asterisk.org/r/3893/

ASTERISK-24178 #close
Reported by: Elazar Broad
patches:
  fromdomainport_fix.diff uploaded by Elazar Broad (License 5835)
........

Merged revisions 421717 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/11@421718 f38db490-d61c-443f-a65b-d21fe96a405b