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

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.

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 all lync users instant message via C# console application?

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.

Get unread emails from exchange in Windows 8 Store App

I want to write an App (Windows Store App) which should display all my unread emails. I did my research at google and msdn but found nothing suitable.
The problem is as follow, my development pc does not have any connection to a exchange server, so I had to write an app (C#/XAML) which should later on work:
On every PC in the organisation
Uses the default credentials of the user
Displays the unread emails
Is it possible to get these information (Emails) by asking the EWS?
Is there a WinRT compatible Library to do this?
Thanks!
I did not found any good solution to request the Exchange Webservice from my Windows Store App.
The only solution I have now implemented was to use a own webservice which can use the EWS Managed API to send requests to the Exchange Server (higher than 2007).
The Windows Store App itself communicates via WCF with my Proxy-Webservice like it is done here

Authentication against Active Directory using a Mobile Device

I currently have a Mobile Application that communicates through a WCF Service to access a Database. The Mobile App can access on the network as well as externally. It connects to the WCF Service which is hosted on one server inside the network. From there the WCF Service is pointing at another server which is hosting the Database that the Mobile Device is accessing.
With the above process how would you setup authentication using Active Directory which would confirm the user of the Mobile Application before it can access the WCF Service to confirm that the user is a member of AD and they can then login after authorization is complete. This would occur as the user opens up the Application. Would this be coded into the App to prompt for the information, then send the information to the WCF Service which would then allow access? If not this then are there any other ways or information/links that can be provided please?
Take a look at the BUILD 2013 videos. Visual Studio 2013 will create a webproject that will automagically do all that for you (I think). Just bare in mind, it uses the Microsoft.OWin.Security beta packages.
Also...you will need to install the AspNetWebTools2013 package first...
http://www.asp.net/visual-studio/overview/2013/creating-web-projects-in-visual-studio#orgauthoptions