I stood up a couple test FreePBX servers years ago, and thought I’d give it a shot again. I installed FreePBX, setup a couple of extensions, and tested calling from one phone to another internally, which works great. When I setup my trunk and outbound route today, I’m unable to dial an external number. On linphone it says “User not found”. In the Asterisk logs it says:
[2020-01-28 22:10:02] ERROR[8663] res_pjsip.c: Unable to create outbound OPTIONS request to endpoint Trunk as URI 'sip:<hiddenname>@<hiddendomain>.com@[<hiddenprefix>]<hiddennumber>@sbc.anveo.com:5060' is not valid
[2020-01-28 22:10:02] ERROR[8663] res_pjsip/pjsip_options.c: Unable to create request to qualify contact sip:<hiddenname>@<hiddendomain>@[<hiddenprefix>]<hiddennumber>@sbc.anveo.com:5060 on AOR Trunk
[2020-01-28 22:10:16] NOTICE[8663] res_pjsip_session.c: Call from '101' (UDP:<hiddenip>:56403) to extension '+<hiddennumber>' rejected because extension not found in context 'from-internal'.
Are you using AnveoDirect “wholesale” (basically a dumb pipe, but very inexpensive), or Anveo retail (costs more but has sophisticated graphical call flow language)?
AnveoDirect uses IP authentication; there is no username or secret and calls are sent to sbc.anveo.com.
Anveo retail uses various SIP server names, but sbc.anveo.com is not one of them.
I guess it would be wholesale then, it’s like .004 a minute. I disabled auth under the pjsip settings for the trunk and now I’m getting a different error.
[2020-01-29 01:03:02] ERROR[4769] res_pjsip.c: Unable to create outbound OPTIONS request to endpoint Trunk as URI 'sip:[<hiddenprefix>]1904<hidden7digitnumber>@sbc.anveo.com:5060' is not valid
PJSIP settings, Advanced: Make sure that Rewrite Contact is No. For incoming calls, you must set Match (Permit) for all the addresses from which Anveo can send calls. You can leave this blank if you are just testing outgoing calls. Everything else at defaults.
So I removed the prefix and the number from the hostname, and now I’m getting so many of these warning messages that I can’t see anything else in the GUI for the Asterisk logs… thoughts? (in other words, I configured it how you wrote it above)
[2020-01-29 05:26:10] WARNING[26046] res_pjsip_registrar.c: Endpoint 'anonymous' has no configured AORs
I am guessing that these are hackers probing your system (if not properly firewalled), or misconfigured extensions. I doubt that they are related to your trunk.
Please post screenshots of your trunk settings. The only personal information in there should be Outbound CallerID and Outbound Dial Prefix, so mask those. There should be no phone numbers, account numbers, secrets or anything else personal anywhere else in the trunk settings.
@Stewart1 first off thanks for the constant back and forth help. With that said, I realized you told me to put the prefix in the dialing pattern which I hadn’t done. Since I’m not exactly sure the full formatting to add that I just removed the prefix from Anveo direct and tried again. I’m getting the same error from earlier…
[2020-01-29 18:15:56] NOTICE[4769] res_pjsip_session.c: Call from '101' (UDP:<hiddenip>:56403) to extension '+1757<hidden7digitnumber>' rejected because extension not found in context 'from-internal'.