Lots of missing contexts

I see tons of messages from ast_context_verify_includes where it’s complain about missing contexts. Here are a few examples, but there are many, many more contexts referernced.

[2024-06-17 15:29:34] WARNING[29377]: pbx.c:8797 ast_context_verify_includes: Context ‘ext-local-confirm’ tries to include nonexistent context ‘ext-local-confirm-custom’
[2024-06-17 15:29:34] WARNING[29377]: pbx.c:8797 ast_context_verify_includes: Context ‘macro-dial’ tries to include nonexistent context ‘macro-dial-custom’
[2024-06-17 15:29:34] WARNING[29377]: pbx.c:8797 ast_context_verify_includes: Context ‘app-contactmanager-sd’ tries to include nonexistent context ‘app-contactmanager-sd-custom’
[2024-06-17 15:29:34] WARNING[29377]: pbx.c:8797 ast_context_verify_includes: Context ‘app-blacklist-last’ tries to include nonexistent context ‘app-blacklist-last-custom’

How can I create these contexts and/or remove the need for them?

Thank you

In Advanced Settings, search for “Disable -custom Context Includes” and set this to “yes”.

Thanks for your help. I made the suggested setting and many of the missing context errors went away, but there are still a lot showing up. How can I disable whatever is causing these…

[2024-06-18 04:37:38] WARNING[10736]: pbx.c:8797 ast_context_verify_includes: Context ‘from-internal-xfer’ tries to include nonexistent context ‘from-internal-custom’
[2024-06-18 04:37:38] WARNING[10736]: pbx.c:8797 ast_context_verify_includes: Context ‘from-internal-noxfer’ tries to include nonexistent context ‘from-internal-noxfer-custom’
[2024-06-18 04:37:38] WARNING[10736]: pbx.c:8797 ast_context_verify_includes: Context ‘from-pstn’ tries to include nonexistent context ‘from-pstn-custom’
[2024-06-18 04:37:38] WARNING[10736]: pbx.c:8797 ast_context_verify_includes: Context ‘from-internal-additional’ tries to include nonexistent context ‘ext-queues’
[2024-06-18 04:37:38] WARNING[10736]: pbx.c:8797 ast_context_verify_includes: Context ‘ivr-4’ tries to include nonexistent context ‘from-ivr-directory-Disabled’
[2024-06-18 04:37:38] WARNING[10736]: pbx.c:8797 ast_context_verify_includes: Context ‘ivr-3’ tries to include nonexistent context ‘from-ivr-directory-Disabled’
[2024-06-18 04:37:38] WARNING[10736]: pbx.c:8797 ast_context_verify_includes: Context ‘ivr-2’ tries to include nonexistent context ‘from-ivr-directory-Disabled’
[2024-06-18 04:37:38] WARNING[10736]: pbx.c:8797 ast_context_verify_includes: Context ‘ivr-1’ tries to include nonexistent context ‘from-ivr-directory-Disabled’

Thanks again!

I think you will have to live with these warnings.

FreePBX adds some of these into its generated dialplan so that admins can add their own custom contexts, but the catch is that FreePBX isn’t aware of the context until it’s loaded, so it always tries to load it.

1 Like

But if you really are offended by the warnings, you can ‘touch’ each of the named missing files and asterisk will load the ‘do nothing’ ones silently

These aren’t missing files, these are missing contexts. They are completely different things.

[ext-local]
include = ext-local-custom

This isn’t looking for a file, it’s looking for a context called [ext-local-custom] in the loaded config memory. So there’s no files to touch that don’t exist that will make that error go away.

When I do “grep ext-local /etc/asterisk*” I see lots of lines that come from extensions_additional.conf. There seems to be one for each extenstion and are related to voicemail, IVR and findmefollow.

I could not find the file where the context include stanza " ```
[ext-local]


Is there a way to manually add a context so these errors don't come up?  

I've pasted the grep findings below in case they would be helpful...

extensions_additional.conf:exten => 9,n(ivrsel-9),Goto(ext-local,vmu701,1)
extensions_additional.conf:exten => 220,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 220,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 306,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 306,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 300,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 300,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 201,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 201,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 202,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 202,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 205,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 205,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 206,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 206,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 210,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 210,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 212,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 212,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 215,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 215,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 230,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 230,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 225,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 225,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 240,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 240,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 305,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 305,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 505,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 505,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 701,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 701,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 221,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 221,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 755,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 755,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => 750,1,GotoIf($["${REDIRECTING(reason)}" = "send_to_vm"]?ext-local,*${EXTEN},1)
extensions_additional.conf:exten => 750,n,GotoIf($[${DB_EXISTS(AMPUSER/${EXTEN}/followme/ddial)} != 1 | "${DB(AMPUSER/${EXTEN}/followme/ddial)}" = "EXTENSION"]?ext-local,${EXTEN},1:followme-check,${EXTEN},1)
extensions_additional.conf:exten => _X!,n,Set(FM_DIALSTATUS=${EXTENSION_STATE(${EXTEN}@ext-local)})
extensions_additional.conf:exten => 600,n,Goto(ext-local,vmu701,1)
extensions_additional.conf:exten => 615,n,Goto(ext-local,vmu701,1)
extensions_additional.conf:[ext-local]
extensions_additional.conf:;--== end of [ext-local] ==--;
extensions_additional.conf:exten => *505,n,GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?ext-local,vmret,playret)
extensions_additional.conf:exten => *701,n,GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?ext-local,vmret,playret)
extensions_additional.conf:[ext-local-confirm]
extensions_additional.conf:;--== end of [ext-local-confirm] ==--;
extensions_additional.conf:exten => exit-RETURN,n,GotoIf($["${RETVM}" = "RETURN"]?ext-local,vmret,1)
extensions_additional.conf:exten => s,n,GotoIf($["${CUT(CHANNEL,@,2):5:5}"="queue"|"${AMPUSER}"=""|${LEN(${FROM_DID})}|"${DB(AMPUSER/${EXTTOCALL}/answermode)}"!="intercom"|${LEN(${BLINDTRANSFER})}|"${EXTENSION_STATE(${EXTTOCALL}@ext-local)}"!="NOT_INUSE"|"${CC_RECALL}"!=""]?macrodial)
extensions_additional.conf:exten => docfu,n,Dial(Local/${CFUEXT}@ext-local,${RT},${DIAL_OPTIONS})
extensions_additional.conf:exten => docfb,n,Dial(Local/${CFBEXT}@ext-local,${RT},${DIAL_OPTIONS})
extensions_additional.conf:exten => s,n(next1),GotoIf($["${DB(CFU/${DEXTEN})}"!="" & ("${EXTENSION_STATE(${DEXTEN}@ext-local)}"="UNAVAILABLE" | "${EXTENSION_STATE(${DEXTEN}@ext-local)}"="UNKNOWN")]?docfu:skip3)
extensions_additional.conf:exten => s,n(next2),GotoIf($["${EXTENSION_STATE(${DEXTEN}@ext-local)}"="NOT_INUSE" | "${EXTENSION_STATE(${DEXTEN}@ext-local)}"="UNAVAILABLE" | "${EXTENSION_STATE(${DEXTEN}@ext-local)}"="UNKNOWN"]?continue)
extensions_additional.conf:exten => s,n(next3),ExecIf($["${EXTENSION_STATE(${DEXTEN}@ext-local)}"!="UNAVAILABLE" & "${EXTENSION_STATE(${DEXTEN}@ext-local)}"!="NOT_INUSE" & "${EXTENSION_STATE(${DEXTEN}@ext-local)}"!="UNKNOWN"]?Set(DIALSTATUS_CW=BUSY))
extensions_additional.conf:exten => s,n,ExecIf($["${DB(AMPUSER/${DEXTEN}/cwtone)}" = "enabled" & "${EXTENSION_STATE(${DEXTEN}@ext-local)}" = "INUSE"]?Set(CWRING=r(callwaiting)):Set(CWRING=))
extensions_additional.conf:exten => s,n,ExecIf($["${AMPUSER}" = "${ARG1}"]?Set(HASH(dialparties,EXTSTATE_RESULT)=INUSE_ORIGINATOR):Set(HASH(dialparties,EXTSTATE_RESULT)=${EXTENSION_STATE(${ARG1}@ext-local)}))
extensions_additional.conf:exten => _.X,n,Goto(ext-local,${EXTEN},1)
extensions_additional.conf:include => ext-local-confirm
extensions_additional.conf:include => ext-local
extensions.conf:; forces ext-findmefollow to take precedence over ext-local. Also exposed to
extensions.conf:include => ext-local

Those special characters of for formatting in the forum. Nothing to do with the dialplan. It was also just an example.

Sorry… I meant, where can I find the stanza above, and if it’s simply missing from a file, which file and can I add it manually?

The include statement means “include this context” which it can’t find. It’s normal. FreePBX allows you to use -custom contexts so you can hook into dialplan functions. You can turn that off in Advanced Settings. However, there are still some custom contexts they leave in for call handling.

The contexts, if you need them, should be put in extensions_custom.conf. You could edit extensions_custom.conf and add a line [ext-local-custom] and save it. It will not throw a warning because it can now find that context, even if it is empty.

I was just pointing out this wasn’t about missing files.

I added the stanza above to my extensions_custom.conf file and reloaded, but I’m still getting these errors. Is there another stanza I should add to another file somewhere?

2024-06-18 14:48:49] WARNING[13722]: pbx.c:8797 ast_context_verify_includes: Context ‘from-internal-xfer’ tries to include nonexistent context ‘from-internal-custom’
[2024-06-18 14:48:49] WARNING[13722]: pbx.c:8797 ast_context_verify_includes: Context ‘from-internal-noxfer’ tries to include nonexistent context ‘from-internal-noxfer-custom’
[2024-06-18 14:48:49] WARNING[13722]: pbx.c:8797 ast_context_verify_includes: Context ‘from-pstn’ tries to include nonexistent context ‘from-pstn-custom’
[2024-06-18 14:48:49] WARNING[13722]: pbx.c:8797 ast_context_verify_includes: Context ‘from-internal-additional’ tries to include nonexistent context ‘ext-queues’
[2024-06-18 14:48:49] WARNING[13722]: pbx.c:8797 ast_context_verify_includes: Context ‘ivr-4’ tries to include nonexistent context ‘from-ivr-directory-Disabled’
[2024-06-18 14:48:49] WARNING[13722]: pbx.c:8797 ast_context_verify_includes: Context ‘ivr-3’ tries to include nonexistent context ‘from-ivr-directory-Disabled’
[2024-06-18 14:48:49] WARNING[13722]: pbx.c:8797 ast_context_verify_includes: Context ‘ivr-2’ tries to include nonexistent context ‘from-ivr-directory-Disabled’
[2024-06-18 14:48:49] WARNING[13722]: pbx.c:8797 ast_context_verify_includes: Context ‘ivr-1’ tries to include nonexistent context ‘from-ivr-directory-Disabled’

You would need to make one that matched any throwing the error. Little curious as to why the IVR module is making includes for disabled direct dial. Those shouldnt be created.

Which file would I add the contexts to? Does everything go into extensions_custom.conf ?

All custom dialplan and contexts go in that file. Not having them doesnt impact anything.