I seem to be missing something…
After creating entries for all of the numbers I want to change and updating the trunk context under Trunk->pjsip Settings->context to “from-pstn-preprocess” I’m getting errors that say call to extension ‘1234’ rejected because extension not found in context ‘from-pstn-preprocess’, which ends with an abandoned call on the caller end.
extensions_custom.conf only contains:
[from-pstn-preprocess]
exten => _./9876543210,1,Set(CALLERID(name)=NewName2) ; all inbound calls matching cid number 9876543210
exten => _.,n,Goto(from-pstn,${EXTEN},1)
I did remove trailing ‘)’ as I didn’t think it was necessary…adding it back gives same results. Whatever parses the config must be forgiving Also just put your example in there for testing, I realize it’s not going to match what I want.
Not sure if this helps, but here’s some more info:
pbx*CLI> dialplan show from-trunk
[ Context 'from-trunk' created by 'pbx_config' ]
Include => 'from-pstn' [pbx_config]
-= 0 extensions (0 priorities) in 1 context. =-
pbx*CLI> dialplan show from-pstn
[ Context 'from-pstn' created by 'pbx_config' ]
Include => 'from-pstn-custom' [pbx_config]
Include => 'ext-did' [pbx_config]
Include => 'ext-did-post-custom' [pbx_config]
Include => 'from-did-direct' [pbx_config]
Include => 'ext-did-catchall' [pbx_config]
-= 0 extensions (0 priorities) in 1 context. =-
pbx*CLI> dialplan show from-pstn-preprocess
[ Context 'from-pstn-preprocess' created by 'pbx_config' ]
-= 0 extensions (0 priorities) in 1 context. =-
pbx*CLI> dialplan show 1234@from-pstn
[ Included context 'ext-did-0002' created by 'pbx_config' ]
'_.' (CID match '2013552290') => 1. Set(__DIRECTION=INBOUND) [extensions_additional.conf:2178]
2. Set(CHANNEL(tonezone)=us) [extensions_additional.conf:2179]
3. Set(__FROM_DID=${EXTEN}) [extensions_additional.conf:2180]
4. Goto(s,1) [extensions_additional.conf:2181]
5. Set(__CRM_DIRECTION=INBOUND) [extensions_additional.conf:2182]
6. Set(__CRM_SOURCE=${CALLERID(num)}) [extensions_additional.conf:2183]
7. Set(__CRM_LINKEDID=${CHANNEL(LINKEDID)}) [extensions_additional.conf:2184]
8. AGI(agi://127.0.0.1/sangomacrm.agi,true) [extensions_additional.conf:2185]
9. ExecIf($["${CRM_DIRECTION}"="INBOUND"]?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)) [extensions_additional.conf:2186]
[ Included context 'ext-findmefollow' created by 'pbx_config' ]
'1234' => 1. 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:2435]
[ Included context 'ext-local' created by 'pbx_config' ]
'1234' => hint: PJSIP/1234&PJSIP/901234&Custom:DND1234,CustomPresence:1234 [extensions_additional.conf:3743]
1. Set(__RINGTIMER=${IF($["${DB(AMPUSER/1234/ringtimer)}" > "0"]?${DB(AMPUSER/1234/ringtimer)}:${RINGTIMER_DEFAULT})}) [extensions_additional.conf:3737]
2. ExecIf($["${REGEX("from-queue" ${CHANNEL})}"="1" && "${CONTEXT}"="from-internal-xfer"]?Set(__CWIGNORE=)) [extensions_additional.conf:3738]
3. Macro(exten-vm,1234,1234,0,0,0) [extensions_additional.conf:3739]
[dest] 4. Set(__PICKUPMARK=) [extensions_additional.conf:3740]
5. Macro(vm,1234,${DIALSTATUS},${IVR_RETVM}) [extensions_additional.conf:3741]
6. Goto(vmret,1) [extensions_additional.conf:3742]
[ Included context 'ext-did-catchall' created by 'pbx_config' ]
'_.' => 1. Set(__FROM_DID=${EXTEN}) [extensions_additional.conf:4737]
2. Noop(Received an unknown call with DID set to ${EXTEN}) [extensions_additional.conf:4738]
3. Goto(s,a2) [extensions_additional.conf:4739]
-= 4 extensions (20 priorities) in 4 contexts. =-
pbx*CLI> dialplan show 1234@from-pstn-preprocess
[ Context 'from-pstn-preprocess' created by 'pbx_config' ]
'_.' (CID match '9876543210') => 1. Set(CALLERID(name)=NewName2) [extensions_custom.conf:2]
'_.' => 2. Goto(from-pstn,${EXTEN},1) [extensions_custom.conf:3]
-= 2 extensions (2 priorities) in 1 context. =-
pbx*CLI>