How to connect from an external sip phone

I am using asterisk 18, Ubuntu.

I am trying to connect a softphone to asterisk.
I can connect on the internal network, but after installing the softphone on my phone,
I can’t connect when I try to connect from outside through the router.

asterisk server ip: 192.1668.10.10
router ip: 200.200.20.20
pjsip.conf
[9010]
type = aor
remove_existing=yes
max_contacts = 1
contact=sip:200.200.20.20:5060

[9010]
type = auth
username = 9010
password = 1234
[9010]
type =
endpoint
context = default
dtmf_mode = rfc4733
disallow = all
allow = g722
allow = ulaw
direct_media =no
auth = 9010
outbound_auth = 9010
aors = 9010

On the router, I opened the 5060 udp port and the 10000~20000 udp port.

And when I set the domain 200.200.20.20 on the sip phone,
I can’t connect.

Is there anything else I need to set up to connect from the outside?

From an Asterisk perspective, no. If the traffic isn’t even showing up at the Asterisk box then it’s something outside of Asterisk causing it. For example, some mobile providers may restrict/not allow VoIP.

Why do you have both of these, and, in particular, what is the second one trying to achieve? Any address here should be the address of the phone. If you are using SIP ALG on the router, which is inadvisable, it should be the private address of the router, although in most cases it will need to set as an outbound proxy, not a contact.

Also you seem to be describing a NAT situation, but you appear to using a default transport, which will not include information on your public address.