Category Archives: VOIP

Lync 2013 to Skype for Business in-place upgrade with Monitoring database

This article guides you through the steps of doing an in-place upgrade from Lync 2013 to Skype for business. I am copying the article as is from my lab with all the errors that I have been through to give you a real experience feed back of what is this like.

You might get issues that you have never expected, but resolving them is not that hard and if you have any issues please don’t hesitate to leave a comment and I will get back to help you.

Prerequisites

Extensible Chat Communication Over SIP protocol (XCCOS)

From <https://technet.microsoft.com/en-us/library/dn951390.aspx>

References:

https://technet.microsoft.com/en-us/library/dn951371.aspx?f=255&MSPPError=-2147217396

https://technet.microsoft.com/en-us/library/dn933900.aspx

Lync CU 5

https://www.microsoft.com/en-us/download/details.aspx?id=36820

Kb2533623 Windows Server 2008 R2

http://support.microsoft.com/kb/2533623

Kb2858668 Windows Server 2012

http://support.microsoft.com/kb/2858668

KB2982006 Windows Server 2012 R2

https://onedrive.live.com/redir?resid=82488EABA4ACDB15!38654&authkey=!AE9IJKbMPtkge8U&ithint=file%2cexe

SQL 2012 SP2 for Express version

https://www.microsoft.com/en-us/download/details.aspx?id=43351

clip_image001

First Issue:

Upon running the setup I have got the following error:

Prerequisite not satisfied: Internet Information Services (IIS) must be installed before attempting to install this product.

Prerequisite not satisfied: The following Internet Information Services (IIS) role services must be installed before attempting to install this product: Static Content, Default Document, HTTP Errors, ASP.NET, .NET Extensibility, Internet Server API (ISAPI) Extensions, ISAPI Filters, HTTP Logging, Logging Tools, Tracing, Client Certificate Mapping Authentication, Windows Authentication, Request Filtering, Static Content Compression, Dynamic Content Compression, IIS Management Console, IIS Management Scripts and Tools

Prerequisite not satisfied: Before you install Skype for Business Server 2015, you must install an update for Windows Server 2012 R2. For details about the update, see Microsoft Knowledge Base article 2982006, “IIS crashes occasionally when a request is sent to a default document in Windows 8.1 or Windows Server 2012 R2” at http://go.microsoft.com/fwlink/?LinkId=519376

Prerequisite not satisfied: Before you install Skype for Business Server 2015, you must install Microsoft ASP.NET 4.5 by using the Add Roles and Features Wizard in Windows Server 2012 Server Manager. Install the ASP.NET 4.5 role service of the Web Server (IIS) role.

Prerequisite not satisfied: Before you install Skype for Business Server 2015, you must install Microsoft Windows Communication Foundation Activation by using the Add Roles and Features Wizard in Windows Server 2012 Server Manager. Install WCF Services and HTTP Activation, which are included with the Microsoft .NET Framework 4.5 feature.

http://go.microsoft.com/fwlink/?LinkId=519376

Powershell

$PSVersionTable

clip_image002

I will re-run prerequisites to make sure that all are satisfied before running setup again.

STEP 1 : Installing Prerequisites

Add-WindowsFeature NET-Framework-Core, RSAT-ADDS, Windows-Identity-Foundation, Web-Server, Web-Static-Content, Web-Default-Doc, Web-Http-Errors, Web-Dir-Browsing, Web-Asp-Net, Web-Net-Ext, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Http-Logging, Web-Log-Libraries, Web-Request-Monitor, Web-Http-Tracing, Web-Basic-Auth, Web-Windows-Auth, Web-Client-Auth, Web-Filtering, Web-Stat-Compression, Web-Dyn-Compression, NET-WCF-HTTP-Activation45, Web-Asp-Net45, Web-Mgmt-Tools, Web-Scripting-Tools, Web-Mgmt-Compat, Server-Media-Foundation, BITS, Desktop-Experience, Telnet-Client

https://docs.microsoft.com/en-us/skypeforbusiness/plan-your-deployment/requirements-for-your-environment/server-requirements

Updated aug-2018

clip_image003

clip_image004

STEP 2: Installing CU5

Download and install CU5

https://www.microsoft.com/en-us/download/details.aspx?id=36820

clip_image005

clip_image006

After the restart we will apply the update of the databases which in my case is going to be the FQDN of the FE server since it’s standard version and not Backend server.

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn lyncfe01.adeo.local -Verbose

clip_image007

clip_image007[1]

Time to upgrade the Archiving/Monitoring databases.

To upgrade we’ll use the same command except change the FQDN of the SQL server to the SQL server where Monitoring and Archiving databases are at.

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn sql01.adeo.local -Verbose

clip_image008

clip_image009

clip_image010

Applying CMS upgrade

clip_image011

Install-CsDatabase -CentralmanagementDatabase -SqlServerFqdn Lyncfe01.adeo.local -SqlInstanceName rtc -verbose

clip_image012

clip_image013

Then run enable-cstopology

Last thing in the CU5 update is

%ProgramFiles%\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe

clip_image014

clip_image015

https://support.microsoft.com/en-us/kb/2809243

Step 3 : Installing Windows OS hotfix.

KB2982006 Windows Server 2012 R2

Since the FE is on Windows Server 2012 R2 then we’ll need to download this link

https://onedrive.live.com/redir?resid=82488EABA4ACDB15!38654&authkey=!AE9IJKbMPtkge8U&ithint=file%2cexe

RESTART is Required

clip_image016

STEP 4 : Install SQL Service Pack 2 (Express) for your Lync Front end Standard Edition

First Download SQL Express SP2 setup

clip_image017

You can patch the server by opening a Lync Management Shell window and entering the following commands:


Stop-CsWindowsService

.\SQLEXPR_x64_ENU.exe /ACTION=Patch /allinstances /IAcceptSQLServerLicenseTerms

clip_image018

clip_image019

clip_image020

clip_image021

clip_image022

clip_image023

clip_image024

clip_image025

Step 5: SQL Server (Standard or Enterprise) for (Monitoring, Archiving)

https://support.microsoft.com/en-us/kb/321185

clip_image026

My SQL Server version is SP1 so I don’t need to upgrade it to SP2

clip_image027

Step 6- In-place Upgrade for Skype For Business

In order to do the in-place upgrade, we’ll need to use a machine that doesn’t have Lync 2013 to install the new Topology builder and do the upgrade process

On a different Machine that’s joined to the same domain, I will run the prerequisites script and restart the machine. then I’ll load the Skype for business ISO and install

clip_image028

D:\Setup\amd64\Setup.exe

clip_image029

clip_image030

clip_image031

clip_image032

We’ll now press on Installing Administrative tools

clip_image033

clip_image034

clip_image035

Now in order to continue we’ll have to open the topology builder in order to upgrade our Lync 2013 topology

I’ll open the topology builder and save the topology file somewhere

clip_image036

Once the topology is open, I’ll navigate to the Standard FE Servers and right click on my main server to upgrade

clip_image037

clip_image038

I’ll click on Upgrade to Skype for Business Server 2015…

clip_image039

As soon as you press Yes, the Frontend server that you selected will be moved under the Skype For Business Server 2015 tab as you can see below.

clip_image040

Since I have two FE servers (FE and SBS) I will be upgrading them both but not in the same time not not fall into any errors, so I will publish the topology and see what happens.

clip_image041

clip_image042

We’ll check what do we need to do now in order to upgrade the servers, here is what we’ll do.

Import existing normalization rules from the previous Skype for Business Server deployment. If you want to keep your existing normalization rules you will need to import them using the Import-CsCompanyPhoneNormalizationRules cmdlet. If you have separate normalization rules for each pool then you will need to run the command for each set.

To perform an in-place upgrade of your Skype for Business Server, you’ll need to do the following, in order:

(1) Stop the Skype for Business services on all of the servers that you are upgrading;

(2) Run Skype for Business Server setup (Setup.exe) on all of the servers you are upgrading;

(3) Start the Skype for Business services on all of the servers you upgraded. To start the services in a Front End pool, connect to one of the servers in the pool and run the Start-CsPool cmdlet. All the servers in the pool should be running Skype for Business Server before you use the Start-CsPool cmdlet. To start the services in all other pools (e.g. Edge pool, Mediation pool), run the Start-CsWindowsService cmdlet on every server in the pool;

Server FQDN: lyncfe01.adeo.local, Pool FQDN: lyncfe01.adeo.local

On Lync FE 01 I’ll stop all the services using Stop-cswindowsservice

clip_image043

Now on the same server I’ll load the Skype4B ISO and start the setup

D:\Setup\amd64\Setup.exe

clip_image029[1]

clip_image030[1]

clip_image031[1]

Started at 1:40pm

clip_image044

clip_image045

clip_image046

clip_image047

clip_image048

clip_image049

NOTE:

The required time for the upgrade process is estimated around 75-90 Minutes for each FE Server.

clip_image050

clip_image051

Starting ‘Verifying upgrade readiness…’

‘Verifying upgrade readiness…’ completed successfully

Starting ‘Installing missing prerequisites…’

‘Installing missing prerequisites…’ completed successfully

Starting ‘Uninstalling roles…’

‘Uninstalling roles…’ completed successfully

Starting ‘Detaching database…’

‘Detaching database…’ completed successfully

Starting ‘Uninstalling local management services…’

‘Uninstalling local management services…’ completed successfully

Starting ‘Installing and configuring core components…’

‘Installing and configuring core components…’ completed successfully

Starting ‘Installing administrative tools…’

‘Installing administrative tools…’ completed successfully

Starting ‘Installing local management services…’

‘Installing local management services…’ completed successfully

Starting ‘Attaching database…’

‘Attaching database…’ completed successfully

Starting ‘Upgrading database…’

‘Upgrading database…’ completed successfully

Starting ‘Enabling replica…’

‘Enabling replica…’ completed successfully

Starting ‘Installing roles…’

‘Installing roles…’ completed successfully

Starting ‘Verifying installation…’

‘Verifying installation…’ completed successfully

clip_image052

Upgrade the SBS (Survivable Branch Server) in the pool to Skype4B

clip_image053

clip_image054

Publish the topology

clip_image055

I’ll stop the service before I start the upgrade process.

clip_image056

I’ll load the ISO on the second server and start the upgrade.

D:\Setup\amd64\Setup.exe

clip_image029[2]

clip_image030[2]

clip_image031[2]

clip_image057

Apparently I forgot to update Lync to the latest CU

clip_image058

clip_image059

clip_image060

clip_image061

Resetting Root Password for FreePBX 14.0.5.1–Sangoma Linux 7

Many people have been through this same problem either due to forgetting the root password, typing it wrong or due to console language conversion issue.

Mine was due to using a remote console which didn’t translate my keyboard properly and caused a wrong password.

So I ended up having access to the GUI screen but not the root. So first thing came to my mind is should I reformat the machine and reinstall it since it doesn’t take long time? but no I like challenges and started digging into how do I reset the password.

Since I do still have the access to console I can try from the Kernel, the default ISO install FreePBX with Sangoma 7 Distro which is based on Centos Kernel 3.10.0-862.2.2.3 el7.x86_64.

So I first attempt I tried was following the same method of resetting root password on Centos through Kernel.

1- Restarting the machine to get into Kernel:

When Restarting Press E to edit the Kernel

image

Once pressed E you will get this screen:

image

2- Edit the Kernel:

Scroll down until you find “rhgb quiet” and replace it with “init=/bin/bash” without quotes.

image

So eventually it’ll look like this

image

3- Resetting Root Password:

Once it’s changed, press ctrl-X to initiate the process of resetting the root password:

You will get Bash cmd prompt, Type the following commands

A- First to check the status of root partition by running following command on the single user mode.

Mount | grep root

In this distro of Linux you might not get anything but normally you should get partition details.

B- To make the partition writable, you’ll have to type in the following command

mount -o remount,rw /

C- To Change the root password type

passwd root

Type your new password and you’ll get a message that all authentication tokens updated successfully

clip_image001

After this restart and try to login, and you’ll see that it works fine

clip_image001[4]

Result:

After restarting the machine, I tried to get into web GUI to start configuring the FreePBX but I received the following error:

Whoops\Exception\ErrorException (E_ERROR)

Class ‘PicoFeed\Reader\Reader’ not found

After doing some research it was obviously an error related to a recent update pushed by FreePBX

clip_image001[6]

Solution:

and the solution was running this cmd

fwconsole ma upgrade dashboard –edge

clip_image001[8]
image
Winking smile

Hope someone would find this useful 

Enabling E5 users on-cloud and calling from/to between IP/PBX users–Part 4





In hybrid scenario you might want to use PBX Online or/and use your existing on-premises PBX. Sometimes the regulation in your country is strict toward the VoIP traffic and that it can’t be used on-cloud and for this type of scenarios you’ll want to deploy the Hybrid topology and route all your VoIP traffic for online users toward your on-premises PBX ..

This can be easily managed with Skype for Business/Online and with few powershell commands you can control the call flow.

clip_image001
clip_image002
clip_image003
clip_image004
clip_image005
clip_image006
clip_image007









Skype 4 Business Edge and Hybrid Configuration–Part 2





    Configuring Edge Server

    Edge prerequisites

    Install Prerequisites

    • Microsoft .Net Framework 3.5, HTTP Activation, Windows Identity foundation, Telnet Client.

    Add-WindowsFeature NET-Framework-Core, NET-Framework-45-Core, NET-Framework-45-ASPNET,  Web-Net-Ext45, NET-WCF-HTTP-Activation45, Windows-Identity-Foundation, Telnet-Client -Source X:\sources\sxs

    Setup NETBIOS

    In order to configure Skype 4 Business Edge, we’ll have to change the Netbios to give it the name of our Domain but we won’t join it to the domain.

    clip_image001

    clip_image002

    Setup NICs

    Edge Server must have 2 NICs, one Local NIC will point out to the Front end server but must not have Default gateway so traffic can only flow through the DMZ out to the internet and back in. but still it must be able to ping to the FE from Edge and vice versa.

    DMZ network can have 1 DMZ address (Public Address to be NATTED to) or 3 DMZ addresses for public IP addresses with standard HTTPS ports.

    clip_image003

    clip_image004

    Configure Hostnames

    Edit the Edge server’s host file to include Lync FE and DC’s IP addresses and Hostname

    clip_image005

    clip_image006

    Now I will go back to Skype for Business FE server, I’ll launch the topology builder and add new Edge server

    I will add the first Edge pool which contains of a single Edge server

    clip_image007

    Next, you will have to choose if you want to enable federation with partners or other service providers …e.g. (Google)

    clip_image008

    I am intending to use a single Public IP address with a different ports (nonstandard) since this is a lab. For production it’s recommended to use 3 public IP addresses for Access Edge, AV and WebConf services.

    clip_image009

    Next I will choose the last option which says that the Edge pool is translated by NAT. I will configure my firewall to NAT ports to the Edge’s DMZ IP addresses from the Public so I am choosing this option.

    clip_image010

    clip_image011

    This is the FQDN’s the default configuration .. It’ll only use a single FQDN for all services if you’re going to use a single public IP address with a different ports.

    IMPORTANT NOTE

    When you use a single IP address with a different ports, the Access Edge port will normally change to 5061 (Not 443 like in the _sip._tls.domain.com) SRV record which will cause failure if you forgot to change this port to match the one in your Topology’s Access Edge settings.

    Next I’ll have to enter my Edge server’s Local IP address.

    clip_image012

    clip_image013

    Next I will be asked to enter the DMZ’s IP address which the wizard calls (Private External IP address)

    clip_image014

    Here I am going to place the NAT IP address which is my Public IP address.

    clip_image015

    Next I’ll have to choose which Lync FE pool will be used as the next hop to the Edge pool. In this case I’ll be choosing my main pool since the second is only for resilience purpose.

    clip_image016

    Then I’ll associate the mediation pool for Edge server for external media traffic. I can assign both in this case.

    clip_image017

    Now I’ll click on Finish and right click on the Site name’s properties to enable the SIP federation and XMPP federation then Publish the topology.

    clip_image018

    clip_image019

    clip_image020

    clip_image021

    Now I will setup Azure Active Directory Sync on my DC server in order to sync the required users for the test purpose.

    My domain is adeo.local so I want to change the UPN for users to match the synced domain. (Adeo-office365.ga) and moh10ly.com

    clip_image022

    Installing Azure Active Directory Sync

    Now I will install the prerequisites which consist of the following

    clip_image023

    Net framework 4.5.2 is required for AADS but it’s already installed on my server

    clip_image024

    Next I will install Microsoft Online Service Sign in assistant

    clip_image025

    Next I will install Azure AD Module

    clip_image026

    Finally Azure AD Sync

    clip_image027

    Before moving forward, I’ll have to go to the Office 365 portal and activate DirSync

    clip_image028

    Then use a global admin credentials from O365.

    clip_image029

    Adding the forest using an enterprise admin user account

    clip_image030

    clip_image031

    Due to the fact that my domain adeo-office365.ga’s public dns host doesn’t have SRV configuration because it’s hosted by the famous free domain service (Freenom) so I’ll have to add my original domain moh10ly.com as Lync (S4B) requires SRV records to point to the on-premises lync.

    clip_image032

    clip_image033

    clip_image034

    clip_image035

    clip_image036

    I will only sync one OU, so I will untick the Sync now box and click on Finish

    clip_image037

    I will go to the following path

    “C:\Program Files\Microsoft Azure AD Sync\UIShell” and create a shortcut for the GUI application of AADS on the desktop

    “C:\Program Files\Microsoft Azure AD Sync\UIShell\miisclient.exe”

    clip_image038

    To get this GUI app to work, you will have to sign out of your account and sign back in as your username will be added to the local administrators and have the authority to open it

    Log off, log back in

    clip_image039

    Next I will go to the connectors tab and double click on the ADDS connector (Adeo.local)

    clip_image040

    I will go to the Configure Directory Partitions and under Credentials I’ll choose “Alternate credentials for this directory partition” then enter my on-premises AD Enterprise admin credentials

    clip_image041

    I’ll click on Containers

    clip_image042

    I’ll untick the DC=Adeo,Dc=Local box and only choose Dirsync OU then click OK and apply

    clip_image043

    Before I start syncing my AD , I will go to Skype for Business Server and add my domain moh10ly.com as a SIP domain

    clip_image044

    Next I am going to change the FQDN of the SIP access edge for public domain to moh10ly.com and the default port for the Access Edge to 443 and publish the topology

    clip_image045

    clip_image046

    I needed to finally check if all my FE servers are replicating. So then I can move to Edge server to install Lync components

    clip_image047

    On the Edge server, I’ll use ISO for Skype 4 business to install the setup

    clip_image048

    clip_image049

    First thing I’ll install the local Configuration Store

    I’ll click on Run and then I’ll be asked to import the configuration file which I’ll must export from Lync FE (Skype 4 b FE) server

    clip_image050

    In this case, I’ll go to Lync FE and open Lync Management shell and enter the following Cmdlet

    Export-CsConfiguration -FileName c:\top.zip

    clip_image051

    This cmdlet will export a file to the root C drive . I’ll copy this file to the edge server.

    clip_image052

    I’ll click next to continue, this should start installing the local store

    clip_image053

    clip_image054

    clip_image055

    Next I’ll request a certificate for Internal NIC For edge server

    clip_image056

    clip_image057

    clip_image058

    I’ll take the CSR (Certificate sign request) code and get a certificate from my local CA

    clip_image059

    I’ll open MMC and add Certificates console and import the PKCS certificate

    clip_image060

    clip_image061

    After importing the certificate I’ll assign it to the internal NIC by clicking on Assign to the Edge Internal

    clip_image062

    clip_image063

    clip_image064

    clip_image065

    Once we assign the certfiicate to the internal edge. The replication service for Edge and FE will start working

    clip_image066

    Now I’ll import my Public Certificate to Edge Server’s DMZ NIC

    I already imported my public certificate, now I’ll go to the S4B wizard and assign it there

    clip_image067

    clip_image068

    Unlike IN lync 2013 when you Click on Start service in the Wizard all services start on their own but on Skype for business you ‘ll have to start the services manually by yourself.

    clip_image069

    So Instead I used the service console to start the services.

    Now I’ll go back to the FE And enable remote connectivity to Skype for Business from outside and make sure that replication works fine by checking the Topology or from cmdlet

    clip_image070

    clip_image071

    clip_image072

    clip_image073

    Setting up Hybrid integration with Skype online for Business (O365)

    NOTE:

    In order for Skype for Business Hybrid configuration to work successfully for users homed on cloud and on-prem .. Users must be created first on-premises, enabled on Skype for Business on-premises and from the Skype for Business on-prem Control panel moved to Office 365 Skype for Business online.

    Otherwise users will not be able to see each other’s presence information due to missing attributes if users were to be created directly online or on Active Directory and not enabled on-premises first.

    https://technet.microsoft.com/en-us/library/jj205126.aspx

    https://technet.microsoft.com/en-us/library/jj204669.aspx

    In order to allow Hybrid environment to function properly, we’ll have to federate our Skype for Business on-premises’s Edge server as microsoft says below

    Federation allows users in your on-premises deployment to communicate with Office 365 users in your organization. To configure federation, run the following cmdlets in the Skype for Business Server Management Shell:

    From <https://technet.microsoft.com/en-us/library/jj205126.aspx>

    On the front end server, we’ll run the following CMDlet

    Set-CSAccessEdgeConfiguration -AllowOutsideUsers 1 -AllowFederatedUsers 1 -UseDnsSrvRouting -EnablePartnerDiscovery $true

    clip_image074

    Next cmdlet will create a new public federated provider for skype for business online.. However it already exists so we must delete it from control panel or the cmdlet will fail with the following message

    New-CsHostingProvider -Identity SkypeforBusinessOnline -ProxyFqdn “sipfed.online.lync.com” -Enabled $true -EnabledSharedAddressSpace $True -HostsOCSUsers $True -VerificationLevel UseSourceVerification -IsLocal $false -AutodiscoverUrl https://webdir.online.lync.com/Autodiscover/Autodiscoverservice.svc/root

    clip_image075

    I’ll delete the hosted provider “Skype for Business Online”

    clip_image076

    I’ll try the cmdlet again after deleting the provider ..

    New-CSHostingProvider -Identity SkypeforBusinessOnline -ProxyFqdn “sipfed.online.lync.com” -Enabled $true -EnabledSharedAddressSpace $true -HostsOCSUsers $true -VerificationLevel UseSourceVerification -IsLocal $false -AutodiscoverUrl https://webdir.online.lync.com/Autodiscover/AutodiscoverService.svc/root

    clip_image077

    Since it worked already, I will go back to the control panel and make sure it is enabled

    clip_image078

    Next is : Configure your Skype for Business Online tenant for a shared SIP address space

    Note:

    To configure a shared SIP address space, establish a remote PowerShell session with Skype for Business Online, and then run the following cmdlet:

    We’ll have to download skype for business online powershell

    https://onedrive.live.com/redir?resid=82488EABA4ACDB15!38849&authkey=!AKW6Ln4Rkn6QuUI&ithint=file{308b10a016e19a1cd6a208cbc3961927e16fc6766a4020d3c4ef54ea17925f0f}2cexe

    After launching the PowerShell module as an administrator I’ll run the following cmdlet

    clip_image079 (Connect to Skype for Business online (Lync Online) Powershell)

    Import-Module SkypeOnlineConnector

    clip_image080

    Now I’ll connect to my Office 365 tenant

    clip_image081

    $cred = Get-Credential

    $CSSession = New-CsOnlineSession -Credential $cred

    Import-PSSession $CSSession -AllowClobber

    clip_image082

    Now I’ll configure the shared sip address

    Set-CsTenantFederationConfiguration -SharedSipAddressSpace $true

    From <https://technet.microsoft.com/en-us/library/jj205126.aspx>

    clip_image083

    To double check my configuration I will see if the SharedSipAddresSpace is enabled or not

    Get-CsTenantFederationConfiguration

    clip_image084

    To double check that the hybrid configuration is setup properly we can use the Skype for business on-premises Hybrid UI wizard from the Home Menu under “Connection to Skype for Business Online”

    clip_image085

    Using the Skype for Business 2015 User interface to setup Hybrid configuration:

    After you sign in it does automatically logs you in and configure the three following options

    1. Federation for the Edge server
    2. Federation with Office 365.
    3. Shared SIP address space.

    clip_image086

    clip_image087

    Now I will configure my DNS Settings as recommended by Microsoft for the Hybrid Integration scenario

    DNS Settings

    When creating DNS SRV records for hybrid deployments, the records, _sipfederationtls._tcp.<domain> and _sip._tls.<domain>, should point to the on-premises Access Proxy.

    From <https://technet.microsoft.com/en-us/library/jj205403.aspx>

    1. Update some DNS records to direct all SIP traffic to Skype for Business on-premises:
    • Update the lyncdiscover.contoso.com A record to point to the FQDN of the on-premises reverse proxy server.
    • Update the _sip._tls.contoso.com SRV record to resolve to the public IP or VIP address of the Access Edge service of Skype for Business on-premises.
    • Update the _sipfederationtls._tcp.contoso.com SRV record to resolve to the public IP or VIP address of the Access Edge service of Skype for Business on-premises.
    • If your organization uses split DNS (sometimes called “split-brain DNS”), make sure that users resolving names through the internal DNS zone are directed to the Front End Pool.

    From <https://support.office.com/en-us/article/Configure-Skype-for-Business-Server-2015-Hybrid-b06ee805-4349-4519-82fb-b06ed57c0bd0>

    According to Microsoft’s configuration of the Public DNS, you will have to configure only the SRV records to point to your edge server however, running a simple wireshark on your Skype for business client machine you can notice the following:

    clip_image088

    Microsoft Lync / Skype client first requires the Lyncdiscover / Lyncdiscoverinternal record in order to see where the user is located… then gets redirected to webdir.online.lync.com which is the Cname value to the Lyncdiscover Cname in the public DNS and tries to login the user through Login.microsoftonline.com then finds no user there and logs in using the SRV eventually in the end as in the below snapshot which I’ve used Wireshark for to monitor the DNS traffic that the Lync Client requests upon login request.

    clip_image089

    NOTE:

    What have me confused here is that Microsoft says only SRV records must be pointing to your On-premises Lync/Skype for Business Edge server.. So you must enter something else other than SIP.domain.com (Which in normal cases might be the common name of your Edge certificate) for the value of the SRV Record since the SIP.domain.com and Lyncdiscover.domain.com must be pointing to Office 365.

    I tried using the Public IP address of my Edge server just to check if my on-premises user will connect without any issue however I did have an issue with the Certificate saying “There was a problem verifying the certificate from the server”.

    clip_image090

    Luckily the Public certificate that I had on my edge server had multiple SANs (Subject Alternative Names) and one of them was WAC.moh10ly.com which I was intending to use for the WAC Server (Office Web Apps Server) and then I created an A record on my public DNS WAC.moh10ly.com that points to my Edge server’s Public IP address…. although the Wac.moh10ly.com is not a common name but it worked and I was able to federate with Office 365 users and was able to move users from on-premises to office 365 and back to on-premises as demonstrated later in the article.

    “When creating DNS SRV records for hybrid deployments, the records, _sipfederationtls._tcp.<domain> and _sip._tls.<domain>, should point to the on-premises Access Proxy.”

    From <https://support.office.com/en-us/article/Configure-Skype-for-Business-Server-2015-Hybrid-b06ee805-4349-4519-82fb-b06ed57c0bd0>

    clip_image091

    Now I have changed all the SRV records to direct to the new A record

    clip_image092

    And finally deleted the A sip record and created a new CNAME record that points to sipdir.online.lync.com

    clip_image093

    clip_image094

    I have already a user synced from my local AD to the cloud (office 365) that’s not enabled for Skype for business on-premises .. Once this user is synced and have been assigned a license it should be directly enabled for Skype for Business Online and I should be able to sign in to it without any issue.

    Note:

    In order for both users (homed online and On-premises) to see eachother’s presence the synced user must be enabled on the On-premises Server before moved to the cloud or else the presence and M will fail.

    Time to test, I was able to sign in to the Online homed user (admin) and now I’ll be adding the on-premises homed user to the list to check the presence, IM ..etc

    clip_image095

    Here I added the user admin to my other account Mohammed.hamada and vice versa.

    clip_image096

    The Presence appears to be working fine for user homed on-premises as it shows when I changed it to “busy, be right back..etc” on the cloud user’s Client however the Office 365 homed user’s presence takes time to change on the on-premises user’s list and the IM doesn’t seem to work properly as messages sometimes doesn’t go through and fail.

    Sending a message from the on-premises User (Mohammed Hamada) to (ADMIN)

    clip_image097

    Now sending an IM from Admin to Mohammed Hamada

    clip_image098

    To make sure that the issue is not within my on-premises server, I will use a different Skype for Business online account and see if IM work both ways.

    This is my other user.. The presence information seems to work properly and now I’ll test the IM

    clip_image099

    IM between my On-premises and another user on another Office 365 tenant seems to be working fine back and forth as in the below snapshots so the issue might be related to Office 365 tenant which I am using for this test (could be related to trial version)

    I am going to open a case with MS and see why this issue happens since my on-premises work fine with other tenants.

    clip_image100

    clip_image101

    Now It’s time to move users from and to cloud and on-premises to check how easy, flexible or hard this process is.

    I currently have 2 users, one on cloud and one synced and homed online (Office365)

    clip_image102

    In order to move users, you can go to Users tab after the hybrid config is finished and find the user you want to move then click on Actions and chose to move the users to the Skype for Business Online as in the below snapshot

    Note:

    Before you move the user to Office 365, you must assign license to the user or else the move will fail.

    clip_image103

    clip_image104

    clip_image105

    clip_image106

    clip_image107

    You can move the user back from Office 365 to your on-premises Skype for Business server with the same process exactly except that you’ll have to choose which pool you need to move the user to.

    Checking where the user is hosted from Skype for business Management shell

    The Hosting Provider will show you where the user is working from now.

    clip_image108

    clip_image109

    clip_image110

    Hope this has been helpful

    References:

    https://technet.microsoft.com/en-us/library/jj204967.aspx

    https://technet.microsoft.com/en-us/library/jj205403.aspx

    https://technet.microsoft.com/en-us/library/jj205126.aspx

    https://technet.microsoft.com/en-us/library/jj204669.aspx

    https://support.office.com/en-us/article/Configure-Skype-for-Business-Server-2015-Hybrid-b06ee805-4349-4519-82fb-b06ed57c0bd0

    https://channel9.msdn.com/Events/Ignite/2015/BRK4129









Install Frontend Skype for Business 2015–Part 1





Install prerequisites

Frontend/Standard edition as well

Add-WindowsFeature RSAT-ADDS, Web-Server, Web-Static-Content, Web-Default-Doc, Web-Http-Errors, Web-Asp-Net, Web-Net-Ext, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Http-Logging, Web-Log-Libraries, Web-Request-Monitor, Web-Http-Tracing, Web-Basic-Auth, Web-Windows-Auth, Web-Client-Auth, Web-Filtering, Web-Stat-Compression, Web-Dyn-Compression, NET-WCF-HTTP-Activation45, Web-Asp-Net45, Web-Mgmt-Tools, Web-Scripting-Tools, Web-Mgmt-Compat, Desktop-Experience, Telnet-Client, Windows-Identity-Foundation

Add-WindowsFeature NET-Framework-Core, RSAT-ADDS, Windows-Identity-Foundation, Web-Server, Web-Static-Content, Web-Default-Doc, Web-Http-Errors, Web-Dir-Browsing, Web-Asp-Net, Web-Net-Ext, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Http-Logging, Web-Log-Libraries, Web-Request-Monitor, Web-Http-Tracing, Web-Basic-Auth, Web-Windows-Auth, Web-Client-Auth, Web-Filtering, Web-Stat-Compression, Web-Dyn-Compression, NET-WCF-HTTP-Activation45, Web-Asp-Net45, Web-Mgmt-Tools, Web-Scripting-Tools, Web-Mgmt-Compat, Server-Media-Foundation, BITS

From <https://technet.microsoft.com/en-us/library/dn933900.aspx>

Check prerequisites for hotfix

NOTE: If KB2919355 is installed first then you need to Uninstall it and install Windows8.1-KB2982006-x64 first

clip_image001[5]

clip_image002[4]

get-hotfix KB3173424,KB2919355,KB2919442

clip_image003[4]

From <https://support.microsoft.com/en-us/help/3057448/-the-update-is-not-applicable-to-your-computer-error-when-you-install>

Download IIS hotfix

https://www.microsoft.com/en-us/download/details.aspx?id=44051

From <https://technet.microsoft.com/en-us/library/dn951388.aspx>

Installing Director Prerequesties

Add-WindowsFeature RSAT-ADDS, Web-Server, Web-Static-Content, Web-Default-Doc, Web-Http-Errors, Web-Asp-Net, Web-Net-Ext, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Http-Logging, Web-Log-Libraries, Web-Request-Monitor, Web-Http-Tracing, Web-Basic-Auth, Web-Windows-Auth, Web-Client-Auth, Web-Filtering, Web-Stat-Compression, NET-WCF-HTTP-Activation45, Web-Asp-Net45, Web-Scripting-Tools, Web-Mgmt-Compat, Desktop-Experience, Telnet-Client

From <https://technet.microsoft.com/en-us/library/dn951388.aspx>

Easier solution:

Prerequisite not satisfied: Before you install Skype for Business Server 2015, you must install an update for Windows Server 2012 R2. For details about the update, see Microsoft Knowledge Base article 2982006, “IIS crashes occasionally when a request is sent to a default document in Windows 8.1 or Windows Server 2012 R2” at http://go.microsoft.com/fwlink/?LinkId=519376

Solution:

Extract the .msu to cab

Expand -F:* C:\Windows8.1-KB2982006-x64.msu c:\

clip_image004[4]

Install CAB

dism /Online /Add-Package /PackagePath:C:\Windows8.1-KB2982006-x64.cab

clip_image005[4]

Check Powershell version = 3

$psversiontable

clip_image006[4]

Install prerequisites

clip_image007[4]

clip_image008[4]

Restart is required

clip_image009[4]

clip_image010[4]

clip_image011[4]

clip_image012[4]

Prepare Active Directory

clip_image013[4]

clip_image014[4]

clip_image015[4]

clip_image016[4]

clip_image017[4]

clip_image018[4]

clip_image019[4]

Install Administrative tools

clip_image020[4]

clip_image021[4]

clip_image022[4]

clip_image023[4]

Prepare First standard edition server

clip_image024[4]

clip_image025[4]

clip_image026[4]

clip_image027[4]

clip_image028[6]

clip_image029[6]

clip_image030[6]

clip_image031[6]

clip_image032[6]

clip_image033[6]

clip_image034[6]

clip_image035[6]

clip_image036[4]

I will create a shared folder

clip_image037[4]

clip_image038[4]

clip_image039[6]

clip_image040[6]

clip_image041[6]

clip_image042[4]

clip_image043[4]

It’s time to publish the topology

clip_image044[4]

clip_image045[4]

Publishing failed with an error that states the following

clip_image046[4]

So I will double check that I am member of the required groups

clip_image047[4]

It seems not, I will add Csadministrator and RTCUniversalServerAdmins

clip_image048[4]

Solution:

Still I get the same error every time I try to publish the topology. Apparently the way I solved this was by creating a new topology where the standard pool name must match the server’s hostname otherwise Topology won’t be able to access the SQL Express that’s installed by Lync setup.

So in this case I am going to re-create my topology as following

Moh10ly.com is my public domain which is going to be my sip domain in this case not my local one (Lab.com)

clip_image028[7]

clip_image029[7]

clip_image030[7]

clip_image031[7]

clip_image032[7]

Next I will put my server’s FQDN in the pool name, my FQDN Is

clip_image049[4]

clip_image050[4]

clip_image033[7]

clip_image034[7]

clip_image035[7]

clip_image051[4]

clip_image052[4]

clip_image039[7]

clip_image040[7]

clip_image041[7]

clip_image053[4]

clip_image054[4]

Now it’s time to publish the topology once again

clip_image055[4]

clip_image056[4]

clip_image057[4]

Seems we have passed the permission issue as soon as the Standard edition FE server matches the FQDN of the server

clip_image058[4]

clip_image059[4]

We’ll look up at the open to-do list now

The to do list seems a bit different from Lync 2013 as it requires the part about the certificate

clip_image060[4]

I will run the Local setup for the server since I only have one server now.

clip_image061[4]

Before we run the local setup we need to make sure that our account has the required privileges which is shown under the Install local CS below. Since I already have configured the account’s privileges I will continue my setup.

clip_image062[4]

clip_image063[4]

clip_image064[4]

clip_image065[4]

There’s nothing new about the local store installation on S4B except that it checks and downloads updates during this process as the report shows below.

clip_image066[4]

Detailed steps for the local store installation can be found in the sub page.

clip_image067[4]

Now it’s time to move to the next step and check for the prerequisites

clip_image068[4]

clip_image069[4]

clip_image070[4]

S4B says that a prerequisite is not meet, checking the link posted in the error information it seems that it needs a hotfix to be installed on the server

http://go.microsoft.com/fwlink/?LinkId=519376

clip_image071[4]

I am attaching the hotfix after requesting and Installing as requested

<<478232_intl_x64_zip.rar>>

clip_image072[4]

clip_image073[4]

After finishing we’ll double check if the prerequisites are meet or not

Running the setup again it seems that the prerequisite has been satisfied.

clip_image074[4]

The setup and in particular the next step could take approximately about 5-10 minutes depending on the resources you have assigned to the Skype for business server.

clip_image075[4]

clip_image076[4]

I will navigate to the MSI file location and try to install it without using the wizard.

clip_image077[4]

The file path is as showed in the previous path:

C:\Programdata\Microsoft\Skype for Business Server\Deployment\cache\6.0.9319.0\

clip_image078[4]

So the problem is that Windows Identity foundation is not installed. Although I have copied the prerequisite cmdlet from the official Microsoft Skype for business’s technet article but it seems they have missed out there so I will adjust the powershell cmdlet to include it which means you won’t face this issue.

clip_image079[4]

clip_image080[4]

Now I’ll re-run the setup again

clip_image081[4]

We have passed the error already and now in the process of assigning accounts to SQL services.

The setup might take approximately 30-60 minutes installing all the required components.

clip_image082[4]

clip_image083[4]

In order to continue to the next step we must deploy CA (Certification Authority) to issue a certificate for Skype for Business Front end web services.

I already have one CA deployed on my CA so I will just go ahead and click run on the step 3

This process will be easy as it’s automated if you have configured your CA properly. First click on Request

clip_image084[4]

Now S4B certificate request wizard provides new user interface that’s easier and faster to fill, I will fill it and go ahead with issuing the certificate.

clip_image085[4]

clip_image086[4]

clip_image087[4]

clip_image088[4]

clip_image089[4]

clip_image090[4]

clip_image091[4]

And it’s done

clip_image092[4]

I will do the same steps for the OAuthTokenIssuer

clip_image093[4]

clip_image094[4]

Now it’s time to start the Services and check eventviewer

Trying to start the services from the wizard fails with event ID 20002 so instead I am going to try Lync Management shell instead

clip_image095[4]

Trying Management shell with the cmdlet start-cswindowsservices seems to work

clip_image096[4]

clip_image097[4]

All the services are running now

clip_image098[5]

See you later at Part 2









Unified messaging between Exchange 2016 and Skype for Business





 

In order to setup UM between Exchange and Skype for business server, the most important step is how you configure the Certificates between both servers in order for them to trust each other.

For that you don’t have to use a public Certificate but rather an internal CA certificate that has its root certificate installed on all of the server where you intend to deploy the UM. (Exchange, S4B Servers..etc).

To claim this certificate, the easiest step would be to get the CSR from Skype for Business’s Deployment Wizard

Run Deployment Wizard and click on the “Install or Update skype for business Server system”

clip_image001

Then click on step 3 (request, install or assign Cert)

clip_image002

I already have certificate deployed for S4B service but I’ll request CSR again to get one trusted certificate for both Exchange and S4B.

I will tick only the services that matters as in the below screenshot (Server default and Web services internal) later also will be used for OWA integration with UM.

clip_image003

Click on Request

clip_image004

Click on Advanced

clip_image005

Next

clip_image006

I’ll continue next until I’ve got to the important part which is “Name and Security settings” I’ll need to tick the “Mark the certificate’s private key as exportable” since we’ll export the certificate to Exchange servers

clip_image007

Next I’ll add Exchange servers’s FQDNs.

clip_image008

clip_image009

Click Next

clip_image010

clip_image011

Here is the CMDLET

Request-CSCertificate -New -Type Default,WebServicesInternal -CA “DC2016.moh10ly.com\moh10ly-DC2016-CA” -Country “TR” -FriendlyName “Skype for Business Server 2015 Default certificate 3/18/2016” -KeySize 2048 -PrivateKeyExportable $True -Organization “moh10ly” -OU “moh10ly” -DomainName “sip.moh10ly.com,ex2016.moh10ly.com,ex2016-2.moh10ly.com,ex2010.moh10ly.com” -AllSipDomain -Verbose -Report “C:\Users\administrator.MOH10LY\AppData\Local\Temp\2\Request-CSCertificate-[2016_03_18][11_16_35].html”

Click Next again and mark the thumbprint for the new Cert as we’ll need to see it later to make sure it’s properly configured for the UM on Exchange.

8BA9A2C4CD926B01C029F6B9A76D75BBEFDDE069

clip_image012

Click next to assign the Cert

clip_image013

clip_image014

Successfully, the certificate has been assigned to the Services

clip_image015

Here’s the CMDLET

Set-CSCertificate -Type Default,WebServicesInternal -Thumbprint 8BA9A2C4CD926B01C029F6B9A76D75BBEFDDE069 -Confirm:$false -Report “C:\Users\administrator.MOH10LY\AppData\Local\Temp\2\Set-CSCertificate-[2016_03_18][11_19_06].html”

Now it’s time to export this certificate and import it to Exchange servers

clip_image016

I’ll find the certificate that I have created today by looking at the expiration date which is 2 years from now with the same day.

clip_image017

Now I’ll right click on the certificate and export it with the private key.

clip_image018

I’ll open Exchange EMC and import the certificate

clip_image019

I’ll have to put the exported cert in a shared folder and provide the path and the password for it

clip_image020

I’ll add the two servers below

clip_image021

clip_image022

I’ll double click on the imported certificate and assign the UM services to it on each of the servers

clip_image023

clip_image024

I have got the below error due to not configuring the service to use TLS instead of TCP on both servers.

clip_image025

To fix this I’ll go on Exchange Management shell and run the following CMDLET

Get-UMService | Set-UMService -UMStartupMode TLS

clip_image026

clip_image027

Now I’ll try to save again

clip_image028

clip_image029

I’ll proceed with YES and continue to do the same to the other Server and restart the UM service on both servers

clip_image030

Now it’s time to create a UM Dial plan

clip_image031

I’ll configure the UM Dial plan according to my Skype for Business settings for users enabled for EV

clip_image032

To use powershell, you can use the following cmdlet

New-UMDialPlan –Name DialplanName –UriType SIPURI –NumberOfDigitsInExtension 4 –VoIPSecurity Secured –CountryOrRegionCode 90 –AccessTelephoneNumber +9012345678

Next, adding a gateway to the UM (NOTE: If configured incorrect, will cause the service not to start and errors with event ID (1057, 4999,1430, 1038) will appear.

Time to configure Gateway

clip_image033

In the gateway I’ll add my PBX (AsteriskNow) and place my already configured UMDP

clip_image034

clip_image035

When you create the dial plan, Exchange automatically creates a new UM mail policy along with it and it also generates a name that’s related to the Dial plan

In order to see this policy, you will have to double click on the new dial plan to view it and you can also change the policy in it .. Which I’m going to apply for the length of the policy to make it shorter

clip_image036

Double click on the Mailbox policy and navigate to Pin Polices and change it to the length you want to allow

clip_image037

Configure Auto Attendant

clip_image038

Set the AA as how you want it to be configured and make sure you add the full E.164 format as it won’t accept otherwise.

clip_image039

Click Save to continue

Now time to configure OVA (Outlook voice access)

Subscriber Access

If you want to configure Outlook Voice Access (OVA) , sometimes also referred to as Subscriber Access, click on the Configure button. Select Outlook Voice Access in the left hand menu and enter the telephone number you want to use to access OVA. This must be in the E.164 notation.

clip_image040

To do so click on Configure

clip_image041

To assign the new dial plan to the UM services, both on the Client Access Server (UM Call Router) as well as on the Mailbox server. In an Exchange Management Shell windows enter the following commands:

1

2

Set-UMCallRouterSettings -DialPlans “Exchangelabs Dial Plan” –Server 2012E15FE04

Get-UMService | Set-UMService -DialPlans “Exchangelabs Dial Plan”

clip_image042

clip_image043

Now I’ll also change the UM call router to TLS and assign Certificate to the service then restart it

clip_image044

clip_image045

Restart the services of the Call router, then associate the service with the dialplan you created.

Set-UMCallRouterSettings -DialPlans “UMDP1” –Server EX2016

Set-UMCallRouterSettings -DialPlans “UMDP1” –Server EX2016-2

Configure Skype for Business Server

To configure the UM Service to be used with Skype for Business Server. Microsoft has a script that will create and configure all necessary components. This scripts is located in the scripts directory C:\Program Files\Microsoft\Exchange Server\V15\Scripts.

Run the following CMDLET

CD $ExScripts

.\ExchUCUtil.ps1

clip_image046

The first time you setup this script it’ll detect the Dial plan and set it up with Skype for Business Server

clip_image047

It will show that no setting has changed but the fact that the dial plan is showing here Not found means that there something has changed .. You’ll notice that if you run the same script again.

clip_image048

Let’s try it again

Here you can see that the dial plan has been assigned to the S4B Front end server.

clip_image049

This script performs the following:

  • Grants Skype for Business Server permission to read Exchange UM Active Directory components, specifically, the SIP URI dial plan that was created in the first step;
  • Creates a UM IP gateway for each Skype for business Server pool that hosts users who will be enabled for Enterprise Voice;
  • Create an Exchange UM hunt group for each UM IP gateway. The hunt group pilot identifier will be the name of the dial plan associated with the corresponding UM IP gateway. The hunt group must specify the UM SIP dial plan used with the UM IP gateway.

When the script has run you’ll see a new UM IP Gateway appear in the EAC. Since this script not only creates the UM IP Gateway but also sets the necessary permissions the UM IP Gateway was not created manually in the first step.

clip_image050

Next we’ll go to Skype for Business FE server and then run the OcsUmUtil.exe tool which creates the contact objects for Outlook Voice Access and for the auto attendants. This tool can be found in C:\Program Files\Common Files\Skype for Business Server 2015\Support

clip_image051

I’ll right click the file to run it as administrator

clip_image052

Click on Load Data

clip_image053

clip_image054

Select the SIP dial plan and click ADD

clip_image055

Click OK

Right after configuring this your Voice mail should be enabled once you enable your user for it

After I enable user for UM and assign a valid dialplan .. Now I can see the user has got his Voice Mail option available.

clip_image056

Hope this was useful









FreePBX 6.12.65 Integration with Lync 2013





Installing AsteriskNow (FreePBX 6.12.65) and integration with Lync 2013
Download AsteriskNow from the following Link
http://www.asterisk.org/downloads/asterisknow
First the setup window will come: there I will choose No RAID on Asterisk 13 since this is a virtual machine.
clip_image001
Here I will choose IPv4 static IP (Manual configuration) and click OK
clip_image002
clip_image003
clip_image004
Choose the time zone according to the nearest location to you
clip_image005
Next, we’ll configure the root password
clip_image006
Here it’s formatting the Disk that I have assigned to the VM.
clip_image007
It should start the installation now and should download all the required packages from the internet incase they were not found on the ISO which I’ve loaded.
clip_image008
Now the installation is about to finish and once it does, the machine is supposed to restart on its own allowing you to go to the Web UI.
clip_image009

Upon setup and restart, you might get the following error! The error states that your PBX can’t access the internet so you might wanna double check your NIC configuration and that you’re able to reach to it. 
This is usually related to the DNS setup on the Centos machine where “AsteriskNow” is setup.
clip_image010
If you do a test and try to update your system from the CLI window you might get this error which is related to the DNS.
To resolve it, you’ll have to replace the localhost with any public DNS e.g. (google or comodo DNS) or any internal DNS that’s capable of reaching out to the internet to resolve this problem.
To edit the DNS you will have to type in the command  “nano /etc/resolv.conf”
  
The default DNS is the localhost
and you’ll have to manually change it and save the  settings
Press Ctrl + X and then Press Y to save and hit Enter
To test that we can access the internet you can nslookup google.com for instance and see if it works

Once you are able to resolve the google.com, that error will go.

Now to continue, let’s setup a FreePBX Admin (Make sure you remember both username and password)

image
clip_image012
Click on the (FreePBX Administration) and enter the username and password you have just created in the previous step.
This will allow you to the configuration portal
clip_image013
Extensions configuration:
To start, let’s configure an extension (Since I don’t have an IP phone now) so I will use a SIP application for my test (Zoiper or Xlite would do fine)
clip_image014
Select Chan SIP device as this talks directly with Lync Trunk then Click Submit once you choose the device .
clip_image015
Now I will configure the new extension’s number, name and secret and port too.
clip_image016
Under device options, you have to set the secret (Password) which you’ll use to login to your sip phone or sip softphone..
Note:
You need to also make sure that the port configured under the device is what will be used for the device to login with this sip extension
so basically the sip port in this case is 5060 which is the default one unless you’re already using a different port then you’ll have to reconfigure it here.
 
image
I’ll leave the rest of the options on default value and click submit. Then apply Config
Applying Configuration
clip_image018
Now I will use a soft phone (SIP Application) on my PC to check out if calls are working properly. And for the second extension a second computer with the same software or even A software like Zoiper or Xlite can be utilized on iPhone or Android for the same purpose.
clip_image019
No other settings are required on the SIP phone after that it should register without an issue. And you’ll be able to make calls between SIP phones
clip_image020
I am going to call my computer (3700) sip phone (Xlite) from my iPhone (Zoiper) soft phone (3800)
clip_image021
So calls are working properly between SIP extensions, now we’ll have to go configure Lync and Asterisk Configuration.
Before starting, we’ll have to enable the TCP protocol on Asterisk for Lync to send calls to Asterisk since Lync talks only TCP.
Enabling Asterisk to listen on TCP
Enable TCP for Lync and SIP Phones for Asterisk
clip_image022
I’ll have to configure the local networks and the RTP port range as well.
clip_image023
Next I’ll click on Submit, and apply configuration then on top right I’ll click on Chan SIP to configure the ports and the right protocol
clip_image024
Under SIP Settings, make sure your settings matches the snapshot below, then navigate to advanced settings
clip_image025
Under Advanced General settings make sure that CHAN_SIP is bind to port 5061 or else calls from Lync will fail with “Unauthorized” error code.
clip_image026
Once you change the port scroll further down to Other SIP settings and add the following variables
Tcpenable = Yes
Transport = tcp
clip_image027
Submit the changes and apply the configuration.
Lync Configuration
Now I will go on Lync server now (Standard edition) and enable the TCP port for the mediation server (Collocated mediation service)
To do so
Right click on your Mediation server and edit properties and Enable TCP port and change it from 5068 to 5060.
clip_image028
I will publish the topology
clip_image029
Published the topology and now it’s time to run the setup as it will install the mediation server role on Front end.
clip_image030
Next I will run the second step (Setup or remove Lync Server Components):
clip_image031
I will go check if the mediation service is enabled now
clip_image032
I will run the command netstat -anb >1.txt
The command will export all the ports status on the server including each of the Lync services.
clip_image033
So Lync mediation service is listening on the default sip port 5060.
Now I will go back to the topology and add the PSTN Gateway (AsteriskNow)
Right click on PSTN Gateways –> Click add PSTN gateways
clip_image034
Next
clip_image035
Next, I will type in the AsteriskNow PBX IP address and the port that “Chan_SIP” driver is listening on since all calls are going to be routed to it.
And will select my mediation server and the Mediation server’s configured port on Lync.
clip_image036
Click Finish and Right click on your front end server and click properties
Make sure you
clip_image037
Click on Make default and then OK then publish the topology
Asterisk Configuration
Asterisk side of the Integration
In order for the configuration to work, we’ll have to configure a new trunk of the Asterisk IP PBX to identify where is the Lync server ..etc
Let’s go to our Asterisk portal, configure new trunk by going to Connectivity -> Trunks then choose “Add SIP(chan_sip) Trunk”
clip_image038
You will need to fulfill the boxes in red below each with what pertain to it.
clip_image039
The IP 172.16.24.195 is my Mediation server (Front end since Mediation server is collocated)
TCP is the protocol that Lync uses
5060 is the port which Lync listens on
I will clear all the settings below “User Details” and save this trunk
clip_image040
Now field cleared and next will click on Submit Changes.
clip_image041
Inbound Routes
I have applied the configuration and now it’s time to create routes on Asterisk to route calls to Lync.
To configure routes, click on Connectivity and then Inbound routes
clip_image042
clip_image043
clip_image044
Click Submit now and Apply Config for changes to take effect
clip_image045
Outbound Routes
It’s time to configure the outbound routes, Depending on your Lync users URI or telephone number and extension number you will have to configure
Your outbound routes according so it will be able to route it properly to Lync users.
I’m going to show my user’s uri and extension on Lync server and what does it look like now
clip_image046
So the entire number is +2163314210 but my extension is basically 4210
Now again click on Connectivity > Outbound routes and add new “Dial Pattern” as following
The +216331 will be automatically entered by AsteriskNow once you dial the number defined in the “Match Pattern” field
clip_image047
Once finished configuring the required dial patterns you can submit and apply …
clip_image048
Lync Voice Route Configuration
Now it’s time to go configure Lync Routes, Go to Lync Server and open the Control panel, Go to Voice routing there we will go under the dial plan
tab and choose New User Dial Plan.
If you don’t want to mess up your Global dial plan or let every new user be able to use this dial plan ,you will have to configure a user dial plan.
clip_image049
I will have to create 2 normalization rules at least in the new dial plan. The first one is going to normalize the inbound numbers
And the second one is going to normalize the outbound.
clip_image050
Since on PBX I choose to create extensions that begins with 3 and are 4 digits long, I will create a normalization rule that’s exactly 4 digits
And it starts with 3. depending on your PBX configuration for the extension and inbound routes Lync needs to either have or not have the + in the dial plan
clip_image051
Now I will create the second dial plan which is from Asterisk to Lync “To match the full URI”
The normalization rule that I am creating here is 10 digits long and it starts with 21633 and it has + digits to add
clip_image052
clip_image053
After creating the Dial plans, it’s time to test them now! I will go to the Test Voice Routing Tab and create a test
So the test for Asterisk Extensions goes well
clip_image054
Now I will test the Lync dial plan
clip_image055
Since Asterisk is going to send the full URI as it will auto complete it even if the user enters the extension only (4210) then our rule is configured properly
Now after configuring rules and testing them it’s time to go to Voice Policy tab and create a new voice policy for Asterisk
clip_image056
Click on New under “Associated PSTN Usages”
clip_image057
Click on New under Associated Routes
clip_image058
You can leave the pattern .* (Which will allow all calls) for the time being until we test everything between both systems.
Scroll down and click on Add next to “Associated Trunks”
clip_image059
clip_image060
Select the available trunk and add it then Click OK 3 times and commit all changes
clip_image061
Now after applying all the configuration, It’s time to apply some tests.
From Asterisk to Lync
Below when I initiated the call I managed to see the SIP invite coming from the IP “172.16.24.195” which is my AsteriskNOW PBX IP going to Lync and then the phone starts ringing.
When I have answered the call the RTP starts flowing.
clip_image062
Here I typed RTP in the Wireshark filter and could see the RTP media flowing between Asterisk and Lync Mediation server on the G.711 codec.
clip_image063
Note:
What I like about Asterisk is that it sends all users information along with the call and doesn’t strip them out, in extension information I have typed the extension name as “NEWPHONE” and put it all in capitals.
clip_image064
From Lync to Asterisk
Since the call is from Lync to Asterisk, then I will have to run wireshark or trace on Asterisk to see the Invite.
clip_image065
You can see Asterisk logs if you click on “Reports> Asterisk LogFiles”
clip_image066
Once the call has ended I was able to see that in detail as well in the logs.
All the media was
clip_image067
Next few days I will install and configure Brekeke to work with both (Asterisk and Lync) in the same environment… and share my deployment update with you all.
Hope this would do be of good help Open-mouthed smile

del.icio.us Tags: ,,,