Missing leading Zero on incoming


I am trying to add a leading zero to all incoming numbers, I have freePbx 10.2 distro with Asterisk 1.8 and the Set CallerID module. My understanding was that it should be fairly simple and creating a SetCallerID config using 0${CALLERID(num)} against the maij incoming trunk then all numbers would get the zero added. However this isn’t working, I must have missed a step somewhere along the line just not sure where.

Any ideas as to what I have missed?


** UPDATE **

I have monitored an incoming call and noticed that the SetCallerID module does not appear to even get called during the incoming call. So I had a look at the extensions.additional.conf file and noticed the line:
exten => nnnnnn,n,ExecIf($[ “${CALLERID(name)}” = “” ] ?Set(CALLERID(name)=${CALLERID(num)}))

After editing the last part to =0${CALLERID(num)} but after a reload it reverted back to =${CALLERID(num)} suggesting that there is a tick box or config option somewhere that I have missed.

** UPDATE 2 **
I also edited the extensions_custom.conf file to include the context
exten => _X!,1,Set(CALLERID(num)=0${CALLERID(num)})
exten => _X!,n,Goto(from-trunk,${EXTEN},1)
After reload the system went very slowly and under the CLI started to loop zeroes so I ended up with thousands of them.

Did you route the call to the set caller ID module?

There does not appear to be a way to route the call to Set CallerID, only route the call once set caller id has dealt with it.

When trying to get Set CALLERID to work I created a new entry then routed the call to our main incoming DAHDI trunk. Other than that there appears to be no other config option, I also tried sedning it directly ro an extension to the same effect.

Should I some how be telling the trunk to look at the CALLERID module?


No the inbound route needs to route to the set caller id module.

I did a little digging after your last response and found the option to use the set caller id on the inbound route (not sure how i missed it last time)…Only trouble is now is that the called number responds in going directly to voicemail. But I am sure that’s down to how I set the route up.

DID number > SetCallerID then set up the set CallerID to point directly to an extension. should just work by all accounts…

Cheers for the advice…


Yes, that is correct. You can dial the extension directly?

Send log if you want an analysis.

i can now dial the DID from an external line and the CLID comes in correctly. We have about 20 DID’s for various incoming routes with different destinations and time conditions. It seems that I will need to create a number of Set CallerID configs to accomplish this task. Is there a “catch all” option?, or do I need to create one per DDI?