Logs concerning failed IAX2 registration attempt missing on Asterisk server

Solution 1:

There are multiple logs in /var/log/asterisk, check them all

Debugging from the console

You can also start asterisk from the console and enable debugging for iax2

# asterisk -r
asterisk*CLI> iax2 set debug on
asterisk*CLI>

Then try connecting again from your client. You should see more info on the console.

For more info in iax2 debugging

asterisk*CLI> core show help iax2 set debug
iax2 set debug {on|off|peer}   -- Enable/Disable IAX debugging
iax2 set debug jb {on|off}     -- Enable/Disable IAX jitterbuffer debugging
iax2 set debug trunk {on|off}  -- Enable/Disable IAX trunk debugging

And this

asterisk*CLI> core show help logger
logger add channel             -- Adds a new logging channel
logger mute                    -- Toggle logging output to a console
logger reload                  -- Reopens the log files
logger remove channel          -- Removes a logging channel
logger rotate                  -- Rotates and reopens the log files
logger set level {DEBUG|NOTICE|WARNING|ERROR|VERBOSE|DTMF} {on|off} -- Enables/Disables a specific logging level for this console
logger show channels           -- List configured log channels

Solution 2:

Had the same question today but got it to work after setting

authdebug = yes

in iax.conf

Then the result in /var/log/asterisk/messages is

[2017-01-17 09:37:09] NOTICE[1204] chan_iax2.c: No registration for peer '123' (from 123.45.67.89)

when trying to login with wrong credentials which can be filtered by fail2ban then, for example.