Skip to main content

Call Forward Script and Soft keys for Polycom phones

Posted by olekaas on Mon, 09/28/2009

I've hacked the call forward scripts and mashed them together, so only one feature code is needed for both setup and cancel. Simply clone the tl-callforward-caller and paste the code below. Find also config for polycom phones for replacing the phones client side forwarding with this server side call forwarding. The phone config can be used as an additional config file - or implemented in an existing one (I have used *74 as feature code). With both script and config in place, you can activate forwarding by hitting a single key, type the number to forward to and hit "send". To cancel the forward, repeat the procedure without typing a number. Note: the xml have been crippled with brackets to post it in this forum. Uncripple before use. Have Fun :-)


exten => s,1,Macro(tl-set-myvariables)
exten => s,n,Set(KEY=${ARG1}N)
exten => s,n,GotoIf("${ARG1}" != "CFNA"?doit)
exten => s,n,Set(KEY=CFNAN1)

exten => s,n(doit),GotoIf($["${MACRO_EXTEN:3}" = ""]?turnoff)
exten => s,n,Set(DB(TL/${MYID}/${ARG1})=1)
exten => s,n,Set(DB(TL/${MYID}/${KEY})=${MACRO_EXTEN:3})
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n,Playback(tl/call-fwd-${ARG1})
exten => s,n,Playback(tl/for)
exten => s,n,Playback(tl/extension)
exten => s,n,SayDigits(${MYEXTENSION})
exten => s,n,Playback(tl/is-set-to)
exten => s,n,SayDigits(${MACRO_EXTEN:3})
exten => s,n,Wait(1)
exten => s,n,Hangup

exten => s,n(turnoff),DBdel(TL/${MYID}/${ARG1})
exten => s,n,Answer
exten => s,n,Wait(1)
exten => s,n,Playback(tl/call-fwd-${ARG1})
exten => s,n,Playback(tl/cancelled)
exten => s,n,Wait(1)
exten => s,n,Hangup

[sip]
[efk]
[efklist
efk.efklist.2.mname="ufwd"
efk.efklist.2.status="1"
efk.efklist.2.label="Call Forward Toggle"
efk.efklist.2.action.string="$LViderestilling til...$*74$P1N8$$Tinvite$$Cwaitconnect$$Changup$"
/]
[efkprompt
efk.efkprompt.1.status="1"
efk.efkprompt.1.label="Number: "
efk.efkprompt.1.userfeedback="visible"
efk.efkprompt.1.type="numeric"
/]
[version efk.version="2"/]
[/efk]
[softkeys
softkey.3.label="Forward"
softkey.3.action="!ufwd"
softkey.3.enable="1"
softkey.3.precede="0"
softkey.3.use.idle="1"
softkey.3.use.hold="1"
softkey.feature.forward="0"
/]
[/sip]


Submitted by moshe on Thu, 06/10/2010 Permalink

i have just tried this setup and it is very cool thanks, I'm wondering o if it would be at all possible to see on the phone the state and number of the forward

i will try to add the option to toggle between CFA, CFB and CFNA this is probably doable very easy adding another efkprompt all I'm asking if someone have done it i and could share it, could save me some time

thanks again

Submitted by moshe on Thu, 06/10/2010 Permalink

one more thing (not sure if this the right place) is there a way for the customer to have the option activate and deactivate accept/reject option on a general forward< or using the above script