New Tool: Lync 2013 Call Forwarding Information Tool

So, I was getting tired of sefautil not existing in PowerShell… this isn’t that entirely, but stay tuned.

The purpose of this tool is to give you an easy front end GUI to review your user’s call forwarding settings. Information such as who’s a delegate of who, who’s got simultaneous ring set, who’s forwarding where, etc. can be difficult to retrieve without a utility such as sefautil.  Sefautil in itself can be difficult. This tool allows you to review this information for all users in a pool in a GUI format that’s easily searchable, sortable, and filterable (Out-Gridview). It also allows you to save the information to a CSV file. The information is gathered by parsing data pulled using Export-CSUserData. No SQL calls are made and no data is written back into Lync.

Because this tool uses Export-CSUserData, please be patient during the loading process. If you have difficulty using this utility, first ensure you can run Export-CSUserData successfully. If there is any corrupted user information in a pool, this can cause issues and that corruption will need to be resolved first.

If you would like to see the information in a different format, say a PowerShell command such as Get-CSUserForwardingInfo that can run for a single user or pool for speed, let me know as well. If there’s interest I can write it.  Though it runs fine on Skype for Business, a separate Skype for Business utility will be released as well with additional information related to Call Via Work.

Finally, the question that I imagine will be asked is: If you can pull this data as read-only, why not give the ability to modify and write it back and avoid sefautil all together? The quick answer is: I have another utility for this that I have not yet released, and reading the data is much simpler than writing it. I am still putting it through it’s paces for quality and will decide if it should be released later.

CallForwardInfoScreenshot

 

A quick description of the columns is below:

  • SIP Address:  The Lync account’s sip address.
  • Action: The action to be performed when a call comes in.
  • Applied During Work Hours: True or False based upon  if “During work hours set in Outlook” is set.
  • Forwarding To: Set if call forwarding is enabled.
  • Simultaneous Ring To: Set is simultaneous ring is enabled.
  • No Answer To: If there’s no answer, should voicemail be attempted or a custom number?
  • No Answer In Seconds: How many seconds until voicemail (or “No Answer To” setting) is attempted?
  • Seconds Until Delegate or Group Rings: This is the delay set until other delegates or a team group hear a ring.  This is to allow the recipient to answer the phone first.
  • All Delegates: This is a basic list of all of your delegates.
  • Delegates that Receive Calls: This is a list of the delegates for which the user has set the ability to receive their calls.
  • Team Group: A listing of users in the team-call group

The Action column will show some somewhat cryptic output.  There are a few fields you commonly see in there.  Changing your own forwarding settings and reviewing the output can help you learn what these mean (and help me find any bugs).  In the mean time here are a few to get you started:

  • Column is empty: Call forwarding is not set.
  • enablecf forward_immediate: Call forwarding is set.  Review the Forwarding To column.
  • forward_immediate (without enablecf): Typically forward directly into voicemail.
  • enablecf (no forward_immediate): Typically means a custom forward on no answer exists.  Review the No Answer To column.
  • simultaneous_ring: Simultaneous ring is set up, review the Simultaneous Ring To column.
  • work_hours: “During work hours set in Outlook” is set.
  • delegate_ring forward_audio_app_invites: Simultaneously ring the delegates.
  • delegate_ring forward_audio_app_invites skip_primary: Forward to the delegates.
  • team_ring: Simultaneously ring the team group

If you’re not familiar with Out-GridView, the GUI portion that allows you to sort and filter, it’s simple to use.  Click on a column heading to sort, and to filter, click the Add criteria button and list your settings.  For example, if you wanted to find out every user that had Abraham Lincoln listed as a delegate, you could Add the criteria “All Delegates”, set it to contains, and add a portion of Honest Abe’s SIP address.

CallForwardInfoScreenshot2

To run the tool, just download it from the link below, run it from a Lync Management Shell.  If you have any questions, find any bugs, or anything else, the best place to ask is in the TechNet gallery.  Thank you and I hope you find it useful!

https://gallery.technet.microsoft.com/Lync-2013-Forwarding-80525eb7

41 thoughts on “New Tool: Lync 2013 Call Forwarding Information Tool

  1. Pingback: New Tool: Lync 2013 Call Forwarding Information Tool – Anthony Caragol’s Skype for Business Blog | JC's Blog-O-Gibberish

  2. Pingback: MicrosoftTouch

  3. Sven Pechler

    Wow! Nice trick to retrieve all userdata without SEFAUTIL. However, there seems to be a minor bug in both the 2013 and SfB versions: The “No Answer To” shows the incorrect setting “Attempt Voice Mail” for a lot of users. According to the script you check the client flags for several combinations of “enablecf ..”. This fails for other combinations like “enablecf simulteanous_ring”, “enablecf team_ring”, etcetera. I had to rewrite the script lines to “if ($clientflags.value.Contains(…))” statements to make it work properly.

    1. C. Anthony Caragol Post author

      That’s the major reason there’s not a write-back version available, I’m afraid of little bugs like that. Do you mind sending me steps to reproduce for those so I can fix, I didn’t see how to get enablecf simulteanous_ring populated? Appreciate the heads up!

      1. Robbie

        HI Anthony,

        Can the “Lync 2013 Call Forwarding Information Tool” be used to modify call forwarding also. You mentioned that the new version could have this capability?

        Thank you.

        Robbie

    2. Matthew Collins

      Hi Sven,

      I also came across this problem but have little powershell knowledge, please would you be able to email me your revised code?

      Thanks

      Matt

  4. Adam Tuckwell

    Hi Anthony, great tool and thanks very much. The tool works great on a couple of small SE pools but when I run against large EE pools =36K users i’m hitting issues within PS. “Get-Content : exception of type ‘system.outofmemoryexception’ was thrown. I’ve tried increasing the maxmemorypershellmb in PS but hasn’t made a difference. Do you have any advice?

    1. C. Anthony Caragol Post author

      If you run Export-CsUserData against your pool, can you export all of the data to a file without an issue? It might be the array I’m loading up to export. I might have to work around that.

      1. Adam Tuckwell

        Hi Anthony, apologies for the delay. Yes an export-csuserdata works perfectly. The DocItemSet.xml is coming out at around 1.2GB.

        1. C. Anthony Caragol Post author

          Ouch… I see the issue. I’ve run it with a large pool (25k users), but not with a DocItemSet.xml quite that large. I’ll have to change the way I load the XML data. Apologies, it might take me a while to get to that update.

  5. Jung Drinkwater

    Just general question on SEFAUtil tool. Can you tell me if I can run sefautil.exe from remote shell? Or it has to be from the FE server. I tried it from the remote shell but no changes are done on the server.
    Thanks!

    1. C. Anthony Caragol Post author

      Sort of, i’s not a PowerShell utility, but rather an executable. If you can get a remote session to execute it that way it should work.

  6. Jung Drinkwater

    I would like to run this command from the remote shell but I can’t. Can I do that?
    Export-CsUserData -PoolFqdn “oaktechse.oaktech.com” -FileName “C:\Logs\ExportedUserData.zip”

    I am getting the following error.
    Cannot find a provider with the name ‘Microsoft.PowerShell.Core\FileSystem’.
    + CategoryInfo : ObjectNotFound: (Microsoft.PowerShell.Core\FileSystem:String) [Export-CsUserData], Provi
    derNotFoundException
    + FullyQualifiedErrorId : ProviderNotFound,Microsoft.Rtc.Management.BlobStore.ExportOcsUserStoreDataCmdlet
    + PSComputerName : oaktechse

    1. C. Anthony Caragol Post author

      Depending on the size I like to run these locally anyway. Have you attempted to install the Admin tools on the system you’re trying to run this from? It might be easier.

      1. Jung Drinkwater

        I need to run this from remote shell that is the problem. I am running remote shell from my pc not lync server. What do you mean by installing the admin tools?

        Thanks!

        1. C. Anthony Caragol Post author

          What I mean is, if you run the Deployment Tools from the Lync/Skype installation media, there’s an “Install Administrative Tools” option on the right. That should get you a management shell and the appropriate modules on your PC. Wondering if that would work for you.

  7. Jung Drinkwater

    Hi Anthony,

    I am just trying to read the call forwarding information from the DocItemSet.xml file. When I add any call forwarding, the information shows up in the following containers. 0,100,200,300 and 400. Since the contains 0 is Self container, can I assume just use the data from container 0?
    If not which container do I need to read for the call forwarding information?

    Thanks!

  8. Amrelmorsy

    Hello Anthony

    Nice work, I saw it after I developed the below code, I am working with Large Accounts as well, so I always rely on the Command Line and directed checks, not the overall checks, I never used your method to approach this to be honest, and I had to develop this code to check for a reported incident with one of my customers. Have a look on the code and I hope it can help you develop, for me it works pretty fast, but again I am only investigating direct reported incidents

    https://gallery.technet.microsoft.com/MS-Lync-User-Routing-e4ed3d9c

    1. C. Anthony Caragol Post author

      Looks like nice code, I will keep it handy :). I avoided the direct SQL method to do a massive dump all at once and have a separate tool to push the data back in. That said, so much of this is moot soon as Matt Landis is writing his SefaUtil replacement utility which is much faster and has a PowerShell module. 🙂 I saw a demo of it at the MVP Summit, it looks really nice and can a lot more than modify forwarding info quickly.

  9. Domien De Cleyn

    Nice script, I’m using it to export all info and re-import it by using SefaUtil while moving users back to Lync 2013 from Skype for Business. I noticed that the CSV file has a typo: simutaneous ring instead of simuLtaneous ring 😀

    Thanks for sharing!

    Domien

  10. Sufian

    Hello Anthony,
    Great works, is there possibility to query for a single user? To get information for a single user out of 30K user is too much.

    1. C. Anthony Caragol Post author

      Actually… yeah that wouldn’t be too hard. It’s just a filter on the export-csuserdata command in the script. I’ll add that to the to-do list.

      1. Christoffer

        I am also looking for information for a single user! So i can just type in the sip-address and get the correct forwarding-info.
        By the way, great script!
        Very useful!

        Chris

      2. Sufian

        Hi Anthony,
        Is there any update on the codes for single user? Looking forward to hear the updates from you!

  11. Vincent Stessels

    Anthony, the script does what it is intended to do. Matt Landis’ Sefautil Server is out which is really powerful but doesn’t have the nice GUI you provide with your script. Planning on redesigning your script to combine the best of both worlds?

    Kind regards,
    Vincent

    1. C. Anthony Caragol Post author

      Maybe… I assumed someone else would jump on this, but as I do this for fun I might just tackle it.

  12. Joel C

    Where does Lync write this data back when call forwarding ro sim ring is turned on, either in the client or on a desk phone?

    I ask because I have a weird bug with Lync that setting this works, but, some time passes by and here’s what happens

    when sim ring is on and the call rings once on the sim ring device (cell phone) and then goes to “dead air”? The lync client setting is set to the default go to voicemail after 20 seconds, but if changing to 40 seconds (30-35 seconds does not work either) the call completes ringing out and I get the voicemail on the sim ring device.

    I’m wondering if I have a bug in the SQL somewhere because the devices that are signed into pick up the sim ring or call forwarding settings, but then this happens.

    Thanks in advance!

    1. C. Anthony Caragol Post author

      I’d post this one to the TechNet forums… See if you can get some more eyes on it.

  13. Lars

    Great info and utility Anthony, thanks,

    work_hours: “During work hours set in Outlook” is set.

    This is quite an interesting one, I am struggling finding a way to programmatically change “During work hours set in Outlook” vs “all the time” for a group of users. Doesn’t seem it can be done with SEFAutil or couldn’t find a way. Care to share how you extract such piece of info and how that could be used to automate configuration for users? Much appreciated.

  14. Kevin

    This is really great but I also have problem with the call Forward and Simultaneous ring fields.
    Can you send me the updated program?

  15. Michele Yanes

    Hi Anthony, I am an Exec Admin. I set up meetings via outlook calendar as a delegate. I would like to add call forwarding to my skype for bus client on the behalf of my boss. How can I download the “call forwarding” feature. I am not a techie so please use “download for dummies” terminology. Thanks

  16. Tim VC

    I am working for a lawyers firm where we have tons of overflow settings.
    To check if overflow settings are still correct, this tool is great!

    Only 1 problem
    As soon as someone has a delegate, it doesn’t show the correct No Answer To anymore.
    Everyone with a delegate is shown as No Answer to “Attempt Voicemail”
    even though the settings are when verified on the Skype account “sip:………@….”

    Any idea why or how to solve it?
    We suspect a problem with SEFAUTIL more then your script?

    Tim.

  17. Lee

    Anthony,
    I’ve run into one issue on the script. When you build the Global:LyncforwardingInfoArray, you assume a Category Name of Routing and an Instance number of zero. I’ve run into a lot of cases here where the data has no instance zero, but does have an instance 1 or higher. In my data, it’s left a fair number of results missing from the output.
    Lee

Comments are closed.