Newbie Help

Hi, A newbie here trying to modify the callerID name on the dial plan. I’ve realized that on extensions_additional.conf i can’t write anything because it gets over written. So i want to know how i can change the callerid on the extension_custom.conf

This is the dialplan i have on the extension_additional.conf
i would like to change the caller id to this, and ONLY to this number.
exten => 3055000002,n,Set(CALLERID(name)=${CALLERID(num)}-${RGPREFIX}-${CALLERID(name)})
What would i need to add on extension_custom.conf?

[ext-did-0002]
include => ext-did-0002-custom
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => 3055000002,1,Set(__FROM_DID=${EXTEN})
exten => 3055000002,n,Gosub(app-blacklist-check,s,1)
exten => 3055000002,n,ExecIf($[ “${CALLERID(name)}” = “” ] ,Set,CALLERID(name)=${CALLERID(num)})
exten => 3055000002,n,Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}})
exten => 3055000002,n,SetCallerPres(allowed_not_screened)
exten => 3055000002,n,Set(_RGPREFIX=THISGW)
exten => 3055000002,n,Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)})
exten => 3055000002,n,Goto(ivr-5,s,1)
exten => 3055000004,1,Set(__FROM_DID=${EXTEN})
exten => 3055000004,n,Gosub(app-blacklist-check,s,1)
exten => 3055000004,n,ExecIf($[ “${CALLERID(name)}” = “” ] ,Set,CALLERID(name)=${CALLERID(num)})
exten => 3055000004,n,Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}})
exten => 3055000004,n,SetCallerPres(allowed_not_screened)
exten => 3055000004,n,Goto(from-did-direct,2015,1)
exten => 7865000000,1,Set(__FROM_DID=${EXTEN})
exten => 7865000000,n,Gosub(app-blacklist-check,s,1)
exten => 7865000000,n,ExecIf($[ “${CALLERID(name)}” = “” ] ,Set,CALLERID(name)=${CALLERID(num)})
exten => 7865000000,n,Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}})
exten => 7865000000,n,SetCallerPres(allowed_not_screened)
exten => 7865000000,n,Goto(ivr-4,s,1)
exten => 9545000006,1,Set(__FROM_DID=${EXTEN})
exten => 9545000006,n,Gosub(app-blacklist-check,s,1)
exten => 9545000006,n,ExecIf($[ “${CALLERID(name)}” = “” ] ,Set,CALLERID(name)=${CALLERID(num)})
exten => 9545000006,n,Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}})
exten => 9545000006,n,SetCallerPres(allowed_not_screened)
exten => 9545000006,n,Goto(from-did-direct,2005,1)

Note the line
include => ext-did-0002-custom
at the top of that context. If you go into extensions_custom.conf, create a context with the heading ext-did-0002-custom, copy all the lines pertaining to exten => 3055000002 to there, and then make your modifications, it should work. BUT, note that any changes you make thereafter from the FreePBX GUI will not be “tracked” in your custom context, so you may have to repeat this process whenever you make a change to the FreePBX configurations that affects this DID.

hi,
i tried that, but the problems is that the inclusion is done after the dialplan is already processed. Meaning the call goes to the IVR and then gets the include context. So basically the callerid NEVER gets modified. Here’s the

show dialplan 3055002302@ext-did-0002
[ Context ‘ext-did-0002’ created by ‘pbx_config’ ] ‘3055000002’ =>

  1. Set(__FROM_DID=${EXTEN}) [pbx_config]
  2. Gosub(app-blacklist-check|s|1) [pbx_config]
  3. ExecIf($[ “${CALLERID(name)}” = “” ] |Set|CALLERID(name)=${CALLERID(num)}) [pbx_config]
  4. Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}}) [pbx_config]
  5. SetCallerPres(allowed_not_screened) [pbx_config]
  6. Set(_RGPREFIX=THISGW) [pbx_config]
  7. Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)}) [pbx_config]
  8. Goto(ivr-5|s|1) [pbx_config]
    [ Included context ‘ext-did-0002-custom’ created by ‘pbx_config’ ] ‘3055000002’ =>
  9. Set(CALLERID(name)=${CALLERID(num)}-${RGPREFIX}-${CALLERID(name)}) [pbx_config]

Okay, why don’t you explain exactly what you are trying to do - perhaps there is another approach. For example, go to http://www.freepbx.org/trac/browser/contributed_modules/release and look at the setcid modules - maybe one of those would work for you?

what im trying to do is alter the CID from the call. By Including the CID(num) & Some Strings.

so i found a way around this, because i hadn’t found a way to do it the “Right way”

I added this Inbound route through the gui. YES the GUI allows both letters and numbers for the DID number field.
[ext-did-0002]
include => ext-did-0002-custom
exten => fax,1,Goto(ext-fax,in_fax,1)
exten => 3055000002_INCOMING,1,Set(__FROM_DID=${EXTEN})
exten => 3055000002_INCOMING,n,Gosub(app-blacklist-check,s,1)
exten => 3055000002_INCOMING,n,ExecIf($[ “${CALLERID(name)}” = “” ] ,Set,CALLERID(name)=${CALLERID(num)})
exten => 3055002302_INCOMING,n,Set(_CALLINGPRES_SV=${CALLINGPRES${CALLINGPRES}})
exten => 3055000002_INCOMING,n,SetCallerPres(allowed_not_screened)
exten => 3055000002_INCOMING,n,Goto(ivr-5,s,1)

Since the actual DIALED number is 3055000002 and this is not in the dial plan, it goes to the _custom.conf at the end of the context. So i wrote this on the _custom.conf

[ext-did-0002-custom]
exten => 3055000002,1,Set(CALLERID(name)=${CALLERID(num)}-THISGW-${EXTEN})
exten => 3055000002,n,Goto(ext-did-0002,3055000002_INCOMING,1)

And basically sent it back to the other context so it can carry out whatever i do.