How to specify the port when sending outbound SIP request?

I am using a SIP account provided by an Internet telephony service provider (ITSP) to make outbound calls. However, I made it using a softphone (Zoiper) but failed through my WebRTC+Asterisk. I found the major difference is that Asterisk sent the SIP request to the address without port (while the Zoiper sent it to the whole address with the port).
The configuration in pjsip.conf is:

[sip_provider]
type = endpoint
context = outbound
disallow = all
allow = ulaw,alaw
aors = sip_provider_aor
outbound_auth=sip_provider_auth
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
rtcp_mux=yes
ice_support=yes
direct_media=no
transport=transport-udp

[sip_provider_auth]
type = auth
auth_type = userpass
username = 12345678
password = 12345678

[sip_provider_aor]
type = aor
contact = sip:12345678@36.123.456.789:3714

[sip_provider_registration]
type = registration
outbound_auth = sip_provider_auth
server_uri = sip:36.123.456.789:3714
client_uri = sip:12345678@36.123.456.789:3714
retry_interval = 60
transport=transport-udp

[sip_provider_identify]
type=identify
endpoint=sip_provider
match=36.123.456.789:3714

The captured SIP packet with a successful response using Zoiper is:

INVITE sip:98765432@36.123.456.789:3714;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 172.168.0.1:53036;branch=z9hG4bK-524287-1---f1b58f0e7aa398e9;rport
Max-Forwards: 70
Contact: <sip:12345678@36.5.432.10:16822;transport=UDP>
To: <sip:98765432@36.123.456.789:3714>
From: <sip:12345678@36.123.456.789:3714;transport=UDP>;tag=bcb8fb39
Call-ID: av-wsVxFglr1PCaJJOm7JQ..
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Content-Type: application/sdp
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.6.6 v2.10.20.5
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 340

v=0
o=Z 0 1004409838 IN IP4 172.168.0.1
s=Z
c=IN IP4 172.168.0.1
t=0 0
m=audio 60284 RTP/AVP 106 9 98 101 0 8 3
a=rtpmap:106 opus/48000/2
a=fmtp:106 sprop-maxcapturerate=16000; minptime=20; useinbandfec=1
a=rtpmap:98 telephone-event/48000
a=fmtp:98 0-16
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=sendrecv
a=rtcp-mux

SIP/2.0 100 Trying
Via: SIP/2.0/UDP 172.168.0.1:53036;branch=z9hG4bK-524287-1---f1b58f0e7aa398e9;received=36.5.432.10;rport=16822
To: <sip:98765432@36.123.456.789:3714>
From: <sip:12345678@36.123.456.789:3714;transport=UDP>;tag=bcb8fb39
Call-ID: av-wsVxFglr1PCaJJOm7JQ..
CSeq: 1 INVITE
Server: FreeSWITCH-mod_sofia/1.8.2-release~64bit
Content-Length: 0

The SIP request sent from my Asterisk is:

INVITE sip:98765432@36.123.456.789:3714 SIP/2.0
Via: SIP/2.0/UDP 36.5.432.10:50060;rport;branch=z9hG4bKPj479b63d2-149c-4398-b158-50ba608586a1
From: <sip:webrtc_client@172.168.0.1>;tag=85dcf035-2fab-41db-9d9b-3190b56b9239
To: <sip:98765432@36.123.456.789>
Contact: <sip:asterisk@36.5.432.10:50060>
Call-ID: d647fa70-01cb-4c03-a22c-ded668c96847
CSeq: 28317 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 22.1.1
Content-Type: application/sdp
Content-Length: 526

v=0
o=- 2122688244 2122688244 IN IP4 36.5.432.10
s=Asterisk
c=IN IP4 36.5.432.10
t=0 0
m=audio 56788 RTP/AVP 0 8 101
a=ice-ufrag:5958a7df69e97492362f59095aa6bd9c
a=ice-pwd:7f8547562f07d6b64dcbb6cd23c8fb1d
a=candidate:Hac100935 1 UDP 2130706431 172.168.0.1 56788 typ host
a=candidate:S24079f4e 1 UDP 1694498815 36.5.432.10 24598 typ srflx raddr 172.168.0.1 rport 5678
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv
a=rtcp-mux

It sends multiple requests but received nothing from the remote server. Could anyone tell me how to add the port in the destination address, namely:
From To: <sip:98765432@36.123.456.789>
to
To: <sip:98765432@36.123.456.789:3714>

It has been sent to the correct port, although you failed to include the line from the Asteirsk (or other) logging that includes the IP layer 3 destination address, which is the definitive information on this.

I’m not sure, but I think the phone may be in error in including the port in the To line.

Thanks for the suggestion. I solved the problem by adding
from_user=98765432
in the endpoint section.