0

call forward via BLF button

add call forward/feature buttons

send call to another extension by pressing a BLF key

We add this now via extensions_custom.conf:

-----------------------------------------------------------------------------------------

[call_forward]  ;control c1...9 buttons on/off
 
exten => _cZ,1,Answer()  
exten => _cZ,n,GotoIf($["${DEVICE_STATE(Custom:${EXTEN})}"="BUSY"]?turn_off:turn_on)
 
exten => _cZ,n(turn_off),Set(DEVICE_STATE(Custom:${EXTEN})=NOT_INUSE)  
exten => _cZ,n,Playback(beep)  
exten => _cZ,n,Hangup()   
 
exten => _cZ,n(turn_on),Set(i=1)  
exten => _cZ,n,While($[${i} < 9])  
exten => _cZ,n,Set(DEVICE_STATE(Custom:c${i})=NOT_INUSE)  
exten => _cZ,n,Verbose(3,c${i} is not active.)  
exten => _cZ,n,Set(i=$[${i} + 1])  
exten => _cZ,n,EndWhile  
exten => _cZ,n,Set(DEVICE_STATE(Custom:${EXTEN})=BUSY)  
exten => _cZ,n,Verbose(3,${EXTEN} is active.)  
exten => _cZ,n,Playback(beep)   
exten => _cZ,n,Hangup()   
 
[Local_Default_CallingRules](+)   
include = call_forward    
 
[extensions-hintcontext](+)   
exten => c1,hint,Custom:c1   
exten => c2,hint,Custom:c2   
exten => c3,hint,Custom:c3   
exten => c4,hint,Custom:c4   
exten => c5,hint,Custom:c5   
exten => c6,hint,Custom:c6   
exten => c7,hint,Custom:c7   
exten => c8,hint,Custom:c8   
exten => c9,hint,Custom:c9
 
[from-trunk](+)
exten = _31522463357,1,Set(ENABLEDNIS=0)  
exten = _31522463357,2,Macro(incoming_inkomend,0,${EXTEN})   
 
[DID_trunk_15]
exten = s,1,Goto(macro-incoming_inkomend,s,1)     ; GSM line
 
[macro-incoming_inkomend]
exten = s,1,Set(CDR(userfield)=Inbound)
exten = s,2,GotoIf(${DB_EXISTS(blacklist/${CALLERID(num)})}?Blacklist-Handle,s,1)
exten = s,3,FindForMobile(${CALLERID(num)})
exten = s,4,GotoIf($[${LEN(${MobileToExten})}>1]?mobile-exten-match,${MobileToExten},1)
exten = s,5,SIPAddHeader(Alert-Info: <http://192.168.2.250>\;info=inkomend)
exten = s,6,Set(TRUNKDID=${IF($[${ARG2}=s]?${CALLERID(name)}:${ARG2})})
exten = s,7,GotoIf($["${DEVICE_STATE(Custom:c1)}"="BUSY"]?49,1)  ; to ringroup 49 or next priority  
exten = s,8,GotoIf($["${DEVICE_STATE(Custom:c2)}"="BUSY"]?48,1)  ; to ringroup 48 or next priority
exten = s,9,GotoIf($["${DEVICE_STATE(Custom:c3)}"="BUSY"]?47,1)  ; to ringroup 47 or next priority
exten = s,10,GotoIf($["${DEVICE_STATE(Custom:c4)}"="BUSY"]?46,1)  ; to ringroup 46 or next priority
exten = s,10,GotoIf($["${DEVICE_STATE(Custom:c5)}"="BUSY"]?45,1)  ; to ringroup 45 or next priority
exten = s,11,GotoByTimeCondition(default,ringroups-custom-40,40,1,,ringroups-custom-40,40,1,holiday,ringroups-custom-40,40,1)
exten = s,102,Goto(Blacklist-Handle,s,1)

1 comment

Please sign in to leave a comment.