Which extensions*.conf file to use?

Good day! I am another newbie and was wondering where I can find out more information about the extension*.conf files for our setup. We are using Trixbox CE (which is no longer supported). I want to tinker with an extension number that calls a script. When I go to edit extensions.conf, I am warned that the file should not be edited as it is generated from FreePBX.

I found extensions_custom.conf and it seems to be the file I need. I added the 5993 lines (see below) and re-started asterisk, but they still don’t work:

[from-internal-custom]
5993,1,Answer()
5993,2,System(/usr1/scripts/showroom-help)
5993,3,Hangup()

Here is the “full” log file entries for my attempts at calling this dummy extension.

[Mar 13 12:25:49] VERBOSE[18239] logger.c: – Executing [5993@from-internal:1] ResetCDR(“SIP/5131-00000000”, “”) in new stack
[Mar 13 12:25:49] VERBOSE[18239] logger.c: – Executing [5993@from-internal:2] NoCDR(“SIP/5131-00000000”, “”) in new stack
[Mar 13 12:25:49] VERBOSE[18239] logger.c: – Executing [5993@from-internal:3] Wait(“SIP/5131-00000000”, “1”) in new stack
[Mar 13 12:25:50] VERBOSE[18239] logger.c: – Executing [5993@from-internal:4] Playback(“SIP/5131-00000000”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
[Mar 13 12:25:56] VERBOSE[18239] logger.c: – Executing [5993@from-internal:5] Wait(“SIP/5131-00000000”, “1”) in new stack
[Mar 13 12:25:56] VERBOSE[18239] logger.c: == Spawn extension (from-internal, 5993, 5) exited non-zero on ‘SIP/5131-00000000’

I am obvious missing one or more steps. Anybody willing to point me in the right direction?

Thanks!!

That’s where you want to put the code but your syntax doesn’t look right at all.

Look in the var/log/messages when you do a reload (or just a dialplan reload) from Asterisk and see if you have any syntax errors. You can also check to make sure it’s registered with the Asterisk CLI command dialplan show 5993@from-internal-custom

Thank you SkykingOH!
Hmmm…
Here is results from CLI:
There is no existence of 5993@from-internal-custom extension
Command ‘dialplan show 5993@from-internal-custom’ failed.

The /var/log/messages does not appear to have anything recent in it.

A grep of 5993 in /var/log/asterisk only shows:
ssphone>grep 5993 *
full:[Mar 13 12:25:49] VERBOSE[18239] logger.c: – Executing [5993@from-internal:1] ResetCDR(“SIP/5131-00000000”, “”) in new stack
full:[Mar 13 12:25:49] VERBOSE[18239] logger.c: – Executing [5993@from-internal:2] NoCDR(“SIP/5131-00000000”, “”) in new stack
full:[Mar 13 12:25:49] VERBOSE[18239] logger.c: – Executing [5993@from-internal:3] Wait(“SIP/5131-00000000”, “1”) in new stack
full:[Mar 13 12:25:50] VERBOSE[18239] logger.c: – Executing [5993@from-internal:4] Playback(“SIP/5131-00000000”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
full:[Mar 13 12:25:56] VERBOSE[18239] logger.c: – Executing [5993@from-internal:5] Wait(“SIP/5131-00000000”, “1”) in new stack
full:[Mar 13 12:25:56] VERBOSE[18239] logger.c: == Spawn extension (from-internal, 5993, 5) exited non-zero on ‘SIP/5131-00000000’

=====================
The file contains these lines, which appear to be there for testing. I un-remmed and restarted askterisk. I get the same error.

;1234,1,Playback(demo-congrats) ; extensions can dial 1234
;1234,2,Hangup()
;h,1,Hangup()

CLI says:
dialplan show 1234@from-internal-custom
There is no existence of 1234@from-internal-custom extension
Command ‘dialplan show 1234@from-internal-custom’ failed.

Any advice for the newbie? Thanks!

Why would you restart asterisk, just run a dialplan reload.

Make sure in extensions.conf that extensions_custom.conf is being included at the end. Also I think the semicolon in the sample if on same line will generate a syntaz error.

Because I am still learning. Ok, I learned how to reload the dialplan from the CLI. I checked the extensions.conf file and it turns out the line for extensions_customer was still remmed out (#). I un-remmed and reloaded, but nothing changed. I then moved then line to the bottom of the file and reloaded, but still nothing changed. Also, the extensions.conf file says “do not edit - file is generated from FreePBX”…

Do I need to modify any files in addition to extensions_custom.conf for this to work?

Thanks.

It wasn’t REM’d out…The # is the correct syntax.

Something is stopping the file from loading

Look very carefully at the log following the dialplan reload /var/log/asterisk/full

Got it! We have it working correctly now. Yes, the syntax was wrong. Yes, the log file told me after reloading the dialplan. Score one for the hack (me), with some very useful help from Sir SkykingOH. Thank for helping this newbie!