How to monitor all lync users instant message via C# console application? - ucma

I have created UCMA trusted application using C# console application.
I want to monitor all Lync Users instant messaging calls (in one place) as well as store their conversations in the database via this console application.
Is it possible?.
If possible, please give an idea or any url.

UCMA trusted applications will only respond to traffic to the endpoints associated with that application so if you want to monitor all instant message traffic it would be the wrong API.
I would suggest using SIP Application API http://msdn.microsoft.com/en-us/library/office/hh364644(v=office.14).aspx to create a server application. This will also require the use of MSPL documented here
As Dai has asked - is the console application a requirement or will a windows service be ok?

Try our this sample application SipSnoop it basically shows all the metadata passing throught the lync server, you can tweak around it according to your requirement.

Related

Test Automation: Automate outgoing calls from fixed phones registered with a Skype for Business IP-PBX

For test automation purposes, we're currently investigating upon how we can have a fixed phone registered with a Skype for Business IP-PBX (e.g. an AudioCodes phone or a Yealink phone or...), make an outgoing call upon request.
E.g. Our test automation platform would send a request to the Skype for Business Server to tell this server to initiate an outgoing call from phone A registered with that Skype for Business Server to an external phone B. So a little bit similar as JTAPI functionality...
I.e. Would this be feasible by using UCMA 5.0?
There is no way to SIP to make a physical phone make a call.
With UCMA you are effectively a softphone, so with UCMA you can make your "softphone" make a call.
With the Lync Client API you are remote controlling the Lync Client (Skype for Business client), so with the Lync Client API you can remote control the Lync Client to make a call.
The only way I can think of to make a physical phone dial would be to use a Polycom VVX phone linked to a instance of a Lync Client using there "Better Together" application. Then you can use the Lync Client API to remote control the Lync Client which would in turn remote control the Polycom VVX phone.
I haven't done this in a Skype/Lync environment but I've done something similar in Asterisk a long time ago. I don't remember all the details of the test any more.
One key to get hardware involved, if you don't use a BToE connection, is to leverage the "Auto Answer" answer feature on most handsets.
I have seen some phones also allow for some push/curl commands to be sent to the device. An example of this with a polycom is here. The post is old and it's been years since I messed with that, but I assume some of that function may still be in some devices/firmware. I haven't seen anything similar with AudioCodes or Yealink, but they maybe there as well.

Establish a Lync/Skype for business IM Chat from a website (Intranet)

We need to develop a website in Asp.net MVC 4 which will connect user within the organisation on Lync or (skype for business now):The ask is:
1) A Sales guy see 10 Technical person in the list which is in database and all of them are in AD if that helps
2) A sales guy click on an icon to connect to a technical person, a lync window appears on client machine (We can assume that all client will have Lync or skype for business up and running on their system from where they will access website)
3) A lync window appears on the machine of a person we are trying to connect to with Default text "hi! Bla Bla Bla"
Can somebody point me to the correct implementation with some set up details from infrastructure POV as well. We tried to do that but that does not work when we deploy to server:
AutomationModalities conversationModes = 0;
Dictionary<AutomationModalitySettings, object> conversationSettings =
new Dictionary<AutomationModalitySettings, object>();
conversationModes = AutomationModalities.InstantMessage;
conversationSettings.Add(AutomationModalitySettings.FirstInstantMessage, "Hi This is a call XXXXXXn");
conversationSettings.Add(AutomationModalitySettings.SendFirstInstantMessageImmediately, true);'
Since it appears you cannot touch the cross-domain authorization list (white-list), you should be able to achieve what you are looking for by writing some non-JavaScript code to communicate with UCWA. There are a few articles on MSDN that demonstrate how to communicate with UCWA using C#/.NET which might prove interesting:
Lync 2013: Create UCWA Windows Store apps using C#/XAML and XML
Set up the UCWA event channel to receive incoming notifications
Making an outgoing IM call and sending messages
Answer an incoming IM call and receive messages
It gives the basics of handling authentication, interacting with the events channel, handling incoming IM calls and messages. It is designed to handle XML, but that could be changed to work with JSON.
You could use the Skype Web SDK for this - Microsoft have a bunch of examples on their site for the SDK.
http://developer.skype.com/
or more specifically
https://msdn.microsoft.com/en-us/library/dn962160%28v=office.16%29.aspx
It's a JavaScript library, but very easy to integrate with a .NET MVC or Forms app.
I also have some tutorials on exactly this on my blog but not if it's appropriate to post that here. :)

How to monitor my Lync by C# console application (using trusted application endpoint)?

I have created console application with Trusted Application (UCMA) endpoint using C# Which is running in separate server (Computer).
I have installed Lync in my laptop. My requirement is to:
The console application should show subject, sip uri and date time of each instant message calls received by the Lync.
Duplicate of How to monitor all lync users instant message via C# console application?
Answer in full there but in summary a UCMA app would be only able to track calls to it and not all calls on the network. Look to the SIP Application API and MSPL based solution.

Feasibility of iOS App using Windows Azure Service Management API?

I have been struggling with setting up an iOS (Objective-C) app which utilizes the Service Management APIs. I've successfully was able to get Storage API calls working fine, but from what I'm reading, one big difference between the two Azure APIs seems to be a matter of authentication. For reference, what I'd ideally like to do is setup a simple API call to list the Hosted Services accounts in an app (eventually geared for public deployment).
According to the API Azure documentation, the Service Management APIs require a management certificate (.cer) to be uploaded and then for the client to utilize that cert to authenticate the request. My hunch is that this will prevent an app like the one I want to create from being feasible by any means, since public users with devices containing the downloaded app won't have that cert or the ability to attach it programatically in the objective-c code.
Is my hunch correct on this? Is this a forlorn idea that should not be pursued? I would think for this to be possible, the user would be required to upload their device's cert file to Azure somehow, and then to somehow have the app use this cert for authentication. I'm a bit lost on where to even begin on that, even if it is possible. :(
Any helpful info would be greatly appreciated. I have a lot of experience in the iOS side of things, but specifically in authentication/certificates of this type, I unfortunately have minimal experience.
Thanks in advance!!
-Vincent
Actually, I have an app that does exactly what you're talking about. CloudTools for Windows Azure is an iOS app that uses the Azure Management Service API to perform Azure management. It's been on iTunes for over a year.
Your question is somewhat broad, but I can tell you that the certificate issues were by far the biggest issues in designing/developing the app. You can't store the certificate in keychain, because keychain works in a manner such as this: a) you request a remote url that requires a certificate; b) that url tells you that it needs a certificate and c) keychain provides an appropriate certificate. It's a multi-request process. That won't work for Azure, because Azure service management APIs expect the initial call to include the certificate.
I require the users to add their certificate through iTunes File Sharing (steps here). Of course, they have to upload the public key portion to Azure. Then, I provide the certificate and private key with each request. I use the HTTP library ASIHttpRequest, although I believe that the latest (iOS 5.x) Apple libraries have similar functionality.
I'd be happy to provide any further details if you have any follow-up questions.
With Windows Azure, if you are using Service Management API then you really need to have certificate based authentication to create a SSL tunnel between your machine which is requesting the connection and Windows Azure Management Portal. I am not sure how wide your iOS application distribution is.
My first thought is that why would you want to deploy Windows Azure application from an iOS application, are you going to build application in iOS devices and deploy? Windows Azure Application deployment is mostly done on client machines so, Azure application management on iOS is great idea, however Application deployment from iOS not sure why. May be you are on something big here.. In both cases you really need Service Management Certificate on iOS device. If it is an enterprise app where you can let users to install Service Management certificate, it would be easier for iOS devices to use Service Mgmt API.
So if you want to use Service Management API from a client iOS app, I think the best solution will be to have WCF service hosted in Windows Azure which is configured to directly connect with your Windows Azure Portal. And from your iOS app, you just make call to your WCF service. This is very popular method to access service management API (through WCF Service) from any client app (WP7, iOS, Android) and the client side code is very light. On other hand you may need to pay to host a WCF service on Windows Azure.

App to app communication and security

I have client apps that talk to my silverlight application and its web services. So the client app is running on the client machine and making calls directly to the silverlight app running on the machine and also making web service calls.
I want the usernames/password security to be handled by the 3rd party client app.
Any idea how I can do this?
I'd try the Application Scenario's, Guidelines and How Tos sections of this CodePlex Link. You should be able to find a scenario that matches closely to yours and follow the guidelines and configuration to get yourself going.
If I've understood this correctly, the client application would pass a username/password to your silverlight app which would require a wsHttpBinding that has clientCredentials="Username". You would need to be able to authenticate this against a user store configured on your server, for example you could configure a SQL Server provider.
I'm not sure how your 3rd party client app works, but you would require a seperate security configuration for that communication. You could use a less secure binding if the apps were on the same machine and possibly use clientCredentials="Windows"/"None"/"Basic".
Difficult to advise further without knowing your exact situation. What do you have so far?