Add prefix 9 for all incoming calls (from PSTN / ZAP only)

i would like to add a 9 in front of the incoming CID for calls from zaptel.
this will allow our users to re-dial the number (we need a leading 9 for our outbound route).

my current solution is adding a 9 to all CID also the internal extension = internal extension (missed calls) always have a 9 in front, therfore they can not call each other any more via simple re-dial.

looking forward to some help. thanks.

with best regards
daniel

I would have thought the easiest would be to set up a custom context, so

  1. In your zapata.conf change the context to context=from-zaptel-custom

  2. In extensions_custom.conf create a new context:

[from-zaptel-custom]
exten => _X.,1,Set(CALLERID(num)=9${CALLERID(num)})
exten => _X.,n,Goto(from-zaptel,${EXTEN},1)

Restart everything.

Colin