You shouldn’t be using chan_sip on new installations.
username does not do what you think it does, and the name username is deprecated in favour of defaultuser. It is unlikely to be needed.
nat= is not needed here. The default is adequate. Again it probably doesn’t do what you think it does.
Unless there are two devices sharing the same IP address, type should be peer.
As this seems to be a phone, specifying fromuser will break caller ID, but achieve nothing useful. It generally does not make sense in combination with host=dynamic.
Allowing all codecs can cause various problems, and actually broke some versions of Asterisk completely. You should disallow all, then only allow the codecs you want to use.
As I started, you should start over with chan_pjsip, unless you are doing something unusual that falls in the small sub-set of things that are supported by chan _sip, but not chan_pjsip. chan_sip was deprecated from Asterisk 17 and will be completely removed in Asterisk 21.