Global Follow Me (default setting) - is it possible?


Since our FreePBX system will primarily be used for voicemail and IVR, is it possible to create a global, that is a default Follow Me for all Extensions? The way we need each extension to behave when a person chooses a certain Extension number from the IVR or directory, is for that number to ring/call the physical legacy PBX extension, first. If no answer, then it will rollover to that Extension’s voicemail (box).

All that is configured in the Follow Me List for each Extension is: 1xxxx# <-- this makes the system use the outbound trunk line to call the actual legacy PBX extension. Followed by xxxx <— go to the voicemail.

The above works just fine. The problem is the tedious business of having to configure each of the 1000+ extensions with the Follow Me setting. I was therefore wondering whether a default parameter could be created for each Extension or Follow Me? Thanks.

Towhid Islam
[email protected]

You can make an custom cf in extensions_custom.conf

Here is an example with code 0811.
In this you get a question for the extension to forward to, but if you remove that part and make it a fixed number it should work.

include => app-cf-on-custom
exten => 0811,1,Answer
exten => 0811,n,Wait(1)
exten => 0811,n,Macro(user-callerid,)
exten => 0811,n,Playback(call-fwd-unconditional)
; exten => 0811,n,Playback(please-enter-your&extension)
; exten => 0811,n,Read(fromext,then-press-pound,)
; exten => 0811,n,Set(fromext=${IF($[“foo${fromext}”=“foo”]?${AMPUSER}:${fromext})})
exten => 0811,n,Set(fromext=${AMPUSER})
exten => 0811,n,Wait(1)
exten => 0811,n(startread),Playback(ent-target-attendant)
exten => 0811,n,Read(toext,then-press-pound,)
exten => 0811,n,GotoIf($[“foo${toext}”=“foo”]?startread)
exten => 0811,n,Wait(1)
exten => 0811,n,Set(DB(CF/${fromext})=${toext})
exten => 0811,n,Set(STATE=BUSY)
exten => 0811,n,Gosub(app-cf-on,sstate,1)
exten => 0811,n(hook_1),Playback(call-fwd-unconditional&for&extension)
exten => 0811,n,SayDigits(${fromext})
exten => 0811,n,Playback(is-set-to)
exten => 0811,n,SayDigits(${toext})
exten => 0811,n,Macro(hangupcall,)
exten => _0811.,1,Answer
exten => _0811.,n,Wait(1)
exten => _0811.,n,Macro(user-callerid,)
exten => _0811.,n,Set(fromext=${AMPUSER})
exten => _0811.,n,Set(toext=${EXTEN:4})
exten => _0811.,n,Set(DB(CF/${fromext})=${toext})
exten => _0811.,n,Set(STATE=BUSY)
exten => _0811.,n,Gosub(app-cf-on,sstate,1)
exten => _0811.,n(hook_2),Playback(call-fwd-unconditional&for&extension)
exten => _0811.,n,SayDigits(${fromext})
exten => _0811.,n,Playback(is-set-to)
exten => _0811.,n,SayDigits(${toext})
exten => _0811.,n,Macro(hangupcall,)
exten => sstate,1,Set(DEVSTATE(Custom:CF${fromext})=${STATE})
exten => sstate,n,Set(DEVICES=${DB(AMPUSER/${fromext}/device)})
exten => sstate,n,GotoIf($["${DEVICES}" = “” ]?return)
exten => sstate,n,Set(LOOPCNT=${FIELDQTY(DEVICES,&)})
exten => sstate,n,Set(ITER=1)
exten => state,n(begin),Set(DEVSTATE(Custom:DEVCF${CUT(DEVICES,&,${ITER})})=${STATE})
exten => sstate,n,Set(ITER=$[${ITER} + 1])
exten => sstate,n,GotoIf($[${ITER} <= ${LOOPCNT}]?begin)
exten => sstate,n(return),Return()

; end of [app-cf-on]