I just installed a new FreePBX14 server from the latest FreePBX distro install, and this time I chose Asterisk 16 instead of 13.
I have 2 [current as of 9/15/2020]FreePBX14/Asterisk 13 installs, and the below code works on these two servers - but on my new freePBX/Asterisk16 install, It appears that extensions_custom.conf is not being recognized…?
What I’m doing – in extensions_custom.conf, I have added the following:
[from-pstn-add-one]
;add one to CID number for redial purposes
exten => _X.,1,GotoIf($["${LEN(${CALLERID(number)})}" != “10”]?notten)
exten => _X.,n,Set(CALLERID(number)=1${CALLERID(number)})
exten => _X.,n,Set(CALLERID(name)=${CURL(https:/my\ [email protected]/v2/phone/${CALLERID(num)}?format=pbx&ref=freepbx)})
exten => _X.,n(notten),Goto(from-pstn,${EXTEN},1)
and then in my SIP trunk, I put context=from-pstn-add-one
When I make an inbound call, I get a busy and the full log says “Call from ‘mytrunk’ to extension ‘s’ rejected because ectension not found in context ‘from-pstn-add-one’”
Of course when I set context for my SIP trunk to from-pstn, calls go through.
Really all I want to do is prepend a 1 to the incoming CallerID, and do a openCNAM lookup…
Maybe I’m doing it wrong or the hard way? if so - please enlighten me… ha!
But as I said, both of my other Freepbx/ Asterisk13 servers are working with this method.
I THOUGHT that all I had to do was add a new context in extensions_custom.conf, and add some code, and then perform Goto [another context|, and then when I route my trunk to the new context, it would run the commands there, and the call would (in this case) follow my command to Goto [from-pstn] and continue… but maybe I’m off base on this… ? I’ve checked owner and file rights. Also rebooted the server just to make SURE everything restarted