Skip to main content

Asterisk Errors

This FAQ page collects operational notes for Asterisk Errors.

What is this error? <nowiki>WARNING[23261]: res_musiconhold.c:719 monmp3thread: poll() failed: Interrupted system call</nowiki>

Nothing to worry, when the Musing On Hold process terminates to play the media file, this error is thrown out, just ignore it

What is this error? <nowiki>WARNING[3221]: func_cdr.c:352 cdr_write_callback: CDR requires a value (CDR(variable)=value)</nowiki>

Nothing to worry, it is a small glitch in the dialplan, but avoiding it will require an extra check, slowing down the call processing, so it is avoided, preferring the warning. Just ignore it.

What is this error? <nowiki>ERROR[24984][C-00008457]: res_fax.c:4364 acf_faxopt_read: channel 'SIP/201-#######-0001547a' can't read FAXOPT(gateway) because it has never been written.</nowiki>

Nothing to worry, it is a small glitch in the dialplan, but avoiding it will require an extra check, slowing down the call processing, so it is avoided, preferring the error. Just ignore it.

What is this error? <nowiki>WARNING[3221]: func_cdr.c:364 cdr_write_callback: Using the CDR function to set 'accountcode' is deprecated. Please use the CHANNEL function instead.</nowiki>

I am using an old syntax to preserve compatibility with older asterisk versions. Just ignore it.

What is this error? <nowiki>WARNING[25144][C-0000845c]: dsp.c:1489 ast_dsp_process: Inband DTMF is not supported on codec #####. Use RFC2833</nowiki>

This is important, you are using an incompatible DTMF format for the codec you selected. Inband DTMF is supported in only a limited number of codec. Use RFC2833 as suggested.

What is this error? <nowiki>NOTICE[9505] manager.c: 217.28.216.250 tried to authenticate with nonexistent user 'admin'</nowiki>

What is this error? <nowiki>NOTICE[9505] manager.c: 217.28.216.250 failed to authenticate as 'admin'</nowiki>

Someone really stupid is trying to connect using the manager interface (port 5038). The manager interface is often locked down by IP address so it is really unlikely to be hacked this way, however this can be just annoying. To stop it after a few attempts, you can tweak the fail2ban to capture also these attempts by adding the following row in /etc/fail2ban/filters.d/asterisk.conf: '''<nowiki>^(%(__prefix_line)s|\[\]\s*)%(log_prefix)s <HOST> failed to authenticate as '[^']*'$</nowiki>''' and reload fail2ban

What is this error? <nowiki>WARNING[26421][C-0000b22f]: chan_sip.c:7350 sip_write: Can't send 10 type frames with SIP write</nowiki>

Asterisk doesn't yet support comfort noise generation. Just ignore it.

What is this error? <nowiki>NOTICE[6534] chan_sip.c: Received SIP subscribe for peer without mailbox: 226-SINI</nowiki>

The extension 226-SINI has sent a "SUBSCRIBE" message to asterisk, but the extension has no voicemail mailbox associated. This can be due to a configuration problem, you forget to associate the MWI mailbox in Configuration/Extension, or an asterisk problem... some time asterisk loads the extension without the mailbox associated. In this case you can restart the phone and deregister the extension, in this way when the phone registers again and subscribe to the voicemail mailbox, it should be loaded correctly. Otherwise you can move that extension to "No (Use externnotify)" in "Send MWI only if subscribed:" and set externnotify=/var/lib/asterisk/agi-bin/the related application page in /etc/asterisk/voicemail.conf

What is this error? <nowiki>WARNING[53344][C-000015c8] app_voicemail.c: SQL Get Data error! coltitle=category</nowiki>

This is a long standing asterisk bug fixed only in later releases... it is harmless and can be ignored

Asterisk is logging INVITE attempts from the Internet, but Fail2ban is not blocking it, like "chan_sip.c: Failed to authenticate device "12345"<sip:12345@demo.mirtapbx.com>;tag=4b18a608" How is it possible to block them?

You need to path the logger.conf file and restart asterisk when possible

messages => security,notice,warning,error

The manager interface is not reporting all the data

It is possible the system is slow so you need to give to the manager connection more time. Try to add

writetimeout=1000

in manager.conf and reload

I see this error - pbx_functions.c ... ast_func_read ... Dangerous function STAT read blocked

By default, newer versions of Asterisk block "dangerous" functions like STAT to prevent unauthorized access or exploitation. Edit /etc/asterisk/asterisk.conf and set the value

live_dangerously = yes

A call is being reported as FAILED or CONGESTION, how can I get more details about it

You can get additional details pressing on the FAILED or CONGESTION link and check the pcap of the call. If instead you think the problem can be on the asterisk side, you can check the logs of the call. Asterisk under normal configuration reports a very well detailed logs of each activity, so you need to proceed in isolating your call first. You can do starting searching with the date and time of your call. Mind the call started at 2022-08-12 16:09:09, as reported in the Status/Call History. You need to locate this entry in the asterisk logs.

The asterisk logs are located in full files in /var/log/asterisk. These files are rotated daily, so only the latest 10 are available. You need to locate the one containing your date and grep for it, like:

# ls -la /var/log/asterisk/full*

-rw-r--r-- 1 root root 2,1M 13 ago 11:37 /var/log/asterisk/full

-rw-r--r-- 1 root root 4,6M 10 ago 00:02 /var/log/asterisk/full.0

-rw-r--r-- 1 root root 4,2M 11 ago 00:02 /var/log/asterisk/full.1

-rw-r--r-- 1 root root 4,3M 9 ago 00:02 /var/log/asterisk/full.10

-rw-r--r-- 1 root root 3,9M 12 ago 00:02 /var/log/asterisk/full.2

-rw-r--r-- 1 root root 4,5M 13 ago 00:02 /var/log/asterisk/full.3

-rw-r--r-- 1 root root 3,3M 3 ago 00:02 /var/log/asterisk/full.4

-rw-r--r-- 1 root root 3,9M 4 ago 00:02 /var/log/asterisk/full.5

-rw-r--r-- 1 root root 7,5M 5 ago 00:02 /var/log/asterisk/full.6

-rw-r--r-- 1 root root 4,3M 6 ago 00:02 /var/log/asterisk/full.7

-rw-r--r-- 1 root root 3,4M 7 ago 00:02 /var/log/asterisk/full.8

-rw-r--r-- 1 root root 4,1M 8 ago 00:02 /var/log/asterisk/full.9

As you can see, the 2022-08-12 will be in the /var/log/asterisk/full.3 file.

# grep "2022-08-12 16:09:09" /var/log/asterisk/full.3

[2022-08-12 16:09:09] VERBOSE[24114] pbx_variables.c: Setting global variable 'SIPDOMAIN' to 'devel.mirtapbx.com'

[2022-08-12 16:09:09] VERBOSE[24114] netsock2.c: Using SIP RTP Audio TOS bits 184

[2022-08-12 16:09:09] VERBOSE[24114] netsock2.c: Using SIP RTP Audio TOS bits 184 in TCLASS field.

[2022-08-12 16:09:09] WARNING[17516][C-00020673] func_channel.c: Unknown or unavailable item requested: 'peername'

[2022-08-12 16:09:09] WARNING[17516][C-00020673] chan_sip.c: This function can only be used on SIP channels.

[2022-08-12 16:09:09] VERBOSE[17516][C-00020673] pbx.c: Executing [800@authenticated:1] NoOp("PJSIP/136-DEVEL-00000033", "Received a call from peer 136-DEVEL from with CID 136 htek 924 to number 800 for

accountcode DEVEL with SIP CALL ID requesting for a max duration of SETPEERNAME= ORIGINATEID= BLIND...=") in new stack

Multiple calls can be shown for the same date/time, so you need to identify the correct one and get the Asterisk Call identification, C-00020673 and grep again for this value, getting the whole call details

# grep "C-00020673" /var/log/asterisk/full.3 | more

[2022-08-12 16:09:09] WARNING[17516][C-00020673] func_channel.c: Unknown or unavailable item requested: 'peername'

[2022-08-12 16:09:09] WARNING[17516][C-00020673] chan_sip.c: This function can only be used on SIP channels.

[2022-08-12 16:09:09] VERBOSE[17516][C-00020673] pbx.c: Executing [800@authenticated:1] NoOp("PJSIP/136-DEVEL-00000033", "Received a call from peer 136-DEVEL from with CID 136 htek 924 to number 800 for

accountcode DEVEL with SIP CALL ID requesting for a max duration of SETPEERNAME= ORIGINATEID= BLIND...=") in new stack

[2022-08-12 16:09:09] VERBOSE[17516][C-00020673] pbx.c: Executing [800@authenticated:2] NoOp("PJSIP/136-DEVEL-00000033", "Transfer: - - - - ") in new stack

[2022-08-12 16:09:09] VERBOSE[17516][C-00020673] pbx.c: Executing [800@authenticated:3] NoOp("PJSIP/136-DEVEL-00000033", "FROMQUEUEID: ") in new stack

[2022-08-12 16:09:09] VERBOSE[17516][C-00020673] pbx.c: Executing [800@authenticated:4] GotoIf("PJSIP/136-DEVEL-00000033", "1?5:6") in new stack

[2022-08-12 16:09:09] VERBOSE[17516][C-00020673] pbx_builtins.c: Goto (authenticated,800,5)

...

[2022-08-12 16:09:11] VERBOSE[17516][C-00020673] pbx.c: Executing [800@dialoutbound:1618] Dial("PJSIP/136-DEVEL-00000033",

"PJSIP/800@onlypjsiptest,60,U(destChannelActions^external^wav^^^^^on^)b(pjsip_header,setpjsipheader,1)Tto()") in new stack

'''[2022-08-12 16:09:11] WARNING[17516][C-00020673] app_dial.c: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)

[2022-08-12 16:09:11] VERBOSE[17516][C-00020673] app_dial.c: No devices or endpoints to dial (technology/resource)'''

[2022-08-12 16:09:11] VERBOSE[17516][C-00020673] pbx.c: Executing [800@dialoutbound:1619] Goto("PJSIP/136-DEVEL-00000033", "1739") in new stack

[2022-08-12 16:09:11] VERBOSE[17516][C-00020673] pbx_builtins.c: Goto (dialoutbound,800,1739)