Symptoms: You may notice that when you try to run the Sync command DirectorySyncClientCmd it doesn’t do anything and just closes right away.
If you open your Event viewer you may notice that you are getting the following event
Failed while Purging Run History
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementScope.InitializeGuts(Object o)
at Microsoft.Azure.ActiveDirectory.Synchronization.DirectorySyncClientCmd.Program.PurgeRunHistory(TimeSpan purgeInterval)
at Microsoft.Azure.ActiveDirectory.Synchronization.Framework.ActionExecutor.Execute(Action action, String description)
at Microsoft.Azure.ActiveDirectory.Synchronization.DirectorySyncClientCmd.Program.Main(String args)
This happens when the WMI object had unregistered itself which might be caused by another tool installed or uninstalled at the time when the problem started to occur.
To resolve the issue, you ‘ll have to run few command lines… each are explained below
mofcomp “D:\Program Files\Microsoft Azure AD Sync\Bin\mmswmi.mof”
As it shows in the command screenshot below the ‘mofcomp’ parses the MMS (FIM) wmi file and goes through the process of adding the classes to the WMI repository.
regsvr32 /s “D:\Program Files\Microsoft Azure AD Sync\Bin\mmswmi.dll”
Registers the WMI mmswmi.dll file to the server.
net stop winmgmt /y
net start winmgmt
net start “IP Helper”
net start “User Access Logging Service”
net start “Microsoft Azure AD Sync”
D:\Program Files\Microsoft Azure AD Sync\Bin\DirectorySyncClientCmd.exe”
In my earliest article about Lync with Asterisk Now (FreePBX) I have written step by step guide on how to integrate Lync and FreePBX but since Skype for Business came out and the new version of Free PBX 13.0.84 I thought it would be good idea to try the integration between both of them ..
In Skype for Business server I am using the latest CU version 6.0.9319.0.
The steps are very similar to the original article except with some UI changes..
In the following article I will be only showing the main steps which I have taken to integrate Skype for Business with FreePBX and will show the steps that have been done on the FreePBX side only not on the Skype for Business server as it is very similar to the original article.
Integration of AsteriskNow (FreePBX 13.0.84) and Skype for Business Server
Creating Trunk for Skype for Business
First I will start by creating a new trunk for S4B and configure it. To configure the trunk (Skype for Business trunk for outgoing calls from Asterisk to S4B)
Click on Connectivity >> Trunks and follow the below screenshots.
Under the SIP settings (Outgoing) tab type the following
In the incoming tab make sure you delete everything and then submit changes
Configure the Trunk with an outbound route
While creating the Outbound route, this route must be associated with the Trunk that I have created earlier in the trunk sequence as in the below screenshot..
In my case the pattern NXXX should be enough as it’ll route the call to my S4B’s 4 extension users (5000)
Click on Connectivity >>> Inbound routes
Click add inbound route
Now the most important is the SIP settings
Configuring Asterisknow to accept TCP calls from S4B
From the Settings menu ->> click on Asterisk SIP settings then choose Chan SIP settings and do the same configuration like the one below
Scroll further down to the “Advanced General Settings”
Enter the two “Other SIP settings” fields below and submit changes.
Conference with 2 Extensions on Asterisk now with s4B
I can call from S4B to Asterisk extensions and vice versa without any issues.