Help with extensions_custom.conf

I want to prepend a 1 to inbound CallerID - so that when calls come in, they show in each phone as 1+10 digits. (My dial-plan is set to pass 1+10 digits to outside calls. With voip.ms, all calls come in with a 10 digit CALLERID, but once I get the 1 added, each user can just hit call-back and it’ll dial the required 11 digits to return a call)

ever since Freepbx 11, I just added this to extensions_custom.conf

[from-pstn-add-one]
;add one to CID number for redial purposes
exten => _X.,1,GotoIf($["${LEN(${CALLERID(num)})}" != “10”]?notten)
exten => _X.,n,Set(CALLERID(num)=1${CALLERID(num)})
exten => _X.,n(notten),Goto(from-pstn,${EXTEN},1)

and I set the Incoming settings in my trunk to
context=from-pstn-add-one

That works fine. (maybe there’s a better way to do this? I wish I could remember who originally posted that code so I could give credit where due – but THANK YOU whomever it was!)

When I try the same thing in FreePBX 15 - The calls do route correctly and the 1 is added fine --YAY BUT - All logging STOPS going to FULL - I can turn it back on in the GUI - but What on earth?? all I did was edit/modify the [originally empty] extensions_custom.conf.

I am ok with just turning logging back on in the GUI, but it makes me wonder WHY? and WHAT OTHER SETTINGS also may have been screwed up at the same time…??

PS. I’m running this system as a virtual guest - so I’ve duplicated my results 3 times just to make sure this is what happens

FreePBX 15 with latest updates applied. My SIP trunks are from voip.ms

Thanks in advance!

How are you editing extensions_custom.conf?

with vi from the command line

You mean, extensions_custom.conf become empty?
That weird.
Check this out in Advanced Settings
image

Otherwise, if you edit this file trough vi, that should work.
I wionder if you edit this one through notepad and use WinSCP it can work correctly.
Check if there’s no ^M for windows end of line.

Just an idea like that.

I think you might have not read the post or maybe I wasn’t clear - After I added those 4 lines to my [formerly empty] extenstions_custom.conf, (the edit worked and produced expected results )… but AFTER THAT - the FULL log file doesn’t log anything anymore.

I can turn logging back on in the GUI but I’m MOST concerned that SOMETHING ELSE might also have been turned off/changed…

Indeed it’s more clear :slight_smile:

Try to enable asterisk debug in CLI for example.
core set debug 5

And check the events.

Next, trun off debug mode:
core set debug 0

And check if there’s a clue somewhre here;

Scratch that… sorry.

Seems that logging was off before I made my vm backup - Some things log to full but not everything - so I can’t tell exactly WHEN logging got turned off - but it was NOT when I edited my extensions_custom.conf file…

Nevermind. and Thank you everyone

There is a bug in the current version of Asterisk Logfiles module which is stopping your logging; it’s unrelated to your conf file edits. Until there is an update published, you can work around by manually re-enabling logging again: FrleePBX 15 Asterisk 16.9.0 not showing any logs on asterisk console

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.