Transfer calls to switchboard for offline users

When a lync user logs off and you have mo exchange mailbox to route the call to what do you do?
I've created a script that can be run in powershell to help you with this.


The script uses sefautil and routes the call to a number (switchboard) after 20 seconds.
The filter can be adapted to select the users you want.
The script also writes the result to a log file.
Note that you first have to set up Sefautil as a trusted application in Lync
Several guides can be found for this with aquick google search.

#################################################################################
#
# A script to enable callforward on multipe users via sefautil.
# Created by Kjetil LindLøkken
# http://drlync.blogspot.no
#################################################################################
$transcriptname = "Callforward_" + (Get-Date `
    -Format s).replace(":","-") +".txt"

Start-Transcript $transcriptname

c:
cd "C:\Program Files\Microsoft Lync Server 2013\ResKit"
$groupmember = Get-CsUser -Filter {LineURI -Like "Tel:+47xxxx*"}
foreach ($member in $groupmember)
{
$user = Get-CsUser -Identity $member.SipAddress
if($user -ne $())
{
.\SEFAUtil.exe /server:lspool2013.customer.com  $member.SipAddress /enablefwdnoanswer /callanswerwaittime:20 /setfwddestination:"+4712345678@customer.com;user=phone"
}
}
Stop-Transcript

Comments

  1. I have discovered this only works in Lync 2010, It does not work in Lync 2013.

    ReplyDelete

Post a Comment

Popular Posts