I am running Asterisk 13.35.0. I have configured a SIP account as a Trunk, because I want to use it’s DID number.
The settings from the provider look like this:
Outbound Proxy: sip.domain.com
Fromuser: I don’t know if its correct, but I put some-username
Fromdomain: I don’t know if its correct, but I put domain.com
The register string looks like this:
Config looks like this
[trunk-name] user=some-username username=some-username secret=some-password@ disallow=all allow=g729,gsm,opus,alaw,ulaw directmedia=no context=billing dtmfmode=RFC2833 insecure=port,invite nat=force_rport,comedia qualify=yes type=peer host=domain.com fromdomain=domain.com fromuser=some-username sendrpid=no outboundproxy = sip.domain.com [trunk-name1](trunk-name); host=the-ip-of-domain.com (calls appear to come from it, the IPs of proxy and domain are different)
sip show registry says this:
sip.domain.com:5060 N some-usernam 105 Registered Sun, 20 Mar 2022 16:05:11
However, when I try to call the DID number, I get an error:
[2022-03-20 16:06:38] NOTICE[C-00002e47] chan_sip.c: Failed to authenticate device <sip:MY-CALLER-PHONE-NUMBER@domain.com>;tag=6524E8C1-623742FE000016EC-0A009700 for INVITE, code = -1
sngrep reports a 401 unauthorized and a 403 forbidden error code for the invite string.
I didn’t test outbound calls yet. Any ideas what to do?
My regular trunks work perfectly fine. The difference with them is the presence of proxy.
P.S. I know Asterisk 13 is EOL and using chan_sip seems frowned upon here, but I can’t really upgrade at the moment/change the software stack, as it would require a significant investment and too much time. If you can’t/don’t want to help me due to this fact that’s completely fine, I still appreciate your time reading.