Configuring Skype for Business Server for Presence
                                            On the Skype for Business Server side, you need to define the device in the Skype for Business Topology as a Trusted Application. 
                                            
                                                
                                                    
                                                    
                                                    
                                                    
                                                        |  | ● | Detailed configuration of Skype for Business Server is beyond the scope of this document. | 
                                                
                                                
                                                    
                                                    
                                                    
                                                    
                                                        |  | ● | Before performing the below procedure, make sure that you have defined the device in the PSTN Gateway node of the Skype for Business Server Topology (using the Topology Builder). | 
                                                
                                             
                                            Using the Skype for Business Server Management Shell, perform the following steps:
                                            
                                            Run the following cmdlet to retrieve the SiteId property of the site:
Get-CsSite
                                            
                                                
                                                
                                                
                                                
                                                    |  | 2. | Create a Trusted Application Pool | 
                                            
                                            Run the following cmdlet to create a new pool to host the presence application:
New-CsTrustedApplicationPool -Identity <Pool FQDN> -Registrar <Registrar FQDN> -Site <Site Id>
                                            where:
                                            
                                                
                                                
                                                
                                                
                                                    |  | ● | Identity is the FQDN of the device, which sends the SIP PUBLISH messages with the presence status to Skype for Business Server | 
                                            
                                            
                                                
                                                
                                                
                                                
                                                    |  | ● | Registrar is the FQDN of the Registrar service for the pool | 
                                            
                                            
                                            For example:
New-CsTrustedApplicationPool -Identity sbcgw.example.com -Registrar skypepool.example.com -Site Portland
                                            
                                                
                                                
                                                
                                                
                                                    |  | 3. | Add the Trusted Application (Presence) to the Pool | 
                                            
New-CsTrustedApplication-ApplicationId <String> -TrustedApplicationPoolFqdn <String> -Port <Port Number>
                                            where:
                                            
                                                
                                                
                                                
                                                
                                                    |  | ● | ApplicationId is the name of the application | 
                                            
                                            
                                                
                                                
                                                
                                                
                                                    |  | ● | TrustedApplicationPoolFqdn is the FQDN of the trusted application pool | 
                                            
                                            
                                                
                                                
                                                
                                                
                                                    |  | ● | Port is the port number on which the application will run (5061) | 
                                            
                                            For example:
New-CsTrustedApplication -ApplicationId MSpresence –TrustedApplicationPoolFqdn sbcgw.example.com  -Port 5061
                                            Make sure the port number matches the port number configured on the device.
                                            
                                                
                                                
                                                
                                                
                                                    |  | 4. | Enable and Publish the Skype for Business Server 2015 Topology | 
                                            
                                            Run the following cmdlet to publish and enable your new topology:
Enable-CsTopology