I have manually configured a new extension and user, which can make outbound calls but when trying to call it, receive an error ‘service unavailable’. DND is not enabled and I can’t find any different settings when comparing to a working extension/user.
I can see the inbound call in the phones logs, any ideas?
This log is from the phone, not from Asterisk. It is also incomplete, and shows no evidence of failure, as far as it goes.
The only slightly off thing is that Asterisk has retransmitted its request, which indicates either a sluggish response, or that it never saw the response. However it is about 31 seconds from giving up because of that, and that wouldn’t stop the phone sending more than 100 Trying, so, as I said, the log is incomplete.
Note that Asterisk 16 is in its security fixes only year.
Generally people prefer the logs from Asterisk, as they are familiar with them. To get equivalent detail, you will need to issue the CLI command “pjsip set logger on”, or for the legacy driver, “sip set debug on”.
Thanks for the help, here is what I think are all the logs for a replication of the error from the ‘full’ asterix log I was tailing when making the call:
239. [2023-02-16 13:40:05] VERBOSE[2534][C-00000454] chan_sip.c: Got SIP response 302 "Moved Temporarily" back from 192.168.9.139:5060
240. [2023-02-16 13:40:05] VERBOSE[10443][C-00000454] app_dial.c: Now forwarding SIP/110-00000c69 to 'Local/[email protected]' (thanks to SIP/139-00000c6a)
The phone, itself, has tried to forward the call to a URI with user part “Internal”. The user part is generally interpreted as the dialled numbers, and FreePBX expects a valid number. Internal isn’t a valid number, so the call failed. The same would have happened if it was a number but not one known to FreePBX.
The real problem is probably that the phone is forwarded to something, and the fact that it is forwarded to something invalid is an extra detail.
Although not relevant to the problem, you should be replacing chan_sip with chan_pjsip. chan_sip is no longer in the master branch of the Asterisk source code, so will not be in the version of Asterisk released later this year.